@moovio/sdk 26.3.0 → 26.3.2
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 +84 -80
- package/bin/mcp-server.js +556 -322
- package/bin/mcp-server.js.map +64 -65
- package/funcs/accountsCreate.d.ts +8 -10
- package/funcs/accountsCreate.d.ts.map +1 -1
- package/funcs/accountsCreate.js +8 -10
- package/funcs/accountsCreate.js.map +1 -1
- package/funcs/bankAccountsLink.d.ts +1 -1
- package/funcs/bankAccountsLink.js +1 -1
- package/funcs/capabilitiesDisable.d.ts +1 -1
- package/funcs/capabilitiesDisable.js +1 -1
- package/funcs/capabilitiesGet.d.ts +1 -1
- package/funcs/capabilitiesGet.js +1 -1
- package/funcs/capabilitiesList.d.ts +1 -1
- package/funcs/capabilitiesList.js +1 -1
- package/funcs/capabilitiesRequest.d.ts +1 -1
- package/funcs/capabilitiesRequest.js +1 -1
- package/funcs/cardIssuingGet.js +1 -1
- package/funcs/cardIssuingGet.js.map +1 -1
- package/funcs/cardIssuingGetFull.js +1 -1
- package/funcs/cardIssuingGetFull.js.map +1 -1
- package/funcs/cardIssuingList.js +1 -1
- package/funcs/cardIssuingList.js.map +1 -1
- package/funcs/cardIssuingRequest.js +1 -1
- package/funcs/cardIssuingRequest.js.map +1 -1
- package/funcs/cardIssuingUpdate.js +1 -1
- package/funcs/cardIssuingUpdate.js.map +1 -1
- package/funcs/transfersListCancellations.d.ts +17 -0
- package/funcs/transfersListCancellations.d.ts.map +1 -0
- package/funcs/transfersListCancellations.js +129 -0
- package/funcs/transfersListCancellations.js.map +1 -0
- package/hooks/types.d.ts +1 -0
- package/hooks/types.d.ts.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/encodings.js +12 -12
- package/lib/encodings.js.map +1 -1
- package/lib/matchers.js +3 -3
- package/lib/matchers.js.map +1 -1
- package/lib/primitives.d.ts +1 -0
- package/lib/primitives.d.ts.map +1 -1
- package/lib/primitives.js +18 -0
- package/lib/primitives.js.map +1 -1
- package/lib/retries.js +7 -0
- package/lib/retries.js.map +1 -1
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +50 -16
- package/lib/sdks.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +3 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/accountsCreate.d.ts.map +1 -1
- package/mcp-server/tools/accountsCreate.js +8 -10
- package/mcp-server/tools/accountsCreate.js.map +1 -1
- package/mcp-server/tools/bankAccountsLink.js +1 -1
- package/mcp-server/tools/capabilitiesDisable.js +1 -1
- package/mcp-server/tools/capabilitiesGet.js +1 -1
- package/mcp-server/tools/capabilitiesList.js +1 -1
- package/mcp-server/tools/capabilitiesRequest.js +1 -1
- package/mcp-server/tools/transfersListCancellations.d.ts +8 -0
- package/mcp-server/tools/transfersListCancellations.d.ts.map +1 -0
- package/{models/components/authorizeduser.js → mcp-server/tools/transfersListCancellations.js} +27 -22
- package/mcp-server/tools/transfersListCancellations.js.map +1 -0
- package/models/components/addcapabilities.d.ts +9 -0
- package/models/components/addcapabilities.d.ts.map +1 -1
- package/models/components/addcapabilities.js.map +1 -1
- package/models/components/capability.d.ts +7 -1
- package/models/components/capability.d.ts.map +1 -1
- package/models/components/capability.js.map +1 -1
- package/models/components/capabilityid.d.ts +15 -2
- package/models/components/capabilityid.d.ts.map +1 -1
- package/models/components/capabilityid.js +8 -1
- package/models/components/capabilityid.js.map +1 -1
- package/models/components/createaccount.d.ts +9 -0
- package/models/components/createaccount.d.ts.map +1 -1
- package/models/components/createaccount.js.map +1 -1
- package/models/components/createpaymentlink.d.ts +3 -3
- package/models/components/fullissuedcard.d.ts +26 -12
- package/models/components/fullissuedcard.d.ts.map +1 -1
- package/models/components/fullissuedcard.js +11 -5
- package/models/components/fullissuedcard.js.map +1 -1
- package/models/components/index.d.ts +1 -4
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -4
- package/models/components/index.js.map +1 -1
- package/models/components/issuedcard.d.ts +26 -12
- package/models/components/issuedcard.d.ts.map +1 -1
- package/models/components/issuedcard.js +11 -5
- package/models/components/issuedcard.js.map +1 -1
- package/models/components/issuedcardstate.d.ts +2 -8
- package/models/components/issuedcardstate.d.ts.map +1 -1
- package/models/components/issuedcardstate.js +1 -5
- package/models/components/issuedcardstate.js.map +1 -1
- package/models/components/manualtermsofservice.d.ts +1 -1
- package/models/components/manualtermsofserviceupdate.d.ts +1 -1
- package/models/components/onboardinginvite.d.ts +1 -1
- package/models/components/onboardinginviterequest.d.ts +1 -1
- package/models/components/patchtransfer.d.ts +3 -0
- package/models/components/patchtransfer.d.ts.map +1 -1
- package/models/components/patchtransfer.js.map +1 -1
- package/models/components/paymentlink.d.ts +2 -2
- package/models/components/requestcard.d.ts +14 -17
- package/models/components/requestcard.d.ts.map +1 -1
- package/models/components/requestcard.js +9 -10
- package/models/components/requestcard.js.map +1 -1
- package/models/components/termsofservice.d.ts +1 -1
- package/models/components/updateissuedcard.d.ts +33 -8
- package/models/components/updateissuedcard.d.ts.map +1 -1
- package/models/components/updateissuedcard.js +35 -6
- package/models/components/updateissuedcard.js.map +1 -1
- package/models/components/webhookdata.d.ts +3 -2
- package/models/components/webhookdata.d.ts.map +1 -1
- package/models/components/webhookdata.js +7 -4
- package/models/components/webhookdata.js.map +1 -1
- package/models/components/webhookdataauthorizationexpiring.d.ts +23 -0
- package/models/components/webhookdataauthorizationexpiring.d.ts.map +1 -0
- package/models/components/{createauthorizedusererror.js → webhookdataauthorizationexpiring.js} +18 -17
- package/models/components/webhookdataauthorizationexpiring.js.map +1 -0
- package/models/components/webhookdatacapabilityrequested.d.ts +7 -1
- package/models/components/webhookdatacapabilityrequested.d.ts.map +1 -1
- package/models/components/webhookdatacapabilityrequested.js.map +1 -1
- package/models/components/webhookdatacapabilityupdated.d.ts +7 -1
- package/models/components/webhookdatacapabilityupdated.d.ts.map +1 -1
- package/models/components/webhookdatacapabilityupdated.js.map +1 -1
- package/models/components/webhookdatasweepcreated.d.ts +5 -0
- package/models/components/webhookdatasweepcreated.d.ts.map +1 -1
- package/models/components/webhookdatasweepcreated.js +2 -0
- package/models/components/webhookdatasweepcreated.js.map +1 -1
- package/models/components/webhookdatasweepupdated.d.ts +5 -0
- package/models/components/webhookdatasweepupdated.d.ts.map +1 -1
- package/models/components/webhookdatasweepupdated.js +2 -0
- package/models/components/webhookdatasweepupdated.js.map +1 -1
- package/models/components/webhookeventtype.d.ts +1 -0
- package/models/components/webhookeventtype.d.ts.map +1 -1
- package/models/components/webhookeventtype.js +1 -0
- package/models/components/webhookeventtype.js.map +1 -1
- package/models/errors/requestcarderror.d.ts +12 -12
- package/models/errors/requestcarderror.d.ts.map +1 -1
- package/models/errors/requestcarderror.js +17 -17
- package/models/errors/requestcarderror.js.map +1 -1
- package/models/errors/updateissuedcarderror.d.ts +9 -6
- package/models/errors/updateissuedcarderror.d.ts.map +1 -1
- package/models/errors/updateissuedcarderror.js +12 -9
- package/models/errors/updateissuedcarderror.js.map +1 -1
- package/models/operations/disablecapability.d.ts +7 -1
- package/models/operations/disablecapability.d.ts.map +1 -1
- package/models/operations/disablecapability.js.map +1 -1
- package/models/operations/getcapability.d.ts +7 -1
- package/models/operations/getcapability.d.ts.map +1 -1
- package/models/operations/getcapability.js.map +1 -1
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/linkbankaccount.d.ts +1 -1
- package/models/operations/listcancellations.d.ts +45 -0
- package/models/operations/listcancellations.d.ts.map +1 -0
- package/models/operations/listcancellations.js +90 -0
- package/models/operations/listcancellations.js.map +1 -0
- package/models/operations/listissuedcards.d.ts +1 -1
- package/package.json +1 -1
- package/sdk/accounts.d.ts +8 -10
- package/sdk/accounts.d.ts.map +1 -1
- package/sdk/accounts.js +8 -10
- package/sdk/accounts.js.map +1 -1
- package/sdk/bankaccounts.d.ts +1 -1
- package/sdk/bankaccounts.js +1 -1
- package/sdk/capabilities.d.ts +4 -4
- package/sdk/capabilities.js +4 -4
- package/sdk/transfers.d.ts +7 -0
- package/sdk/transfers.d.ts.map +1 -1
- package/sdk/transfers.js +10 -0
- package/sdk/transfers.js.map +1 -1
- package/src/funcs/accountsCreate.ts +8 -10
- package/src/funcs/bankAccountsLink.ts +1 -1
- package/src/funcs/capabilitiesDisable.ts +1 -1
- package/src/funcs/capabilitiesGet.ts +1 -1
- package/src/funcs/capabilitiesList.ts +1 -1
- package/src/funcs/capabilitiesRequest.ts +1 -1
- package/src/funcs/cardIssuingGet.ts +1 -1
- package/src/funcs/cardIssuingGetFull.ts +3 -3
- package/src/funcs/cardIssuingList.ts +1 -1
- package/src/funcs/cardIssuingRequest.ts +1 -1
- package/src/funcs/cardIssuingUpdate.ts +1 -1
- package/src/funcs/transfersListCancellations.ts +181 -0
- package/src/hooks/types.ts +1 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +1 -1
- package/src/lib/matchers.ts +1 -1
- package/src/lib/primitives.ts +16 -0
- package/src/lib/retries.ts +8 -0
- package/src/lib/sdks.ts +54 -17
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/accountsCreate.ts +8 -10
- package/src/mcp-server/tools/bankAccountsLink.ts +1 -1
- package/src/mcp-server/tools/capabilitiesDisable.ts +1 -1
- package/src/mcp-server/tools/capabilitiesGet.ts +1 -1
- package/src/mcp-server/tools/capabilitiesList.ts +1 -1
- package/src/mcp-server/tools/capabilitiesRequest.ts +1 -1
- package/src/mcp-server/tools/transfersListCancellations.ts +38 -0
- package/src/models/components/addcapabilities.ts +9 -0
- package/src/models/components/capability.ts +7 -1
- package/src/models/components/capabilityid.ts +15 -2
- package/src/models/components/createaccount.ts +9 -0
- package/src/models/components/createpaymentlink.ts +3 -3
- package/src/models/components/fullissuedcard.ts +36 -20
- package/src/models/components/index.ts +1 -4
- package/src/models/components/issuedcard.ts +36 -20
- package/src/models/components/issuedcardstate.ts +2 -8
- package/src/models/components/manualtermsofservice.ts +1 -1
- package/src/models/components/manualtermsofserviceupdate.ts +1 -1
- package/src/models/components/onboardinginvite.ts +1 -1
- package/src/models/components/onboardinginviterequest.ts +1 -1
- package/src/models/components/patchtransfer.ts +3 -0
- package/src/models/components/paymentlink.ts +2 -2
- package/src/models/components/requestcard.ts +23 -34
- package/src/models/components/termsofservice.ts +1 -1
- package/src/models/components/updateissuedcard.ts +73 -17
- package/src/models/components/webhookdata.ts +18 -8
- package/src/models/components/webhookdataauthorizationexpiring.ts +65 -0
- package/src/models/components/webhookdatacapabilityrequested.ts +7 -1
- package/src/models/components/webhookdatacapabilityupdated.ts +7 -1
- package/src/models/components/webhookdatasweepcreated.ts +7 -0
- package/src/models/components/webhookdatasweepupdated.ts +7 -0
- package/src/models/components/webhookeventtype.ts +1 -0
- package/src/models/errors/requestcarderror.ts +26 -25
- package/src/models/errors/updateissuedcarderror.ts +18 -13
- package/src/models/operations/disablecapability.ts +7 -1
- package/src/models/operations/getcapability.ts +7 -1
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/linkbankaccount.ts +1 -1
- package/src/models/operations/listcancellations.ts +120 -0
- package/src/models/operations/listissuedcards.ts +1 -1
- package/src/sdk/accounts.ts +8 -10
- package/src/sdk/bankaccounts.ts +1 -1
- package/src/sdk/capabilities.ts +4 -4
- package/src/sdk/transfers.ts +18 -0
- package/src/types/async.ts +8 -7
- package/types/async.d.ts.map +1 -1
- package/types/async.js +8 -7
- package/types/async.js.map +1 -1
- package/lib/dlv.d.ts +0 -14
- package/lib/dlv.d.ts.map +0 -1
- package/lib/dlv.js +0 -49
- package/lib/dlv.js.map +0 -1
- package/lib/is-plain-object.d.ts +0 -2
- package/lib/is-plain-object.d.ts.map +0 -1
- package/lib/is-plain-object.js +0 -41
- package/lib/is-plain-object.js.map +0 -1
- package/models/components/authorizeduser.d.ts +0 -22
- package/models/components/authorizeduser.d.ts.map +0 -1
- package/models/components/authorizeduser.js.map +0 -1
- package/models/components/createauthorizeduser.d.ts +0 -25
- package/models/components/createauthorizeduser.d.ts.map +0 -1
- package/models/components/createauthorizeduser.js +0 -63
- package/models/components/createauthorizeduser.js.map +0 -1
- package/models/components/createauthorizedusererror.d.ts +0 -22
- package/models/components/createauthorizedusererror.d.ts.map +0 -1
- package/models/components/createauthorizedusererror.js.map +0 -1
- package/models/components/createauthorizeduserupdate.d.ts +0 -25
- package/models/components/createauthorizeduserupdate.d.ts.map +0 -1
- package/models/components/createauthorizeduserupdate.js +0 -63
- package/models/components/createauthorizeduserupdate.js.map +0 -1
- package/src/lib/dlv.ts +0 -53
- package/src/lib/is-plain-object.ts +0 -43
- package/src/models/components/authorizeduser.ts +0 -54
- package/src/models/components/createauthorizeduser.ts +0 -68
- package/src/models/components/createauthorizedusererror.ts +0 -65
- package/src/models/components/createauthorizeduserupdate.ts +0 -68
package/sdk/capabilities.d.ts
CHANGED
|
@@ -4,28 +4,28 @@ export declare class Capabilities extends ClientSDK {
|
|
|
4
4
|
/**
|
|
5
5
|
* Retrieve all the capabilities an account has requested.
|
|
6
6
|
*
|
|
7
|
-
* Read our [capabilities
|
|
7
|
+
* Read our [capabilities reference](https://docs.moov.io/guides/accounts/capabilities/reference/) to learn more.
|
|
8
8
|
*
|
|
9
9
|
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
10
10
|
* you'll need to specify the `/accounts/{accountID}/capabilities.read` scope.
|
|
11
11
|
*/
|
|
12
12
|
list(request: operations.ListCapabilitiesRequest, options?: RequestOptions): Promise<operations.ListCapabilitiesResponse>;
|
|
13
13
|
/**
|
|
14
|
-
* Request capabilities for a specific account. Read our [capabilities
|
|
14
|
+
* Request capabilities for a specific account. Read our [capabilities reference](https://docs.moov.io/guides/accounts/capabilities/reference/) to learn more.
|
|
15
15
|
*
|
|
16
16
|
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
17
17
|
* you'll need to specify the `/accounts/{accountID}/capabilities.write` scope.
|
|
18
18
|
*/
|
|
19
19
|
request(request: operations.RequestCapabilitiesRequest, options?: RequestOptions): Promise<operations.RequestCapabilitiesResponse>;
|
|
20
20
|
/**
|
|
21
|
-
* Retrieve a specific capability that an account has requested. Read our [capabilities
|
|
21
|
+
* Retrieve a specific capability that an account has requested. Read our [capabilities reference](https://docs.moov.io/guides/accounts/capabilities/reference/) to learn more.
|
|
22
22
|
*
|
|
23
23
|
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
24
24
|
* you'll need to specify the `/accounts/{accountID}/capabilities.read` scope.
|
|
25
25
|
*/
|
|
26
26
|
get(request: operations.GetCapabilityRequest, options?: RequestOptions): Promise<operations.GetCapabilityResponse>;
|
|
27
27
|
/**
|
|
28
|
-
* Disable a specific capability that an account has requested. Read our [capabilities
|
|
28
|
+
* Disable a specific capability that an account has requested. Read our [capabilities reference](https://docs.moov.io/guides/accounts/capabilities/reference/) to learn more.
|
|
29
29
|
*
|
|
30
30
|
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
31
31
|
* you'll need to specify the `/accounts/{accountID}/capabilities.write` scope.
|
package/sdk/capabilities.js
CHANGED
|
@@ -14,7 +14,7 @@ class Capabilities extends sdks_js_1.ClientSDK {
|
|
|
14
14
|
/**
|
|
15
15
|
* Retrieve all the capabilities an account has requested.
|
|
16
16
|
*
|
|
17
|
-
* Read our [capabilities
|
|
17
|
+
* Read our [capabilities reference](https://docs.moov.io/guides/accounts/capabilities/reference/) to learn more.
|
|
18
18
|
*
|
|
19
19
|
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
20
20
|
* you'll need to specify the `/accounts/{accountID}/capabilities.read` scope.
|
|
@@ -23,7 +23,7 @@ class Capabilities extends sdks_js_1.ClientSDK {
|
|
|
23
23
|
return (0, fp_js_1.unwrapAsync)((0, capabilitiesList_js_1.capabilitiesList)(this, request, options));
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* Request capabilities for a specific account. Read our [capabilities
|
|
26
|
+
* Request capabilities for a specific account. Read our [capabilities reference](https://docs.moov.io/guides/accounts/capabilities/reference/) to learn more.
|
|
27
27
|
*
|
|
28
28
|
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
29
29
|
* you'll need to specify the `/accounts/{accountID}/capabilities.write` scope.
|
|
@@ -32,7 +32,7 @@ class Capabilities extends sdks_js_1.ClientSDK {
|
|
|
32
32
|
return (0, fp_js_1.unwrapAsync)((0, capabilitiesRequest_js_1.capabilitiesRequest)(this, request, options));
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
* Retrieve a specific capability that an account has requested. Read our [capabilities
|
|
35
|
+
* Retrieve a specific capability that an account has requested. Read our [capabilities reference](https://docs.moov.io/guides/accounts/capabilities/reference/) to learn more.
|
|
36
36
|
*
|
|
37
37
|
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
38
38
|
* you'll need to specify the `/accounts/{accountID}/capabilities.read` scope.
|
|
@@ -41,7 +41,7 @@ class Capabilities extends sdks_js_1.ClientSDK {
|
|
|
41
41
|
return (0, fp_js_1.unwrapAsync)((0, capabilitiesGet_js_1.capabilitiesGet)(this, request, options));
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* Disable a specific capability that an account has requested. Read our [capabilities
|
|
44
|
+
* Disable a specific capability that an account has requested. Read our [capabilities reference](https://docs.moov.io/guides/accounts/capabilities/reference/) to learn more.
|
|
45
45
|
*
|
|
46
46
|
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
47
47
|
* you'll need to specify the `/accounts/{accountID}/capabilities.write` scope.
|
package/sdk/transfers.d.ts
CHANGED
|
@@ -73,6 +73,13 @@ export declare class Transfers extends ClientSDK {
|
|
|
73
73
|
* to specify the `/accounts/{accountID}/transfers.write` scope.
|
|
74
74
|
*/
|
|
75
75
|
createCancellation(request: operations.CreateCancellationRequest, options?: RequestOptions): Promise<operations.CreateCancellationResponse>;
|
|
76
|
+
/**
|
|
77
|
+
* Get a list of cancellations for a transfer.
|
|
78
|
+
*
|
|
79
|
+
* To access this endpoint using a [token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
|
|
80
|
+
* to specify the `/accounts/{accountID}/transfers.read` scope.
|
|
81
|
+
*/
|
|
82
|
+
listCancellations(request: operations.ListCancellationsRequest, options?: RequestOptions): Promise<operations.ListCancellationsResponse>;
|
|
76
83
|
/**
|
|
77
84
|
* Get details of a cancellation for a transfer.
|
|
78
85
|
*
|
package/sdk/transfers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfers.d.ts","sourceRoot":"","sources":["../src/sdk/transfers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transfers.d.ts","sourceRoot":"","sources":["../src/sdk/transfers.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,SAAU,SAAQ,SAAS;IACtC;;;;;;;;;;OAUG;IACG,eAAe,CACnB,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,6BAA6B,CAAC;IAQpD;;;;;;;OAOG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAQ7C;;;;;;;;;;;;OAYG;IACG,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC;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ACpC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC;IAQxC;;;;;;;OAOG;IACG,cAAc,CAClB,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;CAO9C"}
|
package/sdk/transfers.js
CHANGED
|
@@ -14,6 +14,7 @@ const transfersGetCancellation_js_1 = require("../funcs/transfersGetCancellation
|
|
|
14
14
|
const transfersGetRefund_js_1 = require("../funcs/transfersGetRefund.js");
|
|
15
15
|
const transfersInitiateRefund_js_1 = require("../funcs/transfersInitiateRefund.js");
|
|
16
16
|
const transfersList_js_1 = require("../funcs/transfersList.js");
|
|
17
|
+
const transfersListCancellations_js_1 = require("../funcs/transfersListCancellations.js");
|
|
17
18
|
const transfersListRefunds_js_1 = require("../funcs/transfersListRefunds.js");
|
|
18
19
|
const transfersUpdate_js_1 = require("../funcs/transfersUpdate.js");
|
|
19
20
|
const sdks_js_1 = require("../lib/sdks.js");
|
|
@@ -105,6 +106,15 @@ class Transfers extends sdks_js_1.ClientSDK {
|
|
|
105
106
|
async createCancellation(request, options) {
|
|
106
107
|
return (0, fp_js_1.unwrapAsync)((0, transfersCreateCancellation_js_1.transfersCreateCancellation)(this, request, options));
|
|
107
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Get a list of cancellations for a transfer.
|
|
111
|
+
*
|
|
112
|
+
* To access this endpoint using a [token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
|
|
113
|
+
* to specify the `/accounts/{accountID}/transfers.read` scope.
|
|
114
|
+
*/
|
|
115
|
+
async listCancellations(request, options) {
|
|
116
|
+
return (0, fp_js_1.unwrapAsync)((0, transfersListCancellations_js_1.transfersListCancellations)(this, request, options));
|
|
117
|
+
}
|
|
108
118
|
/**
|
|
109
119
|
* Get details of a cancellation for a transfer.
|
|
110
120
|
*
|
package/sdk/transfers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfers.js","sourceRoot":"","sources":["../src/sdk/transfers.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,0FAAoF;AACpF,oEAA8D;AAC9D,4FAAsF;AACtF,oFAA8E;AAC9E,sFAAgF;AAChF,8DAAwD;AACxD,sFAAgF;AAChF,0EAAoE;AACpE,oFAA8E;AAC9E,gEAA0D;AAC1D,8EAAwE;AACxE,oEAA8D;AAC9D,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,SAAU,SAAQ,mBAAS;IACtC;;;;;;;;;;OAUG;IACH,KAAK,CAAC,eAAe,CACnB,OAAgD,EAChD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,MAAM,CACV,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oCAAe,EAChC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,IAAI,CACR,OAAwC,EACxC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gCAAa,EAC9B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,iBAAiB,CACrB,OAA4C,EAC5C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,0DAA0B,EAC3C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,GAAG,CACP,OAAsC,EACtC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8BAAY,EAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CA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AAC;CACF;
|
|
1
|
+
{"version":3,"file":"transfers.js","sourceRoot":"","sources":["../src/sdk/transfers.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,0FAAoF;AACpF,oEAA8D;AAC9D,4FAAsF;AACtF,oFAA8E;AAC9E,sFAAgF;AAChF,8DAAwD;AACxD,sFAAgF;AAChF,0EAAoE;AACpE,oFAA8E;AAC9E,gEAA0D;AAC1D,0FAAoF;AACpF,8EAAwE;AACxE,oEAA8D;AAC9D,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,SAAU,SAAQ,mBAAS;IACtC;;;;;;;;;;OAUG;IACH,KAAK,CAAC,eAAe,CACnB,OAAgD,EAChD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,MAAM,CACV,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oCAAe,EAChC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,IAAI,CACR,OAAwC,EACxC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gCAAa,EAC9B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,iBAAiB,CACrB,OAA4C,EAC5C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,0DAA0B,EAC3C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,GAAG,CACP,OAAsC,EACtC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8BAAY,EAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,C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AC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,cAAc,CAClB,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oDAAuB,EACxC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAzPD,8BAyPC"}
|
|
@@ -28,21 +28,19 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
28
28
|
import { Result } from "../types/fp.js";
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* You can create
|
|
32
|
-
* information to Moov. Requirements differ per account type and requested [capabilities](https://docs.moov.io/guides/accounts/capabilities/requirements/).
|
|
31
|
+
* You can create business or individual accounts for your users (i.e., customers, merchants) by passing the required information to Moov. Requirements differ per account type and requested [capabilities](https://docs.moov.io/guides/accounts/capabilities/reference/).
|
|
33
32
|
*
|
|
34
|
-
* If you
|
|
35
|
-
* + Send Moov the user [platform terms of service agreement](https://docs.moov.io/guides/accounts/requirements/platform-agreement/) acceptance.
|
|
36
|
-
*
|
|
37
|
-
*
|
|
33
|
+
* The `transfers` capability is automatically requested for every account. If you request any capability beyond `transfers` (for example, `send-funds.ach`, `collect-funds.card-payments`), you'll need to:
|
|
34
|
+
* + Send Moov the user's [platform terms of service agreement](https://docs.moov.io/guides/accounts/requirements/platform-agreement/) acceptance. This can be done at account creation, or by [patching](https://docs.moov.io/api/moov-accounts/accounts/patch/) the account using the `termsOfService` field.
|
|
35
|
+
* + Fulfill the [verification and underwriting requirements](https://docs.moov.io/guides/accounts/requirements/) for each requested capability. A capability isn't enabled until its requirements pass — check the capability's status to see what's still outstanding.
|
|
36
|
+
*
|
|
37
|
+
* If you're creating a business account, depending on the business type, you'll also need to:
|
|
38
38
|
* + Provide [business representatives](https://docs.moov.io/api/moov-accounts/representatives/) after creating the account.
|
|
39
39
|
* + [Patch](https://docs.moov.io/api/moov-accounts/accounts/patch/) the account to indicate that business representative ownership information is complete.
|
|
40
40
|
*
|
|
41
|
-
* Visit our documentation to read more about [creating accounts](https://docs.moov.io/guides/accounts/create-accounts/) and [verification requirements](https://docs.moov.io/guides/accounts/requirements/identity-verification/).
|
|
42
|
-
* Note that the `mode` field (for production or sandbox) is only required when creating a _facilitator_ account. All non-facilitator account requests will ignore the mode field and be set to the calling facilitator's mode.
|
|
41
|
+
* Visit our documentation to read more about [creating accounts](https://docs.moov.io/guides/accounts/create-accounts/) and [verification requirements](https://docs.moov.io/guides/accounts/requirements/identity-verification/). Note that the `mode` field (for production or sandbox) is only required when creating a Partner account. All other account requests will ignore the mode field and be set to the calling Partner account's mode.
|
|
43
42
|
*
|
|
44
|
-
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
|
|
45
|
-
* to specify the `/accounts.write` scope.
|
|
43
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts.write` scope.
|
|
46
44
|
*/
|
|
47
45
|
export function accountsCreate(
|
|
48
46
|
client: MoovCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Link a bank account to an existing Moov account. Read our [bank accounts guide](https://docs.moov.io/guides/sources/bank-accounts/) to learn more.
|
|
31
31
|
*
|
|
32
32
|
* It is strongly recommended that callers include the `X-Wait-For` header, set to `payment-method`, if the newly linked
|
|
33
|
-
* bank
|
|
33
|
+
* bank account is intended to be used right away. If this header is not included, the caller will need to poll the [List Payment
|
|
34
34
|
* Methods](https://docs.moov.io/api/sources/payment-methods/list/)
|
|
35
35
|
* endpoint to wait for the new payment methods to be available for use.
|
|
36
36
|
*
|
|
@@ -27,7 +27,7 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
27
27
|
import { Result } from "../types/fp.js";
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* Disable a specific capability that an account has requested. Read our [capabilities
|
|
30
|
+
* Disable a specific capability that an account has requested. Read our [capabilities reference](https://docs.moov.io/guides/accounts/capabilities/reference/) to learn more.
|
|
31
31
|
*
|
|
32
32
|
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
33
33
|
* you'll need to specify the `/accounts/{accountID}/capabilities.write` scope.
|
|
@@ -26,7 +26,7 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
26
26
|
import { Result } from "../types/fp.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* Retrieve a specific capability that an account has requested. Read our [capabilities
|
|
29
|
+
* Retrieve a specific capability that an account has requested. Read our [capabilities reference](https://docs.moov.io/guides/accounts/capabilities/reference/) to learn more.
|
|
30
30
|
*
|
|
31
31
|
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
32
32
|
* you'll need to specify the `/accounts/{accountID}/capabilities.read` scope.
|
|
@@ -28,7 +28,7 @@ import { Result } from "../types/fp.js";
|
|
|
28
28
|
/**
|
|
29
29
|
* Retrieve all the capabilities an account has requested.
|
|
30
30
|
*
|
|
31
|
-
* Read our [capabilities
|
|
31
|
+
* Read our [capabilities reference](https://docs.moov.io/guides/accounts/capabilities/reference/) to learn more.
|
|
32
32
|
*
|
|
33
33
|
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
34
34
|
* you'll need to specify the `/accounts/{accountID}/capabilities.read` scope.
|
|
@@ -27,7 +27,7 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
27
27
|
import { Result } from "../types/fp.js";
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* Request capabilities for a specific account. Read our [capabilities
|
|
30
|
+
* Request capabilities for a specific account. Read our [capabilities reference](https://docs.moov.io/guides/accounts/capabilities/reference/) to learn more.
|
|
31
31
|
*
|
|
32
32
|
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
33
33
|
* you'll need to specify the `/accounts/{accountID}/capabilities.write` scope.
|
|
@@ -98,9 +98,9 @@ async function $do(
|
|
|
98
98
|
charEncoding: "percent",
|
|
99
99
|
}),
|
|
100
100
|
};
|
|
101
|
-
const path = pathToFunc(
|
|
102
|
-
|
|
103
|
-
)
|
|
101
|
+
const path = pathToFunc("/issuing/{accountID}/cards/{issuedCardID}/details")(
|
|
102
|
+
pathParams,
|
|
103
|
+
);
|
|
104
104
|
|
|
105
105
|
const headers = new Headers(compactMap({
|
|
106
106
|
Accept: "application/json",
|
|
@@ -92,7 +92,7 @@ async function $do(
|
|
|
92
92
|
charEncoding: "percent",
|
|
93
93
|
}),
|
|
94
94
|
};
|
|
95
|
-
const path = pathToFunc("/issuing/{accountID}/
|
|
95
|
+
const path = pathToFunc("/issuing/{accountID}/cards")(pathParams);
|
|
96
96
|
|
|
97
97
|
const query = encodeFormQuery({
|
|
98
98
|
"count": payload.count,
|
|
@@ -97,7 +97,7 @@ async function $do(
|
|
|
97
97
|
charEncoding: "percent",
|
|
98
98
|
}),
|
|
99
99
|
};
|
|
100
|
-
const path = pathToFunc("/issuing/{accountID}/
|
|
100
|
+
const path = pathToFunc("/issuing/{accountID}/cards")(pathParams);
|
|
101
101
|
|
|
102
102
|
const headers = new Headers(compactMap({
|
|
103
103
|
"Content-Type": "application/json",
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { MoovCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import { MoovError } from "../models/errors/mooverror.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Get a list of cancellations for a transfer.
|
|
30
|
+
*
|
|
31
|
+
* To access this endpoint using a [token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
|
|
32
|
+
* to specify the `/accounts/{accountID}/transfers.read` scope.
|
|
33
|
+
*/
|
|
34
|
+
export function transfersListCancellations(
|
|
35
|
+
client: MoovCore,
|
|
36
|
+
request: operations.ListCancellationsRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
operations.ListCancellationsResponse,
|
|
41
|
+
| MoovError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
49
|
+
>
|
|
50
|
+
> {
|
|
51
|
+
return new APIPromise($do(
|
|
52
|
+
client,
|
|
53
|
+
request,
|
|
54
|
+
options,
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function $do(
|
|
59
|
+
client: MoovCore,
|
|
60
|
+
request: operations.ListCancellationsRequest,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<
|
|
63
|
+
[
|
|
64
|
+
Result<
|
|
65
|
+
operations.ListCancellationsResponse,
|
|
66
|
+
| MoovError
|
|
67
|
+
| ResponseValidationError
|
|
68
|
+
| ConnectionError
|
|
69
|
+
| RequestAbortedError
|
|
70
|
+
| RequestTimeoutError
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| UnexpectedClientError
|
|
73
|
+
| SDKValidationError
|
|
74
|
+
>,
|
|
75
|
+
APICall,
|
|
76
|
+
]
|
|
77
|
+
> {
|
|
78
|
+
const parsed = safeParse(
|
|
79
|
+
request,
|
|
80
|
+
(value) => operations.ListCancellationsRequest$outboundSchema.parse(value),
|
|
81
|
+
"Input validation failed",
|
|
82
|
+
);
|
|
83
|
+
if (!parsed.ok) {
|
|
84
|
+
return [parsed, { status: "invalid" }];
|
|
85
|
+
}
|
|
86
|
+
const payload = parsed.value;
|
|
87
|
+
const body = null;
|
|
88
|
+
|
|
89
|
+
const pathParams = {
|
|
90
|
+
accountID: encodeSimple("accountID", payload.accountID, {
|
|
91
|
+
explode: false,
|
|
92
|
+
charEncoding: "percent",
|
|
93
|
+
}),
|
|
94
|
+
transferID: encodeSimple("transferID", payload.transferID, {
|
|
95
|
+
explode: false,
|
|
96
|
+
charEncoding: "percent",
|
|
97
|
+
}),
|
|
98
|
+
};
|
|
99
|
+
const path = pathToFunc(
|
|
100
|
+
"/accounts/{accountID}/transfers/{transferID}/cancellations",
|
|
101
|
+
)(pathParams);
|
|
102
|
+
|
|
103
|
+
const headers = new Headers(compactMap({
|
|
104
|
+
Accept: "application/json",
|
|
105
|
+
}));
|
|
106
|
+
|
|
107
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
108
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
109
|
+
|
|
110
|
+
const context = {
|
|
111
|
+
options: client._options,
|
|
112
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
113
|
+
operationID: "listCancellations",
|
|
114
|
+
oAuth2Scopes: null,
|
|
115
|
+
|
|
116
|
+
resolvedSecurity: requestSecurity,
|
|
117
|
+
|
|
118
|
+
securitySource: client._options.security,
|
|
119
|
+
retryConfig: options?.retries
|
|
120
|
+
|| client._options.retryConfig
|
|
121
|
+
|| { strategy: "none" },
|
|
122
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const requestRes = client._createRequest(context, {
|
|
126
|
+
security: requestSecurity,
|
|
127
|
+
method: "GET",
|
|
128
|
+
baseURL: options?.serverURL,
|
|
129
|
+
path: path,
|
|
130
|
+
headers: headers,
|
|
131
|
+
body: body,
|
|
132
|
+
userAgent: client._options.userAgent,
|
|
133
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
134
|
+
}, options);
|
|
135
|
+
if (!requestRes.ok) {
|
|
136
|
+
return [requestRes, { status: "invalid" }];
|
|
137
|
+
}
|
|
138
|
+
const req = requestRes.value;
|
|
139
|
+
|
|
140
|
+
const doResult = await client._do(req, {
|
|
141
|
+
context,
|
|
142
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
143
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
144
|
+
retryConfig: context.retryConfig,
|
|
145
|
+
retryCodes: context.retryCodes,
|
|
146
|
+
});
|
|
147
|
+
if (!doResult.ok) {
|
|
148
|
+
return [doResult, { status: "request-error", request: req }];
|
|
149
|
+
}
|
|
150
|
+
const response = doResult.value;
|
|
151
|
+
|
|
152
|
+
const responseFields = {
|
|
153
|
+
HttpMeta: { Response: response, Request: req },
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
const [result] = await M.match<
|
|
157
|
+
operations.ListCancellationsResponse,
|
|
158
|
+
| MoovError
|
|
159
|
+
| ResponseValidationError
|
|
160
|
+
| ConnectionError
|
|
161
|
+
| RequestAbortedError
|
|
162
|
+
| RequestTimeoutError
|
|
163
|
+
| InvalidRequestError
|
|
164
|
+
| UnexpectedClientError
|
|
165
|
+
| SDKValidationError
|
|
166
|
+
>(
|
|
167
|
+
M.json(200, operations.ListCancellationsResponse$inboundSchema, {
|
|
168
|
+
hdrs: true,
|
|
169
|
+
key: "Result",
|
|
170
|
+
}),
|
|
171
|
+
M.fail([401, 403, 429]),
|
|
172
|
+
M.fail([500, 504]),
|
|
173
|
+
M.fail("4XX"),
|
|
174
|
+
M.fail("5XX"),
|
|
175
|
+
)(response, req, { extraFields: responseFields });
|
|
176
|
+
if (!result.ok) {
|
|
177
|
+
return [result, { status: "complete", request: req, response }];
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return [result, { status: "complete", request: req, response }];
|
|
181
|
+
}
|
package/src/hooks/types.ts
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -73,7 +73,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
73
73
|
export const SDK_METADATA = {
|
|
74
74
|
language: "typescript",
|
|
75
75
|
openapiDocVersion: "v2026.01.00",
|
|
76
|
-
sdkVersion: "26.3.
|
|
77
|
-
genVersion: "2.
|
|
78
|
-
userAgent: "speakeasy-sdk/typescript 26.3.
|
|
76
|
+
sdkVersion: "26.3.2",
|
|
77
|
+
genVersion: "2.916.2",
|
|
78
|
+
userAgent: "speakeasy-sdk/typescript 26.3.2 2.916.2 v2026.01.00 @moovio/sdk",
|
|
79
79
|
} as const;
|
package/src/lib/encodings.ts
CHANGED
package/src/lib/matchers.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { APIError } from "../models/errors/apierror.js";
|
|
|
6
6
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
7
|
import { ERR, OK, Result } from "../types/fp.js";
|
|
8
8
|
import { matchResponse, matchStatusCode, StatusCodePredicate } from "./http.js";
|
|
9
|
-
import { isPlainObject } from "./
|
|
9
|
+
import { isPlainObject } from "./primitives.js";
|
|
10
10
|
|
|
11
11
|
export type Encoding =
|
|
12
12
|
| "jsonl"
|
package/src/lib/primitives.ts
CHANGED
|
@@ -148,3 +148,19 @@ export function allRequired<V extends Record<string, unknown>>(
|
|
|
148
148
|
|
|
149
149
|
return v as ReturnType<typeof allRequired<V>>;
|
|
150
150
|
}
|
|
151
|
+
|
|
152
|
+
export function isPlainObject(
|
|
153
|
+
value: unknown,
|
|
154
|
+
): value is Record<string, unknown> {
|
|
155
|
+
if (value === null || typeof value !== "object") return false;
|
|
156
|
+
if (Object.prototype.toString.call(value) !== "[object Object]") return false;
|
|
157
|
+
const proto = Object.getPrototypeOf(value);
|
|
158
|
+
if (proto === null || proto === Object.prototype) return true;
|
|
159
|
+
// cross-realm plain objects (vm contexts, iframes) inherit from a
|
|
160
|
+
// different realm's Object.prototype, which itself has a null prototype
|
|
161
|
+
try {
|
|
162
|
+
return Object.getPrototypeOf(proto) === null;
|
|
163
|
+
} catch {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
}
|
package/src/lib/retries.ts
CHANGED
|
@@ -194,6 +194,14 @@ async function retryBackoff(
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
function retryIntervalFromResponse(res: Response): number {
|
|
197
|
+
const retryAfterMsVal = res.headers.get("retry-after-ms");
|
|
198
|
+
if (retryAfterMsVal) {
|
|
199
|
+
const parsedMs = Number(retryAfterMsVal);
|
|
200
|
+
if (Number.isFinite(parsedMs) && parsedMs >= 0) {
|
|
201
|
+
return parsedMs;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
197
205
|
const retryVal = res.headers.get("retry-after") || "";
|
|
198
206
|
if (!retryVal) {
|
|
199
207
|
return 0;
|
package/src/lib/sdks.ts
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
matchContentType,
|
|
24
24
|
} from "./http.js";
|
|
25
25
|
import { Logger } from "./logger.js";
|
|
26
|
+
import { combineSignals } from "./primitives.js";
|
|
26
27
|
import { retry, RetryConfig } from "./retries.js";
|
|
27
28
|
import { SecurityState } from "./security.js";
|
|
28
29
|
|
|
@@ -127,27 +128,55 @@ export class ClientSDK {
|
|
|
127
128
|
if (path) {
|
|
128
129
|
baseURL.pathname = baseURL.pathname.replace(/\/+$/, "") + "/";
|
|
129
130
|
reqURL = new URL(path, baseURL);
|
|
131
|
+
if (!reqURL.search && baseURL.search) {
|
|
132
|
+
reqURL.search = baseURL.search;
|
|
133
|
+
}
|
|
130
134
|
} else {
|
|
131
135
|
reqURL = baseURL;
|
|
132
136
|
}
|
|
133
137
|
reqURL.hash = "";
|
|
134
138
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
if (typeof q !== "undefined") {
|
|
141
|
-
secQuery.push(q);
|
|
139
|
+
// Appends already-encoded query pairs to a query string, replacing any
|
|
140
|
+
// existing pairs with the same key so later sources take precedence.
|
|
141
|
+
const mergeQuery = (current: string, additions: string): string => {
|
|
142
|
+
if (!additions) {
|
|
143
|
+
return current;
|
|
142
144
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
const additionKeys = new Set(
|
|
146
|
+
additions
|
|
147
|
+
.split("&")
|
|
148
|
+
.filter((pair) => pair !== "")
|
|
149
|
+
.map((pair) => pair.split("=")[0] ?? ""),
|
|
150
|
+
);
|
|
151
|
+
const kept = current.split("&").filter((pair) => {
|
|
152
|
+
return pair !== "" && !additionKeys.has(pair.split("=")[0] ?? "");
|
|
153
|
+
});
|
|
154
|
+
return [...kept, additions].join("&");
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
const encodeQueryRecord = (record: Record<string, unknown>): string => {
|
|
158
|
+
return Object.entries(record)
|
|
159
|
+
.map(([k, v]) => {
|
|
160
|
+
if (v == null) {
|
|
161
|
+
return undefined;
|
|
162
|
+
}
|
|
163
|
+
const value = v;
|
|
164
|
+
return encodeForm(k, value, {
|
|
165
|
+
explode: Array.isArray(value),
|
|
166
|
+
charEncoding: "percent",
|
|
167
|
+
});
|
|
168
|
+
})
|
|
169
|
+
.filter((pair): pair is string => typeof pair !== "undefined")
|
|
170
|
+
.join("&");
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
const finalQuery = [
|
|
174
|
+
query || "",
|
|
175
|
+
encodeQueryRecord(security?.queryParams || {}),
|
|
176
|
+
].reduce(mergeQuery, reqURL.search.slice(1));
|
|
147
177
|
|
|
148
178
|
if (finalQuery) {
|
|
149
|
-
|
|
150
|
-
reqURL.search = `?${q}`;
|
|
179
|
+
reqURL.search = `?${finalQuery}`;
|
|
151
180
|
}
|
|
152
181
|
|
|
153
182
|
const headers = new Headers(opHeaders);
|
|
@@ -193,9 +222,8 @@ export class ClientSDK {
|
|
|
193
222
|
...options?.fetchOptions,
|
|
194
223
|
...options,
|
|
195
224
|
};
|
|
196
|
-
if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) {
|
|
197
|
-
|
|
198
|
-
fetchOptions.signal = timeoutSignal;
|
|
225
|
+
if (!fetchOptions?.signal && conf.timeoutMs != null && conf.timeoutMs > 0) {
|
|
226
|
+
context.timeoutMs = conf.timeoutMs;
|
|
199
227
|
}
|
|
200
228
|
|
|
201
229
|
if (conf.body instanceof ReadableStream) {
|
|
@@ -242,10 +270,19 @@ export class ClientSDK {
|
|
|
242
270
|
>
|
|
243
271
|
> {
|
|
244
272
|
const { context, isErrorStatusCode } = options;
|
|
273
|
+
const timeoutMs = context.timeoutMs;
|
|
245
274
|
|
|
246
275
|
return retry(
|
|
247
276
|
async () => {
|
|
248
|
-
const
|
|
277
|
+
const cloned = request.clone();
|
|
278
|
+
let attempt = cloned;
|
|
279
|
+
if (timeoutMs != null && timeoutMs > 0) {
|
|
280
|
+
const timeoutSignal = AbortSignal.timeout(timeoutMs);
|
|
281
|
+
const combined = combineSignals(cloned.signal, timeoutSignal)
|
|
282
|
+
?? timeoutSignal;
|
|
283
|
+
attempt = new Request(cloned, { signal: combined });
|
|
284
|
+
}
|
|
285
|
+
const req = await this.#hooks.beforeRequest(context, attempt);
|
|
249
286
|
await logRequest(this.#logger, req).catch((e) =>
|
|
250
287
|
this.#logger?.log("Failed to log request:", e)
|
|
251
288
|
);
|