@sylphx/sdk 0.32.7 → 0.32.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/money.d.ts CHANGED
@@ -43,6 +43,90 @@ export interface AppStoreConnection {
43
43
  */
44
44
  environment?: string;
45
45
  }
46
+ /** Immutable evidence of an incoming bank credit and its decisions. */
47
+ export interface BankReceipt {
48
+ /** Resource name. */
49
+ name?: string;
50
+ /** Stable resource identity. */
51
+ readonly uid?: string;
52
+ /** Resource metadata. */
53
+ readonly meta?: common.ResourceMeta;
54
+ /** The checkout this receipt was submitted against. */
55
+ readonly checkoutSession?: string;
56
+ /** The bank statement transaction identity. */
57
+ readonly bankTransactionId?: string;
58
+ /** Amount actually received in minor units. */
59
+ readonly amountMinor?: string;
60
+ /** Currency actually received. */
61
+ readonly currencyCode?: string;
62
+ /** Bank-reported receipt time. */
63
+ readonly receivedTime?: string;
64
+ /** Reference observed on the bank statement; empty is held. */
65
+ readonly reference?: string;
66
+ /** Evidence locator or statement evidence; screenshots alone are not proof. */
67
+ readonly payerEvidence?: string;
68
+ /** Authenticated principal that recorded this receipt. */
69
+ readonly confirmer?: string;
70
+ /** paid, held, rejected, refunded or reversed. */
71
+ readonly state?: string;
72
+ /** Why settlement was held. */
73
+ readonly holdReason?: string;
74
+ /** Append-only human resolution, refund and reversal history. */
75
+ readonly entries?: BankReceiptEntry[];
76
+ }
77
+ /** An immutable decision appended to the original bank receipt. */
78
+ export interface BankReceiptEntry {
79
+ /** accept, reject, refund or reversal. */
80
+ readonly kind?: string;
81
+ /** Operator evidence supporting this decision. */
82
+ readonly evidence?: string;
83
+ /** Authenticated decision maker. */
84
+ readonly confirmer?: string;
85
+ /** UTC decision time. */
86
+ readonly createTime?: string;
87
+ /** Bank refund/reversal reference, when applicable. */
88
+ readonly externalReference?: string;
89
+ }
90
+ /** Receiving bank account configuration for one environment. */
91
+ export interface BankTransferAccount {
92
+ /** Resource name. */
93
+ name?: string;
94
+ /** Stable resource identity. */
95
+ readonly uid?: string;
96
+ /** Resource metadata. */
97
+ readonly meta?: common.ResourceMeta;
98
+ /** Verified beneficiary name. */
99
+ accountHolder?: string;
100
+ /** Receiving bank name. */
101
+ bankName?: string;
102
+ /** Receiving bank routing or clearing code. */
103
+ bankCode?: string;
104
+ /** Receiving account number, including branch digits. */
105
+ accountNumber?: string;
106
+ /** Verified FPS identifier displayed to the payer. */
107
+ fpsId?: string;
108
+ /** Original bank-issued FPS Common QR payload; never an invented account template. */
109
+ fpsQrPayload?: string;
110
+ /** ISO 4217 receiving account currency. */
111
+ currencyCode?: string;
112
+ /** Whether new bank-transfer checkouts may be created. */
113
+ enabled?: boolean;
114
+ /** ISO 3166-1 alpha-2 country of the receiving bank. */
115
+ regionCode?: string;
116
+ /** Optional EMV merchant-presented QR country profile: hk_fps. */
117
+ qrProfile?: string;
118
+ }
119
+ /** Frozen payment instructions for one checkout. */
120
+ export interface BankTransferInstructions {
121
+ /** Beneficiary snapshot, unaffected by later configuration changes. */
122
+ readonly account?: BankTransferAccount;
123
+ /** Opaque order reference, no more than 25 characters. */
124
+ readonly reference?: string;
125
+ /** Dynamic Common QR with exact amount and reference. */
126
+ readonly qrPayload?: string;
127
+ /** QR image as standalone SVG. */
128
+ readonly qrSvg?: string;
129
+ }
46
130
  /** The request of BatchIngestUsageEvents. */
47
131
  export interface BatchIngestUsageEventsRequest {
48
132
  /** The environment to record in. */
@@ -67,7 +151,7 @@ export interface BookedVolumeLine {
67
151
  environment?: string;
68
152
  /** The app/package, bundle or Stripe product reference; empty stays empty. */
69
153
  productRef?: string;
70
- /** stripe, app_store or google_play. */
154
+ /** stripe, app_store, google_play or bank_transfer. */
71
155
  channel?: string;
72
156
  /** ISO 4217 currency; never sum amounts across currencies. */
73
157
  currencyCode?: string;
@@ -403,6 +487,10 @@ export interface CheckoutSession {
403
487
  readonly livemode?: boolean;
404
488
  /** The processor payment this checkout produced; empty before settlement. */
405
489
  readonly processorPaymentId?: string;
490
+ /** `stripe` (default) or `bank_transfer`. Bank transfers never contact Stripe. */
491
+ paymentMethod?: string;
492
+ /** Frozen beneficiary, amount, reference and bank-issued FPS QR instructions. */
493
+ readonly bankTransfer?: BankTransferInstructions;
406
494
  }
407
495
  /** The request of ClientVerifyStorePurchase. */
408
496
  export interface ClientVerifyStorePurchaseRequest {
@@ -774,6 +862,16 @@ export interface GenerateLicenceKeyRequest {
774
862
  /** Shown to operators. */
775
863
  spec?: LicenceKeySpec;
776
864
  }
865
+ /** Gets one immutable bank receipt and its appended decisions. */
866
+ export interface GetBankReceiptRequest {
867
+ /** Receipt name. */
868
+ name: string;
869
+ }
870
+ /** Gets the environment bank account. */
871
+ export interface GetBankTransferAccountRequest {
872
+ /** BankTransferAccount name, ending in default. */
873
+ name: string;
874
+ }
777
875
  /** The request of GetCatalog. */
778
876
  export interface GetCatalogRequest {
779
877
  /** The name of the catalog to get. */
@@ -1075,6 +1173,24 @@ export interface LineItem {
1075
1173
  /** How many; default 1. Seats for a per-seat or family price. */
1076
1174
  quantity?: number;
1077
1175
  }
1176
+ /** Lists bank receipts in an environment. */
1177
+ export interface ListBankReceiptsRequest {
1178
+ /** Environment resource name. */
1179
+ parent: string;
1180
+ /** Default 50, at most 1000. */
1181
+ pageSize?: number;
1182
+ /** Token from the preceding page. */
1183
+ pageToken?: string;
1184
+ /** Optional state equality: held, paid, rejected, refunded or reversed. */
1185
+ filter?: string;
1186
+ }
1187
+ /** Response for ListBankReceipts. */
1188
+ export interface ListBankReceiptsResponse {
1189
+ /** Receipts ordered by creation time and id. */
1190
+ bankReceipts?: BankReceipt[];
1191
+ /** Empty on the last page. */
1192
+ nextPageToken?: string;
1193
+ }
1078
1194
  /** The request of ListCreditGrants. */
1079
1195
  export interface ListCreditGrantsRequest {
1080
1196
  /** The parent to list in. */
@@ -1612,6 +1728,27 @@ export interface Product {
1612
1728
  */
1613
1729
  licence?: LicencePolicy;
1614
1730
  }
1731
+ /** Records statement evidence and confirms only an exact, timely, unambiguous payment. */
1732
+ export interface RecordBankReceiptRequest {
1733
+ /** The environment recording the receipt. */
1734
+ parent: string;
1735
+ /** The checkout against which bank statement evidence is recorded. */
1736
+ checkoutSession: string;
1737
+ /** Bank statement transaction identity. */
1738
+ bankTransactionId: string;
1739
+ /** Actual received minor units. */
1740
+ amountMinor: string;
1741
+ /** Actual currency. */
1742
+ currencyCode: string;
1743
+ /** Bank receipt time. */
1744
+ receivedTime: string;
1745
+ /** Actual statement reference; absent references are held. */
1746
+ reference?: string;
1747
+ /** Bank statement evidence or secure evidence locator. */
1748
+ payerEvidence: string;
1749
+ /** Hold evidence with unresolved payer or bank ambiguity. */
1750
+ ambiguous?: boolean;
1751
+ }
1615
1752
  /** The request of RefreshMerchantAccount. */
1616
1753
  export interface RefreshMerchantAccountRequest {
1617
1754
  /** The merchant account to read back. */
@@ -1660,6 +1797,15 @@ export interface ReleaseUsageReservationRequest {
1660
1797
  /** The reservation to release. */
1661
1798
  name: string;
1662
1799
  }
1800
+ /** Resolves held evidence without altering its original receipt. */
1801
+ export interface ResolveBankReceiptRequest {
1802
+ /** Receipt name. */
1803
+ name: string;
1804
+ /** accept or reject; accept requires the exact amount and currency. */
1805
+ decision: string;
1806
+ /** Human resolution evidence. */
1807
+ evidence: string;
1808
+ }
1663
1809
  /** The request of ResumeCustomerSubscription. */
1664
1810
  export interface ResumeCustomerSubscriptionRequest {
1665
1811
  /** The subscription to resume. */
@@ -1719,7 +1865,7 @@ export interface RevenueFact {
1719
1865
  readonly granularity?: string;
1720
1866
  /** The source's reporting day; the first of the month for a month row. */
1721
1867
  readonly day?: string;
1722
- /** `stripe`, `app_store`, `google_play`, `ad_network` or `other`. */
1868
+ /** `stripe`, `app_store`, `google_play`, `bank_transfer`, `ad_network` or `other`. */
1723
1869
  readonly storeKind?: string;
1724
1870
  /** The account the source reports for. */
1725
1871
  readonly accountRef?: string;
@@ -1888,6 +2034,17 @@ export interface RevenueSummary {
1888
2034
  */
1889
2035
  readonly bookedVolume?: BookedVolumeLine[];
1890
2036
  }
2037
+ /** Records a completed external refund or reversal; sends no money. */
2038
+ export interface ReverseBankReceiptRequest {
2039
+ /** Receipt name. */
2040
+ name: string;
2041
+ /** refund or reversal, for the full receipt. */
2042
+ kind: string;
2043
+ /** Verified bank evidence. */
2044
+ evidence: string;
2045
+ /** Unique bank refund or reversal identity. */
2046
+ externalReference: string;
2047
+ }
1891
2048
  /** The request of RunRevenueSource. */
1892
2049
  export interface RunRevenueSourceRequest {
1893
2050
  /** The source to run. */
@@ -2229,6 +2386,15 @@ export interface UnconvertedAmount {
2229
2386
  /** In minor units of that currency. */
2230
2387
  amount?: string;
2231
2388
  }
2389
+ /** Configures the environment bank account. */
2390
+ export interface UpdateBankTransferAccountRequest {
2391
+ /** Account configuration. */
2392
+ bankTransferAccount: BankTransferAccount;
2393
+ /** Fields to change; empty replaces all writable fields. */
2394
+ updateMask?: string;
2395
+ /** Create the singleton if absent. */
2396
+ allowMissing?: boolean;
2397
+ }
2232
2398
  /** The request of UpdateCatalog. */
2233
2399
  export interface UpdateCatalogRequest {
2234
2400
  /** The catalog to write; `name` identifies it. */
@@ -2654,6 +2820,10 @@ export type ProrationBehavior = 'create_prorations' | 'none' | 'always_invoice'
2654
2820
  * Namespace of Sylphx Money on `Sylphx`.
2655
2821
  */
2656
2822
  export declare class MoneyApi {
2823
+ /** The `bank_transfer_accounts` collection. */
2824
+ readonly bankTransferAccounts: BankTransferAccountsCollection;
2825
+ /** The `bank_receipts` collection. */
2826
+ readonly bankReceipts: BankReceiptsCollection;
2657
2827
  /** The `processor_events` collection. */
2658
2828
  readonly processorEvents: ProcessorEventsCollection;
2659
2829
  /** The `merchant_accounts` collection. */
@@ -2708,6 +2878,74 @@ export declare class MoneyApi {
2708
2878
  readonly exchangeRates: ExchangeRatesCollection;
2709
2879
  constructor(client: runtime.Client);
2710
2880
  }
2881
+ /** `bank_transfer_accounts` of Sylphx Money: Resource type `money.sylphx.com/BankTransferAccount`. */
2882
+ export declare class BankTransferAccountsCollection {
2883
+ private readonly client;
2884
+ constructor(client: runtime.Client);
2885
+ /**
2886
+ * GetBankTransferAccount through the project-scoped bank transfer API.
2887
+ *
2888
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/bank_transfer_accounts/*}` · permission `billing:read` · effect `read`
2889
+ *
2890
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `ETAG_MISMATCH`, `UNAVAILABLE`.
2891
+ */
2892
+ get(request: GetBankTransferAccountRequest): Promise<BankTransferAccount>;
2893
+ /**
2894
+ * UpdateBankTransferAccount through the project-scoped bank transfer API.
2895
+ *
2896
+ * `PATCH /v1/{bank_transfer_account.name=orgs/*\/projects/*\/envs/*\/bank_transfer_accounts/*}` · permission `billing:bank_accounts:write` · effect `write`
2897
+ *
2898
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `ETAG_MISMATCH`, `UNAVAILABLE`.
2899
+ */
2900
+ update(request: UpdateBankTransferAccountRequest): Promise<BankTransferAccount>;
2901
+ }
2902
+ /** `bank_receipts` of Sylphx Money: Resource type `money.sylphx.com/BankReceipt`. */
2903
+ export declare class BankReceiptsCollection {
2904
+ private readonly client;
2905
+ constructor(client: runtime.Client);
2906
+ /**
2907
+ * GetBankReceipt through the project-scoped bank transfer API.
2908
+ *
2909
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/bank_receipts/*}` · permission `billing:bank_receipts:read` · effect `read`
2910
+ *
2911
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `ETAG_MISMATCH`, `UNAVAILABLE`.
2912
+ */
2913
+ get(request: GetBankReceiptRequest): Promise<BankReceipt>;
2914
+ /**
2915
+ * Lists incoming bank evidence, including receipts held for review.
2916
+ *
2917
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/bank_receipts` · permission `billing:bank_receipts:read` · effect `read`
2918
+ *
2919
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
2920
+ */
2921
+ list(request: ListBankReceiptsRequest): Promise<ListBankReceiptsResponse>;
2922
+ /** Every item of every page of `list`. */
2923
+ listAll(request: ListBankReceiptsRequest): AsyncGenerator<BankReceipt>;
2924
+ /**
2925
+ * RecordBankReceipt through the project-scoped bank transfer API.
2926
+ *
2927
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/bank_receipts:record` · permission `billing:bank_receipts:write` · effect `write`
2928
+ *
2929
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `INVALID_STATE`, `ETAG_MISMATCH`, `UNAVAILABLE`.
2930
+ */
2931
+ record(request: RecordBankReceiptRequest): Promise<BankReceipt>;
2932
+ /**
2933
+ * ResolveBankReceipt through the project-scoped bank transfer API.
2934
+ *
2935
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/bank_receipts/*}:resolve` · permission `billing:bank_receipts:write` · effect `write`
2936
+ *
2937
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `ETAG_MISMATCH`, `UNAVAILABLE`.
2938
+ */
2939
+ resolve(request: ResolveBankReceiptRequest): Promise<BankReceipt>;
2940
+ /**
2941
+ * ReverseBankReceipt through the project-scoped bank transfer API.
2942
+ *
2943
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/bank_receipts/*}:reverse` · permission `billing:bank_receipts:write` · effect `write`
2944
+ *
2945
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `INVALID_STATE`, `ETAG_MISMATCH`, `UNAVAILABLE`.
2946
+ */
2947
+ reverse(request: ReverseBankReceiptRequest): Promise<BankReceipt>;
2948
+ }
2711
2949
  /** `processor_events` of Sylphx Money: Resource type `money.sylphx.com/ProcessorEvent`. */
2712
2950
  export declare class ProcessorEventsCollection {
2713
2951
  private readonly client;
package/dist/money.js CHANGED
@@ -14,6 +14,38 @@ runtime.registerSchemas({
14
14
  ['appAppleId', 'app_apple_id'],
15
15
  ['accountTokenPrefix', 'account_token_prefix'],
16
16
  ],
17
+ 'sylphx.money.v1.BankReceipt': [
18
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
19
+ ['checkoutSession', 'checkout_session'],
20
+ ['bankTransactionId', 'bank_transaction_id'],
21
+ ['amountMinor', 'amount_minor'],
22
+ ['currencyCode', 'currency_code'],
23
+ ['receivedTime', 'received_time'],
24
+ ['payerEvidence', 'payer_evidence'],
25
+ ['holdReason', 'hold_reason'],
26
+ ['entries', 'entries', 'sylphx.money.v1.BankReceiptEntry'],
27
+ ],
28
+ 'sylphx.money.v1.BankReceiptEntry': [
29
+ ['createTime', 'create_time'],
30
+ ['externalReference', 'external_reference'],
31
+ ],
32
+ 'sylphx.money.v1.BankTransferAccount': [
33
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
34
+ ['accountHolder', 'account_holder'],
35
+ ['bankName', 'bank_name'],
36
+ ['bankCode', 'bank_code'],
37
+ ['accountNumber', 'account_number'],
38
+ ['fpsId', 'fps_id'],
39
+ ['fpsQrPayload', 'fps_qr_payload'],
40
+ ['currencyCode', 'currency_code'],
41
+ ['regionCode', 'region_code'],
42
+ ['qrProfile', 'qr_profile'],
43
+ ],
44
+ 'sylphx.money.v1.BankTransferInstructions': [
45
+ ['account', 'account', 'sylphx.money.v1.BankTransferAccount'],
46
+ ['qrPayload', 'qr_payload'],
47
+ ['qrSvg', 'qr_svg'],
48
+ ],
17
49
  'sylphx.money.v1.BatchIngestUsageEventsRequest': [
18
50
  ['usageEvents', 'usage_events', 'sylphx.money.v1.IngestedUsageEvent'],
19
51
  ],
@@ -111,6 +143,8 @@ runtime.registerSchemas({
111
143
  ['amountTotal', 'amount_total'],
112
144
  ['paymentStatus', 'payment_status'],
113
145
  ['processorPaymentId', 'processor_payment_id'],
146
+ ['paymentMethod', 'payment_method'],
147
+ ['bankTransfer', 'bank_transfer', 'sylphx.money.v1.BankTransferInstructions'],
114
148
  ],
115
149
  'sylphx.money.v1.ClientVerifyStorePurchaseRequest': [
116
150
  ['subject', 'subject', 'sylphx.money.v1.Subject'],
@@ -214,6 +248,8 @@ runtime.registerSchemas({
214
248
  ['licenceKeyId', 'licence_key_id'],
215
249
  ['spec', 'spec', 'sylphx.money.v1.LicenceKeySpec'],
216
250
  ],
251
+ 'sylphx.money.v1.GetBankReceiptRequest': [],
252
+ 'sylphx.money.v1.GetBankTransferAccountRequest': [],
217
253
  'sylphx.money.v1.GetCatalogRequest': [],
218
254
  'sylphx.money.v1.GetCheckoutPolicyRequest': [],
219
255
  'sylphx.money.v1.GetCheckoutSessionRequest': [],
@@ -284,6 +320,14 @@ runtime.registerSchemas({
284
320
  ['expireTime', 'expire_time'],
285
321
  ],
286
322
  'sylphx.money.v1.LineItem': [],
323
+ 'sylphx.money.v1.ListBankReceiptsRequest': [
324
+ ['pageSize', 'page_size'],
325
+ ['pageToken', 'page_token'],
326
+ ],
327
+ 'sylphx.money.v1.ListBankReceiptsResponse': [
328
+ ['bankReceipts', 'bank_receipts', 'sylphx.money.v1.BankReceipt'],
329
+ ['nextPageToken', 'next_page_token'],
330
+ ],
287
331
  'sylphx.money.v1.ListCreditGrantsRequest': [
288
332
  ['pageSize', 'page_size'],
289
333
  ['pageToken', 'page_token'],
@@ -478,6 +522,14 @@ runtime.registerSchemas({
478
522
  ['grants', 'grants', undefined, 'map'],
479
523
  ['licence', 'licence', 'sylphx.money.v1.LicencePolicy'],
480
524
  ],
525
+ 'sylphx.money.v1.RecordBankReceiptRequest': [
526
+ ['checkoutSession', 'checkout_session'],
527
+ ['bankTransactionId', 'bank_transaction_id'],
528
+ ['amountMinor', 'amount_minor'],
529
+ ['currencyCode', 'currency_code'],
530
+ ['receivedTime', 'received_time'],
531
+ ['payerEvidence', 'payer_evidence'],
532
+ ],
481
533
  'sylphx.money.v1.RefreshMerchantAccountRequest': [],
482
534
  'sylphx.money.v1.Refund': [
483
535
  ['checkoutSession', 'checkout_session'],
@@ -494,6 +546,7 @@ runtime.registerSchemas({
494
546
  ],
495
547
  'sylphx.money.v1.ReleaseUsageInvoiceCollectionRequest': [],
496
548
  'sylphx.money.v1.ReleaseUsageReservationRequest': [],
549
+ 'sylphx.money.v1.ResolveBankReceiptRequest': [],
497
550
  'sylphx.money.v1.ResumeCustomerSubscriptionRequest': [],
498
551
  'sylphx.money.v1.RetireLicenceKeyRequest': [],
499
552
  'sylphx.money.v1.RetryProcessorEventRequest': [],
@@ -543,6 +596,9 @@ runtime.registerSchemas({
543
596
  ['unconvertedCount', 'unconverted_count'],
544
597
  ['bookedVolume', 'booked_volume', 'sylphx.money.v1.BookedVolumeLine'],
545
598
  ],
599
+ 'sylphx.money.v1.ReverseBankReceiptRequest': [
600
+ ['externalReference', 'external_reference'],
601
+ ],
546
602
  'sylphx.money.v1.RunRevenueSourceRequest': [
547
603
  ['startDay', 'start_day'],
548
604
  ['endDay', 'end_day'],
@@ -638,6 +694,11 @@ runtime.registerSchemas({
638
694
  'sylphx.money.v1.UnconvertedAmount': [
639
695
  ['currencyCode', 'currency_code'],
640
696
  ],
697
+ 'sylphx.money.v1.UpdateBankTransferAccountRequest': [
698
+ ['bankTransferAccount', 'bank_transfer_account', 'sylphx.money.v1.BankTransferAccount'],
699
+ ['updateMask', 'update_mask'],
700
+ ['allowMissing', 'allow_missing'],
701
+ ],
641
702
  'sylphx.money.v1.UpdateCatalogRequest': [
642
703
  ['catalog', 'catalog', 'sylphx.money.v1.Catalog'],
643
704
  ['updateMask', 'update_mask'],
@@ -779,6 +840,10 @@ runtime.registerSchemas({
779
840
  * Namespace of Sylphx Money on `Sylphx`.
780
841
  */
781
842
  export class MoneyApi {
843
+ /** The `bank_transfer_accounts` collection. */
844
+ bankTransferAccounts;
845
+ /** The `bank_receipts` collection. */
846
+ bankReceipts;
782
847
  /** The `processor_events` collection. */
783
848
  processorEvents;
784
849
  /** The `merchant_accounts` collection. */
@@ -832,6 +897,8 @@ export class MoneyApi {
832
897
  /** The `exchange_rates` collection. */
833
898
  exchangeRates;
834
899
  constructor(client) {
900
+ this.bankTransferAccounts = new BankTransferAccountsCollection(client);
901
+ this.bankReceipts = new BankReceiptsCollection(client);
835
902
  this.processorEvents = new ProcessorEventsCollection(client);
836
903
  this.merchantAccounts = new MerchantAccountsCollection(client);
837
904
  this.priceCatalogs = new PriceCatalogsCollection(client);
@@ -860,6 +927,146 @@ export class MoneyApi {
860
927
  this.exchangeRates = new ExchangeRatesCollection(client);
861
928
  }
862
929
  }
930
+ /** `bank_transfer_accounts` of Sylphx Money: Resource type `money.sylphx.com/BankTransferAccount`. */
931
+ export class BankTransferAccountsCollection {
932
+ client;
933
+ constructor(client) {
934
+ this.client = client;
935
+ }
936
+ /**
937
+ * GetBankTransferAccount through the project-scoped bank transfer API.
938
+ *
939
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/bank_transfer_accounts/*}` · permission `billing:read` · effect `read`
940
+ *
941
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `ETAG_MISMATCH`, `UNAVAILABLE`.
942
+ */
943
+ async get(request) {
944
+ return this.client.call({
945
+ method: 'GET',
946
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/bank_transfer_accounts/*', 'name')}`,
947
+ responseType: 'sylphx.money.v1.BankTransferAccount',
948
+ mutation: false,
949
+ });
950
+ }
951
+ /**
952
+ * UpdateBankTransferAccount through the project-scoped bank transfer API.
953
+ *
954
+ * `PATCH /v1/{bank_transfer_account.name=orgs/*\/projects/*\/envs/*\/bank_transfer_accounts/*}` · permission `billing:bank_accounts:write` · effect `write`
955
+ *
956
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `ETAG_MISMATCH`, `UNAVAILABLE`.
957
+ */
958
+ async update(request) {
959
+ return this.client.call({
960
+ method: 'PATCH',
961
+ path: `/v1/${runtime.pathParam(request.bankTransferAccount?.name, 'orgs/*/projects/*/envs/*/bank_transfer_accounts/*', 'bank_transfer_account.name')}`,
962
+ query: { update_mask: request.updateMask, allow_missing: request.allowMissing },
963
+ body: request.bankTransferAccount ?? {},
964
+ bodyType: 'sylphx.money.v1.BankTransferAccount',
965
+ responseType: 'sylphx.money.v1.BankTransferAccount',
966
+ mutation: true,
967
+ });
968
+ }
969
+ }
970
+ /** `bank_receipts` of Sylphx Money: Resource type `money.sylphx.com/BankReceipt`. */
971
+ export class BankReceiptsCollection {
972
+ client;
973
+ constructor(client) {
974
+ this.client = client;
975
+ }
976
+ /**
977
+ * GetBankReceipt through the project-scoped bank transfer API.
978
+ *
979
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/bank_receipts/*}` · permission `billing:bank_receipts:read` · effect `read`
980
+ *
981
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `ETAG_MISMATCH`, `UNAVAILABLE`.
982
+ */
983
+ async get(request) {
984
+ return this.client.call({
985
+ method: 'GET',
986
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/bank_receipts/*', 'name')}`,
987
+ responseType: 'sylphx.money.v1.BankReceipt',
988
+ mutation: false,
989
+ });
990
+ }
991
+ /**
992
+ * Lists incoming bank evidence, including receipts held for review.
993
+ *
994
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/bank_receipts` · permission `billing:bank_receipts:read` · effect `read`
995
+ *
996
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
997
+ */
998
+ async list(request) {
999
+ return this.client.call({
1000
+ method: 'GET',
1001
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/bank_receipts`,
1002
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
1003
+ responseType: 'sylphx.money.v1.ListBankReceiptsResponse',
1004
+ mutation: false,
1005
+ });
1006
+ }
1007
+ /** Every item of every page of `list`. */
1008
+ async *listAll(request) {
1009
+ let next = request;
1010
+ for (;;) {
1011
+ const page = await this.list(next);
1012
+ yield* page.bankReceipts ?? [];
1013
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
1014
+ return;
1015
+ next = { ...request, pageToken: page.nextPageToken };
1016
+ }
1017
+ }
1018
+ /**
1019
+ * RecordBankReceipt through the project-scoped bank transfer API.
1020
+ *
1021
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/bank_receipts:record` · permission `billing:bank_receipts:write` · effect `write`
1022
+ *
1023
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `INVALID_STATE`, `ETAG_MISMATCH`, `UNAVAILABLE`.
1024
+ */
1025
+ async record(request) {
1026
+ return this.client.call({
1027
+ method: 'POST',
1028
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/bank_receipts:record`,
1029
+ body: runtime.omit(request, ['parent']),
1030
+ bodyType: 'sylphx.money.v1.RecordBankReceiptRequest',
1031
+ responseType: 'sylphx.money.v1.BankReceipt',
1032
+ mutation: true,
1033
+ });
1034
+ }
1035
+ /**
1036
+ * ResolveBankReceipt through the project-scoped bank transfer API.
1037
+ *
1038
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/bank_receipts/*}:resolve` · permission `billing:bank_receipts:write` · effect `write`
1039
+ *
1040
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `ETAG_MISMATCH`, `UNAVAILABLE`.
1041
+ */
1042
+ async resolve(request) {
1043
+ return this.client.call({
1044
+ method: 'POST',
1045
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/bank_receipts/*', 'name')}:resolve`,
1046
+ body: runtime.omit(request, ['name']),
1047
+ bodyType: 'sylphx.money.v1.ResolveBankReceiptRequest',
1048
+ responseType: 'sylphx.money.v1.BankReceipt',
1049
+ mutation: true,
1050
+ });
1051
+ }
1052
+ /**
1053
+ * ReverseBankReceipt through the project-scoped bank transfer API.
1054
+ *
1055
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/bank_receipts/*}:reverse` · permission `billing:bank_receipts:write` · effect `write`
1056
+ *
1057
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `INVALID_STATE`, `ETAG_MISMATCH`, `UNAVAILABLE`.
1058
+ */
1059
+ async reverse(request) {
1060
+ return this.client.call({
1061
+ method: 'POST',
1062
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/bank_receipts/*', 'name')}:reverse`,
1063
+ body: runtime.omit(request, ['name']),
1064
+ bodyType: 'sylphx.money.v1.ReverseBankReceiptRequest',
1065
+ responseType: 'sylphx.money.v1.BankReceipt',
1066
+ mutation: true,
1067
+ });
1068
+ }
1069
+ }
863
1070
  /** `processor_events` of Sylphx Money: Resource type `money.sylphx.com/ProcessorEvent`. */
864
1071
  export class ProcessorEventsCollection {
865
1072
  client;