@vrplatform/api 1.3.1-stage.5167 → 1.3.1-stage.5180

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.
@@ -4799,7 +4799,7 @@ export interface paths {
4799
4799
  get?: never;
4800
4800
  put?: never;
4801
4801
  /**
4802
- * @description Request selected Ramp owner payouts. Each statement succeeds or is skipped independently, so one blocked selection never rolls back successful requests. Only first payouts are supported: statements that already have a payout are skipped, and additional partial payments go through `POST /statements/{id}/pay`. An explicit amount overrides the full net income and therefore requires exactly one selection.
4802
+ * @description Execute owner statement payouts with one explicit selection per ownership member. Every selection books a payout transaction against its bank account. `provider: "ramp"` additionally dispatches an ACH payment funded through the Ramp account connection of the selected bank account; `provider: null` never dispatches, even when the bank account is Ramp-backed. Each statement validates and executes atomically and independently, so one blocked statement never rolls back earlier results. Raw bank details are never accepted here; owner ACH methods are managed through `POST /contacts/{id}/payment-methods/ach`.
4803
4803
  *
4804
4804
  * Required scope: statements:pay
4805
4805
  */
@@ -4820,7 +4820,7 @@ export interface paths {
4820
4820
  get?: never;
4821
4821
  put?: never;
4822
4822
  /**
4823
- * @description Preview Ramp payout readiness per statement, owner, connection, and funding account without creating transactions.
4823
+ * @description Preview owner statement payout plans without creating transactions. Returns authoritative per-owner allocations after server rounding, default bank accounts, ACH payment-method readiness, and typed blockers for the submitted owner selections. `POST /statements/pay` revalidates the same rules; the preview is advisory.
4824
4824
  *
4825
4825
  * Required scope: statements:read
4826
4826
  */
@@ -4925,27 +4925,6 @@ export interface paths {
4925
4925
  patch?: never;
4926
4926
  trace?: never;
4927
4927
  };
4928
- "/statements/{id}/pay": {
4929
- parameters: {
4930
- query?: never;
4931
- header?: never;
4932
- path?: never;
4933
- cookie?: never;
4934
- };
4935
- get?: never;
4936
- put?: never;
4937
- /**
4938
- * @description Create owner payout transactions and optionally dispatch them through Ramp. The response includes every payout transaction ID and the durable Ramp sync ID.
4939
- *
4940
- * Required scope: statements:pay
4941
- */
4942
- post: operations["postStatementsByIdPay"];
4943
- delete?: never;
4944
- options?: never;
4945
- head?: never;
4946
- patch?: never;
4947
- trace?: never;
4948
- };
4949
4928
  "/statements/{id}/refresh-layout": {
4950
4929
  parameters: {
4951
4930
  query?: never;
@@ -103427,18 +103406,27 @@ export interface operations {
103427
103406
  requestBody?: {
103428
103407
  content: {
103429
103408
  "application/json": {
103430
- /** @constant */
103431
- provider: "ramp";
103432
- selections: {
103409
+ /** @description Payout date for every statement. */
103410
+ date?: string | null;
103411
+ statements: {
103433
103412
  /** Format: uuid */
103434
103413
  statementId: string;
103435
- /** Format: uuid */
103436
- fundingAccountId?: string;
103414
+ /** @description Signed override total for an additional partial payment or owner receipt. Omit to pay the full net income, which requires the statement to have no prior payout. */
103415
+ amount?: number | null;
103437
103416
  idempotencyKey?: string;
103417
+ /** @description Exactly one selection per ownership member. Missing or invalid selections fail; the API never substitutes a payment method. */
103418
+ payouts: {
103419
+ /** Format: uuid */
103420
+ contactId: string;
103421
+ /** @description The only ACH trigger. `null` records the payout without dispatching, even when the bank account is Ramp-backed. */
103422
+ provider: "ramp" | null;
103423
+ /**
103424
+ * Format: uuid
103425
+ * @description GL bank account the payout is booked against. For `provider: "ramp"` it must be ACH-capable; its Ramp account connection is used as the funding account.
103426
+ */
103427
+ bankAccountId: string;
103428
+ }[];
103438
103429
  }[];
103439
- date?: string | null;
103440
- amount?: number | null;
103441
- bankAccountId?: string | null;
103442
103430
  };
103443
103431
  };
103444
103432
  };
@@ -103453,10 +103441,21 @@ export interface operations {
103453
103441
  results: {
103454
103442
  /** Format: uuid */
103455
103443
  statementId: string;
103456
- /** @enum {string} */
103457
- status: "requested" | "skipped";
103458
- transactionIds: string[];
103459
- syncId: string | null;
103444
+ /**
103445
+ * @description `requested` dispatched at least one Ramp ACH payment, `recorded` booked payout transactions only, `skipped` rejected the complete statement.
103446
+ * @enum {string}
103447
+ */
103448
+ status: "requested" | "recorded" | "skipped";
103449
+ payouts: {
103450
+ /** Format: uuid */
103451
+ contactId: string;
103452
+ provider: "ramp" | null;
103453
+ /** @description Value in cents (100 = 1€) */
103454
+ amount: number;
103455
+ /** Format: uuid */
103456
+ transactionId: string;
103457
+ syncId: string | null;
103458
+ }[];
103460
103459
  message: string | null;
103461
103460
  }[];
103462
103461
  };
@@ -103699,11 +103698,25 @@ export interface operations {
103699
103698
  requestBody?: {
103700
103699
  content: {
103701
103700
  "application/json": {
103702
- statementIds: string[];
103703
- /** Format: uuid */
103704
- connectionId?: string;
103705
- /** Format: uuid */
103706
- fundingAccountId?: string;
103701
+ date?: string | null;
103702
+ statements: {
103703
+ /** Format: uuid */
103704
+ statementId: string;
103705
+ /** @description Signed override total. Omit to preview the full net income payout. */
103706
+ amount?: number | null;
103707
+ /** @description Owner selections to validate. Omit to receive server-computed defaults per owner. */
103708
+ payouts?: {
103709
+ /** Format: uuid */
103710
+ contactId: string;
103711
+ /** @description The only ACH trigger. `null` records the payout without dispatching, even when the bank account is Ramp-backed. */
103712
+ provider: "ramp" | null;
103713
+ /**
103714
+ * Format: uuid
103715
+ * @description GL bank account the payout is booked against. For `provider: "ramp"` it must be ACH-capable; its Ramp account connection is used as the funding account.
103716
+ */
103717
+ bankAccountId: string;
103718
+ }[];
103719
+ }[];
103707
103720
  };
103708
103721
  };
103709
103722
  };
@@ -103720,9 +103733,13 @@ export interface operations {
103720
103733
  statementId: string;
103721
103734
  ready: boolean;
103722
103735
  connectionId: string | null;
103723
- fundingAccountId: string | null;
103736
+ /** @description Signed effective payout total: the explicit amount override, or the statement net income. */
103737
+ amount: number;
103724
103738
  owners: {
103725
103739
  contactId: string | null;
103740
+ /** @description Authoritative owner allocation after server rounding. */
103741
+ amount: number;
103742
+ defaultBankAccountId: string | null;
103726
103743
  paymentMethod: {
103727
103744
  /** @constant */
103728
103745
  provider: "ramp";
@@ -103735,7 +103752,7 @@ export interface operations {
103735
103752
  }[];
103736
103753
  issues: {
103737
103754
  /** @enum {string} */
103738
- code: "statementNotFound" | "statementNotPayable" | "statementAlreadyPaid" | "providerConnectionMissing" | "providerConnectionAmbiguous" | "fundingAccountNotFound" | "fundingAccountUnavailable" | "ownerMissing" | "ownerPaymentMethodNotReady";
103755
+ code: "statementNotFound" | "statementNotPayable" | "statementAlreadyPaid" | "providerConnectionMissing" | "providerConnectionAmbiguous" | "ownerMissing" | "ownerPaymentMethodNotReady" | "ownerSelectionMissing" | "ownerSelectionUnknown" | "ownerAllocationNotPositive" | "bankAccountInvalid" | "bankAccountNotAchCapable";
103739
103756
  message: string;
103740
103757
  /** Format: uuid */
103741
103758
  contactId?: string;
@@ -108112,276 +108129,6 @@ export interface operations {
108112
108129
  };
108113
108130
  };
108114
108131
  };
108115
- postStatementsByIdPay: {
108116
- parameters: {
108117
- query?: {
108118
- /** @description Validate this request through the real write path, then roll back all changes. See https://docs.vrplatform.app/api/dry-run-mode. */
108119
- dryRun?: boolean;
108120
- };
108121
- header?: never;
108122
- path: {
108123
- id: string;
108124
- };
108125
- cookie?: never;
108126
- };
108127
- requestBody?: {
108128
- content: {
108129
- "application/json": {
108130
- provider: "ramp" | null;
108131
- date?: string | null;
108132
- amount?: number | null;
108133
- bankAccountId?: string | null;
108134
- fundingAccountId?: string | null;
108135
- idempotencyKey?: string;
108136
- };
108137
- };
108138
- };
108139
- responses: {
108140
- /** @description Successful response */
108141
- 200: {
108142
- headers: {
108143
- [name: string]: unknown;
108144
- };
108145
- content: {
108146
- "application/json": {
108147
- payouts: {
108148
- /** Format: uuid */
108149
- id: string;
108150
- uniqueRef?: string | null;
108151
- sourceId?: string | null;
108152
- }[];
108153
- transactionIds: string[];
108154
- syncId: string | null;
108155
- };
108156
- };
108157
- };
108158
- /** @description Bad request */
108159
- 400: {
108160
- headers: {
108161
- /** @description Seconds to wait when retryable=true and the server supplies a delay. */
108162
- "Retry-After"?: number;
108163
- [name: string]: unknown;
108164
- };
108165
- content: {
108166
- "application/json": {
108167
- code: string;
108168
- message: string;
108169
- links?: {
108170
- docs: string;
108171
- schema: string;
108172
- };
108173
- issues?: {
108174
- message: string;
108175
- path?: (string | number)[];
108176
- schema?: string;
108177
- }[];
108178
- retryable?: boolean;
108179
- context?: unknown;
108180
- };
108181
- };
108182
- };
108183
- /** @description Unauthorized */
108184
- 401: {
108185
- headers: {
108186
- /** @description Seconds to wait when retryable=true and the server supplies a delay. */
108187
- "Retry-After"?: number;
108188
- [name: string]: unknown;
108189
- };
108190
- content: {
108191
- "application/json": {
108192
- code: string;
108193
- message: string;
108194
- links?: {
108195
- docs: string;
108196
- schema: string;
108197
- };
108198
- issues?: {
108199
- message: string;
108200
- path?: (string | number)[];
108201
- schema?: string;
108202
- }[];
108203
- retryable?: boolean;
108204
- context?: unknown;
108205
- };
108206
- };
108207
- };
108208
- /** @description Forbidden */
108209
- 403: {
108210
- headers: {
108211
- /** @description Seconds to wait when retryable=true and the server supplies a delay. */
108212
- "Retry-After"?: number;
108213
- [name: string]: unknown;
108214
- };
108215
- content: {
108216
- "application/json": {
108217
- code: string;
108218
- message: string;
108219
- links?: {
108220
- docs: string;
108221
- schema: string;
108222
- };
108223
- issues?: {
108224
- message: string;
108225
- path?: (string | number)[];
108226
- schema?: string;
108227
- }[];
108228
- retryable?: boolean;
108229
- context?: unknown;
108230
- };
108231
- };
108232
- };
108233
- /** @description Not found */
108234
- 404: {
108235
- headers: {
108236
- /** @description Seconds to wait when retryable=true and the server supplies a delay. */
108237
- "Retry-After"?: number;
108238
- [name: string]: unknown;
108239
- };
108240
- content: {
108241
- "application/json": {
108242
- code: string;
108243
- message: string;
108244
- links?: {
108245
- docs: string;
108246
- schema: string;
108247
- };
108248
- issues?: {
108249
- message: string;
108250
- path?: (string | number)[];
108251
- schema?: string;
108252
- }[];
108253
- retryable?: boolean;
108254
- context?: unknown;
108255
- };
108256
- };
108257
- };
108258
- /** @description Conflict */
108259
- 409: {
108260
- headers: {
108261
- /** @description Seconds to wait when retryable=true and the server supplies a delay. */
108262
- "Retry-After"?: number;
108263
- [name: string]: unknown;
108264
- };
108265
- content: {
108266
- "application/json": {
108267
- code: string;
108268
- message: string;
108269
- links?: {
108270
- docs: string;
108271
- schema: string;
108272
- };
108273
- issues?: {
108274
- message: string;
108275
- path?: (string | number)[];
108276
- schema?: string;
108277
- }[];
108278
- retryable?: boolean;
108279
- context?: unknown;
108280
- };
108281
- };
108282
- };
108283
- /** @description Gone */
108284
- 410: {
108285
- headers: {
108286
- /** @description Seconds to wait when retryable=true and the server supplies a delay. */
108287
- "Retry-After"?: number;
108288
- [name: string]: unknown;
108289
- };
108290
- content: {
108291
- "application/json": {
108292
- code: string;
108293
- message: string;
108294
- links?: {
108295
- docs: string;
108296
- schema: string;
108297
- };
108298
- issues?: {
108299
- message: string;
108300
- path?: (string | number)[];
108301
- schema?: string;
108302
- }[];
108303
- retryable?: boolean;
108304
- context?: unknown;
108305
- };
108306
- };
108307
- };
108308
- /** @description Unprocessable content */
108309
- 422: {
108310
- headers: {
108311
- /** @description Seconds to wait when retryable=true and the server supplies a delay. */
108312
- "Retry-After"?: number;
108313
- [name: string]: unknown;
108314
- };
108315
- content: {
108316
- "application/json": {
108317
- code: string;
108318
- message: string;
108319
- links?: {
108320
- docs: string;
108321
- schema: string;
108322
- };
108323
- issues?: {
108324
- message: string;
108325
- path?: (string | number)[];
108326
- schema?: string;
108327
- }[];
108328
- retryable?: boolean;
108329
- context?: unknown;
108330
- };
108331
- };
108332
- };
108333
- /** @description Internal server error */
108334
- 500: {
108335
- headers: {
108336
- /** @description Seconds to wait when retryable=true and the server supplies a delay. */
108337
- "Retry-After"?: number;
108338
- [name: string]: unknown;
108339
- };
108340
- content: {
108341
- "application/json": {
108342
- code: string;
108343
- message: string;
108344
- links?: {
108345
- docs: string;
108346
- schema: string;
108347
- };
108348
- issues?: {
108349
- message: string;
108350
- path?: (string | number)[];
108351
- schema?: string;
108352
- }[];
108353
- retryable?: boolean;
108354
- context?: unknown;
108355
- };
108356
- };
108357
- };
108358
- /** @description Service unavailable */
108359
- 503: {
108360
- headers: {
108361
- /** @description Seconds to wait when retryable=true and the server supplies a delay. */
108362
- "Retry-After"?: number;
108363
- [name: string]: unknown;
108364
- };
108365
- content: {
108366
- "application/json": {
108367
- code: string;
108368
- message: string;
108369
- links?: {
108370
- docs: string;
108371
- schema: string;
108372
- };
108373
- issues?: {
108374
- message: string;
108375
- path?: (string | number)[];
108376
- schema?: string;
108377
- }[];
108378
- retryable?: boolean;
108379
- context?: unknown;
108380
- };
108381
- };
108382
- };
108383
- };
108384
- };
108385
108132
  postStatementsByIdRefreshLayout: {
108386
108133
  parameters: {
108387
108134
  query?: never;