@rowbind/sdk 0.0.0-stage → 0.1.0-canary.104
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/README.md +537 -2
- package/dist/generated/catalog.d.ts +22 -0
- package/dist/generated/catalog.js +7 -0
- package/dist/generated/http.d.ts +1740 -0
- package/dist/generated/http.js +843 -0
- package/dist/generated/raw.d.ts +39 -0
- package/dist/generated/raw.js +14 -0
- package/dist/generated/validators.d.ts +1411 -0
- package/dist/generated/validators.js +993 -0
- package/dist/http-error.d.ts +5 -0
- package/dist/http-error.js +2 -0
- package/dist/http-request.d.ts +17 -0
- package/dist/http-request.js +73 -0
- package/dist/index.d.ts +622 -0
- package/dist/index.js +256 -0
- package/dist/inputs.d.ts +145 -0
- package/dist/inputs.js +46 -0
- package/dist/ledger.d.ts +98 -0
- package/dist/ledger.js +218 -0
- package/dist/raw-invoice-query.d.ts +2 -0
- package/dist/raw-invoice-query.js +10 -0
- package/dist/transport.d.ts +344 -0
- package/dist/transport.js +276 -0
- package/dist/wire.d.ts +16 -0
- package/dist/wire.js +8 -0
- package/examples/catalog-invoice.mts +30 -0
- package/examples/connection-health.mts +21 -0
- package/examples/department-quickbooks/example.mts +12 -0
- package/examples/department-quickbooks/tsconfig.json +4 -0
- package/examples/facturar.mts +34 -0
- package/examples/first-customer.mts +72 -0
- package/examples/invoice-balances.mts +60 -0
- package/examples/invoice-settlement.mts +86 -0
- package/examples/invoice-sync.mts +46 -0
- package/examples/invoice-traces.mts +65 -0
- package/examples/invoice.mts +27 -0
- package/examples/mixed-providers/example.mts +12 -0
- package/examples/mixed-providers/tsconfig.json +4 -0
- package/examples/native-query.mts +28 -0
- package/examples/native-quickstart.mts +46 -0
- package/examples/observed-payments.mts +29 -0
- package/examples/quickstart.mts +11 -0
- package/examples/reimbursement-batch.mts +36 -0
- package/examples/resume-invoice.mts +52 -0
- package/examples/tsconfig.editor.json +11 -0
- package/examples/webhook-receiver.mts +142 -0
- package/package.json +61 -5
|
@@ -0,0 +1,1740 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Rowbind Integration API
|
|
5
|
+
* Authenticate from the SaaS backend with its project key. The sandbox Worker supports companies, consent, invoices, received payments, credit memos, reimbursement batches, managed invoice and received-payment sync, payment matching, and signed notifications in simulated books. The standalone pilot supports connections, invoices and operation receipts.
|
|
6
|
+
* OpenAPI spec version: 0.2.0
|
|
7
|
+
*/
|
|
8
|
+
import { sendToRowbind } from '../http-request.js';
|
|
9
|
+
/**
|
|
10
|
+
* ERP record type within the selected book. Customer links resolve invoice headers and item links resolve invoice lines.
|
|
11
|
+
*/
|
|
12
|
+
export type CatalogKind = typeof CatalogKind[keyof typeof CatalogKind];
|
|
13
|
+
export declare const CatalogKind: {
|
|
14
|
+
readonly customer: "customer";
|
|
15
|
+
readonly item: "item";
|
|
16
|
+
};
|
|
17
|
+
export interface CatalogRecord {
|
|
18
|
+
/**
|
|
19
|
+
* ID assigned by the ERP to this customer or item in the selected book. Pass this exact value when linking the record.
|
|
20
|
+
* @minLength 1
|
|
21
|
+
*/
|
|
22
|
+
nativeId: string;
|
|
23
|
+
/**
|
|
24
|
+
* Name shown for the ERP record. Multiple candidates in the same book may share this name.
|
|
25
|
+
* @minLength 1
|
|
26
|
+
*/
|
|
27
|
+
displayName: string;
|
|
28
|
+
/**
|
|
29
|
+
* Native item code when supplied by the ERP. Use nativeId to select among matching items.
|
|
30
|
+
* @minLength 1
|
|
31
|
+
*/
|
|
32
|
+
sku?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface CatalogPage {
|
|
35
|
+
/**
|
|
36
|
+
* Matching candidates from one book and record type, ordered by native ID.
|
|
37
|
+
* @maxItems 50
|
|
38
|
+
*/
|
|
39
|
+
records: CatalogRecord[];
|
|
40
|
+
/**
|
|
41
|
+
* Opaque cursor. Pass it unchanged as after with the same connection, kind and query to continue. Null marks the last page.
|
|
42
|
+
* @minLength 1
|
|
43
|
+
* @nullable
|
|
44
|
+
*/
|
|
45
|
+
nextCursor: string | null;
|
|
46
|
+
}
|
|
47
|
+
export interface CatalogLinkRequest {
|
|
48
|
+
/**
|
|
49
|
+
* Stable customer reference or SKU from your SaaS. The same external ID may link to a different record in another book.
|
|
50
|
+
* @minLength 1
|
|
51
|
+
* @maxLength 200
|
|
52
|
+
* @pattern \S
|
|
53
|
+
*/
|
|
54
|
+
externalId: string;
|
|
55
|
+
/**
|
|
56
|
+
* ID of the ERP record you selected from this book and record type. An existing link to another ID returns a conflict.
|
|
57
|
+
* @minLength 1
|
|
58
|
+
* @maxLength 200
|
|
59
|
+
* @pattern \S
|
|
60
|
+
*/
|
|
61
|
+
nativeId: string;
|
|
62
|
+
}
|
|
63
|
+
export interface CatalogLink {
|
|
64
|
+
kind: CatalogKind;
|
|
65
|
+
/**
|
|
66
|
+
* Confirmed SaaS reference. Use it as customerRef.externalId or itemRef.externalId on invoices for this book.
|
|
67
|
+
* @minLength 1
|
|
68
|
+
*/
|
|
69
|
+
externalId: string;
|
|
70
|
+
/**
|
|
71
|
+
* Confirmed ERP customer or item ID for this book. Repeating the same link returns this ID.
|
|
72
|
+
* @minLength 1
|
|
73
|
+
*/
|
|
74
|
+
nativeId: string;
|
|
75
|
+
}
|
|
76
|
+
export type RawQueryRequest = {
|
|
77
|
+
provider: 'quickbooksDesktop';
|
|
78
|
+
/**
|
|
79
|
+
* @minLength 1
|
|
80
|
+
* @maxLength 4096
|
|
81
|
+
*/
|
|
82
|
+
qbxml: string;
|
|
83
|
+
} | {
|
|
84
|
+
provider: 'netsuite';
|
|
85
|
+
/**
|
|
86
|
+
* @minLength 1
|
|
87
|
+
* @maxLength 4096
|
|
88
|
+
*/
|
|
89
|
+
q: string;
|
|
90
|
+
/**
|
|
91
|
+
* Maximum rows per page. Defaults to 10.
|
|
92
|
+
* @minimum 1
|
|
93
|
+
* @maximum 100
|
|
94
|
+
*/
|
|
95
|
+
limit?: number;
|
|
96
|
+
/**
|
|
97
|
+
* Zero-based offset, divisible by the page limit. Defaults to 0.
|
|
98
|
+
* @minimum 0
|
|
99
|
+
* @maximum 1000000
|
|
100
|
+
*/
|
|
101
|
+
offset?: number;
|
|
102
|
+
};
|
|
103
|
+
export type SuiteQLPageItemsItem = {
|
|
104
|
+
[key: string]: unknown;
|
|
105
|
+
};
|
|
106
|
+
export interface SuiteQLPage {
|
|
107
|
+
/** @maxItems 100 */
|
|
108
|
+
items: SuiteQLPageItemsItem[];
|
|
109
|
+
hasMore: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* @minimum 0
|
|
112
|
+
* @maximum 100
|
|
113
|
+
*/
|
|
114
|
+
count: number;
|
|
115
|
+
/** @minimum 0 */
|
|
116
|
+
offset: number;
|
|
117
|
+
/** @minimum 0 */
|
|
118
|
+
totalResults?: number;
|
|
119
|
+
[key: string]: unknown;
|
|
120
|
+
}
|
|
121
|
+
export type RawQueryResult = {
|
|
122
|
+
provider: 'quickbooksDesktop';
|
|
123
|
+
/** @minLength 1 */
|
|
124
|
+
qbxml: string;
|
|
125
|
+
} | {
|
|
126
|
+
provider: 'netsuite';
|
|
127
|
+
page: SuiteQLPage;
|
|
128
|
+
};
|
|
129
|
+
export type RawReadRequest = {
|
|
130
|
+
provider: 'quickbooksDesktop';
|
|
131
|
+
/**
|
|
132
|
+
* @minLength 1
|
|
133
|
+
* @maxLength 4096
|
|
134
|
+
*/
|
|
135
|
+
qbxml: string;
|
|
136
|
+
} | {
|
|
137
|
+
provider: 'netsuite';
|
|
138
|
+
method: 'GET';
|
|
139
|
+
/**
|
|
140
|
+
* @minLength 1
|
|
141
|
+
* @maxLength 512
|
|
142
|
+
*/
|
|
143
|
+
path: string;
|
|
144
|
+
};
|
|
145
|
+
export type RawReadResult = {
|
|
146
|
+
provider: 'quickbooksDesktop';
|
|
147
|
+
qbxml: string;
|
|
148
|
+
} | {
|
|
149
|
+
provider: 'netsuite';
|
|
150
|
+
record: {
|
|
151
|
+
id: string;
|
|
152
|
+
[key: string]: unknown;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
export interface CompanyRequest {
|
|
156
|
+
/**
|
|
157
|
+
* @minLength 1
|
|
158
|
+
* @maxLength 255
|
|
159
|
+
*/
|
|
160
|
+
externalId: string;
|
|
161
|
+
/**
|
|
162
|
+
* @minLength 1
|
|
163
|
+
* @maxLength 255
|
|
164
|
+
*/
|
|
165
|
+
name: string;
|
|
166
|
+
}
|
|
167
|
+
export interface Company {
|
|
168
|
+
/** @minLength 1 */
|
|
169
|
+
id: string;
|
|
170
|
+
/**
|
|
171
|
+
* @minLength 1
|
|
172
|
+
* @maxLength 255
|
|
173
|
+
*/
|
|
174
|
+
externalId: string;
|
|
175
|
+
/**
|
|
176
|
+
* @minLength 1
|
|
177
|
+
* @maxLength 255
|
|
178
|
+
*/
|
|
179
|
+
name: string;
|
|
180
|
+
}
|
|
181
|
+
export type ConnectSessionRequestProvider = typeof ConnectSessionRequestProvider[keyof typeof ConnectSessionRequestProvider];
|
|
182
|
+
export declare const ConnectSessionRequestProvider: {
|
|
183
|
+
readonly quickbooksDesktop: "quickbooksDesktop";
|
|
184
|
+
readonly netsuite: "netsuite";
|
|
185
|
+
};
|
|
186
|
+
export interface ConnectSessionRequest {
|
|
187
|
+
/** @minLength 1 */
|
|
188
|
+
companyId: string;
|
|
189
|
+
provider: ConnectSessionRequestProvider;
|
|
190
|
+
/** Ask the book administrator to authorize native queries when approving this session. Defaults to false. */
|
|
191
|
+
allowNativeQueries?: boolean;
|
|
192
|
+
}
|
|
193
|
+
export type CreatedConnectSessionProvider = typeof CreatedConnectSessionProvider[keyof typeof CreatedConnectSessionProvider];
|
|
194
|
+
export declare const CreatedConnectSessionProvider: {
|
|
195
|
+
readonly quickbooksDesktop: "quickbooksDesktop";
|
|
196
|
+
readonly netsuite: "netsuite";
|
|
197
|
+
};
|
|
198
|
+
export type CreatedConnectSessionStatus = typeof CreatedConnectSessionStatus[keyof typeof CreatedConnectSessionStatus];
|
|
199
|
+
export declare const CreatedConnectSessionStatus: {
|
|
200
|
+
readonly pending: "pending";
|
|
201
|
+
};
|
|
202
|
+
export interface CreatedConnectSession {
|
|
203
|
+
/** @minLength 1 */
|
|
204
|
+
id: string;
|
|
205
|
+
/** @minLength 1 */
|
|
206
|
+
companyId: string;
|
|
207
|
+
provider: CreatedConnectSessionProvider;
|
|
208
|
+
expiresAt: string;
|
|
209
|
+
status: CreatedConnectSessionStatus;
|
|
210
|
+
url: string;
|
|
211
|
+
}
|
|
212
|
+
export type ConnectSessionProvider = typeof ConnectSessionProvider[keyof typeof ConnectSessionProvider];
|
|
213
|
+
export declare const ConnectSessionProvider: {
|
|
214
|
+
readonly quickbooksDesktop: "quickbooksDesktop";
|
|
215
|
+
readonly netsuite: "netsuite";
|
|
216
|
+
};
|
|
217
|
+
export type ConnectSessionStatus = typeof ConnectSessionStatus[keyof typeof ConnectSessionStatus];
|
|
218
|
+
export declare const ConnectSessionStatus: {
|
|
219
|
+
readonly pending: "pending";
|
|
220
|
+
readonly connected: "connected";
|
|
221
|
+
readonly expired: "expired";
|
|
222
|
+
};
|
|
223
|
+
export interface ConnectSession {
|
|
224
|
+
/** @minLength 1 */
|
|
225
|
+
id: string;
|
|
226
|
+
/** @minLength 1 */
|
|
227
|
+
companyId: string;
|
|
228
|
+
provider: ConnectSessionProvider;
|
|
229
|
+
expiresAt: string;
|
|
230
|
+
status: ConnectSessionStatus;
|
|
231
|
+
/** @minLength 1 */
|
|
232
|
+
connectionId?: string;
|
|
233
|
+
}
|
|
234
|
+
export type ConnectionHealthProvider = typeof ConnectionHealthProvider[keyof typeof ConnectionHealthProvider];
|
|
235
|
+
export declare const ConnectionHealthProvider: {
|
|
236
|
+
readonly quickbooksDesktop: "quickbooksDesktop";
|
|
237
|
+
readonly netsuite: "netsuite";
|
|
238
|
+
};
|
|
239
|
+
export type ConnectionHealthAuthorization = typeof ConnectionHealthAuthorization[keyof typeof ConnectionHealthAuthorization];
|
|
240
|
+
export declare const ConnectionHealthAuthorization: {
|
|
241
|
+
readonly authorized: "authorized";
|
|
242
|
+
readonly unrecorded: "unrecorded";
|
|
243
|
+
};
|
|
244
|
+
export type ConnectionHealthStatus = typeof ConnectionHealthStatus[keyof typeof ConnectionHealthStatus];
|
|
245
|
+
export declare const ConnectionHealthStatus: {
|
|
246
|
+
readonly unchecked: "unchecked";
|
|
247
|
+
readonly verified: "verified";
|
|
248
|
+
readonly offline: "offline";
|
|
249
|
+
readonly wrong_book: "wrong_book";
|
|
250
|
+
readonly permission_denied: "permission_denied";
|
|
251
|
+
readonly book_diverged: "book_diverged";
|
|
252
|
+
};
|
|
253
|
+
export type ConnectionHealthCapability = typeof ConnectionHealthCapability[keyof typeof ConnectionHealthCapability];
|
|
254
|
+
export declare const ConnectionHealthCapability: {
|
|
255
|
+
readonly 'invoices:read': "invoices:read";
|
|
256
|
+
};
|
|
257
|
+
export type ConnectionHealthNextAction = typeof ConnectionHealthNextAction[keyof typeof ConnectionHealthNextAction];
|
|
258
|
+
export declare const ConnectionHealthNextAction: {
|
|
259
|
+
readonly run_check: "run_check";
|
|
260
|
+
readonly none: "none";
|
|
261
|
+
readonly restore_connection: "restore_connection";
|
|
262
|
+
readonly open_authorized_book: "open_authorized_book";
|
|
263
|
+
readonly restore_permissions: "restore_permissions";
|
|
264
|
+
readonly authorize_connection: "authorize_connection";
|
|
265
|
+
readonly reconcile_book: "reconcile_book";
|
|
266
|
+
};
|
|
267
|
+
/**
|
|
268
|
+
* First conflict recorded for the authorized book. Retained until a fresh check confirms that the book is consistent with the saved evidence.
|
|
269
|
+
*/
|
|
270
|
+
export type BookDivergence = {
|
|
271
|
+
kind: 'invoice_receipt';
|
|
272
|
+
/** @minLength 1 */
|
|
273
|
+
operationId: string;
|
|
274
|
+
} | {
|
|
275
|
+
kind: 'invoice_checkpoint' | 'payment_checkpoint';
|
|
276
|
+
/**
|
|
277
|
+
* @minimum 1
|
|
278
|
+
* @maximum 9007199254740991
|
|
279
|
+
*/
|
|
280
|
+
revision: number;
|
|
281
|
+
};
|
|
282
|
+
export interface ConnectionHealth {
|
|
283
|
+
/** @minLength 1 */
|
|
284
|
+
connectionId: string;
|
|
285
|
+
provider: ConnectionHealthProvider;
|
|
286
|
+
authorization: ConnectionHealthAuthorization;
|
|
287
|
+
/**
|
|
288
|
+
* Consent time if recorded. Historical consent may have an unknown date.
|
|
289
|
+
* @nullable
|
|
290
|
+
*/
|
|
291
|
+
authorizedAt: string | null;
|
|
292
|
+
status: ConnectionHealthStatus;
|
|
293
|
+
/**
|
|
294
|
+
* Time of the latest recorded invoice access observation, including an unsuccessful ERP read.
|
|
295
|
+
* @nullable
|
|
296
|
+
*/
|
|
297
|
+
checkedAt: string | null;
|
|
298
|
+
/**
|
|
299
|
+
* Time of the latest successful invoice access observation for the authorized book. Null until a check, an invoice readback or a managed invoice sync establishes that access.
|
|
300
|
+
* @nullable
|
|
301
|
+
*/
|
|
302
|
+
lastVerifiedAt: string | null;
|
|
303
|
+
capability: ConnectionHealthCapability;
|
|
304
|
+
nextAction: ConnectionHealthNextAction;
|
|
305
|
+
divergence?: BookDivergence;
|
|
306
|
+
}
|
|
307
|
+
export type QuickBooksConnectionProvider = typeof QuickBooksConnectionProvider[keyof typeof QuickBooksConnectionProvider];
|
|
308
|
+
export declare const QuickBooksConnectionProvider: {
|
|
309
|
+
readonly quickbooksDesktop: "quickbooksDesktop";
|
|
310
|
+
};
|
|
311
|
+
export interface QuickBooksConnection {
|
|
312
|
+
/** @minLength 1 */
|
|
313
|
+
id: string;
|
|
314
|
+
provider: QuickBooksConnectionProvider;
|
|
315
|
+
}
|
|
316
|
+
export type NetSuiteConnectionProvider = typeof NetSuiteConnectionProvider[keyof typeof NetSuiteConnectionProvider];
|
|
317
|
+
export declare const NetSuiteConnectionProvider: {
|
|
318
|
+
readonly netsuite: "netsuite";
|
|
319
|
+
};
|
|
320
|
+
export interface NetSuiteConnection {
|
|
321
|
+
/** @minLength 1 */
|
|
322
|
+
id: string;
|
|
323
|
+
provider: NetSuiteConnectionProvider;
|
|
324
|
+
/** @minLength 1 */
|
|
325
|
+
subsidiaryId: string;
|
|
326
|
+
}
|
|
327
|
+
export type Connection = QuickBooksConnection | NetSuiteConnection;
|
|
328
|
+
export interface ExternalReference {
|
|
329
|
+
/** @minLength 1 */
|
|
330
|
+
externalId: string;
|
|
331
|
+
}
|
|
332
|
+
export interface InvoiceLineInput {
|
|
333
|
+
itemRef: ExternalReference;
|
|
334
|
+
/**
|
|
335
|
+
* @minimum 1
|
|
336
|
+
* @maximum 9007199254740991
|
|
337
|
+
*/
|
|
338
|
+
quantity: number;
|
|
339
|
+
/** @pattern ^[0-9]+\.[0-9]{2}$ */
|
|
340
|
+
unitPrice: string;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* NetSuite internal ID of the invoice header department in the selected account.
|
|
344
|
+
* @pattern ^[1-9][0-9]*$
|
|
345
|
+
*/
|
|
346
|
+
export type NetSuiteDepartmentId = string;
|
|
347
|
+
export interface NetSuiteOptions {
|
|
348
|
+
/** @minLength 1 */
|
|
349
|
+
subsidiaryId: string;
|
|
350
|
+
departmentId?: NetSuiteDepartmentId;
|
|
351
|
+
}
|
|
352
|
+
export interface ProviderOptions {
|
|
353
|
+
netsuite: NetSuiteOptions;
|
|
354
|
+
}
|
|
355
|
+
export type InvoiceRequestCurrency = typeof InvoiceRequestCurrency[keyof typeof InvoiceRequestCurrency];
|
|
356
|
+
export declare const InvoiceRequestCurrency: {
|
|
357
|
+
readonly USD: "USD";
|
|
358
|
+
};
|
|
359
|
+
/**
|
|
360
|
+
* The connection selects the adapter. QuickBooks requires a mapped customer and items, a 1 to 11 character printable non-space ASCII externalReference, and no providerOptions. The NetSuite pilot accepts untaxed USD invoices for the configured subsidiary with the customer and items linked in that book. Each quantity is a positive whole number up to 999999999. Unit prices have two decimal places, at most 10 digits before the decimal point, and the invoice total may not exceed 9999999999.99 USD. The example uses one unit at 80.00 and one at 40.00. These checks also depend on the service's configured book.
|
|
361
|
+
*/
|
|
362
|
+
export interface InvoiceRequest {
|
|
363
|
+
/** @minLength 1 */
|
|
364
|
+
connectionId: string;
|
|
365
|
+
customerRef: ExternalReference;
|
|
366
|
+
/** @minLength 1 */
|
|
367
|
+
externalReference: string;
|
|
368
|
+
currency: InvoiceRequestCurrency;
|
|
369
|
+
/** @minItems 1 */
|
|
370
|
+
lines: InvoiceLineInput[];
|
|
371
|
+
providerOptions?: ProviderOptions;
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Positive USD amount with two decimal places, up to 9999999999.99.
|
|
375
|
+
* @pattern ^(?!0\.00$)(0|[1-9][0-9]{0,9})\.[0-9]{2}$
|
|
376
|
+
*/
|
|
377
|
+
export type ReceivableAmount = string;
|
|
378
|
+
export type ReceivedPaymentRequestCurrency = typeof ReceivedPaymentRequestCurrency[keyof typeof ReceivedPaymentRequestCurrency];
|
|
379
|
+
export declare const ReceivedPaymentRequestCurrency: {
|
|
380
|
+
readonly USD: "USD";
|
|
381
|
+
};
|
|
382
|
+
export interface ReceivedPaymentRequest {
|
|
383
|
+
/** @minLength 1 */
|
|
384
|
+
connectionId: string;
|
|
385
|
+
customerRef: ExternalReference;
|
|
386
|
+
currency: ReceivedPaymentRequestCurrency;
|
|
387
|
+
amount: ReceivableAmount;
|
|
388
|
+
/** @minLength 1 */
|
|
389
|
+
invoiceId: string;
|
|
390
|
+
}
|
|
391
|
+
export type CreditMemoRequestCurrency = typeof CreditMemoRequestCurrency[keyof typeof CreditMemoRequestCurrency];
|
|
392
|
+
export declare const CreditMemoRequestCurrency: {
|
|
393
|
+
readonly USD: "USD";
|
|
394
|
+
};
|
|
395
|
+
export interface CreditMemoRequest {
|
|
396
|
+
/** @minLength 1 */
|
|
397
|
+
connectionId: string;
|
|
398
|
+
customerRef: ExternalReference;
|
|
399
|
+
currency: CreditMemoRequestCurrency;
|
|
400
|
+
amount: ReceivableAmount;
|
|
401
|
+
}
|
|
402
|
+
export type CreditApplicationRequestCurrency = typeof CreditApplicationRequestCurrency[keyof typeof CreditApplicationRequestCurrency];
|
|
403
|
+
export declare const CreditApplicationRequestCurrency: {
|
|
404
|
+
readonly USD: "USD";
|
|
405
|
+
};
|
|
406
|
+
export interface CreditApplicationRequest {
|
|
407
|
+
/** @minLength 1 */
|
|
408
|
+
connectionId: string;
|
|
409
|
+
/** @minLength 1 */
|
|
410
|
+
invoiceId: string;
|
|
411
|
+
currency: CreditApplicationRequestCurrency;
|
|
412
|
+
amount: ReceivableAmount;
|
|
413
|
+
}
|
|
414
|
+
export type ReceivedPaymentRecordKind = typeof ReceivedPaymentRecordKind[keyof typeof ReceivedPaymentRecordKind];
|
|
415
|
+
export declare const ReceivedPaymentRecordKind: {
|
|
416
|
+
readonly received_payment: "received_payment";
|
|
417
|
+
};
|
|
418
|
+
export type ReceivedPaymentRecordCurrency = typeof ReceivedPaymentRecordCurrency[keyof typeof ReceivedPaymentRecordCurrency];
|
|
419
|
+
export declare const ReceivedPaymentRecordCurrency: {
|
|
420
|
+
readonly USD: "USD";
|
|
421
|
+
};
|
|
422
|
+
export interface ReceivedPaymentRecord {
|
|
423
|
+
kind: ReceivedPaymentRecordKind;
|
|
424
|
+
/** @minLength 1 */
|
|
425
|
+
id: string;
|
|
426
|
+
/** @minLength 1 */
|
|
427
|
+
connectionId: string;
|
|
428
|
+
/** @minLength 1 */
|
|
429
|
+
customerId: string;
|
|
430
|
+
currency: ReceivedPaymentRecordCurrency;
|
|
431
|
+
amount: ReceivableAmount;
|
|
432
|
+
/** @minLength 1 */
|
|
433
|
+
invoiceId: string;
|
|
434
|
+
/** @pattern ^(0|[1-9][0-9]*)\.[0-9]{2}$ */
|
|
435
|
+
balanceDue: string;
|
|
436
|
+
}
|
|
437
|
+
export type CreditMemoRecordKind = typeof CreditMemoRecordKind[keyof typeof CreditMemoRecordKind];
|
|
438
|
+
export declare const CreditMemoRecordKind: {
|
|
439
|
+
readonly credit_memo: "credit_memo";
|
|
440
|
+
};
|
|
441
|
+
export type CreditMemoRecordCurrency = typeof CreditMemoRecordCurrency[keyof typeof CreditMemoRecordCurrency];
|
|
442
|
+
export declare const CreditMemoRecordCurrency: {
|
|
443
|
+
readonly USD: "USD";
|
|
444
|
+
};
|
|
445
|
+
export interface CreditMemoRecord {
|
|
446
|
+
kind: CreditMemoRecordKind;
|
|
447
|
+
/** @minLength 1 */
|
|
448
|
+
id: string;
|
|
449
|
+
/** @minLength 1 */
|
|
450
|
+
connectionId: string;
|
|
451
|
+
/** @minLength 1 */
|
|
452
|
+
customerId: string;
|
|
453
|
+
currency: CreditMemoRecordCurrency;
|
|
454
|
+
amount: ReceivableAmount;
|
|
455
|
+
/** @pattern ^(0|[1-9][0-9]*)\.[0-9]{2}$ */
|
|
456
|
+
remainingCredit: string;
|
|
457
|
+
}
|
|
458
|
+
export type CreditApplicationRecordKind = typeof CreditApplicationRecordKind[keyof typeof CreditApplicationRecordKind];
|
|
459
|
+
export declare const CreditApplicationRecordKind: {
|
|
460
|
+
readonly credit_application: "credit_application";
|
|
461
|
+
};
|
|
462
|
+
export type CreditApplicationRecordCurrency = typeof CreditApplicationRecordCurrency[keyof typeof CreditApplicationRecordCurrency];
|
|
463
|
+
export declare const CreditApplicationRecordCurrency: {
|
|
464
|
+
readonly USD: "USD";
|
|
465
|
+
};
|
|
466
|
+
export interface CreditApplicationRecord {
|
|
467
|
+
kind: CreditApplicationRecordKind;
|
|
468
|
+
/** @minLength 1 */
|
|
469
|
+
id: string;
|
|
470
|
+
/** @minLength 1 */
|
|
471
|
+
connectionId: string;
|
|
472
|
+
/** @minLength 1 */
|
|
473
|
+
customerId: string;
|
|
474
|
+
currency: CreditApplicationRecordCurrency;
|
|
475
|
+
amount: ReceivableAmount;
|
|
476
|
+
/** @minLength 1 */
|
|
477
|
+
invoiceId: string;
|
|
478
|
+
/** @minLength 1 */
|
|
479
|
+
creditMemoId: string;
|
|
480
|
+
/** @pattern ^(0|[1-9][0-9]*)\.[0-9]{2}$ */
|
|
481
|
+
balanceDue: string;
|
|
482
|
+
/** @pattern ^(0|[1-9][0-9]*)\.[0-9]{2}$ */
|
|
483
|
+
remainingCredit: string;
|
|
484
|
+
}
|
|
485
|
+
export interface OperationReceipt {
|
|
486
|
+
/** @minLength 1 */
|
|
487
|
+
id: string;
|
|
488
|
+
}
|
|
489
|
+
export type PendingOperationStatus = typeof PendingOperationStatus[keyof typeof PendingOperationStatus];
|
|
490
|
+
export declare const PendingOperationStatus: {
|
|
491
|
+
readonly pending: "pending";
|
|
492
|
+
};
|
|
493
|
+
export type InvoiceRecoveryEntryCode = typeof InvoiceRecoveryEntryCode[keyof typeof InvoiceRecoveryEntryCode];
|
|
494
|
+
export declare const InvoiceRecoveryEntryCode: {
|
|
495
|
+
readonly intent_accepted: "intent_accepted";
|
|
496
|
+
readonly dispatch_claimed: "dispatch_claimed";
|
|
497
|
+
readonly book_unavailable: "book_unavailable";
|
|
498
|
+
readonly book_diverged: "book_diverged";
|
|
499
|
+
readonly no_candidate: "no_candidate";
|
|
500
|
+
readonly multiple_candidates: "multiple_candidates";
|
|
501
|
+
readonly readback_changed: "readback_changed";
|
|
502
|
+
readonly record_verified: "record_verified";
|
|
503
|
+
readonly record_mismatch: "record_mismatch";
|
|
504
|
+
readonly storage_error: "storage_error";
|
|
505
|
+
readonly internal_error: "internal_error";
|
|
506
|
+
};
|
|
507
|
+
export type InvoiceRecoveryEntryPhase = typeof InvoiceRecoveryEntryPhase[keyof typeof InvoiceRecoveryEntryPhase];
|
|
508
|
+
export declare const InvoiceRecoveryEntryPhase: {
|
|
509
|
+
readonly admission: "admission";
|
|
510
|
+
readonly dispatch: "dispatch";
|
|
511
|
+
readonly verification: "verification";
|
|
512
|
+
};
|
|
513
|
+
export type InvoiceRecoveryEntryCertainty = typeof InvoiceRecoveryEntryCertainty[keyof typeof InvoiceRecoveryEntryCertainty];
|
|
514
|
+
export declare const InvoiceRecoveryEntryCertainty: {
|
|
515
|
+
readonly not_sent: "not_sent";
|
|
516
|
+
readonly unknown: "unknown";
|
|
517
|
+
readonly verified: "verified";
|
|
518
|
+
readonly mismatch: "mismatch";
|
|
519
|
+
};
|
|
520
|
+
export type InvoiceRecoveryEntryOwner = typeof InvoiceRecoveryEntryOwner[keyof typeof InvoiceRecoveryEntryOwner];
|
|
521
|
+
export declare const InvoiceRecoveryEntryOwner: {
|
|
522
|
+
readonly rowbind: "rowbind";
|
|
523
|
+
readonly erp_admin: "erp_admin";
|
|
524
|
+
readonly saas: "saas";
|
|
525
|
+
readonly none: "none";
|
|
526
|
+
};
|
|
527
|
+
export type InvoiceRecoveryEntryNextAction = typeof InvoiceRecoveryEntryNextAction[keyof typeof InvoiceRecoveryEntryNextAction];
|
|
528
|
+
export declare const InvoiceRecoveryEntryNextAction: {
|
|
529
|
+
readonly dispatch_once: "dispatch_once";
|
|
530
|
+
readonly resume_operation: "resume_operation";
|
|
531
|
+
readonly verify_original_book: "verify_original_book";
|
|
532
|
+
readonly restore_original_book: "restore_original_book";
|
|
533
|
+
readonly reconcile_book: "reconcile_book";
|
|
534
|
+
readonly review_candidates: "review_candidates";
|
|
535
|
+
readonly review_mismatch: "review_mismatch";
|
|
536
|
+
readonly none: "none";
|
|
537
|
+
};
|
|
538
|
+
export interface InvoiceRecoveryEntry {
|
|
539
|
+
/**
|
|
540
|
+
* @minimum 1
|
|
541
|
+
* @maximum 9007199254740991
|
|
542
|
+
*/
|
|
543
|
+
sequence: number;
|
|
544
|
+
code: InvoiceRecoveryEntryCode;
|
|
545
|
+
phase: InvoiceRecoveryEntryPhase;
|
|
546
|
+
certainty: InvoiceRecoveryEntryCertainty;
|
|
547
|
+
owner: InvoiceRecoveryEntryOwner;
|
|
548
|
+
nextAction: InvoiceRecoveryEntryNextAction;
|
|
549
|
+
occurredAt: string;
|
|
550
|
+
}
|
|
551
|
+
export interface PendingOperation {
|
|
552
|
+
/** @minLength 1 */
|
|
553
|
+
id: string;
|
|
554
|
+
status: PendingOperationStatus;
|
|
555
|
+
detail?: string;
|
|
556
|
+
diagnosis?: InvoiceRecoveryEntry;
|
|
557
|
+
}
|
|
558
|
+
export type VerifiedOperationStatus = typeof VerifiedOperationStatus[keyof typeof VerifiedOperationStatus];
|
|
559
|
+
export declare const VerifiedOperationStatus: {
|
|
560
|
+
readonly verified: "verified";
|
|
561
|
+
};
|
|
562
|
+
export type InvoiceRecordKind = typeof InvoiceRecordKind[keyof typeof InvoiceRecordKind];
|
|
563
|
+
export declare const InvoiceRecordKind: {
|
|
564
|
+
readonly invoice: "invoice";
|
|
565
|
+
};
|
|
566
|
+
export type InvoiceRecordCurrency = typeof InvoiceRecordCurrency[keyof typeof InvoiceRecordCurrency];
|
|
567
|
+
export declare const InvoiceRecordCurrency: {
|
|
568
|
+
readonly USD: "USD";
|
|
569
|
+
};
|
|
570
|
+
export interface InvoiceLineRecord {
|
|
571
|
+
/** @minLength 1 */
|
|
572
|
+
itemId: string;
|
|
573
|
+
quantity: number;
|
|
574
|
+
/** @minLength 1 */
|
|
575
|
+
unitPrice: string;
|
|
576
|
+
description?: string;
|
|
577
|
+
}
|
|
578
|
+
export interface InvoiceRecord {
|
|
579
|
+
kind: InvoiceRecordKind;
|
|
580
|
+
/** @minLength 1 */
|
|
581
|
+
id: string;
|
|
582
|
+
/** @minLength 1 */
|
|
583
|
+
connectionId: string;
|
|
584
|
+
/** @minLength 1 */
|
|
585
|
+
customerId: string;
|
|
586
|
+
/** @minLength 1 */
|
|
587
|
+
externalReference: string;
|
|
588
|
+
currency: InvoiceRecordCurrency;
|
|
589
|
+
/** @minItems 1 */
|
|
590
|
+
lines: InvoiceLineRecord[];
|
|
591
|
+
/** @minLength 1 */
|
|
592
|
+
total: string;
|
|
593
|
+
/** @minLength 1 */
|
|
594
|
+
balanceDue: string;
|
|
595
|
+
/** @minLength 1 */
|
|
596
|
+
subsidiaryId?: string;
|
|
597
|
+
departmentId?: NetSuiteDepartmentId;
|
|
598
|
+
}
|
|
599
|
+
export interface VerifiedOperation {
|
|
600
|
+
/** @minLength 1 */
|
|
601
|
+
id: string;
|
|
602
|
+
status: VerifiedOperationStatus;
|
|
603
|
+
record: InvoiceRecord | ReceivedPaymentRecord | CreditMemoRecord | CreditApplicationRecord;
|
|
604
|
+
}
|
|
605
|
+
export type FailedOperationStatus = typeof FailedOperationStatus[keyof typeof FailedOperationStatus];
|
|
606
|
+
export declare const FailedOperationStatus: {
|
|
607
|
+
readonly rejected: "rejected";
|
|
608
|
+
readonly verification_mismatch: "verification_mismatch";
|
|
609
|
+
};
|
|
610
|
+
export interface FailedOperation {
|
|
611
|
+
/** @minLength 1 */
|
|
612
|
+
id: string;
|
|
613
|
+
status: FailedOperationStatus;
|
|
614
|
+
/** @minLength 1 */
|
|
615
|
+
code: string;
|
|
616
|
+
/** @minLength 1 */
|
|
617
|
+
message: string;
|
|
618
|
+
}
|
|
619
|
+
export type Operation = PendingOperation | VerifiedOperation | FailedOperation;
|
|
620
|
+
export type InvoiceRequestTraceOutcome = typeof InvoiceRequestTraceOutcome[keyof typeof InvoiceRequestTraceOutcome];
|
|
621
|
+
export declare const InvoiceRequestTraceOutcome: {
|
|
622
|
+
readonly admitted: "admitted";
|
|
623
|
+
readonly replayed: "replayed";
|
|
624
|
+
readonly conflict: "conflict";
|
|
625
|
+
readonly rejected: "rejected";
|
|
626
|
+
};
|
|
627
|
+
export interface InvoiceRequestTrace {
|
|
628
|
+
/** @minLength 1 */
|
|
629
|
+
requestId: string;
|
|
630
|
+
/**
|
|
631
|
+
* @minLength 1
|
|
632
|
+
* @nullable
|
|
633
|
+
*/
|
|
634
|
+
operationId: string | null;
|
|
635
|
+
/**
|
|
636
|
+
* @minLength 1
|
|
637
|
+
* @nullable
|
|
638
|
+
*/
|
|
639
|
+
connectionId: string | null;
|
|
640
|
+
outcome: InvoiceRequestTraceOutcome;
|
|
641
|
+
/**
|
|
642
|
+
* Status Rowbind assigned to this request, including when the caller lost the response.
|
|
643
|
+
* @minimum 100
|
|
644
|
+
* @maximum 599
|
|
645
|
+
*/
|
|
646
|
+
httpStatus: number;
|
|
647
|
+
/**
|
|
648
|
+
* @minLength 1
|
|
649
|
+
* @nullable
|
|
650
|
+
*/
|
|
651
|
+
errorCode: string | null;
|
|
652
|
+
occurredAt: string;
|
|
653
|
+
}
|
|
654
|
+
export interface InvoiceTracePage {
|
|
655
|
+
/** @maxItems 50 */
|
|
656
|
+
requests: InvoiceRequestTrace[];
|
|
657
|
+
/**
|
|
658
|
+
* @minLength 1
|
|
659
|
+
* @nullable
|
|
660
|
+
*/
|
|
661
|
+
nextCursor: string | null;
|
|
662
|
+
}
|
|
663
|
+
export interface InvoiceRecoveryPage {
|
|
664
|
+
/** @minLength 1 */
|
|
665
|
+
operationId: string;
|
|
666
|
+
/** @maxItems 50 */
|
|
667
|
+
entries: InvoiceRecoveryEntry[];
|
|
668
|
+
/**
|
|
669
|
+
* Sequence of the last returned entry when another page is available.
|
|
670
|
+
* @minimum 1
|
|
671
|
+
* @maximum 9007199254740991
|
|
672
|
+
* @nullable
|
|
673
|
+
*/
|
|
674
|
+
nextCursor: number | null;
|
|
675
|
+
}
|
|
676
|
+
export type ReimbursementBillInputKind = typeof ReimbursementBillInputKind[keyof typeof ReimbursementBillInputKind];
|
|
677
|
+
export declare const ReimbursementBillInputKind: {
|
|
678
|
+
readonly vendor_bill: "vendor_bill";
|
|
679
|
+
};
|
|
680
|
+
export interface ReimbursementBillInput {
|
|
681
|
+
/**
|
|
682
|
+
* @minLength 1
|
|
683
|
+
* @maxLength 64
|
|
684
|
+
* @pattern ^[A-Za-z0-9_-]+$
|
|
685
|
+
*/
|
|
686
|
+
key: string;
|
|
687
|
+
kind: ReimbursementBillInputKind;
|
|
688
|
+
/** @pattern ^(0|[1-9][0-9]{0,7})\.[0-9]{2}$ */
|
|
689
|
+
amount: string;
|
|
690
|
+
}
|
|
691
|
+
export type ReimbursementPaymentInputKind = typeof ReimbursementPaymentInputKind[keyof typeof ReimbursementPaymentInputKind];
|
|
692
|
+
export declare const ReimbursementPaymentInputKind: {
|
|
693
|
+
readonly bill_payment: "bill_payment";
|
|
694
|
+
};
|
|
695
|
+
export interface ReimbursementPaymentInput {
|
|
696
|
+
/**
|
|
697
|
+
* @minLength 1
|
|
698
|
+
* @maxLength 64
|
|
699
|
+
* @pattern ^[A-Za-z0-9_-]+$
|
|
700
|
+
*/
|
|
701
|
+
key: string;
|
|
702
|
+
kind: ReimbursementPaymentInputKind;
|
|
703
|
+
/**
|
|
704
|
+
* @minItems 1
|
|
705
|
+
* @maxItems 25
|
|
706
|
+
* @items.minLength 1
|
|
707
|
+
* @items.maxLength 64
|
|
708
|
+
* @items.pattern ^[A-Za-z0-9_-]+$
|
|
709
|
+
*/
|
|
710
|
+
dependsOn: string[];
|
|
711
|
+
}
|
|
712
|
+
export type BatchRequestCurrency = typeof BatchRequestCurrency[keyof typeof BatchRequestCurrency];
|
|
713
|
+
export declare const BatchRequestCurrency: {
|
|
714
|
+
readonly USD: "USD";
|
|
715
|
+
};
|
|
716
|
+
export interface BatchRequest {
|
|
717
|
+
/** @minLength 1 */
|
|
718
|
+
connectionId: string;
|
|
719
|
+
currency: BatchRequestCurrency;
|
|
720
|
+
/** @minLength 1 */
|
|
721
|
+
vendorRef: string;
|
|
722
|
+
/**
|
|
723
|
+
* @minItems 2
|
|
724
|
+
* @maxItems 26
|
|
725
|
+
*/
|
|
726
|
+
rows: (ReimbursementBillInput | ReimbursementPaymentInput)[];
|
|
727
|
+
}
|
|
728
|
+
export interface BatchReceipt {
|
|
729
|
+
/** @minLength 1 */
|
|
730
|
+
id: string;
|
|
731
|
+
}
|
|
732
|
+
export type BatchRowDiagnosisCode = typeof BatchRowDiagnosisCode[keyof typeof BatchRowDiagnosisCode];
|
|
733
|
+
export declare const BatchRowDiagnosisCode: {
|
|
734
|
+
readonly queued: "queued";
|
|
735
|
+
readonly awaiting_bills: "awaiting_bills";
|
|
736
|
+
readonly dispatch_claimed: "dispatch_claimed";
|
|
737
|
+
readonly source_offline: "source_offline";
|
|
738
|
+
readonly wrong_book: "wrong_book";
|
|
739
|
+
readonly book_diverged: "book_diverged";
|
|
740
|
+
readonly source_record_missing: "source_record_missing";
|
|
741
|
+
readonly source_record_mismatch: "source_record_mismatch";
|
|
742
|
+
readonly bills_changed: "bills_changed";
|
|
743
|
+
readonly storage_error: "storage_error";
|
|
744
|
+
readonly internal_error: "internal_error";
|
|
745
|
+
readonly record_verified: "record_verified";
|
|
746
|
+
};
|
|
747
|
+
/**
|
|
748
|
+
* Whether a write is still unsent, might have reached the ERP, or matches a verified native record. An unknown outcome requires checking the original book before any new write.
|
|
749
|
+
*/
|
|
750
|
+
export type BatchRowDiagnosisCertainty = typeof BatchRowDiagnosisCertainty[keyof typeof BatchRowDiagnosisCertainty];
|
|
751
|
+
export declare const BatchRowDiagnosisCertainty: {
|
|
752
|
+
readonly not_sent: "not_sent";
|
|
753
|
+
readonly unknown: "unknown";
|
|
754
|
+
readonly verified: "verified";
|
|
755
|
+
};
|
|
756
|
+
export type BatchRowDiagnosisNextAction = typeof BatchRowDiagnosisNextAction[keyof typeof BatchRowDiagnosisNextAction];
|
|
757
|
+
export declare const BatchRowDiagnosisNextAction: {
|
|
758
|
+
readonly dispatch_once: "dispatch_once";
|
|
759
|
+
readonly wait_for_bills: "wait_for_bills";
|
|
760
|
+
readonly verify_original_book: "verify_original_book";
|
|
761
|
+
readonly restore_connection: "restore_connection";
|
|
762
|
+
readonly open_authorized_book: "open_authorized_book";
|
|
763
|
+
readonly reconcile_book: "reconcile_book";
|
|
764
|
+
readonly review_mismatch: "review_mismatch";
|
|
765
|
+
readonly review_bills: "review_bills";
|
|
766
|
+
readonly resume_operation: "resume_operation";
|
|
767
|
+
readonly none: "none";
|
|
768
|
+
};
|
|
769
|
+
export type BatchRowDiagnosisOwner = typeof BatchRowDiagnosisOwner[keyof typeof BatchRowDiagnosisOwner];
|
|
770
|
+
export declare const BatchRowDiagnosisOwner: {
|
|
771
|
+
readonly rowbind: "rowbind";
|
|
772
|
+
readonly erp_admin: "erp_admin";
|
|
773
|
+
readonly saas: "saas";
|
|
774
|
+
readonly none: "none";
|
|
775
|
+
};
|
|
776
|
+
/**
|
|
777
|
+
* Evidence needed for the next action. Native evidence must belong to the original authorized connection and match the row.
|
|
778
|
+
*/
|
|
779
|
+
export type BatchRowDiagnosisRequiredEvidence = typeof BatchRowDiagnosisRequiredEvidence[keyof typeof BatchRowDiagnosisRequiredEvidence];
|
|
780
|
+
export declare const BatchRowDiagnosisRequiredEvidence: {
|
|
781
|
+
readonly none: "none";
|
|
782
|
+
readonly verified_dependencies: "verified_dependencies";
|
|
783
|
+
readonly authorized_book: "authorized_book";
|
|
784
|
+
readonly consistent_book: "consistent_book";
|
|
785
|
+
readonly open_bills: "open_bills";
|
|
786
|
+
readonly native_bill: "native_bill";
|
|
787
|
+
readonly native_payment_and_applications: "native_payment_and_applications";
|
|
788
|
+
};
|
|
789
|
+
/**
|
|
790
|
+
* The reason for a batch row's current or historical state, including the party responsible for the next action.
|
|
791
|
+
*/
|
|
792
|
+
export interface BatchRowDiagnosis {
|
|
793
|
+
code: BatchRowDiagnosisCode;
|
|
794
|
+
/** Whether a write is still unsent, might have reached the ERP, or matches a verified native record. An unknown outcome requires checking the original book before any new write. */
|
|
795
|
+
certainty: BatchRowDiagnosisCertainty;
|
|
796
|
+
nextAction: BatchRowDiagnosisNextAction;
|
|
797
|
+
owner: BatchRowDiagnosisOwner;
|
|
798
|
+
/** Evidence needed for the next action. Native evidence must belong to the original authorized connection and match the row. */
|
|
799
|
+
requiredEvidence: BatchRowDiagnosisRequiredEvidence;
|
|
800
|
+
/**
|
|
801
|
+
* The prerequisite rows preventing progress at this observation.
|
|
802
|
+
* @maxItems 25
|
|
803
|
+
* @items.minLength 1
|
|
804
|
+
* @items.maxLength 64
|
|
805
|
+
* @items.pattern ^[A-Za-z0-9_-]+$
|
|
806
|
+
*/
|
|
807
|
+
blockingRowKeys: string[];
|
|
808
|
+
/**
|
|
809
|
+
* Time of the recorded observation, or null for legacy state with no recorded observation time.
|
|
810
|
+
* @nullable
|
|
811
|
+
*/
|
|
812
|
+
observedAt: string | null;
|
|
813
|
+
}
|
|
814
|
+
export type BatchRowKind = typeof BatchRowKind[keyof typeof BatchRowKind];
|
|
815
|
+
export declare const BatchRowKind: {
|
|
816
|
+
readonly vendor_bill: "vendor_bill";
|
|
817
|
+
readonly bill_payment: "bill_payment";
|
|
818
|
+
};
|
|
819
|
+
export type BatchRowStatus = typeof BatchRowStatus[keyof typeof BatchRowStatus];
|
|
820
|
+
export declare const BatchRowStatus: {
|
|
821
|
+
readonly pending: "pending";
|
|
822
|
+
readonly blocked: "blocked";
|
|
823
|
+
readonly verified: "verified";
|
|
824
|
+
};
|
|
825
|
+
export interface BatchRow {
|
|
826
|
+
/**
|
|
827
|
+
* @minLength 1
|
|
828
|
+
* @maxLength 64
|
|
829
|
+
* @pattern ^[A-Za-z0-9_-]+$
|
|
830
|
+
*/
|
|
831
|
+
key: string;
|
|
832
|
+
kind: BatchRowKind;
|
|
833
|
+
status: BatchRowStatus;
|
|
834
|
+
/** @pattern ^(0|[1-9][0-9]*)\.[0-9]{2}$ */
|
|
835
|
+
amount: string;
|
|
836
|
+
/**
|
|
837
|
+
* @items.minLength 1
|
|
838
|
+
* @items.maxLength 64
|
|
839
|
+
* @items.pattern ^[A-Za-z0-9_-]+$
|
|
840
|
+
*/
|
|
841
|
+
dependsOn: string[];
|
|
842
|
+
/** @minLength 1 */
|
|
843
|
+
nativeId?: string;
|
|
844
|
+
/** @pattern ^(0|[1-9][0-9]*)\.[0-9]{2}$ */
|
|
845
|
+
balanceDue?: string;
|
|
846
|
+
diagnosis?: BatchRowDiagnosis;
|
|
847
|
+
/**
|
|
848
|
+
* Up to five recorded row transitions, oldest first and ending at diagnosis. Older servers can omit both fields.
|
|
849
|
+
* @minItems 1
|
|
850
|
+
* @maxItems 5
|
|
851
|
+
*/
|
|
852
|
+
history?: BatchRowDiagnosis[];
|
|
853
|
+
}
|
|
854
|
+
export type ReimbursementBatchStatus = typeof ReimbursementBatchStatus[keyof typeof ReimbursementBatchStatus];
|
|
855
|
+
export declare const ReimbursementBatchStatus: {
|
|
856
|
+
readonly pending: "pending";
|
|
857
|
+
readonly verified: "verified";
|
|
858
|
+
};
|
|
859
|
+
export interface ReimbursementBatch {
|
|
860
|
+
/** @minLength 1 */
|
|
861
|
+
id: string;
|
|
862
|
+
/** @minLength 1 */
|
|
863
|
+
connectionId: string;
|
|
864
|
+
status: ReimbursementBatchStatus;
|
|
865
|
+
/**
|
|
866
|
+
* @minItems 2
|
|
867
|
+
* @maxItems 26
|
|
868
|
+
*/
|
|
869
|
+
rows: BatchRow[];
|
|
870
|
+
}
|
|
871
|
+
export type InvoiceSyncStatusResource = typeof InvoiceSyncStatusResource[keyof typeof InvoiceSyncStatusResource];
|
|
872
|
+
export declare const InvoiceSyncStatusResource: {
|
|
873
|
+
readonly invoices: "invoices";
|
|
874
|
+
};
|
|
875
|
+
export type InvoiceSyncStatusStatus = typeof InvoiceSyncStatusStatus[keyof typeof InvoiceSyncStatusStatus];
|
|
876
|
+
export declare const InvoiceSyncStatusStatus: {
|
|
877
|
+
readonly initializing: "initializing";
|
|
878
|
+
readonly syncing: "syncing";
|
|
879
|
+
readonly current: "current";
|
|
880
|
+
readonly unavailable: "unavailable";
|
|
881
|
+
};
|
|
882
|
+
/**
|
|
883
|
+
* Recorded cause of the latest unsuccessful page. A source_history_gap means Rowbind cannot verify all changes since the last complete scan. coveredThrough stays at the last verified boundary. Null when no cause was recorded or after a successful page. Older Workers can omit this field.
|
|
884
|
+
* @nullable
|
|
885
|
+
*/
|
|
886
|
+
export type InvoiceSyncStatusLastFailure = typeof InvoiceSyncStatusLastFailure[keyof typeof InvoiceSyncStatusLastFailure] | null;
|
|
887
|
+
export declare const InvoiceSyncStatusLastFailure: {
|
|
888
|
+
readonly source_offline: "source_offline";
|
|
889
|
+
readonly wrong_book: "wrong_book";
|
|
890
|
+
readonly permission_denied: "permission_denied";
|
|
891
|
+
readonly book_diverged: "book_diverged";
|
|
892
|
+
readonly storage_error: "storage_error";
|
|
893
|
+
readonly source_history_gap: "source_history_gap";
|
|
894
|
+
};
|
|
895
|
+
export interface InvoiceSyncStatus {
|
|
896
|
+
/** @minLength 1 */
|
|
897
|
+
connectionId: string;
|
|
898
|
+
resource: InvoiceSyncStatusResource;
|
|
899
|
+
status: InvoiceSyncStatusStatus;
|
|
900
|
+
/**
|
|
901
|
+
* Source observation boundary of the latest fully committed scan.
|
|
902
|
+
* @nullable
|
|
903
|
+
*/
|
|
904
|
+
coveredThrough: string | null;
|
|
905
|
+
/**
|
|
906
|
+
* When the worker last attempted to read this resource, including unsuccessful attempts.
|
|
907
|
+
* @nullable
|
|
908
|
+
*/
|
|
909
|
+
lastAttemptAt: string | null;
|
|
910
|
+
/**
|
|
911
|
+
* Recorded cause of the latest unsuccessful page. A source_history_gap means Rowbind cannot verify all changes since the last complete scan. coveredThrough stays at the last verified boundary. Null when no cause was recorded or after a successful page. Older Workers can omit this field.
|
|
912
|
+
* @nullable
|
|
913
|
+
*/
|
|
914
|
+
lastFailure?: InvoiceSyncStatusLastFailure;
|
|
915
|
+
}
|
|
916
|
+
export type PaymentSyncStatusResource = typeof PaymentSyncStatusResource[keyof typeof PaymentSyncStatusResource];
|
|
917
|
+
export declare const PaymentSyncStatusResource: {
|
|
918
|
+
readonly received_payments: "received_payments";
|
|
919
|
+
};
|
|
920
|
+
export type PaymentSyncStatusStatus = typeof PaymentSyncStatusStatus[keyof typeof PaymentSyncStatusStatus];
|
|
921
|
+
export declare const PaymentSyncStatusStatus: {
|
|
922
|
+
readonly initializing: "initializing";
|
|
923
|
+
readonly syncing: "syncing";
|
|
924
|
+
readonly current: "current";
|
|
925
|
+
readonly unavailable: "unavailable";
|
|
926
|
+
};
|
|
927
|
+
/**
|
|
928
|
+
* Most recent sync failure. Null before a failure and after a successful recovery.
|
|
929
|
+
* @nullable
|
|
930
|
+
*/
|
|
931
|
+
export type PaymentSyncStatusLastFailure = typeof PaymentSyncStatusLastFailure[keyof typeof PaymentSyncStatusLastFailure] | null;
|
|
932
|
+
export declare const PaymentSyncStatusLastFailure: {
|
|
933
|
+
readonly source_offline: "source_offline";
|
|
934
|
+
readonly wrong_book: "wrong_book";
|
|
935
|
+
readonly book_diverged: "book_diverged";
|
|
936
|
+
readonly page_lost: "page_lost";
|
|
937
|
+
readonly storage_error: "storage_error";
|
|
938
|
+
};
|
|
939
|
+
export interface PaymentSyncStatus {
|
|
940
|
+
/** @minLength 1 */
|
|
941
|
+
connectionId: string;
|
|
942
|
+
resource: PaymentSyncStatusResource;
|
|
943
|
+
status: PaymentSyncStatusStatus;
|
|
944
|
+
/**
|
|
945
|
+
* Source observation boundary of the latest fully committed scan.
|
|
946
|
+
* @nullable
|
|
947
|
+
*/
|
|
948
|
+
coveredThrough: string | null;
|
|
949
|
+
/**
|
|
950
|
+
* When the worker last attempted to read this resource, including unsuccessful attempts.
|
|
951
|
+
* @nullable
|
|
952
|
+
*/
|
|
953
|
+
lastAttemptAt: string | null;
|
|
954
|
+
/**
|
|
955
|
+
* Most recent sync failure. Null before a failure and after a successful recovery.
|
|
956
|
+
* @nullable
|
|
957
|
+
*/
|
|
958
|
+
lastFailure: PaymentSyncStatusLastFailure;
|
|
959
|
+
}
|
|
960
|
+
/**
|
|
961
|
+
* Header fields and ordered lines observed at this invoice revision. An omitted field was unavailable. An empty lines array means the source explicitly reported no lines.
|
|
962
|
+
*/
|
|
963
|
+
export interface SyncedInvoiceDetails {
|
|
964
|
+
/** @minLength 1 */
|
|
965
|
+
customerId?: string;
|
|
966
|
+
/** @minLength 1 */
|
|
967
|
+
externalReference?: string;
|
|
968
|
+
/**
|
|
969
|
+
* The invoice number in the source book, when present.
|
|
970
|
+
* @minLength 1
|
|
971
|
+
*/
|
|
972
|
+
invoiceNumber?: string;
|
|
973
|
+
/** @minLength 1 */
|
|
974
|
+
issueDate?: string;
|
|
975
|
+
/** @minLength 1 */
|
|
976
|
+
dueDate?: string;
|
|
977
|
+
/** @minLength 1 */
|
|
978
|
+
total?: string;
|
|
979
|
+
/** @minLength 1 */
|
|
980
|
+
subsidiaryId?: string;
|
|
981
|
+
/** @minLength 1 */
|
|
982
|
+
departmentId?: string;
|
|
983
|
+
lines?: InvoiceLineRecord[];
|
|
984
|
+
}
|
|
985
|
+
/**
|
|
986
|
+
* Present when the source explicitly reports a void. Paid invoices can also have a zero balance.
|
|
987
|
+
*/
|
|
988
|
+
export type SyncedInvoiceStatus = typeof SyncedInvoiceStatus[keyof typeof SyncedInvoiceStatus];
|
|
989
|
+
export declare const SyncedInvoiceStatus: {
|
|
990
|
+
readonly voided: "voided";
|
|
991
|
+
};
|
|
992
|
+
export interface SyncedInvoice {
|
|
993
|
+
/**
|
|
994
|
+
* Native invoice ID in this connection.
|
|
995
|
+
* @minLength 1
|
|
996
|
+
*/
|
|
997
|
+
invoiceId: string;
|
|
998
|
+
/**
|
|
999
|
+
* Latest observed revision of this invoice at the snapshot cutoff.
|
|
1000
|
+
* @minimum 1
|
|
1001
|
+
*/
|
|
1002
|
+
revision: number;
|
|
1003
|
+
/** @minLength 1 */
|
|
1004
|
+
currency: string;
|
|
1005
|
+
/**
|
|
1006
|
+
* Absolute outstanding balance at this revision.
|
|
1007
|
+
* @pattern ^(0|[1-9][0-9]*)\.[0-9]{2}$
|
|
1008
|
+
*/
|
|
1009
|
+
balanceDue: string;
|
|
1010
|
+
/** Present when the source explicitly reports a void. Paid invoices can also have a zero balance. */
|
|
1011
|
+
status?: SyncedInvoiceStatus;
|
|
1012
|
+
details?: SyncedInvoiceDetails;
|
|
1013
|
+
}
|
|
1014
|
+
export interface SyncedInvoicePage {
|
|
1015
|
+
/** @minLength 1 */
|
|
1016
|
+
connectionId: string;
|
|
1017
|
+
/**
|
|
1018
|
+
* Inclusive book revision represented by every page of this snapshot. Later observed changes to invoices in this book have higher revisions.
|
|
1019
|
+
* @minimum 0
|
|
1020
|
+
*/
|
|
1021
|
+
snapshotRevision: number;
|
|
1022
|
+
/** Observation time of the complete window, fixed across these pages. */
|
|
1023
|
+
coveredThrough: string;
|
|
1024
|
+
invoices: SyncedInvoice[];
|
|
1025
|
+
/**
|
|
1026
|
+
* @minLength 1
|
|
1027
|
+
* @nullable
|
|
1028
|
+
*/
|
|
1029
|
+
nextCursor: string | null;
|
|
1030
|
+
}
|
|
1031
|
+
export type ObservedPaymentStatus = typeof ObservedPaymentStatus[keyof typeof ObservedPaymentStatus];
|
|
1032
|
+
export declare const ObservedPaymentStatus: {
|
|
1033
|
+
readonly pending_match: "pending_match";
|
|
1034
|
+
readonly matched: "matched";
|
|
1035
|
+
};
|
|
1036
|
+
export type ObservedPaymentProvider = typeof ObservedPaymentProvider[keyof typeof ObservedPaymentProvider];
|
|
1037
|
+
export declare const ObservedPaymentProvider: {
|
|
1038
|
+
readonly quickbooksDesktop: "quickbooksDesktop";
|
|
1039
|
+
readonly netsuite: "netsuite";
|
|
1040
|
+
};
|
|
1041
|
+
export type ObservedPaymentCurrency = typeof ObservedPaymentCurrency[keyof typeof ObservedPaymentCurrency];
|
|
1042
|
+
export declare const ObservedPaymentCurrency: {
|
|
1043
|
+
readonly USD: "USD";
|
|
1044
|
+
};
|
|
1045
|
+
export interface ObservedPayment {
|
|
1046
|
+
/** @minLength 1 */
|
|
1047
|
+
id: string;
|
|
1048
|
+
/** @minLength 1 */
|
|
1049
|
+
connectionId: string;
|
|
1050
|
+
provider: ObservedPaymentProvider;
|
|
1051
|
+
/** @minLength 1 */
|
|
1052
|
+
paymentId: string;
|
|
1053
|
+
/** @minLength 1 */
|
|
1054
|
+
invoiceId: string;
|
|
1055
|
+
amount: ReceivableAmount;
|
|
1056
|
+
currency: ObservedPaymentCurrency;
|
|
1057
|
+
/** @pattern ^(0|[1-9][0-9]*)\.[0-9]{2}$ */
|
|
1058
|
+
balanceDue: string;
|
|
1059
|
+
/** Source modification timestamp. */
|
|
1060
|
+
modifiedAt: string;
|
|
1061
|
+
/** When Rowbind observed the payment. */
|
|
1062
|
+
observedAt: string;
|
|
1063
|
+
status: ObservedPaymentStatus;
|
|
1064
|
+
/**
|
|
1065
|
+
* The confirmed SaaS invoice reference. Null while pending_match.
|
|
1066
|
+
* @minLength 1
|
|
1067
|
+
* @nullable
|
|
1068
|
+
*/
|
|
1069
|
+
externalInvoiceId: string | null;
|
|
1070
|
+
}
|
|
1071
|
+
export interface ObservedPaymentPage {
|
|
1072
|
+
observations: ObservedPayment[];
|
|
1073
|
+
/**
|
|
1074
|
+
* @minLength 1
|
|
1075
|
+
* @nullable
|
|
1076
|
+
*/
|
|
1077
|
+
nextCursor: string | null;
|
|
1078
|
+
}
|
|
1079
|
+
export interface MatchObservedPaymentRequest {
|
|
1080
|
+
/**
|
|
1081
|
+
* The externalReference supplied when the invoice was created.
|
|
1082
|
+
* @minLength 1
|
|
1083
|
+
*/
|
|
1084
|
+
externalInvoiceId: string;
|
|
1085
|
+
}
|
|
1086
|
+
export type InvoiceWebhookEventType = typeof InvoiceWebhookEventType[keyof typeof InvoiceWebhookEventType];
|
|
1087
|
+
export declare const InvoiceWebhookEventType: {
|
|
1088
|
+
readonly operationverified: "operation.verified";
|
|
1089
|
+
readonly invoicecreated: "invoice.created";
|
|
1090
|
+
readonly invoiceupdated: "invoice.updated";
|
|
1091
|
+
readonly invoicevoided: "invoice.voided";
|
|
1092
|
+
readonly invoicedeleted: "invoice.deleted";
|
|
1093
|
+
readonly paymentmatched: "payment.matched";
|
|
1094
|
+
};
|
|
1095
|
+
export interface WebhookEndpointRequest {
|
|
1096
|
+
/** @minLength 1 */
|
|
1097
|
+
destination: string;
|
|
1098
|
+
eventType?: InvoiceWebhookEventType;
|
|
1099
|
+
}
|
|
1100
|
+
export interface WebhookEndpoint {
|
|
1101
|
+
/** @minLength 1 */
|
|
1102
|
+
id: string;
|
|
1103
|
+
/** @minLength 1 */
|
|
1104
|
+
destination: string;
|
|
1105
|
+
eventType: InvoiceWebhookEventType;
|
|
1106
|
+
}
|
|
1107
|
+
export type VerifiedOperationDeliveryStatus = typeof VerifiedOperationDeliveryStatus[keyof typeof VerifiedOperationDeliveryStatus];
|
|
1108
|
+
export declare const VerifiedOperationDeliveryStatus: {
|
|
1109
|
+
readonly pending: "pending";
|
|
1110
|
+
readonly delivered: "delivered";
|
|
1111
|
+
readonly dead_letter: "dead_letter";
|
|
1112
|
+
};
|
|
1113
|
+
export interface VerifiedOperationDelivery {
|
|
1114
|
+
/** @minLength 1 */
|
|
1115
|
+
eventId: string;
|
|
1116
|
+
/** @minLength 1 */
|
|
1117
|
+
operationId: string;
|
|
1118
|
+
status: VerifiedOperationDeliveryStatus;
|
|
1119
|
+
/** @minimum 0 */
|
|
1120
|
+
attempts: number;
|
|
1121
|
+
/** @nullable */
|
|
1122
|
+
lastHttpStatus: number | null;
|
|
1123
|
+
}
|
|
1124
|
+
export type CreatedInvoiceDeliveryEventType = typeof CreatedInvoiceDeliveryEventType[keyof typeof CreatedInvoiceDeliveryEventType];
|
|
1125
|
+
export declare const CreatedInvoiceDeliveryEventType: {
|
|
1126
|
+
readonly invoicecreated: "invoice.created";
|
|
1127
|
+
};
|
|
1128
|
+
export type CreatedInvoiceDeliveryStatus = typeof CreatedInvoiceDeliveryStatus[keyof typeof CreatedInvoiceDeliveryStatus];
|
|
1129
|
+
export declare const CreatedInvoiceDeliveryStatus: {
|
|
1130
|
+
readonly pending: "pending";
|
|
1131
|
+
readonly delivered: "delivered";
|
|
1132
|
+
readonly dead_letter: "dead_letter";
|
|
1133
|
+
};
|
|
1134
|
+
export interface CreatedInvoiceDelivery {
|
|
1135
|
+
/** @minLength 1 */
|
|
1136
|
+
eventId: string;
|
|
1137
|
+
eventType: CreatedInvoiceDeliveryEventType;
|
|
1138
|
+
/** @minLength 1 */
|
|
1139
|
+
connectionId: string;
|
|
1140
|
+
/** @minLength 1 */
|
|
1141
|
+
invoiceId: string;
|
|
1142
|
+
/** @minimum 1 */
|
|
1143
|
+
revision: number;
|
|
1144
|
+
status: CreatedInvoiceDeliveryStatus;
|
|
1145
|
+
/** @minimum 0 */
|
|
1146
|
+
attempts: number;
|
|
1147
|
+
/** @nullable */
|
|
1148
|
+
lastHttpStatus: number | null;
|
|
1149
|
+
}
|
|
1150
|
+
export type UpdatedInvoiceDeliveryEventType = typeof UpdatedInvoiceDeliveryEventType[keyof typeof UpdatedInvoiceDeliveryEventType];
|
|
1151
|
+
export declare const UpdatedInvoiceDeliveryEventType: {
|
|
1152
|
+
readonly invoiceupdated: "invoice.updated";
|
|
1153
|
+
};
|
|
1154
|
+
export type UpdatedInvoiceDeliveryStatus = typeof UpdatedInvoiceDeliveryStatus[keyof typeof UpdatedInvoiceDeliveryStatus];
|
|
1155
|
+
export declare const UpdatedInvoiceDeliveryStatus: {
|
|
1156
|
+
readonly pending: "pending";
|
|
1157
|
+
readonly delivered: "delivered";
|
|
1158
|
+
readonly dead_letter: "dead_letter";
|
|
1159
|
+
};
|
|
1160
|
+
export interface UpdatedInvoiceDelivery {
|
|
1161
|
+
/** @minLength 1 */
|
|
1162
|
+
eventId: string;
|
|
1163
|
+
eventType: UpdatedInvoiceDeliveryEventType;
|
|
1164
|
+
/** @minLength 1 */
|
|
1165
|
+
connectionId: string;
|
|
1166
|
+
/** @minLength 1 */
|
|
1167
|
+
invoiceId: string;
|
|
1168
|
+
/** @minimum 1 */
|
|
1169
|
+
revision: number;
|
|
1170
|
+
status: UpdatedInvoiceDeliveryStatus;
|
|
1171
|
+
/** @minimum 0 */
|
|
1172
|
+
attempts: number;
|
|
1173
|
+
/** @nullable */
|
|
1174
|
+
lastHttpStatus: number | null;
|
|
1175
|
+
}
|
|
1176
|
+
export type VoidedInvoiceDeliveryEventType = typeof VoidedInvoiceDeliveryEventType[keyof typeof VoidedInvoiceDeliveryEventType];
|
|
1177
|
+
export declare const VoidedInvoiceDeliveryEventType: {
|
|
1178
|
+
readonly invoicevoided: "invoice.voided";
|
|
1179
|
+
};
|
|
1180
|
+
export type VoidedInvoiceDeliveryStatus = typeof VoidedInvoiceDeliveryStatus[keyof typeof VoidedInvoiceDeliveryStatus];
|
|
1181
|
+
export declare const VoidedInvoiceDeliveryStatus: {
|
|
1182
|
+
readonly pending: "pending";
|
|
1183
|
+
readonly delivered: "delivered";
|
|
1184
|
+
readonly dead_letter: "dead_letter";
|
|
1185
|
+
};
|
|
1186
|
+
export interface VoidedInvoiceDelivery {
|
|
1187
|
+
/** @minLength 1 */
|
|
1188
|
+
eventId: string;
|
|
1189
|
+
eventType: VoidedInvoiceDeliveryEventType;
|
|
1190
|
+
/** @minLength 1 */
|
|
1191
|
+
connectionId: string;
|
|
1192
|
+
/** @minLength 1 */
|
|
1193
|
+
invoiceId: string;
|
|
1194
|
+
/** @minimum 1 */
|
|
1195
|
+
revision: number;
|
|
1196
|
+
status: VoidedInvoiceDeliveryStatus;
|
|
1197
|
+
/** @minimum 0 */
|
|
1198
|
+
attempts: number;
|
|
1199
|
+
/** @nullable */
|
|
1200
|
+
lastHttpStatus: number | null;
|
|
1201
|
+
}
|
|
1202
|
+
export type DeletedInvoiceDeliveryEventType = typeof DeletedInvoiceDeliveryEventType[keyof typeof DeletedInvoiceDeliveryEventType];
|
|
1203
|
+
export declare const DeletedInvoiceDeliveryEventType: {
|
|
1204
|
+
readonly invoicedeleted: "invoice.deleted";
|
|
1205
|
+
};
|
|
1206
|
+
export type DeletedInvoiceDeliveryStatus = typeof DeletedInvoiceDeliveryStatus[keyof typeof DeletedInvoiceDeliveryStatus];
|
|
1207
|
+
export declare const DeletedInvoiceDeliveryStatus: {
|
|
1208
|
+
readonly pending: "pending";
|
|
1209
|
+
readonly delivered: "delivered";
|
|
1210
|
+
readonly dead_letter: "dead_letter";
|
|
1211
|
+
};
|
|
1212
|
+
export interface DeletedInvoiceDelivery {
|
|
1213
|
+
/** @minLength 1 */
|
|
1214
|
+
eventId: string;
|
|
1215
|
+
eventType: DeletedInvoiceDeliveryEventType;
|
|
1216
|
+
/** @minLength 1 */
|
|
1217
|
+
connectionId: string;
|
|
1218
|
+
/** @minLength 1 */
|
|
1219
|
+
invoiceId: string;
|
|
1220
|
+
/** @minimum 1 */
|
|
1221
|
+
revision: number;
|
|
1222
|
+
status: DeletedInvoiceDeliveryStatus;
|
|
1223
|
+
/** @minimum 0 */
|
|
1224
|
+
attempts: number;
|
|
1225
|
+
/** @nullable */
|
|
1226
|
+
lastHttpStatus: number | null;
|
|
1227
|
+
}
|
|
1228
|
+
export type MatchedPaymentDeliveryEventType = typeof MatchedPaymentDeliveryEventType[keyof typeof MatchedPaymentDeliveryEventType];
|
|
1229
|
+
export declare const MatchedPaymentDeliveryEventType: {
|
|
1230
|
+
readonly paymentmatched: "payment.matched";
|
|
1231
|
+
};
|
|
1232
|
+
export type MatchedPaymentDeliveryStatus = typeof MatchedPaymentDeliveryStatus[keyof typeof MatchedPaymentDeliveryStatus];
|
|
1233
|
+
export declare const MatchedPaymentDeliveryStatus: {
|
|
1234
|
+
readonly pending: "pending";
|
|
1235
|
+
readonly delivered: "delivered";
|
|
1236
|
+
readonly dead_letter: "dead_letter";
|
|
1237
|
+
};
|
|
1238
|
+
export interface MatchedPaymentDelivery {
|
|
1239
|
+
/** @minLength 1 */
|
|
1240
|
+
eventId: string;
|
|
1241
|
+
eventType: MatchedPaymentDeliveryEventType;
|
|
1242
|
+
/** @minLength 1 */
|
|
1243
|
+
connectionId: string;
|
|
1244
|
+
/** @minLength 1 */
|
|
1245
|
+
invoiceId: string;
|
|
1246
|
+
/** @minLength 1 */
|
|
1247
|
+
paymentId: string;
|
|
1248
|
+
/** @minLength 1 */
|
|
1249
|
+
observationId: string;
|
|
1250
|
+
status: MatchedPaymentDeliveryStatus;
|
|
1251
|
+
/** @minimum 0 */
|
|
1252
|
+
attempts: number;
|
|
1253
|
+
/** @nullable */
|
|
1254
|
+
lastHttpStatus: number | null;
|
|
1255
|
+
}
|
|
1256
|
+
export type WebhookDelivery = VerifiedOperationDelivery | CreatedInvoiceDelivery | UpdatedInvoiceDelivery | VoidedInvoiceDelivery | DeletedInvoiceDelivery | MatchedPaymentDelivery;
|
|
1257
|
+
export type InvoiceRevisionEventDataProvider = typeof InvoiceRevisionEventDataProvider[keyof typeof InvoiceRevisionEventDataProvider];
|
|
1258
|
+
export declare const InvoiceRevisionEventDataProvider: {
|
|
1259
|
+
readonly quickbooksDesktop: "quickbooksDesktop";
|
|
1260
|
+
readonly netsuite: "netsuite";
|
|
1261
|
+
};
|
|
1262
|
+
export type InvoiceRevisionEventDataStatus = typeof InvoiceRevisionEventDataStatus[keyof typeof InvoiceRevisionEventDataStatus];
|
|
1263
|
+
export declare const InvoiceRevisionEventDataStatus: {
|
|
1264
|
+
readonly voided: "voided";
|
|
1265
|
+
};
|
|
1266
|
+
export interface InvoiceRevisionEventData {
|
|
1267
|
+
/** @minLength 1 */
|
|
1268
|
+
connectionId: string;
|
|
1269
|
+
provider: InvoiceRevisionEventDataProvider;
|
|
1270
|
+
/** @minLength 1 */
|
|
1271
|
+
invoiceId: string;
|
|
1272
|
+
/** @minimum 1 */
|
|
1273
|
+
revision: number;
|
|
1274
|
+
/** @minLength 1 */
|
|
1275
|
+
currency: string;
|
|
1276
|
+
/** @pattern ^(0|[1-9][0-9]*)\.[0-9]{2}$ */
|
|
1277
|
+
balanceDue: string;
|
|
1278
|
+
status?: InvoiceRevisionEventDataStatus;
|
|
1279
|
+
details?: SyncedInvoiceDetails;
|
|
1280
|
+
}
|
|
1281
|
+
export type InvoiceCreatedEventType = typeof InvoiceCreatedEventType[keyof typeof InvoiceCreatedEventType];
|
|
1282
|
+
export declare const InvoiceCreatedEventType: {
|
|
1283
|
+
readonly invoicecreated: "invoice.created";
|
|
1284
|
+
};
|
|
1285
|
+
export type InvoiceCreatedEventVersion = typeof InvoiceCreatedEventVersion[keyof typeof InvoiceCreatedEventVersion];
|
|
1286
|
+
export declare const InvoiceCreatedEventVersion: {
|
|
1287
|
+
readonly NUMBER_1: 1;
|
|
1288
|
+
};
|
|
1289
|
+
/**
|
|
1290
|
+
* Signed observation of an invoice created in the book after the initial sync cutoff. The ID remains stable across redelivery. Details may be absent on balance-only observations.
|
|
1291
|
+
*/
|
|
1292
|
+
export interface InvoiceCreatedEvent {
|
|
1293
|
+
/** @minLength 1 */
|
|
1294
|
+
id: string;
|
|
1295
|
+
type: InvoiceCreatedEventType;
|
|
1296
|
+
version: InvoiceCreatedEventVersion;
|
|
1297
|
+
occurredAt: string;
|
|
1298
|
+
data: InvoiceRevisionEventData;
|
|
1299
|
+
}
|
|
1300
|
+
export type InvoiceUpdatedEventType = typeof InvoiceUpdatedEventType[keyof typeof InvoiceUpdatedEventType];
|
|
1301
|
+
export declare const InvoiceUpdatedEventType: {
|
|
1302
|
+
readonly invoiceupdated: "invoice.updated";
|
|
1303
|
+
};
|
|
1304
|
+
export type InvoiceUpdatedEventVersion = typeof InvoiceUpdatedEventVersion[keyof typeof InvoiceUpdatedEventVersion];
|
|
1305
|
+
export declare const InvoiceUpdatedEventVersion: {
|
|
1306
|
+
readonly NUMBER_1: 1;
|
|
1307
|
+
};
|
|
1308
|
+
/**
|
|
1309
|
+
* Signed invoice revision delivered to a subscribed SaaS. The ID remains stable across redelivery. Details may be absent on balance-only observations.
|
|
1310
|
+
*/
|
|
1311
|
+
export interface InvoiceUpdatedEvent {
|
|
1312
|
+
/** @minLength 1 */
|
|
1313
|
+
id: string;
|
|
1314
|
+
type: InvoiceUpdatedEventType;
|
|
1315
|
+
version: InvoiceUpdatedEventVersion;
|
|
1316
|
+
occurredAt: string;
|
|
1317
|
+
data: InvoiceRevisionEventData;
|
|
1318
|
+
}
|
|
1319
|
+
export type InvoiceVoidedEventType = typeof InvoiceVoidedEventType[keyof typeof InvoiceVoidedEventType];
|
|
1320
|
+
export declare const InvoiceVoidedEventType: {
|
|
1321
|
+
readonly invoicevoided: "invoice.voided";
|
|
1322
|
+
};
|
|
1323
|
+
export type InvoiceVoidedEventVersion = typeof InvoiceVoidedEventVersion[keyof typeof InvoiceVoidedEventVersion];
|
|
1324
|
+
export declare const InvoiceVoidedEventVersion: {
|
|
1325
|
+
readonly NUMBER_1: 1;
|
|
1326
|
+
};
|
|
1327
|
+
export type InvoiceVoidedEventDataStatus = typeof InvoiceVoidedEventDataStatus[keyof typeof InvoiceVoidedEventDataStatus];
|
|
1328
|
+
export declare const InvoiceVoidedEventDataStatus: {
|
|
1329
|
+
readonly voided: "voided";
|
|
1330
|
+
};
|
|
1331
|
+
export type InvoiceVoidedEventData = InvoiceRevisionEventData & {
|
|
1332
|
+
status: InvoiceVoidedEventDataStatus;
|
|
1333
|
+
};
|
|
1334
|
+
/**
|
|
1335
|
+
* Signed source confirmation of a void. The invoice remains in the book. The event ID remains stable across redelivery.
|
|
1336
|
+
*/
|
|
1337
|
+
export interface InvoiceVoidedEvent {
|
|
1338
|
+
/** @minLength 1 */
|
|
1339
|
+
id: string;
|
|
1340
|
+
type: InvoiceVoidedEventType;
|
|
1341
|
+
version: InvoiceVoidedEventVersion;
|
|
1342
|
+
occurredAt: string;
|
|
1343
|
+
data: InvoiceVoidedEventData;
|
|
1344
|
+
}
|
|
1345
|
+
export type DeletedInvoiceDataProvider = typeof DeletedInvoiceDataProvider[keyof typeof DeletedInvoiceDataProvider];
|
|
1346
|
+
export declare const DeletedInvoiceDataProvider: {
|
|
1347
|
+
readonly quickbooksDesktop: "quickbooksDesktop";
|
|
1348
|
+
readonly netsuite: "netsuite";
|
|
1349
|
+
};
|
|
1350
|
+
export interface DeletedInvoiceData {
|
|
1351
|
+
/** @minLength 1 */
|
|
1352
|
+
connectionId: string;
|
|
1353
|
+
provider: DeletedInvoiceDataProvider;
|
|
1354
|
+
/** @minLength 1 */
|
|
1355
|
+
invoiceId: string;
|
|
1356
|
+
/** @minimum 1 */
|
|
1357
|
+
revision: number;
|
|
1358
|
+
}
|
|
1359
|
+
export type InvoiceDeletedEventType = typeof InvoiceDeletedEventType[keyof typeof InvoiceDeletedEventType];
|
|
1360
|
+
export declare const InvoiceDeletedEventType: {
|
|
1361
|
+
readonly invoicedeleted: "invoice.deleted";
|
|
1362
|
+
};
|
|
1363
|
+
export type InvoiceDeletedEventVersion = typeof InvoiceDeletedEventVersion[keyof typeof InvoiceDeletedEventVersion];
|
|
1364
|
+
export declare const InvoiceDeletedEventVersion: {
|
|
1365
|
+
readonly NUMBER_1: 1;
|
|
1366
|
+
};
|
|
1367
|
+
/**
|
|
1368
|
+
* Signed source confirmation of deletion. The event identifies the removed invoice and its revision. Its ID remains stable across redelivery.
|
|
1369
|
+
*/
|
|
1370
|
+
export interface InvoiceDeletedEvent {
|
|
1371
|
+
/** @minLength 1 */
|
|
1372
|
+
id: string;
|
|
1373
|
+
type: InvoiceDeletedEventType;
|
|
1374
|
+
version: InvoiceDeletedEventVersion;
|
|
1375
|
+
occurredAt: string;
|
|
1376
|
+
data: DeletedInvoiceData;
|
|
1377
|
+
}
|
|
1378
|
+
export type PaymentMatchedEventType = typeof PaymentMatchedEventType[keyof typeof PaymentMatchedEventType];
|
|
1379
|
+
export declare const PaymentMatchedEventType: {
|
|
1380
|
+
readonly paymentmatched: "payment.matched";
|
|
1381
|
+
};
|
|
1382
|
+
export type PaymentMatchedEventVersion = typeof PaymentMatchedEventVersion[keyof typeof PaymentMatchedEventVersion];
|
|
1383
|
+
export declare const PaymentMatchedEventVersion: {
|
|
1384
|
+
readonly NUMBER_1: 1;
|
|
1385
|
+
};
|
|
1386
|
+
export type PaymentMatchedEventDataProvider = typeof PaymentMatchedEventDataProvider[keyof typeof PaymentMatchedEventDataProvider];
|
|
1387
|
+
export declare const PaymentMatchedEventDataProvider: {
|
|
1388
|
+
readonly quickbooksDesktop: "quickbooksDesktop";
|
|
1389
|
+
readonly netsuite: "netsuite";
|
|
1390
|
+
};
|
|
1391
|
+
export type PaymentMatchedEventDataCurrency = typeof PaymentMatchedEventDataCurrency[keyof typeof PaymentMatchedEventDataCurrency];
|
|
1392
|
+
export declare const PaymentMatchedEventDataCurrency: {
|
|
1393
|
+
readonly USD: "USD";
|
|
1394
|
+
};
|
|
1395
|
+
export type PaymentMatchedEventData = {
|
|
1396
|
+
/** @minLength 1 */
|
|
1397
|
+
observationId: string;
|
|
1398
|
+
/** @minLength 1 */
|
|
1399
|
+
connectionId: string;
|
|
1400
|
+
provider: PaymentMatchedEventDataProvider;
|
|
1401
|
+
/** @minLength 1 */
|
|
1402
|
+
paymentId: string;
|
|
1403
|
+
/** @minLength 1 */
|
|
1404
|
+
invoiceId: string;
|
|
1405
|
+
/** @minLength 1 */
|
|
1406
|
+
externalInvoiceId: string;
|
|
1407
|
+
amount: ReceivableAmount;
|
|
1408
|
+
currency: PaymentMatchedEventDataCurrency;
|
|
1409
|
+
/** @pattern ^(0|[1-9][0-9]*)\.[0-9]{2}$ */
|
|
1410
|
+
balanceDue: string;
|
|
1411
|
+
};
|
|
1412
|
+
/**
|
|
1413
|
+
* Signed JSON payload sent to a subscribed receiver after an observed payment is matched. The event ID remains stable on redelivery.
|
|
1414
|
+
*/
|
|
1415
|
+
export interface PaymentMatchedEvent {
|
|
1416
|
+
/** @minLength 1 */
|
|
1417
|
+
id: string;
|
|
1418
|
+
type: PaymentMatchedEventType;
|
|
1419
|
+
version: PaymentMatchedEventVersion;
|
|
1420
|
+
occurredAt: string;
|
|
1421
|
+
data: PaymentMatchedEventData;
|
|
1422
|
+
}
|
|
1423
|
+
export interface WebhookDeliveries {
|
|
1424
|
+
/** @maxItems 50 */
|
|
1425
|
+
deliveries: WebhookDelivery[];
|
|
1426
|
+
}
|
|
1427
|
+
export interface WebhookReplay {
|
|
1428
|
+
/** @minLength 1 */
|
|
1429
|
+
eventId: string;
|
|
1430
|
+
}
|
|
1431
|
+
export interface PilotError {
|
|
1432
|
+
code: string;
|
|
1433
|
+
message: string;
|
|
1434
|
+
}
|
|
1435
|
+
/**
|
|
1436
|
+
* unauthorized — missing or incorrect project key
|
|
1437
|
+
*/
|
|
1438
|
+
export type UnauthorizedResponse = PilotError;
|
|
1439
|
+
/**
|
|
1440
|
+
* insufficient_scope — the key lacks the permission required for this operation
|
|
1441
|
+
*/
|
|
1442
|
+
export type InsufficientScopeResponse = PilotError;
|
|
1443
|
+
/**
|
|
1444
|
+
* connection_not_found — book is not provisioned for this project
|
|
1445
|
+
*/
|
|
1446
|
+
export type ConnectionNotFoundResponse = PilotError;
|
|
1447
|
+
/**
|
|
1448
|
+
* core_storage_unavailable — Rowbind could not confirm the result. Preserve the original operation ID or idempotency key.
|
|
1449
|
+
*/
|
|
1450
|
+
export type CoreStorageUnavailableResponse = PilotError;
|
|
1451
|
+
/**
|
|
1452
|
+
* pilot_error — service could not finish the request
|
|
1453
|
+
*/
|
|
1454
|
+
export type InternalErrorResponse = PilotError;
|
|
1455
|
+
export type SearchCatalogParams = {
|
|
1456
|
+
/**
|
|
1457
|
+
* @minLength 1
|
|
1458
|
+
* @maxLength 200
|
|
1459
|
+
* @pattern \S
|
|
1460
|
+
*/
|
|
1461
|
+
query: string;
|
|
1462
|
+
/**
|
|
1463
|
+
* Continuation cursor from the previous result.
|
|
1464
|
+
* @minLength 1
|
|
1465
|
+
*/
|
|
1466
|
+
after?: string;
|
|
1467
|
+
};
|
|
1468
|
+
export type CreateReceivedPaymentHeaders = {
|
|
1469
|
+
/**
|
|
1470
|
+
* @minLength 1
|
|
1471
|
+
* @maxLength 255
|
|
1472
|
+
* @pattern \S
|
|
1473
|
+
*/
|
|
1474
|
+
'Idempotency-Key': string;
|
|
1475
|
+
};
|
|
1476
|
+
export type CreateCreditMemoHeaders = {
|
|
1477
|
+
/**
|
|
1478
|
+
* @minLength 1
|
|
1479
|
+
* @maxLength 255
|
|
1480
|
+
* @pattern \S
|
|
1481
|
+
*/
|
|
1482
|
+
'Idempotency-Key': string;
|
|
1483
|
+
};
|
|
1484
|
+
export type ApplyCreditMemoHeaders = {
|
|
1485
|
+
/**
|
|
1486
|
+
* @minLength 1
|
|
1487
|
+
* @maxLength 255
|
|
1488
|
+
* @pattern \S
|
|
1489
|
+
*/
|
|
1490
|
+
'Idempotency-Key': string;
|
|
1491
|
+
};
|
|
1492
|
+
export type CreateBatchHeaders = {
|
|
1493
|
+
/**
|
|
1494
|
+
* Stable key scoped to the connection. Must contain a non-whitespace character.
|
|
1495
|
+
* @minLength 1
|
|
1496
|
+
* @maxLength 255
|
|
1497
|
+
* @pattern \S
|
|
1498
|
+
*/
|
|
1499
|
+
'Idempotency-Key': string;
|
|
1500
|
+
};
|
|
1501
|
+
export type ListSyncedInvoicesParams = {
|
|
1502
|
+
/**
|
|
1503
|
+
* Opaque continuation from this book and snapshot.
|
|
1504
|
+
* @minLength 1
|
|
1505
|
+
*/
|
|
1506
|
+
after?: string;
|
|
1507
|
+
/**
|
|
1508
|
+
* Maximum invoices on one page. Defaults to 20.
|
|
1509
|
+
* @minimum 1
|
|
1510
|
+
* @maximum 100
|
|
1511
|
+
*/
|
|
1512
|
+
limit?: number;
|
|
1513
|
+
};
|
|
1514
|
+
export type ListObservedPaymentsParams = {
|
|
1515
|
+
status?: ObservedPaymentStatus;
|
|
1516
|
+
/**
|
|
1517
|
+
* Resume after this observation ID.
|
|
1518
|
+
* @minLength 1
|
|
1519
|
+
*/
|
|
1520
|
+
after?: string;
|
|
1521
|
+
};
|
|
1522
|
+
export type CreateInvoiceHeaders = {
|
|
1523
|
+
/**
|
|
1524
|
+
* Stable key scoped to the connection. Must contain a non-whitespace character.
|
|
1525
|
+
* @minLength 1
|
|
1526
|
+
* @maxLength 255
|
|
1527
|
+
* @pattern \S
|
|
1528
|
+
*/
|
|
1529
|
+
'Idempotency-Key': string;
|
|
1530
|
+
};
|
|
1531
|
+
export type ListInvoiceTracesParams = {
|
|
1532
|
+
/**
|
|
1533
|
+
* The X-Request-Id of a single invoice POST.
|
|
1534
|
+
* @minLength 1
|
|
1535
|
+
*/
|
|
1536
|
+
requestId?: string;
|
|
1537
|
+
/**
|
|
1538
|
+
* The exact SaaS externalReference of the admitted invoice.
|
|
1539
|
+
* @minLength 1
|
|
1540
|
+
*/
|
|
1541
|
+
reference?: string;
|
|
1542
|
+
/**
|
|
1543
|
+
* The Rowbind invoice operation ID.
|
|
1544
|
+
* @minLength 1
|
|
1545
|
+
*/
|
|
1546
|
+
operationId?: string;
|
|
1547
|
+
/**
|
|
1548
|
+
* Limit results to one connection.
|
|
1549
|
+
* @minLength 1
|
|
1550
|
+
*/
|
|
1551
|
+
connectionId?: string;
|
|
1552
|
+
/**
|
|
1553
|
+
* The opaque nextCursor returned for this search.
|
|
1554
|
+
* @minLength 1
|
|
1555
|
+
*/
|
|
1556
|
+
after?: string;
|
|
1557
|
+
};
|
|
1558
|
+
export type RetrieveInvoiceRecoveryParams = {
|
|
1559
|
+
/**
|
|
1560
|
+
* Continue from a recorded sequence belonging to this invoice operation.
|
|
1561
|
+
* @minimum 1
|
|
1562
|
+
* @maximum 9007199254740991
|
|
1563
|
+
*/
|
|
1564
|
+
after?: number;
|
|
1565
|
+
};
|
|
1566
|
+
export declare const getSearchCatalogUrl: (id: string, kind: "customer" | "item", params: SearchCatalogParams) => string;
|
|
1567
|
+
/**
|
|
1568
|
+
* Requires catalog:read. Search by a literal substring of the display name, item SKU or native ID. Enrolled books refresh active customers and sale items automatically. Each completed scan replaces the previous results for that record type. Up to 50 candidates are returned in native ID order. Identical names can identify different records. Continue with nextCursor and the same book, kind and query. Simulated books include sample records. For an enrolled connector the operator imports the catalog for its exact book and target fingerprint.
|
|
1569
|
+
* @summary Find native customers or items in a connected sandbox book
|
|
1570
|
+
*/
|
|
1571
|
+
export declare const searchCatalog: (id: string, kind: "customer" | "item", params: SearchCatalogParams, options?: Parameters<typeof sendToRowbind>[1]) => Promise<CatalogPage>;
|
|
1572
|
+
export declare const getLinkCatalogUrl: (id: string, kind: "customer" | "item") => string;
|
|
1573
|
+
/**
|
|
1574
|
+
* Requires invoices:write. Select a native ID from the same book and catalog kind. An identical replay returns the original link. An existing link cannot be reassigned. Use the externalId as customerRef.externalId or itemRef.externalId on invoice creation. For an enrolled connector the selected native IDs are pinned at invoice admission and checked again on ERP readback.
|
|
1575
|
+
* @summary Link a SaaS reference to a native customer or item
|
|
1576
|
+
*/
|
|
1577
|
+
export declare const linkCatalog: (id: string, kind: "customer" | "item", catalogLinkRequest: CatalogLinkRequest, options?: Parameters<typeof sendToRowbind>[1]) => Promise<CatalogLink>;
|
|
1578
|
+
export declare const getQueryRawUrl: (id: string) => string;
|
|
1579
|
+
/**
|
|
1580
|
+
* Requires raw:query. Submit a read-only qbXML query fragment or SuiteQL query for the selected provider. Supported queries depend on the connector. Returns one native XML response or a page of SuiteQL rows. Request the next page explicitly using the same query and limit.
|
|
1581
|
+
* @summary Query an authorized book in its native language
|
|
1582
|
+
*/
|
|
1583
|
+
export declare const queryRaw: (id: string, rawQueryRequest: RawQueryRequest, options?: Parameters<typeof sendToRowbind>[1]) => Promise<RawQueryResult>;
|
|
1584
|
+
export declare const getReadRawUrl: (id: string) => string;
|
|
1585
|
+
/**
|
|
1586
|
+
* Requires raw:read. The sandbox accepts one qbXML InvoiceQueryRq fragment containing a single TxnID, or a SuiteTalk GET on /services/rest/record/v1/invoice/{nativeId}. It returns the simulated book's current native fields and a fresh X-Request-Id header. This operation cannot dispatch writes.
|
|
1587
|
+
* @summary Read a native invoice from a consenting sandbox book
|
|
1588
|
+
*/
|
|
1589
|
+
export declare const readRaw: (id: string, rawReadRequest: RawReadRequest, options?: Parameters<typeof sendToRowbind>[1]) => Promise<RawReadResult>;
|
|
1590
|
+
export declare const getCreateReceivedPaymentUrl: () => string;
|
|
1591
|
+
/**
|
|
1592
|
+
* Requires receivables:write. Record money already received from the mapped customer and apply it to their invoice in the selected sandbox book. Read the operation for the verified invoice balance.
|
|
1593
|
+
* @summary Record a received payment applied to an invoice
|
|
1594
|
+
*/
|
|
1595
|
+
export declare const createReceivedPayment: (receivedPaymentRequest: ReceivedPaymentRequest, headers: CreateReceivedPaymentHeaders, options?: Parameters<typeof sendToRowbind>[1]) => Promise<OperationReceipt>;
|
|
1596
|
+
export declare const getCreateCreditMemoUrl: () => string;
|
|
1597
|
+
/**
|
|
1598
|
+
* Requires receivables:write. Issue credit to the mapped customer. The credit remains available until explicitly applied to an invoice. Read the operation for its native credit memo ID.
|
|
1599
|
+
* @summary Issue available credit to a customer
|
|
1600
|
+
*/
|
|
1601
|
+
export declare const createCreditMemo: (creditMemoRequest: CreditMemoRequest, headers: CreateCreditMemoHeaders, options?: Parameters<typeof sendToRowbind>[1]) => Promise<OperationReceipt>;
|
|
1602
|
+
export declare const getApplyCreditMemoUrl: (id: string) => string;
|
|
1603
|
+
/**
|
|
1604
|
+
* Requires receivables:write. Use the native credit memo ID and an invoice belonging to the same customer, currency and book. The application receipt includes the remaining credit and invoice balance.
|
|
1605
|
+
* @summary Apply existing credit to an invoice
|
|
1606
|
+
*/
|
|
1607
|
+
export declare const applyCreditMemo: (id: string, creditApplicationRequest: CreditApplicationRequest, headers: ApplyCreditMemoHeaders, options?: Parameters<typeof sendToRowbind>[1]) => Promise<OperationReceipt>;
|
|
1608
|
+
export declare const getCreateBatchUrl: () => string;
|
|
1609
|
+
/**
|
|
1610
|
+
* Sandbox. Requires batches:write and a stable Idempotency-Key for this connection. Use the employee-clearing vendor and USD. Supply 1 to 25 positive vendor bills followed by one payment whose dependsOn names every bill key exactly once. All row keys must be distinct. The Worker processes the admitted rows asynchronously.
|
|
1611
|
+
* @summary Admit a batch of employee reimbursements
|
|
1612
|
+
*/
|
|
1613
|
+
export declare const createBatch: (batchRequest: BatchRequest, headers: CreateBatchHeaders, options?: Parameters<typeof sendToRowbind>[1]) => Promise<BatchReceipt>;
|
|
1614
|
+
export declare const getRetrieveBatchUrl: (id: string) => string;
|
|
1615
|
+
/**
|
|
1616
|
+
* Requires batches:read. Read the saved batch ID after a restart. Each verified bill exposes its native ID and the last confirmed balance. The payment waits for its bills.
|
|
1617
|
+
* @summary Read the status of a batch and each row
|
|
1618
|
+
*/
|
|
1619
|
+
export declare const retrieveBatch: (id: string, options?: Parameters<typeof sendToRowbind>[1]) => Promise<ReimbursementBatch>;
|
|
1620
|
+
export declare const getCreateWebhookEndpointUrl: () => string;
|
|
1621
|
+
/**
|
|
1622
|
+
* Requires webhooks:manage. The sandbox operator configures a receiver alias and signing secret for this project. Omitting eventType selects operation.verified. Use invoice.created for new invoices, invoice.updated for edits, invoice.voided for confirmed voids, invoice.deleted for confirmed deletions, and payment.matched for confirmed payment matches. Sync publishes invoice events observed after its initial cutoff. Reusing an alias adds the selected event type to the same receiver. Repeating a subscription is idempotent.
|
|
1623
|
+
* @summary Subscribe a sandbox receiver to an event type
|
|
1624
|
+
*/
|
|
1625
|
+
export declare const createWebhookEndpoint: (webhookEndpointRequest: WebhookEndpointRequest, options?: Parameters<typeof sendToRowbind>[1]) => Promise<WebhookEndpoint>;
|
|
1626
|
+
export declare const getListWebhookDeliveriesUrl: (id: string) => string;
|
|
1627
|
+
/**
|
|
1628
|
+
* Requires webhooks:manage. Returns the most recent 50 deliveries and the last HTTP status when the receiver returned one.
|
|
1629
|
+
* @summary Read recent deliveries to a sandbox receiver
|
|
1630
|
+
*/
|
|
1631
|
+
export declare const listWebhookDeliveries: (id: string, options?: Parameters<typeof sendToRowbind>[1]) => Promise<WebhookDeliveries>;
|
|
1632
|
+
export declare const getReplayWebhookDeliveryUrl: (id: string, eventId: string) => string;
|
|
1633
|
+
/**
|
|
1634
|
+
* Requires webhooks:manage. Enqueues the same event for this endpoint. If a delivery is pending or in flight the request coalesces with it.
|
|
1635
|
+
* @summary Request another delivery of the same event
|
|
1636
|
+
*/
|
|
1637
|
+
export declare const replayWebhookDelivery: (id: string, eventId: string, options?: Parameters<typeof sendToRowbind>[1]) => Promise<WebhookReplay>;
|
|
1638
|
+
export declare const getCreateCompanyUrl: () => string;
|
|
1639
|
+
/**
|
|
1640
|
+
* @summary Create or recover a customer by its external ID
|
|
1641
|
+
*/
|
|
1642
|
+
export declare const createCompany: (companyRequest: CompanyRequest, options?: Parameters<typeof sendToRowbind>[1]) => Promise<Company>;
|
|
1643
|
+
export declare const getCreateConnectSessionUrl: () => string;
|
|
1644
|
+
/**
|
|
1645
|
+
* @summary Create a sandbox consent link for the customer administrator
|
|
1646
|
+
*/
|
|
1647
|
+
export declare const createConnectSession: (connectSessionRequest: ConnectSessionRequest, options?: Parameters<typeof sendToRowbind>[1]) => Promise<CreatedConnectSession>;
|
|
1648
|
+
export declare const getRetrieveConnectSessionUrl: (id: string) => string;
|
|
1649
|
+
/**
|
|
1650
|
+
* @summary Check consent and retrieve the authorized connection ID
|
|
1651
|
+
*/
|
|
1652
|
+
export declare const retrieveConnectSession: (id: string, options?: Parameters<typeof sendToRowbind>[1]) => Promise<ConnectSession>;
|
|
1653
|
+
export declare const getListConnectionsUrl: () => string;
|
|
1654
|
+
/**
|
|
1655
|
+
* @summary List the project's ERP connections
|
|
1656
|
+
*/
|
|
1657
|
+
export declare const listConnections: (options?: Parameters<typeof sendToRowbind>[1]) => Promise<Connection[]>;
|
|
1658
|
+
export declare const getRetrieveConnectionUrl: (id: string) => string;
|
|
1659
|
+
/**
|
|
1660
|
+
* @summary Retrieve an ERP connection
|
|
1661
|
+
*/
|
|
1662
|
+
export declare const retrieveConnection: (id: string, options?: Parameters<typeof sendToRowbind>[1]) => Promise<Connection>;
|
|
1663
|
+
export declare const getRetrieveConnectionHealthUrl: (id: string) => string;
|
|
1664
|
+
/**
|
|
1665
|
+
* Requires connections:read. Returns the latest stored evidence from an explicit check, an invoice readback or a managed invoice sync. Reading this endpoint never contacts the ERP.
|
|
1666
|
+
* @summary Read the latest connection health observation
|
|
1667
|
+
*/
|
|
1668
|
+
export declare const retrieveConnectionHealth: (id: string, options?: Parameters<typeof sendToRowbind>[1]) => Promise<ConnectionHealth>;
|
|
1669
|
+
export declare const getCheckConnectionHealthUrl: (id: string) => string;
|
|
1670
|
+
/**
|
|
1671
|
+
* Requires connections:read. Checks book identity, invoice read access and continuity with previously verified evidence. After book_diverged, reconcile the book and run this check to resume work. An unsuccessful check preserves the previous verified read time. An unrecorded authorization requires Connect before verification.
|
|
1672
|
+
* @summary Check access to invoices in the authorized sandbox book
|
|
1673
|
+
*/
|
|
1674
|
+
export declare const checkConnectionHealth: (id: string, options?: Parameters<typeof sendToRowbind>[1]) => Promise<ConnectionHealth>;
|
|
1675
|
+
export declare const getEnableInvoiceSyncUrl: (id: string) => string;
|
|
1676
|
+
/**
|
|
1677
|
+
* Requires sync:write. Starts the initial scan. Repeating this call preserves the existing cursor and coverage.
|
|
1678
|
+
* @summary Enable managed invoice sync for a sandbox book
|
|
1679
|
+
*/
|
|
1680
|
+
export declare const enableInvoiceSync: (id: string, options?: Parameters<typeof sendToRowbind>[1]) => Promise<InvoiceSyncStatus>;
|
|
1681
|
+
export declare const getRetrieveInvoiceSyncUrl: (id: string) => string;
|
|
1682
|
+
/**
|
|
1683
|
+
* Requires sync:read. Returns the latest committed coverage. Before the first complete scan coveredThrough is null. During an interruption it remains at the last completed scan.
|
|
1684
|
+
* @summary Read invoice sync coverage for a sandbox book
|
|
1685
|
+
*/
|
|
1686
|
+
export declare const retrieveInvoiceSync: (id: string, options?: Parameters<typeof sendToRowbind>[1]) => Promise<InvoiceSyncStatus>;
|
|
1687
|
+
export declare const getEnableReceivedPaymentSyncUrl: (id: string) => string;
|
|
1688
|
+
/**
|
|
1689
|
+
* Requires sync:write. Starts the initial scan. Repeating this call preserves the existing cursor and coverage.
|
|
1690
|
+
* @summary Enable managed received-payment sync for a sandbox book
|
|
1691
|
+
*/
|
|
1692
|
+
export declare const enableReceivedPaymentSync: (id: string, options?: Parameters<typeof sendToRowbind>[1]) => Promise<PaymentSyncStatus>;
|
|
1693
|
+
export declare const getRetrieveReceivedPaymentSyncUrl: (id: string) => string;
|
|
1694
|
+
/**
|
|
1695
|
+
* Requires sync:read. Returns the latest committed coverage. Before the first complete scan coveredThrough is null. During an interruption it remains at the last completed scan. A successful scan clears lastFailure.
|
|
1696
|
+
* @summary Read received-payment sync coverage for a sandbox book
|
|
1697
|
+
*/
|
|
1698
|
+
export declare const retrieveReceivedPaymentSync: (id: string, options?: Parameters<typeof sendToRowbind>[1]) => Promise<PaymentSyncStatus>;
|
|
1699
|
+
export declare const getListSyncedInvoicesUrl: (id: string, params?: ListSyncedInvoicesParams) => string;
|
|
1700
|
+
/**
|
|
1701
|
+
* Requires sync:read. The first page pins the latest complete snapshot for this sandbox connection. Pass nextCursor as after to keep the same cutoff on subsequent pages. Subscribe to invoice.created, invoice.updated, invoice.voided, and invoice.deleted before starting the import. Voided invoices remain in the snapshot with status voided. A confirmed deletion removes the invoice from subsequent snapshots. After the import, apply the absolute balance and observed details as one invoice revision. Keep the latest revision per invoice so a late page or redelivery cannot overwrite a newer edit.
|
|
1702
|
+
* @summary Page through invoices at a completed sync cutoff
|
|
1703
|
+
*/
|
|
1704
|
+
export declare const listSyncedInvoices: (id: string, params?: ListSyncedInvoicesParams, options?: Parameters<typeof sendToRowbind>[1]) => Promise<SyncedInvoicePage>;
|
|
1705
|
+
export declare const getListObservedPaymentsUrl: (id: string, params?: ListObservedPaymentsParams) => string;
|
|
1706
|
+
/**
|
|
1707
|
+
* Requires sync:read. Use nextCursor as after for the next page. Each cursor is an observation ID from this connection.
|
|
1708
|
+
* @summary List received payments observed in a sandbox book
|
|
1709
|
+
*/
|
|
1710
|
+
export declare const listObservedPayments: (id: string, params?: ListObservedPaymentsParams, options?: Parameters<typeof sendToRowbind>[1]) => Promise<ObservedPaymentPage>;
|
|
1711
|
+
export declare const getMatchObservedPaymentUrl: (id: string) => string;
|
|
1712
|
+
/**
|
|
1713
|
+
* Requires receivables:match. Use the externalReference of the verified invoice in the original book. Confirming the same association again returns the matched observation. This operation associates existing cash with the SaaS invoice.
|
|
1714
|
+
* @summary Confirm the SaaS invoice for an observed payment
|
|
1715
|
+
*/
|
|
1716
|
+
export declare const matchObservedPayment: (id: string, matchObservedPaymentRequest: MatchObservedPaymentRequest, options?: Parameters<typeof sendToRowbind>[1]) => Promise<ObservedPayment>;
|
|
1717
|
+
export declare const getCreateInvoiceUrl: () => string;
|
|
1718
|
+
/**
|
|
1719
|
+
* The service persists an operation before acknowledging it. Replay the same key and payload on the same connection and book configuration to recover the original operation ID. Poll that operation for the ERP readback. The JSON body is limited to 65536 bytes.
|
|
1720
|
+
* @summary Admit one invoice intent for one connection
|
|
1721
|
+
*/
|
|
1722
|
+
export declare const createInvoice: (invoiceRequest: InvoiceRequest, headers: CreateInvoiceHeaders, options?: Parameters<typeof sendToRowbind>[1]) => Promise<OperationReceipt>;
|
|
1723
|
+
export declare const getListInvoiceTracesUrl: (params?: ListInvoiceTracesParams) => string;
|
|
1724
|
+
/**
|
|
1725
|
+
* Requires operations:read. Supply exactly one of requestId, reference or operationId. Search is exact within the authenticated project and environment. A reference searches the original admitted operation; different operations can have the same reference. Rejections without an operation are searchable by request ID. Returns up to 50 recorded requests in increasing recording order. Earlier requests without recorded traces have no entries. An unknown selector or cursor returns an empty page.
|
|
1726
|
+
* @summary Find requests to create an invoice
|
|
1727
|
+
*/
|
|
1728
|
+
export declare const listInvoiceTraces: (params?: ListInvoiceTracesParams, options?: Parameters<typeof sendToRowbind>[1]) => Promise<InvoiceTracePage>;
|
|
1729
|
+
export declare const getRetrieveInvoiceRecoveryUrl: (id: string, params?: RetrieveInvoiceRecoveryParams) => string;
|
|
1730
|
+
/**
|
|
1731
|
+
* Requires operations:read. Returns up to 50 entries in increasing sequence order. Pass nextCursor as after to continue. Historical invoices may have no recorded entries. Reading this endpoint never sends a command to the book.
|
|
1732
|
+
* @summary Read the durable recovery history of a sandbox invoice
|
|
1733
|
+
*/
|
|
1734
|
+
export declare const retrieveInvoiceRecovery: (id: string, params?: RetrieveInvoiceRecoveryParams, options?: Parameters<typeof sendToRowbind>[1]) => Promise<InvoiceRecoveryPage>;
|
|
1735
|
+
export declare const getRetrieveOperationUrl: (id: string) => string;
|
|
1736
|
+
/**
|
|
1737
|
+
* Requires operations:read. The Worker returns the stored receipt for this project. The invoice pilot can request another reconciliation read against the original book.
|
|
1738
|
+
* @summary Read the operation and its accounting verification result
|
|
1739
|
+
*/
|
|
1740
|
+
export declare const retrieveOperation: (id: string, options?: Parameters<typeof sendToRowbind>[1]) => Promise<Operation>;
|