@codat/lending 6.0.0 → 7.0.0
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/docs/sdks/accountspayable/README.md +5 -1
- package/docs/sdks/accountsreceivable/README.md +5 -1
- package/docs/sdks/banking/README.md +5 -1
- package/docs/sdks/codatlending/README.md +3 -1
- package/docs/sdks/codatlendingdirectcosts/README.md +0 -24
- package/docs/sdks/financialstatements/README.md +5 -1
- package/docs/sdks/loanwriteback/README.md +5 -1
- package/docs/sdks/sales/README.md +5 -1
- package/docs/sdks/sourceaccounts/README.md +21 -21
- package/docs/sdks/transactions/README.md +5 -1
- package/funcs/loanWritebackSourceAccountsCreate.d.ts +0 -21
- package/funcs/loanWritebackSourceAccountsCreate.d.ts.map +1 -1
- package/funcs/loanWritebackSourceAccountsCreate.js +0 -21
- package/funcs/loanWritebackSourceAccountsCreate.js.map +1 -1
- package/funcs/loanWritebackSourceAccountsCreateMapping.d.ts +21 -0
- package/funcs/loanWritebackSourceAccountsCreateMapping.d.ts.map +1 -1
- package/funcs/loanWritebackSourceAccountsCreateMapping.js +21 -0
- package/funcs/loanWritebackSourceAccountsCreateMapping.js.map +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/primitives.d.ts +2 -0
- package/lib/primitives.d.ts.map +1 -1
- package/lib/primitives.js +53 -0
- package/lib/primitives.js.map +1 -1
- package/package.json +3 -1
- package/sdk/models/shared/accountingcompanyinfo.d.ts +1 -1
- package/sdk/sourceaccounts.d.ts +18 -18
- package/sdk/sourceaccounts.d.ts.map +1 -1
- package/sdk/sourceaccounts.js +20 -20
- package/sdk/sourceaccounts.js.map +1 -1
- package/sdk/types/operations.d.ts +5 -3
- package/sdk/types/operations.d.ts.map +1 -1
- package/sdk/types/operations.js +3 -0
- package/sdk/types/operations.js.map +1 -1
- package/src/funcs/loanWritebackSourceAccountsCreate.ts +0 -21
- package/src/funcs/loanWritebackSourceAccountsCreateMapping.ts +21 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/primitives.ts +62 -0
- package/src/sdk/models/shared/accountingcompanyinfo.ts +1 -1
- package/src/sdk/sourceaccounts.ts +21 -21
- package/src/sdk/types/operations.ts +11 -5
|
@@ -28,4 +28,6 @@ The Lending API is built on top of the latest accounting, commerce, and banking
|
|
|
28
28
|
| Manage data | Control how data is retrieved from an integration. |
|
|
29
29
|
| File upload | Endpoints to manage uploaded files. |
|
|
30
30
|
| Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. |
|
|
31
|
-
<!-- End Codat Tags Table -->
|
|
31
|
+
<!-- End Codat Tags Table -->
|
|
32
|
+
|
|
33
|
+
### Available Operations
|
|
@@ -151,16 +151,6 @@ async function run() {
|
|
|
151
151
|
name: "Class 1",
|
|
152
152
|
},
|
|
153
153
|
],
|
|
154
|
-
tracking: {
|
|
155
|
-
recordRefs: [
|
|
156
|
-
{
|
|
157
|
-
dataType: "trackingCategories",
|
|
158
|
-
},
|
|
159
|
-
],
|
|
160
|
-
invoiceTo: {
|
|
161
|
-
dataType: "accountTransaction",
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
154
|
},
|
|
165
155
|
],
|
|
166
156
|
paymentAllocations: [
|
|
@@ -172,12 +162,10 @@ async function run() {
|
|
|
172
162
|
id: "80000028-1671794219",
|
|
173
163
|
name: "Bank Account 1",
|
|
174
164
|
},
|
|
175
|
-
currency: "USD",
|
|
176
165
|
paidOnDate: "2023-01-28T10:19:52.223Z",
|
|
177
166
|
totalAmount: new Decimal("54"),
|
|
178
167
|
},
|
|
179
168
|
allocation: {
|
|
180
|
-
currency: "GBP",
|
|
181
169
|
currencyRate: new Decimal("0"),
|
|
182
170
|
allocatedOnDate: "2023-01-29T10:19:52.223Z",
|
|
183
171
|
totalAmount: new Decimal("88"),
|
|
@@ -249,16 +237,6 @@ async function run() {
|
|
|
249
237
|
name: "Class 1",
|
|
250
238
|
},
|
|
251
239
|
],
|
|
252
|
-
tracking: {
|
|
253
|
-
recordRefs: [
|
|
254
|
-
{
|
|
255
|
-
dataType: "trackingCategories",
|
|
256
|
-
},
|
|
257
|
-
],
|
|
258
|
-
invoiceTo: {
|
|
259
|
-
dataType: "accountTransaction",
|
|
260
|
-
},
|
|
261
|
-
},
|
|
262
240
|
},
|
|
263
241
|
],
|
|
264
242
|
paymentAllocations: [
|
|
@@ -270,12 +248,10 @@ async function run() {
|
|
|
270
248
|
id: "80000028-1671794219",
|
|
271
249
|
name: "Bank Account 1",
|
|
272
250
|
},
|
|
273
|
-
currency: "USD",
|
|
274
251
|
paidOnDate: "2023-01-28T10:19:52.223Z",
|
|
275
252
|
totalAmount: new Decimal("54"),
|
|
276
253
|
},
|
|
277
254
|
allocation: {
|
|
278
|
-
currency: "GBP",
|
|
279
255
|
currencyRate: new Decimal("0"),
|
|
280
256
|
allocatedOnDate: "2023-01-29T10:19:52.223Z",
|
|
281
257
|
totalAmount: new Decimal("88"),
|
|
@@ -12,27 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
The _Create Source Account_ endpoint allows you to create a representation of a bank account within Codat's domain. The company can then map the source account to an existing or new target account in their accounting software.
|
|
14
14
|
|
|
15
|
-
#### Account mapping variability
|
|
16
|
-
|
|
17
|
-
The method of mapping the source account to the target account varies depending on the accounting software your company uses.
|
|
18
|
-
|
|
19
|
-
#### Mapping options:
|
|
20
|
-
|
|
21
|
-
1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience.
|
|
22
|
-
2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping.
|
|
23
|
-
3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself.
|
|
24
|
-
|
|
25
|
-
### Integration-specific behaviour
|
|
26
|
-
|
|
27
|
-
| Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping |
|
|
28
|
-
| --------------------- | ----------- | ---------------- | --------------------------- |
|
|
29
|
-
| Xero | ✅ | ✅ | |
|
|
30
|
-
| FreeAgent | ✅ | ✅ | |
|
|
31
|
-
| Oracle NetSuite | ✅ | ✅ | |
|
|
32
|
-
| Exact Online (NL) | ✅ | ✅ | |
|
|
33
|
-
| QuickBooks Online | | | ✅ |
|
|
34
|
-
| Sage | | | ✅ |
|
|
35
|
-
|
|
36
15
|
> ### Versioning
|
|
37
16
|
> If you are integrating the Bank Feeds API with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below.
|
|
38
17
|
|
|
@@ -167,6 +146,27 @@ To find valid target account options, first call the [List bank feed account map
|
|
|
167
146
|
>
|
|
168
147
|
> Only use this endpoint if you are building your own account management UI.
|
|
169
148
|
|
|
149
|
+
#### Account mapping variability
|
|
150
|
+
|
|
151
|
+
The method of mapping the source account to the target account varies depending on the accounting software your company uses.
|
|
152
|
+
|
|
153
|
+
#### Mapping options:
|
|
154
|
+
|
|
155
|
+
1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience.
|
|
156
|
+
2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping.
|
|
157
|
+
3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself.
|
|
158
|
+
|
|
159
|
+
### Integration-specific behaviour
|
|
160
|
+
|
|
161
|
+
| Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping |
|
|
162
|
+
| --------------------- | ----------- | ---------------- | --------------------------- |
|
|
163
|
+
| Xero | ✅ | ✅ | |
|
|
164
|
+
| FreeAgent | ✅ | ✅ | |
|
|
165
|
+
| Oracle NetSuite | ✅ | ✅ | |
|
|
166
|
+
| Exact Online (NL) | ✅ | ✅ | |
|
|
167
|
+
| QuickBooks Online | | | ✅ |
|
|
168
|
+
| Sage | | | ✅ |
|
|
169
|
+
|
|
170
170
|
### Example Usage
|
|
171
171
|
|
|
172
172
|
```typescript
|
|
@@ -12,27 +12,6 @@ import { Result } from "../sdk/types/fp.js";
|
|
|
12
12
|
* @remarks
|
|
13
13
|
* The _Create Source Account_ endpoint allows you to create a representation of a bank account within Codat's domain. The company can then map the source account to an existing or new target account in their accounting software.
|
|
14
14
|
*
|
|
15
|
-
* #### Account mapping variability
|
|
16
|
-
*
|
|
17
|
-
* The method of mapping the source account to the target account varies depending on the accounting software your company uses.
|
|
18
|
-
*
|
|
19
|
-
* #### Mapping options:
|
|
20
|
-
*
|
|
21
|
-
* 1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience.
|
|
22
|
-
* 2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping.
|
|
23
|
-
* 3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself.
|
|
24
|
-
*
|
|
25
|
-
* ### Integration-specific behaviour
|
|
26
|
-
*
|
|
27
|
-
* | Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping |
|
|
28
|
-
* | --------------------- | ----------- | ---------------- | --------------------------- |
|
|
29
|
-
* | Xero | ✅ | ✅ | |
|
|
30
|
-
* | FreeAgent | ✅ | ✅ | |
|
|
31
|
-
* | Oracle NetSuite | ✅ | ✅ | |
|
|
32
|
-
* | Exact Online (NL) | ✅ | ✅ | |
|
|
33
|
-
* | QuickBooks Online | | | ✅ |
|
|
34
|
-
* | Sage | | | ✅ |
|
|
35
|
-
*
|
|
36
15
|
* > ### Versioning
|
|
37
16
|
* > If you are integrating the Bank Feeds API with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below.
|
|
38
17
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loanWritebackSourceAccountsCreate.d.ts","sourceRoot":"","sources":["../src/funcs/loanWritebackSourceAccountsCreate.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAI9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,KAAK,UAAU,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C
|
|
1
|
+
{"version":3,"file":"loanWritebackSourceAccountsCreate.d.ts","sourceRoot":"","sources":["../src/funcs/loanWritebackSourceAccountsCreate.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAI9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,KAAK,UAAU,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C;;;;;;;;GAQG;AACH,wBAAsB,iCAAiC,CACrD,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,UAAU,CAAC,+BAA+B,EACxC,MAAM,CAAC,YAAY,GACnB,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CA0HA"}
|
|
@@ -40,27 +40,6 @@ const operations = __importStar(require("../sdk/models/operations/index.js"));
|
|
|
40
40
|
* @remarks
|
|
41
41
|
* The _Create Source Account_ endpoint allows you to create a representation of a bank account within Codat's domain. The company can then map the source account to an existing or new target account in their accounting software.
|
|
42
42
|
*
|
|
43
|
-
* #### Account mapping variability
|
|
44
|
-
*
|
|
45
|
-
* The method of mapping the source account to the target account varies depending on the accounting software your company uses.
|
|
46
|
-
*
|
|
47
|
-
* #### Mapping options:
|
|
48
|
-
*
|
|
49
|
-
* 1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience.
|
|
50
|
-
* 2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping.
|
|
51
|
-
* 3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself.
|
|
52
|
-
*
|
|
53
|
-
* ### Integration-specific behaviour
|
|
54
|
-
*
|
|
55
|
-
* | Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping |
|
|
56
|
-
* | --------------------- | ----------- | ---------------- | --------------------------- |
|
|
57
|
-
* | Xero | ✅ | ✅ | |
|
|
58
|
-
* | FreeAgent | ✅ | ✅ | |
|
|
59
|
-
* | Oracle NetSuite | ✅ | ✅ | |
|
|
60
|
-
* | Exact Online (NL) | ✅ | ✅ | |
|
|
61
|
-
* | QuickBooks Online | | | ✅ |
|
|
62
|
-
* | Sage | | | ✅ |
|
|
63
|
-
*
|
|
64
43
|
* > ### Versioning
|
|
65
44
|
* > If you are integrating the Bank Feeds API with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below.
|
|
66
45
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loanWritebackSourceAccountsCreate.js","sourceRoot":"","sources":["../src/funcs/loanWritebackSourceAccountsCreate.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"loanWritebackSourceAccountsCreate.js","sourceRoot":"","sources":["../src/funcs/loanWritebackSourceAccountsCreate.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AA+BH,8EA0IC;AAtKD,sDAA+D;AAC/D,sDAAwC;AACxC,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAQ3C,sEAAwD;AAGxD,8EAAgE;AAGhE;;;;;;;;GAQG;AACI,KAAK,UAAU,iCAAiC,CACrD,MAAwB,EACxB,OAA8C,EAC9C,OAAwB;IAcxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CACR,UAAU,CAAC,yCAAyC,CAAC,KAAK,CAAC,KAAK,CAAC,EACnE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAA,yBAAU,EAAC,MAAM,EAAE,OAAO,CAAC,WAAW,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAExE,MAAM,UAAU,GAAG;QACjB,SAAS,EAAE,IAAA,2BAAY,EAAC,WAAW,EAAE,OAAO,CAAC,SAAS,EAAE;YACtD,OAAO,EAAE,KAAK;YACd,YAAY,EAAE,SAAS;SACxB,CAAC;QACF,YAAY,EAAE,IAAA,2BAAY,EAAC,cAAc,EAAE,OAAO,CAAC,YAAY,EAAE;YAC/D,OAAO,EAAE,KAAK;YACd,YAAY,EAAE,SAAS;SACxB,CAAC;KACH,CAAC;IAEF,MAAM,IAAI,GAAG,IAAA,mBAAU,EACrB,mFAAmF,CACpF,CAAC,UAAU,CAAC,CAAC;IAEd,MAAM,O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AE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -20,6 +20,27 @@ import { Result } from "../sdk/types/fp.js";
|
|
|
20
20
|
* > **For custom builds only**
|
|
21
21
|
* >
|
|
22
22
|
* > Only use this endpoint if you are building your own account management UI.
|
|
23
|
+
*
|
|
24
|
+
* #### Account mapping variability
|
|
25
|
+
*
|
|
26
|
+
* The method of mapping the source account to the target account varies depending on the accounting software your company uses.
|
|
27
|
+
*
|
|
28
|
+
* #### Mapping options:
|
|
29
|
+
*
|
|
30
|
+
* 1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience.
|
|
31
|
+
* 2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping.
|
|
32
|
+
* 3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself.
|
|
33
|
+
*
|
|
34
|
+
* ### Integration-specific behaviour
|
|
35
|
+
*
|
|
36
|
+
* | Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping |
|
|
37
|
+
* | --------------------- | ----------- | ---------------- | --------------------------- |
|
|
38
|
+
* | Xero | ✅ | ✅ | |
|
|
39
|
+
* | FreeAgent | ✅ | ✅ | |
|
|
40
|
+
* | Oracle NetSuite | ✅ | ✅ | |
|
|
41
|
+
* | Exact Online (NL) | ✅ | ✅ | |
|
|
42
|
+
* | QuickBooks Online | | | ✅ |
|
|
43
|
+
* | Sage | | | ✅ |
|
|
23
44
|
*/
|
|
24
45
|
export declare function loanWritebackSourceAccountsCreateMapping(client: CodatLendingCore, request: operations.CreateBankAccountMappingRequest, options?: RequestOptions): Promise<Result<shared.BankFeedBankAccountMappingResponse, errors.ErrorMessage | SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
25
46
|
//# sourceMappingURL=loanWritebackSourceAccountsCreateMapping.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loanWritebackSourceAccountsCreateMapping.d.ts","sourceRoot":"","sources":["../src/funcs/loanWritebackSourceAccountsCreateMapping.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAI9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,KAAK,UAAU,MAAM,mCAAmC,CAAC;AAChE,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C
|
|
1
|
+
{"version":3,"file":"loanWritebackSourceAccountsCreateMapping.d.ts","sourceRoot":"","sources":["../src/funcs/loanWritebackSourceAccountsCreateMapping.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAI9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,KAAK,UAAU,MAAM,mCAAmC,CAAC;AAChE,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAsB,wCAAwC,CAC5D,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,UAAU,CAAC,+BAA+B,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,MAAM,CAAC,kCAAkC,EACvC,MAAM,CAAC,YAAY,GACnB,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CA4HA"}
|
|
@@ -48,6 +48,27 @@ const shared = __importStar(require("../sdk/models/shared/index.js"));
|
|
|
48
48
|
* > **For custom builds only**
|
|
49
49
|
* >
|
|
50
50
|
* > Only use this endpoint if you are building your own account management UI.
|
|
51
|
+
*
|
|
52
|
+
* #### Account mapping variability
|
|
53
|
+
*
|
|
54
|
+
* The method of mapping the source account to the target account varies depending on the accounting software your company uses.
|
|
55
|
+
*
|
|
56
|
+
* #### Mapping options:
|
|
57
|
+
*
|
|
58
|
+
* 1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience.
|
|
59
|
+
* 2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping.
|
|
60
|
+
* 3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself.
|
|
61
|
+
*
|
|
62
|
+
* ### Integration-specific behaviour
|
|
63
|
+
*
|
|
64
|
+
* | Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping |
|
|
65
|
+
* | --------------------- | ----------- | ---------------- | --------------------------- |
|
|
66
|
+
* | Xero | ✅ | ✅ | |
|
|
67
|
+
* | FreeAgent | ✅ | ✅ | |
|
|
68
|
+
* | Oracle NetSuite | ✅ | ✅ | |
|
|
69
|
+
* | Exact Online (NL) | ✅ | ✅ | |
|
|
70
|
+
* | QuickBooks Online | | | ✅ |
|
|
71
|
+
* | Sage | | | ✅ |
|
|
51
72
|
*/
|
|
52
73
|
async function loanWritebackSourceAccountsCreateMapping(client, request, options) {
|
|
53
74
|
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.CreateBankAccountMappingRequest$outboundSchema.parse(value), "Input validation failed");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loanWritebackSourceAccountsCreateMapping.js","sourceRoot":"","sources":["../src/funcs/loanWritebackSourceAccountsCreateMapping.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"loanWritebackSourceAccountsCreateMapping.js","sourceRoot":"","sources":["../src/funcs/loanWritebackSourceAccountsCreateMapping.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AA0DH,4FA4IC;AAnMD,sDAA+D;AAC/D,sDAAwC;AACxC,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAQ3C,sEAAwD;AAGxD,8EAAgE;AAChE,sEAAwD;AAGxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACI,KAAK,UAAU,wCAAwC,CAC5D,MAAwB,EACxB,OAAmD,EACnD,OAAwB;IAcxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CACR,UAAU,CAAC,8CAA8C,CAAC,KAAK,CAAC,KAAK,CAAC,EACxE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAA,yBAAU,EAAC,MAAM,EAAE,OAAO,CAAC,0BAA0B,EAAE;QAClE,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG;QACjB,SAAS,EA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E,MAAM,CAAC,gDAAgD,CAAC,EACpE,CAAC,CAAC,OAAO,CACP,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EACxC,MAAM,CAAC,0BAA0B,CAClC,EACD,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CACvB,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAC7C,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/lib/config.d.ts
CHANGED
|
@@ -27,8 +27,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
27
27
|
export declare const SDK_METADATA: {
|
|
28
28
|
readonly language: "typescript";
|
|
29
29
|
readonly openapiDocVersion: "3.0.0";
|
|
30
|
-
readonly sdkVersion: "
|
|
31
|
-
readonly genVersion: "2.
|
|
32
|
-
readonly userAgent: "speakeasy-sdk/typescript
|
|
30
|
+
readonly sdkVersion: "7.0.0";
|
|
31
|
+
readonly genVersion: "2.463.0";
|
|
32
|
+
readonly userAgent: "speakeasy-sdk/typescript 7.0.0 2.463.0 3.0.0 @codat/lending";
|
|
33
33
|
};
|
|
34
34
|
//# sourceMappingURL=config.d.ts.map
|
package/lib/config.js
CHANGED
|
@@ -32,8 +32,8 @@ function serverURLFromOptions(options) {
|
|
|
32
32
|
exports.SDK_METADATA = {
|
|
33
33
|
language: "typescript",
|
|
34
34
|
openapiDocVersion: "3.0.0",
|
|
35
|
-
sdkVersion: "
|
|
36
|
-
genVersion: "2.
|
|
37
|
-
userAgent: "speakeasy-sdk/typescript
|
|
35
|
+
sdkVersion: "7.0.0",
|
|
36
|
+
genVersion: "2.463.0",
|
|
37
|
+
userAgent: "speakeasy-sdk/typescript 7.0.0 2.463.0 3.0.0 @codat/lending",
|
|
38
38
|
};
|
|
39
39
|
//# sourceMappingURL=config.js.map
|
package/lib/primitives.d.ts
CHANGED
|
@@ -17,4 +17,6 @@ export type Remap<Inp, Mapping extends {
|
|
|
17
17
|
export declare function remap<Inp extends Record<string, unknown>, const Mapping extends {
|
|
18
18
|
[k in keyof Inp]?: string | null;
|
|
19
19
|
}>(inp: Inp, mappings: Mapping): Remap<Inp, Mapping>;
|
|
20
|
+
export declare function combineSignals(...signals: Array<AbortSignal | null | undefined>): AbortSignal | null;
|
|
21
|
+
export declare function abortSignalAny(signals: AbortSignal[]): AbortSignal;
|
|
20
22
|
//# sourceMappingURL=primitives.d.ts.map
|
package/lib/primitives.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../src/lib/primitives.ts"],"names":[],"mappings":"AAWA,wBAAgB,SAAS,CACvB,SAAS,EAAE,OAAO,EAClB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,SAAS,CAInB;AAED,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI;KAC3B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS;CAClC,CAAC;AAEF,MAAM,MAAM,KAAK,CAAC,GAAG,EAAE,OAAO,SAAS;KAAG,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;CAAE,IAAI;KAC5E,CAAC,IAAI,MAAM,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC,SAAS,MAAM,GACxC,OAAO,CAAC,CAAC,CAAC,GACV,OAAO,CAAC,CAAC,CAAC,SAAS,IAAI,GACvB,KAAK,GACL,CAAC,GAAsC,GAAG,CAAC,CAAC,CAAC;CAClD,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,KAAK,CACnB,GAAG,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,KA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SAAS,CAAC,GAChD,WAAW,GAAG,IAAI,CAkBpB;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,WAAW,CAsClE"}
|
package/lib/primitives.js
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.invariant = invariant;
|
|
7
7
|
exports.remap = remap;
|
|
8
|
+
exports.combineSignals = combineSignals;
|
|
9
|
+
exports.abortSignalAny = abortSignalAny;
|
|
8
10
|
class InvariantError extends Error {
|
|
9
11
|
constructor(message) {
|
|
10
12
|
super(message);
|
|
@@ -38,4 +40,55 @@ function remap(inp, mappings) {
|
|
|
38
40
|
}
|
|
39
41
|
return out;
|
|
40
42
|
}
|
|
43
|
+
function combineSignals(...signals) {
|
|
44
|
+
const filtered = [];
|
|
45
|
+
for (const signal of signals) {
|
|
46
|
+
if (signal) {
|
|
47
|
+
filtered.push(signal);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
switch (filtered.length) {
|
|
51
|
+
case 0:
|
|
52
|
+
case 1:
|
|
53
|
+
return filtered[0] || null;
|
|
54
|
+
default:
|
|
55
|
+
if ("any" in AbortSignal && typeof AbortSignal.any === "function") {
|
|
56
|
+
return AbortSignal.any(filtered);
|
|
57
|
+
}
|
|
58
|
+
return abortSignalAny(filtered);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function abortSignalAny(signals) {
|
|
62
|
+
const controller = new AbortController();
|
|
63
|
+
const result = controller.signal;
|
|
64
|
+
if (!signals.length) {
|
|
65
|
+
return controller.signal;
|
|
66
|
+
}
|
|
67
|
+
if (signals.length === 1) {
|
|
68
|
+
return signals[0] || controller.signal;
|
|
69
|
+
}
|
|
70
|
+
for (const signal of signals) {
|
|
71
|
+
if (signal.aborted) {
|
|
72
|
+
return signal;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function abort() {
|
|
76
|
+
controller.abort(this.reason);
|
|
77
|
+
clean();
|
|
78
|
+
}
|
|
79
|
+
const signalRefs = [];
|
|
80
|
+
function clean() {
|
|
81
|
+
for (const signalRef of signalRefs) {
|
|
82
|
+
const signal = signalRef.deref();
|
|
83
|
+
if (signal) {
|
|
84
|
+
signal.removeEventListener("abort", abort);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
for (const signal of signals) {
|
|
89
|
+
signalRefs.push(new WeakRef(signal));
|
|
90
|
+
signal.addEventListener("abort", abort);
|
|
91
|
+
}
|
|
92
|
+
return result;
|
|
93
|
+
}
|
|
41
94
|
//# sourceMappingURL=primitives.js.map
|
package/lib/primitives.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.js","sourceRoot":"","sources":["../src/lib/primitives.ts"],"names":[],"mappings":";AAAA;;GAEG;;AASH,8BAOC;AAqBD,sBAoBC;
|
|
1
|
+
{"version":3,"file":"primitives.js","sourceRoot":"","sources":["../src/lib/primitives.ts"],"names":[],"mappings":";AAAA;;GAEG;;AASH,8BAOC;AAqBD,sBAoBC;AAED,wCAoBC;AAED,wCAsCC;AArHD,MAAM,cAAe,SAAQ,KAAK;IAChC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF;AAED,SAAgB,SAAS,CACvB,SAAkB,EAClB,OAAe;IAEf,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;AACH,CAAC;AAcD;;;;;;GAMG;AACH,SAAgB,KAAK,CAGnB,GAAQ,EAAE,QAAiB;IAC3B,IAAI,GAAG,GAAQ,EAAE,CAAC;IAElB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,CAAC;QAClC,GAAG,GAAG,GAAG,CAAC;QACV,OAAO,GAAG,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AC;QACzB,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC;IACzC,CAAC;IAED,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC;IAED,SAAS,KAAK;QACZ,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC9B,KAAK,EAAE,CAAC;IACV,CAAC;IAED,MAAM,UAAU,GAA2B,EAAE,CAAC;IAC9C,SAAS,KAAK;QACZ,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;YACnC,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,EAAE,CAAC;YACjC,IAAI,MAAM,EAAE,CAAC;gBACX,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC;IACH,CAAC;IAED,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,UAAU,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;QACrC,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codat/lending",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"author": "Codat",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
"prepublishOnly": "npm run build"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
+
"react": "^18 || ^19",
|
|
19
|
+
"react-dom": "^18 || ^19",
|
|
18
20
|
"zod": ">= 3"
|
|
19
21
|
},
|
|
20
22
|
"devDependencies": {
|
|
@@ -12,7 +12,7 @@ import { WebLink, WebLink$Outbound } from "./weblink.js";
|
|
|
12
12
|
*
|
|
13
13
|
* > **Company information or companies?**
|
|
14
14
|
* >
|
|
15
|
-
* > Company
|
|
15
|
+
* > Company information is standard information that is held in the accounting software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources.
|
|
16
16
|
*/
|
|
17
17
|
export type AccountingCompanyInfo = {
|
|
18
18
|
/**
|
package/sdk/sourceaccounts.d.ts
CHANGED
|
@@ -8,6 +8,24 @@ export declare class SourceAccounts extends ClientSDK {
|
|
|
8
8
|
* @remarks
|
|
9
9
|
* The _Create Source Account_ endpoint allows you to create a representation of a bank account within Codat's domain. The company can then map the source account to an existing or new target account in their accounting software.
|
|
10
10
|
*
|
|
11
|
+
* > ### Versioning
|
|
12
|
+
* > If you are integrating the Bank Feeds API with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below.
|
|
13
|
+
*/
|
|
14
|
+
create(request: operations.CreateSourceAccountRequest, options?: RequestOptions): Promise<operations.CreateSourceAccountResponseBody>;
|
|
15
|
+
/**
|
|
16
|
+
* Create bank feed account mapping
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting software (target account).
|
|
20
|
+
*
|
|
21
|
+
* A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software).
|
|
22
|
+
*
|
|
23
|
+
* To find valid target account options, first call the [List bank feed account mappings](https://docs.codat.io//bank-feeds-api#/operations/get-bank-account-mapping) endpoint.
|
|
24
|
+
*
|
|
25
|
+
* > **For custom builds only**
|
|
26
|
+
* >
|
|
27
|
+
* > Only use this endpoint if you are building your own account management UI.
|
|
28
|
+
*
|
|
11
29
|
* #### Account mapping variability
|
|
12
30
|
*
|
|
13
31
|
* The method of mapping the source account to the target account varies depending on the accounting software your company uses.
|
|
@@ -28,24 +46,6 @@ export declare class SourceAccounts extends ClientSDK {
|
|
|
28
46
|
* | Exact Online (NL) | ✅ | ✅ | |
|
|
29
47
|
* | QuickBooks Online | | | ✅ |
|
|
30
48
|
* | Sage | | | ✅ |
|
|
31
|
-
*
|
|
32
|
-
* > ### Versioning
|
|
33
|
-
* > If you are integrating the Bank Feeds API with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below.
|
|
34
|
-
*/
|
|
35
|
-
create(request: operations.CreateSourceAccountRequest, options?: RequestOptions): Promise<operations.CreateSourceAccountResponseBody>;
|
|
36
|
-
/**
|
|
37
|
-
* Create bank feed account mapping
|
|
38
|
-
*
|
|
39
|
-
* @remarks
|
|
40
|
-
* The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting software (target account).
|
|
41
|
-
*
|
|
42
|
-
* A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software).
|
|
43
|
-
*
|
|
44
|
-
* To find valid target account options, first call the [List bank feed account mappings](https://docs.codat.io//bank-feeds-api#/operations/get-bank-account-mapping) endpoint.
|
|
45
|
-
*
|
|
46
|
-
* > **For custom builds only**
|
|
47
|
-
* >
|
|
48
|
-
* > Only use this endpoint if you are building your own account management UI.
|
|
49
49
|
*/
|
|
50
50
|
createMapping(request: operations.CreateBankAccountMappingRequest, options?: RequestOptions): Promise<shared.BankFeedBankAccountMappingResponse>;
|
|
51
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourceaccounts.d.ts","sourceRoot":"","sources":["../src/sdk/sourceaccounts.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;AAGnD,qBAAa,cAAe,SAAQ,SAAS;IAC3C
|
|
1
|
+
{"version":3,"file":"sourceaccounts.d.ts","sourceRoot":"","sources":["../src/sdk/sourceaccounts.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;AAGnD,qBAAa,cAAe,SAAQ,SAAS;IAC3C;;;;;;;;OAQG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,+BAA+B,CAAC;IAQtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACG,aAAa,CACjB,OAAO,EAAE,UAAU,CAAC,+BAA+B,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,kCAAkC,CAAC;CAOtD"}
|
package/sdk/sourceaccounts.js
CHANGED
|
@@ -15,6 +15,26 @@ class SourceAccounts extends sdks_js_1.ClientSDK {
|
|
|
15
15
|
* @remarks
|
|
16
16
|
* The _Create Source Account_ endpoint allows you to create a representation of a bank account within Codat's domain. The company can then map the source account to an existing or new target account in their accounting software.
|
|
17
17
|
*
|
|
18
|
+
* > ### Versioning
|
|
19
|
+
* > If you are integrating the Bank Feeds API with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below.
|
|
20
|
+
*/
|
|
21
|
+
async create(request, options) {
|
|
22
|
+
return (0, fp_js_1.unwrapAsync)((0, loanWritebackSourceAccountsCreate_js_1.loanWritebackSourceAccountsCreate)(this, request, options));
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Create bank feed account mapping
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting software (target account).
|
|
29
|
+
*
|
|
30
|
+
* A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software).
|
|
31
|
+
*
|
|
32
|
+
* To find valid target account options, first call the [List bank feed account mappings](https://docs.codat.io//bank-feeds-api#/operations/get-bank-account-mapping) endpoint.
|
|
33
|
+
*
|
|
34
|
+
* > **For custom builds only**
|
|
35
|
+
* >
|
|
36
|
+
* > Only use this endpoint if you are building your own account management UI.
|
|
37
|
+
*
|
|
18
38
|
* #### Account mapping variability
|
|
19
39
|
*
|
|
20
40
|
* The method of mapping the source account to the target account varies depending on the accounting software your company uses.
|
|
@@ -35,26 +55,6 @@ class SourceAccounts extends sdks_js_1.ClientSDK {
|
|
|
35
55
|
* | Exact Online (NL) | ✅ | ✅ | |
|
|
36
56
|
* | QuickBooks Online | | | ✅ |
|
|
37
57
|
* | Sage | | | ✅ |
|
|
38
|
-
*
|
|
39
|
-
* > ### Versioning
|
|
40
|
-
* > If you are integrating the Bank Feeds API with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below.
|
|
41
|
-
*/
|
|
42
|
-
async create(request, options) {
|
|
43
|
-
return (0, fp_js_1.unwrapAsync)((0, loanWritebackSourceAccountsCreate_js_1.loanWritebackSourceAccountsCreate)(this, request, options));
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Create bank feed account mapping
|
|
47
|
-
*
|
|
48
|
-
* @remarks
|
|
49
|
-
* The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting software (target account).
|
|
50
|
-
*
|
|
51
|
-
* A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software).
|
|
52
|
-
*
|
|
53
|
-
* To find valid target account options, first call the [List bank feed account mappings](https://docs.codat.io//bank-feeds-api#/operations/get-bank-account-mapping) endpoint.
|
|
54
|
-
*
|
|
55
|
-
* > **For custom builds only**
|
|
56
|
-
* >
|
|
57
|
-
* > Only use this endpoint if you are building your own account management UI.
|
|
58
58
|
*/
|
|
59
59
|
async createMapping(request, options) {
|
|
60
60
|
return (0, fp_js_1.unwrapAsync)((0, loanWritebackSourceAccountsCreateMapping_js_1.loanWritebackSourceAccountsCreateMapping)(this, request, options));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourceaccounts.js","sourceRoot":"","sources":["../src/sdk/sourceaccounts.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,wGAAkG;AAClG,sHAAgH;AAChH,4CAA2D;AAG3D,yCAA4C;AAE5C,MAAa,cAAe,SAAQ,mBAAS;IAC3C
|
|
1
|
+
{"version":3,"file":"sourceaccounts.js","sourceRoot":"","sources":["../src/sdk/sourceaccounts.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,wGAAkG;AAClG,sHAAgH;AAChH,4CAA2D;AAG3D,yCAA4C;AAE5C,MAAa,cAAe,SAAQ,mBAAS;IAC3C;;;;;;;;OAQG;IACH,KAAK,CAAC,MAAM,CACV,OAA8C,EAC9C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,wEAAiC,EAClD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,KAAK,CAAC,aAAa,CACjB,OAAmD,EACnD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sFAAwC,EACzD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAlED,wCAkEC"}
|
|
@@ -2,9 +2,10 @@ import { Result } from "./fp.js";
|
|
|
2
2
|
export type Paginator<V> = () => Promise<V & {
|
|
3
3
|
next: Paginator<V>;
|
|
4
4
|
}> | null;
|
|
5
|
-
export type PageIterator<V> = V & {
|
|
5
|
+
export type PageIterator<V, PageState = unknown> = V & {
|
|
6
6
|
next: Paginator<V>;
|
|
7
7
|
[Symbol.asyncIterator]: () => AsyncIterableIterator<V>;
|
|
8
|
+
"~next"?: PageState | undefined;
|
|
8
9
|
};
|
|
9
10
|
export declare function createPageIterator<V>(page: V & {
|
|
10
11
|
next: Paginator<V>;
|
|
@@ -16,10 +17,11 @@ export declare function createPageIterator<V>(page: V & {
|
|
|
16
17
|
* terminates. It is useful in paginated SDK functions that have early return
|
|
17
18
|
* paths when things go wrong.
|
|
18
19
|
*/
|
|
19
|
-
export declare function haltIterator<V extends object>(v: V): PageIterator<V>;
|
|
20
|
+
export declare function haltIterator<V extends object>(v: V): PageIterator<V, undefined>;
|
|
20
21
|
/**
|
|
21
22
|
* Converts an async iterator of `Result<V, E>` into an async iterator of `V`.
|
|
22
23
|
* When error results occur, the underlying error value is thrown.
|
|
23
24
|
*/
|
|
24
|
-
export declare function unwrapResultIterator<V>(iteratorPromise: Promise<PageIterator<Result<V, unknown
|
|
25
|
+
export declare function unwrapResultIterator<V, PageState>(iteratorPromise: Promise<PageIterator<Result<V, unknown>, PageState>>): Promise<PageIterator<V, PageState>>;
|
|
26
|
+
export declare const URL_OVERRIDE: unique symbol;
|
|
25
27
|
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/sdk/types/operations.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,MAAM,OAAO,CAAC,CAAC,GAAG;IAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;CAAE,CAAC,GAAG,IAAI,CAAC;AAE5E,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG;
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/sdk/types/operations.ts"],"names":[],"mappings":"AAIA,O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DIT.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.URL_OVERRIDE = void 0;
|
|
6
7
|
exports.createPageIterator = createPageIterator;
|
|
7
8
|
exports.haltIterator = haltIterator;
|
|
8
9
|
exports.unwrapResultIterator = unwrapResultIterator;
|
|
@@ -49,6 +50,7 @@ async function unwrapResultIterator(iteratorPromise) {
|
|
|
49
50
|
return {
|
|
50
51
|
...resultIter.value,
|
|
51
52
|
next: unwrapPaginator(resultIter.next),
|
|
53
|
+
"~next": resultIter["~next"],
|
|
52
54
|
[Symbol.asyncIterator]: async function* paginator() {
|
|
53
55
|
for await (const page of resultIter) {
|
|
54
56
|
if (!page.ok) {
|
|
@@ -77,4 +79,5 @@ function unwrapPaginator(paginator) {
|
|
|
77
79
|
});
|
|
78
80
|
};
|
|
79
81
|
}
|
|
82
|
+
exports.URL_OVERRIDE = Symbol("URL_OVERRIDE");
|
|
80
83
|
//# sourceMappingURL=operations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../src/sdk/types/operations.ts"],"names":[],"mappings":";AAAA;;GAEG
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../src/sdk/types/operations.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAYH,gDAsBC;AAOD,oCAUC;AAMD,oDAsBC;AAnED,SAAgB,kBAAkB,CAChC,IAAgC,EAChC,IAAuB;IAIvB,OAAO;QACL,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,SAAS;YAC/C,MAAM,IAAI,CAAC;YACX,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBACf,OAAO;YACT,CAAC;YAED,IAAI,CAAC,GAAuB,IAAI,CAAC;YACjC,KAAK,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,GAAG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I,CAAC;QACd,CAAC;QACD,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YAC7B,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;gBACZ,MAAM,GAAG,CAAC,KAAK,CAAC;YAClB,CAAC;YACD,MAAM,GAAG,GAAG;gBACV,GAAG,GAAG,CAAC,KAAK;gBACZ,IAAI,EAAE,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC;aAChC,CAAC;YACF,OAAO,GAAG,CAAC;QACb,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAEY,QAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -28,27 +28,6 @@ import { Result } from "../sdk/types/fp.js";
|
|
|
28
28
|
* @remarks
|
|
29
29
|
* The _Create Source Account_ endpoint allows you to create a representation of a bank account within Codat's domain. The company can then map the source account to an existing or new target account in their accounting software.
|
|
30
30
|
*
|
|
31
|
-
* #### Account mapping variability
|
|
32
|
-
*
|
|
33
|
-
* The method of mapping the source account to the target account varies depending on the accounting software your company uses.
|
|
34
|
-
*
|
|
35
|
-
* #### Mapping options:
|
|
36
|
-
*
|
|
37
|
-
* 1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience.
|
|
38
|
-
* 2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping.
|
|
39
|
-
* 3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself.
|
|
40
|
-
*
|
|
41
|
-
* ### Integration-specific behaviour
|
|
42
|
-
*
|
|
43
|
-
* | Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping |
|
|
44
|
-
* | --------------------- | ----------- | ---------------- | --------------------------- |
|
|
45
|
-
* | Xero | ✅ | ✅ | |
|
|
46
|
-
* | FreeAgent | ✅ | ✅ | |
|
|
47
|
-
* | Oracle NetSuite | ✅ | ✅ | |
|
|
48
|
-
* | Exact Online (NL) | ✅ | ✅ | |
|
|
49
|
-
* | QuickBooks Online | | | ✅ |
|
|
50
|
-
* | Sage | | | ✅ |
|
|
51
|
-
*
|
|
52
31
|
* > ### Versioning
|
|
53
32
|
* > If you are integrating the Bank Feeds API with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below.
|
|
54
33
|
*/
|
|
@@ -36,6 +36,27 @@ import { Result } from "../sdk/types/fp.js";
|
|
|
36
36
|
* > **For custom builds only**
|
|
37
37
|
* >
|
|
38
38
|
* > Only use this endpoint if you are building your own account management UI.
|
|
39
|
+
*
|
|
40
|
+
* #### Account mapping variability
|
|
41
|
+
*
|
|
42
|
+
* The method of mapping the source account to the target account varies depending on the accounting software your company uses.
|
|
43
|
+
*
|
|
44
|
+
* #### Mapping options:
|
|
45
|
+
*
|
|
46
|
+
* 1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience.
|
|
47
|
+
* 2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping.
|
|
48
|
+
* 3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself.
|
|
49
|
+
*
|
|
50
|
+
* ### Integration-specific behaviour
|
|
51
|
+
*
|
|
52
|
+
* | Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping |
|
|
53
|
+
* | --------------------- | ----------- | ---------------- | --------------------------- |
|
|
54
|
+
* | Xero | ✅ | ✅ | |
|
|
55
|
+
* | FreeAgent | ✅ | ✅ | |
|
|
56
|
+
* | Oracle NetSuite | ✅ | ✅ | |
|
|
57
|
+
* | Exact Online (NL) | ✅ | ✅ | |
|
|
58
|
+
* | QuickBooks Online | | | ✅ |
|
|
59
|
+
* | Sage | | | ✅ |
|
|
39
60
|
*/
|
|
40
61
|
export async function loanWritebackSourceAccountsCreateMapping(
|
|
41
62
|
client: CodatLendingCore,
|
package/src/lib/config.ts
CHANGED
|
@@ -57,7 +57,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
57
57
|
export const SDK_METADATA = {
|
|
58
58
|
language: "typescript",
|
|
59
59
|
openapiDocVersion: "3.0.0",
|
|
60
|
-
sdkVersion: "
|
|
61
|
-
genVersion: "2.
|
|
62
|
-
userAgent: "speakeasy-sdk/typescript
|
|
60
|
+
sdkVersion: "7.0.0",
|
|
61
|
+
genVersion: "2.463.0",
|
|
62
|
+
userAgent: "speakeasy-sdk/typescript 7.0.0 2.463.0 3.0.0 @codat/lending",
|
|
63
63
|
} as const;
|
package/src/lib/primitives.ts
CHANGED
|
@@ -58,3 +58,65 @@ export function remap<
|
|
|
58
58
|
|
|
59
59
|
return out;
|
|
60
60
|
}
|
|
61
|
+
|
|
62
|
+
export function combineSignals(
|
|
63
|
+
...signals: Array<AbortSignal | null | undefined>
|
|
64
|
+
): AbortSignal | null {
|
|
65
|
+
const filtered: AbortSignal[] = [];
|
|
66
|
+
for (const signal of signals) {
|
|
67
|
+
if (signal) {
|
|
68
|
+
filtered.push(signal);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
switch (filtered.length) {
|
|
73
|
+
case 0:
|
|
74
|
+
case 1:
|
|
75
|
+
return filtered[0] || null;
|
|
76
|
+
default:
|
|
77
|
+
if ("any" in AbortSignal && typeof AbortSignal.any === "function") {
|
|
78
|
+
return AbortSignal.any(filtered);
|
|
79
|
+
}
|
|
80
|
+
return abortSignalAny(filtered);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function abortSignalAny(signals: AbortSignal[]): AbortSignal {
|
|
85
|
+
const controller = new AbortController();
|
|
86
|
+
const result = controller.signal;
|
|
87
|
+
if (!signals.length) {
|
|
88
|
+
return controller.signal;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (signals.length === 1) {
|
|
92
|
+
return signals[0] || controller.signal;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
for (const signal of signals) {
|
|
96
|
+
if (signal.aborted) {
|
|
97
|
+
return signal;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function abort(this: AbortSignal) {
|
|
102
|
+
controller.abort(this.reason);
|
|
103
|
+
clean();
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const signalRefs: WeakRef<AbortSignal>[] = [];
|
|
107
|
+
function clean() {
|
|
108
|
+
for (const signalRef of signalRefs) {
|
|
109
|
+
const signal = signalRef.deref();
|
|
110
|
+
if (signal) {
|
|
111
|
+
signal.removeEventListener("abort", abort);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
for (const signal of signals) {
|
|
117
|
+
signalRefs.push(new WeakRef(signal));
|
|
118
|
+
signal.addEventListener("abort", abort);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return result;
|
|
122
|
+
}
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
*
|
|
39
39
|
* > **Company information or companies?**
|
|
40
40
|
* >
|
|
41
|
-
* > Company
|
|
41
|
+
* > Company information is standard information that is held in the accounting software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources.
|
|
42
42
|
*/
|
|
43
43
|
export type AccountingCompanyInfo = {
|
|
44
44
|
/**
|
|
@@ -16,27 +16,6 @@ export class SourceAccounts extends ClientSDK {
|
|
|
16
16
|
* @remarks
|
|
17
17
|
* The _Create Source Account_ endpoint allows you to create a representation of a bank account within Codat's domain. The company can then map the source account to an existing or new target account in their accounting software.
|
|
18
18
|
*
|
|
19
|
-
* #### Account mapping variability
|
|
20
|
-
*
|
|
21
|
-
* The method of mapping the source account to the target account varies depending on the accounting software your company uses.
|
|
22
|
-
*
|
|
23
|
-
* #### Mapping options:
|
|
24
|
-
*
|
|
25
|
-
* 1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience.
|
|
26
|
-
* 2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping.
|
|
27
|
-
* 3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself.
|
|
28
|
-
*
|
|
29
|
-
* ### Integration-specific behaviour
|
|
30
|
-
*
|
|
31
|
-
* | Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping |
|
|
32
|
-
* | --------------------- | ----------- | ---------------- | --------------------------- |
|
|
33
|
-
* | Xero | ✅ | ✅ | |
|
|
34
|
-
* | FreeAgent | ✅ | ✅ | |
|
|
35
|
-
* | Oracle NetSuite | ✅ | ✅ | |
|
|
36
|
-
* | Exact Online (NL) | ✅ | ✅ | |
|
|
37
|
-
* | QuickBooks Online | | | ✅ |
|
|
38
|
-
* | Sage | | | ✅ |
|
|
39
|
-
*
|
|
40
19
|
* > ### Versioning
|
|
41
20
|
* > If you are integrating the Bank Feeds API with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below.
|
|
42
21
|
*/
|
|
@@ -64,6 +43,27 @@ export class SourceAccounts extends ClientSDK {
|
|
|
64
43
|
* > **For custom builds only**
|
|
65
44
|
* >
|
|
66
45
|
* > Only use this endpoint if you are building your own account management UI.
|
|
46
|
+
*
|
|
47
|
+
* #### Account mapping variability
|
|
48
|
+
*
|
|
49
|
+
* The method of mapping the source account to the target account varies depending on the accounting software your company uses.
|
|
50
|
+
*
|
|
51
|
+
* #### Mapping options:
|
|
52
|
+
*
|
|
53
|
+
* 1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience.
|
|
54
|
+
* 2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping.
|
|
55
|
+
* 3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself.
|
|
56
|
+
*
|
|
57
|
+
* ### Integration-specific behaviour
|
|
58
|
+
*
|
|
59
|
+
* | Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping |
|
|
60
|
+
* | --------------------- | ----------- | ---------------- | --------------------------- |
|
|
61
|
+
* | Xero | ✅ | ✅ | |
|
|
62
|
+
* | FreeAgent | ✅ | ✅ | |
|
|
63
|
+
* | Oracle NetSuite | ✅ | ✅ | |
|
|
64
|
+
* | Exact Online (NL) | ✅ | ✅ | |
|
|
65
|
+
* | QuickBooks Online | | | ✅ |
|
|
66
|
+
* | Sage | | | ✅ |
|
|
67
67
|
*/
|
|
68
68
|
async createMapping(
|
|
69
69
|
request: operations.CreateBankAccountMappingRequest,
|
|
@@ -6,9 +6,10 @@ import { Result } from "./fp.js";
|
|
|
6
6
|
|
|
7
7
|
export type Paginator<V> = () => Promise<V & { next: Paginator<V> }> | null;
|
|
8
8
|
|
|
9
|
-
export type PageIterator<V> = V & {
|
|
9
|
+
export type PageIterator<V, PageState = unknown> = V & {
|
|
10
10
|
next: Paginator<V>;
|
|
11
11
|
[Symbol.asyncIterator]: () => AsyncIterableIterator<V>;
|
|
12
|
+
"~next"?: PageState | undefined;
|
|
12
13
|
};
|
|
13
14
|
|
|
14
15
|
export function createPageIterator<V>(
|
|
@@ -40,7 +41,9 @@ export function createPageIterator<V>(
|
|
|
40
41
|
* terminates. It is useful in paginated SDK functions that have early return
|
|
41
42
|
* paths when things go wrong.
|
|
42
43
|
*/
|
|
43
|
-
export function haltIterator<V extends object>(
|
|
44
|
+
export function haltIterator<V extends object>(
|
|
45
|
+
v: V,
|
|
46
|
+
): PageIterator<V, undefined> {
|
|
44
47
|
return {
|
|
45
48
|
...v,
|
|
46
49
|
next: () => null,
|
|
@@ -54,9 +57,9 @@ export function haltIterator<V extends object>(v: V): PageIterator<V> {
|
|
|
54
57
|
* Converts an async iterator of `Result<V, E>` into an async iterator of `V`.
|
|
55
58
|
* When error results occur, the underlying error value is thrown.
|
|
56
59
|
*/
|
|
57
|
-
export async function unwrapResultIterator<V>(
|
|
58
|
-
iteratorPromise: Promise<PageIterator<Result<V, unknown
|
|
59
|
-
): Promise<PageIterator<V>> {
|
|
60
|
+
export async function unwrapResultIterator<V, PageState>(
|
|
61
|
+
iteratorPromise: Promise<PageIterator<Result<V, unknown>, PageState>>,
|
|
62
|
+
): Promise<PageIterator<V, PageState>> {
|
|
60
63
|
const resultIter = await iteratorPromise;
|
|
61
64
|
|
|
62
65
|
if (!resultIter.ok) {
|
|
@@ -66,6 +69,7 @@ export async function unwrapResultIterator<V>(
|
|
|
66
69
|
return {
|
|
67
70
|
...resultIter.value,
|
|
68
71
|
next: unwrapPaginator(resultIter.next),
|
|
72
|
+
"~next": resultIter["~next"],
|
|
69
73
|
[Symbol.asyncIterator]: async function* paginator() {
|
|
70
74
|
for await (const page of resultIter) {
|
|
71
75
|
if (!page.ok) {
|
|
@@ -97,3 +101,5 @@ function unwrapPaginator<V>(
|
|
|
97
101
|
});
|
|
98
102
|
};
|
|
99
103
|
}
|
|
104
|
+
|
|
105
|
+
export const URL_OVERRIDE = Symbol("URL_OVERRIDE");
|