diff --git a/.claude/agents/proto-change-tracer.md b/.claude/agents/proto-change-tracer.md new file mode 100644 index 000000000..2a37b9072 --- /dev/null +++ b/.claude/agents/proto-change-tracer.md @@ -0,0 +1,128 @@ +--- +name: proto-change-tracer +description: "Use this agent after regenerating protobuf definitions (e.g., after /fetch-protos) to trace the impact of proto changes through the codebase: generated Swift → service wrappers → client extensions → session/controllers → screens/viewmodels → tests.\n\nExamples:\n\n- user: \"what changed in the protos and what needs updating?\"\n assistant: \"I'll trace the proto changes through the service layer to identify what needs updating.\"\n The user wants to understand proto change impact. Use the proto-change-tracer agent.\n\n- user: \"I just regenerated the protos, what broke?\"\n assistant: \"I'll trace the updated proto definitions through the codebase to find affected code.\"\n Proto definitions were updated. Use the proto-change-tracer agent to trace impact." +model: sonnet +--- + +You are a protobuf change-impact analyst for the Flipcash iOS project — a multi-package +Swift app that uses grpc-swift 2 with two proto definition sets: **Core** (flipcash2) and +**Payments** (OpenCode Protocol / OCP). + +## Your Mission + +When proto definitions change, trace the impact through the full dependency chain and +identify every file that needs updating. You only analyze — you do not edit. + +## Architecture: Proto → Screen Chain + +``` +FlipcashAPI/Sources/FlipcashAPI/{Core,Payments}/proto/*.proto ← .proto files + [protoc via Scripts/run] + ↓ +FlipcashAPI/Sources/FlipcashAPI/{Core,Payments}/Generated/ ← generated stubs + _v1_.pb.swift (messages, request/response, result enums) + _v1_.grpc.swift (the .Client wrapper) + ↓ +FlipcashCore/.../Clients/{Flip API,Payments API}/Services/*Service.swift + ← wraps the generated .Client, builds requests, maps proto result enums to a + domain Error* enum (defined at the bottom of the same file) + ↓ +FlipcashCore/.../Clients/{Flip API,Payments API}/{FlipClient,Client}+.swift + ← public async wrapper (withCheckedThrowingContinuation over the completion API) + ↓ +Flipcash/Core/Session/, Flipcash/Core/Controllers/, Flipcash/Core/Screens/** + ← Session, Controllers, and ViewModels/Screens consume the client +``` + +**Proto namespaces (Swift type prefixes):** +- Core: `Flipcash__V1_*` — account, activity, blob, chat, contact, email, event, messaging, moderation, phone, profile, push, settings, thirdparty, common +- Payments: `Ocp__V1_*` — account, currency, messaging, transaction, common + +**Package/tool boundaries:** +- Generated Swift lives in the `FlipcashAPI` package; service wrappers live in `FlipcashCore`; screens live in the `Flipcash` app target. +- The Core and Payments messaging services share basenames — the fetch script renames the Core copy to `flipcash_messaging_v1_*` to avoid a collision in the merged module. + +## Analysis Process + +### 1. Identify what changed in the generated Swift + +`proto/` is wiped and re-cloned on every fetch, so diff the **generated Swift**, which +is the durable signal: + +```bash +git diff FlipcashAPI/Sources/FlipcashAPI/Core/Generated FlipcashAPI/Sources/FlipcashAPI/Payments/Generated +git diff FlipcashAPI/Sources/FlipcashAPI/*/proto # secondary, for intent +``` + +Identify: +- New services or RPCs (new methods on a `.Client`) +- Changed request/response message fields +- New or modified **result enum** values (`.pb.swift`) +- Removed or renamed fields/methods + +### 2. Trace through the service layer + +For each changed proto, find the wrapper in +`FlipcashCore/Sources/FlipcashCore/Clients/{Flip API,Payments API}/Services/`: + +- **New RPC** → needs a new method on the `*Service.swift` that builds the request + (`Flipcash_..._Request.with { ... $0.auth = owner.authFor(message: $0) }`), calls + `service.(request, options: .unaryDefault)` for unary or `.defaults` for + streaming, and maps the response. +- **Changed request fields** → updated builder in the existing method. +- **New result enum case** → the domain `Error` enum (defined at the bottom of the + same `*Service.swift`) needs a matching case. Until then, `Error*(rawValue:)` falls + through to `.unknown` — flag this. New conformers/cases must also update the + `FlipcashCoreTests/TransportClassificationTests` registry. + +### 3. Trace the async client wrapper + +Find the matching `FlipClient+.swift` (Flip API) or `Client+.swift` +(Payments API). A new RPC needs a `public func` here bridging the completion-based +service to `async throws` via `withCheckedThrowingContinuation`. + +### 4. Trace into consumers + +Search for usages of the affected client method / model in: +- `Flipcash/Core/Session/` — Session state +- `Flipcash/Core/Controllers/` — controllers (Rates, History, Database, …) +- `Flipcash/Core/Screens/**` — Screens and colocated ViewModels +- Any use of a changed message type in `FlipcashCore/Sources/FlipcashCore/Models/` + +### 5. Check tests + +Look under `FlipcashTests/` and `FlipcashCore/Tests/FlipcashCoreTests/` for suites that +build the affected request/response types or assert on the `Error*` enums, and whether +they need updating for the new shapes. Any new `TransportClassifiableError` conformer +must have a `TransportClassificationTests` registry line. + +## Output Format + +### Proto Changes Summary +List of changed services with what changed (new RPCs, field changes, enum additions), +grouped by Core vs Payments. + +### Impact Chain +For each change, trace the full path with `file:line` references: +``` +proto: Core/_v1_ + → service: Service.swift: + → error: Error enum in Service.swift: + → wrapper: {FlipClient,Client}+.swift: + → consumers: .swift: + → tests: .swift: +``` + +### Action Items +Prioritized checklist of files to modify, grouped by layer. + +## Important Guidelines + +- Always read the actual source files — never guess at the current implementation. +- Proto field additions are usually backward-compatible; removals and renames are breaking. +- New result enum values almost always need a new `Error*` case AND a `reportingLevel` + classification — an unmapped case silently degrades to `.error`-level `.unknown`. +- Confirm unary calls use `options: .unaryDefault` and streaming calls use `.defaults` + (never a deadline on a stream). +- Never edit generated files under `Generated/` — flag the wrapping `*Service.swift` instead. +- You are read-only: produce the impact report and checklist; do not modify files. diff --git a/.claude/skills/fetch-protos/SKILL.md b/.claude/skills/fetch-protos/SKILL.md new file mode 100644 index 000000000..fb1db448c --- /dev/null +++ b/.claude/skills/fetch-protos/SKILL.md @@ -0,0 +1,245 @@ +--- +name: fetch-protos +description: > + Fetch latest protobuf definitions, regenerate Swift bindings, verify the build, + summarize API changes, and scaffold new service stubs. Usage: /fetch-protos [core|payments] [both] +argument-hint: "[core|payments] (default: both)" +allowed-tools: + - Bash + - Read + - Edit + - Write + - Glob + - Grep + - Agent +--- + +# Fetch Protos + +Pull `.proto` files from upstream, regenerate the Swift gRPC bindings under +`FlipcashAPI/Sources/FlipcashAPI/{Core,Payments}/Generated`, verify they compile, +summarize the API changes, and scaffold missing service-layer implementations. + +## Pre-flight context + +- Core protos: !`find FlipcashAPI/Sources/FlipcashAPI/Core/proto -name "*.proto" 2>/dev/null | wc -l | tr -d ' '` +- Payments protos: !`find FlipcashAPI/Sources/FlipcashAPI/Payments/proto -name "*.proto" 2>/dev/null | wc -l | tr -d ' '` +- Git status: !`git status --short FlipcashAPI/` + +## Input + +Parse `$ARGUMENTS` to determine which domain(s) to fetch. + +**Rules:** +- Known targets: `core` (→ `flipcashCore`), `payments` (→ `flipcashPayments`) +- If no target specified, fetch **both** +- `both` explicitly fetches both +- Examples: + - `/fetch-protos` → fetch core + payments + - `/fetch-protos core` → fetch core only + - `/fetch-protos payments` → fetch payments only + +Target-to-repo mapping (handled by `Scripts/run`): + +| Target | App flag | Upstream repo | +|--------|----------|---------------| +| `core` | `flipcashCore` | `code-payments/flipcash2-protobuf-api` | +| `payments` | `flipcashPayments` | `code-payments/ocp-protobuf-api` | + +## Steps + +### Step 1 — Pre-flight tool check + +The script aborts if any generator is missing, but confirm first so the user can +install before anything destructive runs: + +```bash +command -v protoc protoc-gen-swift protoc-gen-grpc-swift-2 +``` + +If any are missing, install and stop: +- `protoc` → `brew install protobuf` +- `protoc-gen-swift` → `brew install swift-protobuf` +- `protoc-gen-grpc-swift-2` → `./Scripts/install-grpc-swift-2-plugin.sh` + +### Step 2 — Fetch protos and regenerate + +For each target, run from the repo root: + +```bash +cd Scripts && ./run -a flipcashCore # core +cd Scripts && ./run -a flipcashPayments # payments +``` + +Each invocation clones the latest `.proto` files from upstream, replaces the local +`proto/` directory, copies `proto_deps/` back in, and regenerates the Swift bindings +in `Generated/`. It also drops `validate_validate.pb.swift` (unused client mirror) +and, for core, renames the messaging service files to avoid a basename collision with +the payments messaging service in the merged `FlipcashAPI` module. Show the output. + +### Step 3 — Diff and summarize changes + +The meaningful diff is the regenerated Swift, since `proto/` is wiped and re-cloned: + +```bash +git diff --stat FlipcashAPI/Sources/FlipcashAPI/Core/Generated FlipcashAPI/Sources/FlipcashAPI/Payments/Generated +git diff FlipcashAPI/Sources/FlipcashAPI/*/proto +``` + +For each changed service, summarize: +- **New RPCs** added to services (new methods on a `*.Client`) +- **Modified RPCs** (changed request/response types or fields) +- **Removed RPCs** +- **New/modified messages, fields, and enum result cases** + +Present a structured change summary. If nothing changed, report that protos are +already up to date and stop here. + +### Step 4 — Build verification + +Verify the regenerated code compiles before touching anything else: + +```bash +./Scripts/build.sh +``` + +If the build fails, show errors and stop — a broken generation must be resolved +(usually a proto rename that orphaned a Swift type reference) before proceeding. + +### Step 5 — Trace service-layer impact + +Dispatch the **proto-change-tracer** agent to map the changes through the codebase: + +``` +Use the proto-change-tracer agent to trace the proto changes just fetched +(see `git diff FlipcashAPI/`) through the service → client → consumer chain. +``` + +The agent reports the full impact chain (generated → `*Service.swift` → +`FlipClient/Client` extension → Session/Controllers/ViewModels → tests) and a +prioritized checklist. Present its report. New enum result cases and new RPCs are the +common gaps — a proto result enum that gained a case will fall through to `.unknown` +in the existing `Error*(rawValue:)` mapping until a case is added. + +### Step 6 — Scaffold new service stubs + +For RPCs the tracer marked as needing scaffolding, ask the user before generating. +Follow the existing iOS layering — there is **no** Repository/Controller/DI layer here; +the chain is Service → Client extension → consumer. + +#### Service pattern + +Location: `FlipcashCore/Sources/FlipcashCore/Clients/{Flip API,Payments API}/Services/Service.swift` + +```swift +private let logger = Logger(label: "flipcash.-service") + +final class Service: Sendable { + + private let service: Flipcash__V1_.Client + + init(client: GRPCClient) { + self.service = Flipcash__V1_.Client(wrapping: client) + } + + func newRpc(/* args */, owner: KeyPair, completion: @Sendable @escaping (Result) -> Void) { + logger.info("Performing new RPC") + + let request = Flipcash__V1_NewRpcRequest.with { + // set fields + $0.auth = owner.authFor(message: $0) // Flip API; Payments uses signature helpers + } + + Task { + do { + let response = try await service.newRpc(request, options: .unaryDefault) // streaming: pass .defaults + let error = ErrorNewRpc(rawValue: response.result.rawValue) ?? .unknown + guard error == .ok else { + logger.error("New RPC failed", metadata: ["error": "\(error)"]) + await MainActor.run { completion(.failure(error)) } + return + } + await MainActor.run { completion(.success(/* mapped */)) } + } catch let error as RPCError { + await MainActor.run { completion(.failure(.from(transportError: error))) } + } catch { + await MainActor.run { completion(.failure(.unknown)) } + } + } + } +} +``` + +Conventions (verify against a neighboring service in the same folder): +- **Unary** RPCs pass `options: .unaryDefault`; **streaming** RPCs pass nothing (`.defaults`) — a stray deadline silently kills long-lived streams. +- Message strings are constants; every variable goes in `metadata` (see CLAUDE.md logging rule). Never log a whole proto blob. +- Hand results back on `MainActor` via `completion`. + +#### Error enum pattern + +Defined at the bottom of the same `*Service.swift` file, mapping the proto result +enum's `rawValue`. Conform it to `TransportClassifiableError` so the compiler forces +you to classify the four transport cases and every result case's `reportingLevel`: + +```swift +enum ErrorNewRpc: Int, Error, TransportClassifiableError { + case ok + case denied + // ... one case per proto result enum value, in rawValue order ... + case transportFailure + case cancelled + case rejected + case unknown + + var reportingLevel: ErrorReportingLevel { + switch self { + case .ok, .denied: return .info // expected business outcome + case .transportFailure: return .suppressed // network weather — never Bugsnag + case .cancelled: return .info // app-initiated teardown + case .rejected, .unknown: return .error // client/proto defect + } + } +} +``` + +Match the case ordering to the proto's result enum exactly — `Error*(rawValue:)` +depends on it. See `EmailService.swift` for the canonical shape and the +`FlipcashCoreTests/TransportClassificationTests` registry line every new conformer needs. + +#### Async client wrapper + +Location: `FlipcashCore/Sources/FlipcashCore/Clients/{Flip API,Payments API}/{FlipClient,Client}+.swift` + +```swift +extension FlipClient { // or Client, for Payments + public func newRpc(/* args */, owner: KeyPair) async throws -> Output { + try await withCheckedThrowingContinuation { c in + Service.newRpc(/* args */, owner: owner) { c.resume(with: $0) } + } + } +} +``` + +### Step 7 — Review and commit + +Show the user a summary of all changes (proto/generated updates + any scaffolded +service code). Offer to commit only after approval, with a conventional message: + +``` +chore: sync protos +``` + +If service stubs were scaffolded, suggest a separate commit: + +``` +feat: scaffold service for new RPCs +``` + +## Never + +- Edit generated files under `Generated/` directly — they are overwritten on the next regen. Update the wrapping `*Service.swift` instead. +- Give a streaming RPC a deadline (`.unaryDefault`). Streaming passes `.defaults`. +- Interpolate variables (especially base58/keys) into log message strings — variables go in `metadata`. +- Skip the build verification in Step 4. +- Scaffold service code without asking the user first. +- Commit without user approval. diff --git a/Flipcash/Core/Controllers/Database/Database+Conversations.swift b/Flipcash/Core/Controllers/Database/Database+Conversations.swift index 6ddac127c..36772acec 100644 --- a/Flipcash/Core/Controllers/Database/Database+Conversations.swift +++ b/Flipcash/Core/Controllers/Database/Database+Conversations.swift @@ -362,6 +362,12 @@ nonisolated extension Database { kind = 2 } + let cashAction: Int? = switch message.cashAction { + case .sent: 0 + case .tipped: 1 + case .none: nil + } + try writer.run( m.table.insert( or: .replace, @@ -374,6 +380,7 @@ nonisolated extension Database { m.nativeAmount <- nativeAmount, m.currency <- currency, m.mint <- mint, + m.cashAction <- cashAction, m.date <- message.date.timeIntervalSinceReferenceDate, m.unreadSeq <- message.unreadSeq, m.eventSequence <- message.eventSequence, @@ -404,6 +411,12 @@ nonisolated extension Database { private func conversationMessage(from row: RowIterator.Element) -> ConversationMessage? { let m = ConversationMessageTable() + let cashAction: CashAction? = switch row[m.cashAction] { + case 1: .tipped + case 0: .sent + default: nil + } + let content: ConversationMessage.Content switch row[m.kind] { case 0: @@ -438,6 +451,7 @@ nonisolated extension Database { id: MessageID(value: row[m.id]), senderID: row[m.senderId], content: content, + cashAction: cashAction, date: Date(timeIntervalSinceReferenceDate: row[m.date]), unreadSeq: row[m.unreadSeq], eventSequence: row[m.eventSequence], diff --git a/Flipcash/Core/Controllers/Database/Schema.swift b/Flipcash/Core/Controllers/Database/Schema.swift index e3db86f61..582dffa53 100644 --- a/Flipcash/Core/Controllers/Database/Schema.swift +++ b/Flipcash/Core/Controllers/Database/Schema.swift @@ -208,6 +208,8 @@ nonisolated struct ConversationMessageTable: Sendable { let nativeAmount = Expression ("nativeAmount") let currency = Expression ("currency") let mint = Expression ("mint") + // Cash delivery action (0 = sent, 1 = tipped); nil for non-cash rows. + let cashAction = Expression ("cashAction") let date = Expression ("date") let unreadSeq = Expression ("unreadSeq") // Event-log version of this message's current state; the store applies @@ -425,6 +427,7 @@ nonisolated extension Database { t.column(conversationMessageTable.nativeAmount) t.column(conversationMessageTable.currency) t.column(conversationMessageTable.mint) + t.column(conversationMessageTable.cashAction) t.column(conversationMessageTable.date) t.column(conversationMessageTable.unreadSeq) t.column(conversationMessageTable.eventSequence) diff --git a/Flipcash/Core/Screens/Conversation/ChatItem+Conversation.swift b/Flipcash/Core/Screens/Conversation/ChatItem+Conversation.swift index b8c0dd074..490f78872 100644 --- a/Flipcash/Core/Screens/Conversation/ChatItem+Conversation.swift +++ b/Flipcash/Core/Screens/Conversation/ChatItem+Conversation.swift @@ -96,7 +96,8 @@ extension ChatItem { amount: fiat.nativeAmount.formatted(), token: branding.token, flagImageName: flagName, - iconURL: branding.iconURL + iconURL: branding.iconURL, + isTip: message.cashAction == .tipped )) linkPreview = nil case .deleted: diff --git a/Flipcash/Supporting Files/Info.plist b/Flipcash/Supporting Files/Info.plist index 426aa3425..d21d689d0 100644 --- a/Flipcash/Supporting Files/Info.plist +++ b/Flipcash/Supporting Files/Info.plist @@ -23,7 +23,7 @@ com.flipcash.app.openChat SQLiteVersion - 26 + 27 UIApplicationSceneManifest UIApplicationSupportsMultipleScenes diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/account_v1_flipcash_account_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/account_v1_flipcash_account_service.grpc.swift index aba0536a9..2b6ae9cf8 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/account_v1_flipcash_account_service.grpc.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/account_v1_flipcash_account_service.grpc.swift @@ -15,13 +15,13 @@ import GRPCProtobuf /// Namespace containing generated types for the "flipcash.account.v1.Account" service. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) -public enum Flipcash_Account_V1_Account: Sendable { +public enum Flipcash_Account_V1_Account { /// Service descriptor for the "flipcash.account.v1.Account" service. public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.account.v1.Account") /// Namespace for method metadata. - public enum Method: Sendable { + public enum Method { /// Namespace for "Register" metadata. - public enum Register: Sendable { + public enum Register { /// Request type for "Register". public typealias Input = Flipcash_Account_V1_RegisterRequest /// Response type for "Register". @@ -29,12 +29,11 @@ public enum Flipcash_Account_V1_Account: Sendable { /// Descriptor for "Register". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.account.v1.Account"), - method: "Register", - type: .unary + method: "Register" ) } /// Namespace for "Login" metadata. - public enum Login: Sendable { + public enum Login { /// Request type for "Login". public typealias Input = Flipcash_Account_V1_LoginRequest /// Response type for "Login". @@ -42,12 +41,11 @@ public enum Flipcash_Account_V1_Account: Sendable { /// Descriptor for "Login". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.account.v1.Account"), - method: "Login", - type: .unary + method: "Login" ) } /// Namespace for "GetUserFlags" metadata. - public enum GetUserFlags: Sendable { + public enum GetUserFlags { /// Request type for "GetUserFlags". public typealias Input = Flipcash_Account_V1_GetUserFlagsRequest /// Response type for "GetUserFlags". @@ -55,12 +53,11 @@ public enum Flipcash_Account_V1_Account: Sendable { /// Descriptor for "GetUserFlags". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.account.v1.Account"), - method: "GetUserFlags", - type: .unary + method: "GetUserFlags" ) } /// Namespace for "GetUnauthenticatedUserFlags" metadata. - public enum GetUnauthenticatedUserFlags: Sendable { + public enum GetUnauthenticatedUserFlags { /// Request type for "GetUnauthenticatedUserFlags". public typealias Input = Flipcash_Account_V1_GetUnauthenticatedUserFlagsRequest /// Response type for "GetUnauthenticatedUserFlags". @@ -68,8 +65,7 @@ public enum Flipcash_Account_V1_Account: Sendable { /// Descriptor for "GetUnauthenticatedUserFlags". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.account.v1.Account"), - method: "GetUnauthenticatedUserFlags", - type: .unary + method: "GetUnauthenticatedUserFlags" ) } /// Descriptors for all methods in the "flipcash.account.v1.Account" service. diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/account_v1_flipcash_account_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/account_v1_flipcash_account_service.pb.swift index 33de92076..9820ba408 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/account_v1_flipcash_account_service.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/account_v1_flipcash_account_service.pb.swift @@ -28,21 +28,21 @@ public struct Flipcash_Account_V1_RegisterRequest: Sendable { /// PublicKey the public key that is authorized to perform actions on the /// registered users behalf. public var publicKey: Flipcash_Common_V1_PublicKey { - get {_publicKey ?? Flipcash_Common_V1_PublicKey()} + get {return _publicKey ?? Flipcash_Common_V1_PublicKey()} set {_publicKey = newValue} } /// Returns true if `publicKey` has been explicitly set. - public var hasPublicKey: Bool {self._publicKey != nil} + public var hasPublicKey: Bool {return self._publicKey != nil} /// Clears the value of `publicKey`. Subsequent reads from it will return its default value. public mutating func clearPublicKey() {self._publicKey = nil} /// Signature of this message (without the signature), using the provided keypair. public var signature: Flipcash_Common_V1_Signature { - get {_signature ?? Flipcash_Common_V1_Signature()} + get {return _signature ?? Flipcash_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} @@ -63,11 +63,11 @@ public struct Flipcash_Account_V1_RegisterResponse: Sendable { /// The UserId associated with the account. public var userID: Flipcash_Common_V1_UserId { - get {_userID ?? Flipcash_Common_V1_UserId()} + get {return _userID ?? Flipcash_Common_V1_UserId()} set {_userID = newValue} } /// Returns true if `userID` has been explicitly set. - public var hasUserID: Bool {self._userID != nil} + public var hasUserID: Bool {return self._userID != nil} /// Clears the value of `userID`. Subsequent reads from it will return its default value. public mutating func clearUserID() {self._userID = nil} @@ -126,20 +126,20 @@ public struct Flipcash_Account_V1_LoginRequest: Sendable { /// The server may reject the request if the timestamp is too far off /// the current (server) time. This is to prevent replay attacks. public var timestamp: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_timestamp = newValue} } /// Returns true if `timestamp` has been explicitly set. - public var hasTimestamp: Bool {self._timestamp != nil} + public var hasTimestamp: Bool {return self._timestamp != nil} /// Clears the value of `timestamp`. Subsequent reads from it will return its default value. public mutating func clearTimestamp() {self._timestamp = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -159,11 +159,11 @@ public struct Flipcash_Account_V1_LoginResponse: Sendable { public var result: Flipcash_Account_V1_LoginResponse.Result = .ok public var userID: Flipcash_Common_V1_UserId { - get {_userID ?? Flipcash_Common_V1_UserId()} + get {return _userID ?? Flipcash_Common_V1_UserId()} set {_userID = newValue} } /// Returns true if `userID` has been explicitly set. - public var hasUserID: Bool {self._userID != nil} + public var hasUserID: Bool {return self._userID != nil} /// Clears the value of `userID`. Subsequent reads from it will return its default value. public mutating func clearUserID() {self._userID = nil} @@ -218,31 +218,31 @@ public struct Flipcash_Account_V1_GetUserFlagsRequest: Sendable { // methods supported on all messages. public var userID: Flipcash_Common_V1_UserId { - get {_userID ?? Flipcash_Common_V1_UserId()} + get {return _userID ?? Flipcash_Common_V1_UserId()} set {_userID = newValue} } /// Returns true if `userID` has been explicitly set. - public var hasUserID: Bool {self._userID != nil} + public var hasUserID: Bool {return self._userID != nil} /// Clears the value of `userID`. Subsequent reads from it will return its default value. public mutating func clearUserID() {self._userID = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} public var platform: Flipcash_Common_V1_Platform = .unknown public var countryCode: Flipcash_Common_V1_CountryCode { - get {_countryCode ?? Flipcash_Common_V1_CountryCode()} + get {return _countryCode ?? Flipcash_Common_V1_CountryCode()} set {_countryCode = newValue} } /// Returns true if `countryCode` has been explicitly set. - public var hasCountryCode: Bool {self._countryCode != nil} + public var hasCountryCode: Bool {return self._countryCode != nil} /// Clears the value of `countryCode`. Subsequent reads from it will return its default value. public mutating func clearCountryCode() {self._countryCode = nil} @@ -261,16 +261,16 @@ public struct Flipcash_Account_V1_GetUserFlagsResponse: @unchecked Sendable { // methods supported on all messages. public var result: Flipcash_Account_V1_GetUserFlagsResponse.Result { - get {_storage._result} + get {return _storage._result} set {_uniqueStorage()._result = newValue} } public var userFlags: Flipcash_Account_V1_UserFlags { - get {_storage._userFlags ?? Flipcash_Account_V1_UserFlags()} + get {return _storage._userFlags ?? Flipcash_Account_V1_UserFlags()} set {_uniqueStorage()._userFlags = newValue} } /// Returns true if `userFlags` has been explicitly set. - public var hasUserFlags: Bool {_storage._userFlags != nil} + public var hasUserFlags: Bool {return _storage._userFlags != nil} /// Clears the value of `userFlags`. Subsequent reads from it will return its default value. public mutating func clearUserFlags() {_uniqueStorage()._userFlags = nil} @@ -323,11 +323,11 @@ public struct Flipcash_Account_V1_GetUnauthenticatedUserFlagsRequest: Sendable { public var platform: Flipcash_Common_V1_Platform = .unknown public var countryCode: Flipcash_Common_V1_CountryCode { - get {_countryCode ?? Flipcash_Common_V1_CountryCode()} + get {return _countryCode ?? Flipcash_Common_V1_CountryCode()} set {_countryCode = newValue} } /// Returns true if `countryCode` has been explicitly set. - public var hasCountryCode: Bool {self._countryCode != nil} + public var hasCountryCode: Bool {return self._countryCode != nil} /// Clears the value of `countryCode`. Subsequent reads from it will return its default value. public mutating func clearCountryCode() {self._countryCode = nil} @@ -344,16 +344,16 @@ public struct Flipcash_Account_V1_GetUnauthenticatedUserFlagsResponse: @unchecke // methods supported on all messages. public var result: Flipcash_Account_V1_GetUnauthenticatedUserFlagsResponse.Result { - get {_storage._result} + get {return _storage._result} set {_uniqueStorage()._result = newValue} } public var userFlags: Flipcash_Account_V1_UserFlags { - get {_storage._userFlags ?? Flipcash_Account_V1_UserFlags()} + get {return _storage._userFlags ?? Flipcash_Account_V1_UserFlags()} set {_uniqueStorage()._userFlags = newValue} } /// Returns true if `userFlags` has been explicitly set. - public var hasUserFlags: Bool {_storage._userFlags != nil} + public var hasUserFlags: Bool {return _storage._userFlags != nil} /// Clears the value of `userFlags`. Subsequent reads from it will return its default value. public mutating func clearUserFlags() {_uniqueStorage()._userFlags = nil} @@ -422,11 +422,11 @@ public struct Flipcash_Account_V1_UserFlags: Sendable { /// Exchange data timeout for sequential give/grabs for bills public var billExchangeDataTimeout: SwiftProtobuf.Google_Protobuf_Duration { - get {_billExchangeDataTimeout ?? SwiftProtobuf.Google_Protobuf_Duration()} + get {return _billExchangeDataTimeout ?? SwiftProtobuf.Google_Protobuf_Duration()} set {_billExchangeDataTimeout = newValue} } /// Returns true if `billExchangeDataTimeout` has been explicitly set. - public var hasBillExchangeDataTimeout: Bool {self._billExchangeDataTimeout != nil} + public var hasBillExchangeDataTimeout: Bool {return self._billExchangeDataTimeout != nil} /// Clears the value of `billExchangeDataTimeout`. Subsequent reads from it will return its default value. public mutating func clearBillExchangeDataTimeout() {self._billExchangeDataTimeout = nil} @@ -567,11 +567,11 @@ public struct Flipcash_Account_V1_TipPresets: Sendable { // methods supported on all messages. public var region: Flipcash_Common_V1_Region { - get {_region ?? Flipcash_Common_V1_Region()} + get {return _region ?? Flipcash_Common_V1_Region()} set {_region = newValue} } /// Returns true if `region` has been explicitly set. - public var hasRegion: Bool {self._region != nil} + public var hasRegion: Bool {return self._region != nil} /// Clears the value of `region`. Subsequent reads from it will return its default value. public mutating func clearRegion() {self._region = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_activity_feed_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_activity_feed_service.grpc.swift index e501246a0..5de8fa2fa 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_activity_feed_service.grpc.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_activity_feed_service.grpc.swift @@ -15,13 +15,13 @@ import GRPCProtobuf /// Namespace containing generated types for the "flipcash.activity.v1.ActivityFeed" service. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) -public enum Flipcash_Activity_V1_ActivityFeed: Sendable { +public enum Flipcash_Activity_V1_ActivityFeed { /// Service descriptor for the "flipcash.activity.v1.ActivityFeed" service. public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.activity.v1.ActivityFeed") /// Namespace for method metadata. - public enum Method: Sendable { + public enum Method { /// Namespace for "GetLatestNotifications" metadata. - public enum GetLatestNotifications: Sendable { + public enum GetLatestNotifications { /// Request type for "GetLatestNotifications". public typealias Input = Flipcash_Activity_V1_GetLatestNotificationsRequest /// Response type for "GetLatestNotifications". @@ -29,12 +29,11 @@ public enum Flipcash_Activity_V1_ActivityFeed: Sendable { /// Descriptor for "GetLatestNotifications". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.activity.v1.ActivityFeed"), - method: "GetLatestNotifications", - type: .unary + method: "GetLatestNotifications" ) } /// Namespace for "GetPagedNotifications" metadata. - public enum GetPagedNotifications: Sendable { + public enum GetPagedNotifications { /// Request type for "GetPagedNotifications". public typealias Input = Flipcash_Activity_V1_GetPagedNotificationsRequest /// Response type for "GetPagedNotifications". @@ -42,12 +41,11 @@ public enum Flipcash_Activity_V1_ActivityFeed: Sendable { /// Descriptor for "GetPagedNotifications". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.activity.v1.ActivityFeed"), - method: "GetPagedNotifications", - type: .unary + method: "GetPagedNotifications" ) } /// Namespace for "GetBatchNotifications" metadata. - public enum GetBatchNotifications: Sendable { + public enum GetBatchNotifications { /// Request type for "GetBatchNotifications". public typealias Input = Flipcash_Activity_V1_GetBatchNotificationsRequest /// Response type for "GetBatchNotifications". @@ -55,8 +53,7 @@ public enum Flipcash_Activity_V1_ActivityFeed: Sendable { /// Descriptor for "GetBatchNotifications". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.activity.v1.ActivityFeed"), - method: "GetBatchNotifications", - type: .unary + method: "GetBatchNotifications" ) } /// Descriptors for all methods in the "flipcash.activity.v1.ActivityFeed" service. diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_activity_feed_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_activity_feed_service.pb.swift index c16c13a1b..20edbd043 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_activity_feed_service.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_activity_feed_service.pb.swift @@ -32,11 +32,11 @@ public struct Flipcash_Activity_V1_GetLatestNotificationsRequest: Sendable { public var maxItems: Int32 = 0 public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -104,20 +104,20 @@ public struct Flipcash_Activity_V1_GetPagedNotificationsRequest: Sendable { public var type: Flipcash_Activity_V1_ActivityFeedType = .unknown public var queryOptions: Flipcash_Common_V1_QueryOptions { - get {_queryOptions ?? Flipcash_Common_V1_QueryOptions()} + get {return _queryOptions ?? Flipcash_Common_V1_QueryOptions()} set {_queryOptions = newValue} } /// Returns true if `queryOptions` has been explicitly set. - public var hasQueryOptions: Bool {self._queryOptions != nil} + public var hasQueryOptions: Bool {return self._queryOptions != nil} /// Clears the value of `queryOptions`. Subsequent reads from it will return its default value. public mutating func clearQueryOptions() {self._queryOptions = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -185,11 +185,11 @@ public struct Flipcash_Activity_V1_GetBatchNotificationsRequest: Sendable { public var ids: [Flipcash_Activity_V1_NotificationId] = [] public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_model.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_model.pb.swift index 952f1168f..329c11289 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_model.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_model.pb.swift @@ -170,11 +170,11 @@ public struct Flipcash_Activity_V1_Notification: Sendable { /// The ID of this notification public var id: Flipcash_Activity_V1_NotificationId { - get {_id ?? Flipcash_Activity_V1_NotificationId()} + get {return _id ?? Flipcash_Activity_V1_NotificationId()} set {_id = newValue} } /// Returns true if `id` has been explicitly set. - public var hasID: Bool {self._id != nil} + public var hasID: Bool {return self._id != nil} /// Clears the value of `id`. Subsequent reads from it will return its default value. public mutating func clearID() {self._id = nil} @@ -183,21 +183,21 @@ public struct Flipcash_Activity_V1_Notification: Sendable { /// If a payment applies, the amount that was paid public var paymentAmount: Flipcash_Common_V1_CryptoPaymentAmount { - get {_paymentAmount ?? Flipcash_Common_V1_CryptoPaymentAmount()} + get {return _paymentAmount ?? Flipcash_Common_V1_CryptoPaymentAmount()} set {_paymentAmount = newValue} } /// Returns true if `paymentAmount` has been explicitly set. - public var hasPaymentAmount: Bool {self._paymentAmount != nil} + public var hasPaymentAmount: Bool {return self._paymentAmount != nil} /// Clears the value of `paymentAmount`. Subsequent reads from it will return its default value. public mutating func clearPaymentAmount() {self._paymentAmount = nil} /// The timestamp of this notification public var ts: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_ts ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _ts ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_ts = newValue} } /// Returns true if `ts` has been explicitly set. - public var hasTs: Bool {self._ts != nil} + public var hasTs: Bool {return self._ts != nil} /// Clears the value of `ts`. Subsequent reads from it will return its default value. public mutating func clearTs() {self._ts = nil} @@ -353,11 +353,11 @@ public struct Flipcash_Activity_V1_IndirectlySentCryptoNotificationMetadata: Sen /// The vault of the gift card account that was created for the cash link public var vault: Flipcash_Common_V1_PublicKey { - get {_vault ?? Flipcash_Common_V1_PublicKey()} + get {return _vault ?? Flipcash_Common_V1_PublicKey()} set {_vault = newValue} } /// Returns true if `vault` has been explicitly set. - public var hasVault: Bool {self._vault != nil} + public var hasVault: Bool {return self._vault != nil} /// Clears the value of `vault`. Subsequent reads from it will return its default value. public mutating func clearVault() {self._vault = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blob_v1_blob_storage_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blob_v1_blob_storage_service.grpc.swift index 010ba0cdd..2a5288088 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blob_v1_blob_storage_service.grpc.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blob_v1_blob_storage_service.grpc.swift @@ -15,13 +15,13 @@ import GRPCProtobuf /// Namespace containing generated types for the "flipcash.blob.v1.BlobStorage" service. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) -public enum Flipcash_Blob_V1_BlobStorage: Sendable { +public enum Flipcash_Blob_V1_BlobStorage { /// Service descriptor for the "flipcash.blob.v1.BlobStorage" service. public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.blob.v1.BlobStorage") /// Namespace for method metadata. - public enum Method: Sendable { + public enum Method { /// Namespace for "GetUploadPolicy" metadata. - public enum GetUploadPolicy: Sendable { + public enum GetUploadPolicy { /// Request type for "GetUploadPolicy". public typealias Input = Flipcash_Blob_V1_GetUploadPolicyRequest /// Response type for "GetUploadPolicy". @@ -29,12 +29,11 @@ public enum Flipcash_Blob_V1_BlobStorage: Sendable { /// Descriptor for "GetUploadPolicy". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.blob.v1.BlobStorage"), - method: "GetUploadPolicy", - type: .unary + method: "GetUploadPolicy" ) } /// Namespace for "InitiateExternalUpload" metadata. - public enum InitiateExternalUpload: Sendable { + public enum InitiateExternalUpload { /// Request type for "InitiateExternalUpload". public typealias Input = Flipcash_Blob_V1_InitiateExternalUploadRequest /// Response type for "InitiateExternalUpload". @@ -42,12 +41,11 @@ public enum Flipcash_Blob_V1_BlobStorage: Sendable { /// Descriptor for "InitiateExternalUpload". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.blob.v1.BlobStorage"), - method: "InitiateExternalUpload", - type: .unary + method: "InitiateExternalUpload" ) } /// Namespace for "CompleteExternalUpload" metadata. - public enum CompleteExternalUpload: Sendable { + public enum CompleteExternalUpload { /// Request type for "CompleteExternalUpload". public typealias Input = Flipcash_Blob_V1_CompleteExternalUploadRequest /// Response type for "CompleteExternalUpload". @@ -55,12 +53,11 @@ public enum Flipcash_Blob_V1_BlobStorage: Sendable { /// Descriptor for "CompleteExternalUpload". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.blob.v1.BlobStorage"), - method: "CompleteExternalUpload", - type: .unary + method: "CompleteExternalUpload" ) } /// Namespace for "GetBlobs" metadata. - public enum GetBlobs: Sendable { + public enum GetBlobs { /// Request type for "GetBlobs". public typealias Input = Flipcash_Blob_V1_GetBlobsRequest /// Response type for "GetBlobs". @@ -68,8 +65,7 @@ public enum Flipcash_Blob_V1_BlobStorage: Sendable { /// Descriptor for "GetBlobs". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.blob.v1.BlobStorage"), - method: "GetBlobs", - type: .unary + method: "GetBlobs" ) } /// Descriptors for all methods in the "flipcash.blob.v1.BlobStorage" service. diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blob_v1_blob_storage_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blob_v1_blob_storage_service.pb.swift index e7023548e..555e34ed0 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blob_v1_blob_storage_service.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blob_v1_blob_storage_service.pb.swift @@ -26,11 +26,11 @@ public struct Flipcash_Blob_V1_GetUploadPolicyRequest: Sendable { // methods supported on all messages. public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -50,11 +50,11 @@ public struct Flipcash_Blob_V1_GetUploadPolicyResponse: Sendable { /// The constraints in force for the caller. Set when result == OK. public var policy: Flipcash_Blob_V1_UploadPolicy { - get {_policy ?? Flipcash_Blob_V1_UploadPolicy()} + get {return _policy ?? Flipcash_Blob_V1_UploadPolicy()} set {_policy = newValue} } /// Returns true if `policy` has been explicitly set. - public var hasPolicy: Bool {self._policy != nil} + public var hasPolicy: Bool {return self._policy != nil} /// Clears the value of `policy`. Subsequent reads from it will return its default value. public mutating func clearPolicy() {self._policy = nil} @@ -105,11 +105,11 @@ public struct Flipcash_Blob_V1_InitiateExternalUploadRequest: Sendable { // methods supported on all messages. public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -140,21 +140,21 @@ public struct Flipcash_Blob_V1_InitiateExternalUploadResponse: Sendable { /// Server-assigned handle. On OK the client references this as the ORIGINAL /// rendition's blob_id on SendMessage. public var blobID: Flipcash_Blob_V1_BlobId { - get {_blobID ?? Flipcash_Blob_V1_BlobId()} + get {return _blobID ?? Flipcash_Blob_V1_BlobId()} set {_blobID = newValue} } /// Returns true if `blobID` has been explicitly set. - public var hasBlobID: Bool {self._blobID != nil} + public var hasBlobID: Bool {return self._blobID != nil} /// Clears the value of `blobID`. Subsequent reads from it will return its default value. public mutating func clearBlobID() {self._blobID = nil} /// Where and how to upload the bytes. Set only when result == OK. public var uploadTarget: Flipcash_Blob_V1_UploadTarget { - get {_uploadTarget ?? Flipcash_Blob_V1_UploadTarget()} + get {return _uploadTarget ?? Flipcash_Blob_V1_UploadTarget()} set {_uploadTarget = newValue} } /// Returns true if `uploadTarget` has been explicitly set. - public var hasUploadTarget: Bool {self._uploadTarget != nil} + public var hasUploadTarget: Bool {return self._uploadTarget != nil} /// Clears the value of `uploadTarget`. Subsequent reads from it will return its default value. public mutating func clearUploadTarget() {self._uploadTarget = nil} @@ -162,11 +162,11 @@ public struct Flipcash_Blob_V1_InitiateExternalUploadResponse: Sendable { /// version in force, so the client can detect a stale cached policy and /// re-fetch. Unset otherwise. public var policyVersion: Flipcash_Blob_V1_PolicyVersion { - get {_policyVersion ?? Flipcash_Blob_V1_PolicyVersion()} + get {return _policyVersion ?? Flipcash_Blob_V1_PolicyVersion()} set {_policyVersion = newValue} } /// Returns true if `policyVersion` has been explicitly set. - public var hasPolicyVersion: Bool {self._policyVersion != nil} + public var hasPolicyVersion: Bool {return self._policyVersion != nil} /// Clears the value of `policyVersion`. Subsequent reads from it will return its default value. public mutating func clearPolicyVersion() {self._policyVersion = nil} @@ -237,21 +237,21 @@ public struct Flipcash_Blob_V1_CompleteExternalUploadRequest: Sendable { // methods supported on all messages. public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} /// The blob whose upload just finished. public var blobID: Flipcash_Blob_V1_BlobId { - get {_blobID ?? Flipcash_Blob_V1_BlobId()} + get {return _blobID ?? Flipcash_Blob_V1_BlobId()} set {_blobID = newValue} } /// Returns true if `blobID` has been explicitly set. - public var hasBlobID: Bool {self._blobID != nil} + public var hasBlobID: Bool {return self._blobID != nil} /// Clears the value of `blobID`. Subsequent reads from it will return its default value. public mutating func clearBlobID() {self._blobID = nil} @@ -275,11 +275,11 @@ public struct Flipcash_Blob_V1_CompleteExternalUploadResponse: Sendable { /// Why the blob was rejected. Set only when status == REJECTED. public var rejectionMetadata: Flipcash_Blob_V1_RejectionMetadata { - get {_rejectionMetadata ?? Flipcash_Blob_V1_RejectionMetadata()} + get {return _rejectionMetadata ?? Flipcash_Blob_V1_RejectionMetadata()} set {_rejectionMetadata = newValue} } /// Returns true if `rejectionMetadata` has been explicitly set. - public var hasRejectionMetadata: Bool {self._rejectionMetadata != nil} + public var hasRejectionMetadata: Bool {return self._rejectionMetadata != nil} /// Clears the value of `rejectionMetadata`. Subsequent reads from it will return its default value. public mutating func clearRejectionMetadata() {self._rejectionMetadata = nil} @@ -338,21 +338,21 @@ public struct Flipcash_Blob_V1_GetBlobsRequest: Sendable { // methods supported on all messages. public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} /// The blobs to resolve. public var blobIds: Flipcash_Blob_V1_BlobIdBatch { - get {_blobIds ?? Flipcash_Blob_V1_BlobIdBatch()} + get {return _blobIds ?? Flipcash_Blob_V1_BlobIdBatch()} set {_blobIds = newValue} } /// Returns true if `blobIds` has been explicitly set. - public var hasBlobIds: Bool {self._blobIds != nil} + public var hasBlobIds: Bool {return self._blobIds != nil} /// Clears the value of `blobIds`. Subsequent reads from it will return its default value. public mutating func clearBlobIds() {self._blobIds = nil} @@ -367,11 +367,11 @@ public struct Flipcash_Blob_V1_GetBlobsRequest: Sendable { /// unless a context that authorizes it is supplied. A caller reading only /// its own blobs may omit it, so existing owner-only clients are unaffected. public var context: Flipcash_Blob_V1_AccessContext { - get {_context ?? Flipcash_Blob_V1_AccessContext()} + get {return _context ?? Flipcash_Blob_V1_AccessContext()} set {_context = newValue} } /// Returns true if `context` has been explicitly set. - public var hasContext: Bool {self._context != nil} + public var hasContext: Bool {return self._context != nil} /// Clears the value of `context`. Subsequent reads from it will return its default value. public mutating func clearContext() {self._context = nil} @@ -394,11 +394,11 @@ public struct Flipcash_Blob_V1_GetBlobsResponse: Sendable { /// The resolved blobs. Unknown or unauthorized ids are omitted; the batch /// is left unset (not empty) when none resolve. public var blobs: Flipcash_Blob_V1_BlobBatch { - get {_blobs ?? Flipcash_Blob_V1_BlobBatch()} + get {return _blobs ?? Flipcash_Blob_V1_BlobBatch()} set {_blobs = newValue} } /// Returns true if `blobs` has been explicitly set. - public var hasBlobs: Bool {self._blobs != nil} + public var hasBlobs: Bool {return self._blobs != nil} /// Clears the value of `blobs`. Subsequent reads from it will return its default value. public mutating func clearBlobs() {self._blobs = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blob_v1_model.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blob_v1_model.pb.swift index 2f3c26fbf..36c9dc99c 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blob_v1_model.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blob_v1_model.pb.swift @@ -186,11 +186,11 @@ public struct Flipcash_Blob_V1_Blob: Sendable { // methods supported on all messages. public var id: Flipcash_Blob_V1_BlobId { - get {_id ?? Flipcash_Blob_V1_BlobId()} + get {return _id ?? Flipcash_Blob_V1_BlobId()} set {_id = newValue} } /// Returns true if `id` has been explicitly set. - public var hasID: Bool {self._id != nil} + public var hasID: Bool {return self._id != nil} /// Clears the value of `id`. Subsequent reads from it will return its default value. public mutating func clearID() {self._id = nil} @@ -199,21 +199,21 @@ public struct Flipcash_Blob_V1_Blob: Sendable { /// Server-authoritative metadata, including a freshly minted download_url. /// Set only when status == READY. public var metadata: Flipcash_Blob_V1_BlobMetadata { - get {_metadata ?? Flipcash_Blob_V1_BlobMetadata()} + get {return _metadata ?? Flipcash_Blob_V1_BlobMetadata()} set {_metadata = newValue} } /// Returns true if `metadata` has been explicitly set. - public var hasMetadata: Bool {self._metadata != nil} + public var hasMetadata: Bool {return self._metadata != nil} /// Clears the value of `metadata`. Subsequent reads from it will return its default value. public mutating func clearMetadata() {self._metadata = nil} /// Why the blob was rejected. Set only when status == REJECTED. public var rejection: Flipcash_Blob_V1_RejectionMetadata { - get {_rejection ?? Flipcash_Blob_V1_RejectionMetadata()} + get {return _rejection ?? Flipcash_Blob_V1_RejectionMetadata()} set {_rejection = newValue} } /// Returns true if `rejection` has been explicitly set. - public var hasRejection: Bool {self._rejection != nil} + public var hasRejection: Bool {return self._rejection != nil} /// Clears the value of `rejection`. Subsequent reads from it will return its default value. public mutating func clearRejection() {self._rejection = nil} @@ -256,11 +256,11 @@ public struct Flipcash_Blob_V1_BlobMetadata: Sendable { /// Ephemeral, server-minted URL for fetching the blob bytes, together with /// the instant it expires. Re-issued on every fetch — see DownloadUrl. public var downloadURL: Flipcash_Blob_V1_DownloadUrl { - get {_downloadURL ?? Flipcash_Blob_V1_DownloadUrl()} + get {return _downloadURL ?? Flipcash_Blob_V1_DownloadUrl()} set {_downloadURL = newValue} } /// Returns true if `downloadURL` has been explicitly set. - public var hasDownloadURL: Bool {self._downloadURL != nil} + public var hasDownloadURL: Bool {return self._downloadURL != nil} /// Clears the value of `downloadURL`. Subsequent reads from it will return its default value. public mutating func clearDownloadURL() {self._downloadURL = nil} @@ -349,11 +349,11 @@ public struct Flipcash_Blob_V1_Rendition: Sendable { /// Handle to the blob holding this rendition's bytes. Client-set on the /// ORIGINAL when attaching the media; server-set for derived renditions. public var blobID: Flipcash_Blob_V1_BlobId { - get {_blobID ?? Flipcash_Blob_V1_BlobId()} + get {return _blobID ?? Flipcash_Blob_V1_BlobId()} set {_blobID = newValue} } /// Returns true if `blobID` has been explicitly set. - public var hasBlobID: Bool {self._blobID != nil} + public var hasBlobID: Bool {return self._blobID != nil} /// Clears the value of `blobID`. Subsequent reads from it will return its default value. public mutating func clearBlobID() {self._blobID = nil} @@ -364,11 +364,11 @@ public struct Flipcash_Blob_V1_Rendition: Sendable { /// If unavailable at the time the media is retrieved, the client can use /// GetBlobs to query for the blob metadata. public var blob: Flipcash_Blob_V1_BlobMetadata { - get {_blob ?? Flipcash_Blob_V1_BlobMetadata()} + get {return _blob ?? Flipcash_Blob_V1_BlobMetadata()} set {_blob = newValue} } /// Returns true if `blob` has been explicitly set. - public var hasBlob: Bool {self._blob != nil} + public var hasBlob: Bool {return self._blob != nil} /// Clears the value of `blob`. Subsequent reads from it will return its default value. public mutating func clearBlob() {self._blob = nil} @@ -441,22 +441,22 @@ public struct Flipcash_Blob_V1_UploadPolicy: Sendable { /// and re-fetch when they observe a different version — including one echoed /// on a denied upload. public var version: Flipcash_Blob_V1_PolicyVersion { - get {_version ?? Flipcash_Blob_V1_PolicyVersion()} + get {return _version ?? Flipcash_Blob_V1_PolicyVersion()} set {_version = newValue} } /// Returns true if `version` has been explicitly set. - public var hasVersion: Bool {self._version != nil} + public var hasVersion: Bool {return self._version != nil} /// Clears the value of `version`. Subsequent reads from it will return its default value. public mutating func clearVersion() {self._version = nil} /// How long the client may rely on this policy before re-fetching. The client /// should also refresh on any version mismatch, whichever comes first. public var ttl: SwiftProtobuf.Google_Protobuf_Duration { - get {_ttl ?? SwiftProtobuf.Google_Protobuf_Duration()} + get {return _ttl ?? SwiftProtobuf.Google_Protobuf_Duration()} set {_ttl = newValue} } /// Returns true if `ttl` has been explicitly set. - public var hasTtl: Bool {self._ttl != nil} + public var hasTtl: Bool {return self._ttl != nil} /// Clears the value of `ttl`. Subsequent reads from it will return its default value. public mutating func clearTtl() {self._ttl = nil} @@ -579,11 +579,11 @@ public struct Flipcash_Blob_V1_UploadTarget: Sendable { /// When the target expires; after this the client must call InitiateUpload /// again for a fresh one. public var expiresAt: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_expiresAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _expiresAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_expiresAt = newValue} } /// Returns true if `expiresAt` has been explicitly set. - public var hasExpiresAt: Bool {self._expiresAt != nil} + public var hasExpiresAt: Bool {return self._expiresAt != nil} /// Clears the value of `expiresAt`. Subsequent reads from it will return its default value. public mutating func clearExpiresAt() {self._expiresAt = nil} @@ -653,11 +653,11 @@ public struct Flipcash_Blob_V1_DownloadUrl: Sendable { /// When the URL expires; after this the client must call GetBlobs again to /// mint a fresh one. public var expiresAt: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_expiresAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _expiresAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_expiresAt = newValue} } /// Returns true if `expiresAt` has been explicitly set. - public var hasExpiresAt: Bool {self._expiresAt != nil} + public var hasExpiresAt: Bool {return self._expiresAt != nil} /// Clears the value of `expiresAt`. Subsequent reads from it will return its default value. public mutating func clearExpiresAt() {self._expiresAt = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blocklist_v1_blocklist_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blocklist_v1_blocklist_service.grpc.swift new file mode 100644 index 000000000..ba7b76d74 --- /dev/null +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blocklist_v1_blocklist_service.grpc.swift @@ -0,0 +1,617 @@ +// DO NOT EDIT. +// swift-format-ignore-file +// swiftlint:disable all +// +// Generated by the gRPC Swift generator plugin for the protocol buffer compiler. +// Source: blocklist/v1/blocklist_service.proto +// +// For information on using the generated types, please see the documentation: +// https://github.com/grpc/grpc-swift + +import GRPCCore +import GRPCProtobuf + +// MARK: - flipcash.blocklist.v1.Blocklist + +/// Namespace containing generated types for the "flipcash.blocklist.v1.Blocklist" service. +@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) +public enum Flipcash_Blocklist_V1_Blocklist { + /// Service descriptor for the "flipcash.blocklist.v1.Blocklist" service. + public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.blocklist.v1.Blocklist") + /// Namespace for method metadata. + public enum Method { + /// Namespace for "BlockUser" metadata. + public enum BlockUser { + /// Request type for "BlockUser". + public typealias Input = Flipcash_Blocklist_V1_BlockUserRequest + /// Response type for "BlockUser". + public typealias Output = Flipcash_Blocklist_V1_BlockUserResponse + /// Descriptor for "BlockUser". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.blocklist.v1.Blocklist"), + method: "BlockUser" + ) + } + /// Namespace for "UnblockUser" metadata. + public enum UnblockUser { + /// Request type for "UnblockUser". + public typealias Input = Flipcash_Blocklist_V1_UnblockUserRequest + /// Response type for "UnblockUser". + public typealias Output = Flipcash_Blocklist_V1_UnblockUserResponse + /// Descriptor for "UnblockUser". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.blocklist.v1.Blocklist"), + method: "UnblockUser" + ) + } + /// Namespace for "IsBlocked" metadata. + public enum IsBlocked { + /// Request type for "IsBlocked". + public typealias Input = Flipcash_Blocklist_V1_IsBlockedRequest + /// Response type for "IsBlocked". + public typealias Output = Flipcash_Blocklist_V1_IsBlockedResponse + /// Descriptor for "IsBlocked". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.blocklist.v1.Blocklist"), + method: "IsBlocked" + ) + } + /// Namespace for "GetBlocklist" metadata. + public enum GetBlocklist { + /// Request type for "GetBlocklist". + public typealias Input = Flipcash_Blocklist_V1_GetBlocklistRequest + /// Response type for "GetBlocklist". + public typealias Output = Flipcash_Blocklist_V1_GetBlocklistResponse + /// Descriptor for "GetBlocklist". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.blocklist.v1.Blocklist"), + method: "GetBlocklist" + ) + } + /// Descriptors for all methods in the "flipcash.blocklist.v1.Blocklist" service. + public static let descriptors: [GRPCCore.MethodDescriptor] = [ + BlockUser.descriptor, + UnblockUser.descriptor, + IsBlocked.descriptor, + GetBlocklist.descriptor + ] + } +} + +@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) +extension GRPCCore.ServiceDescriptor { + /// Service descriptor for the "flipcash.blocklist.v1.Blocklist" service. + public static let flipcash_blocklist_v1_Blocklist = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.blocklist.v1.Blocklist") +} + +// MARK: flipcash.blocklist.v1.Blocklist (client) + +@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) +extension Flipcash_Blocklist_V1_Blocklist { + /// Generated client protocol for the "flipcash.blocklist.v1.Blocklist" service. + /// + /// You don't need to implement this protocol directly, use the generated + /// implementation, ``Client``. + /// + /// > Source IDL Documentation: + /// > + /// > Blocklist manages the set of users a user has blocked. + public protocol ClientProtocol: Sendable { + /// Call the "BlockUser" method. + /// + /// > Source IDL Documentation: + /// > + /// > BlockUser adds a user to the caller's blocklist. Blocking a user that + /// > is already blocked is a no-op and returns OK. + /// + /// - Parameters: + /// - request: A request containing a single `Flipcash_Blocklist_V1_BlockUserRequest` message. + /// - serializer: A serializer for `Flipcash_Blocklist_V1_BlockUserRequest` messages. + /// - deserializer: A deserializer for `Flipcash_Blocklist_V1_BlockUserResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func blockUser( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "UnblockUser" method. + /// + /// > Source IDL Documentation: + /// > + /// > UnblockUser removes a user from the caller's blocklist. Unblocking a + /// > user that isn't blocked is a no-op and returns OK. + /// + /// - Parameters: + /// - request: A request containing a single `Flipcash_Blocklist_V1_UnblockUserRequest` message. + /// - serializer: A serializer for `Flipcash_Blocklist_V1_UnblockUserRequest` messages. + /// - deserializer: A deserializer for `Flipcash_Blocklist_V1_UnblockUserResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func unblockUser( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "IsBlocked" method. + /// + /// > Source IDL Documentation: + /// > + /// > IsBlocked checks whether a user is on the caller's blocklist. + /// + /// - Parameters: + /// - request: A request containing a single `Flipcash_Blocklist_V1_IsBlockedRequest` message. + /// - serializer: A serializer for `Flipcash_Blocklist_V1_IsBlockedRequest` messages. + /// - deserializer: A deserializer for `Flipcash_Blocklist_V1_IsBlockedResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func isBlocked( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "GetBlocklist" method. + /// + /// > Source IDL Documentation: + /// > + /// > GetBlocklist gets the caller's blocklist using a paged API, ordered by + /// > most recently blocked first. + /// + /// - Parameters: + /// - request: A request containing a single `Flipcash_Blocklist_V1_GetBlocklistRequest` message. + /// - serializer: A serializer for `Flipcash_Blocklist_V1_GetBlocklistRequest` messages. + /// - deserializer: A deserializer for `Flipcash_Blocklist_V1_GetBlocklistResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func getBlocklist( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + } + + /// Generated client for the "flipcash.blocklist.v1.Blocklist" service. + /// + /// The ``Client`` provides an implementation of ``ClientProtocol`` which wraps + /// a `GRPCCore.GRPCCClient`. The underlying `GRPCClient` provides the long-lived + /// means of communication with the remote peer. + /// + /// > Source IDL Documentation: + /// > + /// > Blocklist manages the set of users a user has blocked. + public struct Client: ClientProtocol where Transport: GRPCCore.ClientTransport { + private let client: GRPCCore.GRPCClient + + /// Creates a new client wrapping the provided `GRPCCore.GRPCClient`. + /// + /// - Parameters: + /// - client: A `GRPCCore.GRPCClient` providing a communication channel to the service. + public init(wrapping client: GRPCCore.GRPCClient) { + self.client = client + } + + /// Call the "BlockUser" method. + /// + /// > Source IDL Documentation: + /// > + /// > BlockUser adds a user to the caller's blocklist. Blocking a user that + /// > is already blocked is a no-op and returns OK. + /// + /// - Parameters: + /// - request: A request containing a single `Flipcash_Blocklist_V1_BlockUserRequest` message. + /// - serializer: A serializer for `Flipcash_Blocklist_V1_BlockUserRequest` messages. + /// - deserializer: A deserializer for `Flipcash_Blocklist_V1_BlockUserResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func blockUser( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Flipcash_Blocklist_V1_Blocklist.Method.BlockUser.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "UnblockUser" method. + /// + /// > Source IDL Documentation: + /// > + /// > UnblockUser removes a user from the caller's blocklist. Unblocking a + /// > user that isn't blocked is a no-op and returns OK. + /// + /// - Parameters: + /// - request: A request containing a single `Flipcash_Blocklist_V1_UnblockUserRequest` message. + /// - serializer: A serializer for `Flipcash_Blocklist_V1_UnblockUserRequest` messages. + /// - deserializer: A deserializer for `Flipcash_Blocklist_V1_UnblockUserResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func unblockUser( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Flipcash_Blocklist_V1_Blocklist.Method.UnblockUser.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "IsBlocked" method. + /// + /// > Source IDL Documentation: + /// > + /// > IsBlocked checks whether a user is on the caller's blocklist. + /// + /// - Parameters: + /// - request: A request containing a single `Flipcash_Blocklist_V1_IsBlockedRequest` message. + /// - serializer: A serializer for `Flipcash_Blocklist_V1_IsBlockedRequest` messages. + /// - deserializer: A deserializer for `Flipcash_Blocklist_V1_IsBlockedResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func isBlocked( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Flipcash_Blocklist_V1_Blocklist.Method.IsBlocked.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "GetBlocklist" method. + /// + /// > Source IDL Documentation: + /// > + /// > GetBlocklist gets the caller's blocklist using a paged API, ordered by + /// > most recently blocked first. + /// + /// - Parameters: + /// - request: A request containing a single `Flipcash_Blocklist_V1_GetBlocklistRequest` message. + /// - serializer: A serializer for `Flipcash_Blocklist_V1_GetBlocklistRequest` messages. + /// - deserializer: A deserializer for `Flipcash_Blocklist_V1_GetBlocklistResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func getBlocklist( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Flipcash_Blocklist_V1_Blocklist.Method.GetBlocklist.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + } +} + +// Helpers providing default arguments to 'ClientProtocol' methods. +@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) +extension Flipcash_Blocklist_V1_Blocklist.ClientProtocol { + /// Call the "BlockUser" method. + /// + /// > Source IDL Documentation: + /// > + /// > BlockUser adds a user to the caller's blocklist. Blocking a user that + /// > is already blocked is a no-op and returns OK. + /// + /// - Parameters: + /// - request: A request containing a single `Flipcash_Blocklist_V1_BlockUserRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func blockUser( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.blockUser( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } + + /// Call the "UnblockUser" method. + /// + /// > Source IDL Documentation: + /// > + /// > UnblockUser removes a user from the caller's blocklist. Unblocking a + /// > user that isn't blocked is a no-op and returns OK. + /// + /// - Parameters: + /// - request: A request containing a single `Flipcash_Blocklist_V1_UnblockUserRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func unblockUser( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.unblockUser( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } + + /// Call the "IsBlocked" method. + /// + /// > Source IDL Documentation: + /// > + /// > IsBlocked checks whether a user is on the caller's blocklist. + /// + /// - Parameters: + /// - request: A request containing a single `Flipcash_Blocklist_V1_IsBlockedRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func isBlocked( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.isBlocked( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } + + /// Call the "GetBlocklist" method. + /// + /// > Source IDL Documentation: + /// > + /// > GetBlocklist gets the caller's blocklist using a paged API, ordered by + /// > most recently blocked first. + /// + /// - Parameters: + /// - request: A request containing a single `Flipcash_Blocklist_V1_GetBlocklistRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func getBlocklist( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.getBlocklist( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } +} + +// Helpers providing sugared APIs for 'ClientProtocol' methods. +@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) +extension Flipcash_Blocklist_V1_Blocklist.ClientProtocol { + /// Call the "BlockUser" method. + /// + /// > Source IDL Documentation: + /// > + /// > BlockUser adds a user to the caller's blocklist. Blocking a user that + /// > is already blocked is a no-op and returns OK. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func blockUser( + _ message: Flipcash_Blocklist_V1_BlockUserRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.blockUser( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "UnblockUser" method. + /// + /// > Source IDL Documentation: + /// > + /// > UnblockUser removes a user from the caller's blocklist. Unblocking a + /// > user that isn't blocked is a no-op and returns OK. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func unblockUser( + _ message: Flipcash_Blocklist_V1_UnblockUserRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.unblockUser( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "IsBlocked" method. + /// + /// > Source IDL Documentation: + /// > + /// > IsBlocked checks whether a user is on the caller's blocklist. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func isBlocked( + _ message: Flipcash_Blocklist_V1_IsBlockedRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.isBlocked( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "GetBlocklist" method. + /// + /// > Source IDL Documentation: + /// > + /// > GetBlocklist gets the caller's blocklist using a paged API, ordered by + /// > most recently blocked first. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func getBlocklist( + _ message: Flipcash_Blocklist_V1_GetBlocklistRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.getBlocklist( + request: request, + options: options, + onResponse: handleResponse + ) + } +} \ No newline at end of file diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blocklist_v1_blocklist_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blocklist_v1_blocklist_service.pb.swift new file mode 100644 index 000000000..b19224811 --- /dev/null +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blocklist_v1_blocklist_service.pb.swift @@ -0,0 +1,694 @@ +// DO NOT EDIT. +// swift-format-ignore-file +// swiftlint:disable all +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: blocklist/v1/blocklist_service.proto +// +// For information on using the generated types, please see the documentation: +// https://github.com/apple/swift-protobuf/ + +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that you are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +public struct Flipcash_Blocklist_V1_BlockUserRequest: Sendable { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The user to block + public var userID: Flipcash_Common_V1_UserId { + get {return _userID ?? Flipcash_Common_V1_UserId()} + set {_userID = newValue} + } + /// Returns true if `userID` has been explicitly set. + public var hasUserID: Bool {return self._userID != nil} + /// Clears the value of `userID`. Subsequent reads from it will return its default value. + public mutating func clearUserID() {self._userID = nil} + + public var auth: Flipcash_Common_V1_Auth { + get {return _auth ?? Flipcash_Common_V1_Auth()} + set {_auth = newValue} + } + /// Returns true if `auth` has been explicitly set. + public var hasAuth: Bool {return self._auth != nil} + /// Clears the value of `auth`. Subsequent reads from it will return its default value. + public mutating func clearAuth() {self._auth = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _userID: Flipcash_Common_V1_UserId? = nil + fileprivate var _auth: Flipcash_Common_V1_Auth? = nil +} + +public struct Flipcash_Blocklist_V1_BlockUserResponse: Sendable { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var result: Flipcash_Blocklist_V1_BlockUserResponse.Result = .ok + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum Result: SwiftProtobuf.Enum, Swift.CaseIterable { + public typealias RawValue = Int + case ok // = 0 + case denied // = 1 + + /// The user to block doesn't exist + case userNotFound // = 2 + + /// Users cannot block themselves + case cannotBlockSelf // = 3 + case UNRECOGNIZED(Int) + + public init() { + self = .ok + } + + public init?(rawValue: Int) { + switch rawValue { + case 0: self = .ok + case 1: self = .denied + case 2: self = .userNotFound + case 3: self = .cannotBlockSelf + default: self = .UNRECOGNIZED(rawValue) + } + } + + public var rawValue: Int { + switch self { + case .ok: return 0 + case .denied: return 1 + case .userNotFound: return 2 + case .cannotBlockSelf: return 3 + case .UNRECOGNIZED(let i): return i + } + } + + // The compiler won't synthesize support with the UNRECOGNIZED case. + public static let allCases: [Flipcash_Blocklist_V1_BlockUserResponse.Result] = [ + .ok, + .denied, + .userNotFound, + .cannotBlockSelf, + ] + + } + + public init() {} +} + +public struct Flipcash_Blocklist_V1_UnblockUserRequest: Sendable { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The user to unblock + public var userID: Flipcash_Common_V1_UserId { + get {return _userID ?? Flipcash_Common_V1_UserId()} + set {_userID = newValue} + } + /// Returns true if `userID` has been explicitly set. + public var hasUserID: Bool {return self._userID != nil} + /// Clears the value of `userID`. Subsequent reads from it will return its default value. + public mutating func clearUserID() {self._userID = nil} + + public var auth: Flipcash_Common_V1_Auth { + get {return _auth ?? Flipcash_Common_V1_Auth()} + set {_auth = newValue} + } + /// Returns true if `auth` has been explicitly set. + public var hasAuth: Bool {return self._auth != nil} + /// Clears the value of `auth`. Subsequent reads from it will return its default value. + public mutating func clearAuth() {self._auth = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _userID: Flipcash_Common_V1_UserId? = nil + fileprivate var _auth: Flipcash_Common_V1_Auth? = nil +} + +public struct Flipcash_Blocklist_V1_UnblockUserResponse: Sendable { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var result: Flipcash_Blocklist_V1_UnblockUserResponse.Result = .ok + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum Result: SwiftProtobuf.Enum, Swift.CaseIterable { + public typealias RawValue = Int + case ok // = 0 + case denied // = 1 + case UNRECOGNIZED(Int) + + public init() { + self = .ok + } + + public init?(rawValue: Int) { + switch rawValue { + case 0: self = .ok + case 1: self = .denied + default: self = .UNRECOGNIZED(rawValue) + } + } + + public var rawValue: Int { + switch self { + case .ok: return 0 + case .denied: return 1 + case .UNRECOGNIZED(let i): return i + } + } + + // The compiler won't synthesize support with the UNRECOGNIZED case. + public static let allCases: [Flipcash_Blocklist_V1_UnblockUserResponse.Result] = [ + .ok, + .denied, + ] + + } + + public init() {} +} + +public struct Flipcash_Blocklist_V1_IsBlockedRequest: Sendable { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The user to check against the caller's blocklist + public var userID: Flipcash_Common_V1_UserId { + get {return _userID ?? Flipcash_Common_V1_UserId()} + set {_userID = newValue} + } + /// Returns true if `userID` has been explicitly set. + public var hasUserID: Bool {return self._userID != nil} + /// Clears the value of `userID`. Subsequent reads from it will return its default value. + public mutating func clearUserID() {self._userID = nil} + + public var auth: Flipcash_Common_V1_Auth { + get {return _auth ?? Flipcash_Common_V1_Auth()} + set {_auth = newValue} + } + /// Returns true if `auth` has been explicitly set. + public var hasAuth: Bool {return self._auth != nil} + /// Clears the value of `auth`. Subsequent reads from it will return its default value. + public mutating func clearAuth() {self._auth = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _userID: Flipcash_Common_V1_UserId? = nil + fileprivate var _auth: Flipcash_Common_V1_Auth? = nil +} + +public struct Flipcash_Blocklist_V1_IsBlockedResponse: Sendable { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var result: Flipcash_Blocklist_V1_IsBlockedResponse.Result = .ok + + /// Whether the user is on the caller's blocklist. Set when result is OK. + public var isBlocked: Bool = false + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum Result: SwiftProtobuf.Enum, Swift.CaseIterable { + public typealias RawValue = Int + case ok // = 0 + case denied // = 1 + case UNRECOGNIZED(Int) + + public init() { + self = .ok + } + + public init?(rawValue: Int) { + switch rawValue { + case 0: self = .ok + case 1: self = .denied + default: self = .UNRECOGNIZED(rawValue) + } + } + + public var rawValue: Int { + switch self { + case .ok: return 0 + case .denied: return 1 + case .UNRECOGNIZED(let i): return i + } + } + + // The compiler won't synthesize support with the UNRECOGNIZED case. + public static let allCases: [Flipcash_Blocklist_V1_IsBlockedResponse.Result] = [ + .ok, + .denied, + ] + + } + + public init() {} +} + +public struct Flipcash_Blocklist_V1_GetBlocklistRequest: Sendable { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// QueryOptions controls page_size. Ordering is fixed to most recently + /// blocked first and is not client-selectable. + /// + /// Leave query_options.paging_token unset on the first request. On every + /// subsequent request, set query_options.paging_token to the paging_token + /// from the most recent response to advance to the next page. The token is + /// opaque and server-generated; do not construct it. + public var queryOptions: Flipcash_Common_V1_QueryOptions { + get {return _queryOptions ?? Flipcash_Common_V1_QueryOptions()} + set {_queryOptions = newValue} + } + /// Returns true if `queryOptions` has been explicitly set. + public var hasQueryOptions: Bool {return self._queryOptions != nil} + /// Clears the value of `queryOptions`. Subsequent reads from it will return its default value. + public mutating func clearQueryOptions() {self._queryOptions = nil} + + public var auth: Flipcash_Common_V1_Auth { + get {return _auth ?? Flipcash_Common_V1_Auth()} + set {_auth = newValue} + } + /// Returns true if `auth` has been explicitly set. + public var hasAuth: Bool {return self._auth != nil} + /// Clears the value of `auth`. Subsequent reads from it will return its default value. + public mutating func clearAuth() {self._auth = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _queryOptions: Flipcash_Common_V1_QueryOptions? = nil + fileprivate var _auth: Flipcash_Common_V1_Auth? = nil +} + +public struct Flipcash_Blocklist_V1_GetBlocklistResponse: Sendable { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var result: Flipcash_Blocklist_V1_GetBlocklistResponse.Result = .ok + + public var blockedUsers: [Flipcash_Blocklist_V1_BlockedUser] = [] + + /// PagingToken is the server-generated cursor for this paginated read. The + /// client MUST send the most recent value back in query_options.paging_token + /// on the next GetBlocklistRequest. Set when result is OK. + public var pagingToken: Flipcash_Common_V1_PagingToken { + get {return _pagingToken ?? Flipcash_Common_V1_PagingToken()} + set {_pagingToken = newValue} + } + /// Returns true if `pagingToken` has been explicitly set. + public var hasPagingToken: Bool {return self._pagingToken != nil} + /// Clears the value of `pagingToken`. Subsequent reads from it will return its default value. + public mutating func clearPagingToken() {self._pagingToken = nil} + + /// HasMore indicates whether further pages remain. When true, the client + /// should issue another GetBlocklistRequest with the returned paging_token. + public var hasMore_p: Bool = false + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum Result: SwiftProtobuf.Enum, Swift.CaseIterable { + public typealias RawValue = Int + case ok // = 0 + case denied // = 1 + case UNRECOGNIZED(Int) + + public init() { + self = .ok + } + + public init?(rawValue: Int) { + switch rawValue { + case 0: self = .ok + case 1: self = .denied + default: self = .UNRECOGNIZED(rawValue) + } + } + + public var rawValue: Int { + switch self { + case .ok: return 0 + case .denied: return 1 + case .UNRECOGNIZED(let i): return i + } + } + + // The compiler won't synthesize support with the UNRECOGNIZED case. + public static let allCases: [Flipcash_Blocklist_V1_GetBlocklistResponse.Result] = [ + .ok, + .denied, + ] + + } + + public init() {} + + fileprivate var _pagingToken: Flipcash_Common_V1_PagingToken? = nil +} + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "flipcash.blocklist.v1" + +extension Flipcash_Blocklist_V1_BlockUserRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".BlockUserRequest" + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}user_id\0\u{2}\u{9}auth\0") + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularMessageField(value: &self._userID) }() + case 10: try { try decoder.decodeSingularMessageField(value: &self._auth) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._userID { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } }() + try { if let v = self._auth { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Flipcash_Blocklist_V1_BlockUserRequest, rhs: Flipcash_Blocklist_V1_BlockUserRequest) -> Bool { + if lhs._userID != rhs._userID {return false} + if lhs._auth != rhs._auth {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Flipcash_Blocklist_V1_BlockUserResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".BlockUserResponse" + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}result\0") + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularEnumField(value: &self.result) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if self.result != .ok { + try visitor.visitSingularEnumField(value: self.result, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Flipcash_Blocklist_V1_BlockUserResponse, rhs: Flipcash_Blocklist_V1_BlockUserResponse) -> Bool { + if lhs.result != rhs.result {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Flipcash_Blocklist_V1_BlockUserResponse.Result: SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0OK\0\u{1}DENIED\0\u{1}USER_NOT_FOUND\0\u{1}CANNOT_BLOCK_SELF\0") +} + +extension Flipcash_Blocklist_V1_UnblockUserRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".UnblockUserRequest" + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}user_id\0\u{2}\u{9}auth\0") + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularMessageField(value: &self._userID) }() + case 10: try { try decoder.decodeSingularMessageField(value: &self._auth) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._userID { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } }() + try { if let v = self._auth { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Flipcash_Blocklist_V1_UnblockUserRequest, rhs: Flipcash_Blocklist_V1_UnblockUserRequest) -> Bool { + if lhs._userID != rhs._userID {return false} + if lhs._auth != rhs._auth {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Flipcash_Blocklist_V1_UnblockUserResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".UnblockUserResponse" + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}result\0") + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularEnumField(value: &self.result) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if self.result != .ok { + try visitor.visitSingularEnumField(value: self.result, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Flipcash_Blocklist_V1_UnblockUserResponse, rhs: Flipcash_Blocklist_V1_UnblockUserResponse) -> Bool { + if lhs.result != rhs.result {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Flipcash_Blocklist_V1_UnblockUserResponse.Result: SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0OK\0\u{1}DENIED\0") +} + +extension Flipcash_Blocklist_V1_IsBlockedRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".IsBlockedRequest" + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}user_id\0\u{2}\u{9}auth\0") + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularMessageField(value: &self._userID) }() + case 10: try { try decoder.decodeSingularMessageField(value: &self._auth) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._userID { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } }() + try { if let v = self._auth { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Flipcash_Blocklist_V1_IsBlockedRequest, rhs: Flipcash_Blocklist_V1_IsBlockedRequest) -> Bool { + if lhs._userID != rhs._userID {return false} + if lhs._auth != rhs._auth {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Flipcash_Blocklist_V1_IsBlockedResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".IsBlockedResponse" + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}result\0\u{3}is_blocked\0") + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularEnumField(value: &self.result) }() + case 2: try { try decoder.decodeSingularBoolField(value: &self.isBlocked) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if self.result != .ok { + try visitor.visitSingularEnumField(value: self.result, fieldNumber: 1) + } + if self.isBlocked != false { + try visitor.visitSingularBoolField(value: self.isBlocked, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Flipcash_Blocklist_V1_IsBlockedResponse, rhs: Flipcash_Blocklist_V1_IsBlockedResponse) -> Bool { + if lhs.result != rhs.result {return false} + if lhs.isBlocked != rhs.isBlocked {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Flipcash_Blocklist_V1_IsBlockedResponse.Result: SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0OK\0\u{1}DENIED\0") +} + +extension Flipcash_Blocklist_V1_GetBlocklistRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".GetBlocklistRequest" + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}query_options\0\u{2}\u{9}auth\0") + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularMessageField(value: &self._queryOptions) }() + case 10: try { try decoder.decodeSingularMessageField(value: &self._auth) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._queryOptions { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } }() + try { if let v = self._auth { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Flipcash_Blocklist_V1_GetBlocklistRequest, rhs: Flipcash_Blocklist_V1_GetBlocklistRequest) -> Bool { + if lhs._queryOptions != rhs._queryOptions {return false} + if lhs._auth != rhs._auth {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Flipcash_Blocklist_V1_GetBlocklistResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".GetBlocklistResponse" + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}result\0\u{3}blocked_users\0\u{3}paging_token\0\u{3}has_more\0") + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularEnumField(value: &self.result) }() + case 2: try { try decoder.decodeRepeatedMessageField(value: &self.blockedUsers) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._pagingToken) }() + case 4: try { try decoder.decodeSingularBoolField(value: &self.hasMore_p) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if self.result != .ok { + try visitor.visitSingularEnumField(value: self.result, fieldNumber: 1) + } + if !self.blockedUsers.isEmpty { + try visitor.visitRepeatedMessageField(value: self.blockedUsers, fieldNumber: 2) + } + try { if let v = self._pagingToken { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + if self.hasMore_p != false { + try visitor.visitSingularBoolField(value: self.hasMore_p, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Flipcash_Blocklist_V1_GetBlocklistResponse, rhs: Flipcash_Blocklist_V1_GetBlocklistResponse) -> Bool { + if lhs.result != rhs.result {return false} + if lhs.blockedUsers != rhs.blockedUsers {return false} + if lhs._pagingToken != rhs._pagingToken {return false} + if lhs.hasMore_p != rhs.hasMore_p {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Flipcash_Blocklist_V1_GetBlocklistResponse.Result: SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0OK\0\u{1}DENIED\0") +} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blocklist_v1_model.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blocklist_v1_model.pb.swift new file mode 100644 index 000000000..ce815be9f --- /dev/null +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blocklist_v1_model.pb.swift @@ -0,0 +1,98 @@ +// DO NOT EDIT. +// swift-format-ignore-file +// swiftlint:disable all +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: blocklist/v1/model.proto +// +// For information on using the generated types, please see the documentation: +// https://github.com/apple/swift-protobuf/ + +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that you are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +/// BlockedUser is a single entry in a user's blocklist +public struct Flipcash_Blocklist_V1_BlockedUser: Sendable { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The user that is blocked + public var userID: Flipcash_Common_V1_UserId { + get {return _userID ?? Flipcash_Common_V1_UserId()} + set {_userID = newValue} + } + /// Returns true if `userID` has been explicitly set. + public var hasUserID: Bool {return self._userID != nil} + /// Clears the value of `userID`. Subsequent reads from it will return its default value. + public mutating func clearUserID() {self._userID = nil} + + /// Timestamp when the user was blocked + public var blockedAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _blockedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_blockedAt = newValue} + } + /// Returns true if `blockedAt` has been explicitly set. + public var hasBlockedAt: Bool {return self._blockedAt != nil} + /// Clears the value of `blockedAt`. Subsequent reads from it will return its default value. + public mutating func clearBlockedAt() {self._blockedAt = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _userID: Flipcash_Common_V1_UserId? = nil + fileprivate var _blockedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "flipcash.blocklist.v1" + +extension Flipcash_Blocklist_V1_BlockedUser: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".BlockedUser" + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}user_id\0\u{3}blocked_at\0") + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularMessageField(value: &self._userID) }() + case 2: try { try decoder.decodeSingularMessageField(value: &self._blockedAt) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._userID { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } }() + try { if let v = self._blockedAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Flipcash_Blocklist_V1_BlockedUser, rhs: Flipcash_Blocklist_V1_BlockedUser) -> Bool { + if lhs._userID != rhs._userID {return false} + if lhs._blockedAt != rhs._blockedAt {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/chat_v1_chat_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/chat_v1_chat_service.grpc.swift index 1c94dd248..cb4c20ecc 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/chat_v1_chat_service.grpc.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/chat_v1_chat_service.grpc.swift @@ -15,13 +15,13 @@ import GRPCProtobuf /// Namespace containing generated types for the "flipcash.chat.v1.Chat" service. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) -public enum Flipcash_Chat_V1_Chat: Sendable { +public enum Flipcash_Chat_V1_Chat { /// Service descriptor for the "flipcash.chat.v1.Chat" service. public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.chat.v1.Chat") /// Namespace for method metadata. - public enum Method: Sendable { + public enum Method { /// Namespace for "GetChat" metadata. - public enum GetChat: Sendable { + public enum GetChat { /// Request type for "GetChat". public typealias Input = Flipcash_Chat_V1_GetChatRequest /// Response type for "GetChat". @@ -29,12 +29,11 @@ public enum Flipcash_Chat_V1_Chat: Sendable { /// Descriptor for "GetChat". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.chat.v1.Chat"), - method: "GetChat", - type: .unary + method: "GetChat" ) } /// Namespace for "GetDmChatFeed" metadata. - public enum GetDmChatFeed: Sendable { + public enum GetDmChatFeed { /// Request type for "GetDmChatFeed". public typealias Input = Flipcash_Chat_V1_GetDmChatFeedRequest /// Response type for "GetDmChatFeed". @@ -42,8 +41,7 @@ public enum Flipcash_Chat_V1_Chat: Sendable { /// Descriptor for "GetDmChatFeed". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.chat.v1.Chat"), - method: "GetDmChatFeed", - type: .unary + method: "GetDmChatFeed" ) } /// Descriptors for all methods in the "flipcash.chat.v1.Chat" service. diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/chat_v1_chat_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/chat_v1_chat_service.pb.swift index 4cebdce27..9819047c5 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/chat_v1_chat_service.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/chat_v1_chat_service.pb.swift @@ -26,20 +26,20 @@ public struct Flipcash_Chat_V1_GetChatRequest: Sendable { // methods supported on all messages. public var chatID: Flipcash_Common_V1_ChatId { - get {_chatID ?? Flipcash_Common_V1_ChatId()} + get {return _chatID ?? Flipcash_Common_V1_ChatId()} set {_chatID = newValue} } /// Returns true if `chatID` has been explicitly set. - public var hasChatID: Bool {self._chatID != nil} + public var hasChatID: Bool {return self._chatID != nil} /// Clears the value of `chatID`. Subsequent reads from it will return its default value. public mutating func clearChatID() {self._chatID = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -59,11 +59,11 @@ public struct Flipcash_Chat_V1_GetChatResponse: Sendable { public var result: Flipcash_Chat_V1_GetChatResponse.Result = .ok public var metadata: Flipcash_Chat_V1_Metadata { - get {_metadata ?? Flipcash_Chat_V1_Metadata()} + get {return _metadata ?? Flipcash_Chat_V1_Metadata()} set {_metadata = newValue} } /// Returns true if `metadata` has been explicitly set. - public var hasMetadata: Bool {self._metadata != nil} + public var hasMetadata: Bool {return self._metadata != nil} /// Clears the value of `metadata`. Subsequent reads from it will return its default value. public mutating func clearMetadata() {self._metadata = nil} @@ -126,11 +126,11 @@ public struct Flipcash_Chat_V1_GetDmChatFeedRequest: Sendable { /// paging_token from the most recent response to advance within the same /// snapshot. The token is opaque and server-generated; do not construct it. public var queryOptions: Flipcash_Common_V1_QueryOptions { - get {_queryOptions ?? Flipcash_Common_V1_QueryOptions()} + get {return _queryOptions ?? Flipcash_Common_V1_QueryOptions()} set {_queryOptions = newValue} } /// Returns true if `queryOptions` has been explicitly set. - public var hasQueryOptions: Bool {self._queryOptions != nil} + public var hasQueryOptions: Bool {return self._queryOptions != nil} /// Clears the value of `queryOptions`. Subsequent reads from it will return its default value. public mutating func clearQueryOptions() {self._queryOptions = nil} @@ -140,11 +140,11 @@ public struct Flipcash_Chat_V1_GetDmChatFeedRequest: Sendable { public var dmChatType: Flipcash_Chat_V1_ChatType = .unknown public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -171,11 +171,11 @@ public struct Flipcash_Chat_V1_GetDmChatFeedResponse: Sendable { /// most recent value back in query_options.paging_token on the next /// GetDmChatFeedRequest. Set when result is OK. public var pagingToken: Flipcash_Common_V1_PagingToken { - get {_pagingToken ?? Flipcash_Common_V1_PagingToken()} + get {return _pagingToken ?? Flipcash_Common_V1_PagingToken()} set {_pagingToken = newValue} } /// Returns true if `pagingToken` has been explicitly set. - public var hasPagingToken: Bool {self._pagingToken != nil} + public var hasPagingToken: Bool {return self._pagingToken != nil} /// Clears the value of `pagingToken`. Subsequent reads from it will return its default value. public mutating func clearPagingToken() {self._pagingToken = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/chat_v1_model.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/chat_v1_model.pb.swift index c204a7969..1c8ec07b1 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/chat_v1_model.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/chat_v1_model.pb.swift @@ -64,43 +64,43 @@ public struct Flipcash_Chat_V1_Metadata: @unchecked Sendable { // methods supported on all messages. public var chatID: Flipcash_Common_V1_ChatId { - get {_storage._chatID ?? Flipcash_Common_V1_ChatId()} + get {return _storage._chatID ?? Flipcash_Common_V1_ChatId()} set {_uniqueStorage()._chatID = newValue} } /// Returns true if `chatID` has been explicitly set. - public var hasChatID: Bool {_storage._chatID != nil} + public var hasChatID: Bool {return _storage._chatID != nil} /// Clears the value of `chatID`. Subsequent reads from it will return its default value. public mutating func clearChatID() {_uniqueStorage()._chatID = nil} /// The type of chat public var type: Flipcash_Chat_V1_ChatType { - get {_storage._type} + get {return _storage._type} set {_uniqueStorage()._type = newValue} } /// Members of this chat public var members: [Flipcash_Chat_V1_Member] { - get {_storage._members} + get {return _storage._members} set {_uniqueStorage()._members = newValue} } /// The last message in this chat public var lastMessage: Flipcash_Messaging_V1_Message { - get {_storage._lastMessage ?? Flipcash_Messaging_V1_Message()} + get {return _storage._lastMessage ?? Flipcash_Messaging_V1_Message()} set {_uniqueStorage()._lastMessage = newValue} } /// Returns true if `lastMessage` has been explicitly set. - public var hasLastMessage: Bool {_storage._lastMessage != nil} + public var hasLastMessage: Bool {return _storage._lastMessage != nil} /// Clears the value of `lastMessage`. Subsequent reads from it will return its default value. public mutating func clearLastMessage() {_uniqueStorage()._lastMessage = nil} /// The timestamp of the last activity in this chat public var lastActivity: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_storage._lastActivity ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _storage._lastActivity ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_uniqueStorage()._lastActivity = newValue} } /// Returns true if `lastActivity` has been explicitly set. - public var hasLastActivity: Bool {_storage._lastActivity != nil} + public var hasLastActivity: Bool {return _storage._lastActivity != nil} /// Clears the value of `lastActivity`. Subsequent reads from it will return its default value. public mutating func clearLastActivity() {_uniqueStorage()._lastActivity = nil} @@ -114,10 +114,18 @@ public struct Flipcash_Chat_V1_Metadata: @unchecked Sendable { /// exceed last_message.event_sequence. It is the same head reported by /// GetDeltaResponse.latest_sequence. public var latestEventSequence: UInt64 { - get {_storage._latestEventSequence} + get {return _storage._latestEventSequence} set {_uniqueStorage()._latestEventSequence = newValue} } + /// Whether this chat is hidden from the requesting owner's chat list. + /// Per-viewer and server-computed (e.g. the chat's peer is on the caller's + /// blocklist). Clients should exclude hidden chats from the primary DM list. + public var isHidden: Bool { + get {return _storage._isHidden} + set {_uniqueStorage()._isHidden = newValue} + } + public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} @@ -131,22 +139,22 @@ public struct Flipcash_Chat_V1_Member: Sendable { // methods supported on all messages. public var userID: Flipcash_Common_V1_UserId { - get {_userID ?? Flipcash_Common_V1_UserId()} + get {return _userID ?? Flipcash_Common_V1_UserId()} set {_userID = newValue} } /// Returns true if `userID` has been explicitly set. - public var hasUserID: Bool {self._userID != nil} + public var hasUserID: Bool {return self._userID != nil} /// Clears the value of `userID`. Subsequent reads from it will return its default value. public mutating func clearUserID() {self._userID = nil} /// The user profile for this member. It contains a subset of identifiers /// that can be publicly viewed within the chat. public var userProfile: Flipcash_Profile_V1_UserProfile { - get {_userProfile ?? Flipcash_Profile_V1_UserProfile()} + get {return _userProfile ?? Flipcash_Profile_V1_UserProfile()} set {_userProfile = newValue} } /// Returns true if `userProfile` has been explicitly set. - public var hasUserProfile: Bool {self._userProfile != nil} + public var hasUserProfile: Bool {return self._userProfile != nil} /// Clears the value of `userProfile`. Subsequent reads from it will return its default value. public mutating func clearUserProfile() {self._userProfile = nil} @@ -202,11 +210,11 @@ public struct Flipcash_Chat_V1_MetadataUpdate: Sendable { // methods supported on all messages. public var metadata: Flipcash_Chat_V1_Metadata { - get {_metadata ?? Flipcash_Chat_V1_Metadata()} + get {return _metadata ?? Flipcash_Chat_V1_Metadata()} set {_metadata = newValue} } /// Returns true if `metadata` has been explicitly set. - public var hasMetadata: Bool {self._metadata != nil} + public var hasMetadata: Bool {return self._metadata != nil} /// Clears the value of `metadata`. Subsequent reads from it will return its default value. public mutating func clearMetadata() {self._metadata = nil} @@ -224,11 +232,11 @@ public struct Flipcash_Chat_V1_MetadataUpdate: Sendable { // methods supported on all messages. public var newLastActivity: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_newLastActivity ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _newLastActivity ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_newLastActivity = newValue} } /// Returns true if `newLastActivity` has been explicitly set. - public var hasNewLastActivity: Bool {self._newLastActivity != nil} + public var hasNewLastActivity: Bool {return self._newLastActivity != nil} /// Clears the value of `newLastActivity`. Subsequent reads from it will return its default value. public mutating func clearNewLastActivity() {self._newLastActivity = nil} @@ -252,7 +260,7 @@ extension Flipcash_Chat_V1_ChatType: SwiftProtobuf._ProtoNameProviding { extension Flipcash_Chat_V1_Metadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".Metadata" - public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}chat_id\0\u{1}type\0\u{1}members\0\u{3}last_message\0\u{3}last_activity\0\u{3}latest_event_sequence\0") + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}chat_id\0\u{1}type\0\u{1}members\0\u{3}last_message\0\u{3}last_activity\0\u{3}latest_event_sequence\0\u{3}is_hidden\0") fileprivate class _StorageClass { var _chatID: Flipcash_Common_V1_ChatId? = nil @@ -261,6 +269,7 @@ extension Flipcash_Chat_V1_Metadata: SwiftProtobuf.Message, SwiftProtobuf._Messa var _lastMessage: Flipcash_Messaging_V1_Message? = nil var _lastActivity: SwiftProtobuf.Google_Protobuf_Timestamp? = nil var _latestEventSequence: UInt64 = 0 + var _isHidden: Bool = false // This property is used as the initial default value for new instances of the type. // The type itself is protecting the reference to its storage via CoW semantics. @@ -277,6 +286,7 @@ extension Flipcash_Chat_V1_Metadata: SwiftProtobuf.Message, SwiftProtobuf._Messa _lastMessage = source._lastMessage _lastActivity = source._lastActivity _latestEventSequence = source._latestEventSequence + _isHidden = source._isHidden } } @@ -301,6 +311,7 @@ extension Flipcash_Chat_V1_Metadata: SwiftProtobuf.Message, SwiftProtobuf._Messa case 4: try { try decoder.decodeSingularMessageField(value: &_storage._lastMessage) }() case 5: try { try decoder.decodeSingularMessageField(value: &_storage._lastActivity) }() case 6: try { try decoder.decodeSingularUInt64Field(value: &_storage._latestEventSequence) }() + case 7: try { try decoder.decodeSingularBoolField(value: &_storage._isHidden) }() default: break } } @@ -331,6 +342,9 @@ extension Flipcash_Chat_V1_Metadata: SwiftProtobuf.Message, SwiftProtobuf._Messa if _storage._latestEventSequence != 0 { try visitor.visitSingularUInt64Field(value: _storage._latestEventSequence, fieldNumber: 6) } + if _storage._isHidden != false { + try visitor.visitSingularBoolField(value: _storage._isHidden, fieldNumber: 7) + } } try unknownFields.traverse(visitor: &visitor) } @@ -346,6 +360,7 @@ extension Flipcash_Chat_V1_Metadata: SwiftProtobuf.Message, SwiftProtobuf._Messa if _storage._lastMessage != rhs_storage._lastMessage {return false} if _storage._lastActivity != rhs_storage._lastActivity {return false} if _storage._latestEventSequence != rhs_storage._latestEventSequence {return false} + if _storage._isHidden != rhs_storage._isHidden {return false} return true } if !storagesAreEqual {return false} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/common_v1_common.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/common_v1_common.pb.swift index 1c0c832ae..0b6418953 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/common_v1_common.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/common_v1_common.pb.swift @@ -133,20 +133,20 @@ public struct Flipcash_Common_V1_Auth: Sendable { // methods supported on all messages. public var pubKey: Flipcash_Common_V1_PublicKey { - get {_pubKey ?? Flipcash_Common_V1_PublicKey()} + get {return _pubKey ?? Flipcash_Common_V1_PublicKey()} set {_pubKey = newValue} } /// Returns true if `pubKey` has been explicitly set. - public var hasPubKey: Bool {self._pubKey != nil} + public var hasPubKey: Bool {return self._pubKey != nil} /// Clears the value of `pubKey`. Subsequent reads from it will return its default value. public mutating func clearPubKey() {self._pubKey = nil} public var signature: Flipcash_Common_V1_Signature { - get {_signature ?? Flipcash_Common_V1_Signature()} + get {return _signature ?? Flipcash_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} @@ -229,11 +229,11 @@ public struct Flipcash_Common_V1_CryptoPaymentAmount: Sendable { /// The crypto mint that was paid public var mint: Flipcash_Common_V1_PublicKey { - get {_mint ?? Flipcash_Common_V1_PublicKey()} + get {return _mint ?? Flipcash_Common_V1_PublicKey()} set {_mint = newValue} } /// Returns true if `mint` has been explicitly set. - public var hasMint: Bool {self._mint != nil} + public var hasMint: Bool {return self._mint != nil} /// Clears the value of `mint`. Subsequent reads from it will return its default value. public mutating func clearMint() {self._mint = nil} @@ -287,11 +287,11 @@ public struct Flipcash_Common_V1_QueryOptions: Sendable { /// PagingToken is a token that can be extracted from the /// identifier of a collection. public var pagingToken: Flipcash_Common_V1_PagingToken { - get {_pagingToken ?? Flipcash_Common_V1_PagingToken()} + get {return _pagingToken ?? Flipcash_Common_V1_PagingToken()} set {_pagingToken = newValue} } /// Returns true if `pagingToken` has been explicitly set. - public var hasPagingToken: Bool {self._pagingToken != nil} + public var hasPagingToken: Bool {return self._pagingToken != nil} /// Clears the value of `pagingToken`. Subsequent reads from it will return its default value. public mutating func clearPagingToken() {self._pagingToken = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/contact_v1_contact_list_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/contact_v1_contact_list_service.grpc.swift index d5edfc4cd..c3151f8c7 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/contact_v1_contact_list_service.grpc.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/contact_v1_contact_list_service.grpc.swift @@ -15,13 +15,13 @@ import GRPCProtobuf /// Namespace containing generated types for the "flipcash.contact.v1.ContactList" service. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) -public enum Flipcash_Contact_V1_ContactList: Sendable { +public enum Flipcash_Contact_V1_ContactList { /// Service descriptor for the "flipcash.contact.v1.ContactList" service. public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.contact.v1.ContactList") /// Namespace for method metadata. - public enum Method: Sendable { + public enum Method { /// Namespace for "CheckSync" metadata. - public enum CheckSync: Sendable { + public enum CheckSync { /// Request type for "CheckSync". public typealias Input = Flipcash_Contact_V1_CheckSyncRequest /// Response type for "CheckSync". @@ -29,12 +29,11 @@ public enum Flipcash_Contact_V1_ContactList: Sendable { /// Descriptor for "CheckSync". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.contact.v1.ContactList"), - method: "CheckSync", - type: .unary + method: "CheckSync" ) } /// Namespace for "DeltaUpload" metadata. - public enum DeltaUpload: Sendable { + public enum DeltaUpload { /// Request type for "DeltaUpload". public typealias Input = Flipcash_Contact_V1_DeltaUploadRequest /// Response type for "DeltaUpload". @@ -42,12 +41,11 @@ public enum Flipcash_Contact_V1_ContactList: Sendable { /// Descriptor for "DeltaUpload". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.contact.v1.ContactList"), - method: "DeltaUpload", - type: .unary + method: "DeltaUpload" ) } /// Namespace for "FullUpload" metadata. - public enum FullUpload: Sendable { + public enum FullUpload { /// Request type for "FullUpload". public typealias Input = Flipcash_Contact_V1_FullUploadRequest /// Response type for "FullUpload". @@ -55,12 +53,11 @@ public enum Flipcash_Contact_V1_ContactList: Sendable { /// Descriptor for "FullUpload". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.contact.v1.ContactList"), - method: "FullUpload", - type: .clientStreaming + method: "FullUpload" ) } /// Namespace for "GetFlipcashContacts" metadata. - public enum GetFlipcashContacts: Sendable { + public enum GetFlipcashContacts { /// Request type for "GetFlipcashContacts". public typealias Input = Flipcash_Contact_V1_GetFlipcashContactsRequest /// Response type for "GetFlipcashContacts". @@ -68,8 +65,7 @@ public enum Flipcash_Contact_V1_ContactList: Sendable { /// Descriptor for "GetFlipcashContacts". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.contact.v1.ContactList"), - method: "GetFlipcashContacts", - type: .serverStreaming + method: "GetFlipcashContacts" ) } /// Descriptors for all methods in the "flipcash.contact.v1.ContactList" service. diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/contact_v1_contact_list_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/contact_v1_contact_list_service.pb.swift index 6c75d694d..dfefe3b6d 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/contact_v1_contact_list_service.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/contact_v1_contact_list_service.pb.swift @@ -26,21 +26,21 @@ public struct Flipcash_Contact_V1_CheckSyncRequest: Sendable { // methods supported on all messages. public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} /// XOR-of-SHA256 over the client's current set of normalized E.164 phones. public var clientChecksum: Flipcash_Common_V1_Hash { - get {_clientChecksum ?? Flipcash_Common_V1_Hash()} + get {return _clientChecksum ?? Flipcash_Common_V1_Hash()} set {_clientChecksum = newValue} } /// Returns true if `clientChecksum` has been explicitly set. - public var hasClientChecksum: Bool {self._clientChecksum != nil} + public var hasClientChecksum: Bool {return self._clientChecksum != nil} /// Clears the value of `clientChecksum`. Subsequent reads from it will return its default value. public mutating func clearClientChecksum() {self._clientChecksum = nil} @@ -62,11 +62,11 @@ public struct Flipcash_Contact_V1_CheckSyncResponse: Sendable { /// Authoritative server-side checksum. Clients persist this and use it /// as the basis for the next DeltaUpload.old_checksum. public var serverChecksum: Flipcash_Common_V1_Hash { - get {_serverChecksum ?? Flipcash_Common_V1_Hash()} + get {return _serverChecksum ?? Flipcash_Common_V1_Hash()} set {_serverChecksum = newValue} } /// Returns true if `serverChecksum` has been explicitly set. - public var hasServerChecksum: Bool {self._serverChecksum != nil} + public var hasServerChecksum: Bool {return self._serverChecksum != nil} /// Clears the value of `serverChecksum`. Subsequent reads from it will return its default value. public mutating func clearServerChecksum() {self._serverChecksum = nil} @@ -121,11 +121,11 @@ public struct Flipcash_Contact_V1_DeltaUploadRequest: Sendable { // methods supported on all messages. public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -136,11 +136,11 @@ public struct Flipcash_Contact_V1_DeltaUploadRequest: Sendable { /// The checksum the client expected the server to have *before* applying /// this delta. Server applies only if stored == old_checksum. public var oldChecksum: Flipcash_Common_V1_Hash { - get {_oldChecksum ?? Flipcash_Common_V1_Hash()} + get {return _oldChecksum ?? Flipcash_Common_V1_Hash()} set {_oldChecksum = newValue} } /// Returns true if `oldChecksum` has been explicitly set. - public var hasOldChecksum: Bool {self._oldChecksum != nil} + public var hasOldChecksum: Bool {return self._oldChecksum != nil} /// Clears the value of `oldChecksum`. Subsequent reads from it will return its default value. public mutating func clearOldChecksum() {self._oldChecksum = nil} @@ -148,11 +148,11 @@ public struct Flipcash_Contact_V1_DeltaUploadRequest: Sendable { /// delta. Server persists this on success. Used to detect retries: if /// stored == new_checksum, the server treats the request as a no-op. public var newChecksum: Flipcash_Common_V1_Hash { - get {_newChecksum ?? Flipcash_Common_V1_Hash()} + get {return _newChecksum ?? Flipcash_Common_V1_Hash()} set {_newChecksum = newValue} } /// Returns true if `newChecksum` has been explicitly set. - public var hasNewChecksum: Bool {self._newChecksum != nil} + public var hasNewChecksum: Bool {return self._newChecksum != nil} /// Clears the value of `newChecksum`. Subsequent reads from it will return its default value. public mutating func clearNewChecksum() {self._newChecksum = nil} @@ -234,11 +234,11 @@ public struct Flipcash_Contact_V1_FullUploadRequest: Sendable { // methods supported on all messages. public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -249,11 +249,11 @@ public struct Flipcash_Contact_V1_FullUploadRequest: Sendable { /// XOR-of-SHA256 over the client's current set of normalized E.164 phones. /// Sent on the last streamed request to indicate the end of the upload. public var expectedChecksum: Flipcash_Common_V1_Hash { - get {_expectedChecksum ?? Flipcash_Common_V1_Hash()} + get {return _expectedChecksum ?? Flipcash_Common_V1_Hash()} set {_expectedChecksum = newValue} } /// Returns true if `expectedChecksum` has been explicitly set. - public var hasExpectedChecksum: Bool {self._expectedChecksum != nil} + public var hasExpectedChecksum: Bool {return self._expectedChecksum != nil} /// Clears the value of `expectedChecksum`. Subsequent reads from it will return its default value. public mutating func clearExpectedChecksum() {self._expectedChecksum = nil} @@ -327,20 +327,20 @@ public struct Flipcash_Contact_V1_GetFlipcashContactsRequest: Sendable { // methods supported on all messages. public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} public var checksum: Flipcash_Common_V1_Hash { - get {_checksum ?? Flipcash_Common_V1_Hash()} + get {return _checksum ?? Flipcash_Common_V1_Hash()} set {_checksum = newValue} } /// Returns true if `checksum` has been explicitly set. - public var hasChecksum: Bool {self._checksum != nil} + public var hasChecksum: Bool {return self._checksum != nil} /// Clears the value of `checksum`. Subsequent reads from it will return its default value. public mutating func clearChecksum() {self._checksum = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/contact_v1_model.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/contact_v1_model.pb.swift index 413a9f6ea..845838754 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/contact_v1_model.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/contact_v1_model.pb.swift @@ -26,32 +26,32 @@ public struct Flipcash_Contact_V1_FlipcashContact: Sendable { // methods supported on all messages. public var phone: Flipcash_Phone_V1_PhoneNumber { - get {_phone ?? Flipcash_Phone_V1_PhoneNumber()} + get {return _phone ?? Flipcash_Phone_V1_PhoneNumber()} set {_phone = newValue} } /// Returns true if `phone` has been explicitly set. - public var hasPhone: Bool {self._phone != nil} + public var hasPhone: Bool {return self._phone != nil} /// Clears the value of `phone`. Subsequent reads from it will return its default value. public mutating func clearPhone() {self._phone = nil} /// The DM chat ID for the Flipcash contact. If the chat doesn't exist, it needs /// to be initiated with a cash send to initialize it public var dmChatID: Flipcash_Common_V1_ChatId { - get {_dmChatID ?? Flipcash_Common_V1_ChatId()} + get {return _dmChatID ?? Flipcash_Common_V1_ChatId()} set {_dmChatID = newValue} } /// Returns true if `dmChatID` has been explicitly set. - public var hasDmChatID: Bool {self._dmChatID != nil} + public var hasDmChatID: Bool {return self._dmChatID != nil} /// Clears the value of `dmChatID`. Subsequent reads from it will return its default value. public mutating func clearDmChatID() {self._dmChatID = nil} /// Timestamp the contact joined Flipcash public var joinTs: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_joinTs ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _joinTs ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_joinTs = newValue} } /// Returns true if `joinTs` has been explicitly set. - public var hasJoinTs: Bool {self._joinTs != nil} + public var hasJoinTs: Bool {return self._joinTs != nil} /// Clears the value of `joinTs`. Subsequent reads from it will return its default value. public mutating func clearJoinTs() {self._joinTs = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/email_v1_email_verification_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/email_v1_email_verification_service.grpc.swift index 2724e8bb5..478a05ae9 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/email_v1_email_verification_service.grpc.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/email_v1_email_verification_service.grpc.swift @@ -15,13 +15,13 @@ import GRPCProtobuf /// Namespace containing generated types for the "flipcash.email.v1.EmailVerification" service. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) -public enum Flipcash_Email_V1_EmailVerification: Sendable { +public enum Flipcash_Email_V1_EmailVerification { /// Service descriptor for the "flipcash.email.v1.EmailVerification" service. public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.email.v1.EmailVerification") /// Namespace for method metadata. - public enum Method: Sendable { + public enum Method { /// Namespace for "SendVerificationCode" metadata. - public enum SendVerificationCode: Sendable { + public enum SendVerificationCode { /// Request type for "SendVerificationCode". public typealias Input = Flipcash_Email_V1_SendVerificationCodeRequest /// Response type for "SendVerificationCode". @@ -29,12 +29,11 @@ public enum Flipcash_Email_V1_EmailVerification: Sendable { /// Descriptor for "SendVerificationCode". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.email.v1.EmailVerification"), - method: "SendVerificationCode", - type: .unary + method: "SendVerificationCode" ) } /// Namespace for "CheckVerificationCode" metadata. - public enum CheckVerificationCode: Sendable { + public enum CheckVerificationCode { /// Request type for "CheckVerificationCode". public typealias Input = Flipcash_Email_V1_CheckVerificationCodeRequest /// Response type for "CheckVerificationCode". @@ -42,12 +41,11 @@ public enum Flipcash_Email_V1_EmailVerification: Sendable { /// Descriptor for "CheckVerificationCode". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.email.v1.EmailVerification"), - method: "CheckVerificationCode", - type: .unary + method: "CheckVerificationCode" ) } /// Namespace for "Unlink" metadata. - public enum Unlink: Sendable { + public enum Unlink { /// Request type for "Unlink". public typealias Input = Flipcash_Email_V1_UnlinkRequest /// Response type for "Unlink". @@ -55,8 +53,7 @@ public enum Flipcash_Email_V1_EmailVerification: Sendable { /// Descriptor for "Unlink". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.email.v1.EmailVerification"), - method: "Unlink", - type: .unary + method: "Unlink" ) } /// Descriptors for all methods in the "flipcash.email.v1.EmailVerification" service. diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/email_v1_email_verification_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/email_v1_email_verification_service.pb.swift index 8b76819d0..aa4e4e356 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/email_v1_email_verification_service.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/email_v1_email_verification_service.pb.swift @@ -27,20 +27,20 @@ public struct Flipcash_Email_V1_SendVerificationCodeRequest: Sendable { /// The email address to send a verification code to public var emailAddress: Flipcash_Email_V1_EmailAddress { - get {_emailAddress ?? Flipcash_Email_V1_EmailAddress()} + get {return _emailAddress ?? Flipcash_Email_V1_EmailAddress()} set {_emailAddress = newValue} } /// Returns true if `emailAddress` has been explicitly set. - public var hasEmailAddress: Bool {self._emailAddress != nil} + public var hasEmailAddress: Bool {return self._emailAddress != nil} /// Clears the value of `emailAddress`. Subsequent reads from it will return its default value. public mutating func clearEmailAddress() {self._emailAddress = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -122,30 +122,30 @@ public struct Flipcash_Email_V1_CheckVerificationCodeRequest: Sendable { /// The email address being verified public var emailAddress: Flipcash_Email_V1_EmailAddress { - get {_emailAddress ?? Flipcash_Email_V1_EmailAddress()} + get {return _emailAddress ?? Flipcash_Email_V1_EmailAddress()} set {_emailAddress = newValue} } /// Returns true if `emailAddress` has been explicitly set. - public var hasEmailAddress: Bool {self._emailAddress != nil} + public var hasEmailAddress: Bool {return self._emailAddress != nil} /// Clears the value of `emailAddress`. Subsequent reads from it will return its default value. public mutating func clearEmailAddress() {self._emailAddress = nil} /// The verification code received via email public var code: Flipcash_Email_V1_VerificationCode { - get {_code ?? Flipcash_Email_V1_VerificationCode()} + get {return _code ?? Flipcash_Email_V1_VerificationCode()} set {_code = newValue} } /// Returns true if `code` has been explicitly set. - public var hasCode: Bool {self._code != nil} + public var hasCode: Bool {return self._code != nil} /// Clears the value of `code`. Subsequent reads from it will return its default value. public mutating func clearCode() {self._code = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -235,20 +235,20 @@ public struct Flipcash_Email_V1_UnlinkRequest: Sendable { /// The email address to unlink public var emailAddress: Flipcash_Email_V1_EmailAddress { - get {_emailAddress ?? Flipcash_Email_V1_EmailAddress()} + get {return _emailAddress ?? Flipcash_Email_V1_EmailAddress()} set {_emailAddress = newValue} } /// Returns true if `emailAddress` has been explicitly set. - public var hasEmailAddress: Bool {self._emailAddress != nil} + public var hasEmailAddress: Bool {return self._emailAddress != nil} /// Clears the value of `emailAddress`. Subsequent reads from it will return its default value. public mutating func clearEmailAddress() {self._emailAddress = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/event_v1_event_streaming_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/event_v1_event_streaming_service.grpc.swift index b44bffd2b..5911feda4 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/event_v1_event_streaming_service.grpc.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/event_v1_event_streaming_service.grpc.swift @@ -15,13 +15,13 @@ import GRPCProtobuf /// Namespace containing generated types for the "flipcash.event.v1.EventStreaming" service. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) -public enum Flipcash_Event_V1_EventStreaming: Sendable { +public enum Flipcash_Event_V1_EventStreaming { /// Service descriptor for the "flipcash.event.v1.EventStreaming" service. public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.event.v1.EventStreaming") /// Namespace for method metadata. - public enum Method: Sendable { + public enum Method { /// Namespace for "StreamEvents" metadata. - public enum StreamEvents: Sendable { + public enum StreamEvents { /// Request type for "StreamEvents". public typealias Input = Flipcash_Event_V1_StreamEventsRequest /// Response type for "StreamEvents". @@ -29,12 +29,11 @@ public enum Flipcash_Event_V1_EventStreaming: Sendable { /// Descriptor for "StreamEvents". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.event.v1.EventStreaming"), - method: "StreamEvents", - type: .bidirectionalStreaming + method: "StreamEvents" ) } /// Namespace for "ForwardEvents" metadata. - public enum ForwardEvents: Sendable { + public enum ForwardEvents { /// Request type for "ForwardEvents". public typealias Input = Flipcash_Event_V1_ForwardEventsRequest /// Response type for "ForwardEvents". @@ -42,8 +41,7 @@ public enum Flipcash_Event_V1_EventStreaming: Sendable { /// Descriptor for "ForwardEvents". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.event.v1.EventStreaming"), - method: "ForwardEvents", - type: .unary + method: "ForwardEvents" ) } /// Descriptors for all methods in the "flipcash.event.v1.EventStreaming" service. diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/event_v1_event_streaming_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/event_v1_event_streaming_service.pb.swift index c4f6fac89..b16cc88e1 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/event_v1_event_streaming_service.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/event_v1_event_streaming_service.pb.swift @@ -57,11 +57,11 @@ public struct Flipcash_Event_V1_StreamEventsRequest: Sendable { // methods supported on all messages. public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -70,11 +70,11 @@ public struct Flipcash_Event_V1_StreamEventsRequest: Sendable { /// It is used primarily as a nonce for auth. Server may reject /// timestamps that are too far in the future or past. public var ts: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_ts ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _ts ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_ts = newValue} } /// Returns true if `ts` has been explicitly set. - public var hasTs: Bool {self._ts != nil} + public var hasTs: Bool {return self._ts != nil} /// Clears the value of `ts`. Subsequent reads from it will return its default value. public mutating func clearTs() {self._ts = nil} @@ -184,11 +184,11 @@ public struct Flipcash_Event_V1_ForwardEventsRequest: Sendable { // methods supported on all messages. public var userEvents: Flipcash_Event_V1_UserEventBatch { - get {_userEvents ?? Flipcash_Event_V1_UserEventBatch()} + get {return _userEvents ?? Flipcash_Event_V1_UserEventBatch()} set {_userEvents = newValue} } /// Returns true if `userEvents` has been explicitly set. - public var hasUserEvents: Bool {self._userEvents != nil} + public var hasUserEvents: Bool {return self._userEvents != nil} /// Clears the value of `userEvents`. Subsequent reads from it will return its default value. public mutating func clearUserEvents() {self._userEvents = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/event_v1_model.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/event_v1_model.pb.swift index b97542287..18e576ed2 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/event_v1_model.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/event_v1_model.pb.swift @@ -40,20 +40,20 @@ public struct Flipcash_Event_V1_Event: Sendable { // methods supported on all messages. public var id: Flipcash_Event_V1_EventId { - get {_id ?? Flipcash_Event_V1_EventId()} + get {return _id ?? Flipcash_Event_V1_EventId()} set {_id = newValue} } /// Returns true if `id` has been explicitly set. - public var hasID: Bool {self._id != nil} + public var hasID: Bool {return self._id != nil} /// Clears the value of `id`. Subsequent reads from it will return its default value. public mutating func clearID() {self._id = nil} public var ts: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_ts ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _ts ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_ts = newValue} } /// Returns true if `ts` has been explicitly set. - public var hasTs: Bool {self._ts != nil} + public var hasTs: Bool {return self._ts != nil} /// Clears the value of `ts`. Subsequent reads from it will return its default value. public mutating func clearTs() {self._ts = nil} @@ -116,20 +116,20 @@ public struct Flipcash_Event_V1_UserEvent: Sendable { // methods supported on all messages. public var userID: Flipcash_Common_V1_UserId { - get {_userID ?? Flipcash_Common_V1_UserId()} + get {return _userID ?? Flipcash_Common_V1_UserId()} set {_userID = newValue} } /// Returns true if `userID` has been explicitly set. - public var hasUserID: Bool {self._userID != nil} + public var hasUserID: Bool {return self._userID != nil} /// Clears the value of `userID`. Subsequent reads from it will return its default value. public mutating func clearUserID() {self._userID = nil} public var event: Flipcash_Event_V1_Event { - get {_event ?? Flipcash_Event_V1_Event()} + get {return _event ?? Flipcash_Event_V1_Event()} set {_event = newValue} } /// Returns true if `event` has been explicitly set. - public var hasEvent: Bool {self._event != nil} + public var hasEvent: Bool {return self._event != nil} /// Clears the value of `event`. Subsequent reads from it will return its default value. public mutating func clearEvent() {self._event = nil} @@ -175,21 +175,21 @@ public struct Flipcash_Event_V1_ServerPing: Sendable { /// Timestamp the ping was sent on the stream, for client to get a sense /// of potential network latency public var timestamp: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_timestamp = newValue} } /// Returns true if `timestamp` has been explicitly set. - public var hasTimestamp: Bool {self._timestamp != nil} + public var hasTimestamp: Bool {return self._timestamp != nil} /// Clears the value of `timestamp`. Subsequent reads from it will return its default value. public mutating func clearTimestamp() {self._timestamp = nil} /// The delay server will apply before sending the next ping public var pingDelay: SwiftProtobuf.Google_Protobuf_Duration { - get {_pingDelay ?? SwiftProtobuf.Google_Protobuf_Duration()} + get {return _pingDelay ?? SwiftProtobuf.Google_Protobuf_Duration()} set {_pingDelay = newValue} } /// Returns true if `pingDelay` has been explicitly set. - public var hasPingDelay: Bool {self._pingDelay != nil} + public var hasPingDelay: Bool {return self._pingDelay != nil} /// Clears the value of `pingDelay`. Subsequent reads from it will return its default value. public mutating func clearPingDelay() {self._pingDelay = nil} @@ -209,11 +209,11 @@ public struct Flipcash_Event_V1_ClientPong: Sendable { /// Timestamp the Pong was sent on the stream, for server to get a sense /// of potential network latency public var timestamp: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_timestamp = newValue} } /// Returns true if `timestamp` has been explicitly set. - public var hasTimestamp: Bool {self._timestamp != nil} + public var hasTimestamp: Bool {return self._timestamp != nil} /// Clears the value of `timestamp`. Subsequent reads from it will return its default value. public mutating func clearTimestamp() {self._timestamp = nil} @@ -231,11 +231,11 @@ public struct Flipcash_Event_V1_ChatUpdate: Sendable { /// The chat that this update is for public var chat: Flipcash_Common_V1_ChatId { - get {_chat ?? Flipcash_Common_V1_ChatId()} + get {return _chat ?? Flipcash_Common_V1_ChatId()} set {_chat = newValue} } /// Returns true if `chat` has been explicitly set. - public var hasChat: Bool {self._chat != nil} + public var hasChat: Bool {return self._chat != nil} /// Clears the value of `chat`. Subsequent reads from it will return its default value. public mutating func clearChat() {self._chat = nil} @@ -246,11 +246,11 @@ public struct Flipcash_Event_V1_ChatUpdate: Sendable { /// /// NOTE: This field was marked as deprecated in the .proto file. public var newMessages: Flipcash_Messaging_V1_MessageBatch { - get {_newMessages ?? Flipcash_Messaging_V1_MessageBatch()} + get {return _newMessages ?? Flipcash_Messaging_V1_MessageBatch()} set {_newMessages = newValue} } /// Returns true if `newMessages` has been explicitly set. - public var hasNewMessages: Bool {self._newMessages != nil} + public var hasNewMessages: Bool {return self._newMessages != nil} /// Clears the value of `newMessages`. Subsequent reads from it will return its default value. public mutating func clearNewMessages() {self._newMessages = nil} @@ -259,22 +259,22 @@ public struct Flipcash_Event_V1_ChatUpdate: Sendable { /// best-effort overlay and are reconciled from current state on reconnect — /// they are intentionally NOT part of the gap-detected event log. public var pointerUpdates: Flipcash_Messaging_V1_PointerBatch { - get {_pointerUpdates ?? Flipcash_Messaging_V1_PointerBatch()} + get {return _pointerUpdates ?? Flipcash_Messaging_V1_PointerBatch()} set {_pointerUpdates = newValue} } /// Returns true if `pointerUpdates` has been explicitly set. - public var hasPointerUpdates: Bool {self._pointerUpdates != nil} + public var hasPointerUpdates: Bool {return self._pointerUpdates != nil} /// Clears the value of `pointerUpdates`. Subsequent reads from it will return its default value. public mutating func clearPointerUpdates() {self._pointerUpdates = nil} /// If present, message typing notification state changes for members in the /// chat. Transient and best-effort — not part of the event log. public var isTypingNotifications: Flipcash_Messaging_V1_IsTypingNotificationBatch { - get {_isTypingNotifications ?? Flipcash_Messaging_V1_IsTypingNotificationBatch()} + get {return _isTypingNotifications ?? Flipcash_Messaging_V1_IsTypingNotificationBatch()} set {_isTypingNotifications = newValue} } /// Returns true if `isTypingNotifications` has been explicitly set. - public var hasIsTypingNotifications: Bool {self._isTypingNotifications != nil} + public var hasIsTypingNotifications: Bool {return self._isTypingNotifications != nil} /// Clears the value of `isTypingNotifications`. Subsequent reads from it will return its default value. public mutating func clearIsTypingNotifications() {self._isTypingNotifications = nil} @@ -286,11 +286,11 @@ public struct Flipcash_Event_V1_ChatUpdate: Sendable { /// ascending Event.sequence and gap-detect via Event.sequence/count, catching /// up with Messaging.GetDelta on a gap. This supersedes new_messages. public var events: Flipcash_Messaging_V1_EventBatch { - get {_events ?? Flipcash_Messaging_V1_EventBatch()} + get {return _events ?? Flipcash_Messaging_V1_EventBatch()} set {_events = newValue} } /// Returns true if `events` has been explicitly set. - public var hasEvents: Bool {self._events != nil} + public var hasEvents: Bool {return self._events != nil} /// Clears the value of `events`. Subsequent reads from it will return its default value. public mutating func clearEvents() {self._events = nil} @@ -300,11 +300,11 @@ public struct Flipcash_Event_V1_ChatUpdate: Sendable { /// ReactionUpdate.sequence and reconcile any misses by refreshing a message's /// ReactionSummary on view. public var reactionUpdates: Flipcash_Messaging_V1_ReactionUpdateBatch { - get {_reactionUpdates ?? Flipcash_Messaging_V1_ReactionUpdateBatch()} + get {return _reactionUpdates ?? Flipcash_Messaging_V1_ReactionUpdateBatch()} set {_reactionUpdates = newValue} } /// Returns true if `reactionUpdates` has been explicitly set. - public var hasReactionUpdates: Bool {self._reactionUpdates != nil} + public var hasReactionUpdates: Bool {return self._reactionUpdates != nil} /// Clears the value of `reactionUpdates`. Subsequent reads from it will return its default value. public mutating func clearReactionUpdates() {self._reactionUpdates = nil} @@ -337,11 +337,11 @@ public struct Flipcash_Event_V1_BlobUpdate: Sendable { /// The blobs that transitioned, each carrying its new status and, when READY, /// its resolved metadata (including a freshly minted download_url). public var blobs: Flipcash_Blob_V1_BlobBatch { - get {_blobs ?? Flipcash_Blob_V1_BlobBatch()} + get {return _blobs ?? Flipcash_Blob_V1_BlobBatch()} set {_blobs = newValue} } /// Returns true if `blobs` has been explicitly set. - public var hasBlobs: Bool {self._blobs != nil} + public var hasBlobs: Bool {return self._blobs != nil} /// Clears the value of `blobs`. Subsequent reads from it will return its default value. public mutating func clearBlobs() {self._blobs = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/flipcash_messaging_v1_messaging_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/flipcash_messaging_v1_messaging_service.grpc.swift index bb9cec16f..0931f5088 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/flipcash_messaging_v1_messaging_service.grpc.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/flipcash_messaging_v1_messaging_service.grpc.swift @@ -15,13 +15,13 @@ import GRPCProtobuf /// Namespace containing generated types for the "flipcash.messaging.v1.Messaging" service. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) -public enum Flipcash_Messaging_V1_Messaging: Sendable { +public enum Flipcash_Messaging_V1_Messaging { /// Service descriptor for the "flipcash.messaging.v1.Messaging" service. public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.messaging.v1.Messaging") /// Namespace for method metadata. - public enum Method: Sendable { + public enum Method { /// Namespace for "GetMessage" metadata. - public enum GetMessage: Sendable { + public enum GetMessage { /// Request type for "GetMessage". public typealias Input = Flipcash_Messaging_V1_GetMessageRequest /// Response type for "GetMessage". @@ -29,12 +29,11 @@ public enum Flipcash_Messaging_V1_Messaging: Sendable { /// Descriptor for "GetMessage". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.messaging.v1.Messaging"), - method: "GetMessage", - type: .unary + method: "GetMessage" ) } /// Namespace for "GetMessages" metadata. - public enum GetMessages: Sendable { + public enum GetMessages { /// Request type for "GetMessages". public typealias Input = Flipcash_Messaging_V1_GetMessagesRequest /// Response type for "GetMessages". @@ -42,12 +41,11 @@ public enum Flipcash_Messaging_V1_Messaging: Sendable { /// Descriptor for "GetMessages". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.messaging.v1.Messaging"), - method: "GetMessages", - type: .unary + method: "GetMessages" ) } /// Namespace for "GetDelta" metadata. - public enum GetDelta: Sendable { + public enum GetDelta { /// Request type for "GetDelta". public typealias Input = Flipcash_Messaging_V1_GetDeltaRequest /// Response type for "GetDelta". @@ -55,12 +53,11 @@ public enum Flipcash_Messaging_V1_Messaging: Sendable { /// Descriptor for "GetDelta". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.messaging.v1.Messaging"), - method: "GetDelta", - type: .serverStreaming + method: "GetDelta" ) } /// Namespace for "SendMessage" metadata. - public enum SendMessage: Sendable { + public enum SendMessage { /// Request type for "SendMessage". public typealias Input = Flipcash_Messaging_V1_SendMessageRequest /// Response type for "SendMessage". @@ -68,12 +65,11 @@ public enum Flipcash_Messaging_V1_Messaging: Sendable { /// Descriptor for "SendMessage". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.messaging.v1.Messaging"), - method: "SendMessage", - type: .unary + method: "SendMessage" ) } /// Namespace for "EditMessage" metadata. - public enum EditMessage: Sendable { + public enum EditMessage { /// Request type for "EditMessage". public typealias Input = Flipcash_Messaging_V1_EditMessageRequest /// Response type for "EditMessage". @@ -81,12 +77,11 @@ public enum Flipcash_Messaging_V1_Messaging: Sendable { /// Descriptor for "EditMessage". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.messaging.v1.Messaging"), - method: "EditMessage", - type: .unary + method: "EditMessage" ) } /// Namespace for "DeleteMessage" metadata. - public enum DeleteMessage: Sendable { + public enum DeleteMessage { /// Request type for "DeleteMessage". public typealias Input = Flipcash_Messaging_V1_DeleteMessageRequest /// Response type for "DeleteMessage". @@ -94,12 +89,11 @@ public enum Flipcash_Messaging_V1_Messaging: Sendable { /// Descriptor for "DeleteMessage". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.messaging.v1.Messaging"), - method: "DeleteMessage", - type: .unary + method: "DeleteMessage" ) } /// Namespace for "AddReaction" metadata. - public enum AddReaction: Sendable { + public enum AddReaction { /// Request type for "AddReaction". public typealias Input = Flipcash_Messaging_V1_AddReactionRequest /// Response type for "AddReaction". @@ -107,12 +101,11 @@ public enum Flipcash_Messaging_V1_Messaging: Sendable { /// Descriptor for "AddReaction". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.messaging.v1.Messaging"), - method: "AddReaction", - type: .unary + method: "AddReaction" ) } /// Namespace for "RemoveReaction" metadata. - public enum RemoveReaction: Sendable { + public enum RemoveReaction { /// Request type for "RemoveReaction". public typealias Input = Flipcash_Messaging_V1_RemoveReactionRequest /// Response type for "RemoveReaction". @@ -120,12 +113,11 @@ public enum Flipcash_Messaging_V1_Messaging: Sendable { /// Descriptor for "RemoveReaction". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.messaging.v1.Messaging"), - method: "RemoveReaction", - type: .unary + method: "RemoveReaction" ) } /// Namespace for "GetReactors" metadata. - public enum GetReactors: Sendable { + public enum GetReactors { /// Request type for "GetReactors". public typealias Input = Flipcash_Messaging_V1_GetReactorsRequest /// Response type for "GetReactors". @@ -133,12 +125,11 @@ public enum Flipcash_Messaging_V1_Messaging: Sendable { /// Descriptor for "GetReactors". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.messaging.v1.Messaging"), - method: "GetReactors", - type: .unary + method: "GetReactors" ) } /// Namespace for "GetReactionSummary" metadata. - public enum GetReactionSummary: Sendable { + public enum GetReactionSummary { /// Request type for "GetReactionSummary". public typealias Input = Flipcash_Messaging_V1_GetReactionSummaryRequest /// Response type for "GetReactionSummary". @@ -146,12 +137,11 @@ public enum Flipcash_Messaging_V1_Messaging: Sendable { /// Descriptor for "GetReactionSummary". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.messaging.v1.Messaging"), - method: "GetReactionSummary", - type: .unary + method: "GetReactionSummary" ) } /// Namespace for "GetReactionSummaries" metadata. - public enum GetReactionSummaries: Sendable { + public enum GetReactionSummaries { /// Request type for "GetReactionSummaries". public typealias Input = Flipcash_Messaging_V1_GetReactionSummariesRequest /// Response type for "GetReactionSummaries". @@ -159,12 +149,11 @@ public enum Flipcash_Messaging_V1_Messaging: Sendable { /// Descriptor for "GetReactionSummaries". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.messaging.v1.Messaging"), - method: "GetReactionSummaries", - type: .unary + method: "GetReactionSummaries" ) } /// Namespace for "AdvancePointer" metadata. - public enum AdvancePointer: Sendable { + public enum AdvancePointer { /// Request type for "AdvancePointer". public typealias Input = Flipcash_Messaging_V1_AdvancePointerRequest /// Response type for "AdvancePointer". @@ -172,12 +161,11 @@ public enum Flipcash_Messaging_V1_Messaging: Sendable { /// Descriptor for "AdvancePointer". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.messaging.v1.Messaging"), - method: "AdvancePointer", - type: .unary + method: "AdvancePointer" ) } /// Namespace for "NotifyIsTyping" metadata. - public enum NotifyIsTyping: Sendable { + public enum NotifyIsTyping { /// Request type for "NotifyIsTyping". public typealias Input = Flipcash_Messaging_V1_NotifyIsTypingRequest /// Response type for "NotifyIsTyping". @@ -185,8 +173,7 @@ public enum Flipcash_Messaging_V1_Messaging: Sendable { /// Descriptor for "NotifyIsTyping". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.messaging.v1.Messaging"), - method: "NotifyIsTyping", - type: .unary + method: "NotifyIsTyping" ) } /// Descriptors for all methods in the "flipcash.messaging.v1.Messaging" service. diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/flipcash_messaging_v1_messaging_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/flipcash_messaging_v1_messaging_service.pb.swift index 01725ba48..7af2d7ef3 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/flipcash_messaging_v1_messaging_service.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/flipcash_messaging_v1_messaging_service.pb.swift @@ -26,29 +26,29 @@ public struct Flipcash_Messaging_V1_GetMessageRequest: Sendable { // methods supported on all messages. public var chatID: Flipcash_Common_V1_ChatId { - get {_chatID ?? Flipcash_Common_V1_ChatId()} + get {return _chatID ?? Flipcash_Common_V1_ChatId()} set {_chatID = newValue} } /// Returns true if `chatID` has been explicitly set. - public var hasChatID: Bool {self._chatID != nil} + public var hasChatID: Bool {return self._chatID != nil} /// Clears the value of `chatID`. Subsequent reads from it will return its default value. public mutating func clearChatID() {self._chatID = nil} public var messageID: Flipcash_Messaging_V1_MessageId { - get {_messageID ?? Flipcash_Messaging_V1_MessageId()} + get {return _messageID ?? Flipcash_Messaging_V1_MessageId()} set {_messageID = newValue} } /// Returns true if `messageID` has been explicitly set. - public var hasMessageID: Bool {self._messageID != nil} + public var hasMessageID: Bool {return self._messageID != nil} /// Clears the value of `messageID`. Subsequent reads from it will return its default value. public mutating func clearMessageID() {self._messageID = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -69,11 +69,11 @@ public struct Flipcash_Messaging_V1_GetMessageResponse: Sendable { public var result: Flipcash_Messaging_V1_GetMessageResponse.Result = .ok public var message: Flipcash_Messaging_V1_Message { - get {_message ?? Flipcash_Messaging_V1_Message()} + get {return _message ?? Flipcash_Messaging_V1_Message()} set {_message = newValue} } /// Returns true if `message` has been explicitly set. - public var hasMessage: Bool {self._message != nil} + public var hasMessage: Bool {return self._message != nil} /// Clears the value of `message`. Subsequent reads from it will return its default value. public mutating func clearMessage() {self._message = nil} @@ -128,11 +128,11 @@ public struct Flipcash_Messaging_V1_GetMessagesRequest: Sendable { // methods supported on all messages. public var chatID: Flipcash_Common_V1_ChatId { - get {_chatID ?? Flipcash_Common_V1_ChatId()} + get {return _chatID ?? Flipcash_Common_V1_ChatId()} set {_chatID = newValue} } /// Returns true if `chatID` has been explicitly set. - public var hasChatID: Bool {self._chatID != nil} + public var hasChatID: Bool {return self._chatID != nil} /// Clears the value of `chatID`. Subsequent reads from it will return its default value. public mutating func clearChatID() {self._chatID = nil} @@ -155,11 +155,11 @@ public struct Flipcash_Messaging_V1_GetMessagesRequest: Sendable { } public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -185,11 +185,11 @@ public struct Flipcash_Messaging_V1_GetMessagesResponse: Sendable { public var result: Flipcash_Messaging_V1_GetMessagesResponse.Result = .ok public var messages: Flipcash_Messaging_V1_MessageBatch { - get {_messages ?? Flipcash_Messaging_V1_MessageBatch()} + get {return _messages ?? Flipcash_Messaging_V1_MessageBatch()} set {_messages = newValue} } /// Returns true if `messages` has been explicitly set. - public var hasMessages: Bool {self._messages != nil} + public var hasMessages: Bool {return self._messages != nil} /// Clears the value of `messages`. Subsequent reads from it will return its default value. public mutating func clearMessages() {self._messages = nil} @@ -244,11 +244,11 @@ public struct Flipcash_Messaging_V1_GetDeltaRequest: Sendable { // methods supported on all messages. public var chatID: Flipcash_Common_V1_ChatId { - get {_chatID ?? Flipcash_Common_V1_ChatId()} + get {return _chatID ?? Flipcash_Common_V1_ChatId()} set {_chatID = newValue} } /// Returns true if `chatID` has been explicitly set. - public var hasChatID: Bool {self._chatID != nil} + public var hasChatID: Bool {return self._chatID != nil} /// Clears the value of `chatID`. Subsequent reads from it will return its default value. public mutating func clearChatID() {self._chatID = nil} @@ -259,11 +259,11 @@ public struct Flipcash_Messaging_V1_GetDeltaRequest: Sendable { public var afterSequence: UInt64 = 0 public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -294,11 +294,11 @@ public struct Flipcash_Messaging_V1_GetDeltaResponse: Sendable { /// itself requires at least one message, so "no changes" is signaled by /// leaving this field unset, never by an empty batch. public var messages: Flipcash_Messaging_V1_MessageBatch { - get {_messages ?? Flipcash_Messaging_V1_MessageBatch()} + get {return _messages ?? Flipcash_Messaging_V1_MessageBatch()} set {_messages = newValue} } /// Returns true if `messages` has been explicitly set. - public var hasMessages: Bool {self._messages != nil} + public var hasMessages: Bool {return self._messages != nil} /// Clears the value of `messages`. Subsequent reads from it will return its default value. public mutating func clearMessages() {self._messages = nil} @@ -374,11 +374,11 @@ public struct Flipcash_Messaging_V1_SendMessageRequest: Sendable { // methods supported on all messages. public var chatID: Flipcash_Common_V1_ChatId { - get {_chatID ?? Flipcash_Common_V1_ChatId()} + get {return _chatID ?? Flipcash_Common_V1_ChatId()} set {_chatID = newValue} } /// Returns true if `chatID` has been explicitly set. - public var hasChatID: Bool {self._chatID != nil} + public var hasChatID: Bool {return self._chatID != nil} /// Clears the value of `chatID`. Subsequent reads from it will return its default value. public mutating func clearChatID() {self._chatID = nil} @@ -392,20 +392,20 @@ public struct Flipcash_Messaging_V1_SendMessageRequest: Sendable { /// sends and to correlate the optimistic local echo with the server-assigned /// message returned in the response. public var clientMessageID: Flipcash_Messaging_V1_ClientMessageId { - get {_clientMessageID ?? Flipcash_Messaging_V1_ClientMessageId()} + get {return _clientMessageID ?? Flipcash_Messaging_V1_ClientMessageId()} set {_clientMessageID = newValue} } /// Returns true if `clientMessageID` has been explicitly set. - public var hasClientMessageID: Bool {self._clientMessageID != nil} + public var hasClientMessageID: Bool {return self._clientMessageID != nil} /// Clears the value of `clientMessageID`. Subsequent reads from it will return its default value. public mutating func clearClientMessageID() {self._clientMessageID = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -428,11 +428,11 @@ public struct Flipcash_Messaging_V1_SendMessageResponse: Sendable { /// The chat message that was sent if the RPC was succesful, which includes /// server-side metadata like the generated message ID and official timestamp public var message: Flipcash_Messaging_V1_Message { - get {_message ?? Flipcash_Messaging_V1_Message()} + get {return _message ?? Flipcash_Messaging_V1_Message()} set {_message = newValue} } /// Returns true if `message` has been explicitly set. - public var hasMessage: Bool {self._message != nil} + public var hasMessage: Bool {return self._message != nil} /// Clears the value of `message`. Subsequent reads from it will return its default value. public mutating func clearMessage() {self._message = nil} @@ -483,20 +483,20 @@ public struct Flipcash_Messaging_V1_EditMessageRequest: Sendable { // methods supported on all messages. public var chatID: Flipcash_Common_V1_ChatId { - get {_chatID ?? Flipcash_Common_V1_ChatId()} + get {return _chatID ?? Flipcash_Common_V1_ChatId()} set {_chatID = newValue} } /// Returns true if `chatID` has been explicitly set. - public var hasChatID: Bool {self._chatID != nil} + public var hasChatID: Bool {return self._chatID != nil} /// Clears the value of `chatID`. Subsequent reads from it will return its default value. public mutating func clearChatID() {self._chatID = nil} public var messageID: Flipcash_Messaging_V1_MessageId { - get {_messageID ?? Flipcash_Messaging_V1_MessageId()} + get {return _messageID ?? Flipcash_Messaging_V1_MessageId()} set {_messageID = newValue} } /// Returns true if `messageID` has been explicitly set. - public var hasMessageID: Bool {self._messageID != nil} + public var hasMessageID: Bool {return self._messageID != nil} /// Clears the value of `messageID`. Subsequent reads from it will return its default value. public mutating func clearMessageID() {self._messageID = nil} @@ -515,11 +515,11 @@ public struct Flipcash_Messaging_V1_EditMessageRequest: Sendable { public var expectedEventSequence: UInt64 = 0 public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -542,11 +542,11 @@ public struct Flipcash_Messaging_V1_EditMessageResponse: Sendable { /// On OK, the updated materialized message (advanced event_sequence, /// last_edited_ts set). On CONFLICT, the message's current state. public var message: Flipcash_Messaging_V1_Message { - get {_message ?? Flipcash_Messaging_V1_Message()} + get {return _message ?? Flipcash_Messaging_V1_Message()} set {_message = newValue} } /// Returns true if `message` has been explicitly set. - public var hasMessage: Bool {self._message != nil} + public var hasMessage: Bool {return self._message != nil} /// Clears the value of `message`. Subsequent reads from it will return its default value. public mutating func clearMessage() {self._message = nil} @@ -613,20 +613,20 @@ public struct Flipcash_Messaging_V1_DeleteMessageRequest: Sendable { // methods supported on all messages. public var chatID: Flipcash_Common_V1_ChatId { - get {_chatID ?? Flipcash_Common_V1_ChatId()} + get {return _chatID ?? Flipcash_Common_V1_ChatId()} set {_chatID = newValue} } /// Returns true if `chatID` has been explicitly set. - public var hasChatID: Bool {self._chatID != nil} + public var hasChatID: Bool {return self._chatID != nil} /// Clears the value of `chatID`. Subsequent reads from it will return its default value. public mutating func clearChatID() {self._chatID = nil} public var messageID: Flipcash_Messaging_V1_MessageId { - get {_messageID ?? Flipcash_Messaging_V1_MessageId()} + get {return _messageID ?? Flipcash_Messaging_V1_MessageId()} set {_messageID = newValue} } /// Returns true if `messageID` has been explicitly set. - public var hasMessageID: Bool {self._messageID != nil} + public var hasMessageID: Bool {return self._messageID != nil} /// Clears the value of `messageID`. Subsequent reads from it will return its default value. public mutating func clearMessageID() {self._messageID = nil} @@ -639,11 +639,11 @@ public struct Flipcash_Messaging_V1_DeleteMessageRequest: Sendable { public var expectedEventSequence: UInt64 = 0 public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -666,11 +666,11 @@ public struct Flipcash_Messaging_V1_DeleteMessageResponse: Sendable { /// On OK, the tombstoned materialized message (content replaced with /// DeletedContent, event_sequence advanced). On CONFLICT, the current state. public var message: Flipcash_Messaging_V1_Message { - get {_message ?? Flipcash_Messaging_V1_Message()} + get {return _message ?? Flipcash_Messaging_V1_Message()} set {_message = newValue} } /// Returns true if `message` has been explicitly set. - public var hasMessage: Bool {self._message != nil} + public var hasMessage: Bool {return self._message != nil} /// Clears the value of `message`. Subsequent reads from it will return its default value. public mutating func clearMessage() {self._message = nil} @@ -737,39 +737,39 @@ public struct Flipcash_Messaging_V1_AddReactionRequest: Sendable { // methods supported on all messages. public var chatID: Flipcash_Common_V1_ChatId { - get {_chatID ?? Flipcash_Common_V1_ChatId()} + get {return _chatID ?? Flipcash_Common_V1_ChatId()} set {_chatID = newValue} } /// Returns true if `chatID` has been explicitly set. - public var hasChatID: Bool {self._chatID != nil} + public var hasChatID: Bool {return self._chatID != nil} /// Clears the value of `chatID`. Subsequent reads from it will return its default value. public mutating func clearChatID() {self._chatID = nil} public var messageID: Flipcash_Messaging_V1_MessageId { - get {_messageID ?? Flipcash_Messaging_V1_MessageId()} + get {return _messageID ?? Flipcash_Messaging_V1_MessageId()} set {_messageID = newValue} } /// Returns true if `messageID` has been explicitly set. - public var hasMessageID: Bool {self._messageID != nil} + public var hasMessageID: Bool {return self._messageID != nil} /// Clears the value of `messageID`. Subsequent reads from it will return its default value. public mutating func clearMessageID() {self._messageID = nil} /// The emoji to react with. public var emoji: Flipcash_Messaging_V1_Emoji { - get {_emoji ?? Flipcash_Messaging_V1_Emoji()} + get {return _emoji ?? Flipcash_Messaging_V1_Emoji()} set {_emoji = newValue} } /// Returns true if `emoji` has been explicitly set. - public var hasEmoji: Bool {self._emoji != nil} + public var hasEmoji: Bool {return self._emoji != nil} /// Clears the value of `emoji`. Subsequent reads from it will return its default value. public mutating func clearEmoji() {self._emoji = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -792,11 +792,11 @@ public struct Flipcash_Messaging_V1_AddReactionResponse: Sendable { /// The affected emoji's aggregate after the add (count, reacted_by_self true). public var reaction: Flipcash_Messaging_V1_EmojiReaction { - get {_reaction ?? Flipcash_Messaging_V1_EmojiReaction()} + get {return _reaction ?? Flipcash_Messaging_V1_EmojiReaction()} set {_reaction = newValue} } /// Returns true if `reaction` has been explicitly set. - public var hasReaction: Bool {self._reaction != nil} + public var hasReaction: Bool {return self._reaction != nil} /// Clears the value of `reaction`. Subsequent reads from it will return its default value. public mutating func clearReaction() {self._reaction = nil} @@ -862,39 +862,39 @@ public struct Flipcash_Messaging_V1_RemoveReactionRequest: Sendable { // methods supported on all messages. public var chatID: Flipcash_Common_V1_ChatId { - get {_chatID ?? Flipcash_Common_V1_ChatId()} + get {return _chatID ?? Flipcash_Common_V1_ChatId()} set {_chatID = newValue} } /// Returns true if `chatID` has been explicitly set. - public var hasChatID: Bool {self._chatID != nil} + public var hasChatID: Bool {return self._chatID != nil} /// Clears the value of `chatID`. Subsequent reads from it will return its default value. public mutating func clearChatID() {self._chatID = nil} public var messageID: Flipcash_Messaging_V1_MessageId { - get {_messageID ?? Flipcash_Messaging_V1_MessageId()} + get {return _messageID ?? Flipcash_Messaging_V1_MessageId()} set {_messageID = newValue} } /// Returns true if `messageID` has been explicitly set. - public var hasMessageID: Bool {self._messageID != nil} + public var hasMessageID: Bool {return self._messageID != nil} /// Clears the value of `messageID`. Subsequent reads from it will return its default value. public mutating func clearMessageID() {self._messageID = nil} /// The emoji whose reaction to remove for the caller. public var emoji: Flipcash_Messaging_V1_Emoji { - get {_emoji ?? Flipcash_Messaging_V1_Emoji()} + get {return _emoji ?? Flipcash_Messaging_V1_Emoji()} set {_emoji = newValue} } /// Returns true if `emoji` has been explicitly set. - public var hasEmoji: Bool {self._emoji != nil} + public var hasEmoji: Bool {return self._emoji != nil} /// Clears the value of `emoji`. Subsequent reads from it will return its default value. public mutating func clearEmoji() {self._emoji = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -917,11 +917,11 @@ public struct Flipcash_Messaging_V1_RemoveReactionResponse: Sendable { /// The affected emoji's aggregate after the removal public var reaction: Flipcash_Messaging_V1_EmojiReaction { - get {_reaction ?? Flipcash_Messaging_V1_EmojiReaction()} + get {return _reaction ?? Flipcash_Messaging_V1_EmojiReaction()} set {_reaction = newValue} } /// Returns true if `reaction` has been explicitly set. - public var hasReaction: Bool {self._reaction != nil} + public var hasReaction: Bool {return self._reaction != nil} /// Clears the value of `reaction`. Subsequent reads from it will return its default value. public mutating func clearReaction() {self._reaction = nil} @@ -976,30 +976,30 @@ public struct Flipcash_Messaging_V1_GetReactorsRequest: Sendable { // methods supported on all messages. public var chatID: Flipcash_Common_V1_ChatId { - get {_chatID ?? Flipcash_Common_V1_ChatId()} + get {return _chatID ?? Flipcash_Common_V1_ChatId()} set {_chatID = newValue} } /// Returns true if `chatID` has been explicitly set. - public var hasChatID: Bool {self._chatID != nil} + public var hasChatID: Bool {return self._chatID != nil} /// Clears the value of `chatID`. Subsequent reads from it will return its default value. public mutating func clearChatID() {self._chatID = nil} public var messageID: Flipcash_Messaging_V1_MessageId { - get {_messageID ?? Flipcash_Messaging_V1_MessageId()} + get {return _messageID ?? Flipcash_Messaging_V1_MessageId()} set {_messageID = newValue} } /// Returns true if `messageID` has been explicitly set. - public var hasMessageID: Bool {self._messageID != nil} + public var hasMessageID: Bool {return self._messageID != nil} /// Clears the value of `messageID`. Subsequent reads from it will return its default value. public mutating func clearMessageID() {self._messageID = nil} /// The emoji whose reactors to list. public var emoji: Flipcash_Messaging_V1_Emoji { - get {_emoji ?? Flipcash_Messaging_V1_Emoji()} + get {return _emoji ?? Flipcash_Messaging_V1_Emoji()} set {_emoji = newValue} } /// Returns true if `emoji` has been explicitly set. - public var hasEmoji: Bool {self._emoji != nil} + public var hasEmoji: Bool {return self._emoji != nil} /// Clears the value of `emoji`. Subsequent reads from it will return its default value. public mutating func clearEmoji() {self._emoji = nil} @@ -1009,20 +1009,20 @@ public struct Flipcash_Messaging_V1_GetReactorsRequest: Sendable { /// response to advance through the list. The token is opaque and /// server-generated; do not construct it. public var options: Flipcash_Common_V1_QueryOptions { - get {_options ?? Flipcash_Common_V1_QueryOptions()} + get {return _options ?? Flipcash_Common_V1_QueryOptions()} set {_options = newValue} } /// Returns true if `options` has been explicitly set. - public var hasOptions: Bool {self._options != nil} + public var hasOptions: Bool {return self._options != nil} /// Clears the value of `options`. Subsequent reads from it will return its default value. public mutating func clearOptions() {self._options = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -1053,11 +1053,11 @@ public struct Flipcash_Messaging_V1_GetReactorsResponse: Sendable { /// GetReactorsRequest to fetch the following page. Set when result is OK and /// has_more is true. public var pagingToken: Flipcash_Common_V1_PagingToken { - get {_pagingToken ?? Flipcash_Common_V1_PagingToken()} + get {return _pagingToken ?? Flipcash_Common_V1_PagingToken()} set {_pagingToken = newValue} } /// Returns true if `pagingToken` has been explicitly set. - public var hasPagingToken: Bool {self._pagingToken != nil} + public var hasPagingToken: Bool {return self._pagingToken != nil} /// Clears the value of `pagingToken`. Subsequent reads from it will return its default value. public mutating func clearPagingToken() {self._pagingToken = nil} @@ -1117,29 +1117,29 @@ public struct Flipcash_Messaging_V1_GetReactionSummaryRequest: Sendable { // methods supported on all messages. public var chatID: Flipcash_Common_V1_ChatId { - get {_chatID ?? Flipcash_Common_V1_ChatId()} + get {return _chatID ?? Flipcash_Common_V1_ChatId()} set {_chatID = newValue} } /// Returns true if `chatID` has been explicitly set. - public var hasChatID: Bool {self._chatID != nil} + public var hasChatID: Bool {return self._chatID != nil} /// Clears the value of `chatID`. Subsequent reads from it will return its default value. public mutating func clearChatID() {self._chatID = nil} public var messageID: Flipcash_Messaging_V1_MessageId { - get {_messageID ?? Flipcash_Messaging_V1_MessageId()} + get {return _messageID ?? Flipcash_Messaging_V1_MessageId()} set {_messageID = newValue} } /// Returns true if `messageID` has been explicitly set. - public var hasMessageID: Bool {self._messageID != nil} + public var hasMessageID: Bool {return self._messageID != nil} /// Clears the value of `messageID`. Subsequent reads from it will return its default value. public mutating func clearMessageID() {self._messageID = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -1164,11 +1164,11 @@ public struct Flipcash_Messaging_V1_GetReactionSummaryResponse: Sendable { /// EmojiReaction.sequence, so a summary that is slightly behind a live update /// is harmlessly ignored rather than regressing state. public var summary: Flipcash_Messaging_V1_ReactionSummary { - get {_summary ?? Flipcash_Messaging_V1_ReactionSummary()} + get {return _summary ?? Flipcash_Messaging_V1_ReactionSummary()} set {_summary = newValue} } /// Returns true if `summary` has been explicitly set. - public var hasSummary: Bool {self._summary != nil} + public var hasSummary: Bool {return self._summary != nil} /// Clears the value of `summary`. Subsequent reads from it will return its default value. public mutating func clearSummary() {self._summary = nil} @@ -1223,11 +1223,11 @@ public struct Flipcash_Messaging_V1_GetReactionSummariesRequest: Sendable { // methods supported on all messages. public var chatID: Flipcash_Common_V1_ChatId { - get {_chatID ?? Flipcash_Common_V1_ChatId()} + get {return _chatID ?? Flipcash_Common_V1_ChatId()} set {_chatID = newValue} } /// Returns true if `chatID` has been explicitly set. - public var hasChatID: Bool {self._chatID != nil} + public var hasChatID: Bool {return self._chatID != nil} /// Clears the value of `chatID`. Subsequent reads from it will return its default value. public mutating func clearChatID() {self._chatID = nil} @@ -1250,11 +1250,11 @@ public struct Flipcash_Messaging_V1_GetReactionSummariesRequest: Sendable { } public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -1331,31 +1331,31 @@ public struct Flipcash_Messaging_V1_AdvancePointerRequest: Sendable { // methods supported on all messages. public var chatID: Flipcash_Common_V1_ChatId { - get {_chatID ?? Flipcash_Common_V1_ChatId()} + get {return _chatID ?? Flipcash_Common_V1_ChatId()} set {_chatID = newValue} } /// Returns true if `chatID` has been explicitly set. - public var hasChatID: Bool {self._chatID != nil} + public var hasChatID: Bool {return self._chatID != nil} /// Clears the value of `chatID`. Subsequent reads from it will return its default value. public mutating func clearChatID() {self._chatID = nil} public var pointerType: Flipcash_Messaging_V1_Pointer.TypeEnum = .unknown public var newValue: Flipcash_Messaging_V1_MessageId { - get {_newValue ?? Flipcash_Messaging_V1_MessageId()} + get {return _newValue ?? Flipcash_Messaging_V1_MessageId()} set {_newValue = newValue} } /// Returns true if `newValue` has been explicitly set. - public var hasNewValue: Bool {self._newValue != nil} + public var hasNewValue: Bool {return self._newValue != nil} /// Clears the value of `newValue`. Subsequent reads from it will return its default value. public mutating func clearNewValue() {self._newValue = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -1424,22 +1424,22 @@ public struct Flipcash_Messaging_V1_NotifyIsTypingRequest: Sendable { // methods supported on all messages. public var chatID: Flipcash_Common_V1_ChatId { - get {_chatID ?? Flipcash_Common_V1_ChatId()} + get {return _chatID ?? Flipcash_Common_V1_ChatId()} set {_chatID = newValue} } /// Returns true if `chatID` has been explicitly set. - public var hasChatID: Bool {self._chatID != nil} + public var hasChatID: Bool {return self._chatID != nil} /// Clears the value of `chatID`. Subsequent reads from it will return its default value. public mutating func clearChatID() {self._chatID = nil} public var state: Flipcash_Messaging_V1_IsTypingNotification.State = .unknownTypingState public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/iap_v1_iap_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/iap_v1_iap_service.grpc.swift index a67ce1e58..77ddab50c 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/iap_v1_iap_service.grpc.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/iap_v1_iap_service.grpc.swift @@ -15,13 +15,13 @@ import GRPCProtobuf /// Namespace containing generated types for the "flipcash.iap.v1.Iap" service. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) -public enum Flipcash_Iap_V1_Iap: Sendable { +public enum Flipcash_Iap_V1_Iap { /// Service descriptor for the "flipcash.iap.v1.Iap" service. public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.iap.v1.Iap") /// Namespace for method metadata. - public enum Method: Sendable { + public enum Method { /// Namespace for "OnPurchaseCompleted" metadata. - public enum OnPurchaseCompleted: Sendable { + public enum OnPurchaseCompleted { /// Request type for "OnPurchaseCompleted". public typealias Input = Flipcash_Iap_V1_OnPurchaseCompletedRequest /// Response type for "OnPurchaseCompleted". @@ -29,8 +29,7 @@ public enum Flipcash_Iap_V1_Iap: Sendable { /// Descriptor for "OnPurchaseCompleted". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.iap.v1.Iap"), - method: "OnPurchaseCompleted", - type: .unary + method: "OnPurchaseCompleted" ) } /// Descriptors for all methods in the "flipcash.iap.v1.Iap" service. diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/iap_v1_iap_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/iap_v1_iap_service.pb.swift index bbc71a185..50192abcc 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/iap_v1_iap_service.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/iap_v1_iap_service.pb.swift @@ -28,29 +28,29 @@ public struct Flipcash_Iap_V1_OnPurchaseCompletedRequest: Sendable { public var platform: Flipcash_Common_V1_Platform = .unknown public var receipt: Flipcash_Iap_V1_Receipt { - get {_receipt ?? Flipcash_Iap_V1_Receipt()} + get {return _receipt ?? Flipcash_Iap_V1_Receipt()} set {_receipt = newValue} } /// Returns true if `receipt` has been explicitly set. - public var hasReceipt: Bool {self._receipt != nil} + public var hasReceipt: Bool {return self._receipt != nil} /// Clears the value of `receipt`. Subsequent reads from it will return its default value. public mutating func clearReceipt() {self._receipt = nil} public var metadata: Flipcash_Iap_V1_Metadata { - get {_metadata ?? Flipcash_Iap_V1_Metadata()} + get {return _metadata ?? Flipcash_Iap_V1_Metadata()} set {_metadata = newValue} } /// Returns true if `metadata` has been explicitly set. - public var hasMetadata: Bool {self._metadata != nil} + public var hasMetadata: Bool {return self._metadata != nil} /// Clears the value of `metadata`. Subsequent reads from it will return its default value. public mutating func clearMetadata() {self._metadata = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/intent_v1_model.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/intent_v1_model.pb.swift index 26965aef4..93dcf307b 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/intent_v1_model.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/intent_v1_model.pb.swift @@ -52,11 +52,11 @@ public struct Flipcash_Intent_V1_ChatMetadata: Sendable { // methods supported on all messages. public var chatID: Flipcash_Common_V1_ChatId { - get {_chatID ?? Flipcash_Common_V1_ChatId()} + get {return _chatID ?? Flipcash_Common_V1_ChatId()} set {_chatID = newValue} } /// Returns true if `chatID` has been explicitly set. - public var hasChatID: Bool {self._chatID != nil} + public var hasChatID: Bool {return self._chatID != nil} /// Clears the value of `chatID`. Subsequent reads from it will return its default value. public mutating func clearChatID() {self._chatID = nil} @@ -94,21 +94,21 @@ public struct Flipcash_Intent_V1_ChatMetadata: Sendable { /// Source phone number that is paying. This is validated to be linked to the sender. public var source: Flipcash_Phone_V1_PhoneNumber { - get {_source ?? Flipcash_Phone_V1_PhoneNumber()} + get {return _source ?? Flipcash_Phone_V1_PhoneNumber()} set {_source = newValue} } /// Returns true if `source` has been explicitly set. - public var hasSource: Bool {self._source != nil} + public var hasSource: Bool {return self._source != nil} /// Clears the value of `source`. Subsequent reads from it will return its default value. public mutating func clearSource() {self._source = nil} /// Destination phone number that is being paid. This is validated to be linked to the receiver. public var destination: Flipcash_Phone_V1_PhoneNumber { - get {_destination ?? Flipcash_Phone_V1_PhoneNumber()} + get {return _destination ?? Flipcash_Phone_V1_PhoneNumber()} set {_destination = newValue} } /// Returns true if `destination` has been explicitly set. - public var hasDestination: Bool {self._destination != nil} + public var hasDestination: Bool {return self._destination != nil} /// Clears the value of `destination`. Subsequent reads from it will return its default value. public mutating func clearDestination() {self._destination = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/messaging_v1_model.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/messaging_v1_model.pb.swift index c8481629a..2d2c5c35d 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/messaging_v1_model.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/messaging_v1_model.pb.swift @@ -68,22 +68,22 @@ public struct Flipcash_Messaging_V1_Message: Sendable { /// Per-chat sequence number identifying this message public var messageID: Flipcash_Messaging_V1_MessageId { - get {_messageID ?? Flipcash_Messaging_V1_MessageId()} + get {return _messageID ?? Flipcash_Messaging_V1_MessageId()} set {_messageID = newValue} } /// Returns true if `messageID` has been explicitly set. - public var hasMessageID: Bool {self._messageID != nil} + public var hasMessageID: Bool {return self._messageID != nil} /// Clears the value of `messageID`. Subsequent reads from it will return its default value. public mutating func clearMessageID() {self._messageID = nil} /// The chat member that sent the message. For system-level messages, /// this will be ommitted. public var senderID: Flipcash_Common_V1_UserId { - get {_senderID ?? Flipcash_Common_V1_UserId()} + get {return _senderID ?? Flipcash_Common_V1_UserId()} set {_senderID = newValue} } /// Returns true if `senderID` has been explicitly set. - public var hasSenderID: Bool {self._senderID != nil} + public var hasSenderID: Bool {return self._senderID != nil} /// Clears the value of `senderID`. Subsequent reads from it will return its default value. public mutating func clearSenderID() {self._senderID = nil} @@ -92,11 +92,11 @@ public struct Flipcash_Messaging_V1_Message: Sendable { /// Timestamp this message was generated at. public var ts: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_ts ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _ts ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_ts = newValue} } /// Returns true if `ts` has been explicitly set. - public var hasTs: Bool {self._ts != nil} + public var hasTs: Bool {return self._ts != nil} /// Clears the value of `ts`. Subsequent reads from it will return its default value. public mutating func clearTs() {self._ts = nil} @@ -115,11 +115,11 @@ public struct Flipcash_Messaging_V1_Message: Sendable { /// only drives an "edited" affordance. Deletions are represented in content /// via DeletedContent, not here. public var lastEditedTs: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_lastEditedTs ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _lastEditedTs ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_lastEditedTs = newValue} } /// Returns true if `lastEditedTs` has been explicitly set. - public var hasLastEditedTs: Bool {self._lastEditedTs != nil} + public var hasLastEditedTs: Bool {return self._lastEditedTs != nil} /// Clears the value of `lastEditedTs`. Subsequent reads from it will return its default value. public mutating func clearLastEditedTs() {self._lastEditedTs = nil} @@ -143,11 +143,11 @@ public struct Flipcash_Messaging_V1_Message: Sendable { /// clients refresh it on view and via live reaction updates rather than /// through the event log. public var reactions: Flipcash_Messaging_V1_ReactionSummary { - get {_reactions ?? Flipcash_Messaging_V1_ReactionSummary()} + get {return _reactions ?? Flipcash_Messaging_V1_ReactionSummary()} set {_reactions = newValue} } /// Returns true if `reactions` has been explicitly set. - public var hasReactions: Bool {self._reactions != nil} + public var hasReactions: Bool {return self._reactions != nil} /// Clears the value of `reactions`. Subsequent reads from it will return its default value. public mutating func clearReactions() {self._reactions = nil} @@ -254,26 +254,64 @@ public struct Flipcash_Messaging_V1_CashContent: Sendable { /// Intent ID identifying the cash transaction at the OCP layer public var intentID: Flipcash_Common_V1_IntentId { - get {_intentID ?? Flipcash_Common_V1_IntentId()} + get {return _intentID ?? Flipcash_Common_V1_IntentId()} set {_intentID = newValue} } /// Returns true if `intentID` has been explicitly set. - public var hasIntentID: Bool {self._intentID != nil} + public var hasIntentID: Bool {return self._intentID != nil} /// Clears the value of `intentID`. Subsequent reads from it will return its default value. public mutating func clearIntentID() {self._intentID = nil} /// The amount of cash that was sent public var amount: Flipcash_Common_V1_CryptoPaymentAmount { - get {_amount ?? Flipcash_Common_V1_CryptoPaymentAmount()} + get {return _amount ?? Flipcash_Common_V1_CryptoPaymentAmount()} set {_amount = newValue} } /// Returns true if `amount` has been explicitly set. - public var hasAmount: Bool {self._amount != nil} + public var hasAmount: Bool {return self._amount != nil} /// Clears the value of `amount`. Subsequent reads from it will return its default value. public mutating func clearAmount() {self._amount = nil} + public var action: Flipcash_Messaging_V1_CashContent.Action = .sent + public var unknownFields = SwiftProtobuf.UnknownStorage() + /// Action for how the cash was sent. Clietns should always show SENT as a + /// fallback. + public enum Action: SwiftProtobuf.Enum, Swift.CaseIterable { + public typealias RawValue = Int + case sent // = 0 + case tipped // = 1 + case UNRECOGNIZED(Int) + + public init() { + self = .sent + } + + public init?(rawValue: Int) { + switch rawValue { + case 0: self = .sent + case 1: self = .tipped + default: self = .UNRECOGNIZED(rawValue) + } + } + + public var rawValue: Int { + switch self { + case .sent: return 0 + case .tipped: return 1 + case .UNRECOGNIZED(let i): return i + } + } + + // The compiler won't synthesize support with the UNRECOGNIZED case. + public static let allCases: [Flipcash_Messaging_V1_CashContent.Action] = [ + .sent, + .tipped, + ] + + } + public init() {} fileprivate var _intentID: Flipcash_Common_V1_IntentId? = nil @@ -288,11 +326,11 @@ public struct Flipcash_Messaging_V1_ReplyContent: Sendable { /// ID of the message being replied to public var repliedMessageID: Flipcash_Messaging_V1_MessageId { - get {_repliedMessageID ?? Flipcash_Messaging_V1_MessageId()} + get {return _repliedMessageID ?? Flipcash_Messaging_V1_MessageId()} set {_repliedMessageID = newValue} } /// Returns true if `repliedMessageID` has been explicitly set. - public var hasRepliedMessageID: Bool {self._repliedMessageID != nil} + public var hasRepliedMessageID: Bool {return self._repliedMessageID != nil} /// Clears the value of `repliedMessageID`. Subsequent reads from it will return its default value. public mutating func clearRepliedMessageID() {self._repliedMessageID = nil} @@ -325,11 +363,11 @@ public struct Flipcash_Messaging_V1_MediaContent: Sendable { /// Optional caption rendered alongside the media public var caption: Flipcash_Messaging_V1_TextContent { - get {_caption ?? Flipcash_Messaging_V1_TextContent()} + get {return _caption ?? Flipcash_Messaging_V1_TextContent()} set {_caption = newValue} } /// Returns true if `caption` has been explicitly set. - public var hasCaption: Bool {self._caption != nil} + public var hasCaption: Bool {return self._caption != nil} /// Clears the value of `caption`. Subsequent reads from it will return its default value. public mutating func clearCaption() {self._caption = nil} @@ -369,22 +407,22 @@ public struct Flipcash_Messaging_V1_DeletedContent: Sendable { /// analog of Message.last_edited_ts, kept here so all deletion state lives in /// the content rather than as a separate flag on Message. public var deletedTs: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_deletedTs ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _deletedTs ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_deletedTs = newValue} } /// Returns true if `deletedTs` has been explicitly set. - public var hasDeletedTs: Bool {self._deletedTs != nil} + public var hasDeletedTs: Bool {return self._deletedTs != nil} /// Clears the value of `deletedTs`. Subsequent reads from it will return its default value. public mutating func clearDeletedTs() {self._deletedTs = nil} /// When present, the user that deleted the message. If not present, a it is /// a system-level deletion (eg. moderation check). public var deletedBy: Flipcash_Common_V1_UserId { - get {_deletedBy ?? Flipcash_Common_V1_UserId()} + get {return _deletedBy ?? Flipcash_Common_V1_UserId()} set {_deletedBy = newValue} } /// Returns true if `deletedBy` has been explicitly set. - public var hasDeletedBy: Bool {self._deletedBy != nil} + public var hasDeletedBy: Bool {return self._deletedBy != nil} /// Clears the value of `deletedBy`. Subsequent reads from it will return its default value. public mutating func clearDeletedBy() {self._deletedBy = nil} @@ -424,21 +462,21 @@ public struct Flipcash_Messaging_V1_Reactor: Sendable { // methods supported on all messages. public var userID: Flipcash_Common_V1_UserId { - get {_userID ?? Flipcash_Common_V1_UserId()} + get {return _userID ?? Flipcash_Common_V1_UserId()} set {_userID = newValue} } /// Returns true if `userID` has been explicitly set. - public var hasUserID: Bool {self._userID != nil} + public var hasUserID: Bool {return self._userID != nil} /// Clears the value of `userID`. Subsequent reads from it will return its default value. public mutating func clearUserID() {self._userID = nil} /// Timestamp the user added this reaction. public var reactedTs: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_reactedTs ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _reactedTs ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_reactedTs = newValue} } /// Returns true if `reactedTs` has been explicitly set. - public var hasReactedTs: Bool {self._reactedTs != nil} + public var hasReactedTs: Bool {return self._reactedTs != nil} /// Clears the value of `reactedTs`. Subsequent reads from it will return its default value. public mutating func clearReactedTs() {self._reactedTs = nil} @@ -461,11 +499,11 @@ public struct Flipcash_Messaging_V1_ReactionSummary: Sendable { /// The message these reactions belong to. public var messageID: Flipcash_Messaging_V1_MessageId { - get {_messageID ?? Flipcash_Messaging_V1_MessageId()} + get {return _messageID ?? Flipcash_Messaging_V1_MessageId()} set {_messageID = newValue} } /// Returns true if `messageID` has been explicitly set. - public var hasMessageID: Bool {self._messageID != nil} + public var hasMessageID: Bool {return self._messageID != nil} /// Clears the value of `messageID`. Subsequent reads from it will return its default value. public mutating func clearMessageID() {self._messageID = nil} @@ -487,11 +525,11 @@ public struct Flipcash_Messaging_V1_EmojiReaction: Sendable { /// The emoji reacted with. public var emoji: Flipcash_Messaging_V1_Emoji { - get {_emoji ?? Flipcash_Messaging_V1_Emoji()} + get {return _emoji ?? Flipcash_Messaging_V1_Emoji()} set {_emoji = newValue} } /// Returns true if `emoji` has been explicitly set. - public var hasEmoji: Bool {self._emoji != nil} + public var hasEmoji: Bool {return self._emoji != nil} /// Clears the value of `emoji`. Subsequent reads from it will return its default value. public mutating func clearEmoji() {self._emoji = nil} @@ -538,21 +576,21 @@ public struct Flipcash_Messaging_V1_ReactionUpdate: Sendable { /// The message whose reactions changed. public var messageID: Flipcash_Messaging_V1_MessageId { - get {_messageID ?? Flipcash_Messaging_V1_MessageId()} + get {return _messageID ?? Flipcash_Messaging_V1_MessageId()} set {_messageID = newValue} } /// Returns true if `messageID` has been explicitly set. - public var hasMessageID: Bool {self._messageID != nil} + public var hasMessageID: Bool {return self._messageID != nil} /// Clears the value of `messageID`. Subsequent reads from it will return its default value. public mutating func clearMessageID() {self._messageID = nil} /// The emoji that was added or removed. public var emoji: Flipcash_Messaging_V1_Emoji { - get {_emoji ?? Flipcash_Messaging_V1_Emoji()} + get {return _emoji ?? Flipcash_Messaging_V1_Emoji()} set {_emoji = newValue} } /// Returns true if `emoji` has been explicitly set. - public var hasEmoji: Bool {self._emoji != nil} + public var hasEmoji: Bool {return self._emoji != nil} /// Clears the value of `emoji`. Subsequent reads from it will return its default value. public mutating func clearEmoji() {self._emoji = nil} @@ -560,11 +598,11 @@ public struct Flipcash_Messaging_V1_ReactionUpdate: Sendable { /// reacted_by_self by comparing this to itself, so a reaction made on the /// user's other device is reflected. public var actor: Flipcash_Common_V1_UserId { - get {_actor ?? Flipcash_Common_V1_UserId()} + get {return _actor ?? Flipcash_Common_V1_UserId()} set {_actor = newValue} } /// Returns true if `actor` has been explicitly set. - public var hasActor: Bool {self._actor != nil} + public var hasActor: Bool {return self._actor != nil} /// Clears the value of `actor`. Subsequent reads from it will return its default value. public mutating func clearActor() {self._actor = nil} @@ -585,11 +623,11 @@ public struct Flipcash_Messaging_V1_ReactionUpdate: Sendable { /// for REMOVED. This is a display timestamp, distinct from `sequence`, which /// is the ordering key. public var reactedTs: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_reactedTs ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _reactedTs ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_reactedTs = newValue} } /// Returns true if `reactedTs` has been explicitly set. - public var hasReactedTs: Bool {self._reactedTs != nil} + public var hasReactedTs: Bool {return self._reactedTs != nil} /// Clears the value of `reactedTs`. Subsequent reads from it will return its default value. public mutating func clearReactedTs() {self._reactedTs = nil} @@ -667,32 +705,32 @@ public struct Flipcash_Messaging_V1_Pointer: Sendable { /// The user ID associated with the pointer public var userID: Flipcash_Common_V1_UserId { - get {_userID ?? Flipcash_Common_V1_UserId()} + get {return _userID ?? Flipcash_Common_V1_UserId()} set {_userID = newValue} } /// Returns true if `userID` has been explicitly set. - public var hasUserID: Bool {self._userID != nil} + public var hasUserID: Bool {return self._userID != nil} /// Clears the value of `userID`. Subsequent reads from it will return its default value. public mutating func clearUserID() {self._userID = nil} /// Everything at or before this message ID is considered to have the state /// inferred by the type of pointer. public var value: Flipcash_Messaging_V1_MessageId { - get {_value ?? Flipcash_Messaging_V1_MessageId()} + get {return _value ?? Flipcash_Messaging_V1_MessageId()} set {_value = newValue} } /// Returns true if `value` has been explicitly set. - public var hasValue: Bool {self._value != nil} + public var hasValue: Bool {return self._value != nil} /// Clears the value of `value`. Subsequent reads from it will return its default value. public mutating func clearValue() {self._value = nil} /// Timestamp the pointer was last advanced at public var ts: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_ts ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _ts ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_ts = newValue} } /// Returns true if `ts` has been explicitly set. - public var hasTs: Bool {self._ts != nil} + public var hasTs: Bool {return self._ts != nil} /// Clears the value of `ts`. Subsequent reads from it will return its default value. public mutating func clearTs() {self._ts = nil} @@ -817,11 +855,11 @@ public struct Flipcash_Messaging_V1_Event: Sendable { /// Timestamp this event occurred at. public var ts: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_ts ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _ts ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_ts = newValue} } /// Returns true if `ts` has been explicitly set. - public var hasTs: Bool {self._ts != nil} + public var hasTs: Bool {return self._ts != nil} /// Clears the value of `ts`. Subsequent reads from it will return its default value. public mutating func clearTs() {self._ts = nil} @@ -914,11 +952,11 @@ public struct Flipcash_Messaging_V1_IsTypingNotification: Sendable { // methods supported on all messages. public var userID: Flipcash_Common_V1_UserId { - get {_userID ?? Flipcash_Common_V1_UserId()} + get {return _userID ?? Flipcash_Common_V1_UserId()} set {_userID = newValue} } /// Returns true if `userID` has been explicitly set. - public var hasUserID: Bool {self._userID != nil} + public var hasUserID: Bool {return self._userID != nil} /// Clears the value of `userID`. Subsequent reads from it will return its default value. public mutating func clearUserID() {self._userID = nil} @@ -1289,7 +1327,7 @@ extension Flipcash_Messaging_V1_TextContent: SwiftProtobuf.Message, SwiftProtobu extension Flipcash_Messaging_V1_CashContent: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".CashContent" - public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}intent_id\0\u{1}amount\0\u{c}\u{3}\u{1}") + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}intent_id\0\u{1}amount\0\u{2}\u{2}action\0\u{c}\u{3}\u{1}") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1299,6 +1337,7 @@ extension Flipcash_Messaging_V1_CashContent: SwiftProtobuf.Message, SwiftProtobu switch fieldNumber { case 1: try { try decoder.decodeSingularMessageField(value: &self._intentID) }() case 2: try { try decoder.decodeSingularMessageField(value: &self._amount) }() + case 4: try { try decoder.decodeSingularEnumField(value: &self.action) }() default: break } } @@ -1315,17 +1354,25 @@ extension Flipcash_Messaging_V1_CashContent: SwiftProtobuf.Message, SwiftProtobu try { if let v = self._amount { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) } }() + if self.action != .sent { + try visitor.visitSingularEnumField(value: self.action, fieldNumber: 4) + } try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Flipcash_Messaging_V1_CashContent, rhs: Flipcash_Messaging_V1_CashContent) -> Bool { if lhs._intentID != rhs._intentID {return false} if lhs._amount != rhs._amount {return false} + if lhs.action != rhs.action {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } +extension Flipcash_Messaging_V1_CashContent.Action: SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0SENT\0\u{1}TIPPED\0") +} + extension Flipcash_Messaging_V1_ReplyContent: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".ReplyContent" public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}replied_message_id\0\u{1}content\0") diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/moderation_v1_model.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/moderation_v1_model.pb.swift index c1520818c..e52d04ee1 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/moderation_v1_model.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/moderation_v1_model.pb.swift @@ -85,41 +85,41 @@ public struct Flipcash_Moderation_V1_ModerationAttestation: Sendable { /// Timestamp of the moderation public var timestamp: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_timestamp = newValue} } /// Returns true if `timestamp` has been explicitly set. - public var hasTimestamp: Bool {self._timestamp != nil} + public var hasTimestamp: Bool {return self._timestamp != nil} /// Clears the value of `timestamp`. Subsequent reads from it will return its default value. public mutating func clearTimestamp() {self._timestamp = nil} /// The user who submitted the content public var userID: Flipcash_Common_V1_UserId { - get {_userID ?? Flipcash_Common_V1_UserId()} + get {return _userID ?? Flipcash_Common_V1_UserId()} set {_userID = newValue} } /// Returns true if `userID` has been explicitly set. - public var hasUserID: Bool {self._userID != nil} + public var hasUserID: Bool {return self._userID != nil} /// Clears the value of `userID`. Subsequent reads from it will return its default value. public mutating func clearUserID() {self._userID = nil} /// Public key of the attestor that signed this message public var attestor: Flipcash_Common_V1_PublicKey { - get {_attestor ?? Flipcash_Common_V1_PublicKey()} + get {return _attestor ?? Flipcash_Common_V1_PublicKey()} set {_attestor = newValue} } /// Returns true if `attestor` has been explicitly set. - public var hasAttestor: Bool {self._attestor != nil} + public var hasAttestor: Bool {return self._attestor != nil} /// Clears the value of `attestor`. Subsequent reads from it will return its default value. public mutating func clearAttestor() {self._attestor = nil} /// Attestor signature over this message public var signature: Flipcash_Common_V1_Signature { - get {_signature ?? Flipcash_Common_V1_Signature()} + get {return _signature ?? Flipcash_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/moderation_v1_moderation_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/moderation_v1_moderation_service.grpc.swift index 9048bd96a..343f59cbd 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/moderation_v1_moderation_service.grpc.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/moderation_v1_moderation_service.grpc.swift @@ -15,13 +15,13 @@ import GRPCProtobuf /// Namespace containing generated types for the "flipcash.moderation.v1.Moderation" service. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) -public enum Flipcash_Moderation_V1_Moderation: Sendable { +public enum Flipcash_Moderation_V1_Moderation { /// Service descriptor for the "flipcash.moderation.v1.Moderation" service. public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.moderation.v1.Moderation") /// Namespace for method metadata. - public enum Method: Sendable { + public enum Method { /// Namespace for "ModerateText" metadata. - public enum ModerateText: Sendable { + public enum ModerateText { /// Request type for "ModerateText". public typealias Input = Flipcash_Moderation_V1_ModerateTextRequest /// Response type for "ModerateText". @@ -29,12 +29,11 @@ public enum Flipcash_Moderation_V1_Moderation: Sendable { /// Descriptor for "ModerateText". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.moderation.v1.Moderation"), - method: "ModerateText", - type: .unary + method: "ModerateText" ) } /// Namespace for "ModerateImage" metadata. - public enum ModerateImage: Sendable { + public enum ModerateImage { /// Request type for "ModerateImage". public typealias Input = Flipcash_Moderation_V1_ModerateImageRequest /// Response type for "ModerateImage". @@ -42,8 +41,7 @@ public enum Flipcash_Moderation_V1_Moderation: Sendable { /// Descriptor for "ModerateImage". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.moderation.v1.Moderation"), - method: "ModerateImage", - type: .unary + method: "ModerateImage" ) } /// Descriptors for all methods in the "flipcash.moderation.v1.Moderation" service. diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/moderation_v1_moderation_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/moderation_v1_moderation_service.pb.swift index 3cb1faaf8..c62006de6 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/moderation_v1_moderation_service.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/moderation_v1_moderation_service.pb.swift @@ -30,11 +30,11 @@ public struct Flipcash_Moderation_V1_ModerateTextRequest: Sendable { public var text: String = String() public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -57,11 +57,11 @@ public struct Flipcash_Moderation_V1_ModerateTextResponse: Sendable { /// Signed attestation of the moderation result when content is allowed public var attestation: Flipcash_Moderation_V1_ModerationAttestation { - get {_attestation ?? Flipcash_Moderation_V1_ModerationAttestation()} + get {return _attestation ?? Flipcash_Moderation_V1_ModerationAttestation()} set {_attestation = newValue} } /// Returns true if `attestation` has been explicitly set. - public var hasAttestation: Bool {self._attestation != nil} + public var hasAttestation: Bool {return self._attestation != nil} /// Clears the value of `attestation`. Subsequent reads from it will return its default value. public mutating func clearAttestation() {self._attestation = nil} @@ -122,11 +122,11 @@ public struct Flipcash_Moderation_V1_ModerateImageRequest: Sendable { public var imageData: Data = Data() public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -149,11 +149,11 @@ public struct Flipcash_Moderation_V1_ModerateImageResponse: Sendable { /// Signed attestation of the moderation result when content is allowed public var attestation: Flipcash_Moderation_V1_ModerationAttestation { - get {_attestation ?? Flipcash_Moderation_V1_ModerationAttestation()} + get {return _attestation ?? Flipcash_Moderation_V1_ModerationAttestation()} set {_attestation = newValue} } /// Returns true if `attestation` has been explicitly set. - public var hasAttestation: Bool {self._attestation != nil} + public var hasAttestation: Bool {return self._attestation != nil} /// Clears the value of `attestation`. Subsequent reads from it will return its default value. public mutating func clearAttestation() {self._attestation = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/phone_v1_phone_verification_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/phone_v1_phone_verification_service.grpc.swift index 7aeecae04..79d30dc69 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/phone_v1_phone_verification_service.grpc.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/phone_v1_phone_verification_service.grpc.swift @@ -15,13 +15,13 @@ import GRPCProtobuf /// Namespace containing generated types for the "flipcash.phone.v1.PhoneVerification" service. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) -public enum Flipcash_Phone_V1_PhoneVerification: Sendable { +public enum Flipcash_Phone_V1_PhoneVerification { /// Service descriptor for the "flipcash.phone.v1.PhoneVerification" service. public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.phone.v1.PhoneVerification") /// Namespace for method metadata. - public enum Method: Sendable { + public enum Method { /// Namespace for "SendVerificationCode" metadata. - public enum SendVerificationCode: Sendable { + public enum SendVerificationCode { /// Request type for "SendVerificationCode". public typealias Input = Flipcash_Phone_V1_SendVerificationCodeRequest /// Response type for "SendVerificationCode". @@ -29,12 +29,11 @@ public enum Flipcash_Phone_V1_PhoneVerification: Sendable { /// Descriptor for "SendVerificationCode". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.phone.v1.PhoneVerification"), - method: "SendVerificationCode", - type: .unary + method: "SendVerificationCode" ) } /// Namespace for "CheckVerificationCode" metadata. - public enum CheckVerificationCode: Sendable { + public enum CheckVerificationCode { /// Request type for "CheckVerificationCode". public typealias Input = Flipcash_Phone_V1_CheckVerificationCodeRequest /// Response type for "CheckVerificationCode". @@ -42,12 +41,11 @@ public enum Flipcash_Phone_V1_PhoneVerification: Sendable { /// Descriptor for "CheckVerificationCode". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.phone.v1.PhoneVerification"), - method: "CheckVerificationCode", - type: .unary + method: "CheckVerificationCode" ) } /// Namespace for "Unlink" metadata. - public enum Unlink: Sendable { + public enum Unlink { /// Request type for "Unlink". public typealias Input = Flipcash_Phone_V1_UnlinkRequest /// Response type for "Unlink". @@ -55,12 +53,11 @@ public enum Flipcash_Phone_V1_PhoneVerification: Sendable { /// Descriptor for "Unlink". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.phone.v1.PhoneVerification"), - method: "Unlink", - type: .unary + method: "Unlink" ) } /// Namespace for "LinkForPayment" metadata. - public enum LinkForPayment: Sendable { + public enum LinkForPayment { /// Request type for "LinkForPayment". public typealias Input = Flipcash_Phone_V1_LinkForPaymentRequest /// Response type for "LinkForPayment". @@ -68,8 +65,7 @@ public enum Flipcash_Phone_V1_PhoneVerification: Sendable { /// Descriptor for "LinkForPayment". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.phone.v1.PhoneVerification"), - method: "LinkForPayment", - type: .unary + method: "LinkForPayment" ) } /// Descriptors for all methods in the "flipcash.phone.v1.PhoneVerification" service. diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/phone_v1_phone_verification_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/phone_v1_phone_verification_service.pb.swift index dffb2abaa..ded7320cf 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/phone_v1_phone_verification_service.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/phone_v1_phone_verification_service.pb.swift @@ -27,11 +27,11 @@ public struct Flipcash_Phone_V1_SendVerificationCodeRequest: Sendable { /// The phone number to send a verification code over SMS to public var phoneNumber: Flipcash_Phone_V1_PhoneNumber { - get {_phoneNumber ?? Flipcash_Phone_V1_PhoneNumber()} + get {return _phoneNumber ?? Flipcash_Phone_V1_PhoneNumber()} set {_phoneNumber = newValue} } /// Returns true if `phoneNumber` has been explicitly set. - public var hasPhoneNumber: Bool {self._phoneNumber != nil} + public var hasPhoneNumber: Bool {return self._phoneNumber != nil} /// Clears the value of `phoneNumber`. Subsequent reads from it will return its default value. public mutating func clearPhoneNumber() {self._phoneNumber = nil} @@ -39,11 +39,11 @@ public struct Flipcash_Phone_V1_SendVerificationCodeRequest: Sendable { public var platform: Flipcash_Common_V1_Platform = .unknown public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -129,30 +129,30 @@ public struct Flipcash_Phone_V1_CheckVerificationCodeRequest: Sendable { /// The phone number being verified public var phoneNumber: Flipcash_Phone_V1_PhoneNumber { - get {_phoneNumber ?? Flipcash_Phone_V1_PhoneNumber()} + get {return _phoneNumber ?? Flipcash_Phone_V1_PhoneNumber()} set {_phoneNumber = newValue} } /// Returns true if `phoneNumber` has been explicitly set. - public var hasPhoneNumber: Bool {self._phoneNumber != nil} + public var hasPhoneNumber: Bool {return self._phoneNumber != nil} /// Clears the value of `phoneNumber`. Subsequent reads from it will return its default value. public mutating func clearPhoneNumber() {self._phoneNumber = nil} /// The verification code received via SMS public var code: Flipcash_Phone_V1_VerificationCode { - get {_code ?? Flipcash_Phone_V1_VerificationCode()} + get {return _code ?? Flipcash_Phone_V1_VerificationCode()} set {_code = newValue} } /// Returns true if `code` has been explicitly set. - public var hasCode: Bool {self._code != nil} + public var hasCode: Bool {return self._code != nil} /// Clears the value of `code`. Subsequent reads from it will return its default value. public mutating func clearCode() {self._code = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -242,20 +242,20 @@ public struct Flipcash_Phone_V1_UnlinkRequest: Sendable { /// The phone number to unlink public var phoneNumber: Flipcash_Phone_V1_PhoneNumber { - get {_phoneNumber ?? Flipcash_Phone_V1_PhoneNumber()} + get {return _phoneNumber ?? Flipcash_Phone_V1_PhoneNumber()} set {_phoneNumber = newValue} } /// Returns true if `phoneNumber` has been explicitly set. - public var hasPhoneNumber: Bool {self._phoneNumber != nil} + public var hasPhoneNumber: Bool {return self._phoneNumber != nil} /// Clears the value of `phoneNumber`. Subsequent reads from it will return its default value. public mutating func clearPhoneNumber() {self._phoneNumber = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -320,20 +320,20 @@ public struct Flipcash_Phone_V1_LinkForPaymentRequest: Sendable { /// The phone number to link for payment public var phoneNumber: Flipcash_Phone_V1_PhoneNumber { - get {_phoneNumber ?? Flipcash_Phone_V1_PhoneNumber()} + get {return _phoneNumber ?? Flipcash_Phone_V1_PhoneNumber()} set {_phoneNumber = newValue} } /// Returns true if `phoneNumber` has been explicitly set. - public var hasPhoneNumber: Bool {self._phoneNumber != nil} + public var hasPhoneNumber: Bool {return self._phoneNumber != nil} /// Clears the value of `phoneNumber`. Subsequent reads from it will return its default value. public mutating func clearPhoneNumber() {self._phoneNumber = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/profile_v1_model.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/profile_v1_model.pb.swift index cf3505427..59107bcd1 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/profile_v1_model.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/profile_v1_model.pb.swift @@ -34,22 +34,22 @@ public struct Flipcash_Profile_V1_UserProfile: Sendable { /// Phone number linked to this user. This is private and will only be returned /// when the requesting user asks for their own profile public var phoneNumber: Flipcash_Phone_V1_PhoneNumber { - get {_phoneNumber ?? Flipcash_Phone_V1_PhoneNumber()} + get {return _phoneNumber ?? Flipcash_Phone_V1_PhoneNumber()} set {_phoneNumber = newValue} } /// Returns true if `phoneNumber` has been explicitly set. - public var hasPhoneNumber: Bool {self._phoneNumber != nil} + public var hasPhoneNumber: Bool {return self._phoneNumber != nil} /// Clears the value of `phoneNumber`. Subsequent reads from it will return its default value. public mutating func clearPhoneNumber() {self._phoneNumber = nil} /// Email address linked to this user. This is private and will only be returned /// when the requesting user asks for their own profile public var emailAddress: Flipcash_Email_V1_EmailAddress { - get {_emailAddress ?? Flipcash_Email_V1_EmailAddress()} + get {return _emailAddress ?? Flipcash_Email_V1_EmailAddress()} set {_emailAddress = newValue} } /// Returns true if `emailAddress` has been explicitly set. - public var hasEmailAddress: Bool {self._emailAddress != nil} + public var hasEmailAddress: Bool {return self._emailAddress != nil} /// Clears the value of `emailAddress`. Subsequent reads from it will return its default value. public mutating func clearEmailAddress() {self._emailAddress = nil} @@ -63,11 +63,11 @@ public struct Flipcash_Profile_V1_UserProfile: Sendable { /// these blobs, so a GetBlobs call must carry a blob.v1.AccessContext whose /// `profile` scope names this user. A caller reading its own needs none. public var profilePicture: Flipcash_Blob_V1_Media { - get {_profilePicture ?? Flipcash_Blob_V1_Media()} + get {return _profilePicture ?? Flipcash_Blob_V1_Media()} set {_profilePicture = newValue} } /// Returns true if `profilePicture` has been explicitly set. - public var hasProfilePicture: Bool {self._profilePicture != nil} + public var hasProfilePicture: Bool {return self._profilePicture != nil} /// Clears the value of `profilePicture`. Subsequent reads from it will return its default value. public mutating func clearProfilePicture() {self._profilePicture = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/profile_v1_profile_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/profile_v1_profile_service.grpc.swift index 966d3ebd4..c3dcab4ea 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/profile_v1_profile_service.grpc.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/profile_v1_profile_service.grpc.swift @@ -15,13 +15,13 @@ import GRPCProtobuf /// Namespace containing generated types for the "flipcash.profile.v1.Profile" service. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) -public enum Flipcash_Profile_V1_Profile: Sendable { +public enum Flipcash_Profile_V1_Profile { /// Service descriptor for the "flipcash.profile.v1.Profile" service. public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.profile.v1.Profile") /// Namespace for method metadata. - public enum Method: Sendable { + public enum Method { /// Namespace for "GetProfile" metadata. - public enum GetProfile: Sendable { + public enum GetProfile { /// Request type for "GetProfile". public typealias Input = Flipcash_Profile_V1_GetProfileRequest /// Response type for "GetProfile". @@ -29,12 +29,11 @@ public enum Flipcash_Profile_V1_Profile: Sendable { /// Descriptor for "GetProfile". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.profile.v1.Profile"), - method: "GetProfile", - type: .unary + method: "GetProfile" ) } /// Namespace for "SetDisplayName" metadata. - public enum SetDisplayName: Sendable { + public enum SetDisplayName { /// Request type for "SetDisplayName". public typealias Input = Flipcash_Profile_V1_SetDisplayNameRequest /// Response type for "SetDisplayName". @@ -42,12 +41,11 @@ public enum Flipcash_Profile_V1_Profile: Sendable { /// Descriptor for "SetDisplayName". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.profile.v1.Profile"), - method: "SetDisplayName", - type: .unary + method: "SetDisplayName" ) } /// Namespace for "SetProfilePicture" metadata. - public enum SetProfilePicture: Sendable { + public enum SetProfilePicture { /// Request type for "SetProfilePicture". public typealias Input = Flipcash_Profile_V1_SetProfilePictureRequest /// Response type for "SetProfilePicture". @@ -55,12 +53,11 @@ public enum Flipcash_Profile_V1_Profile: Sendable { /// Descriptor for "SetProfilePicture". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.profile.v1.Profile"), - method: "SetProfilePicture", - type: .unary + method: "SetProfilePicture" ) } /// Namespace for "LinkSocialAccount" metadata. - public enum LinkSocialAccount: Sendable { + public enum LinkSocialAccount { /// Request type for "LinkSocialAccount". public typealias Input = Flipcash_Profile_V1_LinkSocialAccountRequest /// Response type for "LinkSocialAccount". @@ -68,12 +65,11 @@ public enum Flipcash_Profile_V1_Profile: Sendable { /// Descriptor for "LinkSocialAccount". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.profile.v1.Profile"), - method: "LinkSocialAccount", - type: .unary + method: "LinkSocialAccount" ) } /// Namespace for "UnlinkSocialAccount" metadata. - public enum UnlinkSocialAccount: Sendable { + public enum UnlinkSocialAccount { /// Request type for "UnlinkSocialAccount". public typealias Input = Flipcash_Profile_V1_UnlinkSocialAccountRequest /// Response type for "UnlinkSocialAccount". @@ -81,8 +77,7 @@ public enum Flipcash_Profile_V1_Profile: Sendable { /// Descriptor for "UnlinkSocialAccount". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.profile.v1.Profile"), - method: "UnlinkSocialAccount", - type: .unary + method: "UnlinkSocialAccount" ) } /// Descriptors for all methods in the "flipcash.profile.v1.Profile" service. diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/profile_v1_profile_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/profile_v1_profile_service.pb.swift index 81c1e8d99..3424dd212 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/profile_v1_profile_service.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/profile_v1_profile_service.pb.swift @@ -26,21 +26,21 @@ public struct Flipcash_Profile_V1_GetProfileRequest: Sendable { // methods supported on all messages. public var userID: Flipcash_Common_V1_UserId { - get {_userID ?? Flipcash_Common_V1_UserId()} + get {return _userID ?? Flipcash_Common_V1_UserId()} set {_userID = newValue} } /// Returns true if `userID` has been explicitly set. - public var hasUserID: Bool {self._userID != nil} + public var hasUserID: Bool {return self._userID != nil} /// Clears the value of `userID`. Subsequent reads from it will return its default value. public mutating func clearUserID() {self._userID = nil} /// Optional auth to retrieve private profile information for self public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -64,11 +64,11 @@ public struct Flipcash_Profile_V1_GetProfileResponse: Sendable { /// Some fields may or may not be set, depending on the scope of request /// in the future. public var userProfile: Flipcash_Profile_V1_UserProfile { - get {_userProfile ?? Flipcash_Profile_V1_UserProfile()} + get {return _userProfile ?? Flipcash_Profile_V1_UserProfile()} set {_userProfile = newValue} } /// Returns true if `userProfile` has been explicitly set. - public var hasUserProfile: Bool {self._userProfile != nil} + public var hasUserProfile: Bool {return self._userProfile != nil} /// Clears the value of `userProfile`. Subsequent reads from it will return its default value. public mutating func clearUserProfile() {self._userProfile = nil} @@ -122,11 +122,11 @@ public struct Flipcash_Profile_V1_SetDisplayNameRequest: Sendable { public var displayName: String = String() public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -205,20 +205,20 @@ public struct Flipcash_Profile_V1_SetProfilePictureRequest: Sendable { /// by the caller and READY; the server derives the remaining renditions from /// it. A blob may back at most one profile picture — reuse is not implied. public var blobID: Flipcash_Blob_V1_BlobId { - get {_blobID ?? Flipcash_Blob_V1_BlobId()} + get {return _blobID ?? Flipcash_Blob_V1_BlobId()} set {_blobID = newValue} } /// Returns true if `blobID` has been explicitly set. - public var hasBlobID: Bool {self._blobID != nil} + public var hasBlobID: Bool {return self._blobID != nil} /// Clears the value of `blobID`. Subsequent reads from it will return its default value. public mutating func clearBlobID() {self._blobID = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -240,11 +240,11 @@ public struct Flipcash_Profile_V1_SetProfilePictureResponse: Sendable { /// The caller's new profile picture, including the renditions the server /// derived. Set only when result == OK. public var profilePicture: Flipcash_Blob_V1_Media { - get {_profilePicture ?? Flipcash_Blob_V1_Media()} + get {return _profilePicture ?? Flipcash_Blob_V1_Media()} set {_profilePicture = newValue} } /// Returns true if `profilePicture` has been explicitly set. - public var hasProfilePicture: Bool {self._profilePicture != nil} + public var hasProfilePicture: Bool {return self._profilePicture != nil} /// Clears the value of `profilePicture`. Subsequent reads from it will return its default value. public mutating func clearProfilePicture() {self._profilePicture = nil} @@ -319,20 +319,20 @@ public struct Flipcash_Profile_V1_LinkSocialAccountRequest: Sendable { // methods supported on all messages. public var linkingToken: Flipcash_Profile_V1_LinkSocialAccountRequest.LinkingToken { - get {_linkingToken ?? Flipcash_Profile_V1_LinkSocialAccountRequest.LinkingToken()} + get {return _linkingToken ?? Flipcash_Profile_V1_LinkSocialAccountRequest.LinkingToken()} set {_linkingToken = newValue} } /// Returns true if `linkingToken` has been explicitly set. - public var hasLinkingToken: Bool {self._linkingToken != nil} + public var hasLinkingToken: Bool {return self._linkingToken != nil} /// Clears the value of `linkingToken`. Subsequent reads from it will return its default value. public mutating func clearLinkingToken() {self._linkingToken = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -390,11 +390,11 @@ public struct Flipcash_Profile_V1_LinkSocialAccountResponse: Sendable { public var result: Flipcash_Profile_V1_LinkSocialAccountResponse.Result = .ok public var socialProfile: Flipcash_Profile_V1_SocialProfile { - get {_socialProfile ?? Flipcash_Profile_V1_SocialProfile()} + get {return _socialProfile ?? Flipcash_Profile_V1_SocialProfile()} set {_socialProfile = newValue} } /// Returns true if `socialProfile` has been explicitly set. - public var hasSocialProfile: Bool {self._socialProfile != nil} + public var hasSocialProfile: Bool {return self._socialProfile != nil} /// Clears the value of `socialProfile`. Subsequent reads from it will return its default value. public mutating func clearSocialProfile() {self._socialProfile = nil} @@ -463,11 +463,11 @@ public struct Flipcash_Profile_V1_UnlinkSocialAccountRequest: Sendable { } public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/push_v1_model.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/push_v1_model.pb.swift index 24e225512..03bdd6cdf 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/push_v1_model.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/push_v1_model.pb.swift @@ -70,11 +70,11 @@ public struct Flipcash_Push_V1_Payload: Sendable { /// If present, where the app should navigate to after clicking the push public var navigation: Flipcash_Push_V1_Navigation { - get {_navigation ?? Flipcash_Push_V1_Navigation()} + get {return _navigation ?? Flipcash_Push_V1_Navigation()} set {_navigation = newValue} } /// Returns true if `navigation` has been explicitly set. - public var hasNavigation: Bool {self._navigation != nil} + public var hasNavigation: Bool {return self._navigation != nil} /// Clears the value of `navigation`. Subsequent reads from it will return its default value. public mutating func clearNavigation() {self._navigation = nil} @@ -91,6 +91,15 @@ public struct Flipcash_Push_V1_Payload: Sendable { /// is applied. public var groupKey: String = String() + public var chatMetadata: Flipcash_Push_V1_ChatMetadata { + get {return _chatMetadata ?? Flipcash_Push_V1_ChatMetadata()} + set {_chatMetadata = newValue} + } + /// Returns true if `chatMetadata` has been explicitly set. + public var hasChatMetadata: Bool {return self._chatMetadata != nil} + /// Clears the value of `chatMetadata`. Subsequent reads from it will return its default value. + public mutating func clearChatMetadata() {self._chatMetadata = nil} + public var unknownFields = SwiftProtobuf.UnknownStorage() public enum Category: SwiftProtobuf.Enum, Swift.CaseIterable { @@ -146,6 +155,7 @@ public struct Flipcash_Push_V1_Payload: Sendable { public init() {} fileprivate var _navigation: Flipcash_Push_V1_Navigation? = nil + fileprivate var _chatMetadata: Flipcash_Push_V1_ChatMetadata? = nil } /// Navigation within the app upon clicking the push @@ -228,6 +238,35 @@ public struct Flipcash_Push_V1_Substitution: Sendable { public init() {} } +/// Additional metadata provided for chat pushes +public struct Flipcash_Push_V1_ChatMetadata: Sendable { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The user ID that sent a chat message + /// + /// Note: This will not be set for system messages OR for notifications that + /// don't relate to a user + public var sendingUserID: Flipcash_Common_V1_UserId { + get {return _sendingUserID ?? Flipcash_Common_V1_UserId()} + set {_sendingUserID = newValue} + } + /// Returns true if `sendingUserID` has been explicitly set. + public var hasSendingUserID: Bool {return self._sendingUserID != nil} + /// Clears the value of `sendingUserID`. Subsequent reads from it will return its default value. + public mutating func clearSendingUserID() {self._sendingUserID = nil} + + /// The type of chat + public var type: Flipcash_Chat_V1_ChatType = .unknown + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _sendingUserID: Flipcash_Common_V1_UserId? = nil +} + // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "flipcash.push.v1" @@ -238,7 +277,7 @@ extension Flipcash_Push_V1_TokenType: SwiftProtobuf._ProtoNameProviding { extension Flipcash_Push_V1_Payload: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".Payload" - public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}navigation\0\u{3}title_substitutions\0\u{3}body_substitutions\0\u{1}category\0\u{3}group_key\0") + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}navigation\0\u{3}title_substitutions\0\u{3}body_substitutions\0\u{1}category\0\u{3}group_key\0\u{3}chat_metadata\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -251,6 +290,7 @@ extension Flipcash_Push_V1_Payload: SwiftProtobuf.Message, SwiftProtobuf._Messag case 3: try { try decoder.decodeRepeatedMessageField(value: &self.bodySubstitutions) }() case 4: try { try decoder.decodeSingularEnumField(value: &self.category) }() case 5: try { try decoder.decodeSingularStringField(value: &self.groupKey) }() + case 6: try { try decoder.decodeSingularMessageField(value: &self._chatMetadata) }() default: break } } @@ -276,6 +316,9 @@ extension Flipcash_Push_V1_Payload: SwiftProtobuf.Message, SwiftProtobuf._Messag if !self.groupKey.isEmpty { try visitor.visitSingularStringField(value: self.groupKey, fieldNumber: 5) } + try { if let v = self._chatMetadata { + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + } }() try unknownFields.traverse(visitor: &visitor) } @@ -285,6 +328,7 @@ extension Flipcash_Push_V1_Payload: SwiftProtobuf.Message, SwiftProtobuf._Messag if lhs.bodySubstitutions != rhs.bodySubstitutions {return false} if lhs.category != rhs.category {return false} if lhs.groupKey != rhs.groupKey {return false} + if lhs._chatMetadata != rhs._chatMetadata {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -428,3 +472,42 @@ extension Flipcash_Push_V1_Substitution: SwiftProtobuf.Message, SwiftProtobuf._M return true } } + +extension Flipcash_Push_V1_ChatMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".ChatMetadata" + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}sending_user_id\0\u{1}type\0") + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularMessageField(value: &self._sendingUserID) }() + case 2: try { try decoder.decodeSingularEnumField(value: &self.type) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._sendingUserID { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } }() + if self.type != .unknown { + try visitor.visitSingularEnumField(value: self.type, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Flipcash_Push_V1_ChatMetadata, rhs: Flipcash_Push_V1_ChatMetadata) -> Bool { + if lhs._sendingUserID != rhs._sendingUserID {return false} + if lhs.type != rhs.type {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/push_v1_push_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/push_v1_push_service.grpc.swift index 6ed767a23..17b5e2526 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/push_v1_push_service.grpc.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/push_v1_push_service.grpc.swift @@ -15,13 +15,13 @@ import GRPCProtobuf /// Namespace containing generated types for the "flipcash.push.v1.Push" service. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) -public enum Flipcash_Push_V1_Push: Sendable { +public enum Flipcash_Push_V1_Push { /// Service descriptor for the "flipcash.push.v1.Push" service. public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.push.v1.Push") /// Namespace for method metadata. - public enum Method: Sendable { + public enum Method { /// Namespace for "AddToken" metadata. - public enum AddToken: Sendable { + public enum AddToken { /// Request type for "AddToken". public typealias Input = Flipcash_Push_V1_AddTokenRequest /// Response type for "AddToken". @@ -29,12 +29,11 @@ public enum Flipcash_Push_V1_Push: Sendable { /// Descriptor for "AddToken". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.push.v1.Push"), - method: "AddToken", - type: .unary + method: "AddToken" ) } /// Namespace for "DeleteTokens" metadata. - public enum DeleteTokens: Sendable { + public enum DeleteTokens { /// Request type for "DeleteTokens". public typealias Input = Flipcash_Push_V1_DeleteTokensRequest /// Response type for "DeleteTokens". @@ -42,8 +41,7 @@ public enum Flipcash_Push_V1_Push: Sendable { /// Descriptor for "DeleteTokens". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.push.v1.Push"), - method: "DeleteTokens", - type: .unary + method: "DeleteTokens" ) } /// Descriptors for all methods in the "flipcash.push.v1.Push" service. diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/push_v1_push_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/push_v1_push_service.pb.swift index d53a27925..7451f2452 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/push_v1_push_service.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/push_v1_push_service.pb.swift @@ -30,20 +30,20 @@ public struct Flipcash_Push_V1_AddTokenRequest: Sendable { public var pushToken: String = String() public var appInstall: Flipcash_Common_V1_AppInstallId { - get {_appInstall ?? Flipcash_Common_V1_AppInstallId()} + get {return _appInstall ?? Flipcash_Common_V1_AppInstallId()} set {_appInstall = newValue} } /// Returns true if `appInstall` has been explicitly set. - public var hasAppInstall: Bool {self._appInstall != nil} + public var hasAppInstall: Bool {return self._appInstall != nil} /// Clears the value of `appInstall`. Subsequent reads from it will return its default value. public mutating func clearAppInstall() {self._appInstall = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -107,20 +107,20 @@ public struct Flipcash_Push_V1_DeleteTokensRequest: Sendable { // methods supported on all messages. public var appInstall: Flipcash_Common_V1_AppInstallId { - get {_appInstall ?? Flipcash_Common_V1_AppInstallId()} + get {return _appInstall ?? Flipcash_Common_V1_AppInstallId()} set {_appInstall = newValue} } /// Returns true if `appInstall` has been explicitly set. - public var hasAppInstall: Bool {self._appInstall != nil} + public var hasAppInstall: Bool {return self._appInstall != nil} /// Clears the value of `appInstall`. Subsequent reads from it will return its default value. public mutating func clearAppInstall() {self._appInstall = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/resolver_v1_resolver_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/resolver_v1_resolver_service.grpc.swift index 42769761c..33f49bc8c 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/resolver_v1_resolver_service.grpc.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/resolver_v1_resolver_service.grpc.swift @@ -15,13 +15,13 @@ import GRPCProtobuf /// Namespace containing generated types for the "flipcash.resolver.v1.Resolver" service. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) -public enum Flipcash_Resolver_V1_Resolver: Sendable { +public enum Flipcash_Resolver_V1_Resolver { /// Service descriptor for the "flipcash.resolver.v1.Resolver" service. public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.resolver.v1.Resolver") /// Namespace for method metadata. - public enum Method: Sendable { + public enum Method { /// Namespace for "Resolve" metadata. - public enum Resolve: Sendable { + public enum Resolve { /// Request type for "Resolve". public typealias Input = Flipcash_Resolver_V1_ResolveRequest /// Response type for "Resolve". @@ -29,8 +29,7 @@ public enum Flipcash_Resolver_V1_Resolver: Sendable { /// Descriptor for "Resolve". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.resolver.v1.Resolver"), - method: "Resolve", - type: .unary + method: "Resolve" ) } /// Descriptors for all methods in the "flipcash.resolver.v1.Resolver" service. diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/resolver_v1_resolver_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/resolver_v1_resolver_service.pb.swift index 0f8370bc8..ea0b43209 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/resolver_v1_resolver_service.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/resolver_v1_resolver_service.pb.swift @@ -26,20 +26,20 @@ public struct Flipcash_Resolver_V1_ResolveRequest: Sendable { // methods supported on all messages. public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} public var identifier: Flipcash_Resolver_V1_Identifier { - get {_identifier ?? Flipcash_Resolver_V1_Identifier()} + get {return _identifier ?? Flipcash_Resolver_V1_Identifier()} set {_identifier = newValue} } /// Returns true if `identifier` has been explicitly set. - public var hasIdentifier: Bool {self._identifier != nil} + public var hasIdentifier: Bool {return self._identifier != nil} /// Clears the value of `identifier`. Subsequent reads from it will return its default value. public mutating func clearIdentifier() {self._identifier = nil} @@ -60,11 +60,11 @@ public struct Flipcash_Resolver_V1_ResolveResponse: Sendable { /// The resolved payment destination address. Set when result == OK. public var resolution: Flipcash_Resolver_V1_Resolution { - get {_resolution ?? Flipcash_Resolver_V1_Resolution()} + get {return _resolution ?? Flipcash_Resolver_V1_Resolution()} set {_resolution = newValue} } /// Returns true if `resolution` has been explicitly set. - public var hasResolution: Bool {self._resolution != nil} + public var hasResolution: Bool {return self._resolution != nil} /// Clears the value of `resolution`. Subsequent reads from it will return its default value. public mutating func clearResolution() {self._resolution = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/settings_v1_settings_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/settings_v1_settings_service.grpc.swift index ffa7a8d8d..5ef809bb6 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/settings_v1_settings_service.grpc.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/settings_v1_settings_service.grpc.swift @@ -15,13 +15,13 @@ import GRPCProtobuf /// Namespace containing generated types for the "flipcash.settings.v1.Settings" service. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) -public enum Flipcash_Settings_V1_Settings: Sendable { +public enum Flipcash_Settings_V1_Settings { /// Service descriptor for the "flipcash.settings.v1.Settings" service. public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.settings.v1.Settings") /// Namespace for method metadata. - public enum Method: Sendable { + public enum Method { /// Namespace for "UpdateSettings" metadata. - public enum UpdateSettings: Sendable { + public enum UpdateSettings { /// Request type for "UpdateSettings". public typealias Input = Flipcash_Settings_V1_UpdateSettingsRequest /// Response type for "UpdateSettings". @@ -29,8 +29,7 @@ public enum Flipcash_Settings_V1_Settings: Sendable { /// Descriptor for "UpdateSettings". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.settings.v1.Settings"), - method: "UpdateSettings", - type: .unary + method: "UpdateSettings" ) } /// Descriptors for all methods in the "flipcash.settings.v1.Settings" service. diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/settings_v1_settings_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/settings_v1_settings_service.pb.swift index b0f200798..b06ce2f19 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/settings_v1_settings_service.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/settings_v1_settings_service.pb.swift @@ -27,30 +27,30 @@ public struct Flipcash_Settings_V1_UpdateSettingsRequest: Sendable { /// Locale setting, only updated if present public var locale: Flipcash_Common_V1_Locale { - get {_locale ?? Flipcash_Common_V1_Locale()} + get {return _locale ?? Flipcash_Common_V1_Locale()} set {_locale = newValue} } /// Returns true if `locale` has been explicitly set. - public var hasLocale: Bool {self._locale != nil} + public var hasLocale: Bool {return self._locale != nil} /// Clears the value of `locale`. Subsequent reads from it will return its default value. public mutating func clearLocale() {self._locale = nil} /// Region setting, only updated if present public var region: Flipcash_Common_V1_Region { - get {_region ?? Flipcash_Common_V1_Region()} + get {return _region ?? Flipcash_Common_V1_Region()} set {_region = newValue} } /// Returns true if `region` has been explicitly set. - public var hasRegion: Bool {self._region != nil} + public var hasRegion: Bool {return self._region != nil} /// Clears the value of `region`. Subsequent reads from it will return its default value. public mutating func clearRegion() {self._region = nil} public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/thirdparty_v1_third_party_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/thirdparty_v1_third_party_service.grpc.swift index 9769f3bd1..e6f7c4a09 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/thirdparty_v1_third_party_service.grpc.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/thirdparty_v1_third_party_service.grpc.swift @@ -15,13 +15,13 @@ import GRPCProtobuf /// Namespace containing generated types for the "flipcash.thirdparty.v1.ThirdParty" service. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) -public enum Flipcash_Thirdparty_V1_ThirdParty: Sendable { +public enum Flipcash_Thirdparty_V1_ThirdParty { /// Service descriptor for the "flipcash.thirdparty.v1.ThirdParty" service. public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.thirdparty.v1.ThirdParty") /// Namespace for method metadata. - public enum Method: Sendable { + public enum Method { /// Namespace for "GetJwt" metadata. - public enum GetJwt: Sendable { + public enum GetJwt { /// Request type for "GetJwt". public typealias Input = Flipcash_Thirdparty_V1_GetJwtRequest /// Response type for "GetJwt". @@ -29,8 +29,7 @@ public enum Flipcash_Thirdparty_V1_ThirdParty: Sendable { /// Descriptor for "GetJwt". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.thirdparty.v1.ThirdParty"), - method: "GetJwt", - type: .unary + method: "GetJwt" ) } /// Descriptors for all methods in the "flipcash.thirdparty.v1.ThirdParty" service. diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/thirdparty_v1_third_party_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/thirdparty_v1_third_party_service.pb.swift index af672da87..f82a557b0 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/thirdparty_v1_third_party_service.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/thirdparty_v1_third_party_service.pb.swift @@ -26,11 +26,11 @@ public struct Flipcash_Thirdparty_V1_GetJwtRequest: Sendable { // methods supported on all messages. public var apiKey: Flipcash_Thirdparty_V1_ApiKey { - get {_apiKey ?? Flipcash_Thirdparty_V1_ApiKey()} + get {return _apiKey ?? Flipcash_Thirdparty_V1_ApiKey()} set {_apiKey = newValue} } /// Returns true if `apiKey` has been explicitly set. - public var hasApiKey: Bool {self._apiKey != nil} + public var hasApiKey: Bool {return self._apiKey != nil} /// Clears the value of `apiKey`. Subsequent reads from it will return its default value. public mutating func clearApiKey() {self._apiKey = nil} @@ -41,11 +41,11 @@ public struct Flipcash_Thirdparty_V1_GetJwtRequest: Sendable { public var path: String = String() public var auth: Flipcash_Common_V1_Auth { - get {_auth ?? Flipcash_Common_V1_Auth()} + get {return _auth ?? Flipcash_Common_V1_Auth()} set {_auth = newValue} } /// Returns true if `auth` has been explicitly set. - public var hasAuth: Bool {self._auth != nil} + public var hasAuth: Bool {return self._auth != nil} /// Clears the value of `auth`. Subsequent reads from it will return its default value. public mutating func clearAuth() {self._auth = nil} @@ -65,11 +65,11 @@ public struct Flipcash_Thirdparty_V1_GetJwtResponse: Sendable { public var result: Flipcash_Thirdparty_V1_GetJwtResponse.Result = .ok public var jwt: Flipcash_Thirdparty_V1_Jwt { - get {_jwt ?? Flipcash_Thirdparty_V1_Jwt()} + get {return _jwt ?? Flipcash_Thirdparty_V1_Jwt()} set {_jwt = newValue} } /// Returns true if `jwt` has been explicitly set. - public var hasJwt: Bool {self._jwt != nil} + public var hasJwt: Bool {return self._jwt != nil} /// Clears the value of `jwt`. Subsequent reads from it will return its default value. public mutating func clearJwt() {self._jwt = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/proto/blocklist/v1/blocklist_service.proto b/FlipcashAPI/Sources/FlipcashAPI/Core/proto/blocklist/v1/blocklist_service.proto new file mode 100644 index 000000000..c0ed1ba46 --- /dev/null +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/proto/blocklist/v1/blocklist_service.proto @@ -0,0 +1,116 @@ +syntax = "proto3"; + +package flipcash.blocklist.v1; + +import "blocklist/v1/model.proto"; +import "common/v1/common.proto"; +import "validate/validate.proto"; + +option go_package = "github.com/code-payments/flipcash2-protobuf-api/generated/go/blocklist/v1;blocklistpb"; +option java_package = "com.codeinc.flipcash.gen.blocklist.v1"; +option objc_class_prefix = "FPBBlocklistV1"; + +// Blocklist manages the set of users a user has blocked. +service Blocklist { + // BlockUser adds a user to the caller's blocklist. Blocking a user that + // is already blocked is a no-op and returns OK. + rpc BlockUser(BlockUserRequest) returns (BlockUserResponse); + + // UnblockUser removes a user from the caller's blocklist. Unblocking a + // user that isn't blocked is a no-op and returns OK. + rpc UnblockUser(UnblockUserRequest) returns (UnblockUserResponse); + + // IsBlocked checks whether a user is on the caller's blocklist. + rpc IsBlocked(IsBlockedRequest) returns (IsBlockedResponse); + + // GetBlocklist gets the caller's blocklist using a paged API, ordered by + // most recently blocked first. + rpc GetBlocklist(GetBlocklistRequest) returns (GetBlocklistResponse); +} + +message BlockUserRequest { + // The user to block + common.v1.UserId user_id = 1 [(validate.rules).message.required = true]; + + common.v1.Auth auth = 10 [(validate.rules).message.required = true]; +} + +message BlockUserResponse { + Result result = 1; + enum Result { + OK = 0; + DENIED = 1; + // The user to block doesn't exist + USER_NOT_FOUND = 2; + // Users cannot block themselves + CANNOT_BLOCK_SELF = 3; + } +} + +message UnblockUserRequest { + // The user to unblock + common.v1.UserId user_id = 1 [(validate.rules).message.required = true]; + + common.v1.Auth auth = 10 [(validate.rules).message.required = true]; +} + +message UnblockUserResponse { + Result result = 1; + enum Result { + OK = 0; + DENIED = 1; + } +} + +message IsBlockedRequest { + // The user to check against the caller's blocklist + common.v1.UserId user_id = 1 [(validate.rules).message.required = true]; + + common.v1.Auth auth = 10 [(validate.rules).message.required = true]; +} + +message IsBlockedResponse { + Result result = 1; + enum Result { + OK = 0; + DENIED = 1; + } + + // Whether the user is on the caller's blocklist. Set when result is OK. + bool is_blocked = 2; +} + +message GetBlocklistRequest { + // QueryOptions controls page_size. Ordering is fixed to most recently + // blocked first and is not client-selectable. + // + // Leave query_options.paging_token unset on the first request. On every + // subsequent request, set query_options.paging_token to the paging_token + // from the most recent response to advance to the next page. The token is + // opaque and server-generated; do not construct it. + common.v1.QueryOptions query_options = 1; + + common.v1.Auth auth = 10 [(validate.rules).message.required = true]; +} + +message GetBlocklistResponse { + Result result = 1; + enum Result { + OK = 0; + DENIED = 1; + } + + repeated BlockedUser blocked_users = 2 [(validate.rules).repeated = { + min_items: 0 + max_items: 100 + }]; + + // PagingToken is the server-generated cursor for this paginated read. The + // client MUST send the most recent value back in query_options.paging_token + // on the next GetBlocklistRequest. Set when result is OK. + common.v1.PagingToken paging_token = 3; + + // HasMore indicates whether further pages remain. When true, the client + // should issue another GetBlocklistRequest with the returned paging_token. + bool has_more = 4; +} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/proto/blocklist/v1/model.proto b/FlipcashAPI/Sources/FlipcashAPI/Core/proto/blocklist/v1/model.proto new file mode 100644 index 000000000..d3a76426e --- /dev/null +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/proto/blocklist/v1/model.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; + +package flipcash.blocklist.v1; + +import "common/v1/common.proto"; +import "google/protobuf/timestamp.proto"; +import "validate/validate.proto"; + +option go_package = "github.com/code-payments/flipcash2-protobuf-api/generated/go/blocklist/v1;blocklistpb"; +option java_package = "com.codeinc.flipcash.gen.blocklist.v1"; +option objc_class_prefix = "FPBBlocklistV1"; + +// BlockedUser is a single entry in a user's blocklist +message BlockedUser { + // The user that is blocked + common.v1.UserId user_id = 1 [(validate.rules).message.required = true]; + + // Timestamp when the user was blocked + google.protobuf.Timestamp blocked_at = 2 [(validate.rules).timestamp.required = true]; +} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/proto/chat/v1/model.proto b/FlipcashAPI/Sources/FlipcashAPI/Core/proto/chat/v1/model.proto index fa750d9ef..45c6084a4 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/proto/chat/v1/model.proto +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/proto/chat/v1/model.proto @@ -45,6 +45,11 @@ message Metadata { // exceed last_message.event_sequence. It is the same head reported by // GetDeltaResponse.latest_sequence. uint64 latest_event_sequence = 6; + + // Whether this chat is hidden from the requesting owner's chat list. + // Per-viewer and server-computed (e.g. the chat's peer is on the caller's + // blocklist). Clients should exclude hidden chats from the primary DM list. + bool is_hidden = 7; } message Member { diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/proto/messaging/v1/model.proto b/FlipcashAPI/Sources/FlipcashAPI/Core/proto/messaging/v1/model.proto index 1819e06db..33f8e330a 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/proto/messaging/v1/model.proto +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/proto/messaging/v1/model.proto @@ -125,6 +125,14 @@ message CashContent { // Reserved for receiver, which will is required for group chats reserved 3; + + // Action for how the cash was sent. Clietns should always show SENT as a + // fallback. + enum Action { + SENT = 0; + TIPPED = 1; + } + Action action = 4; } // Reply content diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/proto/push/v1/model.proto b/FlipcashAPI/Sources/FlipcashAPI/Core/proto/push/v1/model.proto index ee77691fc..35bfcd075 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Core/proto/push/v1/model.proto +++ b/FlipcashAPI/Sources/FlipcashAPI/Core/proto/push/v1/model.proto @@ -6,6 +6,7 @@ option go_package = "github.com/code-payments/flipcash2-protobuf-api/generated/g option java_package = "com.codeinc.flipcash.gen.push.v1"; option objc_class_prefix = "FPBPushV1"; +import "chat/v1/model.proto"; import "common/v1/common.proto"; import "phone/v1/model.proto"; import "validate/validate.proto"; @@ -45,6 +46,8 @@ message Payload { string group_key = 5 [(validate.rules).string = { max_len: 4096 // Arbitrary }]; + + ChatMetadata chat_metadata = 6; } // Navigation within the app upon clicking the push @@ -77,3 +80,17 @@ message Substitution { phone.v1.PhoneNumber contact = 2; } } + +// Additional metadata provided for chat pushes +message ChatMetadata { + // The user ID that sent a chat message + // + // Note: This will not be set for system messages OR for notifications that + // don't relate to a user + common.v1.UserId sending_user_id = 1; + + // The type of chat + chat.v1.ChatType type = 2 [(validate.rules).enum = { + not_in: [0] // UNKNOWN + }]; +} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/account_v1_ocp_account_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/account_v1_ocp_account_service.grpc.swift index d1178c960..3dd1c4bdc 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/account_v1_ocp_account_service.grpc.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/account_v1_ocp_account_service.grpc.swift @@ -15,13 +15,13 @@ import GRPCProtobuf /// Namespace containing generated types for the "ocp.account.v1.Account" service. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) -public enum Ocp_Account_V1_Account: Sendable { +public enum Ocp_Account_V1_Account { /// Service descriptor for the "ocp.account.v1.Account" service. public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.account.v1.Account") /// Namespace for method metadata. - public enum Method: Sendable { + public enum Method { /// Namespace for "IsOcpAccount" metadata. - public enum IsOcpAccount: Sendable { + public enum IsOcpAccount { /// Request type for "IsOcpAccount". public typealias Input = Ocp_Account_V1_IsOcpAccountRequest /// Response type for "IsOcpAccount". @@ -29,12 +29,11 @@ public enum Ocp_Account_V1_Account: Sendable { /// Descriptor for "IsOcpAccount". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.account.v1.Account"), - method: "IsOcpAccount", - type: .unary + method: "IsOcpAccount" ) } /// Namespace for "GetTokenAccountInfos" metadata. - public enum GetTokenAccountInfos: Sendable { + public enum GetTokenAccountInfos { /// Request type for "GetTokenAccountInfos". public typealias Input = Ocp_Account_V1_GetTokenAccountInfosRequest /// Response type for "GetTokenAccountInfos". @@ -42,8 +41,7 @@ public enum Ocp_Account_V1_Account: Sendable { /// Descriptor for "GetTokenAccountInfos". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.account.v1.Account"), - method: "GetTokenAccountInfos", - type: .unary + method: "GetTokenAccountInfos" ) } /// Descriptors for all methods in the "ocp.account.v1.Account" service. diff --git a/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/account_v1_ocp_account_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/account_v1_ocp_account_service.pb.swift index 919cb4acd..067973737 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/account_v1_ocp_account_service.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/account_v1_ocp_account_service.pb.swift @@ -27,11 +27,11 @@ public struct Ocp_Account_V1_IsOcpAccountRequest: Sendable { /// The owner account to check against. public var owner: Ocp_Common_V1_SolanaAccountId { - get {_owner ?? Ocp_Common_V1_SolanaAccountId()} + get {return _owner ?? Ocp_Common_V1_SolanaAccountId()} set {_owner = newValue} } /// Returns true if `owner` has been explicitly set. - public var hasOwner: Bool {self._owner != nil} + public var hasOwner: Bool {return self._owner != nil} /// Clears the value of `owner`. Subsequent reads from it will return its default value. public mutating func clearOwner() {self._owner = nil} @@ -39,11 +39,11 @@ public struct Ocp_Account_V1_IsOcpAccountRequest: Sendable { /// using the private key of the owner account. This provides an authentication /// mechanism to the RPC. public var signature: Ocp_Common_V1_Signature { - get {_signature ?? Ocp_Common_V1_Signature()} + get {return _signature ?? Ocp_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} @@ -119,11 +119,11 @@ public struct Ocp_Account_V1_GetTokenAccountInfosRequest: Sendable { /// The owner account to fetch balances for, which can also be thought of as a /// parent account for this RPC that links to one or more token accounts. public var owner: Ocp_Common_V1_SolanaAccountId { - get {_owner ?? Ocp_Common_V1_SolanaAccountId()} + get {return _owner ?? Ocp_Common_V1_SolanaAccountId()} set {_owner = newValue} } /// Returns true if `owner` has been explicitly set. - public var hasOwner: Bool {self._owner != nil} + public var hasOwner: Bool {return self._owner != nil} /// Clears the value of `owner`. Subsequent reads from it will return its default value. public mutating func clearOwner() {self._owner = nil} @@ -131,11 +131,11 @@ public struct Ocp_Account_V1_GetTokenAccountInfosRequest: Sendable { /// fields set using the private key of the owner account. This provides /// an authentication mechanism to the RPC. public var signature: Ocp_Common_V1_Signature { - get {_signature ?? Ocp_Common_V1_Signature()} + get {return _signature ?? Ocp_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} @@ -144,11 +144,11 @@ public struct Ocp_Account_V1_GetTokenAccountInfosRequest: Sendable { /// use case includes a user owner account requesting account info for a gift card /// owner account. public var requestingOwner: Ocp_Common_V1_SolanaAccountId { - get {_requestingOwner ?? Ocp_Common_V1_SolanaAccountId()} + get {return _requestingOwner ?? Ocp_Common_V1_SolanaAccountId()} set {_requestingOwner = newValue} } /// Returns true if `requestingOwner` has been explicitly set. - public var hasRequestingOwner: Bool {self._requestingOwner != nil} + public var hasRequestingOwner: Bool {return self._requestingOwner != nil} /// Clears the value of `requestingOwner`. Subsequent reads from it will return its default value. public mutating func clearRequestingOwner() {self._requestingOwner = nil} @@ -159,11 +159,11 @@ public struct Ocp_Account_V1_GetTokenAccountInfosRequest: Sendable { /// /// This must be set when requesting_owner is present. public var requestingOwnerSignature: Ocp_Common_V1_Signature { - get {_requestingOwnerSignature ?? Ocp_Common_V1_Signature()} + get {return _requestingOwnerSignature ?? Ocp_Common_V1_Signature()} set {_requestingOwnerSignature = newValue} } /// Returns true if `requestingOwnerSignature` has been explicitly set. - public var hasRequestingOwnerSignature: Bool {self._requestingOwnerSignature != nil} + public var hasRequestingOwnerSignature: Bool {return self._requestingOwnerSignature != nil} /// Clears the value of `requestingOwnerSignature`. Subsequent reads from it will return its default value. public mutating func clearRequestingOwnerSignature() {self._requestingOwnerSignature = nil} @@ -267,11 +267,11 @@ public struct Ocp_Account_V1_TokenAccountInfo: @unchecked Sendable { /// The token account's address public var address: Ocp_Common_V1_SolanaAccountId { - get {_storage._address ?? Ocp_Common_V1_SolanaAccountId()} + get {return _storage._address ?? Ocp_Common_V1_SolanaAccountId()} set {_uniqueStorage()._address = newValue} } /// Returns true if `address` has been explicitly set. - public var hasAddress: Bool {_storage._address != nil} + public var hasAddress: Bool {return _storage._address != nil} /// Clears the value of `address`. Subsequent reads from it will return its default value. public mutating func clearAddress() {_uniqueStorage()._address = nil} @@ -279,11 +279,11 @@ public struct Ocp_Account_V1_TokenAccountInfo: @unchecked Sendable { /// account that links to one or more token accounts. This is provided when /// available. public var owner: Ocp_Common_V1_SolanaAccountId { - get {_storage._owner ?? Ocp_Common_V1_SolanaAccountId()} + get {return _storage._owner ?? Ocp_Common_V1_SolanaAccountId()} set {_uniqueStorage()._owner = newValue} } /// Returns true if `owner` has been explicitly set. - public var hasOwner: Bool {_storage._owner != nil} + public var hasOwner: Bool {return _storage._owner != nil} /// Clears the value of `owner`. Subsequent reads from it will return its default value. public mutating func clearOwner() {_uniqueStorage()._owner = nil} @@ -291,30 +291,30 @@ public struct Ocp_Account_V1_TokenAccountInfo: @unchecked Sendable { /// account. This can be the owner account under certain circumstances (eg. /// ATA, primary account). This is provided when available. public var authority: Ocp_Common_V1_SolanaAccountId { - get {_storage._authority ?? Ocp_Common_V1_SolanaAccountId()} + get {return _storage._authority ?? Ocp_Common_V1_SolanaAccountId()} set {_uniqueStorage()._authority = newValue} } /// Returns true if `authority` has been explicitly set. - public var hasAuthority: Bool {_storage._authority != nil} + public var hasAuthority: Bool {return _storage._authority != nil} /// Clears the value of `authority`. Subsequent reads from it will return its default value. public mutating func clearAuthority() {_uniqueStorage()._authority = nil} /// The type of token account, which infers its intended use. public var accountType: Ocp_Common_V1_AccountType { - get {_storage._accountType} + get {return _storage._accountType} set {_uniqueStorage()._accountType = newValue} } /// The account's derivation index for applicable account types. When this field /// doesn't apply, a zero value is provided. public var index: UInt64 { - get {_storage._index} + get {return _storage._index} set {_uniqueStorage()._index = newValue} } /// The source of truth for the balance calculation. public var balanceSource: Ocp_Account_V1_TokenAccountInfo.BalanceSource { - get {_storage._balanceSource} + get {return _storage._balanceSource} set {_uniqueStorage()._balanceSource = newValue} } @@ -322,26 +322,26 @@ public struct Ocp_Account_V1_TokenAccountInfo: @unchecked Sendable { /// on the blockchain and could be non-zero even if the account hasn't been created. /// Use balance_source to determine how this value was calculated. public var balance: UInt64 { - get {_storage._balance} + get {return _storage._balance} set {_uniqueStorage()._balance = newValue} } /// The state of the account as it pertains to the OCP's ability to manage funds. public var managementState: Ocp_Account_V1_TokenAccountInfo.ManagementState { - get {_storage._managementState} + get {return _storage._managementState} set {_uniqueStorage()._managementState = newValue} } /// The state of the account on the blockchain. public var blockchainState: Ocp_Account_V1_TokenAccountInfo.BlockchainState { - get {_storage._blockchainState} + get {return _storage._blockchainState} set {_uniqueStorage()._blockchainState = newValue} } /// Whether an account is claimed. This only applies to relevant account types /// (eg. REMOTE_SEND_GIFT_CARD). public var claimState: Ocp_Account_V1_TokenAccountInfo.ClaimState { - get {_storage._claimState} + get {return _storage._claimState} set {_uniqueStorage()._claimState = newValue} } @@ -354,41 +354,41 @@ public struct Ocp_Account_V1_TokenAccountInfo: @unchecked Sendable { /// 3. The balance could have been received, so the total balance can show /// as zero. public var originalExchangeData: Ocp_Transaction_V1_ExchangeData { - get {_storage._originalExchangeData ?? Ocp_Transaction_V1_ExchangeData()} + get {return _storage._originalExchangeData ?? Ocp_Transaction_V1_ExchangeData()} set {_uniqueStorage()._originalExchangeData = newValue} } /// Returns true if `originalExchangeData` has been explicitly set. - public var hasOriginalExchangeData: Bool {_storage._originalExchangeData != nil} + public var hasOriginalExchangeData: Bool {return _storage._originalExchangeData != nil} /// Clears the value of `originalExchangeData`. Subsequent reads from it will return its default value. public mutating func clearOriginalExchangeData() {_uniqueStorage()._originalExchangeData = nil} /// The token account's mint public var mint: Ocp_Common_V1_SolanaAccountId { - get {_storage._mint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _storage._mint ?? Ocp_Common_V1_SolanaAccountId()} set {_uniqueStorage()._mint = newValue} } /// Returns true if `mint` has been explicitly set. - public var hasMint: Bool {_storage._mint != nil} + public var hasMint: Bool {return _storage._mint != nil} /// Clears the value of `mint`. Subsequent reads from it will return its default value. public mutating func clearMint() {_uniqueStorage()._mint = nil} /// Mint metadata for the token account's mint public var mintMetadata: Ocp_Currency_V1_Mint { - get {_storage._mintMetadata ?? Ocp_Currency_V1_Mint()} + get {return _storage._mintMetadata ?? Ocp_Currency_V1_Mint()} set {_uniqueStorage()._mintMetadata = newValue} } /// Returns true if `mintMetadata` has been explicitly set. - public var hasMintMetadata: Bool {_storage._mintMetadata != nil} + public var hasMintMetadata: Bool {return _storage._mintMetadata != nil} /// Clears the value of `mintMetadata`. Subsequent reads from it will return its default value. public mutating func clearMintMetadata() {_uniqueStorage()._mintMetadata = nil} /// Live mint reserve state, if applicable public var liveReserveState: Ocp_Currency_V1_VerifiedLaunchpadCurrencyReserveState { - get {_storage._liveReserveState ?? Ocp_Currency_V1_VerifiedLaunchpadCurrencyReserveState()} + get {return _storage._liveReserveState ?? Ocp_Currency_V1_VerifiedLaunchpadCurrencyReserveState()} set {_uniqueStorage()._liveReserveState = newValue} } /// Returns true if `liveReserveState` has been explicitly set. - public var hasLiveReserveState: Bool {_storage._liveReserveState != nil} + public var hasLiveReserveState: Bool {return _storage._liveReserveState != nil} /// Clears the value of `liveReserveState`. Subsequent reads from it will return its default value. public mutating func clearLiveReserveState() {_uniqueStorage()._liveReserveState = nil} @@ -396,25 +396,25 @@ public struct Ocp_Account_V1_TokenAccountInfo: @unchecked Sendable { /// the time of intent submission. Otherwise, for external accounts, it is /// the time created on the blockchain. public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_storage._createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _storage._createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_uniqueStorage()._createdAt = newValue} } /// Returns true if `createdAt` has been explicitly set. - public var hasCreatedAt: Bool {_storage._createdAt != nil} + public var hasCreatedAt: Bool {return _storage._createdAt != nil} /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. public mutating func clearCreatedAt() {_uniqueStorage()._createdAt = nil} /// For REMOTE_SEND_GIFT_CARD, if requesting_owner was provided, was /// requesting_owner the issuer of the account. public var isGiftCardIssuer: Bool { - get {_storage._isGiftCardIssuer} + get {return _storage._isGiftCardIssuer} set {_uniqueStorage()._isGiftCardIssuer = newValue} } /// The USD cost basis for this account, which can be used to compute currency /// appreciation/depreciation public var usdCostBasis: Double { - get {_storage._usdCostBasis} + get {return _storage._usdCostBasis} set {_uniqueStorage()._usdCostBasis = newValue} } diff --git a/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/common_v1_model.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/common_v1_model.pb.swift index 3b4da6bcb..927cae9c9 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/common_v1_model.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/common_v1_model.pb.swift @@ -143,11 +143,11 @@ public struct Ocp_Common_V1_SolanaAddressLookupTable: Sendable { // methods supported on all messages. public var address: Ocp_Common_V1_SolanaAccountId { - get {_address ?? Ocp_Common_V1_SolanaAccountId()} + get {return _address ?? Ocp_Common_V1_SolanaAccountId()} set {_address = newValue} } /// Returns true if `address` has been explicitly set. - public var hasAddress: Bool {self._address != nil} + public var hasAddress: Bool {return self._address != nil} /// Clears the value of `address`. Subsequent reads from it will return its default value. public mutating func clearAddress() {self._address = nil} @@ -331,21 +331,21 @@ public struct Ocp_Common_V1_ServerPing: Sendable { /// Timestamp the ping was sent on the stream, for client to get a sense /// of potential network latency public var timestamp: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_timestamp = newValue} } /// Returns true if `timestamp` has been explicitly set. - public var hasTimestamp: Bool {self._timestamp != nil} + public var hasTimestamp: Bool {return self._timestamp != nil} /// Clears the value of `timestamp`. Subsequent reads from it will return its default value. public mutating func clearTimestamp() {self._timestamp = nil} /// The delay server will apply before sending the next ping public var pingDelay: SwiftProtobuf.Google_Protobuf_Duration { - get {_pingDelay ?? SwiftProtobuf.Google_Protobuf_Duration()} + get {return _pingDelay ?? SwiftProtobuf.Google_Protobuf_Duration()} set {_pingDelay = newValue} } /// Returns true if `pingDelay` has been explicitly set. - public var hasPingDelay: Bool {self._pingDelay != nil} + public var hasPingDelay: Bool {return self._pingDelay != nil} /// Clears the value of `pingDelay`. Subsequent reads from it will return its default value. public mutating func clearPingDelay() {self._pingDelay = nil} @@ -365,11 +365,11 @@ public struct Ocp_Common_V1_ClientPong: Sendable { /// Timestamp the Pong was sent on the stream, for server to get a sense /// of potential network latency public var timestamp: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_timestamp = newValue} } /// Returns true if `timestamp` has been explicitly set. - public var hasTimestamp: Bool {self._timestamp != nil} + public var hasTimestamp: Bool {return self._timestamp != nil} /// Clears the value of `timestamp`. Subsequent reads from it will return its default value. public mutating func clearTimestamp() {self._timestamp = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/currency_v1_ocp_currency_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/currency_v1_ocp_currency_service.grpc.swift index e7fc2675e..c0006fb87 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/currency_v1_ocp_currency_service.grpc.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/currency_v1_ocp_currency_service.grpc.swift @@ -15,13 +15,13 @@ import GRPCProtobuf /// Namespace containing generated types for the "ocp.currency.v1.Currency" service. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) -public enum Ocp_Currency_V1_Currency: Sendable { +public enum Ocp_Currency_V1_Currency { /// Service descriptor for the "ocp.currency.v1.Currency" service. public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.currency.v1.Currency") /// Namespace for method metadata. - public enum Method: Sendable { + public enum Method { /// Namespace for "GetMints" metadata. - public enum GetMints: Sendable { + public enum GetMints { /// Request type for "GetMints". public typealias Input = Ocp_Currency_V1_GetMintsRequest /// Response type for "GetMints". @@ -29,12 +29,11 @@ public enum Ocp_Currency_V1_Currency: Sendable { /// Descriptor for "GetMints". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.currency.v1.Currency"), - method: "GetMints", - type: .unary + method: "GetMints" ) } /// Namespace for "GetHistoricalMintData" metadata. - public enum GetHistoricalMintData: Sendable { + public enum GetHistoricalMintData { /// Request type for "GetHistoricalMintData". public typealias Input = Ocp_Currency_V1_GetHistoricalMintDataRequest /// Response type for "GetHistoricalMintData". @@ -42,12 +41,11 @@ public enum Ocp_Currency_V1_Currency: Sendable { /// Descriptor for "GetHistoricalMintData". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.currency.v1.Currency"), - method: "GetHistoricalMintData", - type: .unary + method: "GetHistoricalMintData" ) } /// Namespace for "StreamLiveMintData" metadata. - public enum StreamLiveMintData: Sendable { + public enum StreamLiveMintData { /// Request type for "StreamLiveMintData". public typealias Input = Ocp_Currency_V1_StreamLiveMintDataRequest /// Response type for "StreamLiveMintData". @@ -55,12 +53,11 @@ public enum Ocp_Currency_V1_Currency: Sendable { /// Descriptor for "StreamLiveMintData". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.currency.v1.Currency"), - method: "StreamLiveMintData", - type: .bidirectionalStreaming + method: "StreamLiveMintData" ) } /// Namespace for "Launch" metadata. - public enum Launch: Sendable { + public enum Launch { /// Request type for "Launch". public typealias Input = Ocp_Currency_V1_LaunchRequest /// Response type for "Launch". @@ -68,12 +65,11 @@ public enum Ocp_Currency_V1_Currency: Sendable { /// Descriptor for "Launch". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.currency.v1.Currency"), - method: "Launch", - type: .unary + method: "Launch" ) } /// Namespace for "UpdateIcon" metadata. - public enum UpdateIcon: Sendable { + public enum UpdateIcon { /// Request type for "UpdateIcon". public typealias Input = Ocp_Currency_V1_UpdateIconRequest /// Response type for "UpdateIcon". @@ -81,12 +77,11 @@ public enum Ocp_Currency_V1_Currency: Sendable { /// Descriptor for "UpdateIcon". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.currency.v1.Currency"), - method: "UpdateIcon", - type: .unary + method: "UpdateIcon" ) } /// Namespace for "UpdateMetadata" metadata. - public enum UpdateMetadata: Sendable { + public enum UpdateMetadata { /// Request type for "UpdateMetadata". public typealias Input = Ocp_Currency_V1_UpdateMetadataRequest /// Response type for "UpdateMetadata". @@ -94,12 +89,11 @@ public enum Ocp_Currency_V1_Currency: Sendable { /// Descriptor for "UpdateMetadata". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.currency.v1.Currency"), - method: "UpdateMetadata", - type: .unary + method: "UpdateMetadata" ) } /// Namespace for "Discover" metadata. - public enum Discover: Sendable { + public enum Discover { /// Request type for "Discover". public typealias Input = Ocp_Currency_V1_DiscoverRequest /// Response type for "Discover". @@ -107,12 +101,11 @@ public enum Ocp_Currency_V1_Currency: Sendable { /// Descriptor for "Discover". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.currency.v1.Currency"), - method: "Discover", - type: .serverStreaming + method: "Discover" ) } /// Namespace for "CheckAvailability" metadata. - public enum CheckAvailability: Sendable { + public enum CheckAvailability { /// Request type for "CheckAvailability". public typealias Input = Ocp_Currency_V1_CheckAvailabilityRequest /// Response type for "CheckAvailability". @@ -120,8 +113,7 @@ public enum Ocp_Currency_V1_Currency: Sendable { /// Descriptor for "CheckAvailability". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.currency.v1.Currency"), - method: "CheckAvailability", - type: .unary + method: "CheckAvailability" ) } /// Descriptors for all methods in the "ocp.currency.v1.Currency" service. diff --git a/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/currency_v1_ocp_currency_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/currency_v1_ocp_currency_service.pb.swift index ba47d643c..9b52db055 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/currency_v1_ocp_currency_service.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/currency_v1_ocp_currency_service.pb.swift @@ -134,11 +134,11 @@ public struct Ocp_Currency_V1_GetHistoricalMintDataRequest: Sendable { /// The mint address to get historical data for public var address: Ocp_Common_V1_SolanaAccountId { - get {_address ?? Ocp_Common_V1_SolanaAccountId()} + get {return _address ?? Ocp_Common_V1_SolanaAccountId()} set {_address = newValue} } /// Returns true if `address` has been explicitly set. - public var hasAddress: Bool {self._address != nil} + public var hasAddress: Bool {return self._address != nil} /// Clears the value of `address`. Subsequent reads from it will return its default value. public mutating func clearAddress() {self._address = nil} @@ -346,41 +346,41 @@ public struct Ocp_Currency_V1_Mint: @unchecked Sendable { /// Token mint address public var address: Ocp_Common_V1_SolanaAccountId { - get {_storage._address ?? Ocp_Common_V1_SolanaAccountId()} + get {return _storage._address ?? Ocp_Common_V1_SolanaAccountId()} set {_uniqueStorage()._address = newValue} } /// Returns true if `address` has been explicitly set. - public var hasAddress: Bool {_storage._address != nil} + public var hasAddress: Bool {return _storage._address != nil} /// Clears the value of `address`. Subsequent reads from it will return its default value. public mutating func clearAddress() {_uniqueStorage()._address = nil} /// The number of decimals configured for the mint public var decimals: UInt32 { - get {_storage._decimals} + get {return _storage._decimals} set {_uniqueStorage()._decimals = newValue} } /// Currency name public var name: String { - get {_storage._name} + get {return _storage._name} set {_uniqueStorage()._name = newValue} } /// Currency ticker symbol public var symbol: String { - get {_storage._symbol} + get {return _storage._symbol} set {_uniqueStorage()._symbol = newValue} } /// Currency description public var description_p: String { - get {_storage._description_p} + get {return _storage._description_p} set {_uniqueStorage()._description_p = newValue} } /// URL to currency image public var imageURL: String { - get {_storage._imageURL} + get {return _storage._imageURL} set {_uniqueStorage()._imageURL = newValue} } @@ -389,11 +389,11 @@ public struct Ocp_Currency_V1_Mint: @unchecked Sendable { /// /// Note: Only currencies with a VM are useable for payments public var vmMetadata: Ocp_Currency_V1_VmMetadata { - get {_storage._vmMetadata ?? Ocp_Currency_V1_VmMetadata()} + get {return _storage._vmMetadata ?? Ocp_Currency_V1_VmMetadata()} set {_uniqueStorage()._vmMetadata = newValue} } /// Returns true if `vmMetadata` has been explicitly set. - public var hasVmMetadata: Bool {_storage._vmMetadata != nil} + public var hasVmMetadata: Bool {return _storage._vmMetadata != nil} /// Clears the value of `vmMetadata`. Subsequent reads from it will return its default value. public mutating func clearVmMetadata() {_uniqueStorage()._vmMetadata = nil} @@ -401,47 +401,47 @@ public struct Ocp_Currency_V1_Mint: @unchecked Sendable { /// can be used for calculating price, market cap, etc. based on the exponential /// bonding curve public var launchpadMetadata: Ocp_Currency_V1_LaunchpadMetadata { - get {_storage._launchpadMetadata ?? Ocp_Currency_V1_LaunchpadMetadata()} + get {return _storage._launchpadMetadata ?? Ocp_Currency_V1_LaunchpadMetadata()} set {_uniqueStorage()._launchpadMetadata = newValue} } /// Returns true if `launchpadMetadata` has been explicitly set. - public var hasLaunchpadMetadata: Bool {_storage._launchpadMetadata != nil} + public var hasLaunchpadMetadata: Bool {return _storage._launchpadMetadata != nil} /// Clears the value of `launchpadMetadata`. Subsequent reads from it will return its default value. public mutating func clearLaunchpadMetadata() {_uniqueStorage()._launchpadMetadata = nil} /// Timestamp the currency was created public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_storage._createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _storage._createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_uniqueStorage()._createdAt = newValue} } /// Returns true if `createdAt` has been explicitly set. - public var hasCreatedAt: Bool {_storage._createdAt != nil} + public var hasCreatedAt: Bool {return _storage._createdAt != nil} /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. public mutating func clearCreatedAt() {_uniqueStorage()._createdAt = nil} /// Social links for this currency public var socialLinks: [Ocp_Currency_V1_SocialLink] { - get {_storage._socialLinks} + get {return _storage._socialLinks} set {_uniqueStorage()._socialLinks = newValue} } /// Bill customization for this currency. Use the default if not provided public var billCustomization: Ocp_Currency_V1_BillCustomization { - get {_storage._billCustomization ?? Ocp_Currency_V1_BillCustomization()} + get {return _storage._billCustomization ?? Ocp_Currency_V1_BillCustomization()} set {_uniqueStorage()._billCustomization = newValue} } /// Returns true if `billCustomization` has been explicitly set. - public var hasBillCustomization: Bool {_storage._billCustomization != nil} + public var hasBillCustomization: Bool {return _storage._billCustomization != nil} /// Clears the value of `billCustomization`. Subsequent reads from it will return its default value. public mutating func clearBillCustomization() {_uniqueStorage()._billCustomization = nil} /// Holder metrics. This is surfaced where needed (e.g. only in the Discover RPC) public var holderMetrics: Ocp_Currency_V1_HolderMetrics { - get {_storage._holderMetrics ?? Ocp_Currency_V1_HolderMetrics()} + get {return _storage._holderMetrics ?? Ocp_Currency_V1_HolderMetrics()} set {_uniqueStorage()._holderMetrics = newValue} } /// Returns true if `holderMetrics` has been explicitly set. - public var hasHolderMetrics: Bool {_storage._holderMetrics != nil} + public var hasHolderMetrics: Bool {return _storage._holderMetrics != nil} /// Clears the value of `holderMetrics`. Subsequent reads from it will return its default value. public mutating func clearHolderMetrics() {_uniqueStorage()._holderMetrics = nil} @@ -459,21 +459,21 @@ public struct Ocp_Currency_V1_VmMetadata: Sendable { /// VM address public var vm: Ocp_Common_V1_SolanaAccountId { - get {_vm ?? Ocp_Common_V1_SolanaAccountId()} + get {return _vm ?? Ocp_Common_V1_SolanaAccountId()} set {_vm = newValue} } /// Returns true if `vm` has been explicitly set. - public var hasVm: Bool {self._vm != nil} + public var hasVm: Bool {return self._vm != nil} /// Clears the value of `vm`. Subsequent reads from it will return its default value. public mutating func clearVm() {self._vm = nil} /// Authority that subsidizes and authorizes all transactions against the VM public var authority: Ocp_Common_V1_SolanaAccountId { - get {_authority ?? Ocp_Common_V1_SolanaAccountId()} + get {return _authority ?? Ocp_Common_V1_SolanaAccountId()} set {_authority = newValue} } /// Returns true if `authority` has been explicitly set. - public var hasAuthority: Bool {self._authority != nil} + public var hasAuthority: Bool {return self._authority != nil} /// Clears the value of `authority`. Subsequent reads from it will return its default value. public mutating func clearAuthority() {self._authority = nil} @@ -483,11 +483,11 @@ public struct Ocp_Currency_V1_VmMetadata: Sendable { /// VM omnibus address public var omnibus: Ocp_Common_V1_SolanaAccountId { - get {_omnibus ?? Ocp_Common_V1_SolanaAccountId()} + get {return _omnibus ?? Ocp_Common_V1_SolanaAccountId()} set {_omnibus = newValue} } /// Returns true if `omnibus` has been explicitly set. - public var hasOmnibus: Bool {self._omnibus != nil} + public var hasOmnibus: Bool {return self._omnibus != nil} /// Clears the value of `omnibus`. Subsequent reads from it will return its default value. public mutating func clearOmnibus() {self._omnibus = nil} @@ -507,61 +507,61 @@ public struct Ocp_Currency_V1_LaunchpadMetadata: Sendable { /// The address of the currency config public var currencyConfig: Ocp_Common_V1_SolanaAccountId { - get {_currencyConfig ?? Ocp_Common_V1_SolanaAccountId()} + get {return _currencyConfig ?? Ocp_Common_V1_SolanaAccountId()} set {_currencyConfig = newValue} } /// Returns true if `currencyConfig` has been explicitly set. - public var hasCurrencyConfig: Bool {self._currencyConfig != nil} + public var hasCurrencyConfig: Bool {return self._currencyConfig != nil} /// Clears the value of `currencyConfig`. Subsequent reads from it will return its default value. public mutating func clearCurrencyConfig() {self._currencyConfig = nil} /// The address of the liquidity pool public var liquidityPool: Ocp_Common_V1_SolanaAccountId { - get {_liquidityPool ?? Ocp_Common_V1_SolanaAccountId()} + get {return _liquidityPool ?? Ocp_Common_V1_SolanaAccountId()} set {_liquidityPool = newValue} } /// Returns true if `liquidityPool` has been explicitly set. - public var hasLiquidityPool: Bool {self._liquidityPool != nil} + public var hasLiquidityPool: Bool {return self._liquidityPool != nil} /// Clears the value of `liquidityPool`. Subsequent reads from it will return its default value. public mutating func clearLiquidityPool() {self._liquidityPool = nil} /// The random seed used during currency creation public var seed: Ocp_Common_V1_SolanaAccountId { - get {_seed ?? Ocp_Common_V1_SolanaAccountId()} + get {return _seed ?? Ocp_Common_V1_SolanaAccountId()} set {_seed = newValue} } /// Returns true if `seed` has been explicitly set. - public var hasSeed: Bool {self._seed != nil} + public var hasSeed: Bool {return self._seed != nil} /// Clears the value of `seed`. Subsequent reads from it will return its default value. public mutating func clearSeed() {self._seed = nil} /// The address of the authority for the currency public var authority: Ocp_Common_V1_SolanaAccountId { - get {_authority ?? Ocp_Common_V1_SolanaAccountId()} + get {return _authority ?? Ocp_Common_V1_SolanaAccountId()} set {_authority = newValue} } /// Returns true if `authority` has been explicitly set. - public var hasAuthority: Bool {self._authority != nil} + public var hasAuthority: Bool {return self._authority != nil} /// Clears the value of `authority`. Subsequent reads from it will return its default value. public mutating func clearAuthority() {self._authority = nil} /// The address where this mint's tokens are locked against the liquidity pool public var mintVault: Ocp_Common_V1_SolanaAccountId { - get {_mintVault ?? Ocp_Common_V1_SolanaAccountId()} + get {return _mintVault ?? Ocp_Common_V1_SolanaAccountId()} set {_mintVault = newValue} } /// Returns true if `mintVault` has been explicitly set. - public var hasMintVault: Bool {self._mintVault != nil} + public var hasMintVault: Bool {return self._mintVault != nil} /// Clears the value of `mintVault`. Subsequent reads from it will return its default value. public mutating func clearMintVault() {self._mintVault = nil} /// The address where core mint tokens are locked against the liquidity pool public var coreMintVault: Ocp_Common_V1_SolanaAccountId { - get {_coreMintVault ?? Ocp_Common_V1_SolanaAccountId()} + get {return _coreMintVault ?? Ocp_Common_V1_SolanaAccountId()} set {_coreMintVault = newValue} } /// Returns true if `coreMintVault` has been explicitly set. - public var hasCoreMintVault: Bool {self._coreMintVault != nil} + public var hasCoreMintVault: Bool {return self._coreMintVault != nil} /// Clears the value of `coreMintVault`. Subsequent reads from it will return its default value. public mutating func clearCoreMintVault() {self._coreMintVault = nil} @@ -596,11 +596,11 @@ public struct Ocp_Currency_V1_HistoricalMintData: Sendable { /// Timestamp for this data point public var timestamp: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_timestamp = newValue} } /// Returns true if `timestamp` has been explicitly set. - public var hasTimestamp: Bool {self._timestamp != nil} + public var hasTimestamp: Bool {return self._timestamp != nil} /// Clears the value of `timestamp`. Subsequent reads from it will return its default value. public mutating func clearTimestamp() {self._timestamp = nil} @@ -627,11 +627,11 @@ public struct Ocp_Currency_V1_CoreMintFiatExchangeRate: Sendable { /// Timestamp for this data point public var timestamp: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_timestamp = newValue} } /// Returns true if `timestamp` has been explicitly set. - public var hasTimestamp: Bool {self._timestamp != nil} + public var hasTimestamp: Bool {return self._timestamp != nil} /// Clears the value of `timestamp`. Subsequent reads from it will return its default value. public mutating func clearTimestamp() {self._timestamp = nil} @@ -649,20 +649,20 @@ public struct Ocp_Currency_V1_VerifiedCoreMintFiatExchangeRate: Sendable { // methods supported on all messages. public var exchangeRate: Ocp_Currency_V1_CoreMintFiatExchangeRate { - get {_exchangeRate ?? Ocp_Currency_V1_CoreMintFiatExchangeRate()} + get {return _exchangeRate ?? Ocp_Currency_V1_CoreMintFiatExchangeRate()} set {_exchangeRate = newValue} } /// Returns true if `exchangeRate` has been explicitly set. - public var hasExchangeRate: Bool {self._exchangeRate != nil} + public var hasExchangeRate: Bool {return self._exchangeRate != nil} /// Clears the value of `exchangeRate`. Subsequent reads from it will return its default value. public mutating func clearExchangeRate() {self._exchangeRate = nil} public var signature: Ocp_Common_V1_Signature { - get {_signature ?? Ocp_Common_V1_Signature()} + get {return _signature ?? Ocp_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} @@ -693,11 +693,11 @@ public struct Ocp_Currency_V1_LaunchpadCurrencyReserveState: Sendable { /// Launchpad currency mint address public var mint: Ocp_Common_V1_SolanaAccountId { - get {_mint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _mint ?? Ocp_Common_V1_SolanaAccountId()} set {_mint = newValue} } /// Returns true if `mint` has been explicitly set. - public var hasMint: Bool {self._mint != nil} + public var hasMint: Bool {return self._mint != nil} /// Clears the value of `mint`. Subsequent reads from it will return its default value. public mutating func clearMint() {self._mint = nil} @@ -706,11 +706,11 @@ public struct Ocp_Currency_V1_LaunchpadCurrencyReserveState: Sendable { /// Timestamp for this data point public var timestamp: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_timestamp = newValue} } /// Returns true if `timestamp` has been explicitly set. - public var hasTimestamp: Bool {self._timestamp != nil} + public var hasTimestamp: Bool {return self._timestamp != nil} /// Clears the value of `timestamp`. Subsequent reads from it will return its default value. public mutating func clearTimestamp() {self._timestamp = nil} @@ -729,20 +729,20 @@ public struct Ocp_Currency_V1_VerifiedLaunchpadCurrencyReserveState: Sendable { // methods supported on all messages. public var reserveState: Ocp_Currency_V1_LaunchpadCurrencyReserveState { - get {_reserveState ?? Ocp_Currency_V1_LaunchpadCurrencyReserveState()} + get {return _reserveState ?? Ocp_Currency_V1_LaunchpadCurrencyReserveState()} set {_reserveState = newValue} } /// Returns true if `reserveState` has been explicitly set. - public var hasReserveState: Bool {self._reserveState != nil} + public var hasReserveState: Bool {return self._reserveState != nil} /// Clears the value of `reserveState`. Subsequent reads from it will return its default value. public mutating func clearReserveState() {self._reserveState = nil} public var signature: Ocp_Common_V1_Signature { - get {_signature ?? Ocp_Common_V1_Signature()} + get {return _signature ?? Ocp_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} @@ -932,11 +932,11 @@ public struct Ocp_Currency_V1_LaunchRequest: Sendable { /// The owner account launching the currency public var owner: Ocp_Common_V1_SolanaAccountId { - get {_owner ?? Ocp_Common_V1_SolanaAccountId()} + get {return _owner ?? Ocp_Common_V1_SolanaAccountId()} set {_owner = newValue} } /// Returns true if `owner` has been explicitly set. - public var hasOwner: Bool {self._owner != nil} + public var hasOwner: Bool {return self._owner != nil} /// Clears the value of `owner`. Subsequent reads from it will return its default value. public mutating func clearOwner() {self._owner = nil} @@ -944,11 +944,11 @@ public struct Ocp_Currency_V1_LaunchRequest: Sendable { /// using the private key of the owner account. This provides an authentication /// mechanism to the RPC. public var signature: Ocp_Common_V1_Signature { - get {_signature ?? Ocp_Common_V1_Signature()} + get {return _signature ?? Ocp_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} @@ -966,11 +966,11 @@ public struct Ocp_Currency_V1_LaunchRequest: Sendable { /// Optional bill customization. If not provided, a default will be set. public var billCustomization: Ocp_Currency_V1_BillCustomization { - get {_billCustomization ?? Ocp_Currency_V1_BillCustomization()} + get {return _billCustomization ?? Ocp_Currency_V1_BillCustomization()} set {_billCustomization = newValue} } /// Returns true if `billCustomization` has been explicitly set. - public var hasBillCustomization: Bool {self._billCustomization != nil} + public var hasBillCustomization: Bool {return self._billCustomization != nil} /// Clears the value of `billCustomization`. Subsequent reads from it will return its default value. public mutating func clearBillCustomization() {self._billCustomization = nil} @@ -979,41 +979,41 @@ public struct Ocp_Currency_V1_LaunchRequest: Sendable { /// Attestation that the name passed moderation public var nameModerationAttestation: Ocp_Currency_V1_ModerationAttestation { - get {_nameModerationAttestation ?? Ocp_Currency_V1_ModerationAttestation()} + get {return _nameModerationAttestation ?? Ocp_Currency_V1_ModerationAttestation()} set {_nameModerationAttestation = newValue} } /// Returns true if `nameModerationAttestation` has been explicitly set. - public var hasNameModerationAttestation: Bool {self._nameModerationAttestation != nil} + public var hasNameModerationAttestation: Bool {return self._nameModerationAttestation != nil} /// Clears the value of `nameModerationAttestation`. Subsequent reads from it will return its default value. public mutating func clearNameModerationAttestation() {self._nameModerationAttestation = nil} /// Attestation that the symbol, if provided, passed moderation public var symbolModerationAttestation: Ocp_Currency_V1_ModerationAttestation { - get {_symbolModerationAttestation ?? Ocp_Currency_V1_ModerationAttestation()} + get {return _symbolModerationAttestation ?? Ocp_Currency_V1_ModerationAttestation()} set {_symbolModerationAttestation = newValue} } /// Returns true if `symbolModerationAttestation` has been explicitly set. - public var hasSymbolModerationAttestation: Bool {self._symbolModerationAttestation != nil} + public var hasSymbolModerationAttestation: Bool {return self._symbolModerationAttestation != nil} /// Clears the value of `symbolModerationAttestation`. Subsequent reads from it will return its default value. public mutating func clearSymbolModerationAttestation() {self._symbolModerationAttestation = nil} /// Attestation that the descritpion, if provided, passed moderation public var descriptionModerationAttestation: Ocp_Currency_V1_ModerationAttestation { - get {_descriptionModerationAttestation ?? Ocp_Currency_V1_ModerationAttestation()} + get {return _descriptionModerationAttestation ?? Ocp_Currency_V1_ModerationAttestation()} set {_descriptionModerationAttestation = newValue} } /// Returns true if `descriptionModerationAttestation` has been explicitly set. - public var hasDescriptionModerationAttestation: Bool {self._descriptionModerationAttestation != nil} + public var hasDescriptionModerationAttestation: Bool {return self._descriptionModerationAttestation != nil} /// Clears the value of `descriptionModerationAttestation`. Subsequent reads from it will return its default value. public mutating func clearDescriptionModerationAttestation() {self._descriptionModerationAttestation = nil} /// Attestation that the icon image, if provided, passed moderation public var iconModerationAttestation: Ocp_Currency_V1_ModerationAttestation { - get {_iconModerationAttestation ?? Ocp_Currency_V1_ModerationAttestation()} + get {return _iconModerationAttestation ?? Ocp_Currency_V1_ModerationAttestation()} set {_iconModerationAttestation = newValue} } /// Returns true if `iconModerationAttestation` has been explicitly set. - public var hasIconModerationAttestation: Bool {self._iconModerationAttestation != nil} + public var hasIconModerationAttestation: Bool {return self._iconModerationAttestation != nil} /// Clears the value of `iconModerationAttestation`. Subsequent reads from it will return its default value. public mutating func clearIconModerationAttestation() {self._iconModerationAttestation = nil} @@ -1039,11 +1039,11 @@ public struct Ocp_Currency_V1_LaunchResponse: Sendable { /// The mint address of the launched currency on success public var mint: Ocp_Common_V1_SolanaAccountId { - get {_mint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _mint ?? Ocp_Common_V1_SolanaAccountId()} set {_mint = newValue} } /// Returns true if `mint` has been explicitly set. - public var hasMint: Bool {self._mint != nil} + public var hasMint: Bool {return self._mint != nil} /// Clears the value of `mint`. Subsequent reads from it will return its default value. public mutating func clearMint() {self._mint = nil} @@ -1109,11 +1109,11 @@ public struct Ocp_Currency_V1_UpdateIconRequest: Sendable { /// The owner account of the currency public var owner: Ocp_Common_V1_SolanaAccountId { - get {_owner ?? Ocp_Common_V1_SolanaAccountId()} + get {return _owner ?? Ocp_Common_V1_SolanaAccountId()} set {_owner = newValue} } /// Returns true if `owner` has been explicitly set. - public var hasOwner: Bool {self._owner != nil} + public var hasOwner: Bool {return self._owner != nil} /// Clears the value of `owner`. Subsequent reads from it will return its default value. public mutating func clearOwner() {self._owner = nil} @@ -1121,21 +1121,21 @@ public struct Ocp_Currency_V1_UpdateIconRequest: Sendable { /// using the private key of the owner account. This provides an authentication /// mechanism to the RPC. public var signature: Ocp_Common_V1_Signature { - get {_signature ?? Ocp_Common_V1_Signature()} + get {return _signature ?? Ocp_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} /// The mint address of the currency to update public var mint: Ocp_Common_V1_SolanaAccountId { - get {_mint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _mint ?? Ocp_Common_V1_SolanaAccountId()} set {_mint = newValue} } /// Returns true if `mint` has been explicitly set. - public var hasMint: Bool {self._mint != nil} + public var hasMint: Bool {return self._mint != nil} /// Clears the value of `mint`. Subsequent reads from it will return its default value. public mutating func clearMint() {self._mint = nil} @@ -1144,11 +1144,11 @@ public struct Ocp_Currency_V1_UpdateIconRequest: Sendable { /// Attestation that the icon image passed moderation public var moderationAttestation: Ocp_Currency_V1_ModerationAttestation { - get {_moderationAttestation ?? Ocp_Currency_V1_ModerationAttestation()} + get {return _moderationAttestation ?? Ocp_Currency_V1_ModerationAttestation()} set {_moderationAttestation = newValue} } /// Returns true if `moderationAttestation` has been explicitly set. - public var hasModerationAttestation: Bool {self._moderationAttestation != nil} + public var hasModerationAttestation: Bool {return self._moderationAttestation != nil} /// Clears the value of `moderationAttestation`. Subsequent reads from it will return its default value. public mutating func clearModerationAttestation() {self._moderationAttestation = nil} @@ -1223,11 +1223,11 @@ public struct Ocp_Currency_V1_UpdateMetadataRequest: Sendable { /// The owner account of the currency public var owner: Ocp_Common_V1_SolanaAccountId { - get {_owner ?? Ocp_Common_V1_SolanaAccountId()} + get {return _owner ?? Ocp_Common_V1_SolanaAccountId()} set {_owner = newValue} } /// Returns true if `owner` has been explicitly set. - public var hasOwner: Bool {self._owner != nil} + public var hasOwner: Bool {return self._owner != nil} /// Clears the value of `owner`. Subsequent reads from it will return its default value. public mutating func clearOwner() {self._owner = nil} @@ -1235,52 +1235,52 @@ public struct Ocp_Currency_V1_UpdateMetadataRequest: Sendable { /// using the private key of the owner account. This provides an authentication /// mechanism to the RPC. public var signature: Ocp_Common_V1_Signature { - get {_signature ?? Ocp_Common_V1_Signature()} + get {return _signature ?? Ocp_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} /// The mint address of the currency to update public var mint: Ocp_Common_V1_SolanaAccountId { - get {_mint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _mint ?? Ocp_Common_V1_SolanaAccountId()} set {_mint = newValue} } /// Returns true if `mint` has been explicitly set. - public var hasMint: Bool {self._mint != nil} + public var hasMint: Bool {return self._mint != nil} /// Clears the value of `mint`. Subsequent reads from it will return its default value. public mutating func clearMint() {self._mint = nil} /// Updated currency description. If not provided, description is not updated. public var newDescription: Ocp_Currency_V1_UpdateMetadataRequest.DescriptionUpdate { - get {_newDescription ?? Ocp_Currency_V1_UpdateMetadataRequest.DescriptionUpdate()} + get {return _newDescription ?? Ocp_Currency_V1_UpdateMetadataRequest.DescriptionUpdate()} set {_newDescription = newValue} } /// Returns true if `newDescription` has been explicitly set. - public var hasNewDescription: Bool {self._newDescription != nil} + public var hasNewDescription: Bool {return self._newDescription != nil} /// Clears the value of `newDescription`. Subsequent reads from it will return its default value. public mutating func clearNewDescription() {self._newDescription = nil} /// Updated bill customization. If not provided, bill customization is not updated. public var newBillCustomization: Ocp_Currency_V1_UpdateMetadataRequest.BillCustomizationUpdate { - get {_newBillCustomization ?? Ocp_Currency_V1_UpdateMetadataRequest.BillCustomizationUpdate()} + get {return _newBillCustomization ?? Ocp_Currency_V1_UpdateMetadataRequest.BillCustomizationUpdate()} set {_newBillCustomization = newValue} } /// Returns true if `newBillCustomization` has been explicitly set. - public var hasNewBillCustomization: Bool {self._newBillCustomization != nil} + public var hasNewBillCustomization: Bool {return self._newBillCustomization != nil} /// Clears the value of `newBillCustomization`. Subsequent reads from it will return its default value. public mutating func clearNewBillCustomization() {self._newBillCustomization = nil} /// Updated social links. This replaces the entire set of social links. If not /// provided, social links are not updated. public var newSocialLinks: Ocp_Currency_V1_UpdateMetadataRequest.SocialLinksUpdate { - get {_newSocialLinks ?? Ocp_Currency_V1_UpdateMetadataRequest.SocialLinksUpdate()} + get {return _newSocialLinks ?? Ocp_Currency_V1_UpdateMetadataRequest.SocialLinksUpdate()} set {_newSocialLinks = newValue} } /// Returns true if `newSocialLinks` has been explicitly set. - public var hasNewSocialLinks: Bool {self._newSocialLinks != nil} + public var hasNewSocialLinks: Bool {return self._newSocialLinks != nil} /// Clears the value of `newSocialLinks`. Subsequent reads from it will return its default value. public mutating func clearNewSocialLinks() {self._newSocialLinks = nil} @@ -1295,11 +1295,11 @@ public struct Ocp_Currency_V1_UpdateMetadataRequest: Sendable { /// Attestation that the description passed moderation public var moderationAttestation: Ocp_Currency_V1_ModerationAttestation { - get {_moderationAttestation ?? Ocp_Currency_V1_ModerationAttestation()} + get {return _moderationAttestation ?? Ocp_Currency_V1_ModerationAttestation()} set {_moderationAttestation = newValue} } /// Returns true if `moderationAttestation` has been explicitly set. - public var hasModerationAttestation: Bool {self._moderationAttestation != nil} + public var hasModerationAttestation: Bool {return self._moderationAttestation != nil} /// Clears the value of `moderationAttestation`. Subsequent reads from it will return its default value. public mutating func clearModerationAttestation() {self._moderationAttestation = nil} @@ -1316,11 +1316,11 @@ public struct Ocp_Currency_V1_UpdateMetadataRequest: Sendable { // methods supported on all messages. public var value: Ocp_Currency_V1_BillCustomization { - get {_value ?? Ocp_Currency_V1_BillCustomization()} + get {return _value ?? Ocp_Currency_V1_BillCustomization()} set {_value = newValue} } /// Returns true if `value` has been explicitly set. - public var hasValue: Bool {self._value != nil} + public var hasValue: Bool {return self._value != nil} /// Clears the value of `value`. Subsequent reads from it will return its default value. public mutating func clearValue() {self._value = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/messaging_v1_ocp_messaging_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/messaging_v1_ocp_messaging_service.grpc.swift index 663bbe693..b47879442 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/messaging_v1_ocp_messaging_service.grpc.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/messaging_v1_ocp_messaging_service.grpc.swift @@ -15,13 +15,13 @@ import GRPCProtobuf /// Namespace containing generated types for the "ocp.messaging.v1.Messaging" service. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) -public enum Ocp_Messaging_V1_Messaging: Sendable { +public enum Ocp_Messaging_V1_Messaging { /// Service descriptor for the "ocp.messaging.v1.Messaging" service. public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.messaging.v1.Messaging") /// Namespace for method metadata. - public enum Method: Sendable { + public enum Method { /// Namespace for "OpenMessageStream" metadata. - public enum OpenMessageStream: Sendable { + public enum OpenMessageStream { /// Request type for "OpenMessageStream". public typealias Input = Ocp_Messaging_V1_OpenMessageStreamRequest /// Response type for "OpenMessageStream". @@ -29,12 +29,11 @@ public enum Ocp_Messaging_V1_Messaging: Sendable { /// Descriptor for "OpenMessageStream". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.messaging.v1.Messaging"), - method: "OpenMessageStream", - type: .serverStreaming + method: "OpenMessageStream" ) } /// Namespace for "OpenMessageStreamWithKeepAlive" metadata. - public enum OpenMessageStreamWithKeepAlive: Sendable { + public enum OpenMessageStreamWithKeepAlive { /// Request type for "OpenMessageStreamWithKeepAlive". public typealias Input = Ocp_Messaging_V1_OpenMessageStreamWithKeepAliveRequest /// Response type for "OpenMessageStreamWithKeepAlive". @@ -42,12 +41,11 @@ public enum Ocp_Messaging_V1_Messaging: Sendable { /// Descriptor for "OpenMessageStreamWithKeepAlive". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.messaging.v1.Messaging"), - method: "OpenMessageStreamWithKeepAlive", - type: .bidirectionalStreaming + method: "OpenMessageStreamWithKeepAlive" ) } /// Namespace for "PollMessages" metadata. - public enum PollMessages: Sendable { + public enum PollMessages { /// Request type for "PollMessages". public typealias Input = Ocp_Messaging_V1_PollMessagesRequest /// Response type for "PollMessages". @@ -55,12 +53,11 @@ public enum Ocp_Messaging_V1_Messaging: Sendable { /// Descriptor for "PollMessages". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.messaging.v1.Messaging"), - method: "PollMessages", - type: .unary + method: "PollMessages" ) } /// Namespace for "AckMessages" metadata. - public enum AckMessages: Sendable { + public enum AckMessages { /// Request type for "AckMessages". public typealias Input = Ocp_Messaging_V1_AckMessagesRequest /// Response type for "AckMessages". @@ -68,12 +65,11 @@ public enum Ocp_Messaging_V1_Messaging: Sendable { /// Descriptor for "AckMessages". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.messaging.v1.Messaging"), - method: "AckMessages", - type: .unary + method: "AckMessages" ) } /// Namespace for "SendMessage" metadata. - public enum SendMessage: Sendable { + public enum SendMessage { /// Request type for "SendMessage". public typealias Input = Ocp_Messaging_V1_SendMessageRequest /// Response type for "SendMessage". @@ -81,8 +77,7 @@ public enum Ocp_Messaging_V1_Messaging: Sendable { /// Descriptor for "SendMessage". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.messaging.v1.Messaging"), - method: "SendMessage", - type: .unary + method: "SendMessage" ) } /// Descriptors for all methods in the "ocp.messaging.v1.Messaging" service. diff --git a/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/messaging_v1_ocp_messaging_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/messaging_v1_ocp_messaging_service.pb.swift index 928ca77ef..bb24cb524 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/messaging_v1_ocp_messaging_service.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/messaging_v1_ocp_messaging_service.pb.swift @@ -27,11 +27,11 @@ public struct Ocp_Messaging_V1_OpenMessageStreamRequest: Sendable { // methods supported on all messages. public var rendezvousKey: Ocp_Messaging_V1_RendezvousKey { - get {_rendezvousKey ?? Ocp_Messaging_V1_RendezvousKey()} + get {return _rendezvousKey ?? Ocp_Messaging_V1_RendezvousKey()} set {_rendezvousKey = newValue} } /// Returns true if `rendezvousKey` has been explicitly set. - public var hasRendezvousKey: Bool {self._rendezvousKey != nil} + public var hasRendezvousKey: Bool {return self._rendezvousKey != nil} /// Clears the value of `rendezvousKey`. Subsequent reads from it will return its default value. public mutating func clearRendezvousKey() {self._rendezvousKey = nil} @@ -39,11 +39,11 @@ public struct Ocp_Messaging_V1_OpenMessageStreamRequest: Sendable { /// /// todo: Make required once clients migrate public var signature: Ocp_Common_V1_Signature { - get {_signature ?? Ocp_Common_V1_Signature()} + get {return _signature ?? Ocp_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} @@ -141,21 +141,21 @@ public struct Ocp_Messaging_V1_PollMessagesRequest: Sendable { // methods supported on all messages. public var rendezvousKey: Ocp_Messaging_V1_RendezvousKey { - get {_rendezvousKey ?? Ocp_Messaging_V1_RendezvousKey()} + get {return _rendezvousKey ?? Ocp_Messaging_V1_RendezvousKey()} set {_rendezvousKey = newValue} } /// Returns true if `rendezvousKey` has been explicitly set. - public var hasRendezvousKey: Bool {self._rendezvousKey != nil} + public var hasRendezvousKey: Bool {return self._rendezvousKey != nil} /// Clears the value of `rendezvousKey`. Subsequent reads from it will return its default value. public mutating func clearRendezvousKey() {self._rendezvousKey = nil} /// The signature is of serialize(PollMessagesRequest) using rendezvous_key. public var signature: Ocp_Common_V1_Signature { - get {_signature ?? Ocp_Common_V1_Signature()} + get {return _signature ?? Ocp_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} @@ -185,11 +185,11 @@ public struct Ocp_Messaging_V1_AckMessagesRequest: Sendable { // methods supported on all messages. public var rendezvousKey: Ocp_Messaging_V1_RendezvousKey { - get {_rendezvousKey ?? Ocp_Messaging_V1_RendezvousKey()} + get {return _rendezvousKey ?? Ocp_Messaging_V1_RendezvousKey()} set {_rendezvousKey = newValue} } /// Returns true if `rendezvousKey` has been explicitly set. - public var hasRendezvousKey: Bool {self._rendezvousKey != nil} + public var hasRendezvousKey: Bool {return self._rendezvousKey != nil} /// Clears the value of `rendezvousKey`. Subsequent reads from it will return its default value. public mutating func clearRendezvousKey() {self._rendezvousKey = nil} @@ -251,31 +251,31 @@ public struct Ocp_Messaging_V1_SendMessageRequest: Sendable { /// The message to send. Types of messages clients can send are restricted. public var message: Ocp_Messaging_V1_Message { - get {_message ?? Ocp_Messaging_V1_Message()} + get {return _message ?? Ocp_Messaging_V1_Message()} set {_message = newValue} } /// Returns true if `message` has been explicitly set. - public var hasMessage: Bool {self._message != nil} + public var hasMessage: Bool {return self._message != nil} /// Clears the value of `message`. Subsequent reads from it will return its default value. public mutating func clearMessage() {self._message = nil} /// The rendezvous key that the message should be routed to. public var rendezvousKey: Ocp_Messaging_V1_RendezvousKey { - get {_rendezvousKey ?? Ocp_Messaging_V1_RendezvousKey()} + get {return _rendezvousKey ?? Ocp_Messaging_V1_RendezvousKey()} set {_rendezvousKey = newValue} } /// Returns true if `rendezvousKey` has been explicitly set. - public var hasRendezvousKey: Bool {self._rendezvousKey != nil} + public var hasRendezvousKey: Bool {return self._rendezvousKey != nil} /// Clears the value of `rendezvousKey`. Subsequent reads from it will return its default value. public mutating func clearRendezvousKey() {self._rendezvousKey = nil} /// The signature is of serialize(Message) using the PrivateKey of the keypair. public var signature: Ocp_Common_V1_Signature { - get {_signature ?? Ocp_Common_V1_Signature()} + get {return _signature ?? Ocp_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} @@ -297,11 +297,11 @@ public struct Ocp_Messaging_V1_SendMessageResponse: Sendable { /// Set if result == OK. public var messageID: Ocp_Messaging_V1_MessageId { - get {_messageID ?? Ocp_Messaging_V1_MessageId()} + get {return _messageID ?? Ocp_Messaging_V1_MessageId()} set {_messageID = newValue} } /// Returns true if `messageID` has been explicitly set. - public var hasMessageID: Bool {self._messageID != nil} + public var hasMessageID: Bool {return self._messageID != nil} /// Clears the value of `messageID`. Subsequent reads from it will return its default value. public mutating func clearMessageID() {self._messageID = nil} @@ -386,11 +386,11 @@ public struct Ocp_Messaging_V1_RequestToGrabBill: Sendable { /// Requestor is the virtual token account on the VM to which a payment /// should be sent. public var requestorAccount: Ocp_Common_V1_SolanaAccountId { - get {_requestorAccount ?? Ocp_Common_V1_SolanaAccountId()} + get {return _requestorAccount ?? Ocp_Common_V1_SolanaAccountId()} set {_requestorAccount = newValue} } /// Returns true if `requestorAccount` has been explicitly set. - public var hasRequestorAccount: Bool {self._requestorAccount != nil} + public var hasRequestorAccount: Bool {return self._requestorAccount != nil} /// Clears the value of `requestorAccount`. Subsequent reads from it will return its default value. public mutating func clearRequestorAccount() {self._requestorAccount = nil} @@ -408,11 +408,11 @@ public struct Ocp_Messaging_V1_RequestToGiveBillServerContext: Sendable { /// Mint metadata for the bill's mint public var mintMetadata: Ocp_Currency_V1_Mint { - get {_mintMetadata ?? Ocp_Currency_V1_Mint()} + get {return _mintMetadata ?? Ocp_Currency_V1_Mint()} set {_mintMetadata = newValue} } /// Returns true if `mintMetadata` has been explicitly set. - public var hasMintMetadata: Bool {self._mintMetadata != nil} + public var hasMintMetadata: Bool {return self._mintMetadata != nil} /// Clears the value of `mintMetadata`. Subsequent reads from it will return its default value. public mutating func clearMintMetadata() {self._mintMetadata = nil} @@ -433,11 +433,11 @@ public struct Ocp_Messaging_V1_RequestToGiveBill: Sendable { /// The mint that the bill will be received in public var mint: Ocp_Common_V1_SolanaAccountId { - get {_mint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _mint ?? Ocp_Common_V1_SolanaAccountId()} set {_mint = newValue} } /// Returns true if `mint` has been explicitly set. - public var hasMint: Bool {self._mint != nil} + public var hasMint: Bool {return self._mint != nil} /// Clears the value of `mint`. Subsequent reads from it will return its default value. public mutating func clearMint() {self._mint = nil} @@ -445,11 +445,11 @@ public struct Ocp_Messaging_V1_RequestToGiveBill: Sendable { /// to support subsequent gives. Clients should be aware of timeouts and dismiss a /// bill if the threshold is met. public var exchangeData: Ocp_Transaction_V1_VerifiedExchangeData { - get {_exchangeData ?? Ocp_Transaction_V1_VerifiedExchangeData()} + get {return _exchangeData ?? Ocp_Transaction_V1_VerifiedExchangeData()} set {_exchangeData = newValue} } /// Returns true if `exchangeData` has been explicitly set. - public var hasExchangeData: Bool {self._exchangeData != nil} + public var hasExchangeData: Bool {return self._exchangeData != nil} /// Clears the value of `exchangeData`. Subsequent reads from it will return its default value. public mutating func clearExchangeData() {self._exchangeData = nil} @@ -473,11 +473,11 @@ public struct Ocp_Messaging_V1_Message: @unchecked Sendable { /// 1. Reserve the ability for any future ID changes /// 2. Prevent clients attempting to collide message IDs. public var id: Ocp_Messaging_V1_MessageId { - get {_storage._id ?? Ocp_Messaging_V1_MessageId()} + get {return _storage._id ?? Ocp_Messaging_V1_MessageId()} set {_uniqueStorage()._id = newValue} } /// Returns true if `id` has been explicitly set. - public var hasID: Bool {_storage._id != nil} + public var hasID: Bool {return _storage._id != nil} /// Clears the value of `id`. Subsequent reads from it will return its default value. public mutating func clearID() {_uniqueStorage()._id = nil} @@ -485,11 +485,11 @@ public struct Ocp_Messaging_V1_Message: @unchecked Sendable { /// This enables clients to ensure no MITM attacks were performed to hijack contents /// of the typed message. This is only applicable for messages not generated by server. public var sendMessageRequestSignature: Ocp_Common_V1_Signature { - get {_storage._sendMessageRequestSignature ?? Ocp_Common_V1_Signature()} + get {return _storage._sendMessageRequestSignature ?? Ocp_Common_V1_Signature()} set {_uniqueStorage()._sendMessageRequestSignature = newValue} } /// Returns true if `sendMessageRequestSignature` has been explicitly set. - public var hasSendMessageRequestSignature: Bool {_storage._sendMessageRequestSignature != nil} + public var hasSendMessageRequestSignature: Bool {return _storage._sendMessageRequestSignature != nil} /// Clears the value of `sendMessageRequestSignature`. Subsequent reads from it will return its default value. public mutating func clearSendMessageRequestSignature() {_uniqueStorage()._sendMessageRequestSignature = nil} @@ -516,11 +516,11 @@ public struct Ocp_Messaging_V1_Message: @unchecked Sendable { /// Additional server-provided context for messages sent by client public var additionalContext: Ocp_Messaging_V1_AdditionalServerContext { - get {_storage._additionalContext ?? Ocp_Messaging_V1_AdditionalServerContext()} + get {return _storage._additionalContext ?? Ocp_Messaging_V1_AdditionalServerContext()} set {_uniqueStorage()._additionalContext = newValue} } /// Returns true if `additionalContext` has been explicitly set. - public var hasAdditionalContext: Bool {_storage._additionalContext != nil} + public var hasAdditionalContext: Bool {return _storage._additionalContext != nil} /// Clears the value of `additionalContext`. Subsequent reads from it will return its default value. public mutating func clearAdditionalContext() {_uniqueStorage()._additionalContext = nil} diff --git a/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/transaction_v1_ocp_transaction_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/transaction_v1_ocp_transaction_service.grpc.swift index 587d901c7..bc41e87f4 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/transaction_v1_ocp_transaction_service.grpc.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/transaction_v1_ocp_transaction_service.grpc.swift @@ -15,13 +15,13 @@ import GRPCProtobuf /// Namespace containing generated types for the "ocp.transaction.v1.Transaction" service. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) -public enum Ocp_Transaction_V1_Transaction: Sendable { +public enum Ocp_Transaction_V1_Transaction { /// Service descriptor for the "ocp.transaction.v1.Transaction" service. public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.transaction.v1.Transaction") /// Namespace for method metadata. - public enum Method: Sendable { + public enum Method { /// Namespace for "SubmitIntent" metadata. - public enum SubmitIntent: Sendable { + public enum SubmitIntent { /// Request type for "SubmitIntent". public typealias Input = Ocp_Transaction_V1_SubmitIntentRequest /// Response type for "SubmitIntent". @@ -29,12 +29,11 @@ public enum Ocp_Transaction_V1_Transaction: Sendable { /// Descriptor for "SubmitIntent". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.transaction.v1.Transaction"), - method: "SubmitIntent", - type: .bidirectionalStreaming + method: "SubmitIntent" ) } /// Namespace for "GetIntentMetadata" metadata. - public enum GetIntentMetadata: Sendable { + public enum GetIntentMetadata { /// Request type for "GetIntentMetadata". public typealias Input = Ocp_Transaction_V1_GetIntentMetadataRequest /// Response type for "GetIntentMetadata". @@ -42,12 +41,11 @@ public enum Ocp_Transaction_V1_Transaction: Sendable { /// Descriptor for "GetIntentMetadata". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.transaction.v1.Transaction"), - method: "GetIntentMetadata", - type: .unary + method: "GetIntentMetadata" ) } /// Namespace for "GetLimits" metadata. - public enum GetLimits: Sendable { + public enum GetLimits { /// Request type for "GetLimits". public typealias Input = Ocp_Transaction_V1_GetLimitsRequest /// Response type for "GetLimits". @@ -55,12 +53,11 @@ public enum Ocp_Transaction_V1_Transaction: Sendable { /// Descriptor for "GetLimits". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.transaction.v1.Transaction"), - method: "GetLimits", - type: .unary + method: "GetLimits" ) } /// Namespace for "CanWithdrawToAccount" metadata. - public enum CanWithdrawToAccount: Sendable { + public enum CanWithdrawToAccount { /// Request type for "CanWithdrawToAccount". public typealias Input = Ocp_Transaction_V1_CanWithdrawToAccountRequest /// Response type for "CanWithdrawToAccount". @@ -68,12 +65,11 @@ public enum Ocp_Transaction_V1_Transaction: Sendable { /// Descriptor for "CanWithdrawToAccount". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.transaction.v1.Transaction"), - method: "CanWithdrawToAccount", - type: .unary + method: "CanWithdrawToAccount" ) } /// Namespace for "VoidGiftCard" metadata. - public enum VoidGiftCard: Sendable { + public enum VoidGiftCard { /// Request type for "VoidGiftCard". public typealias Input = Ocp_Transaction_V1_VoidGiftCardRequest /// Response type for "VoidGiftCard". @@ -81,12 +77,11 @@ public enum Ocp_Transaction_V1_Transaction: Sendable { /// Descriptor for "VoidGiftCard". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.transaction.v1.Transaction"), - method: "VoidGiftCard", - type: .unary + method: "VoidGiftCard" ) } /// Namespace for "StatefulSwap" metadata. - public enum StatefulSwap: Sendable { + public enum StatefulSwap { /// Request type for "StatefulSwap". public typealias Input = Ocp_Transaction_V1_StatefulSwapRequest /// Response type for "StatefulSwap". @@ -94,12 +89,11 @@ public enum Ocp_Transaction_V1_Transaction: Sendable { /// Descriptor for "StatefulSwap". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.transaction.v1.Transaction"), - method: "StatefulSwap", - type: .bidirectionalStreaming + method: "StatefulSwap" ) } /// Namespace for "StatelessSwap" metadata. - public enum StatelessSwap: Sendable { + public enum StatelessSwap { /// Request type for "StatelessSwap". public typealias Input = Ocp_Transaction_V1_StatelessSwapRequest /// Response type for "StatelessSwap". @@ -107,12 +101,11 @@ public enum Ocp_Transaction_V1_Transaction: Sendable { /// Descriptor for "StatelessSwap". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.transaction.v1.Transaction"), - method: "StatelessSwap", - type: .bidirectionalStreaming + method: "StatelessSwap" ) } /// Namespace for "GetSwap" metadata. - public enum GetSwap: Sendable { + public enum GetSwap { /// Request type for "GetSwap". public typealias Input = Ocp_Transaction_V1_GetSwapRequest /// Response type for "GetSwap". @@ -120,12 +113,11 @@ public enum Ocp_Transaction_V1_Transaction: Sendable { /// Descriptor for "GetSwap". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.transaction.v1.Transaction"), - method: "GetSwap", - type: .unary + method: "GetSwap" ) } /// Namespace for "GetPendingSwaps" metadata. - public enum GetPendingSwaps: Sendable { + public enum GetPendingSwaps { /// Request type for "GetPendingSwaps". public typealias Input = Ocp_Transaction_V1_GetPendingSwapsRequest /// Response type for "GetPendingSwaps". @@ -133,8 +125,7 @@ public enum Ocp_Transaction_V1_Transaction: Sendable { /// Descriptor for "GetPendingSwaps". public static let descriptor = GRPCCore.MethodDescriptor( service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "ocp.transaction.v1.Transaction"), - method: "GetPendingSwaps", - type: .unary + method: "GetPendingSwaps" ) } /// Descriptors for all methods in the "ocp.transaction.v1.Transaction" service. diff --git a/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/transaction_v1_ocp_transaction_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/transaction_v1_ocp_transaction_service.pb.swift index dd5b3dbb9..d4eea43c8 100644 --- a/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/transaction_v1_ocp_transaction_service.pb.swift +++ b/FlipcashAPI/Sources/FlipcashAPI/Payments/Generated/transaction_v1_ocp_transaction_service.pb.swift @@ -102,31 +102,31 @@ public struct Ocp_Transaction_V1_SubmitIntentRequest: Sendable { /// The globally unique client generated intent ID. Use the original intent /// ID when operating on actions that mutate the intent. public var id: Ocp_Common_V1_IntentId { - get {_id ?? Ocp_Common_V1_IntentId()} + get {return _id ?? Ocp_Common_V1_IntentId()} set {_id = newValue} } /// Returns true if `id` has been explicitly set. - public var hasID: Bool {self._id != nil} + public var hasID: Bool {return self._id != nil} /// Clears the value of `id`. Subsequent reads from it will return its default value. public mutating func clearID() {self._id = nil} /// The verified owner account public key public var owner: Ocp_Common_V1_SolanaAccountId { - get {_owner ?? Ocp_Common_V1_SolanaAccountId()} + get {return _owner ?? Ocp_Common_V1_SolanaAccountId()} set {_owner = newValue} } /// Returns true if `owner` has been explicitly set. - public var hasOwner: Bool {self._owner != nil} + public var hasOwner: Bool {return self._owner != nil} /// Clears the value of `owner`. Subsequent reads from it will return its default value. public mutating func clearOwner() {self._owner = nil} /// Additional metadata that describes the high-level intention public var metadata: Ocp_Transaction_V1_Metadata { - get {_metadata ?? Ocp_Transaction_V1_Metadata()} + get {return _metadata ?? Ocp_Transaction_V1_Metadata()} set {_metadata = newValue} } /// Returns true if `metadata` has been explicitly set. - public var hasMetadata: Bool {self._metadata != nil} + public var hasMetadata: Bool {return self._metadata != nil} /// Clears the value of `metadata`. Subsequent reads from it will return its default value. public mutating func clearMetadata() {self._metadata = nil} @@ -137,11 +137,11 @@ public struct Ocp_Transaction_V1_SubmitIntentRequest: Sendable { /// private key of the owner account. This provides an authentication mechanism /// to the RPC. public var signature: Ocp_Common_V1_Signature { - get {_signature ?? Ocp_Common_V1_Signature()} + get {return _signature ?? Ocp_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} @@ -349,22 +349,22 @@ public struct Ocp_Transaction_V1_GetIntentMetadataRequest: Sendable { /// The intent ID to query public var intentID: Ocp_Common_V1_IntentId { - get {_intentID ?? Ocp_Common_V1_IntentId()} + get {return _intentID ?? Ocp_Common_V1_IntentId()} set {_intentID = newValue} } /// Returns true if `intentID` has been explicitly set. - public var hasIntentID: Bool {self._intentID != nil} + public var hasIntentID: Bool {return self._intentID != nil} /// Clears the value of `intentID`. Subsequent reads from it will return its default value. public mutating func clearIntentID() {self._intentID = nil} /// The verified owner account public key when not signing with the rendezvous /// key. Only owner accounts involved in the intent can access the metadata. public var owner: Ocp_Common_V1_SolanaAccountId { - get {_owner ?? Ocp_Common_V1_SolanaAccountId()} + get {return _owner ?? Ocp_Common_V1_SolanaAccountId()} set {_owner = newValue} } /// Returns true if `owner` has been explicitly set. - public var hasOwner: Bool {self._owner != nil} + public var hasOwner: Bool {return self._owner != nil} /// Clears the value of `owner`. Subsequent reads from it will return its default value. public mutating func clearOwner() {self._owner = nil} @@ -372,11 +372,11 @@ public struct Ocp_Transaction_V1_GetIntentMetadataRequest: Sendable { /// using the private key of the rendezvous or owner account. This provides an /// authentication mechanism to the RPC. public var signature: Ocp_Common_V1_Signature { - get {_signature ?? Ocp_Common_V1_Signature()} + get {return _signature ?? Ocp_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} @@ -397,11 +397,11 @@ public struct Ocp_Transaction_V1_GetIntentMetadataResponse: Sendable { public var result: Ocp_Transaction_V1_GetIntentMetadataResponse.Result = .ok public var metadata: Ocp_Transaction_V1_Metadata { - get {_metadata ?? Ocp_Transaction_V1_Metadata()} + get {return _metadata ?? Ocp_Transaction_V1_Metadata()} set {_metadata = newValue} } /// Returns true if `metadata` has been explicitly set. - public var hasMetadata: Bool {self._metadata != nil} + public var hasMetadata: Bool {return self._metadata != nil} /// Clears the value of `metadata`. Subsequent reads from it will return its default value. public mutating func clearMetadata() {self._metadata = nil} @@ -458,11 +458,11 @@ public struct Ocp_Transaction_V1_GetLimitsRequest: Sendable { /// The owner account whose limits will be calculated. Any other owner accounts /// linked with the same identity of the owner will also be applied. public var owner: Ocp_Common_V1_SolanaAccountId { - get {_owner ?? Ocp_Common_V1_SolanaAccountId()} + get {return _owner ?? Ocp_Common_V1_SolanaAccountId()} set {_owner = newValue} } /// Returns true if `owner` has been explicitly set. - public var hasOwner: Bool {self._owner != nil} + public var hasOwner: Bool {return self._owner != nil} /// Clears the value of `owner`. Subsequent reads from it will return its default value. public mutating func clearOwner() {self._owner = nil} @@ -470,11 +470,11 @@ public struct Ocp_Transaction_V1_GetLimitsRequest: Sendable { /// using the private key of the owner account. This provides an authentication /// mechanism to the RPC. public var signature: Ocp_Common_V1_Signature { - get {_signature ?? Ocp_Common_V1_Signature()} + get {return _signature ?? Ocp_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} @@ -482,11 +482,11 @@ public struct Ocp_Transaction_V1_GetLimitsRequest: Sendable { /// limit calculation. Clients should set this to the start of the current day in /// the client's current time zone (because server has no knowledge of this atm). public var consumedSince: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_consumedSince ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _consumedSince ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_consumedSince = newValue} } /// Returns true if `consumedSince` has been explicitly set. - public var hasConsumedSince: Bool {self._consumedSince != nil} + public var hasConsumedSince: Bool {return self._consumedSince != nil} /// Clears the value of `consumedSince`. Subsequent reads from it will return its default value. public mutating func clearConsumedSince() {self._consumedSince = nil} @@ -555,21 +555,21 @@ public struct Ocp_Transaction_V1_CanWithdrawToAccountRequest: Sendable { /// The destination account attempted to be withdrawn to. Can be an owner or /// token account. public var account: Ocp_Common_V1_SolanaAccountId { - get {_account ?? Ocp_Common_V1_SolanaAccountId()} + get {return _account ?? Ocp_Common_V1_SolanaAccountId()} set {_account = newValue} } /// Returns true if `account` has been explicitly set. - public var hasAccount: Bool {self._account != nil} + public var hasAccount: Bool {return self._account != nil} /// Clears the value of `account`. Subsequent reads from it will return its default value. public mutating func clearAccount() {self._account = nil} /// The mint that the withdraw will be operating against public var mint: Ocp_Common_V1_SolanaAccountId { - get {_mint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _mint ?? Ocp_Common_V1_SolanaAccountId()} set {_mint = newValue} } /// Returns true if `mint` has been explicitly set. - public var hasMint: Bool {self._mint != nil} + public var hasMint: Bool {return self._mint != nil} /// Clears the value of `mint`. Subsequent reads from it will return its default value. public mutating func clearMint() {self._mint = nil} @@ -612,11 +612,11 @@ public struct Ocp_Transaction_V1_CanWithdrawToAccountResponse: Sendable { /// /// Note: The fee is always paid in the target mint. public var feeAmount: Ocp_Transaction_V1_ExchangeDataWithoutRate { - get {_feeAmount ?? Ocp_Transaction_V1_ExchangeDataWithoutRate()} + get {return _feeAmount ?? Ocp_Transaction_V1_ExchangeDataWithoutRate()} set {_feeAmount = newValue} } /// Returns true if `feeAmount` has been explicitly set. - public var hasFeeAmount: Bool {self._feeAmount != nil} + public var hasFeeAmount: Bool {return self._feeAmount != nil} /// Clears the value of `feeAmount`. Subsequent reads from it will return its default value. public mutating func clearFeeAmount() {self._feeAmount = nil} @@ -678,21 +678,21 @@ public struct Ocp_Transaction_V1_VoidGiftCardRequest: Sendable { /// The owner account that issued the gift card account public var owner: Ocp_Common_V1_SolanaAccountId { - get {_owner ?? Ocp_Common_V1_SolanaAccountId()} + get {return _owner ?? Ocp_Common_V1_SolanaAccountId()} set {_owner = newValue} } /// Returns true if `owner` has been explicitly set. - public var hasOwner: Bool {self._owner != nil} + public var hasOwner: Bool {return self._owner != nil} /// Clears the value of `owner`. Subsequent reads from it will return its default value. public mutating func clearOwner() {self._owner = nil} /// The vault of the gift card account to void public var giftCardVault: Ocp_Common_V1_SolanaAccountId { - get {_giftCardVault ?? Ocp_Common_V1_SolanaAccountId()} + get {return _giftCardVault ?? Ocp_Common_V1_SolanaAccountId()} set {_giftCardVault = newValue} } /// Returns true if `giftCardVault` has been explicitly set. - public var hasGiftCardVault: Bool {self._giftCardVault != nil} + public var hasGiftCardVault: Bool {return self._giftCardVault != nil} /// Clears the value of `giftCardVault`. Subsequent reads from it will return its default value. public mutating func clearGiftCardVault() {self._giftCardVault = nil} @@ -700,11 +700,11 @@ public struct Ocp_Transaction_V1_VoidGiftCardRequest: Sendable { /// the private key of the owner account. This provides an authentication mechanism /// to the RPC. public var signature: Ocp_Common_V1_Signature { - get {_signature ?? Ocp_Common_V1_Signature()} + get {return _signature ?? Ocp_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} @@ -833,11 +833,11 @@ public struct Ocp_Transaction_V1_StatefulSwapRequest: Sendable { /// The owner account starting the swap public var owner: Ocp_Common_V1_SolanaAccountId { - get {_owner ?? Ocp_Common_V1_SolanaAccountId()} + get {return _owner ?? Ocp_Common_V1_SolanaAccountId()} set {_owner = newValue} } /// Returns true if `owner` has been explicitly set. - public var hasOwner: Bool {self._owner != nil} + public var hasOwner: Bool {return self._owner != nil} /// Clears the value of `owner`. Subsequent reads from it will return its default value. public mutating func clearOwner() {self._owner = nil} @@ -847,21 +847,21 @@ public struct Ocp_Transaction_V1_StatefulSwapRequest: Sendable { /// For Reserve contract buy flows against new currencies, this must be the owner account that is the currency creator. /// For Coinbase Stable Swapper swap flows, this must be a random one-time use account. public var swapAuthority: Ocp_Common_V1_SolanaAccountId { - get {_swapAuthority ?? Ocp_Common_V1_SolanaAccountId()} + get {return _swapAuthority ?? Ocp_Common_V1_SolanaAccountId()} set {_swapAuthority = newValue} } /// Returns true if `swapAuthority` has been explicitly set. - public var hasSwapAuthority: Bool {self._swapAuthority != nil} + public var hasSwapAuthority: Bool {return self._swapAuthority != nil} /// Clears the value of `swapAuthority`. Subsequent reads from it will return its default value. public mutating func clearSwapAuthority() {self._swapAuthority = nil} /// The signature of serialize(VerifiedSwapMetadata) for the swap being initiated. public var proofSignature: Ocp_Common_V1_Signature { - get {_proofSignature ?? Ocp_Common_V1_Signature()} + get {return _proofSignature ?? Ocp_Common_V1_Signature()} set {_proofSignature = newValue} } /// Returns true if `proofSignature` has been explicitly set. - public var hasProofSignature: Bool {self._proofSignature != nil} + public var hasProofSignature: Bool {return self._proofSignature != nil} /// Clears the value of `proofSignature`. Subsequent reads from it will return its default value. public mutating func clearProofSignature() {self._proofSignature = nil} @@ -869,11 +869,11 @@ public struct Ocp_Transaction_V1_StatefulSwapRequest: Sendable { /// set using the private key of the owner account. This provides an authentication /// mechanism to the RPC. public var signature: Ocp_Common_V1_Signature { - get {_signature ?? Ocp_Common_V1_Signature()} + get {return _signature ?? Ocp_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} @@ -893,43 +893,43 @@ public struct Ocp_Transaction_V1_StatefulSwapRequest: Sendable { /// The unique ID for this swap randomly generated on client public var id: Ocp_Common_V1_SwapId { - get {_storage._id ?? Ocp_Common_V1_SwapId()} + get {return _storage._id ?? Ocp_Common_V1_SwapId()} set {_uniqueStorage()._id = newValue} } /// Returns true if `id` has been explicitly set. - public var hasID: Bool {_storage._id != nil} + public var hasID: Bool {return _storage._id != nil} /// Clears the value of `id`. Subsequent reads from it will return its default value. public mutating func clearID() {_uniqueStorage()._id = nil} /// The source mint that will be swapped from public var fromMint: Ocp_Common_V1_SolanaAccountId { - get {_storage._fromMint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _storage._fromMint ?? Ocp_Common_V1_SolanaAccountId()} set {_uniqueStorage()._fromMint = newValue} } /// Returns true if `fromMint` has been explicitly set. - public var hasFromMint: Bool {_storage._fromMint != nil} + public var hasFromMint: Bool {return _storage._fromMint != nil} /// Clears the value of `fromMint`. Subsequent reads from it will return its default value. public mutating func clearFromMint() {_uniqueStorage()._fromMint = nil} /// The destination mint that will be swapped to public var toMint: Ocp_Common_V1_SolanaAccountId { - get {_storage._toMint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _storage._toMint ?? Ocp_Common_V1_SolanaAccountId()} set {_uniqueStorage()._toMint = newValue} } /// Returns true if `toMint` has been explicitly set. - public var hasToMint: Bool {_storage._toMint != nil} + public var hasToMint: Bool {return _storage._toMint != nil} /// Clears the value of `toMint`. Subsequent reads from it will return its default value. public mutating func clearToMint() {_uniqueStorage()._toMint = nil} /// The amount to swap from the source mint in quarks. public var swapAmount: UInt64 { - get {_storage._swapAmount} + get {return _storage._swapAmount} set {_uniqueStorage()._swapAmount = newValue} } /// Where "amount" of "from_mint" will be sent from to the VM swap PDA public var fundingSource: Ocp_Transaction_V1_FundingSource { - get {_storage._fundingSource} + get {return _storage._fundingSource} set {_uniqueStorage()._fundingSource = newValue} } @@ -939,7 +939,7 @@ public struct Ocp_Transaction_V1_StatefulSwapRequest: Sendable { /// For FUNDING_SOURCE_EXTERNAL_WALLET, this value is the base58 encoded transaction signature. /// For FUNDING_SOURCE_COINBASE_ONRAMP, this value is the order ID public var fundingID: String { - get {_storage._fundingID} + get {return _storage._fundingID} set {_uniqueStorage()._fundingID = newValue} } @@ -948,7 +948,7 @@ public struct Ocp_Transaction_V1_StatefulSwapRequest: Sendable { /// Note: Amounts are coordinated outside this RPC for user verifications /// and validated in this RPC. public var feeAmount: UInt64 { - get {_storage._feeAmount} + get {return _storage._feeAmount} set {_uniqueStorage()._feeAmount = newValue} } @@ -959,11 +959,11 @@ public struct Ocp_Transaction_V1_StatefulSwapRequest: Sendable { /// Required for the following flows: /// - Initializing a new reserve currency outside of the core mint public var fullAmountExchangeData: Ocp_Transaction_V1_VerifiedExchangeData { - get {_storage._fullAmountExchangeData ?? Ocp_Transaction_V1_VerifiedExchangeData()} + get {return _storage._fullAmountExchangeData ?? Ocp_Transaction_V1_VerifiedExchangeData()} set {_uniqueStorage()._fullAmountExchangeData = newValue} } /// Returns true if `fullAmountExchangeData` has been explicitly set. - public var hasFullAmountExchangeData: Bool {_storage._fullAmountExchangeData != nil} + public var hasFullAmountExchangeData: Bool {return _storage._fullAmountExchangeData != nil} /// Clears the value of `fullAmountExchangeData`. Subsequent reads from it will return its default value. public mutating func clearFullAmountExchangeData() {_uniqueStorage()._fullAmountExchangeData = nil} @@ -982,11 +982,11 @@ public struct Ocp_Transaction_V1_StatefulSwapRequest: Sendable { /// The unique ID for this swap randomly generated on client public var id: Ocp_Common_V1_SwapId { - get {_id ?? Ocp_Common_V1_SwapId()} + get {return _id ?? Ocp_Common_V1_SwapId()} set {_id = newValue} } /// Returns true if `id` has been explicitly set. - public var hasID: Bool {self._id != nil} + public var hasID: Bool {return self._id != nil} /// Clears the value of `id`. Subsequent reads from it will return its default value. public mutating func clearID() {self._id = nil} @@ -994,21 +994,21 @@ public struct Ocp_Transaction_V1_StatefulSwapRequest: Sendable { /// /// Note: Currently always the core mint public var fromMint: Ocp_Common_V1_SolanaAccountId { - get {_fromMint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _fromMint ?? Ocp_Common_V1_SolanaAccountId()} set {_fromMint = newValue} } /// Returns true if `fromMint` has been explicitly set. - public var hasFromMint: Bool {self._fromMint != nil} + public var hasFromMint: Bool {return self._fromMint != nil} /// Clears the value of `fromMint`. Subsequent reads from it will return its default value. public mutating func clearFromMint() {self._fromMint = nil} /// The destination mint that will be swapped to public var toMint: Ocp_Common_V1_SolanaAccountId { - get {_toMint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _toMint ?? Ocp_Common_V1_SolanaAccountId()} set {_toMint = newValue} } /// Returns true if `toMint` has been explicitly set. - public var hasToMint: Bool {self._toMint != nil} + public var hasToMint: Bool {return self._toMint != nil} /// Clears the value of `toMint`. Subsequent reads from it will return its default value. public mutating func clearToMint() {self._toMint = nil} @@ -1026,11 +1026,11 @@ public struct Ocp_Transaction_V1_StatefulSwapRequest: Sendable { /// Destination owner account where from_mint tokens will land. Use /// CanWithdrawToAccountResponse to determine if an account is an owner. public var destinationOwner: Ocp_Common_V1_SolanaAccountId { - get {_destinationOwner ?? Ocp_Common_V1_SolanaAccountId()} + get {return _destinationOwner ?? Ocp_Common_V1_SolanaAccountId()} set {_destinationOwner = newValue} } /// Returns true if `destinationOwner` has been explicitly set. - public var hasDestinationOwner: Bool {self._destinationOwner != nil} + public var hasDestinationOwner: Bool {return self._destinationOwner != nil} /// Clears the value of `destinationOwner`. Subsequent reads from it will return its default value. public mutating func clearDestinationOwner() {self._destinationOwner = nil} @@ -1203,31 +1203,31 @@ public struct Ocp_Transaction_V1_StatefulSwapResponse: Sendable { /// Subisdizer account that will be paying for the swap public var payer: Ocp_Common_V1_SolanaAccountId { - get {_payer ?? Ocp_Common_V1_SolanaAccountId()} + get {return _payer ?? Ocp_Common_V1_SolanaAccountId()} set {_payer = newValue} } /// Returns true if `payer` has been explicitly set. - public var hasPayer: Bool {self._payer != nil} + public var hasPayer: Bool {return self._payer != nil} /// Clears the value of `payer`. Subsequent reads from it will return its default value. public mutating func clearPayer() {self._payer = nil} /// The nonce that is reserved for use in the swap transaction public var nonce: Ocp_Common_V1_SolanaAccountId { - get {_nonce ?? Ocp_Common_V1_SolanaAccountId()} + get {return _nonce ?? Ocp_Common_V1_SolanaAccountId()} set {_nonce = newValue} } /// Returns true if `nonce` has been explicitly set. - public var hasNonce: Bool {self._nonce != nil} + public var hasNonce: Bool {return self._nonce != nil} /// Clears the value of `nonce`. Subsequent reads from it will return its default value. public mutating func clearNonce() {self._nonce = nil} /// The blockhash that is reserved for use in the swap transaction public var blockhash: Ocp_Common_V1_Blockhash { - get {_blockhash ?? Ocp_Common_V1_Blockhash()} + get {return _blockhash ?? Ocp_Common_V1_Blockhash()} set {_blockhash = newValue} } /// Returns true if `blockhash` has been explicitly set. - public var hasBlockhash: Bool {self._blockhash != nil} + public var hasBlockhash: Bool {return self._blockhash != nil} /// Clears the value of `blockhash`. Subsequent reads from it will return its default value. public mutating func clearBlockhash() {self._blockhash = nil} @@ -1248,11 +1248,11 @@ public struct Ocp_Transaction_V1_StatefulSwapResponse: Sendable { /// The memory account where the destination virtual Timelock account lives public var memoryAccount: Ocp_Common_V1_SolanaAccountId { - get {_memoryAccount ?? Ocp_Common_V1_SolanaAccountId()} + get {return _memoryAccount ?? Ocp_Common_V1_SolanaAccountId()} set {_memoryAccount = newValue} } /// Returns true if `memoryAccount` has been explicitly set. - public var hasMemoryAccount: Bool {self._memoryAccount != nil} + public var hasMemoryAccount: Bool {return self._memoryAccount != nil} /// Clears the value of `memoryAccount`. Subsequent reads from it will return its default value. public mutating func clearMemoryAccount() {self._memoryAccount = nil} @@ -1312,31 +1312,31 @@ public struct Ocp_Transaction_V1_StatefulSwapResponse: Sendable { /// Subisdizer account that will be paying for the swap public var payer: Ocp_Common_V1_SolanaAccountId { - get {_payer ?? Ocp_Common_V1_SolanaAccountId()} + get {return _payer ?? Ocp_Common_V1_SolanaAccountId()} set {_payer = newValue} } /// Returns true if `payer` has been explicitly set. - public var hasPayer: Bool {self._payer != nil} + public var hasPayer: Bool {return self._payer != nil} /// Clears the value of `payer`. Subsequent reads from it will return its default value. public mutating func clearPayer() {self._payer = nil} /// The nonce that is reserved for use in the swap transaction public var nonce: Ocp_Common_V1_SolanaAccountId { - get {_nonce ?? Ocp_Common_V1_SolanaAccountId()} + get {return _nonce ?? Ocp_Common_V1_SolanaAccountId()} set {_nonce = newValue} } /// Returns true if `nonce` has been explicitly set. - public var hasNonce: Bool {self._nonce != nil} + public var hasNonce: Bool {return self._nonce != nil} /// Clears the value of `nonce`. Subsequent reads from it will return its default value. public mutating func clearNonce() {self._nonce = nil} /// The blockhash that is reserved for use in the swap transaction public var blockhash: Ocp_Common_V1_Blockhash { - get {_blockhash ?? Ocp_Common_V1_Blockhash()} + get {return _blockhash ?? Ocp_Common_V1_Blockhash()} set {_blockhash = newValue} } /// Returns true if `blockhash` has been explicitly set. - public var hasBlockhash: Bool {self._blockhash != nil} + public var hasBlockhash: Bool {return self._blockhash != nil} /// Clears the value of `blockhash`. Subsequent reads from it will return its default value. public mutating func clearBlockhash() {self._blockhash = nil} @@ -1357,11 +1357,11 @@ public struct Ocp_Transaction_V1_StatefulSwapResponse: Sendable { /// The VM and currency authority public var authority: Ocp_Common_V1_SolanaAccountId { - get {_authority ?? Ocp_Common_V1_SolanaAccountId()} + get {return _authority ?? Ocp_Common_V1_SolanaAccountId()} set {_authority = newValue} } /// Returns true if `authority` has been explicitly set. - public var hasAuthority: Bool {self._authority != nil} + public var hasAuthority: Bool {return self._authority != nil} /// Clears the value of `authority`. Subsequent reads from it will return its default value. public mutating func clearAuthority() {self._authority = nil} @@ -1373,11 +1373,11 @@ public struct Ocp_Transaction_V1_StatefulSwapResponse: Sendable { /// The random seed value used to generate a unique currency of the given name public var seed: Ocp_Common_V1_SolanaAccountId { - get {_seed ?? Ocp_Common_V1_SolanaAccountId()} + get {return _seed ?? Ocp_Common_V1_SolanaAccountId()} set {_seed = newValue} } /// Returns true if `seed` has been explicitly set. - public var hasSeed: Bool {self._seed != nil} + public var hasSeed: Bool {return self._seed != nil} /// Clears the value of `seed`. Subsequent reads from it will return its default value. public mutating func clearSeed() {self._seed = nil} @@ -1389,21 +1389,21 @@ public struct Ocp_Transaction_V1_StatefulSwapResponse: Sendable { /// Destination account where fee should be paid public var feeDestination: Ocp_Common_V1_SolanaAccountId { - get {_feeDestination ?? Ocp_Common_V1_SolanaAccountId()} + get {return _feeDestination ?? Ocp_Common_V1_SolanaAccountId()} set {_feeDestination = newValue} } /// Returns true if `feeDestination` has been explicitly set. - public var hasFeeDestination: Bool {self._feeDestination != nil} + public var hasFeeDestination: Bool {return self._feeDestination != nil} /// Clears the value of `feeDestination`. Subsequent reads from it will return its default value. public mutating func clearFeeDestination() {self._feeDestination = nil} /// Server-controlled treasury for flows that require it public var treasury: Ocp_Common_V1_SolanaAccountId { - get {_treasury ?? Ocp_Common_V1_SolanaAccountId()} + get {return _treasury ?? Ocp_Common_V1_SolanaAccountId()} set {_treasury = newValue} } /// Returns true if `treasury` has been explicitly set. - public var hasTreasury: Bool {self._treasury != nil} + public var hasTreasury: Bool {return self._treasury != nil} /// Clears the value of `treasury`. Subsequent reads from it will return its default value. public mutating func clearTreasury() {self._treasury = nil} @@ -1447,31 +1447,31 @@ public struct Ocp_Transaction_V1_StatefulSwapResponse: Sendable { /// Subisdizer account that will be paying for the swap public var payer: Ocp_Common_V1_SolanaAccountId { - get {_payer ?? Ocp_Common_V1_SolanaAccountId()} + get {return _payer ?? Ocp_Common_V1_SolanaAccountId()} set {_payer = newValue} } /// Returns true if `payer` has been explicitly set. - public var hasPayer: Bool {self._payer != nil} + public var hasPayer: Bool {return self._payer != nil} /// Clears the value of `payer`. Subsequent reads from it will return its default value. public mutating func clearPayer() {self._payer = nil} /// The nonce that is reserved for use in the swap transaction public var nonce: Ocp_Common_V1_SolanaAccountId { - get {_nonce ?? Ocp_Common_V1_SolanaAccountId()} + get {return _nonce ?? Ocp_Common_V1_SolanaAccountId()} set {_nonce = newValue} } /// Returns true if `nonce` has been explicitly set. - public var hasNonce: Bool {self._nonce != nil} + public var hasNonce: Bool {return self._nonce != nil} /// Clears the value of `nonce`. Subsequent reads from it will return its default value. public mutating func clearNonce() {self._nonce = nil} /// The blockhash that is reserved for use in the swap transaction public var blockhash: Ocp_Common_V1_Blockhash { - get {_blockhash ?? Ocp_Common_V1_Blockhash()} + get {return _blockhash ?? Ocp_Common_V1_Blockhash()} set {_blockhash = newValue} } /// Returns true if `blockhash` has been explicitly set. - public var hasBlockhash: Bool {self._blockhash != nil} + public var hasBlockhash: Bool {return self._blockhash != nil} /// Clears the value of `blockhash`. Subsequent reads from it will return its default value. public mutating func clearBlockhash() {self._blockhash = nil} @@ -1492,11 +1492,11 @@ public struct Ocp_Transaction_V1_StatefulSwapResponse: Sendable { /// Destination account where fee should be paid public var feeDestination: Ocp_Common_V1_SolanaAccountId { - get {_feeDestination ?? Ocp_Common_V1_SolanaAccountId()} + get {return _feeDestination ?? Ocp_Common_V1_SolanaAccountId()} set {_feeDestination = newValue} } /// Returns true if `feeDestination` has been explicitly set. - public var hasFeeDestination: Bool {self._feeDestination != nil} + public var hasFeeDestination: Bool {return self._feeDestination != nil} /// Clears the value of `feeDestination`. Subsequent reads from it will return its default value. public mutating func clearFeeDestination() {self._feeDestination = nil} @@ -1504,11 +1504,11 @@ public struct Ocp_Transaction_V1_StatefulSwapResponse: Sendable { /// sourced from the on-chain LiquidityPool account. Required by the /// CoinbaseStableSwapper::Swap instruction. public var poolFeeRecipient: Ocp_Common_V1_SolanaAccountId { - get {_poolFeeRecipient ?? Ocp_Common_V1_SolanaAccountId()} + get {return _poolFeeRecipient ?? Ocp_Common_V1_SolanaAccountId()} set {_poolFeeRecipient = newValue} } /// Returns true if `poolFeeRecipient` has been explicitly set. - public var hasPoolFeeRecipient: Bool {self._poolFeeRecipient != nil} + public var hasPoolFeeRecipient: Bool {return self._poolFeeRecipient != nil} /// Clears the value of `poolFeeRecipient`. Subsequent reads from it will return its default value. public mutating func clearPoolFeeRecipient() {self._poolFeeRecipient = nil} @@ -1679,11 +1679,11 @@ public struct Ocp_Transaction_V1_StatelessSwapRequest: Sendable { /// Deposit ATA. The owner is the sole client-side signer of the swap /// transaction. public var owner: Ocp_Common_V1_SolanaAccountId { - get {_owner ?? Ocp_Common_V1_SolanaAccountId()} + get {return _owner ?? Ocp_Common_V1_SolanaAccountId()} set {_owner = newValue} } /// Returns true if `owner` has been explicitly set. - public var hasOwner: Bool {self._owner != nil} + public var hasOwner: Bool {return self._owner != nil} /// Clears the value of `owner`. Subsequent reads from it will return its default value. public mutating func clearOwner() {self._owner = nil} @@ -1696,11 +1696,11 @@ public struct Ocp_Transaction_V1_StatelessSwapRequest: Sendable { /// this field set using the private key of the owner account. This /// provides an authentication mechanism to the RPC. public var signature: Ocp_Common_V1_Signature { - get {_signature ?? Ocp_Common_V1_Signature()} + get {return _signature ?? Ocp_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} @@ -1721,21 +1721,21 @@ public struct Ocp_Transaction_V1_StatelessSwapRequest: Sendable { /// The source mint that will be swapped from. public var fromMint: Ocp_Common_V1_SolanaAccountId { - get {_fromMint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _fromMint ?? Ocp_Common_V1_SolanaAccountId()} set {_fromMint = newValue} } /// Returns true if `fromMint` has been explicitly set. - public var hasFromMint: Bool {self._fromMint != nil} + public var hasFromMint: Bool {return self._fromMint != nil} /// Clears the value of `fromMint`. Subsequent reads from it will return its default value. public mutating func clearFromMint() {self._fromMint = nil} /// The destination mint that will be swapped to. public var toMint: Ocp_Common_V1_SolanaAccountId { - get {_toMint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _toMint ?? Ocp_Common_V1_SolanaAccountId()} set {_toMint = newValue} } /// Returns true if `toMint` has been explicitly set. - public var hasToMint: Bool {self._toMint != nil} + public var hasToMint: Bool {return self._toMint != nil} /// Clears the value of `toMint`. Subsequent reads from it will return its default value. public mutating func clearToMint() {self._toMint = nil} @@ -1852,22 +1852,22 @@ public struct Ocp_Transaction_V1_StatelessSwapResponse: Sendable { /// Subsidizer account that will pay the transaction fee. public var payer: Ocp_Common_V1_SolanaAccountId { - get {_payer ?? Ocp_Common_V1_SolanaAccountId()} + get {return _payer ?? Ocp_Common_V1_SolanaAccountId()} set {_payer = newValue} } /// Returns true if `payer` has been explicitly set. - public var hasPayer: Bool {self._payer != nil} + public var hasPayer: Bool {return self._payer != nil} /// Clears the value of `payer`. Subsequent reads from it will return its default value. public mutating func clearPayer() {self._payer = nil} /// The Solana blockhash to set on the transaction. This is a /// regular recent blockhash, not a durable nonce. public var blockhash: Ocp_Common_V1_Blockhash { - get {_blockhash ?? Ocp_Common_V1_Blockhash()} + get {return _blockhash ?? Ocp_Common_V1_Blockhash()} set {_blockhash = newValue} } /// Returns true if `blockhash` has been explicitly set. - public var hasBlockhash: Bool {self._blockhash != nil} + public var hasBlockhash: Bool {return self._blockhash != nil} /// Clears the value of `blockhash`. Subsequent reads from it will return its default value. public mutating func clearBlockhash() {self._blockhash = nil} @@ -1890,11 +1890,11 @@ public struct Ocp_Transaction_V1_StatelessSwapResponse: Sendable { /// sourced from the on-chain LiquidityPool account. Required by the /// CoinbaseStableSwapper::Swap instruction. public var poolFeeRecipient: Ocp_Common_V1_SolanaAccountId { - get {_poolFeeRecipient ?? Ocp_Common_V1_SolanaAccountId()} + get {return _poolFeeRecipient ?? Ocp_Common_V1_SolanaAccountId()} set {_poolFeeRecipient = newValue} } /// Returns true if `poolFeeRecipient` has been explicitly set. - public var hasPoolFeeRecipient: Bool {self._poolFeeRecipient != nil} + public var hasPoolFeeRecipient: Bool {return self._poolFeeRecipient != nil} /// Clears the value of `poolFeeRecipient`. Subsequent reads from it will return its default value. public mutating func clearPoolFeeRecipient() {self._poolFeeRecipient = nil} @@ -1920,11 +1920,11 @@ public struct Ocp_Transaction_V1_StatelessSwapResponse: Sendable { /// The signature of the submitted swap transaction. Clients may use /// this to look up the transaction on-chain. public var transactionSignature: Ocp_Common_V1_Signature { - get {_transactionSignature ?? Ocp_Common_V1_Signature()} + get {return _transactionSignature ?? Ocp_Common_V1_Signature()} set {_transactionSignature = newValue} } /// Returns true if `transactionSignature` has been explicitly set. - public var hasTransactionSignature: Bool {self._transactionSignature != nil} + public var hasTransactionSignature: Bool {return self._transactionSignature != nil} /// Clears the value of `transactionSignature`. Subsequent reads from it will return its default value. public mutating func clearTransactionSignature() {self._transactionSignature = nil} @@ -2052,20 +2052,20 @@ public struct Ocp_Transaction_V1_GetSwapRequest: Sendable { // methods supported on all messages. public var id: Ocp_Common_V1_SwapId { - get {_id ?? Ocp_Common_V1_SwapId()} + get {return _id ?? Ocp_Common_V1_SwapId()} set {_id = newValue} } /// Returns true if `id` has been explicitly set. - public var hasID: Bool {self._id != nil} + public var hasID: Bool {return self._id != nil} /// Clears the value of `id`. Subsequent reads from it will return its default value. public mutating func clearID() {self._id = nil} public var owner: Ocp_Common_V1_SolanaAccountId { - get {_owner ?? Ocp_Common_V1_SolanaAccountId()} + get {return _owner ?? Ocp_Common_V1_SolanaAccountId()} set {_owner = newValue} } /// Returns true if `owner` has been explicitly set. - public var hasOwner: Bool {self._owner != nil} + public var hasOwner: Bool {return self._owner != nil} /// Clears the value of `owner`. Subsequent reads from it will return its default value. public mutating func clearOwner() {self._owner = nil} @@ -2073,11 +2073,11 @@ public struct Ocp_Transaction_V1_GetSwapRequest: Sendable { /// private key of the owner account. This provides an authentication mechanism /// to the RPC. public var signature: Ocp_Common_V1_Signature { - get {_signature ?? Ocp_Common_V1_Signature()} + get {return _signature ?? Ocp_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} @@ -2098,11 +2098,11 @@ public struct Ocp_Transaction_V1_GetSwapResponse: Sendable { public var result: Ocp_Transaction_V1_GetSwapResponse.Result = .ok public var swap: Ocp_Transaction_V1_SwapMetadata { - get {_swap ?? Ocp_Transaction_V1_SwapMetadata()} + get {return _swap ?? Ocp_Transaction_V1_SwapMetadata()} set {_swap = newValue} } /// Returns true if `swap` has been explicitly set. - public var hasSwap: Bool {self._swap != nil} + public var hasSwap: Bool {return self._swap != nil} /// Clears the value of `swap`. Subsequent reads from it will return its default value. public mutating func clearSwap() {self._swap = nil} @@ -2157,11 +2157,11 @@ public struct Ocp_Transaction_V1_GetPendingSwapsRequest: Sendable { // methods supported on all messages. public var owner: Ocp_Common_V1_SolanaAccountId { - get {_owner ?? Ocp_Common_V1_SolanaAccountId()} + get {return _owner ?? Ocp_Common_V1_SolanaAccountId()} set {_owner = newValue} } /// Returns true if `owner` has been explicitly set. - public var hasOwner: Bool {self._owner != nil} + public var hasOwner: Bool {return self._owner != nil} /// Clears the value of `owner`. Subsequent reads from it will return its default value. public mutating func clearOwner() {self._owner = nil} @@ -2169,11 +2169,11 @@ public struct Ocp_Transaction_V1_GetPendingSwapsRequest: Sendable { /// using the private key of the owner account. This provides an authentication /// mechanism to the RPC. public var signature: Ocp_Common_V1_Signature { - get {_signature ?? Ocp_Common_V1_Signature()} + get {return _signature ?? Ocp_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} @@ -2275,11 +2275,11 @@ public struct Ocp_Transaction_V1_Metadata: Sendable { /// Optional app-level metadata public var appMetadata: Ocp_Transaction_V1_AppMetadata { - get {_appMetadata ?? Ocp_Transaction_V1_AppMetadata()} + get {return _appMetadata ?? Ocp_Transaction_V1_AppMetadata()} set {_appMetadata = newValue} } /// Returns true if `appMetadata` has been explicitly set. - public var hasAppMetadata: Bool {self._appMetadata != nil} + public var hasAppMetadata: Bool {return self._appMetadata != nil} /// Clears the value of `appMetadata`. Subsequent reads from it will return its default value. public mutating func clearAppMetadata() {self._appMetadata = nil} @@ -2318,11 +2318,11 @@ public struct Ocp_Transaction_V1_OpenAccountsMetadata: Sendable { /// The mint that this action will be operating against public var mint: Ocp_Common_V1_SolanaAccountId { - get {_mint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _mint ?? Ocp_Common_V1_SolanaAccountId()} set {_mint = newValue} } /// Returns true if `mint` has been explicitly set. - public var hasMint: Bool {self._mint != nil} + public var hasMint: Bool {return self._mint != nil} /// Clears the value of `mint`. Subsequent reads from it will return its default value. public mutating func clearMint() {self._mint = nil} @@ -2400,32 +2400,32 @@ public struct Ocp_Transaction_V1_SendPublicPaymentMetadata: @unchecked Sendable /// The source account where funds will be sent from. Currently, this is always /// the user's primary account. public var source: Ocp_Common_V1_SolanaAccountId { - get {_storage._source ?? Ocp_Common_V1_SolanaAccountId()} + get {return _storage._source ?? Ocp_Common_V1_SolanaAccountId()} set {_uniqueStorage()._source = newValue} } /// Returns true if `source` has been explicitly set. - public var hasSource: Bool {_storage._source != nil} + public var hasSource: Bool {return _storage._source != nil} /// Clears the value of `source`. Subsequent reads from it will return its default value. public mutating func clearSource() {_uniqueStorage()._source = nil} /// The destination token account to send funds to. public var destination: Ocp_Common_V1_SolanaAccountId { - get {_storage._destination ?? Ocp_Common_V1_SolanaAccountId()} + get {return _storage._destination ?? Ocp_Common_V1_SolanaAccountId()} set {_uniqueStorage()._destination = newValue} } /// Returns true if `destination` has been explicitly set. - public var hasDestination: Bool {_storage._destination != nil} + public var hasDestination: Bool {return _storage._destination != nil} /// Clears the value of `destination`. Subsequent reads from it will return its default value. public mutating func clearDestination() {_uniqueStorage()._destination = nil} /// Destination owner account, which is required for withdrawals that intend /// to create an ATA. Every other variation of this intent can omit this field. public var destinationOwner: Ocp_Common_V1_SolanaAccountId { - get {_storage._destinationOwner ?? Ocp_Common_V1_SolanaAccountId()} + get {return _storage._destinationOwner ?? Ocp_Common_V1_SolanaAccountId()} set {_uniqueStorage()._destinationOwner = newValue} } /// Returns true if `destinationOwner` has been explicitly set. - public var hasDestinationOwner: Bool {_storage._destinationOwner != nil} + public var hasDestinationOwner: Bool {return _storage._destinationOwner != nil} /// Clears the value of `destinationOwner`. Subsequent reads from it will return its default value. public mutating func clearDestinationOwner() {_uniqueStorage()._destinationOwner = nil} @@ -2455,23 +2455,23 @@ public struct Ocp_Transaction_V1_SendPublicPaymentMetadata: @unchecked Sendable /// Is the payment a withdrawal? public var isWithdrawal: Bool { - get {_storage._isWithdrawal} + get {return _storage._isWithdrawal} set {_uniqueStorage()._isWithdrawal = newValue} } /// Is the payment going to a new gift card? Note is_withdrawal must be false. public var isIndirectSend: Bool { - get {_storage._isIndirectSend} + get {return _storage._isIndirectSend} set {_uniqueStorage()._isIndirectSend = newValue} } /// The mint that this intent will be operating against public var mint: Ocp_Common_V1_SolanaAccountId { - get {_storage._mint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _storage._mint ?? Ocp_Common_V1_SolanaAccountId()} set {_uniqueStorage()._mint = newValue} } /// Returns true if `mint` has been explicitly set. - public var hasMint: Bool {_storage._mint != nil} + public var hasMint: Bool {return _storage._mint != nil} /// Clears the value of `mint`. Subsequent reads from it will return its default value. public mutating func clearMint() {_uniqueStorage()._mint = nil} @@ -2504,11 +2504,11 @@ public struct Ocp_Transaction_V1_ReceivePaymentsPubliclyMetadata: Sendable { /// The remote send gift card to receive funds from public var source: Ocp_Common_V1_SolanaAccountId { - get {_source ?? Ocp_Common_V1_SolanaAccountId()} + get {return _source ?? Ocp_Common_V1_SolanaAccountId()} set {_source = newValue} } /// Returns true if `source` has been explicitly set. - public var hasSource: Bool {self._source != nil} + public var hasSource: Bool {return self._source != nil} /// Clears the value of `source`. Subsequent reads from it will return its default value. public mutating func clearSource() {self._source = nil} @@ -2523,21 +2523,21 @@ public struct Ocp_Transaction_V1_ReceivePaymentsPubliclyMetadata: Sendable { /// part of creating the gift card account. This is purely a server-provided value. /// SubmitIntent will disallow this being set. public var exchangeData: Ocp_Transaction_V1_ExchangeData { - get {_exchangeData ?? Ocp_Transaction_V1_ExchangeData()} + get {return _exchangeData ?? Ocp_Transaction_V1_ExchangeData()} set {_exchangeData = newValue} } /// Returns true if `exchangeData` has been explicitly set. - public var hasExchangeData: Bool {self._exchangeData != nil} + public var hasExchangeData: Bool {return self._exchangeData != nil} /// Clears the value of `exchangeData`. Subsequent reads from it will return its default value. public mutating func clearExchangeData() {self._exchangeData = nil} /// The mint that this intent will be operating against public var mint: Ocp_Common_V1_SolanaAccountId { - get {_mint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _mint ?? Ocp_Common_V1_SolanaAccountId()} set {_mint = newValue} } /// Returns true if `mint` has been explicitly set. - public var hasMint: Bool {self._mint != nil} + public var hasMint: Bool {return self._mint != nil} /// Clears the value of `mint`. Subsequent reads from it will return its default value. public mutating func clearMint() {self._mint = nil} @@ -2568,11 +2568,11 @@ public struct Ocp_Transaction_V1_PublicDistributionMetadata: Sendable { /// The pool account to distribute from public var source: Ocp_Common_V1_SolanaAccountId { - get {_source ?? Ocp_Common_V1_SolanaAccountId()} + get {return _source ?? Ocp_Common_V1_SolanaAccountId()} set {_source = newValue} } /// Returns true if `source` has been explicitly set. - public var hasSource: Bool {self._source != nil} + public var hasSource: Bool {return self._source != nil} /// Clears the value of `source`. Subsequent reads from it will return its default value. public mutating func clearSource() {self._source = nil} @@ -2581,11 +2581,11 @@ public struct Ocp_Transaction_V1_PublicDistributionMetadata: Sendable { /// The mint that this intent will be operating against public var mint: Ocp_Common_V1_SolanaAccountId { - get {_mint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _mint ?? Ocp_Common_V1_SolanaAccountId()} set {_mint = newValue} } /// Returns true if `mint` has been explicitly set. - public var hasMint: Bool {self._mint != nil} + public var hasMint: Bool {return self._mint != nil} /// Clears the value of `mint`. Subsequent reads from it will return its default value. public mutating func clearMint() {self._mint = nil} @@ -2599,11 +2599,11 @@ public struct Ocp_Transaction_V1_PublicDistributionMetadata: Sendable { /// Destination where a portion of the pool's funds will be distributed. /// This must always be a primary account. public var destination: Ocp_Common_V1_SolanaAccountId { - get {_destination ?? Ocp_Common_V1_SolanaAccountId()} + get {return _destination ?? Ocp_Common_V1_SolanaAccountId()} set {_destination = newValue} } /// Returns true if `destination` has been explicitly set. - public var hasDestination: Bool {self._destination != nil} + public var hasDestination: Bool {return self._destination != nil} /// Clears the value of `destination`. Subsequent reads from it will return its default value. public mutating func clearDestination() {self._destination = nil} @@ -2697,11 +2697,11 @@ public struct Ocp_Transaction_V1_OpenAccountAction: Sendable { /// the verified parent owner account public key. All other account types should /// set this to the authority value. public var owner: Ocp_Common_V1_SolanaAccountId { - get {_owner ?? Ocp_Common_V1_SolanaAccountId()} + get {return _owner ?? Ocp_Common_V1_SolanaAccountId()} set {_owner = newValue} } /// Returns true if `owner` has been explicitly set. - public var hasOwner: Bool {self._owner != nil} + public var hasOwner: Bool {return self._owner != nil} /// Clears the value of `owner`. Subsequent reads from it will return its default value. public mutating func clearOwner() {self._owner = nil} @@ -2710,21 +2710,21 @@ public struct Ocp_Transaction_V1_OpenAccountAction: Sendable { /// The public key of the private key that has authority over the opened token account public var authority: Ocp_Common_V1_SolanaAccountId { - get {_authority ?? Ocp_Common_V1_SolanaAccountId()} + get {return _authority ?? Ocp_Common_V1_SolanaAccountId()} set {_authority = newValue} } /// Returns true if `authority` has been explicitly set. - public var hasAuthority: Bool {self._authority != nil} + public var hasAuthority: Bool {return self._authority != nil} /// Clears the value of `authority`. Subsequent reads from it will return its default value. public mutating func clearAuthority() {self._authority = nil} /// The token account being opened public var token: Ocp_Common_V1_SolanaAccountId { - get {_token ?? Ocp_Common_V1_SolanaAccountId()} + get {return _token ?? Ocp_Common_V1_SolanaAccountId()} set {_token = newValue} } /// Returns true if `token` has been explicitly set. - public var hasToken: Bool {self._token != nil} + public var hasToken: Bool {return self._token != nil} /// Clears the value of `token`. Subsequent reads from it will return its default value. public mutating func clearToken() {self._token = nil} @@ -2732,21 +2732,21 @@ public struct Ocp_Transaction_V1_OpenAccountAction: Sendable { /// using the private key of the authority account. This provides a proof /// of authorization to link authority to owner. public var authoritySignature: Ocp_Common_V1_Signature { - get {_authoritySignature ?? Ocp_Common_V1_Signature()} + get {return _authoritySignature ?? Ocp_Common_V1_Signature()} set {_authoritySignature = newValue} } /// Returns true if `authoritySignature` has been explicitly set. - public var hasAuthoritySignature: Bool {self._authoritySignature != nil} + public var hasAuthoritySignature: Bool {return self._authoritySignature != nil} /// Clears the value of `authoritySignature`. Subsequent reads from it will return its default value. public mutating func clearAuthoritySignature() {self._authoritySignature = nil} /// The mint that this action will be operating against public var mint: Ocp_Common_V1_SolanaAccountId { - get {_mint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _mint ?? Ocp_Common_V1_SolanaAccountId()} set {_mint = newValue} } /// Returns true if `mint` has been explicitly set. - public var hasMint: Bool {self._mint != nil} + public var hasMint: Bool {return self._mint != nil} /// Clears the value of `mint`. Subsequent reads from it will return its default value. public mutating func clearMint() {self._mint = nil} @@ -2769,31 +2769,31 @@ public struct Ocp_Transaction_V1_NoPrivacyTransferAction: Sendable { /// The public key of the private key that has authority over source public var authority: Ocp_Common_V1_SolanaAccountId { - get {_authority ?? Ocp_Common_V1_SolanaAccountId()} + get {return _authority ?? Ocp_Common_V1_SolanaAccountId()} set {_authority = newValue} } /// Returns true if `authority` has been explicitly set. - public var hasAuthority: Bool {self._authority != nil} + public var hasAuthority: Bool {return self._authority != nil} /// Clears the value of `authority`. Subsequent reads from it will return its default value. public mutating func clearAuthority() {self._authority = nil} /// The source account where funds are transferred from public var source: Ocp_Common_V1_SolanaAccountId { - get {_source ?? Ocp_Common_V1_SolanaAccountId()} + get {return _source ?? Ocp_Common_V1_SolanaAccountId()} set {_source = newValue} } /// Returns true if `source` has been explicitly set. - public var hasSource: Bool {self._source != nil} + public var hasSource: Bool {return self._source != nil} /// Clears the value of `source`. Subsequent reads from it will return its default value. public mutating func clearSource() {self._source = nil} /// The destination account where funds are transferred to public var destination: Ocp_Common_V1_SolanaAccountId { - get {_destination ?? Ocp_Common_V1_SolanaAccountId()} + get {return _destination ?? Ocp_Common_V1_SolanaAccountId()} set {_destination = newValue} } /// Returns true if `destination` has been explicitly set. - public var hasDestination: Bool {self._destination != nil} + public var hasDestination: Bool {return self._destination != nil} /// Clears the value of `destination`. Subsequent reads from it will return its default value. public mutating func clearDestination() {self._destination = nil} @@ -2802,11 +2802,11 @@ public struct Ocp_Transaction_V1_NoPrivacyTransferAction: Sendable { /// The mint that this action will be operating against public var mint: Ocp_Common_V1_SolanaAccountId { - get {_mint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _mint ?? Ocp_Common_V1_SolanaAccountId()} set {_mint = newValue} } /// Returns true if `mint` has been explicitly set. - public var hasMint: Bool {self._mint != nil} + public var hasMint: Bool {return self._mint != nil} /// Clears the value of `mint`. Subsequent reads from it will return its default value. public mutating func clearMint() {self._mint = nil} @@ -2828,31 +2828,31 @@ public struct Ocp_Transaction_V1_NoPrivacyWithdrawAction: Sendable { /// The public key of the private key that has authority over source public var authority: Ocp_Common_V1_SolanaAccountId { - get {_authority ?? Ocp_Common_V1_SolanaAccountId()} + get {return _authority ?? Ocp_Common_V1_SolanaAccountId()} set {_authority = newValue} } /// Returns true if `authority` has been explicitly set. - public var hasAuthority: Bool {self._authority != nil} + public var hasAuthority: Bool {return self._authority != nil} /// Clears the value of `authority`. Subsequent reads from it will return its default value. public mutating func clearAuthority() {self._authority = nil} /// The source account where funds are transferred from public var source: Ocp_Common_V1_SolanaAccountId { - get {_source ?? Ocp_Common_V1_SolanaAccountId()} + get {return _source ?? Ocp_Common_V1_SolanaAccountId()} set {_source = newValue} } /// Returns true if `source` has been explicitly set. - public var hasSource: Bool {self._source != nil} + public var hasSource: Bool {return self._source != nil} /// Clears the value of `source`. Subsequent reads from it will return its default value. public mutating func clearSource() {self._source = nil} /// The destination account where funds are transferred to public var destination: Ocp_Common_V1_SolanaAccountId { - get {_destination ?? Ocp_Common_V1_SolanaAccountId()} + get {return _destination ?? Ocp_Common_V1_SolanaAccountId()} set {_destination = newValue} } /// Returns true if `destination` has been explicitly set. - public var hasDestination: Bool {self._destination != nil} + public var hasDestination: Bool {return self._destination != nil} /// Clears the value of `destination`. Subsequent reads from it will return its default value. public mutating func clearDestination() {self._destination = nil} @@ -2870,11 +2870,11 @@ public struct Ocp_Transaction_V1_NoPrivacyWithdrawAction: Sendable { /// The mint that this action will be operating against public var mint: Ocp_Common_V1_SolanaAccountId { - get {_mint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _mint ?? Ocp_Common_V1_SolanaAccountId()} set {_mint = newValue} } /// Returns true if `mint` has been explicitly set. - public var hasMint: Bool {self._mint != nil} + public var hasMint: Bool {return self._mint != nil} /// Clears the value of `mint`. Subsequent reads from it will return its default value. public mutating func clearMint() {self._mint = nil} @@ -2899,21 +2899,21 @@ public struct Ocp_Transaction_V1_FeePaymentAction: Sendable { /// The public key of the private key that has authority over source public var authority: Ocp_Common_V1_SolanaAccountId { - get {_authority ?? Ocp_Common_V1_SolanaAccountId()} + get {return _authority ?? Ocp_Common_V1_SolanaAccountId()} set {_authority = newValue} } /// Returns true if `authority` has been explicitly set. - public var hasAuthority: Bool {self._authority != nil} + public var hasAuthority: Bool {return self._authority != nil} /// Clears the value of `authority`. Subsequent reads from it will return its default value. public mutating func clearAuthority() {self._authority = nil} /// The source account where funds are transferred from public var source: Ocp_Common_V1_SolanaAccountId { - get {_source ?? Ocp_Common_V1_SolanaAccountId()} + get {return _source ?? Ocp_Common_V1_SolanaAccountId()} set {_source = newValue} } /// Returns true if `source` has been explicitly set. - public var hasSource: Bool {self._source != nil} + public var hasSource: Bool {return self._source != nil} /// Clears the value of `source`. Subsequent reads from it will return its default value. public mutating func clearSource() {self._source = nil} @@ -2922,11 +2922,11 @@ public struct Ocp_Transaction_V1_FeePaymentAction: Sendable { /// The mint that this action will be operating against public var mint: Ocp_Common_V1_SolanaAccountId { - get {_mint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _mint ?? Ocp_Common_V1_SolanaAccountId()} set {_mint = newValue} } /// Returns true if `mint` has been explicitly set. - public var hasMint: Bool {self._mint != nil} + public var hasMint: Bool {return self._mint != nil} /// Clears the value of `mint`. Subsequent reads from it will return its default value. public mutating func clearMint() {self._mint = nil} @@ -3049,21 +3049,21 @@ public struct Ocp_Transaction_V1_NoncedTransactionMetadata: Sendable { /// The nonce account to use in the system::AdvanceNonce instruction public var nonce: Ocp_Common_V1_SolanaAccountId { - get {_nonce ?? Ocp_Common_V1_SolanaAccountId()} + get {return _nonce ?? Ocp_Common_V1_SolanaAccountId()} set {_nonce = newValue} } /// Returns true if `nonce` has been explicitly set. - public var hasNonce: Bool {self._nonce != nil} + public var hasNonce: Bool {return self._nonce != nil} /// Clears the value of `nonce`. Subsequent reads from it will return its default value. public mutating func clearNonce() {self._nonce = nil} /// The blockhash to set in the transaction or virtual instruction public var blockhash: Ocp_Common_V1_Blockhash { - get {_blockhash ?? Ocp_Common_V1_Blockhash()} + get {return _blockhash ?? Ocp_Common_V1_Blockhash()} set {_blockhash = newValue} } /// Returns true if `blockhash` has been explicitly set. - public var hasBlockhash: Bool {self._blockhash != nil} + public var hasBlockhash: Bool {return self._blockhash != nil} /// Clears the value of `blockhash`. Subsequent reads from it will return its default value. public mutating func clearBlockhash() {self._blockhash = nil} @@ -3117,11 +3117,11 @@ public struct Ocp_Transaction_V1_FeePaymentServerParameter: Sendable { /// only be set when the corresponding FeePaymentAction.Type: /// - CREATE_ON_SEND_WITHDRAWAL public var destination: Ocp_Common_V1_SolanaAccountId { - get {_destination ?? Ocp_Common_V1_SolanaAccountId()} + get {return _destination ?? Ocp_Common_V1_SolanaAccountId()} set {_destination = newValue} } /// Returns true if `destination` has been explicitly set. - public var hasDestination: Bool {self._destination != nil} + public var hasDestination: Bool {return self._destination != nil} /// Clears the value of `destination`. Subsequent reads from it will return its default value. public mutating func clearDestination() {self._destination = nil} @@ -3218,11 +3218,11 @@ public struct Ocp_Transaction_V1_InvalidSignatureErrorDetails: Sendable { /// The signature that was provided by the client. public var providedSignature: Ocp_Common_V1_Signature { - get {_providedSignature ?? Ocp_Common_V1_Signature()} + get {return _providedSignature ?? Ocp_Common_V1_Signature()} set {_providedSignature = newValue} } /// Returns true if `providedSignature` has been explicitly set. - public var hasProvidedSignature: Bool {self._providedSignature != nil} + public var hasProvidedSignature: Bool {return self._providedSignature != nil} /// Clears the value of `providedSignature`. Subsequent reads from it will return its default value. public mutating func clearProvidedSignature() {self._providedSignature = nil} @@ -3297,11 +3297,11 @@ public struct Ocp_Transaction_V1_VerifiedExchangeData: Sendable { /// The crypto mint that is being operated against for the payment flow. public var mint: Ocp_Common_V1_SolanaAccountId { - get {_mint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _mint ?? Ocp_Common_V1_SolanaAccountId()} set {_mint = newValue} } /// Returns true if `mint` has been explicitly set. - public var hasMint: Bool {self._mint != nil} + public var hasMint: Bool {return self._mint != nil} /// Clears the value of `mint`. Subsequent reads from it will return its default value. public mutating func clearMint() {self._mint = nil} @@ -3318,11 +3318,11 @@ public struct Ocp_Transaction_V1_VerifiedExchangeData: Sendable { /// - Core mint /// - Launchpad currency public var coreMintFiatExchangeRate: Ocp_Currency_V1_VerifiedCoreMintFiatExchangeRate { - get {_coreMintFiatExchangeRate ?? Ocp_Currency_V1_VerifiedCoreMintFiatExchangeRate()} + get {return _coreMintFiatExchangeRate ?? Ocp_Currency_V1_VerifiedCoreMintFiatExchangeRate()} set {_coreMintFiatExchangeRate = newValue} } /// Returns true if `coreMintFiatExchangeRate` has been explicitly set. - public var hasCoreMintFiatExchangeRate: Bool {self._coreMintFiatExchangeRate != nil} + public var hasCoreMintFiatExchangeRate: Bool {return self._coreMintFiatExchangeRate != nil} /// Clears the value of `coreMintFiatExchangeRate`. Subsequent reads from it will return its default value. public mutating func clearCoreMintFiatExchangeRate() {self._coreMintFiatExchangeRate = nil} @@ -3331,11 +3331,11 @@ public struct Ocp_Transaction_V1_VerifiedExchangeData: Sendable { /// Required when operating against: /// - Launchpad currency public var launchpadCurrencyReserveState: Ocp_Currency_V1_VerifiedLaunchpadCurrencyReserveState { - get {_launchpadCurrencyReserveState ?? Ocp_Currency_V1_VerifiedLaunchpadCurrencyReserveState()} + get {return _launchpadCurrencyReserveState ?? Ocp_Currency_V1_VerifiedLaunchpadCurrencyReserveState()} set {_launchpadCurrencyReserveState = newValue} } /// Returns true if `launchpadCurrencyReserveState` has been explicitly set. - public var hasLaunchpadCurrencyReserveState: Bool {self._launchpadCurrencyReserveState != nil} + public var hasLaunchpadCurrencyReserveState: Bool {return self._launchpadCurrencyReserveState != nil} /// Clears the value of `launchpadCurrencyReserveState`. Subsequent reads from it will return its default value. public mutating func clearLaunchpadCurrencyReserveState() {self._launchpadCurrencyReserveState = nil} @@ -3371,11 +3371,11 @@ public struct Ocp_Transaction_V1_ExchangeData: Sendable { /// The crypto mint that is being operated against for the payment flow. public var mint: Ocp_Common_V1_SolanaAccountId { - get {_mint ?? Ocp_Common_V1_SolanaAccountId()} + get {return _mint ?? Ocp_Common_V1_SolanaAccountId()} set {_mint = newValue} } /// Returns true if `mint` has been explicitly set. - public var hasMint: Bool {self._mint != nil} + public var hasMint: Bool {return self._mint != nil} /// Clears the value of `mint`. Subsequent reads from it will return its default value. public mutating func clearMint() {self._mint = nil} @@ -3466,11 +3466,11 @@ public struct Ocp_Transaction_V1_VerifiedReserveSwapMetadata: Sendable { /// Verifiable client-side parameters that were provided during the StatefulSwap RPC public var clientParameters: Ocp_Transaction_V1_StatefulSwapRequest.Initiate.ReserveSwapClientParameters { - get {_clientParameters ?? Ocp_Transaction_V1_StatefulSwapRequest.Initiate.ReserveSwapClientParameters()} + get {return _clientParameters ?? Ocp_Transaction_V1_StatefulSwapRequest.Initiate.ReserveSwapClientParameters()} set {_clientParameters = newValue} } /// Returns true if `clientParameters` has been explicitly set. - public var hasClientParameters: Bool {self._clientParameters != nil} + public var hasClientParameters: Bool {return self._clientParameters != nil} /// Clears the value of `clientParameters`. Subsequent reads from it will return its default value. public mutating func clearClientParameters() {self._clientParameters = nil} @@ -3490,11 +3490,11 @@ public struct Ocp_Transaction_V1_VerifiedCoinbaseStableSwapperSwapMetadata: Send /// Verifiable client-side parameters that were provided during the StatefulSwap RPC public var clientParameters: Ocp_Transaction_V1_StatefulSwapRequest.Initiate.CoinbaseStableSwapperClientParameters { - get {_clientParameters ?? Ocp_Transaction_V1_StatefulSwapRequest.Initiate.CoinbaseStableSwapperClientParameters()} + get {return _clientParameters ?? Ocp_Transaction_V1_StatefulSwapRequest.Initiate.CoinbaseStableSwapperClientParameters()} set {_clientParameters = newValue} } /// Returns true if `clientParameters` has been explicitly set. - public var hasClientParameters: Bool {self._clientParameters != nil} + public var hasClientParameters: Bool {return self._clientParameters != nil} /// Clears the value of `clientParameters`. Subsequent reads from it will return its default value. public mutating func clearClientParameters() {self._clientParameters = nil} @@ -3511,11 +3511,11 @@ public struct Ocp_Transaction_V1_SwapMetadata: Sendable { // methods supported on all messages. public var verifiedMetadata: Ocp_Transaction_V1_VerifiedSwapMetadata { - get {_verifiedMetadata ?? Ocp_Transaction_V1_VerifiedSwapMetadata()} + get {return _verifiedMetadata ?? Ocp_Transaction_V1_VerifiedSwapMetadata()} set {_verifiedMetadata = newValue} } /// Returns true if `verifiedMetadata` has been explicitly set. - public var hasVerifiedMetadata: Bool {self._verifiedMetadata != nil} + public var hasVerifiedMetadata: Bool {return self._verifiedMetadata != nil} /// Clears the value of `verifiedMetadata`. Subsequent reads from it will return its default value. public mutating func clearVerifiedMetadata() {self._verifiedMetadata = nil} @@ -3525,11 +3525,11 @@ public struct Ocp_Transaction_V1_SwapMetadata: Sendable { /// key of the owner account. Use this to guarantee that VerifiedSwapMetadata /// has not been tampered with. public var signature: Ocp_Common_V1_Signature { - get {_signature ?? Ocp_Common_V1_Signature()} + get {return _signature ?? Ocp_Common_V1_Signature()} set {_signature = newValue} } /// Returns true if `signature` has been explicitly set. - public var hasSignature: Bool {self._signature != nil} + public var hasSignature: Bool {return self._signature != nil} /// Clears the value of `signature`. Subsequent reads from it will return its default value. public mutating func clearSignature() {self._signature = nil} diff --git a/FlipcashCore/Sources/FlipcashCore/Models/Chat/ChatMessage.swift b/FlipcashCore/Sources/FlipcashCore/Models/Chat/ChatMessage.swift index cf792ad8c..e566921d4 100644 --- a/FlipcashCore/Sources/FlipcashCore/Models/Chat/ChatMessage.swift +++ b/FlipcashCore/Sources/FlipcashCore/Models/Chat/ChatMessage.swift @@ -98,11 +98,24 @@ public struct ChatCashContent: Hashable, Sendable, Codable { public let flagImageName: String? /// Remote icon for a launchpad token shown beside its name; nil for plain cash (USDF). public let iconURL: URL? + /// Whether the payment was a tip, which selects the caption verb ("tipped" vs "sent"). + public let isTip: Bool - public init(amount: String, token: String, flagImageName: String? = nil, iconURL: URL? = nil) { + public init(amount: String, token: String, flagImageName: String? = nil, iconURL: URL? = nil, isTip: Bool = false) { self.amount = amount self.token = token self.flagImageName = flagImageName self.iconURL = iconURL + self.isTip = isTip + } + + /// The caption shown above the amount on a cash card, selected by side and tip vs. plain send. + public static func caption(isFromSelf: Bool, isTip: Bool) -> String { + switch (isFromSelf, isTip) { + case (true, false): "You sent" + case (false, false): "You received" + case (true, true): "You tipped" + case (false, true): "You received a tip" + } } } diff --git a/FlipcashCore/Sources/FlipcashCore/Models/Chat/ChatPreviewMapping.swift b/FlipcashCore/Sources/FlipcashCore/Models/Chat/ChatPreviewMapping.swift index 4b585735e..532a72642 100644 --- a/FlipcashCore/Sources/FlipcashCore/Models/Chat/ChatPreviewMapping.swift +++ b/FlipcashCore/Sources/FlipcashCore/Models/Chat/ChatPreviewMapping.swift @@ -74,7 +74,8 @@ extension ChatItem { amount: fiat.nativeAmount.formatted(), token: branding?.name ?? "", flagImageName: currency.region?.rawValue ?? currency.rawValue.uppercased(), - iconURL: branding?.iconURL + iconURL: branding?.iconURL, + isTip: message.cashAction == .tipped )) case .deleted: continue // filtered out above; unreachable, kept for switch exhaustiveness diff --git a/FlipcashCore/Sources/FlipcashCore/Models/Conversation/ConversationMessage.swift b/FlipcashCore/Sources/FlipcashCore/Models/Conversation/ConversationMessage.swift index ea5abf782..710e0de5e 100644 --- a/FlipcashCore/Sources/FlipcashCore/Models/Conversation/ConversationMessage.swift +++ b/FlipcashCore/Sources/FlipcashCore/Models/Conversation/ConversationMessage.swift @@ -17,6 +17,13 @@ public enum SendStatus: Sendable, Hashable { case failed } +/// How a cash message was delivered. `.sent` is the wire default and the fallback for any +/// message that predates the field or carries an unrecognized action. +public enum CashAction: Sendable, Hashable { + case sent + case tipped +} + /// A single message within a conversation. public struct ConversationMessage: Identifiable, Hashable, Sendable { @@ -34,6 +41,8 @@ public struct ConversationMessage: Identifiable, Hashable, Sendable { public let id: MessageID public let senderID: UserID? public let content: Content + /// How a `.cash` message was delivered (sent vs. tipped); `nil` for non-cash content. + public let cashAction: CashAction? public let date: Date public let unreadSeq: UInt64 /// The event-log version at which this message reached its current state, @@ -55,6 +64,7 @@ public struct ConversationMessage: Identifiable, Hashable, Sendable { id: MessageID, senderID: UserID?, content: Content, + cashAction: CashAction? = nil, date: Date, unreadSeq: UInt64, eventSequence: UInt64 = 0, @@ -64,6 +74,7 @@ public struct ConversationMessage: Identifiable, Hashable, Sendable { self.id = id self.senderID = senderID self.content = content + self.cashAction = cashAction self.date = date self.unreadSeq = unreadSeq self.eventSequence = eventSequence @@ -98,13 +109,17 @@ extension ConversationMessage { switch proto.content.first?.type { case .text(let textContent): self.content = .text(textContent.text) + self.cashAction = nil case .cash(let cashContent): guard let amount = try? ExchangedFiat(cashContent.amount) else { return nil } self.content = .cash(amount) + // Unrecognized actions fall back to `.sent`, per the proto contract. + self.cashAction = cashContent.action == .tipped ? .tipped : .sent case .deleted: self.content = .deleted + self.cashAction = nil case .reply, .media, .system, .none: return nil } diff --git a/FlipcashCore/Sources/FlipcashCore/Push/NotificationPayload.swift b/FlipcashCore/Sources/FlipcashCore/Push/NotificationPayload.swift index dcbc24567..88b52d222 100644 --- a/FlipcashCore/Sources/FlipcashCore/Push/NotificationPayload.swift +++ b/FlipcashCore/Sources/FlipcashCore/Push/NotificationPayload.swift @@ -36,4 +36,13 @@ public enum NotificationPayload { guard case .chatID(let chatID) = payload.navigation.type else { return nil } return ConversationID(chatID) } + + /// The kind of DM a CHAT push targets (contact vs. tip), or `nil` when the push isn't a chat + /// message or carries no chat metadata (system messages, or a legacy server that omits it). + public static func chatType(_ userInfo: [AnyHashable: Any]) -> ConversationType? { + guard let payload = decode(userInfo), payload.category == .chat, payload.hasChatMetadata else { + return nil + } + return ConversationType(payload.chatMetadata.type) + } } diff --git a/FlipcashCore/Tests/FlipcashCoreTests/ConversationModelMappingTests.swift b/FlipcashCore/Tests/FlipcashCoreTests/ConversationModelMappingTests.swift index 778975e8b..44d1bd434 100644 --- a/FlipcashCore/Tests/FlipcashCoreTests/ConversationModelMappingTests.swift +++ b/FlipcashCore/Tests/FlipcashCoreTests/ConversationModelMappingTests.swift @@ -59,6 +59,29 @@ struct ConversationModelMappingTests { #expect(amount.nativeAmount.currency == .usd) #expect(amount.onChainAmount.quarks == 5_000_000) #expect(amount.mint == (try PublicKey(mintBytes))) + // A cash message with no explicit action defaults to `.sent`. + #expect(message.cashAction == .sent) + } + + @Test("Cash message maps the tipped action") + func cashMessageMapsTippedAction() throws { + let proto = Flipcash_Messaging_V1_Message.with { + $0.messageID = .with { $0.value = 13 } + $0.content = [.with { + $0.cash = .with { + $0.action = .tipped + $0.amount = .with { + $0.currency = "usd" + $0.nativeAmount = 2.0 + $0.quarks = 2_000_000 + $0.mint = .with { $0.value = Data(repeating: 0x02, count: 32) } + } + } + }] + } + + let message = try #require(ConversationMessage(proto)) + #expect(message.cashAction == .tipped) } @Test("Cash message with a malformed amount returns nil") diff --git a/FlipcashCore/Tests/FlipcashCoreTests/Push/NotificationPayloadTests.swift b/FlipcashCore/Tests/FlipcashCoreTests/Push/NotificationPayloadTests.swift index 4d28121d0..2a568179f 100644 --- a/FlipcashCore/Tests/FlipcashCoreTests/Push/NotificationPayloadTests.swift +++ b/FlipcashCore/Tests/FlipcashCoreTests/Push/NotificationPayloadTests.swift @@ -138,4 +138,31 @@ struct NotificationPayloadTests { func chatIDNilWhenAbsent() { #expect(NotificationPayload.chatID([:]) == nil) } + + @Test("chatType returns the DM kind from chat metadata") + func chatTypeFromMetadata() throws { + let payload = Flipcash_Push_V1_Payload.with { + $0.category = .chat + $0.chatMetadata = .with { $0.type = .tipDm } + } + let userInfo = [NotificationPayload.userInfoKey: try Self.base64(for: payload)] + #expect(NotificationPayload.chatType(userInfo) == .tipDm) + } + + @Test("chatType is nil for a CHAT push without chat metadata") + func chatTypeNilWhenMetadataMissing() throws { + let payload = Flipcash_Push_V1_Payload.with { $0.category = .chat } + let userInfo = [NotificationPayload.userInfoKey: try Self.base64(for: payload)] + #expect(NotificationPayload.chatType(userInfo) == nil) + } + + @Test("chatType is nil for a non-chat category even when chat metadata is present") + func chatTypeNilForNonChatCategory() throws { + let payload = Flipcash_Push_V1_Payload.with { + $0.category = .default + $0.chatMetadata = .with { $0.type = .tipDm } + } + let userInfo = [NotificationPayload.userInfoKey: try Self.base64(for: payload)] + #expect(NotificationPayload.chatType(userInfo) == nil) + } } diff --git a/FlipcashTests/Chat/ChatMessageMappingTests.swift b/FlipcashTests/Chat/ChatMessageMappingTests.swift index db5a2ac2c..9784ff581 100644 --- a/FlipcashTests/Chat/ChatMessageMappingTests.swift +++ b/FlipcashTests/Chat/ChatMessageMappingTests.swift @@ -131,6 +131,28 @@ struct ChatMessageMappingTests { #expect(cash.token == "Cash") #expect(cash.amount == fiat.nativeAmount.formatted()) #expect(cash.flagImageName != nil) // currency flag derived from the currency + #expect(!cash.isTip) // no cash action → plain send + #expect(ChatCashContent.caption(isFromSelf: false, isTip: cash.isTip) == "You received") + } + + @Test("Tipped cash messages carry the tip flag and caption") + func tippedCash() { + let fiat = ExchangedFiat( + nativeAmount: FiatAmount(value: 5, currency: .usd), + rate: Rate(fx: 1, currency: .usd) + ) + let messages = [ + ConversationMessage(id: MessageID(value: 1), senderID: them, content: .cash(fiat), cashAction: .tipped, date: base, unreadSeq: 1), + ] + + let rows = messageRows(ChatItem.from(messages, selfUserID: me)) + + guard case .cash(let cash) = rows.first?.content else { + Issue.record("expected cash content") + return + } + #expect(cash.isTip) + #expect(ChatCashContent.caption(isFromSelf: false, isTip: cash.isTip) == "You received a tip") } @Test("The latest sent message reads Delivered until the read pointer reaches it") diff --git a/FlipcashTests/Database/Database+ConversationsTests.swift b/FlipcashTests/Database/Database+ConversationsTests.swift index 2d6929074..2e1d46a4a 100644 --- a/FlipcashTests/Database/Database+ConversationsTests.swift +++ b/FlipcashTests/Database/Database+ConversationsTests.swift @@ -107,6 +107,32 @@ struct DatabaseConversationsTests { } } + @Test("Cash message tip action round-trips", arguments: [CashAction.sent, .tipped]) + func cashMessageActionRoundTrip(_ action: CashAction) throws { + let (database, url) = try Database.makeTemp() + defer { Database.removeTemp(at: url) } + let id = ConversationID.test(1) + + let onChain = TokenAmount(quarks: 100_000_000, mint: .usdf) + let native = FiatAmount(value: 5, currency: .usd) + let message = ConversationMessage( + id: MessageID(value: 1), + senderID: selfID, + content: .cash(ExchangedFiat( + onChainAmount: onChain, + nativeAmount: native, + currencyRate: Rate(fx: native.value / onChain.decimalValue, currency: .usd) + )), + cashAction: action, + date: Date(timeIntervalSince1970: 50), + unreadSeq: 1 + ) + + try database.upsertConversationMessages([message], conversationID: id) + let loaded = try #require(try database.getConversationMessages(conversationID: id).first) + #expect(loaded.cashAction == action) + } + @Test("Cash messages with non-exact FX rates round-trip without precision loss", arguments: [ (Decimal(string: "1")!, UInt64(3_000_000)), (Decimal(string: "100")!, UInt64(7_000_000)), diff --git a/FlipcashUI/Sources/FlipcashUI/Chat/ChatCashCardCell.swift b/FlipcashUI/Sources/FlipcashUI/Chat/ChatCashCardCell.swift index 338dc39d1..002a03c80 100644 --- a/FlipcashUI/Sources/FlipcashUI/Chat/ChatCashCardCell.swift +++ b/FlipcashUI/Sources/FlipcashUI/Chat/ChatCashCardCell.swift @@ -119,7 +119,7 @@ public final class ChatCashCardCell: ChatColumnCell { public func configure(with message: ChatMessage) { guard case .cash(let cash) = message.content else { return } tokenLabel.text = cash.token - captionLabel.text = message.sender == .me ? "You sent" : "You received" + captionLabel.text = ChatCashContent.caption(isFromSelf: message.sender == .me, isTip: cash.isTip) amountLabel.text = cash.amount let flagImage = cash.flagImageName.flatMap { UIImage(named: $0, in: .module, compatibleWith: nil) } diff --git a/NotificationContent/NotificationTranscriptView.swift b/NotificationContent/NotificationTranscriptView.swift index 1f221426c..c32ea2ad6 100644 --- a/NotificationContent/NotificationTranscriptView.swift +++ b/NotificationContent/NotificationTranscriptView.swift @@ -143,7 +143,7 @@ private struct NotificationCashCard: View { } .overlay { NotificationCashCenter( - caption: isFromSelf ? "You sent" : "You received", + caption: ChatCashContent.caption(isFromSelf: isFromSelf, isTip: cash.isTip), amount: cash.amount, flagImageName: cash.flagImageName )