@astrada.co/ts-astrada-sdk 1.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/.editorconfig +10 -0
- package/.github/workflows/on-push.yml +65 -0
- package/.releaserc +21 -0
- package/CHANGELOG.md +13 -0
- package/README.md +1 -0
- package/dist/astrada.co-ts-astrada-sdk-1.0.0.tgz +0 -0
- package/lib/apis/CardApi.d.ts +57 -0
- package/lib/apis/CardApi.js +109 -0
- package/lib/apis/CardSubscriptionApi.d.ts +61 -0
- package/lib/apis/CardSubscriptionApi.js +133 -0
- package/lib/apis/CardholderApi.d.ts +31 -0
- package/lib/apis/CardholderApi.js +56 -0
- package/lib/apis/EnrollmentMethodsApi.d.ts +31 -0
- package/lib/apis/EnrollmentMethodsApi.js +57 -0
- package/lib/apis/NetworkBulkFeedsApi.d.ts +60 -0
- package/lib/apis/NetworkBulkFeedsApi.js +129 -0
- package/lib/apis/SubaccountsApi.d.ts +72 -0
- package/lib/apis/SubaccountsApi.js +157 -0
- package/lib/apis/TransactionMessagesApi.d.ts +31 -0
- package/lib/apis/TransactionMessagesApi.js +56 -0
- package/lib/apis/TransactionsApi.d.ts +56 -0
- package/lib/apis/TransactionsApi.js +106 -0
- package/lib/apis/WebhooksApi.d.ts +86 -0
- package/lib/apis/WebhooksApi.js +194 -0
- package/lib/apis/index.d.ts +9 -0
- package/lib/apis/index.js +27 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +21 -0
- package/lib/models/Card.d.ts +112 -0
- package/lib/models/Card.js +109 -0
- package/lib/models/CardLinks.d.ts +39 -0
- package/lib/models/CardLinks.js +53 -0
- package/lib/models/CardSubscription.d.ts +118 -0
- package/lib/models/CardSubscription.js +109 -0
- package/lib/models/CardSubscriptionLinks.d.ts +45 -0
- package/lib/models/CardSubscriptionLinks.js +57 -0
- package/lib/models/Cardholder.d.ts +64 -0
- package/lib/models/Cardholder.js +68 -0
- package/lib/models/CardholderCorporate.d.ts +38 -0
- package/lib/models/CardholderCorporate.js +50 -0
- package/lib/models/CardholderLinks.d.ts +33 -0
- package/lib/models/CardholderLinks.js +51 -0
- package/lib/models/Conflict.d.ts +57 -0
- package/lib/models/Conflict.js +67 -0
- package/lib/models/CreateNetworkBulkFeedRequest.d.ts +52 -0
- package/lib/models/CreateNetworkBulkFeedRequest.js +66 -0
- package/lib/models/CreateSubaccountRequest.d.ts +39 -0
- package/lib/models/CreateSubaccountRequest.js +55 -0
- package/lib/models/CreateWebhook201Response.d.ts +98 -0
- package/lib/models/CreateWebhook201Response.js +96 -0
- package/lib/models/CreateWebhookRequest.d.ts +67 -0
- package/lib/models/CreateWebhookRequest.js +73 -0
- package/lib/models/EnrollmentMethods200Response.d.ts +40 -0
- package/lib/models/EnrollmentMethods200Response.js +58 -0
- package/lib/models/EnrollmentMethodsRequest.d.ts +32 -0
- package/lib/models/EnrollmentMethodsRequest.js +50 -0
- package/lib/models/GetSubaccounts200Response.d.ts +40 -0
- package/lib/models/GetSubaccounts200Response.js +56 -0
- package/lib/models/GetSubaccounts200ResponseEmbedded.d.ts +33 -0
- package/lib/models/GetSubaccounts200ResponseEmbedded.js +51 -0
- package/lib/models/GetSubaccounts200ResponseLinks.d.ts +39 -0
- package/lib/models/GetSubaccounts200ResponseLinks.js +53 -0
- package/lib/models/GetTransactions200Response.d.ts +40 -0
- package/lib/models/GetTransactions200Response.js +56 -0
- package/lib/models/GetTransactions200ResponseEmbedded.d.ts +33 -0
- package/lib/models/GetTransactions200ResponseEmbedded.js +51 -0
- package/lib/models/InlineObject.d.ts +52 -0
- package/lib/models/InlineObject.js +64 -0
- package/lib/models/InlineObject1.d.ts +45 -0
- package/lib/models/InlineObject1.js +61 -0
- package/lib/models/InlineObject2.d.ts +45 -0
- package/lib/models/InlineObject2.js +61 -0
- package/lib/models/InlineObject3.d.ts +45 -0
- package/lib/models/InlineObject3.js +61 -0
- package/lib/models/InlineObject4.d.ts +57 -0
- package/lib/models/InlineObject4.js +65 -0
- package/lib/models/InlineObject5.d.ts +45 -0
- package/lib/models/InlineObject5.js +61 -0
- package/lib/models/InlineObjectErrorsInner.d.ts +38 -0
- package/lib/models/InlineObjectErrorsInner.js +54 -0
- package/lib/models/Link.d.ts +74 -0
- package/lib/models/Link.js +64 -0
- package/lib/models/ListCardSubscriptions200Response.d.ts +46 -0
- package/lib/models/ListCardSubscriptions200Response.js +60 -0
- package/lib/models/ListCardSubscriptions200ResponseEmbedded.d.ts +33 -0
- package/lib/models/ListCardSubscriptions200ResponseEmbedded.js +51 -0
- package/lib/models/ListCardSubscriptions200ResponseLinks.d.ts +57 -0
- package/lib/models/ListCardSubscriptions200ResponseLinks.js +59 -0
- package/lib/models/ListCards200Response.d.ts +46 -0
- package/lib/models/ListCards200Response.js +60 -0
- package/lib/models/ListCards200ResponseEmbedded.d.ts +33 -0
- package/lib/models/ListCards200ResponseEmbedded.js +51 -0
- package/lib/models/ListNetworkBulkFeeds200Response.d.ts +46 -0
- package/lib/models/ListNetworkBulkFeeds200Response.js +60 -0
- package/lib/models/ListNetworkBulkFeeds200ResponseEmbedded.d.ts +33 -0
- package/lib/models/ListNetworkBulkFeeds200ResponseEmbedded.js +51 -0
- package/lib/models/ListWebhooks200Response.d.ts +40 -0
- package/lib/models/ListWebhooks200Response.js +56 -0
- package/lib/models/ListWebhooks200ResponseEmbedded.d.ts +33 -0
- package/lib/models/ListWebhooks200ResponseEmbedded.js +49 -0
- package/lib/models/ListWebhooks200ResponseLinks.d.ts +39 -0
- package/lib/models/ListWebhooks200ResponseLinks.js +51 -0
- package/lib/models/NetworkBulkFeeds.d.ts +81 -0
- package/lib/models/NetworkBulkFeeds.js +83 -0
- package/lib/models/Subaccount.d.ts +70 -0
- package/lib/models/Subaccount.js +76 -0
- package/lib/models/SubaccountConfiguration.d.ts +39 -0
- package/lib/models/SubaccountConfiguration.js +51 -0
- package/lib/models/SubaccountConfigurationVISA.d.ts +43 -0
- package/lib/models/SubaccountConfigurationVISA.js +61 -0
- package/lib/models/Transaction.d.ts +140 -0
- package/lib/models/Transaction.js +126 -0
- package/lib/models/TransactionAcceptor.d.ts +50 -0
- package/lib/models/TransactionAcceptor.js +62 -0
- package/lib/models/TransactionLinks.d.ts +51 -0
- package/lib/models/TransactionLinks.js +57 -0
- package/lib/models/TransactionMessage.d.ts +184 -0
- package/lib/models/TransactionMessage.js +159 -0
- package/lib/models/TransactionMessageAcceptor.d.ts +68 -0
- package/lib/models/TransactionMessageAcceptor.js +72 -0
- package/lib/models/UnprocessableEntity.d.ts +45 -0
- package/lib/models/UnprocessableEntity.js +61 -0
- package/lib/models/UpdateCardSubscriptionRequest.d.ts +39 -0
- package/lib/models/UpdateCardSubscriptionRequest.js +55 -0
- package/lib/models/UpdateSubaccountRequest.d.ts +39 -0
- package/lib/models/UpdateSubaccountRequest.js +51 -0
- package/lib/models/UpdateWebhookRequest.d.ts +61 -0
- package/lib/models/UpdateWebhookRequest.js +65 -0
- package/lib/models/Webhook.d.ts +92 -0
- package/lib/models/Webhook.js +92 -0
- package/lib/models/index.d.ts +51 -0
- package/lib/models/index.js +69 -0
- package/lib/runtime.d.ts +215 -0
- package/lib/runtime.js +394 -0
- package/package.json +21 -0
- package/src/apis/CardApi.ts +174 -0
- package/src/apis/CardSubscriptionApi.ts +223 -0
- package/src/apis/CardholderApi.ts +93 -0
- package/src/apis/EnrollmentMethodsApi.ts +98 -0
- package/src/apis/NetworkBulkFeedsApi.ts +211 -0
- package/src/apis/SubaccountsApi.ts +253 -0
- package/src/apis/TransactionMessagesApi.ts +93 -0
- package/src/apis/TransactionsApi.ts +169 -0
- package/src/apis/WebhooksApi.ts +315 -0
- package/src/apis/index.ts +11 -0
- package/src/index.ts +5 -0
- package/src/models/Card.ts +187 -0
- package/src/models/CardLinks.ts +82 -0
- package/src/models/CardSubscription.ts +194 -0
- package/src/models/CardSubscriptionLinks.ts +91 -0
- package/src/models/Cardholder.ts +124 -0
- package/src/models/CardholderCorporate.ts +73 -0
- package/src/models/CardholderLinks.ts +74 -0
- package/src/models/Conflict.ts +102 -0
- package/src/models/CreateNetworkBulkFeedRequest.ts +95 -0
- package/src/models/CreateSubaccountRequest.ts +83 -0
- package/src/models/CreateWebhook201Response.ts +168 -0
- package/src/models/CreateWebhookRequest.ts +114 -0
- package/src/models/EnrollmentMethods200Response.ts +77 -0
- package/src/models/EnrollmentMethodsRequest.ts +66 -0
- package/src/models/GetSubaccounts200Response.ts +90 -0
- package/src/models/GetSubaccounts200ResponseEmbedded.ts +74 -0
- package/src/models/GetSubaccounts200ResponseLinks.ts +82 -0
- package/src/models/GetTransactions200Response.ts +90 -0
- package/src/models/GetTransactions200ResponseEmbedded.ts +74 -0
- package/src/models/InlineObject.ts +101 -0
- package/src/models/InlineObject1.ts +85 -0
- package/src/models/InlineObject2.ts +85 -0
- package/src/models/InlineObject3.ts +85 -0
- package/src/models/InlineObject4.ts +101 -0
- package/src/models/InlineObject5.ts +85 -0
- package/src/models/InlineObjectErrorsInner.ts +75 -0
- package/src/models/Link.ts +122 -0
- package/src/models/ListCardSubscriptions200Response.ts +99 -0
- package/src/models/ListCardSubscriptions200ResponseEmbedded.ts +74 -0
- package/src/models/ListCardSubscriptions200ResponseLinks.ts +106 -0
- package/src/models/ListCards200Response.ts +99 -0
- package/src/models/ListCards200ResponseEmbedded.ts +74 -0
- package/src/models/ListNetworkBulkFeeds200Response.ts +99 -0
- package/src/models/ListNetworkBulkFeeds200ResponseEmbedded.ts +74 -0
- package/src/models/ListWebhooks200Response.ts +90 -0
- package/src/models/ListWebhooks200ResponseEmbedded.ts +73 -0
- package/src/models/ListWebhooks200ResponseLinks.ts +81 -0
- package/src/models/NetworkBulkFeeds.ts +143 -0
- package/src/models/Subaccount.ts +135 -0
- package/src/models/SubaccountConfiguration.ts +81 -0
- package/src/models/SubaccountConfigurationVISA.ts +80 -0
- package/src/models/Transaction.ts +238 -0
- package/src/models/TransactionAcceptor.ts +93 -0
- package/src/models/TransactionLinks.ts +98 -0
- package/src/models/TransactionMessage.ts +289 -0
- package/src/models/TransactionMessageAcceptor.ts +119 -0
- package/src/models/UnprocessableEntity.ts +85 -0
- package/src/models/UpdateCardSubscriptionRequest.ts +75 -0
- package/src/models/UpdateSubaccountRequest.ts +81 -0
- package/src/models/UpdateWebhookRequest.ts +103 -0
- package/src/models/Webhook.ts +159 -0
- package/src/models/index.ts +53 -0
- package/src/runtime.ts +524 -0
- package/tsconfig.json +13 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Astrada API
|
|
6
|
+
* Welcome to our API Reference. 👋
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2024-02-28
|
|
9
|
+
* Contact: developer@astrada.co
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UpdateWebhookRequestEventTypesEnum = void 0;
|
|
17
|
+
exports.instanceOfUpdateWebhookRequest = instanceOfUpdateWebhookRequest;
|
|
18
|
+
exports.UpdateWebhookRequestFromJSON = UpdateWebhookRequestFromJSON;
|
|
19
|
+
exports.UpdateWebhookRequestFromJSONTyped = UpdateWebhookRequestFromJSONTyped;
|
|
20
|
+
exports.UpdateWebhookRequestToJSON = UpdateWebhookRequestToJSON;
|
|
21
|
+
exports.UpdateWebhookRequestToJSONTyped = UpdateWebhookRequestToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.UpdateWebhookRequestEventTypesEnum = {
|
|
26
|
+
CardsubscriptionCreated: 'cardsubscription.created',
|
|
27
|
+
CardsubscriptionUpdated: 'cardsubscription.updated',
|
|
28
|
+
TransactionCreated: 'transaction.created',
|
|
29
|
+
TransactionUpdated: 'transaction.updated',
|
|
30
|
+
TransactionmessageCreated: 'transactionmessage.created'
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the UpdateWebhookRequest interface.
|
|
34
|
+
*/
|
|
35
|
+
function instanceOfUpdateWebhookRequest(value) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
function UpdateWebhookRequestFromJSON(json) {
|
|
39
|
+
return UpdateWebhookRequestFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function UpdateWebhookRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'url': json['url'] == null ? undefined : json['url'],
|
|
47
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
48
|
+
'eventTypes': json['eventTypes'] == null ? undefined : json['eventTypes'],
|
|
49
|
+
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function UpdateWebhookRequestToJSON(json) {
|
|
53
|
+
return UpdateWebhookRequestToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
function UpdateWebhookRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
'url': value['url'],
|
|
61
|
+
'description': value['description'],
|
|
62
|
+
'eventTypes': value['eventTypes'],
|
|
63
|
+
'enabled': value['enabled'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Astrada API
|
|
3
|
+
* Welcome to our API Reference. 👋
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2024-02-28
|
|
6
|
+
* Contact: developer@astrada.co
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { CardholderLinks } from './CardholderLinks';
|
|
13
|
+
/**
|
|
14
|
+
* Astrada's Webhook resource.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface Webhook
|
|
17
|
+
*/
|
|
18
|
+
export interface Webhook {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {CardholderLinks}
|
|
22
|
+
* @memberof Webhook
|
|
23
|
+
*/
|
|
24
|
+
_links: CardholderLinks;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof Webhook
|
|
29
|
+
*/
|
|
30
|
+
id: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof Webhook
|
|
35
|
+
*/
|
|
36
|
+
url: string;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof Webhook
|
|
41
|
+
*/
|
|
42
|
+
description: string | null;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {Array<string>}
|
|
46
|
+
* @memberof Webhook
|
|
47
|
+
*/
|
|
48
|
+
eventTypes: Array<WebhookEventTypesEnum>;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof Webhook
|
|
53
|
+
*/
|
|
54
|
+
subaccountId: string;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {Date}
|
|
58
|
+
* @memberof Webhook
|
|
59
|
+
*/
|
|
60
|
+
createdAt: Date;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {Date}
|
|
64
|
+
* @memberof Webhook
|
|
65
|
+
*/
|
|
66
|
+
updatedAt: Date;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {boolean}
|
|
70
|
+
* @memberof Webhook
|
|
71
|
+
*/
|
|
72
|
+
enabled?: boolean;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* @export
|
|
76
|
+
*/
|
|
77
|
+
export declare const WebhookEventTypesEnum: {
|
|
78
|
+
readonly CardsubscriptionCreated: "cardsubscription.created";
|
|
79
|
+
readonly CardsubscriptionUpdated: "cardsubscription.updated";
|
|
80
|
+
readonly TransactionCreated: "transaction.created";
|
|
81
|
+
readonly TransactionUpdated: "transaction.updated";
|
|
82
|
+
readonly TransactionmessageCreated: "transactionmessage.created";
|
|
83
|
+
};
|
|
84
|
+
export type WebhookEventTypesEnum = typeof WebhookEventTypesEnum[keyof typeof WebhookEventTypesEnum];
|
|
85
|
+
/**
|
|
86
|
+
* Check if a given object implements the Webhook interface.
|
|
87
|
+
*/
|
|
88
|
+
export declare function instanceOfWebhook(value: object): value is Webhook;
|
|
89
|
+
export declare function WebhookFromJSON(json: any): Webhook;
|
|
90
|
+
export declare function WebhookFromJSONTyped(json: any, ignoreDiscriminator: boolean): Webhook;
|
|
91
|
+
export declare function WebhookToJSON(json: any): Webhook;
|
|
92
|
+
export declare function WebhookToJSONTyped(value?: Webhook | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Astrada API
|
|
6
|
+
* Welcome to our API Reference. 👋
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2024-02-28
|
|
9
|
+
* Contact: developer@astrada.co
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.WebhookEventTypesEnum = void 0;
|
|
17
|
+
exports.instanceOfWebhook = instanceOfWebhook;
|
|
18
|
+
exports.WebhookFromJSON = WebhookFromJSON;
|
|
19
|
+
exports.WebhookFromJSONTyped = WebhookFromJSONTyped;
|
|
20
|
+
exports.WebhookToJSON = WebhookToJSON;
|
|
21
|
+
exports.WebhookToJSONTyped = WebhookToJSONTyped;
|
|
22
|
+
const CardholderLinks_1 = require("./CardholderLinks");
|
|
23
|
+
/**
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.WebhookEventTypesEnum = {
|
|
27
|
+
CardsubscriptionCreated: 'cardsubscription.created',
|
|
28
|
+
CardsubscriptionUpdated: 'cardsubscription.updated',
|
|
29
|
+
TransactionCreated: 'transaction.created',
|
|
30
|
+
TransactionUpdated: 'transaction.updated',
|
|
31
|
+
TransactionmessageCreated: 'transactionmessage.created'
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Check if a given object implements the Webhook interface.
|
|
35
|
+
*/
|
|
36
|
+
function instanceOfWebhook(value) {
|
|
37
|
+
if (!('_links' in value) || value['_links'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
if (!('url' in value) || value['url'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
if (!('description' in value) || value['description'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
if (!('eventTypes' in value) || value['eventTypes'] === undefined)
|
|
46
|
+
return false;
|
|
47
|
+
if (!('subaccountId' in value) || value['subaccountId'] === undefined)
|
|
48
|
+
return false;
|
|
49
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
50
|
+
return false;
|
|
51
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
|
|
52
|
+
return false;
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
function WebhookFromJSON(json) {
|
|
56
|
+
return WebhookFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
function WebhookFromJSONTyped(json, ignoreDiscriminator) {
|
|
59
|
+
if (json == null) {
|
|
60
|
+
return json;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
'_links': (0, CardholderLinks_1.CardholderLinksFromJSON)(json['_links']),
|
|
64
|
+
'id': json['id'],
|
|
65
|
+
'url': json['url'],
|
|
66
|
+
'description': json['description'],
|
|
67
|
+
'eventTypes': json['eventTypes'],
|
|
68
|
+
'subaccountId': json['subaccountId'],
|
|
69
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
70
|
+
'updatedAt': (new Date(json['updatedAt'])),
|
|
71
|
+
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function WebhookToJSON(json) {
|
|
75
|
+
return WebhookToJSONTyped(json, false);
|
|
76
|
+
}
|
|
77
|
+
function WebhookToJSONTyped(value, ignoreDiscriminator = false) {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
'_links': (0, CardholderLinks_1.CardholderLinksToJSON)(value['_links']),
|
|
83
|
+
'id': value['id'],
|
|
84
|
+
'url': value['url'],
|
|
85
|
+
'description': value['description'],
|
|
86
|
+
'eventTypes': value['eventTypes'],
|
|
87
|
+
'subaccountId': value['subaccountId'],
|
|
88
|
+
'createdAt': ((value['createdAt']).toISOString()),
|
|
89
|
+
'updatedAt': ((value['updatedAt']).toISOString()),
|
|
90
|
+
'enabled': value['enabled'],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export * from './Card';
|
|
2
|
+
export * from './CardLinks';
|
|
3
|
+
export * from './CardSubscription';
|
|
4
|
+
export * from './CardSubscriptionLinks';
|
|
5
|
+
export * from './Cardholder';
|
|
6
|
+
export * from './CardholderCorporate';
|
|
7
|
+
export * from './CardholderLinks';
|
|
8
|
+
export * from './Conflict';
|
|
9
|
+
export * from './CreateNetworkBulkFeedRequest';
|
|
10
|
+
export * from './CreateSubaccountRequest';
|
|
11
|
+
export * from './CreateWebhook201Response';
|
|
12
|
+
export * from './CreateWebhookRequest';
|
|
13
|
+
export * from './EnrollmentMethods200Response';
|
|
14
|
+
export * from './EnrollmentMethodsRequest';
|
|
15
|
+
export * from './GetSubaccounts200Response';
|
|
16
|
+
export * from './GetSubaccounts200ResponseEmbedded';
|
|
17
|
+
export * from './GetSubaccounts200ResponseLinks';
|
|
18
|
+
export * from './GetTransactions200Response';
|
|
19
|
+
export * from './GetTransactions200ResponseEmbedded';
|
|
20
|
+
export * from './InlineObject';
|
|
21
|
+
export * from './InlineObject1';
|
|
22
|
+
export * from './InlineObject2';
|
|
23
|
+
export * from './InlineObject3';
|
|
24
|
+
export * from './InlineObject4';
|
|
25
|
+
export * from './InlineObject5';
|
|
26
|
+
export * from './InlineObjectErrorsInner';
|
|
27
|
+
export * from './Link';
|
|
28
|
+
export * from './ListCardSubscriptions200Response';
|
|
29
|
+
export * from './ListCardSubscriptions200ResponseEmbedded';
|
|
30
|
+
export * from './ListCardSubscriptions200ResponseLinks';
|
|
31
|
+
export * from './ListCards200Response';
|
|
32
|
+
export * from './ListCards200ResponseEmbedded';
|
|
33
|
+
export * from './ListNetworkBulkFeeds200Response';
|
|
34
|
+
export * from './ListNetworkBulkFeeds200ResponseEmbedded';
|
|
35
|
+
export * from './ListWebhooks200Response';
|
|
36
|
+
export * from './ListWebhooks200ResponseEmbedded';
|
|
37
|
+
export * from './ListWebhooks200ResponseLinks';
|
|
38
|
+
export * from './NetworkBulkFeeds';
|
|
39
|
+
export * from './Subaccount';
|
|
40
|
+
export * from './SubaccountConfiguration';
|
|
41
|
+
export * from './SubaccountConfigurationVISA';
|
|
42
|
+
export * from './Transaction';
|
|
43
|
+
export * from './TransactionAcceptor';
|
|
44
|
+
export * from './TransactionLinks';
|
|
45
|
+
export * from './TransactionMessage';
|
|
46
|
+
export * from './TransactionMessageAcceptor';
|
|
47
|
+
export * from './UnprocessableEntity';
|
|
48
|
+
export * from './UpdateCardSubscriptionRequest';
|
|
49
|
+
export * from './UpdateSubaccountRequest';
|
|
50
|
+
export * from './UpdateWebhookRequest';
|
|
51
|
+
export * from './Webhook';
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/* tslint:disable */
|
|
18
|
+
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./Card"), exports);
|
|
20
|
+
__exportStar(require("./CardLinks"), exports);
|
|
21
|
+
__exportStar(require("./CardSubscription"), exports);
|
|
22
|
+
__exportStar(require("./CardSubscriptionLinks"), exports);
|
|
23
|
+
__exportStar(require("./Cardholder"), exports);
|
|
24
|
+
__exportStar(require("./CardholderCorporate"), exports);
|
|
25
|
+
__exportStar(require("./CardholderLinks"), exports);
|
|
26
|
+
__exportStar(require("./Conflict"), exports);
|
|
27
|
+
__exportStar(require("./CreateNetworkBulkFeedRequest"), exports);
|
|
28
|
+
__exportStar(require("./CreateSubaccountRequest"), exports);
|
|
29
|
+
__exportStar(require("./CreateWebhook201Response"), exports);
|
|
30
|
+
__exportStar(require("./CreateWebhookRequest"), exports);
|
|
31
|
+
__exportStar(require("./EnrollmentMethods200Response"), exports);
|
|
32
|
+
__exportStar(require("./EnrollmentMethodsRequest"), exports);
|
|
33
|
+
__exportStar(require("./GetSubaccounts200Response"), exports);
|
|
34
|
+
__exportStar(require("./GetSubaccounts200ResponseEmbedded"), exports);
|
|
35
|
+
__exportStar(require("./GetSubaccounts200ResponseLinks"), exports);
|
|
36
|
+
__exportStar(require("./GetTransactions200Response"), exports);
|
|
37
|
+
__exportStar(require("./GetTransactions200ResponseEmbedded"), exports);
|
|
38
|
+
__exportStar(require("./InlineObject"), exports);
|
|
39
|
+
__exportStar(require("./InlineObject1"), exports);
|
|
40
|
+
__exportStar(require("./InlineObject2"), exports);
|
|
41
|
+
__exportStar(require("./InlineObject3"), exports);
|
|
42
|
+
__exportStar(require("./InlineObject4"), exports);
|
|
43
|
+
__exportStar(require("./InlineObject5"), exports);
|
|
44
|
+
__exportStar(require("./InlineObjectErrorsInner"), exports);
|
|
45
|
+
__exportStar(require("./Link"), exports);
|
|
46
|
+
__exportStar(require("./ListCardSubscriptions200Response"), exports);
|
|
47
|
+
__exportStar(require("./ListCardSubscriptions200ResponseEmbedded"), exports);
|
|
48
|
+
__exportStar(require("./ListCardSubscriptions200ResponseLinks"), exports);
|
|
49
|
+
__exportStar(require("./ListCards200Response"), exports);
|
|
50
|
+
__exportStar(require("./ListCards200ResponseEmbedded"), exports);
|
|
51
|
+
__exportStar(require("./ListNetworkBulkFeeds200Response"), exports);
|
|
52
|
+
__exportStar(require("./ListNetworkBulkFeeds200ResponseEmbedded"), exports);
|
|
53
|
+
__exportStar(require("./ListWebhooks200Response"), exports);
|
|
54
|
+
__exportStar(require("./ListWebhooks200ResponseEmbedded"), exports);
|
|
55
|
+
__exportStar(require("./ListWebhooks200ResponseLinks"), exports);
|
|
56
|
+
__exportStar(require("./NetworkBulkFeeds"), exports);
|
|
57
|
+
__exportStar(require("./Subaccount"), exports);
|
|
58
|
+
__exportStar(require("./SubaccountConfiguration"), exports);
|
|
59
|
+
__exportStar(require("./SubaccountConfigurationVISA"), exports);
|
|
60
|
+
__exportStar(require("./Transaction"), exports);
|
|
61
|
+
__exportStar(require("./TransactionAcceptor"), exports);
|
|
62
|
+
__exportStar(require("./TransactionLinks"), exports);
|
|
63
|
+
__exportStar(require("./TransactionMessage"), exports);
|
|
64
|
+
__exportStar(require("./TransactionMessageAcceptor"), exports);
|
|
65
|
+
__exportStar(require("./UnprocessableEntity"), exports);
|
|
66
|
+
__exportStar(require("./UpdateCardSubscriptionRequest"), exports);
|
|
67
|
+
__exportStar(require("./UpdateSubaccountRequest"), exports);
|
|
68
|
+
__exportStar(require("./UpdateWebhookRequest"), exports);
|
|
69
|
+
__exportStar(require("./Webhook"), exports);
|
package/lib/runtime.d.ts
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Astrada API
|
|
3
|
+
* Welcome to our API Reference. 👋
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2024-02-28
|
|
6
|
+
* Contact: developer@astrada.co
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
export declare const BASE_PATH: string;
|
|
13
|
+
export interface ConfigurationParameters {
|
|
14
|
+
accountId: string;
|
|
15
|
+
clientId: string;
|
|
16
|
+
clientSecret: string;
|
|
17
|
+
basePath?: string;
|
|
18
|
+
fetchApi?: FetchAPI;
|
|
19
|
+
middleware?: Middleware[];
|
|
20
|
+
queryParamsStringify?: (params: HTTPQuery) => string;
|
|
21
|
+
headers?: HTTPHeaders;
|
|
22
|
+
credentials?: RequestCredentials;
|
|
23
|
+
}
|
|
24
|
+
export interface AccessToken {
|
|
25
|
+
access_token: string;
|
|
26
|
+
token_type: string;
|
|
27
|
+
expires_in: number;
|
|
28
|
+
scope?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface AuthenticationParameter {
|
|
31
|
+
accountId: string;
|
|
32
|
+
clientId: string;
|
|
33
|
+
clientSecret: string;
|
|
34
|
+
fetchApi: FetchAPI;
|
|
35
|
+
basePath: string;
|
|
36
|
+
}
|
|
37
|
+
export interface AuthenticationError {
|
|
38
|
+
error: string;
|
|
39
|
+
error_description?: string;
|
|
40
|
+
status?: number;
|
|
41
|
+
}
|
|
42
|
+
export declare class Configuration {
|
|
43
|
+
private configuration;
|
|
44
|
+
private authClient;
|
|
45
|
+
constructor(configuration: ConfigurationParameters);
|
|
46
|
+
set config(configuration: Configuration);
|
|
47
|
+
get accessToken(): (name?: string, scopes?: string[]) => Promise<string>;
|
|
48
|
+
get accountId(): string;
|
|
49
|
+
get clientId(): string;
|
|
50
|
+
get clientSecret(): string;
|
|
51
|
+
get basePath(): string;
|
|
52
|
+
get fetchApi(): FetchAPI | undefined;
|
|
53
|
+
get middleware(): Middleware[];
|
|
54
|
+
get queryParamsStringify(): (params: HTTPQuery) => string;
|
|
55
|
+
get headers(): HTTPHeaders | undefined;
|
|
56
|
+
get credentials(): RequestCredentials | undefined;
|
|
57
|
+
}
|
|
58
|
+
export declare class AuthenticationClient {
|
|
59
|
+
private authConfig;
|
|
60
|
+
private cachedToken;
|
|
61
|
+
private tokenExpiry;
|
|
62
|
+
constructor(authConfig: AuthenticationParameter);
|
|
63
|
+
getAccessToken(name?: string, scopes?: string[]): Promise<string>;
|
|
64
|
+
private requestNewToken;
|
|
65
|
+
private cacheToken;
|
|
66
|
+
private isTokenValid;
|
|
67
|
+
clearCache(): void;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* This is the base class for all generated API classes.
|
|
71
|
+
*/
|
|
72
|
+
export declare class BaseAPI {
|
|
73
|
+
protected configuration: Configuration;
|
|
74
|
+
private static readonly jsonRegex;
|
|
75
|
+
private middleware;
|
|
76
|
+
private cachedToken;
|
|
77
|
+
private tokenExpiry;
|
|
78
|
+
constructor(configuration: Configuration);
|
|
79
|
+
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
|
|
80
|
+
withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T;
|
|
81
|
+
withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T;
|
|
82
|
+
/**
|
|
83
|
+
* Check if the given MIME is a JSON MIME.
|
|
84
|
+
* JSON MIME examples:
|
|
85
|
+
* application/json
|
|
86
|
+
* application/json; charset=UTF8
|
|
87
|
+
* APPLICATION/JSON
|
|
88
|
+
* application/vnd.company+json
|
|
89
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
90
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
91
|
+
*/
|
|
92
|
+
protected isJsonMime(mime: string | null | undefined): boolean;
|
|
93
|
+
protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response>;
|
|
94
|
+
private createFetchParams;
|
|
95
|
+
private fetchApi;
|
|
96
|
+
/**
|
|
97
|
+
* Create a shallow clone of `this` by constructing a new instance
|
|
98
|
+
* and then shallow cloning data members.
|
|
99
|
+
*/
|
|
100
|
+
private clone;
|
|
101
|
+
}
|
|
102
|
+
export declare class ResponseError extends Error {
|
|
103
|
+
response: Response;
|
|
104
|
+
name: "ResponseError";
|
|
105
|
+
constructor(response: Response, msg?: string);
|
|
106
|
+
}
|
|
107
|
+
export declare class FetchError extends Error {
|
|
108
|
+
cause: Error;
|
|
109
|
+
name: "FetchError";
|
|
110
|
+
constructor(cause: Error, msg?: string);
|
|
111
|
+
}
|
|
112
|
+
export declare class RequiredError extends Error {
|
|
113
|
+
field: string;
|
|
114
|
+
name: "RequiredError";
|
|
115
|
+
constructor(field: string, msg?: string);
|
|
116
|
+
}
|
|
117
|
+
export declare const COLLECTION_FORMATS: {
|
|
118
|
+
csv: string;
|
|
119
|
+
ssv: string;
|
|
120
|
+
tsv: string;
|
|
121
|
+
pipes: string;
|
|
122
|
+
};
|
|
123
|
+
export type FetchAPI = typeof fetch;
|
|
124
|
+
export type RequestCredentials = 'omit' | 'same-origin' | 'include';
|
|
125
|
+
export type Json = any;
|
|
126
|
+
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
|
127
|
+
export type HTTPHeaders = {
|
|
128
|
+
[key: string]: string;
|
|
129
|
+
};
|
|
130
|
+
export type HTTPQuery = {
|
|
131
|
+
[key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery;
|
|
132
|
+
};
|
|
133
|
+
export type HTTPBody = Json | FormData | URLSearchParams;
|
|
134
|
+
export type HTTPRequestInit = {
|
|
135
|
+
headers?: HTTPHeaders;
|
|
136
|
+
method: HTTPMethod;
|
|
137
|
+
credentials?: RequestCredentials;
|
|
138
|
+
body?: HTTPBody;
|
|
139
|
+
};
|
|
140
|
+
export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
|
|
141
|
+
export type InitOverrideFunction = (requestContext: {
|
|
142
|
+
init: HTTPRequestInit;
|
|
143
|
+
context: RequestOpts;
|
|
144
|
+
}) => Promise<RequestInit>;
|
|
145
|
+
export interface FetchParams {
|
|
146
|
+
url: string;
|
|
147
|
+
init: RequestInit;
|
|
148
|
+
}
|
|
149
|
+
export interface RequestOpts {
|
|
150
|
+
path: string;
|
|
151
|
+
method: HTTPMethod;
|
|
152
|
+
headers: HTTPHeaders;
|
|
153
|
+
query?: HTTPQuery;
|
|
154
|
+
body?: HTTPBody;
|
|
155
|
+
}
|
|
156
|
+
export declare function querystring(params: HTTPQuery, prefix?: string): string;
|
|
157
|
+
export declare function exists(json: any, key: string): boolean;
|
|
158
|
+
export declare function mapValues(data: any, fn: (item: any) => any): {
|
|
159
|
+
[key: string]: any;
|
|
160
|
+
};
|
|
161
|
+
export declare function canConsumeForm(consumes: Consume[]): boolean;
|
|
162
|
+
export interface Consume {
|
|
163
|
+
contentType: string;
|
|
164
|
+
}
|
|
165
|
+
export interface RequestContext {
|
|
166
|
+
fetch: FetchAPI;
|
|
167
|
+
url: string;
|
|
168
|
+
init: RequestInit;
|
|
169
|
+
}
|
|
170
|
+
export interface ResponseContext {
|
|
171
|
+
fetch: FetchAPI;
|
|
172
|
+
url: string;
|
|
173
|
+
init: RequestInit;
|
|
174
|
+
response: Response;
|
|
175
|
+
}
|
|
176
|
+
export interface ErrorContext {
|
|
177
|
+
fetch: FetchAPI;
|
|
178
|
+
url: string;
|
|
179
|
+
init: RequestInit;
|
|
180
|
+
error: unknown;
|
|
181
|
+
response?: Response;
|
|
182
|
+
}
|
|
183
|
+
export interface Middleware {
|
|
184
|
+
pre?(context: RequestContext): Promise<FetchParams | void>;
|
|
185
|
+
post?(context: ResponseContext): Promise<Response | void>;
|
|
186
|
+
onError?(context: ErrorContext): Promise<Response | void>;
|
|
187
|
+
}
|
|
188
|
+
export interface ApiResponse<T> {
|
|
189
|
+
raw: Response;
|
|
190
|
+
value(): Promise<T>;
|
|
191
|
+
}
|
|
192
|
+
export interface ResponseTransformer<T> {
|
|
193
|
+
(json: any): T;
|
|
194
|
+
}
|
|
195
|
+
export declare class JSONApiResponse<T> {
|
|
196
|
+
raw: Response;
|
|
197
|
+
private transformer;
|
|
198
|
+
constructor(raw: Response, transformer?: ResponseTransformer<T>);
|
|
199
|
+
value(): Promise<T>;
|
|
200
|
+
}
|
|
201
|
+
export declare class VoidApiResponse {
|
|
202
|
+
raw: Response;
|
|
203
|
+
constructor(raw: Response);
|
|
204
|
+
value(): Promise<void>;
|
|
205
|
+
}
|
|
206
|
+
export declare class BlobApiResponse {
|
|
207
|
+
raw: Response;
|
|
208
|
+
constructor(raw: Response);
|
|
209
|
+
value(): Promise<Blob>;
|
|
210
|
+
}
|
|
211
|
+
export declare class TextApiResponse {
|
|
212
|
+
raw: Response;
|
|
213
|
+
constructor(raw: Response);
|
|
214
|
+
value(): Promise<string>;
|
|
215
|
+
}
|