@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,60 @@
|
|
|
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 * as runtime from '../runtime';
|
|
13
|
+
import type { CreateNetworkBulkFeedRequest, ListNetworkBulkFeeds200Response, NetworkBulkFeeds } from '../models/index';
|
|
14
|
+
export interface CreateNetworkBulkFeedOperationRequest {
|
|
15
|
+
createNetworkBulkFeedRequest: CreateNetworkBulkFeedRequest;
|
|
16
|
+
}
|
|
17
|
+
export interface GetNetworkBulkFeedRequest {
|
|
18
|
+
networkBulkFeedId: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ListNetworkBulkFeedsRequest {
|
|
21
|
+
networkReference?: string;
|
|
22
|
+
subaccountId?: string;
|
|
23
|
+
limit?: number;
|
|
24
|
+
offset?: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
export declare class NetworkBulkFeedsApi extends runtime.BaseAPI {
|
|
30
|
+
/**
|
|
31
|
+
* Registers a new feed for network bulk
|
|
32
|
+
* Create network bulk feed
|
|
33
|
+
*/
|
|
34
|
+
createNetworkBulkFeedRaw(requestParameters: CreateNetworkBulkFeedOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NetworkBulkFeeds>>;
|
|
35
|
+
/**
|
|
36
|
+
* Registers a new feed for network bulk
|
|
37
|
+
* Create network bulk feed
|
|
38
|
+
*/
|
|
39
|
+
createNetworkBulkFeed(requestParameters: CreateNetworkBulkFeedOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NetworkBulkFeeds>;
|
|
40
|
+
/**
|
|
41
|
+
* Returns detailed information about a specific network bulk feed by its identifier.
|
|
42
|
+
* Retrieve a network bulk feed
|
|
43
|
+
*/
|
|
44
|
+
getNetworkBulkFeedRaw(requestParameters: GetNetworkBulkFeedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NetworkBulkFeeds>>;
|
|
45
|
+
/**
|
|
46
|
+
* Returns detailed information about a specific network bulk feed by its identifier.
|
|
47
|
+
* Retrieve a network bulk feed
|
|
48
|
+
*/
|
|
49
|
+
getNetworkBulkFeed(requestParameters: GetNetworkBulkFeedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NetworkBulkFeeds>;
|
|
50
|
+
/**
|
|
51
|
+
* Returns all network bulk feeds under the account. By default, `GET /network-bulk-feeds` returns network bulk feeds ordered by the latest `createdAt`. This endpoint supports [offset-based pagination](https://docs.astrada.co/reference/pagination).
|
|
52
|
+
* List network bulk feed
|
|
53
|
+
*/
|
|
54
|
+
listNetworkBulkFeedsRaw(requestParameters: ListNetworkBulkFeedsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListNetworkBulkFeeds200Response>>;
|
|
55
|
+
/**
|
|
56
|
+
* Returns all network bulk feeds under the account. By default, `GET /network-bulk-feeds` returns network bulk feeds ordered by the latest `createdAt`. This endpoint supports [offset-based pagination](https://docs.astrada.co/reference/pagination).
|
|
57
|
+
* List network bulk feed
|
|
58
|
+
*/
|
|
59
|
+
listNetworkBulkFeeds(requestParameters?: ListNetworkBulkFeedsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListNetworkBulkFeeds200Response>;
|
|
60
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
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.NetworkBulkFeedsApi = void 0;
|
|
17
|
+
const runtime = require("../runtime");
|
|
18
|
+
const index_1 = require("../models/index");
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
class NetworkBulkFeedsApi extends runtime.BaseAPI {
|
|
23
|
+
/**
|
|
24
|
+
* Registers a new feed for network bulk
|
|
25
|
+
* Create network bulk feed
|
|
26
|
+
*/
|
|
27
|
+
async createNetworkBulkFeedRaw(requestParameters, initOverrides) {
|
|
28
|
+
if (requestParameters['createNetworkBulkFeedRequest'] == null) {
|
|
29
|
+
throw new runtime.RequiredError('createNetworkBulkFeedRequest', 'Required parameter "createNetworkBulkFeedRequest" was null or undefined when calling createNetworkBulkFeed().');
|
|
30
|
+
}
|
|
31
|
+
const queryParameters = {};
|
|
32
|
+
const headerParameters = {};
|
|
33
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
34
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
35
|
+
// oauth required
|
|
36
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["network-bulk-feeds:write"]);
|
|
37
|
+
}
|
|
38
|
+
let urlPath = `/network-bulk-feeds`;
|
|
39
|
+
const response = await this.request({
|
|
40
|
+
path: urlPath,
|
|
41
|
+
method: 'POST',
|
|
42
|
+
headers: headerParameters,
|
|
43
|
+
query: queryParameters,
|
|
44
|
+
body: (0, index_1.CreateNetworkBulkFeedRequestToJSON)(requestParameters['createNetworkBulkFeedRequest']),
|
|
45
|
+
}, initOverrides);
|
|
46
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.NetworkBulkFeedsFromJSON)(jsonValue));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Registers a new feed for network bulk
|
|
50
|
+
* Create network bulk feed
|
|
51
|
+
*/
|
|
52
|
+
async createNetworkBulkFeed(requestParameters, initOverrides) {
|
|
53
|
+
const response = await this.createNetworkBulkFeedRaw(requestParameters, initOverrides);
|
|
54
|
+
return await response.value();
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Returns detailed information about a specific network bulk feed by its identifier.
|
|
58
|
+
* Retrieve a network bulk feed
|
|
59
|
+
*/
|
|
60
|
+
async getNetworkBulkFeedRaw(requestParameters, initOverrides) {
|
|
61
|
+
if (requestParameters['networkBulkFeedId'] == null) {
|
|
62
|
+
throw new runtime.RequiredError('networkBulkFeedId', 'Required parameter "networkBulkFeedId" was null or undefined when calling getNetworkBulkFeed().');
|
|
63
|
+
}
|
|
64
|
+
const queryParameters = {};
|
|
65
|
+
const headerParameters = {};
|
|
66
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
67
|
+
// oauth required
|
|
68
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["network-bulk-feeds:read"]);
|
|
69
|
+
}
|
|
70
|
+
let urlPath = `/network-bulk-feeds/{networkBulkFeedId}`;
|
|
71
|
+
urlPath = urlPath.replace(`{${"networkBulkFeedId"}}`, encodeURIComponent(String(requestParameters['networkBulkFeedId'])));
|
|
72
|
+
const response = await this.request({
|
|
73
|
+
path: urlPath,
|
|
74
|
+
method: 'GET',
|
|
75
|
+
headers: headerParameters,
|
|
76
|
+
query: queryParameters,
|
|
77
|
+
}, initOverrides);
|
|
78
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.NetworkBulkFeedsFromJSON)(jsonValue));
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Returns detailed information about a specific network bulk feed by its identifier.
|
|
82
|
+
* Retrieve a network bulk feed
|
|
83
|
+
*/
|
|
84
|
+
async getNetworkBulkFeed(requestParameters, initOverrides) {
|
|
85
|
+
const response = await this.getNetworkBulkFeedRaw(requestParameters, initOverrides);
|
|
86
|
+
return await response.value();
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Returns all network bulk feeds under the account. By default, `GET /network-bulk-feeds` returns network bulk feeds ordered by the latest `createdAt`. This endpoint supports [offset-based pagination](https://docs.astrada.co/reference/pagination).
|
|
90
|
+
* List network bulk feed
|
|
91
|
+
*/
|
|
92
|
+
async listNetworkBulkFeedsRaw(requestParameters, initOverrides) {
|
|
93
|
+
const queryParameters = {};
|
|
94
|
+
if (requestParameters['networkReference'] != null) {
|
|
95
|
+
queryParameters['networkReference'] = requestParameters['networkReference'];
|
|
96
|
+
}
|
|
97
|
+
if (requestParameters['subaccountId'] != null) {
|
|
98
|
+
queryParameters['subaccountId'] = requestParameters['subaccountId'];
|
|
99
|
+
}
|
|
100
|
+
if (requestParameters['limit'] != null) {
|
|
101
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
102
|
+
}
|
|
103
|
+
if (requestParameters['offset'] != null) {
|
|
104
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
105
|
+
}
|
|
106
|
+
const headerParameters = {};
|
|
107
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
108
|
+
// oauth required
|
|
109
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["network-bulk-feeds:read"]);
|
|
110
|
+
}
|
|
111
|
+
let urlPath = `/network-bulk-feeds`;
|
|
112
|
+
const response = await this.request({
|
|
113
|
+
path: urlPath,
|
|
114
|
+
method: 'GET',
|
|
115
|
+
headers: headerParameters,
|
|
116
|
+
query: queryParameters,
|
|
117
|
+
}, initOverrides);
|
|
118
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListNetworkBulkFeeds200ResponseFromJSON)(jsonValue));
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Returns all network bulk feeds under the account. By default, `GET /network-bulk-feeds` returns network bulk feeds ordered by the latest `createdAt`. This endpoint supports [offset-based pagination](https://docs.astrada.co/reference/pagination).
|
|
122
|
+
* List network bulk feed
|
|
123
|
+
*/
|
|
124
|
+
async listNetworkBulkFeeds(requestParameters = {}, initOverrides) {
|
|
125
|
+
const response = await this.listNetworkBulkFeedsRaw(requestParameters, initOverrides);
|
|
126
|
+
return await response.value();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
exports.NetworkBulkFeedsApi = NetworkBulkFeedsApi;
|
|
@@ -0,0 +1,72 @@
|
|
|
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 * as runtime from '../runtime';
|
|
13
|
+
import type { CreateSubaccountRequest, GetSubaccounts200Response, Subaccount, UpdateSubaccountRequest } from '../models/index';
|
|
14
|
+
export interface CreateSubaccountOperationRequest {
|
|
15
|
+
createSubaccountRequest?: CreateSubaccountRequest;
|
|
16
|
+
}
|
|
17
|
+
export interface GetSubaccountRequest {
|
|
18
|
+
subaccountId: string;
|
|
19
|
+
}
|
|
20
|
+
export interface GetSubaccountsRequest {
|
|
21
|
+
cursor?: string;
|
|
22
|
+
limit?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface UpdateSubaccountOperationRequest {
|
|
25
|
+
subaccountId: string;
|
|
26
|
+
updateSubaccountRequest: UpdateSubaccountRequest;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
export declare class SubaccountsApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Creates a new subaccount, allowing you to set network and regional configurations.
|
|
34
|
+
* Create subaccount
|
|
35
|
+
*/
|
|
36
|
+
createSubaccountRaw(requestParameters: CreateSubaccountOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Subaccount>>;
|
|
37
|
+
/**
|
|
38
|
+
* Creates a new subaccount, allowing you to set network and regional configurations.
|
|
39
|
+
* Create subaccount
|
|
40
|
+
*/
|
|
41
|
+
createSubaccount(requestParameters?: CreateSubaccountOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Subaccount>;
|
|
42
|
+
/**
|
|
43
|
+
* Returns detailed information about a specific subaccount by its identifier, including configuration details and associated data.
|
|
44
|
+
* Retrieve subaccount
|
|
45
|
+
*/
|
|
46
|
+
getSubaccountRaw(requestParameters: GetSubaccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Subaccount>>;
|
|
47
|
+
/**
|
|
48
|
+
* Returns detailed information about a specific subaccount by its identifier, including configuration details and associated data.
|
|
49
|
+
* Retrieve subaccount
|
|
50
|
+
*/
|
|
51
|
+
getSubaccount(requestParameters: GetSubaccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Subaccount>;
|
|
52
|
+
/**
|
|
53
|
+
* Returns a list of all subaccounts associated with the account. This endpoint supports [cursor-based pagination](https://docs.astrada.co/reference/pagination).
|
|
54
|
+
* List subaccounts
|
|
55
|
+
*/
|
|
56
|
+
getSubaccountsRaw(requestParameters: GetSubaccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSubaccounts200Response>>;
|
|
57
|
+
/**
|
|
58
|
+
* Returns a list of all subaccounts associated with the account. This endpoint supports [cursor-based pagination](https://docs.astrada.co/reference/pagination).
|
|
59
|
+
* List subaccounts
|
|
60
|
+
*/
|
|
61
|
+
getSubaccounts(requestParameters?: GetSubaccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSubaccounts200Response>;
|
|
62
|
+
/**
|
|
63
|
+
* Update a subaccount name and configurations. All updated configurations are validated against the capabilities of the main account to ensure compliance. It is possible to add new networks and/or regions but it is not possible to remove any configurations that were previously set.
|
|
64
|
+
* Update subaccount configurations
|
|
65
|
+
*/
|
|
66
|
+
updateSubaccountRaw(requestParameters: UpdateSubaccountOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Subaccount>>;
|
|
67
|
+
/**
|
|
68
|
+
* Update a subaccount name and configurations. All updated configurations are validated against the capabilities of the main account to ensure compliance. It is possible to add new networks and/or regions but it is not possible to remove any configurations that were previously set.
|
|
69
|
+
* Update subaccount configurations
|
|
70
|
+
*/
|
|
71
|
+
updateSubaccount(requestParameters: UpdateSubaccountOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Subaccount>;
|
|
72
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
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.SubaccountsApi = void 0;
|
|
17
|
+
const runtime = require("../runtime");
|
|
18
|
+
const index_1 = require("../models/index");
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
class SubaccountsApi extends runtime.BaseAPI {
|
|
23
|
+
/**
|
|
24
|
+
* Creates a new subaccount, allowing you to set network and regional configurations.
|
|
25
|
+
* Create subaccount
|
|
26
|
+
*/
|
|
27
|
+
async createSubaccountRaw(requestParameters, initOverrides) {
|
|
28
|
+
const queryParameters = {};
|
|
29
|
+
const headerParameters = {};
|
|
30
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
31
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
32
|
+
// oauth required
|
|
33
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["subaccounts:write"]);
|
|
34
|
+
}
|
|
35
|
+
let urlPath = `/subaccounts`;
|
|
36
|
+
const response = await this.request({
|
|
37
|
+
path: urlPath,
|
|
38
|
+
method: 'POST',
|
|
39
|
+
headers: headerParameters,
|
|
40
|
+
query: queryParameters,
|
|
41
|
+
body: (0, index_1.CreateSubaccountRequestToJSON)(requestParameters['createSubaccountRequest']),
|
|
42
|
+
}, initOverrides);
|
|
43
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SubaccountFromJSON)(jsonValue));
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Creates a new subaccount, allowing you to set network and regional configurations.
|
|
47
|
+
* Create subaccount
|
|
48
|
+
*/
|
|
49
|
+
async createSubaccount(requestParameters = {}, initOverrides) {
|
|
50
|
+
const response = await this.createSubaccountRaw(requestParameters, initOverrides);
|
|
51
|
+
return await response.value();
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Returns detailed information about a specific subaccount by its identifier, including configuration details and associated data.
|
|
55
|
+
* Retrieve subaccount
|
|
56
|
+
*/
|
|
57
|
+
async getSubaccountRaw(requestParameters, initOverrides) {
|
|
58
|
+
if (requestParameters['subaccountId'] == null) {
|
|
59
|
+
throw new runtime.RequiredError('subaccountId', 'Required parameter "subaccountId" was null or undefined when calling getSubaccount().');
|
|
60
|
+
}
|
|
61
|
+
const queryParameters = {};
|
|
62
|
+
const headerParameters = {};
|
|
63
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
64
|
+
// oauth required
|
|
65
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["subaccounts:read"]);
|
|
66
|
+
}
|
|
67
|
+
let urlPath = `/subaccounts/{subaccountId}`;
|
|
68
|
+
urlPath = urlPath.replace(`{${"subaccountId"}}`, encodeURIComponent(String(requestParameters['subaccountId'])));
|
|
69
|
+
const response = await this.request({
|
|
70
|
+
path: urlPath,
|
|
71
|
+
method: 'GET',
|
|
72
|
+
headers: headerParameters,
|
|
73
|
+
query: queryParameters,
|
|
74
|
+
}, initOverrides);
|
|
75
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SubaccountFromJSON)(jsonValue));
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Returns detailed information about a specific subaccount by its identifier, including configuration details and associated data.
|
|
79
|
+
* Retrieve subaccount
|
|
80
|
+
*/
|
|
81
|
+
async getSubaccount(requestParameters, initOverrides) {
|
|
82
|
+
const response = await this.getSubaccountRaw(requestParameters, initOverrides);
|
|
83
|
+
return await response.value();
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Returns a list of all subaccounts associated with the account. This endpoint supports [cursor-based pagination](https://docs.astrada.co/reference/pagination).
|
|
87
|
+
* List subaccounts
|
|
88
|
+
*/
|
|
89
|
+
async getSubaccountsRaw(requestParameters, initOverrides) {
|
|
90
|
+
const queryParameters = {};
|
|
91
|
+
if (requestParameters['cursor'] != null) {
|
|
92
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
93
|
+
}
|
|
94
|
+
if (requestParameters['limit'] != null) {
|
|
95
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
96
|
+
}
|
|
97
|
+
const headerParameters = {};
|
|
98
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
99
|
+
// oauth required
|
|
100
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["subaccounts:read"]);
|
|
101
|
+
}
|
|
102
|
+
let urlPath = `/subaccounts`;
|
|
103
|
+
const response = await this.request({
|
|
104
|
+
path: urlPath,
|
|
105
|
+
method: 'GET',
|
|
106
|
+
headers: headerParameters,
|
|
107
|
+
query: queryParameters,
|
|
108
|
+
}, initOverrides);
|
|
109
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetSubaccounts200ResponseFromJSON)(jsonValue));
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Returns a list of all subaccounts associated with the account. This endpoint supports [cursor-based pagination](https://docs.astrada.co/reference/pagination).
|
|
113
|
+
* List subaccounts
|
|
114
|
+
*/
|
|
115
|
+
async getSubaccounts(requestParameters = {}, initOverrides) {
|
|
116
|
+
const response = await this.getSubaccountsRaw(requestParameters, initOverrides);
|
|
117
|
+
return await response.value();
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Update a subaccount name and configurations. All updated configurations are validated against the capabilities of the main account to ensure compliance. It is possible to add new networks and/or regions but it is not possible to remove any configurations that were previously set.
|
|
121
|
+
* Update subaccount configurations
|
|
122
|
+
*/
|
|
123
|
+
async updateSubaccountRaw(requestParameters, initOverrides) {
|
|
124
|
+
if (requestParameters['subaccountId'] == null) {
|
|
125
|
+
throw new runtime.RequiredError('subaccountId', 'Required parameter "subaccountId" was null or undefined when calling updateSubaccount().');
|
|
126
|
+
}
|
|
127
|
+
if (requestParameters['updateSubaccountRequest'] == null) {
|
|
128
|
+
throw new runtime.RequiredError('updateSubaccountRequest', 'Required parameter "updateSubaccountRequest" was null or undefined when calling updateSubaccount().');
|
|
129
|
+
}
|
|
130
|
+
const queryParameters = {};
|
|
131
|
+
const headerParameters = {};
|
|
132
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
133
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
134
|
+
// oauth required
|
|
135
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["subaccounts:write"]);
|
|
136
|
+
}
|
|
137
|
+
let urlPath = `/subaccounts/{subaccountId}`;
|
|
138
|
+
urlPath = urlPath.replace(`{${"subaccountId"}}`, encodeURIComponent(String(requestParameters['subaccountId'])));
|
|
139
|
+
const response = await this.request({
|
|
140
|
+
path: urlPath,
|
|
141
|
+
method: 'PATCH',
|
|
142
|
+
headers: headerParameters,
|
|
143
|
+
query: queryParameters,
|
|
144
|
+
body: (0, index_1.UpdateSubaccountRequestToJSON)(requestParameters['updateSubaccountRequest']),
|
|
145
|
+
}, initOverrides);
|
|
146
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SubaccountFromJSON)(jsonValue));
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Update a subaccount name and configurations. All updated configurations are validated against the capabilities of the main account to ensure compliance. It is possible to add new networks and/or regions but it is not possible to remove any configurations that were previously set.
|
|
150
|
+
* Update subaccount configurations
|
|
151
|
+
*/
|
|
152
|
+
async updateSubaccount(requestParameters, initOverrides) {
|
|
153
|
+
const response = await this.updateSubaccountRaw(requestParameters, initOverrides);
|
|
154
|
+
return await response.value();
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
exports.SubaccountsApi = SubaccountsApi;
|
|
@@ -0,0 +1,31 @@
|
|
|
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 * as runtime from '../runtime';
|
|
13
|
+
import type { TransactionMessage } from '../models/index';
|
|
14
|
+
export interface GetTransactionMessageByIdRequest {
|
|
15
|
+
transactionMessageId: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare class TransactionMessagesApi extends runtime.BaseAPI {
|
|
21
|
+
/**
|
|
22
|
+
* Return a transaction message by its unique identifier, including details about the transaction\'s type and relevant transactional data.
|
|
23
|
+
* Retrieve transaction message
|
|
24
|
+
*/
|
|
25
|
+
getTransactionMessageByIdRaw(requestParameters: GetTransactionMessageByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TransactionMessage>>;
|
|
26
|
+
/**
|
|
27
|
+
* Return a transaction message by its unique identifier, including details about the transaction\'s type and relevant transactional data.
|
|
28
|
+
* Retrieve transaction message
|
|
29
|
+
*/
|
|
30
|
+
getTransactionMessageById(requestParameters: GetTransactionMessageByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TransactionMessage>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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.TransactionMessagesApi = void 0;
|
|
17
|
+
const runtime = require("../runtime");
|
|
18
|
+
const index_1 = require("../models/index");
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
class TransactionMessagesApi extends runtime.BaseAPI {
|
|
23
|
+
/**
|
|
24
|
+
* Return a transaction message by its unique identifier, including details about the transaction\'s type and relevant transactional data.
|
|
25
|
+
* Retrieve transaction message
|
|
26
|
+
*/
|
|
27
|
+
async getTransactionMessageByIdRaw(requestParameters, initOverrides) {
|
|
28
|
+
if (requestParameters['transactionMessageId'] == null) {
|
|
29
|
+
throw new runtime.RequiredError('transactionMessageId', 'Required parameter "transactionMessageId" was null or undefined when calling getTransactionMessageById().');
|
|
30
|
+
}
|
|
31
|
+
const queryParameters = {};
|
|
32
|
+
const headerParameters = {};
|
|
33
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
34
|
+
// oauth required
|
|
35
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["transaction-messages:read"]);
|
|
36
|
+
}
|
|
37
|
+
let urlPath = `/transaction-messages/{transactionMessageId}`;
|
|
38
|
+
urlPath = urlPath.replace(`{${"transactionMessageId"}}`, encodeURIComponent(String(requestParameters['transactionMessageId'])));
|
|
39
|
+
const response = await this.request({
|
|
40
|
+
path: urlPath,
|
|
41
|
+
method: 'GET',
|
|
42
|
+
headers: headerParameters,
|
|
43
|
+
query: queryParameters,
|
|
44
|
+
}, initOverrides);
|
|
45
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TransactionMessageFromJSON)(jsonValue));
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Return a transaction message by its unique identifier, including details about the transaction\'s type and relevant transactional data.
|
|
49
|
+
* Retrieve transaction message
|
|
50
|
+
*/
|
|
51
|
+
async getTransactionMessageById(requestParameters, initOverrides) {
|
|
52
|
+
const response = await this.getTransactionMessageByIdRaw(requestParameters, initOverrides);
|
|
53
|
+
return await response.value();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.TransactionMessagesApi = TransactionMessagesApi;
|
|
@@ -0,0 +1,56 @@
|
|
|
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 * as runtime from '../runtime';
|
|
13
|
+
import type { GetTransactions200Response, Transaction } from '../models/index';
|
|
14
|
+
export interface GetTransactionByIdRequest {
|
|
15
|
+
transactionId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface GetTransactionsRequest {
|
|
18
|
+
transactionMessageId?: string;
|
|
19
|
+
cursor?: string;
|
|
20
|
+
cardId?: string;
|
|
21
|
+
limit?: number;
|
|
22
|
+
order?: GetTransactionsOrderEnum;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
export declare class TransactionsApi extends runtime.BaseAPI {
|
|
28
|
+
/**
|
|
29
|
+
* Returns a transaction by its unique identifier, including details about the transaction\'s state and relevant transactional data.
|
|
30
|
+
* Retrieve transaction
|
|
31
|
+
*/
|
|
32
|
+
getTransactionByIdRaw(requestParameters: GetTransactionByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Transaction>>;
|
|
33
|
+
/**
|
|
34
|
+
* Returns a transaction by its unique identifier, including details about the transaction\'s state and relevant transactional data.
|
|
35
|
+
* Retrieve transaction
|
|
36
|
+
*/
|
|
37
|
+
getTransactionById(requestParameters: GetTransactionByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Transaction>;
|
|
38
|
+
/**
|
|
39
|
+
* Returns a list of all transactions under the account. By default, `GET /transactions` returns transactions ordered by the latest `createdAt`. You can combine the different filters as documented. This endpoint supports [cursor-based pagination](https://docs.astrada.co/reference/pagination).
|
|
40
|
+
* List transactions
|
|
41
|
+
*/
|
|
42
|
+
getTransactionsRaw(requestParameters: GetTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetTransactions200Response>>;
|
|
43
|
+
/**
|
|
44
|
+
* Returns a list of all transactions under the account. By default, `GET /transactions` returns transactions ordered by the latest `createdAt`. You can combine the different filters as documented. This endpoint supports [cursor-based pagination](https://docs.astrada.co/reference/pagination).
|
|
45
|
+
* List transactions
|
|
46
|
+
*/
|
|
47
|
+
getTransactions(requestParameters?: GetTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetTransactions200Response>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @export
|
|
51
|
+
*/
|
|
52
|
+
export declare const GetTransactionsOrderEnum: {
|
|
53
|
+
readonly Asc: "asc";
|
|
54
|
+
readonly Desc: "desc";
|
|
55
|
+
};
|
|
56
|
+
export type GetTransactionsOrderEnum = typeof GetTransactionsOrderEnum[keyof typeof GetTransactionsOrderEnum];
|
|
@@ -0,0 +1,106 @@
|
|
|
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.GetTransactionsOrderEnum = exports.TransactionsApi = void 0;
|
|
17
|
+
const runtime = require("../runtime");
|
|
18
|
+
const index_1 = require("../models/index");
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
class TransactionsApi extends runtime.BaseAPI {
|
|
23
|
+
/**
|
|
24
|
+
* Returns a transaction by its unique identifier, including details about the transaction\'s state and relevant transactional data.
|
|
25
|
+
* Retrieve transaction
|
|
26
|
+
*/
|
|
27
|
+
async getTransactionByIdRaw(requestParameters, initOverrides) {
|
|
28
|
+
if (requestParameters['transactionId'] == null) {
|
|
29
|
+
throw new runtime.RequiredError('transactionId', 'Required parameter "transactionId" was null or undefined when calling getTransactionById().');
|
|
30
|
+
}
|
|
31
|
+
const queryParameters = {};
|
|
32
|
+
const headerParameters = {};
|
|
33
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
34
|
+
// oauth required
|
|
35
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["transactions:read"]);
|
|
36
|
+
}
|
|
37
|
+
let urlPath = `/transactions/{transactionId}`;
|
|
38
|
+
urlPath = urlPath.replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters['transactionId'])));
|
|
39
|
+
const response = await this.request({
|
|
40
|
+
path: urlPath,
|
|
41
|
+
method: 'GET',
|
|
42
|
+
headers: headerParameters,
|
|
43
|
+
query: queryParameters,
|
|
44
|
+
}, initOverrides);
|
|
45
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TransactionFromJSON)(jsonValue));
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Returns a transaction by its unique identifier, including details about the transaction\'s state and relevant transactional data.
|
|
49
|
+
* Retrieve transaction
|
|
50
|
+
*/
|
|
51
|
+
async getTransactionById(requestParameters, initOverrides) {
|
|
52
|
+
const response = await this.getTransactionByIdRaw(requestParameters, initOverrides);
|
|
53
|
+
return await response.value();
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Returns a list of all transactions under the account. By default, `GET /transactions` returns transactions ordered by the latest `createdAt`. You can combine the different filters as documented. This endpoint supports [cursor-based pagination](https://docs.astrada.co/reference/pagination).
|
|
57
|
+
* List transactions
|
|
58
|
+
*/
|
|
59
|
+
async getTransactionsRaw(requestParameters, initOverrides) {
|
|
60
|
+
const queryParameters = {};
|
|
61
|
+
if (requestParameters['transactionMessageId'] != null) {
|
|
62
|
+
queryParameters['transactionMessageId'] = requestParameters['transactionMessageId'];
|
|
63
|
+
}
|
|
64
|
+
if (requestParameters['cursor'] != null) {
|
|
65
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
66
|
+
}
|
|
67
|
+
if (requestParameters['cardId'] != null) {
|
|
68
|
+
queryParameters['cardId'] = requestParameters['cardId'];
|
|
69
|
+
}
|
|
70
|
+
if (requestParameters['limit'] != null) {
|
|
71
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
72
|
+
}
|
|
73
|
+
if (requestParameters['order'] != null) {
|
|
74
|
+
queryParameters['order'] = requestParameters['order'];
|
|
75
|
+
}
|
|
76
|
+
const headerParameters = {};
|
|
77
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
78
|
+
// oauth required
|
|
79
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["transactions:read"]);
|
|
80
|
+
}
|
|
81
|
+
let urlPath = `/transactions`;
|
|
82
|
+
const response = await this.request({
|
|
83
|
+
path: urlPath,
|
|
84
|
+
method: 'GET',
|
|
85
|
+
headers: headerParameters,
|
|
86
|
+
query: queryParameters,
|
|
87
|
+
}, initOverrides);
|
|
88
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetTransactions200ResponseFromJSON)(jsonValue));
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Returns a list of all transactions under the account. By default, `GET /transactions` returns transactions ordered by the latest `createdAt`. You can combine the different filters as documented. This endpoint supports [cursor-based pagination](https://docs.astrada.co/reference/pagination).
|
|
92
|
+
* List transactions
|
|
93
|
+
*/
|
|
94
|
+
async getTransactions(requestParameters = {}, initOverrides) {
|
|
95
|
+
const response = await this.getTransactionsRaw(requestParameters, initOverrides);
|
|
96
|
+
return await response.value();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.TransactionsApi = TransactionsApi;
|
|
100
|
+
/**
|
|
101
|
+
* @export
|
|
102
|
+
*/
|
|
103
|
+
exports.GetTransactionsOrderEnum = {
|
|
104
|
+
Asc: 'asc',
|
|
105
|
+
Desc: 'desc'
|
|
106
|
+
};
|