@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
package/.editorconfig
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: Create release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
id-token: write
|
|
11
|
+
issues: write
|
|
12
|
+
pull-requests: write
|
|
13
|
+
|
|
14
|
+
env:
|
|
15
|
+
NODE_VERSION: 22.18.0
|
|
16
|
+
REGISTRY_URL: https://registry.npmjs.org
|
|
17
|
+
ROLE_SESSION_NAME: OIDCSession
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
create_tag:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- name: Checkout
|
|
25
|
+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
26
|
+
with:
|
|
27
|
+
fetch-depth: 0
|
|
28
|
+
|
|
29
|
+
- name: Use Node.js ${{ env.NODE_VERSION }}
|
|
30
|
+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
|
31
|
+
with:
|
|
32
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
33
|
+
registry-url: ${{ env.REGISTRY_URL }}
|
|
34
|
+
|
|
35
|
+
- name: Configure AWS Credentials PROD
|
|
36
|
+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 # v5.0.0
|
|
37
|
+
with:
|
|
38
|
+
role-to-assume: ${{ secrets.AWS_SECRETS_PROD_IAM_ROLE }}
|
|
39
|
+
aws-region: ${{ secrets.AWS_REGION_FOR_ROLE_FOR_GITHUB }}
|
|
40
|
+
role-session-name: ${{ env.ROLE_SESSION_NAME }}
|
|
41
|
+
|
|
42
|
+
- name: Fetch secrets from AWS Secrets Manager
|
|
43
|
+
uses: aws-actions/aws-secretsmanager-get-secrets@a9a7eb4e2f2871d30dc5b892576fde60a2ecc802 # v2.0.10
|
|
44
|
+
with:
|
|
45
|
+
secret-ids: NPM_TOKEN, npm-token-rw
|
|
46
|
+
|
|
47
|
+
- name: Clean Install
|
|
48
|
+
run: npm ci
|
|
49
|
+
env:
|
|
50
|
+
NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }}
|
|
51
|
+
|
|
52
|
+
- name: Run Build
|
|
53
|
+
run: npm run build
|
|
54
|
+
env:
|
|
55
|
+
NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }}
|
|
56
|
+
|
|
57
|
+
- name: Semantic Release
|
|
58
|
+
id: semantic
|
|
59
|
+
uses: cycjimmy/semantic-release-action@9cc899c47e6841430bbaedb43de1560a568dfd16 # v5.0.0
|
|
60
|
+
env:
|
|
61
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
62
|
+
NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }}
|
|
63
|
+
NPM_CONFIG_REGISTRY: ${{ env.REGISTRY_URL }}
|
|
64
|
+
with:
|
|
65
|
+
branches: 'main'
|
package/.releaserc
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"plugins": [
|
|
3
|
+
"@semantic-release/commit-analyzer",
|
|
4
|
+
"@semantic-release/release-notes-generator",
|
|
5
|
+
"@semantic-release/changelog",
|
|
6
|
+
[
|
|
7
|
+
"@semantic-release/npm",
|
|
8
|
+
{
|
|
9
|
+
"pkgRoot": ".",
|
|
10
|
+
"npmPublish": true,
|
|
11
|
+
"tarballDir": "dist"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
[
|
|
15
|
+
"@semantic-release/github",
|
|
16
|
+
{
|
|
17
|
+
"assets": "dist/*.tgz"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
]
|
|
21
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# 1.0.0 (2025-10-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* bump tsconfig ([63edd84](https://github.com/FidelLimited/ts-astrada-sdk/commit/63edd84bb7cbbf482605c5b0f3e2f909f24cc7cd))
|
|
7
|
+
* typescript build ([f347d75](https://github.com/FidelLimited/ts-astrada-sdk/commit/f347d75d068a6ab3fa91996e2c984a7a684ab56c))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* create workflow for package release ([aa0ba58](https://github.com/FidelLimited/ts-astrada-sdk/commit/aa0ba58b91e35742ea307cfc56659222162df804))
|
|
13
|
+
* update SDK from api-spec sdk-update-20251009-112211 ([a0a39ba](https://github.com/FidelLimited/ts-astrada-sdk/commit/a0a39baca5115a015d8397ff0afa1b34cefafcd9))
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# ts-astrada-sdk
|
|
Binary file
|
|
@@ -0,0 +1,57 @@
|
|
|
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 { Card, ListCards200Response } from '../models/index';
|
|
14
|
+
export interface GetCardRequest {
|
|
15
|
+
cardId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ListCardsRequest {
|
|
18
|
+
country?: ListCardsCountryEnum;
|
|
19
|
+
expiryMonth?: number;
|
|
20
|
+
expiryYear?: number;
|
|
21
|
+
subaccountId?: string;
|
|
22
|
+
limit?: number;
|
|
23
|
+
offset?: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export declare class CardApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Returns detailed information about a specific card by its identifier.
|
|
31
|
+
* Retrieve card
|
|
32
|
+
*/
|
|
33
|
+
getCardRaw(requestParameters: GetCardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Card>>;
|
|
34
|
+
/**
|
|
35
|
+
* Returns detailed information about a specific card by its identifier.
|
|
36
|
+
* Retrieve card
|
|
37
|
+
*/
|
|
38
|
+
getCard(requestParameters: GetCardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Card>;
|
|
39
|
+
/**
|
|
40
|
+
* Returns a list of all cards linked to the account. By default, `GET /cards` returns cards ordered by the latest updatedAt. You can combine the different filters as documented. This endpoint supports [offset-based pagination](https://docs.astrada.co/reference/pagination).
|
|
41
|
+
* List cards
|
|
42
|
+
*/
|
|
43
|
+
listCardsRaw(requestParameters: ListCardsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListCards200Response>>;
|
|
44
|
+
/**
|
|
45
|
+
* Returns a list of all cards linked to the account. By default, `GET /cards` returns cards ordered by the latest updatedAt. You can combine the different filters as documented. This endpoint supports [offset-based pagination](https://docs.astrada.co/reference/pagination).
|
|
46
|
+
* List cards
|
|
47
|
+
*/
|
|
48
|
+
listCards(requestParameters?: ListCardsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListCards200Response>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* @export
|
|
52
|
+
*/
|
|
53
|
+
export declare const ListCardsCountryEnum: {
|
|
54
|
+
readonly Usa: "USA";
|
|
55
|
+
readonly Can: "CAN";
|
|
56
|
+
};
|
|
57
|
+
export type ListCardsCountryEnum = typeof ListCardsCountryEnum[keyof typeof ListCardsCountryEnum];
|
|
@@ -0,0 +1,109 @@
|
|
|
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.ListCardsCountryEnum = exports.CardApi = void 0;
|
|
17
|
+
const runtime = require("../runtime");
|
|
18
|
+
const index_1 = require("../models/index");
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
class CardApi extends runtime.BaseAPI {
|
|
23
|
+
/**
|
|
24
|
+
* Returns detailed information about a specific card by its identifier.
|
|
25
|
+
* Retrieve card
|
|
26
|
+
*/
|
|
27
|
+
async getCardRaw(requestParameters, initOverrides) {
|
|
28
|
+
if (requestParameters['cardId'] == null) {
|
|
29
|
+
throw new runtime.RequiredError('cardId', 'Required parameter "cardId" was null or undefined when calling getCard().');
|
|
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", ["cards:read"]);
|
|
36
|
+
}
|
|
37
|
+
let urlPath = `/cards/{cardId}`;
|
|
38
|
+
urlPath = urlPath.replace(`{${"cardId"}}`, encodeURIComponent(String(requestParameters['cardId'])));
|
|
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.CardFromJSON)(jsonValue));
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Returns detailed information about a specific card by its identifier.
|
|
49
|
+
* Retrieve card
|
|
50
|
+
*/
|
|
51
|
+
async getCard(requestParameters, initOverrides) {
|
|
52
|
+
const response = await this.getCardRaw(requestParameters, initOverrides);
|
|
53
|
+
return await response.value();
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Returns a list of all cards linked to the account. By default, `GET /cards` returns cards ordered by the latest updatedAt. You can combine the different filters as documented. This endpoint supports [offset-based pagination](https://docs.astrada.co/reference/pagination).
|
|
57
|
+
* List cards
|
|
58
|
+
*/
|
|
59
|
+
async listCardsRaw(requestParameters, initOverrides) {
|
|
60
|
+
const queryParameters = {};
|
|
61
|
+
if (requestParameters['country'] != null) {
|
|
62
|
+
queryParameters['country'] = requestParameters['country'];
|
|
63
|
+
}
|
|
64
|
+
if (requestParameters['expiryMonth'] != null) {
|
|
65
|
+
queryParameters['expiryMonth'] = requestParameters['expiryMonth'];
|
|
66
|
+
}
|
|
67
|
+
if (requestParameters['expiryYear'] != null) {
|
|
68
|
+
queryParameters['expiryYear'] = requestParameters['expiryYear'];
|
|
69
|
+
}
|
|
70
|
+
if (requestParameters['subaccountId'] != null) {
|
|
71
|
+
queryParameters['subaccountId'] = requestParameters['subaccountId'];
|
|
72
|
+
}
|
|
73
|
+
if (requestParameters['limit'] != null) {
|
|
74
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
75
|
+
}
|
|
76
|
+
if (requestParameters['offset'] != null) {
|
|
77
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
78
|
+
}
|
|
79
|
+
const headerParameters = {};
|
|
80
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
81
|
+
// oauth required
|
|
82
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["cards:read"]);
|
|
83
|
+
}
|
|
84
|
+
let urlPath = `/cards`;
|
|
85
|
+
const response = await this.request({
|
|
86
|
+
path: urlPath,
|
|
87
|
+
method: 'GET',
|
|
88
|
+
headers: headerParameters,
|
|
89
|
+
query: queryParameters,
|
|
90
|
+
}, initOverrides);
|
|
91
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListCards200ResponseFromJSON)(jsonValue));
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Returns a list of all cards linked to the account. By default, `GET /cards` returns cards ordered by the latest updatedAt. You can combine the different filters as documented. This endpoint supports [offset-based pagination](https://docs.astrada.co/reference/pagination).
|
|
95
|
+
* List cards
|
|
96
|
+
*/
|
|
97
|
+
async listCards(requestParameters = {}, initOverrides) {
|
|
98
|
+
const response = await this.listCardsRaw(requestParameters, initOverrides);
|
|
99
|
+
return await response.value();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.CardApi = CardApi;
|
|
103
|
+
/**
|
|
104
|
+
* @export
|
|
105
|
+
*/
|
|
106
|
+
exports.ListCardsCountryEnum = {
|
|
107
|
+
Usa: 'USA',
|
|
108
|
+
Can: 'CAN'
|
|
109
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
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 { CardSubscription, ListCardSubscriptions200Response, UpdateCardSubscriptionRequest } from '../models/index';
|
|
14
|
+
export interface GetCardSubscriptionRequest {
|
|
15
|
+
subscriptionId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ListCardSubscriptionsRequest {
|
|
18
|
+
subaccountId?: string;
|
|
19
|
+
cardId?: string;
|
|
20
|
+
limit?: number;
|
|
21
|
+
offset?: number;
|
|
22
|
+
}
|
|
23
|
+
export interface UpdateCardSubscriptionOperationRequest {
|
|
24
|
+
subscriptionId: string;
|
|
25
|
+
updateCardSubscriptionRequest: UpdateCardSubscriptionRequest;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
export declare class CardSubscriptionApi extends runtime.BaseAPI {
|
|
31
|
+
/**
|
|
32
|
+
* Returns detailed information about a specific card subscription by its identifier, including its data-sharing state.
|
|
33
|
+
* Retrieve card subscription
|
|
34
|
+
*/
|
|
35
|
+
getCardSubscriptionRaw(requestParameters: GetCardSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CardSubscription>>;
|
|
36
|
+
/**
|
|
37
|
+
* Returns detailed information about a specific card subscription by its identifier, including its data-sharing state.
|
|
38
|
+
* Retrieve card subscription
|
|
39
|
+
*/
|
|
40
|
+
getCardSubscription(requestParameters: GetCardSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CardSubscription>;
|
|
41
|
+
/**
|
|
42
|
+
* Returns all card subscriptions under the account. By default, `GET /card-subscriptions` returns card subscriptions ordered by the latest `updatedAt`. The `cardId` and `subaccountId` filters are mutual exclusive. The `cardId` takes precedence over `subaccountId`. This endpoint supports [offset-based pagination](https://docs.astrada.co/reference/pagination).
|
|
43
|
+
* List card subscriptions
|
|
44
|
+
*/
|
|
45
|
+
listCardSubscriptionsRaw(requestParameters: ListCardSubscriptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListCardSubscriptions200Response>>;
|
|
46
|
+
/**
|
|
47
|
+
* Returns all card subscriptions under the account. By default, `GET /card-subscriptions` returns card subscriptions ordered by the latest `updatedAt`. The `cardId` and `subaccountId` filters are mutual exclusive. The `cardId` takes precedence over `subaccountId`. This endpoint supports [offset-based pagination](https://docs.astrada.co/reference/pagination).
|
|
48
|
+
* List card subscriptions
|
|
49
|
+
*/
|
|
50
|
+
listCardSubscriptions(requestParameters?: ListCardSubscriptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListCardSubscriptions200Response>;
|
|
51
|
+
/**
|
|
52
|
+
* Updates an existing card subscription, allowing changes to its data-sharing state. Subscriptions that were enrolled in bulk, and where `enrollmentType = \'network-bulk\'` cannot be updated. **Note:** setting a card subscription to a `deactivated` state is a final action that cannot be undone.
|
|
53
|
+
* Update card subscription
|
|
54
|
+
*/
|
|
55
|
+
updateCardSubscriptionRaw(requestParameters: UpdateCardSubscriptionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CardSubscription>>;
|
|
56
|
+
/**
|
|
57
|
+
* Updates an existing card subscription, allowing changes to its data-sharing state. Subscriptions that were enrolled in bulk, and where `enrollmentType = \'network-bulk\'` cannot be updated. **Note:** setting a card subscription to a `deactivated` state is a final action that cannot be undone.
|
|
58
|
+
* Update card subscription
|
|
59
|
+
*/
|
|
60
|
+
updateCardSubscription(requestParameters: UpdateCardSubscriptionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CardSubscription>;
|
|
61
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
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.CardSubscriptionApi = void 0;
|
|
17
|
+
const runtime = require("../runtime");
|
|
18
|
+
const index_1 = require("../models/index");
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
class CardSubscriptionApi extends runtime.BaseAPI {
|
|
23
|
+
/**
|
|
24
|
+
* Returns detailed information about a specific card subscription by its identifier, including its data-sharing state.
|
|
25
|
+
* Retrieve card subscription
|
|
26
|
+
*/
|
|
27
|
+
async getCardSubscriptionRaw(requestParameters, initOverrides) {
|
|
28
|
+
if (requestParameters['subscriptionId'] == null) {
|
|
29
|
+
throw new runtime.RequiredError('subscriptionId', 'Required parameter "subscriptionId" was null or undefined when calling getCardSubscription().');
|
|
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", ["card-subscriptions:read"]);
|
|
36
|
+
}
|
|
37
|
+
let urlPath = `/card-subscriptions/{subscriptionId}`;
|
|
38
|
+
urlPath = urlPath.replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId'])));
|
|
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.CardSubscriptionFromJSON)(jsonValue));
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Returns detailed information about a specific card subscription by its identifier, including its data-sharing state.
|
|
49
|
+
* Retrieve card subscription
|
|
50
|
+
*/
|
|
51
|
+
async getCardSubscription(requestParameters, initOverrides) {
|
|
52
|
+
const response = await this.getCardSubscriptionRaw(requestParameters, initOverrides);
|
|
53
|
+
return await response.value();
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Returns all card subscriptions under the account. By default, `GET /card-subscriptions` returns card subscriptions ordered by the latest `updatedAt`. The `cardId` and `subaccountId` filters are mutual exclusive. The `cardId` takes precedence over `subaccountId`. This endpoint supports [offset-based pagination](https://docs.astrada.co/reference/pagination).
|
|
57
|
+
* List card subscriptions
|
|
58
|
+
*/
|
|
59
|
+
async listCardSubscriptionsRaw(requestParameters, initOverrides) {
|
|
60
|
+
const queryParameters = {};
|
|
61
|
+
if (requestParameters['subaccountId'] != null) {
|
|
62
|
+
queryParameters['subaccountId'] = requestParameters['subaccountId'];
|
|
63
|
+
}
|
|
64
|
+
if (requestParameters['cardId'] != null) {
|
|
65
|
+
queryParameters['cardId'] = requestParameters['cardId'];
|
|
66
|
+
}
|
|
67
|
+
if (requestParameters['limit'] != null) {
|
|
68
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
69
|
+
}
|
|
70
|
+
if (requestParameters['offset'] != null) {
|
|
71
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
72
|
+
}
|
|
73
|
+
const headerParameters = {};
|
|
74
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
75
|
+
// oauth required
|
|
76
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["card-subscriptions:read"]);
|
|
77
|
+
}
|
|
78
|
+
let urlPath = `/card-subscriptions`;
|
|
79
|
+
const response = await this.request({
|
|
80
|
+
path: urlPath,
|
|
81
|
+
method: 'GET',
|
|
82
|
+
headers: headerParameters,
|
|
83
|
+
query: queryParameters,
|
|
84
|
+
}, initOverrides);
|
|
85
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListCardSubscriptions200ResponseFromJSON)(jsonValue));
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Returns all card subscriptions under the account. By default, `GET /card-subscriptions` returns card subscriptions ordered by the latest `updatedAt`. The `cardId` and `subaccountId` filters are mutual exclusive. The `cardId` takes precedence over `subaccountId`. This endpoint supports [offset-based pagination](https://docs.astrada.co/reference/pagination).
|
|
89
|
+
* List card subscriptions
|
|
90
|
+
*/
|
|
91
|
+
async listCardSubscriptions(requestParameters = {}, initOverrides) {
|
|
92
|
+
const response = await this.listCardSubscriptionsRaw(requestParameters, initOverrides);
|
|
93
|
+
return await response.value();
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Updates an existing card subscription, allowing changes to its data-sharing state. Subscriptions that were enrolled in bulk, and where `enrollmentType = \'network-bulk\'` cannot be updated. **Note:** setting a card subscription to a `deactivated` state is a final action that cannot be undone.
|
|
97
|
+
* Update card subscription
|
|
98
|
+
*/
|
|
99
|
+
async updateCardSubscriptionRaw(requestParameters, initOverrides) {
|
|
100
|
+
if (requestParameters['subscriptionId'] == null) {
|
|
101
|
+
throw new runtime.RequiredError('subscriptionId', 'Required parameter "subscriptionId" was null or undefined when calling updateCardSubscription().');
|
|
102
|
+
}
|
|
103
|
+
if (requestParameters['updateCardSubscriptionRequest'] == null) {
|
|
104
|
+
throw new runtime.RequiredError('updateCardSubscriptionRequest', 'Required parameter "updateCardSubscriptionRequest" was null or undefined when calling updateCardSubscription().');
|
|
105
|
+
}
|
|
106
|
+
const queryParameters = {};
|
|
107
|
+
const headerParameters = {};
|
|
108
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
109
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
110
|
+
// oauth required
|
|
111
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["card-subscriptions:write"]);
|
|
112
|
+
}
|
|
113
|
+
let urlPath = `/card-subscriptions/{subscriptionId}`;
|
|
114
|
+
urlPath = urlPath.replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId'])));
|
|
115
|
+
const response = await this.request({
|
|
116
|
+
path: urlPath,
|
|
117
|
+
method: 'PATCH',
|
|
118
|
+
headers: headerParameters,
|
|
119
|
+
query: queryParameters,
|
|
120
|
+
body: (0, index_1.UpdateCardSubscriptionRequestToJSON)(requestParameters['updateCardSubscriptionRequest']),
|
|
121
|
+
}, initOverrides);
|
|
122
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CardSubscriptionFromJSON)(jsonValue));
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Updates an existing card subscription, allowing changes to its data-sharing state. Subscriptions that were enrolled in bulk, and where `enrollmentType = \'network-bulk\'` cannot be updated. **Note:** setting a card subscription to a `deactivated` state is a final action that cannot be undone.
|
|
126
|
+
* Update card subscription
|
|
127
|
+
*/
|
|
128
|
+
async updateCardSubscription(requestParameters, initOverrides) {
|
|
129
|
+
const response = await this.updateCardSubscriptionRaw(requestParameters, initOverrides);
|
|
130
|
+
return await response.value();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
exports.CardSubscriptionApi = CardSubscriptionApi;
|
|
@@ -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 { Cardholder } from '../models/index';
|
|
14
|
+
export interface GetCardholderRequest {
|
|
15
|
+
cardId: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare class CardholderApi extends runtime.BaseAPI {
|
|
21
|
+
/**
|
|
22
|
+
* Returns cardholder information, related to a specific cardId, when it\'s available.
|
|
23
|
+
* Retrieve cardholder information
|
|
24
|
+
*/
|
|
25
|
+
getCardholderRaw(requestParameters: GetCardholderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Cardholder>>;
|
|
26
|
+
/**
|
|
27
|
+
* Returns cardholder information, related to a specific cardId, when it\'s available.
|
|
28
|
+
* Retrieve cardholder information
|
|
29
|
+
*/
|
|
30
|
+
getCardholder(requestParameters: GetCardholderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Cardholder>;
|
|
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.CardholderApi = void 0;
|
|
17
|
+
const runtime = require("../runtime");
|
|
18
|
+
const index_1 = require("../models/index");
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
class CardholderApi extends runtime.BaseAPI {
|
|
23
|
+
/**
|
|
24
|
+
* Returns cardholder information, related to a specific cardId, when it\'s available.
|
|
25
|
+
* Retrieve cardholder information
|
|
26
|
+
*/
|
|
27
|
+
async getCardholderRaw(requestParameters, initOverrides) {
|
|
28
|
+
if (requestParameters['cardId'] == null) {
|
|
29
|
+
throw new runtime.RequiredError('cardId', 'Required parameter "cardId" was null or undefined when calling getCardholder().');
|
|
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", ["cardholder:read"]);
|
|
36
|
+
}
|
|
37
|
+
let urlPath = `/cards/{cardId}/cardholder`;
|
|
38
|
+
urlPath = urlPath.replace(`{${"cardId"}}`, encodeURIComponent(String(requestParameters['cardId'])));
|
|
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.CardholderFromJSON)(jsonValue));
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Returns cardholder information, related to a specific cardId, when it\'s available.
|
|
49
|
+
* Retrieve cardholder information
|
|
50
|
+
*/
|
|
51
|
+
async getCardholder(requestParameters, initOverrides) {
|
|
52
|
+
const response = await this.getCardholderRaw(requestParameters, initOverrides);
|
|
53
|
+
return await response.value();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.CardholderApi = CardholderApi;
|
|
@@ -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 { EnrollmentMethods200Response, EnrollmentMethodsRequest } from '../models/index';
|
|
14
|
+
export interface EnrollmentMethodsOperationRequest {
|
|
15
|
+
enrollmentMethodsRequest: EnrollmentMethodsRequest;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare class EnrollmentMethodsApi extends runtime.BaseAPI {
|
|
21
|
+
/**
|
|
22
|
+
* List the available enrollment methods given a card BIN
|
|
23
|
+
* List the available enrollment methods given a card BIN
|
|
24
|
+
*/
|
|
25
|
+
enrollmentMethodsRaw(requestParameters: EnrollmentMethodsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EnrollmentMethods200Response>>;
|
|
26
|
+
/**
|
|
27
|
+
* List the available enrollment methods given a card BIN
|
|
28
|
+
* List the available enrollment methods given a card BIN
|
|
29
|
+
*/
|
|
30
|
+
enrollmentMethods(requestParameters: EnrollmentMethodsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EnrollmentMethods200Response>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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.EnrollmentMethodsApi = void 0;
|
|
17
|
+
const runtime = require("../runtime");
|
|
18
|
+
const index_1 = require("../models/index");
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
class EnrollmentMethodsApi extends runtime.BaseAPI {
|
|
23
|
+
/**
|
|
24
|
+
* List the available enrollment methods given a card BIN
|
|
25
|
+
* List the available enrollment methods given a card BIN
|
|
26
|
+
*/
|
|
27
|
+
async enrollmentMethodsRaw(requestParameters, initOverrides) {
|
|
28
|
+
if (requestParameters['enrollmentMethodsRequest'] == null) {
|
|
29
|
+
throw new runtime.RequiredError('enrollmentMethodsRequest', 'Required parameter "enrollmentMethodsRequest" was null or undefined when calling enrollmentMethods().');
|
|
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", ["enrollment-methods:write"]);
|
|
37
|
+
}
|
|
38
|
+
let urlPath = `/enrollment-methods`;
|
|
39
|
+
const response = await this.request({
|
|
40
|
+
path: urlPath,
|
|
41
|
+
method: 'POST',
|
|
42
|
+
headers: headerParameters,
|
|
43
|
+
query: queryParameters,
|
|
44
|
+
body: (0, index_1.EnrollmentMethodsRequestToJSON)(requestParameters['enrollmentMethodsRequest']),
|
|
45
|
+
}, initOverrides);
|
|
46
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EnrollmentMethods200ResponseFromJSON)(jsonValue));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* List the available enrollment methods given a card BIN
|
|
50
|
+
* List the available enrollment methods given a card BIN
|
|
51
|
+
*/
|
|
52
|
+
async enrollmentMethods(requestParameters, initOverrides) {
|
|
53
|
+
const response = await this.enrollmentMethodsRaw(requestParameters, initOverrides);
|
|
54
|
+
return await response.value();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.EnrollmentMethodsApi = EnrollmentMethodsApi;
|