@astrada.co/ts-astrada-sdk 1.1.0 → 1.3.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.
Files changed (251) hide show
  1. package/.github/workflows/api-sdk-release.yml +33 -20
  2. package/CHANGELOG.md +2 -2
  3. package/LICENSE +21 -0
  4. package/README.md +0 -2
  5. package/dist/apis/CardApi.js +218 -0
  6. package/dist/apis/CardSubscriptionApi.js +268 -0
  7. package/dist/apis/CardholderApi.js +138 -0
  8. package/dist/apis/EnrollmentMethodsApi.js +139 -0
  9. package/dist/apis/NetworkBulkFeedsApi.js +264 -0
  10. package/dist/apis/SubaccountsApi.js +319 -0
  11. package/dist/apis/TransactionMessagesApi.js +138 -0
  12. package/dist/apis/TransactionsApi.js +215 -0
  13. package/dist/apis/WebhooksApi.js +380 -0
  14. package/{lib → dist}/models/Card.js +5 -4
  15. package/{lib → dist}/models/CardLinks.js +3 -2
  16. package/{lib → dist}/models/CardSubscription.js +7 -6
  17. package/{lib → dist}/models/CardSubscriptionLinks.js +3 -2
  18. package/{lib → dist}/models/Cardholder.js +6 -5
  19. package/{lib → dist}/models/CardholderCorporate.js +2 -1
  20. package/{lib → dist}/models/CardholderLinks.js +3 -2
  21. package/{lib → dist}/models/Conflict.js +2 -1
  22. package/{lib → dist}/models/CreateNetworkBulkFeedRequest.js +2 -1
  23. package/{lib → dist}/models/CreateSubaccountRequest.js +3 -2
  24. package/{lib → dist}/models/CreateWebhook201Response.d.ts +2 -0
  25. package/{lib → dist}/models/CreateWebhook201Response.js +8 -5
  26. package/{lib → dist}/models/CreateWebhookRequest.d.ts +2 -0
  27. package/{lib → dist}/models/CreateWebhookRequest.js +5 -2
  28. package/{lib → dist}/models/EnrollmentMethods200Response.js +2 -1
  29. package/dist/models/EnrollmentMethods413Response.d.ts +45 -0
  30. package/dist/models/EnrollmentMethods413Response.js +62 -0
  31. package/{lib → dist}/models/EnrollmentMethodsRequest.js +2 -1
  32. package/dist/models/GetCardSubscription404Response.d.ts +57 -0
  33. package/dist/models/GetCardSubscription404Response.js +66 -0
  34. package/{lib → dist}/models/GetSubaccounts200Response.js +4 -3
  35. package/{lib → dist}/models/GetSubaccounts200ResponseEmbedded.js +3 -2
  36. package/{lib → dist}/models/GetSubaccounts200ResponseLinks.js +3 -2
  37. package/{lib → dist}/models/GetTransactions200Response.js +4 -3
  38. package/{lib → dist}/models/GetTransactions200ResponseEmbedded.js +3 -2
  39. package/{lib → dist}/models/InlineObject.js +3 -2
  40. package/{lib → dist}/models/InlineObject1.js +2 -1
  41. package/{lib → dist}/models/InlineObject2.js +2 -1
  42. package/{lib → dist}/models/InlineObject3.js +2 -1
  43. package/{lib → dist}/models/InlineObject4.js +2 -1
  44. package/{lib → dist}/models/InlineObject5.js +2 -1
  45. package/{lib → dist}/models/InlineObjectErrorsInner.js +2 -1
  46. package/{lib → dist}/models/Link.js +2 -1
  47. package/{lib → dist}/models/ListCardSubscriptions200Response.js +4 -3
  48. package/{lib → dist}/models/ListCardSubscriptions200ResponseEmbedded.js +3 -2
  49. package/{lib → dist}/models/ListCardSubscriptions200ResponseLinks.js +3 -2
  50. package/dist/models/ListCardSubscriptions400Response.d.ts +52 -0
  51. package/dist/models/ListCardSubscriptions400Response.js +65 -0
  52. package/dist/models/ListCardSubscriptions400ResponseErrorsInner.d.ts +38 -0
  53. package/dist/models/ListCardSubscriptions400ResponseErrorsInner.js +55 -0
  54. package/dist/models/ListCardSubscriptions401Response.d.ts +45 -0
  55. package/dist/models/ListCardSubscriptions401Response.js +62 -0
  56. package/dist/models/ListCardSubscriptions403Response.d.ts +45 -0
  57. package/dist/models/ListCardSubscriptions403Response.js +62 -0
  58. package/dist/models/ListCardSubscriptions500Response.d.ts +45 -0
  59. package/dist/models/ListCardSubscriptions500Response.js +62 -0
  60. package/{lib → dist}/models/ListCards200Response.js +4 -3
  61. package/{lib → dist}/models/ListCards200ResponseEmbedded.js +3 -2
  62. package/{lib → dist}/models/ListNetworkBulkFeeds200Response.js +4 -3
  63. package/{lib → dist}/models/ListNetworkBulkFeeds200ResponseEmbedded.js +3 -2
  64. package/{lib → dist}/models/ListWebhooks200Response.js +4 -3
  65. package/{lib → dist}/models/ListWebhooks200ResponseEmbedded.js +3 -2
  66. package/{lib → dist}/models/ListWebhooks200ResponseLinks.js +3 -2
  67. package/{lib → dist}/models/NetworkBulkFeeds.d.ts +16 -1
  68. package/{lib → dist}/models/NetworkBulkFeeds.js +18 -5
  69. package/{lib → dist}/models/Subaccount.js +6 -5
  70. package/{lib → dist}/models/SubaccountConfiguration.js +3 -2
  71. package/{lib → dist}/models/SubaccountConfigurationVISA.js +2 -1
  72. package/{lib → dist}/models/Transaction.js +7 -6
  73. package/{lib → dist}/models/TransactionAcceptor.js +2 -1
  74. package/{lib → dist}/models/TransactionLinks.js +3 -2
  75. package/{lib → dist}/models/TransactionMessage.js +7 -6
  76. package/{lib → dist}/models/TransactionMessageAcceptor.js +2 -1
  77. package/{lib → dist}/models/UnprocessableEntity.js +2 -1
  78. package/{lib → dist}/models/UpdateCardSubscriptionRequest.js +2 -1
  79. package/{lib → dist}/models/UpdateSubaccountRequest.js +3 -2
  80. package/{lib → dist}/models/UpdateWebhookRequest.d.ts +2 -0
  81. package/{lib → dist}/models/UpdateWebhookRequest.js +5 -2
  82. package/{lib → dist}/models/Webhook.d.ts +2 -0
  83. package/{lib → dist}/models/Webhook.js +8 -5
  84. package/{lib → dist}/models/index.d.ts +7 -7
  85. package/{lib → dist}/models/index.js +7 -7
  86. package/dist/runtime.js +638 -0
  87. package/docs/Card.md +54 -0
  88. package/docs/CardApi.md +176 -0
  89. package/docs/CardLinks.md +36 -0
  90. package/docs/CardSubscription.md +56 -0
  91. package/docs/CardSubscriptionApi.md +252 -0
  92. package/docs/CardSubscriptionLinks.md +38 -0
  93. package/docs/Cardholder.md +44 -0
  94. package/docs/CardholderApi.md +85 -0
  95. package/docs/CardholderCorporate.md +37 -0
  96. package/docs/CardholderLinks.md +34 -0
  97. package/docs/Conflict.md +40 -0
  98. package/docs/CreateNetworkBulkFeedRequest.md +38 -0
  99. package/docs/CreateSubaccountRequest.md +36 -0
  100. package/docs/CreateWebhook201Response.md +52 -0
  101. package/docs/CreateWebhookRequest.md +42 -0
  102. package/docs/EnrollmentMethods200Response.md +34 -0
  103. package/docs/EnrollmentMethods413Response.md +36 -0
  104. package/docs/EnrollmentMethodsApi.md +85 -0
  105. package/docs/EnrollmentMethodsRequest.md +34 -0
  106. package/docs/GetCardSubscription404Response.md +40 -0
  107. package/docs/GetSubaccounts200Response.md +36 -0
  108. package/docs/GetSubaccounts200ResponseEmbedded.md +34 -0
  109. package/docs/GetSubaccounts200ResponseLinks.md +36 -0
  110. package/docs/GetTransactions200Response.md +36 -0
  111. package/docs/GetTransactions200ResponseEmbedded.md +34 -0
  112. package/docs/Link.md +48 -0
  113. package/docs/ListCardSubscriptions200Response.md +38 -0
  114. package/docs/ListCardSubscriptions200ResponseEmbedded.md +34 -0
  115. package/docs/ListCardSubscriptions200ResponseLinks.md +42 -0
  116. package/docs/ListCardSubscriptions400Response.md +38 -0
  117. package/docs/ListCardSubscriptions400ResponseErrorsInner.md +36 -0
  118. package/docs/ListCardSubscriptions401Response.md +36 -0
  119. package/docs/ListCardSubscriptions403Response.md +36 -0
  120. package/docs/ListCardSubscriptions500Response.md +36 -0
  121. package/docs/ListCards200Response.md +38 -0
  122. package/docs/ListCards200ResponseEmbedded.md +34 -0
  123. package/docs/ListNetworkBulkFeeds200Response.md +38 -0
  124. package/docs/ListNetworkBulkFeeds200ResponseEmbedded.md +34 -0
  125. package/docs/ListWebhooks200Response.md +37 -0
  126. package/docs/ListWebhooks200ResponseEmbedded.md +34 -0
  127. package/docs/ListWebhooks200ResponseLinks.md +36 -0
  128. package/docs/NetworkBulkFeeds.md +48 -0
  129. package/docs/NetworkBulkFeedsApi.md +247 -0
  130. package/docs/Subaccount.md +46 -0
  131. package/docs/SubaccountConfiguration.md +37 -0
  132. package/docs/SubaccountConfigurationVISA.md +34 -0
  133. package/docs/SubaccountsApi.md +321 -0
  134. package/docs/Transaction.md +66 -0
  135. package/docs/TransactionAcceptor.md +41 -0
  136. package/docs/TransactionLinks.md +40 -0
  137. package/docs/TransactionMessage.md +70 -0
  138. package/docs/TransactionMessageAcceptor.md +47 -0
  139. package/docs/TransactionMessagesApi.md +85 -0
  140. package/docs/TransactionsApi.md +174 -0
  141. package/docs/UnprocessableEntity.md +36 -0
  142. package/docs/UpdateCardSubscriptionRequest.md +34 -0
  143. package/docs/UpdateSubaccountRequest.md +36 -0
  144. package/docs/UpdateWebhookRequest.md +40 -0
  145. package/docs/Webhook.md +51 -0
  146. package/docs/WebhooksApi.md +401 -0
  147. package/openapitools.json +7 -0
  148. package/package.json +11 -11
  149. package/src/apis/CardApi.ts +15 -15
  150. package/src/apis/CardSubscriptionApi.ts +15 -15
  151. package/src/apis/CardholderApi.ts +15 -15
  152. package/src/apis/EnrollmentMethodsApi.ts +15 -15
  153. package/src/apis/NetworkBulkFeedsApi.ts +15 -15
  154. package/src/apis/SubaccountsApi.ts +15 -15
  155. package/src/apis/TransactionMessagesApi.ts +15 -15
  156. package/src/apis/TransactionsApi.ts +15 -15
  157. package/src/apis/WebhooksApi.ts +15 -15
  158. package/src/models/Card.ts +2 -2
  159. package/src/models/CardSubscription.ts +4 -4
  160. package/src/models/Cardholder.ts +2 -2
  161. package/src/models/CreateWebhook201Response.ts +5 -3
  162. package/src/models/CreateWebhookRequest.ts +3 -1
  163. package/src/models/EnrollmentMethods413Response.ts +85 -0
  164. package/src/models/GetCardSubscription404Response.ts +101 -0
  165. package/src/models/ListCardSubscriptions400Response.ts +101 -0
  166. package/src/models/ListCardSubscriptions400ResponseErrorsInner.ts +75 -0
  167. package/src/models/ListCardSubscriptions401Response.ts +85 -0
  168. package/src/models/ListCardSubscriptions403Response.ts +85 -0
  169. package/src/models/ListCardSubscriptions500Response.ts +85 -0
  170. package/src/models/NetworkBulkFeeds.ts +22 -3
  171. package/src/models/Subaccount.ts +2 -2
  172. package/src/models/Transaction.ts +3 -3
  173. package/src/models/TransactionMessage.ts +3 -3
  174. package/src/models/UpdateWebhookRequest.ts +3 -1
  175. package/src/models/Webhook.ts +5 -3
  176. package/src/models/index.ts +7 -7
  177. package/src/runtime.ts +0 -1
  178. package/tsconfig.json +14 -7
  179. package/dist/astrada.co-ts-astrada-sdk-1.1.0.tgz +0 -0
  180. package/lib/apis/CardApi.js +0 -109
  181. package/lib/apis/CardSubscriptionApi.js +0 -133
  182. package/lib/apis/CardholderApi.js +0 -56
  183. package/lib/apis/EnrollmentMethodsApi.js +0 -57
  184. package/lib/apis/NetworkBulkFeedsApi.js +0 -129
  185. package/lib/apis/SubaccountsApi.js +0 -157
  186. package/lib/apis/TransactionMessagesApi.js +0 -56
  187. package/lib/apis/TransactionsApi.js +0 -106
  188. package/lib/apis/WebhooksApi.js +0 -194
  189. package/lib/runtime.js +0 -394
  190. package/openapi-generator/templates/README.mustache +0 -274
  191. package/openapi-generator/templates/runtime.mustache +0 -515
  192. /package/{lib → dist}/apis/CardApi.d.ts +0 -0
  193. /package/{lib → dist}/apis/CardSubscriptionApi.d.ts +0 -0
  194. /package/{lib → dist}/apis/CardholderApi.d.ts +0 -0
  195. /package/{lib → dist}/apis/EnrollmentMethodsApi.d.ts +0 -0
  196. /package/{lib → dist}/apis/NetworkBulkFeedsApi.d.ts +0 -0
  197. /package/{lib → dist}/apis/SubaccountsApi.d.ts +0 -0
  198. /package/{lib → dist}/apis/TransactionMessagesApi.d.ts +0 -0
  199. /package/{lib → dist}/apis/TransactionsApi.d.ts +0 -0
  200. /package/{lib → dist}/apis/WebhooksApi.d.ts +0 -0
  201. /package/{lib → dist}/apis/index.d.ts +0 -0
  202. /package/{lib → dist}/apis/index.js +0 -0
  203. /package/{lib → dist}/index.d.ts +0 -0
  204. /package/{lib → dist}/index.js +0 -0
  205. /package/{lib → dist}/models/Card.d.ts +0 -0
  206. /package/{lib → dist}/models/CardLinks.d.ts +0 -0
  207. /package/{lib → dist}/models/CardSubscription.d.ts +0 -0
  208. /package/{lib → dist}/models/CardSubscriptionLinks.d.ts +0 -0
  209. /package/{lib → dist}/models/Cardholder.d.ts +0 -0
  210. /package/{lib → dist}/models/CardholderCorporate.d.ts +0 -0
  211. /package/{lib → dist}/models/CardholderLinks.d.ts +0 -0
  212. /package/{lib → dist}/models/Conflict.d.ts +0 -0
  213. /package/{lib → dist}/models/CreateNetworkBulkFeedRequest.d.ts +0 -0
  214. /package/{lib → dist}/models/CreateSubaccountRequest.d.ts +0 -0
  215. /package/{lib → dist}/models/EnrollmentMethods200Response.d.ts +0 -0
  216. /package/{lib → dist}/models/EnrollmentMethodsRequest.d.ts +0 -0
  217. /package/{lib → dist}/models/GetSubaccounts200Response.d.ts +0 -0
  218. /package/{lib → dist}/models/GetSubaccounts200ResponseEmbedded.d.ts +0 -0
  219. /package/{lib → dist}/models/GetSubaccounts200ResponseLinks.d.ts +0 -0
  220. /package/{lib → dist}/models/GetTransactions200Response.d.ts +0 -0
  221. /package/{lib → dist}/models/GetTransactions200ResponseEmbedded.d.ts +0 -0
  222. /package/{lib → dist}/models/InlineObject.d.ts +0 -0
  223. /package/{lib → dist}/models/InlineObject1.d.ts +0 -0
  224. /package/{lib → dist}/models/InlineObject2.d.ts +0 -0
  225. /package/{lib → dist}/models/InlineObject3.d.ts +0 -0
  226. /package/{lib → dist}/models/InlineObject4.d.ts +0 -0
  227. /package/{lib → dist}/models/InlineObject5.d.ts +0 -0
  228. /package/{lib → dist}/models/InlineObjectErrorsInner.d.ts +0 -0
  229. /package/{lib → dist}/models/Link.d.ts +0 -0
  230. /package/{lib → dist}/models/ListCardSubscriptions200Response.d.ts +0 -0
  231. /package/{lib → dist}/models/ListCardSubscriptions200ResponseEmbedded.d.ts +0 -0
  232. /package/{lib → dist}/models/ListCardSubscriptions200ResponseLinks.d.ts +0 -0
  233. /package/{lib → dist}/models/ListCards200Response.d.ts +0 -0
  234. /package/{lib → dist}/models/ListCards200ResponseEmbedded.d.ts +0 -0
  235. /package/{lib → dist}/models/ListNetworkBulkFeeds200Response.d.ts +0 -0
  236. /package/{lib → dist}/models/ListNetworkBulkFeeds200ResponseEmbedded.d.ts +0 -0
  237. /package/{lib → dist}/models/ListWebhooks200Response.d.ts +0 -0
  238. /package/{lib → dist}/models/ListWebhooks200ResponseEmbedded.d.ts +0 -0
  239. /package/{lib → dist}/models/ListWebhooks200ResponseLinks.d.ts +0 -0
  240. /package/{lib → dist}/models/Subaccount.d.ts +0 -0
  241. /package/{lib → dist}/models/SubaccountConfiguration.d.ts +0 -0
  242. /package/{lib → dist}/models/SubaccountConfigurationVISA.d.ts +0 -0
  243. /package/{lib → dist}/models/Transaction.d.ts +0 -0
  244. /package/{lib → dist}/models/TransactionAcceptor.d.ts +0 -0
  245. /package/{lib → dist}/models/TransactionLinks.d.ts +0 -0
  246. /package/{lib → dist}/models/TransactionMessage.d.ts +0 -0
  247. /package/{lib → dist}/models/TransactionMessageAcceptor.d.ts +0 -0
  248. /package/{lib → dist}/models/UnprocessableEntity.d.ts +0 -0
  249. /package/{lib → dist}/models/UpdateCardSubscriptionRequest.d.ts +0 -0
  250. /package/{lib → dist}/models/UpdateSubaccountRequest.d.ts +0 -0
  251. /package/{lib → dist}/runtime.d.ts +0 -0
@@ -0,0 +1,51 @@
1
+
2
+ # Webhook
3
+
4
+ Astrada\'s Webhook resource.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `_links` | [CardholderLinks](CardholderLinks.md)
11
+ `id` | string
12
+ `url` | string
13
+ `description` | string
14
+ `eventTypes` | Array<string>
15
+ `subaccountId` | string
16
+ `createdAt` | Date
17
+ `updatedAt` | Date
18
+ `enabled` | boolean
19
+
20
+ ## Example
21
+
22
+ ```typescript
23
+ import type { Webhook } from '@astrada.co/ts-astrada-sdk'
24
+
25
+ // TODO: Update the object below with actual values
26
+ const example = {
27
+ "_links": null,
28
+ "id": null,
29
+ "url": null,
30
+ "description": null,
31
+ "eventTypes": null,
32
+ "subaccountId": null,
33
+ "createdAt": null,
34
+ "updatedAt": null,
35
+ "enabled": null,
36
+ } satisfies Webhook
37
+
38
+ console.log(example)
39
+
40
+ // Convert the instance to a JSON string
41
+ const exampleJSON: string = JSON.stringify(example)
42
+ console.log(exampleJSON)
43
+
44
+ // Parse the JSON string back to an object
45
+ const exampleParsed = JSON.parse(exampleJSON) as Webhook
46
+ console.log(exampleParsed)
47
+ ```
48
+
49
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
50
+
51
+
@@ -0,0 +1,401 @@
1
+ # WebhooksApi
2
+
3
+ All URIs are relative to *https://api.astrada.co*
4
+
5
+ | Method | HTTP request | Description |
6
+ |------------- | ------------- | -------------|
7
+ | [**createWebhook**](WebhooksApi.md#createwebhookoperation) | **POST** /webhooks | Create webhook |
8
+ | [**deleteWebhook**](WebhooksApi.md#deletewebhook) | **DELETE** /webhooks/{webhookId} | Delete webhook |
9
+ | [**getWebhook**](WebhooksApi.md#getwebhook) | **GET** /webhooks/{webhookId} | Retrieve webhook |
10
+ | [**listWebhooks**](WebhooksApi.md#listwebhooks) | **GET** /webhooks | List webhooks |
11
+ | [**updateWebhook**](WebhooksApi.md#updatewebhookoperation) | **PATCH** /webhooks/{webhookId} | Update webhook |
12
+
13
+
14
+
15
+ ## createWebhook
16
+
17
+ > CreateWebhook201Response createWebhook(createWebhookRequest)
18
+
19
+ Create webhook
20
+
21
+ Registers a new webhook for capturing event notifications.
22
+
23
+ ### Example
24
+
25
+ ```ts
26
+ import {
27
+ Configuration,
28
+ WebhooksApi,
29
+ } from '@astrada.co/ts-astrada-sdk';
30
+ import type { CreateWebhookOperationRequest } from '@astrada.co/ts-astrada-sdk';
31
+
32
+ async function example() {
33
+ console.log("🚀 Testing @astrada.co/ts-astrada-sdk SDK...");
34
+ const config = new Configuration({
35
+ // To configure OAuth2 access token for authorization: main-auth implicit
36
+ accessToken: "YOUR ACCESS TOKEN",
37
+ });
38
+ const api = new WebhooksApi(config);
39
+
40
+ const body = {
41
+ // CreateWebhookRequest
42
+ createWebhookRequest: {"url":"https://example-api.com/path","description":"Example of Webhook description","eventTypes":["transactionmessage.created"],"subaccountId":"f297d659-c13d-4219-aeaa-e10a845140a5"},
43
+ } satisfies CreateWebhookOperationRequest;
44
+
45
+ try {
46
+ const data = await api.createWebhook(body);
47
+ console.log(data);
48
+ } catch (error) {
49
+ console.error(error);
50
+ }
51
+ }
52
+
53
+ // Run the test
54
+ example().catch(console.error);
55
+ ```
56
+
57
+ ### Parameters
58
+
59
+
60
+ | Name | Type | Description | Notes |
61
+ |------------- | ------------- | ------------- | -------------|
62
+ | **createWebhookRequest** | [CreateWebhookRequest](CreateWebhookRequest.md) | | |
63
+
64
+ ### Return type
65
+
66
+ [**CreateWebhook201Response**](CreateWebhook201Response.md)
67
+
68
+ ### Authorization
69
+
70
+ [main-auth implicit](../README.md#main-auth-implicit)
71
+
72
+ ### HTTP request headers
73
+
74
+ - **Content-Type**: `application/json`
75
+ - **Accept**: `application/hal+json`, `application/problem+json`
76
+
77
+
78
+ ### HTTP response details
79
+ | Status code | Description | Response headers |
80
+ |-------------|-------------|------------------|
81
+ | **201** | Successful operation | - |
82
+ | **400** | The server cannot or will not process the request due to something that is perceived to be a client error | - |
83
+ | **401** | Authentication credentials were either missing or incorrect | - |
84
+ | **403** | Authentication credentials used do not have have permissions to perform the request | - |
85
+ | **404** | The requested resource was not found on the server | - |
86
+ | **500** | The server encountered an unexpected condition that prevented it from fulfilling the request | - |
87
+
88
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
89
+
90
+
91
+ ## deleteWebhook
92
+
93
+ > deleteWebhook(webhookId)
94
+
95
+ Delete webhook
96
+
97
+ Remove a configured webhook by its identifier. Results in the resource being deleted and no longer available.
98
+
99
+ ### Example
100
+
101
+ ```ts
102
+ import {
103
+ Configuration,
104
+ WebhooksApi,
105
+ } from '@astrada.co/ts-astrada-sdk';
106
+ import type { DeleteWebhookRequest } from '@astrada.co/ts-astrada-sdk';
107
+
108
+ async function example() {
109
+ console.log("🚀 Testing @astrada.co/ts-astrada-sdk SDK...");
110
+ const config = new Configuration({
111
+ // To configure OAuth2 access token for authorization: main-auth implicit
112
+ accessToken: "YOUR ACCESS TOKEN",
113
+ });
114
+ const api = new WebhooksApi(config);
115
+
116
+ const body = {
117
+ // string
118
+ webhookId: 3c750084-a60f-478c-ab91-c53567d11fac,
119
+ } satisfies DeleteWebhookRequest;
120
+
121
+ try {
122
+ const data = await api.deleteWebhook(body);
123
+ console.log(data);
124
+ } catch (error) {
125
+ console.error(error);
126
+ }
127
+ }
128
+
129
+ // Run the test
130
+ example().catch(console.error);
131
+ ```
132
+
133
+ ### Parameters
134
+
135
+
136
+ | Name | Type | Description | Notes |
137
+ |------------- | ------------- | ------------- | -------------|
138
+ | **webhookId** | `string` | | [Defaults to `undefined`] |
139
+
140
+ ### Return type
141
+
142
+ `void` (Empty response body)
143
+
144
+ ### Authorization
145
+
146
+ [main-auth implicit](../README.md#main-auth-implicit)
147
+
148
+ ### HTTP request headers
149
+
150
+ - **Content-Type**: Not defined
151
+ - **Accept**: `application/problem+json`
152
+
153
+
154
+ ### HTTP response details
155
+ | Status code | Description | Response headers |
156
+ |-------------|-------------|------------------|
157
+ | **204** | Successful operation | - |
158
+ | **400** | The server cannot or will not process the request due to something that is perceived to be a client error | - |
159
+ | **401** | Authentication credentials were either missing or incorrect | - |
160
+ | **403** | Authentication credentials used do not have have permissions to perform the request | - |
161
+ | **404** | The requested resource was not found on the server | - |
162
+ | **500** | The server encountered an unexpected condition that prevented it from fulfilling the request | - |
163
+
164
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
165
+
166
+
167
+ ## getWebhook
168
+
169
+ > Webhook getWebhook(webhookId)
170
+
171
+ Retrieve webhook
172
+
173
+ Returns detailed information about a specific webhook by its identifier, including its configuration and event subscription details.
174
+
175
+ ### Example
176
+
177
+ ```ts
178
+ import {
179
+ Configuration,
180
+ WebhooksApi,
181
+ } from '@astrada.co/ts-astrada-sdk';
182
+ import type { GetWebhookRequest } from '@astrada.co/ts-astrada-sdk';
183
+
184
+ async function example() {
185
+ console.log("🚀 Testing @astrada.co/ts-astrada-sdk SDK...");
186
+ const config = new Configuration({
187
+ // To configure OAuth2 access token for authorization: main-auth implicit
188
+ accessToken: "YOUR ACCESS TOKEN",
189
+ });
190
+ const api = new WebhooksApi(config);
191
+
192
+ const body = {
193
+ // string
194
+ webhookId: 3c750084-a60f-478c-ab91-c53567d11fac,
195
+ } satisfies GetWebhookRequest;
196
+
197
+ try {
198
+ const data = await api.getWebhook(body);
199
+ console.log(data);
200
+ } catch (error) {
201
+ console.error(error);
202
+ }
203
+ }
204
+
205
+ // Run the test
206
+ example().catch(console.error);
207
+ ```
208
+
209
+ ### Parameters
210
+
211
+
212
+ | Name | Type | Description | Notes |
213
+ |------------- | ------------- | ------------- | -------------|
214
+ | **webhookId** | `string` | | [Defaults to `undefined`] |
215
+
216
+ ### Return type
217
+
218
+ [**Webhook**](Webhook.md)
219
+
220
+ ### Authorization
221
+
222
+ [main-auth implicit](../README.md#main-auth-implicit)
223
+
224
+ ### HTTP request headers
225
+
226
+ - **Content-Type**: Not defined
227
+ - **Accept**: `application/hal+json`, `application/problem+json`
228
+
229
+
230
+ ### HTTP response details
231
+ | Status code | Description | Response headers |
232
+ |-------------|-------------|------------------|
233
+ | **200** | Successful operation | - |
234
+ | **400** | The server cannot or will not process the request due to something that is perceived to be a client error | - |
235
+ | **401** | Authentication credentials were either missing or incorrect | - |
236
+ | **403** | Authentication credentials used do not have have permissions to perform the request | - |
237
+ | **404** | The requested resource was not found on the server | - |
238
+ | **500** | The server encountered an unexpected condition that prevented it from fulfilling the request | - |
239
+
240
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
241
+
242
+
243
+ ## listWebhooks
244
+
245
+ > ListWebhooks200Response listWebhooks(subaccountId, limit, cursor)
246
+
247
+ List webhooks
248
+
249
+ Returns all webhooks configured under the account, optionally filtered by subaccount, including details on the events each webhook is subscribed to. This endpoint supports [cursor-based pagination](https://docs.astrada.co/reference/pagination).
250
+
251
+ ### Example
252
+
253
+ ```ts
254
+ import {
255
+ Configuration,
256
+ WebhooksApi,
257
+ } from '@astrada.co/ts-astrada-sdk';
258
+ import type { ListWebhooksRequest } from '@astrada.co/ts-astrada-sdk';
259
+
260
+ async function example() {
261
+ console.log("🚀 Testing @astrada.co/ts-astrada-sdk SDK...");
262
+ const config = new Configuration({
263
+ // To configure OAuth2 access token for authorization: main-auth implicit
264
+ accessToken: "YOUR ACCESS TOKEN",
265
+ });
266
+ const api = new WebhooksApi(config);
267
+
268
+ const body = {
269
+ // string (optional)
270
+ subaccountId: 2fd4d402-b759-479c-87a6-58d85e345356,
271
+ // number | Maximum number of items to return (optional)
272
+ limit: 100,
273
+ // string | The cursor to use for pagination. Identifies your place on the list (optional)
274
+ cursor: ZXhhbXBsZQ==,
275
+ } satisfies ListWebhooksRequest;
276
+
277
+ try {
278
+ const data = await api.listWebhooks(body);
279
+ console.log(data);
280
+ } catch (error) {
281
+ console.error(error);
282
+ }
283
+ }
284
+
285
+ // Run the test
286
+ example().catch(console.error);
287
+ ```
288
+
289
+ ### Parameters
290
+
291
+
292
+ | Name | Type | Description | Notes |
293
+ |------------- | ------------- | ------------- | -------------|
294
+ | **subaccountId** | `string` | | [Optional] [Defaults to `undefined`] |
295
+ | **limit** | `number` | Maximum number of items to return | [Optional] [Defaults to `undefined`] |
296
+ | **cursor** | `string` | The cursor to use for pagination. Identifies your place on the list | [Optional] [Defaults to `undefined`] |
297
+
298
+ ### Return type
299
+
300
+ [**ListWebhooks200Response**](ListWebhooks200Response.md)
301
+
302
+ ### Authorization
303
+
304
+ [main-auth implicit](../README.md#main-auth-implicit)
305
+
306
+ ### HTTP request headers
307
+
308
+ - **Content-Type**: Not defined
309
+ - **Accept**: `application/hal+json`, `application/problem+json`
310
+
311
+
312
+ ### HTTP response details
313
+ | Status code | Description | Response headers |
314
+ |-------------|-------------|------------------|
315
+ | **200** | Successful operation | - |
316
+ | **400** | The server cannot or will not process the request due to something that is perceived to be a client error | - |
317
+ | **401** | Authentication credentials were either missing or incorrect | - |
318
+ | **403** | Authentication credentials used do not have have permissions to perform the request | - |
319
+ | **500** | The server encountered an unexpected condition that prevented it from fulfilling the request | - |
320
+
321
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
322
+
323
+
324
+ ## updateWebhook
325
+
326
+ > Webhook updateWebhook(webhookId, updateWebhookRequest)
327
+
328
+ Update webhook
329
+
330
+ Updates the configuration of an existing webhook, allowing changes to the event subscriptions or notification URL.
331
+
332
+ ### Example
333
+
334
+ ```ts
335
+ import {
336
+ Configuration,
337
+ WebhooksApi,
338
+ } from '@astrada.co/ts-astrada-sdk';
339
+ import type { UpdateWebhookOperationRequest } from '@astrada.co/ts-astrada-sdk';
340
+
341
+ async function example() {
342
+ console.log("🚀 Testing @astrada.co/ts-astrada-sdk SDK...");
343
+ const config = new Configuration({
344
+ // To configure OAuth2 access token for authorization: main-auth implicit
345
+ accessToken: "YOUR ACCESS TOKEN",
346
+ });
347
+ const api = new WebhooksApi(config);
348
+
349
+ const body = {
350
+ // string
351
+ webhookId: 3c750084-a60f-478c-ab91-c53567d11fac,
352
+ // UpdateWebhookRequest
353
+ updateWebhookRequest: ...,
354
+ } satisfies UpdateWebhookOperationRequest;
355
+
356
+ try {
357
+ const data = await api.updateWebhook(body);
358
+ console.log(data);
359
+ } catch (error) {
360
+ console.error(error);
361
+ }
362
+ }
363
+
364
+ // Run the test
365
+ example().catch(console.error);
366
+ ```
367
+
368
+ ### Parameters
369
+
370
+
371
+ | Name | Type | Description | Notes |
372
+ |------------- | ------------- | ------------- | -------------|
373
+ | **webhookId** | `string` | | [Defaults to `undefined`] |
374
+ | **updateWebhookRequest** | [UpdateWebhookRequest](UpdateWebhookRequest.md) | | |
375
+
376
+ ### Return type
377
+
378
+ [**Webhook**](Webhook.md)
379
+
380
+ ### Authorization
381
+
382
+ [main-auth implicit](../README.md#main-auth-implicit)
383
+
384
+ ### HTTP request headers
385
+
386
+ - **Content-Type**: `application/json`
387
+ - **Accept**: `application/hal+json`, `application/problem+json`
388
+
389
+
390
+ ### HTTP response details
391
+ | Status code | Description | Response headers |
392
+ |-------------|-------------|------------------|
393
+ | **200** | Successful operation | - |
394
+ | **400** | The server cannot or will not process the request due to something that is perceived to be a client error | - |
395
+ | **401** | Authentication credentials were either missing or incorrect | - |
396
+ | **403** | Authentication credentials used do not have have permissions to perform the request | - |
397
+ | **404** | The requested resource was not found on the server | - |
398
+ | **500** | The server encountered an unexpected condition that prevented it from fulfilling the request | - |
399
+
400
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
401
+
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
3
+ "spaces": 2,
4
+ "generator-cli": {
5
+ "version": "7.17.0"
6
+ }
7
+ }
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@astrada.co/ts-astrada-sdk",
3
- "version": "1.1.0",
4
- "description": "",
5
- "author": "FidelLimited",
6
- "license": "MIT",
3
+ "version": "1.3.0",
4
+ "description": "Astrada's API client SDK for JavaScript/TypeScript",
5
+ "author": "Astrada",
7
6
  "repository": {
8
7
  "type": "git",
9
- "url": "git+https://github.com/FidelLimited/ts-astrada-sdk.git"
8
+ "url": "https://github.com/FidelLimited/ts-astrada-sdk.git"
10
9
  },
11
- "homepage": "https://github.com/FidelLimited/ts-astrada-sdk#readme",
12
- "main": "lib/index.js",
10
+ "license": "MIT",
11
+ "main": "./dist/index.js",
12
+ "types": "./dist/index.d.ts",
13
13
  "scripts": {
14
- "prebuild": "rm -rf lib",
15
- "build": "tsc"
14
+ "prebuild": "rm -rf dist",
15
+ "build": "tsc",
16
+ "prepare": "npm run build"
16
17
  },
17
18
  "devDependencies": {
18
- "@types/node": "^24.7.0",
19
- "typescript": "^5.9.3"
19
+ "typescript": "^4.0 || ^5.0"
20
20
  }
21
21
  }
@@ -16,26 +16,26 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  Card,
19
- InlineObject,
20
- InlineObject1,
21
- InlineObject2,
22
- InlineObject3,
23
- InlineObject4,
19
+ GetCardSubscription404Response,
20
+ ListCardSubscriptions400Response,
21
+ ListCardSubscriptions401Response,
22
+ ListCardSubscriptions403Response,
23
+ ListCardSubscriptions500Response,
24
24
  ListCards200Response,
25
25
  } from '../models/index';
26
26
  import {
27
27
  CardFromJSON,
28
28
  CardToJSON,
29
- InlineObjectFromJSON,
30
- InlineObjectToJSON,
31
- InlineObject1FromJSON,
32
- InlineObject1ToJSON,
33
- InlineObject2FromJSON,
34
- InlineObject2ToJSON,
35
- InlineObject3FromJSON,
36
- InlineObject3ToJSON,
37
- InlineObject4FromJSON,
38
- InlineObject4ToJSON,
29
+ GetCardSubscription404ResponseFromJSON,
30
+ GetCardSubscription404ResponseToJSON,
31
+ ListCardSubscriptions400ResponseFromJSON,
32
+ ListCardSubscriptions400ResponseToJSON,
33
+ ListCardSubscriptions401ResponseFromJSON,
34
+ ListCardSubscriptions401ResponseToJSON,
35
+ ListCardSubscriptions403ResponseFromJSON,
36
+ ListCardSubscriptions403ResponseToJSON,
37
+ ListCardSubscriptions500ResponseFromJSON,
38
+ ListCardSubscriptions500ResponseToJSON,
39
39
  ListCards200ResponseFromJSON,
40
40
  ListCards200ResponseToJSON,
41
41
  } from '../models/index';
@@ -17,12 +17,12 @@ import * as runtime from '../runtime';
17
17
  import type {
18
18
  CardSubscription,
19
19
  Conflict,
20
- InlineObject,
21
- InlineObject1,
22
- InlineObject2,
23
- InlineObject3,
24
- InlineObject4,
20
+ GetCardSubscription404Response,
25
21
  ListCardSubscriptions200Response,
22
+ ListCardSubscriptions400Response,
23
+ ListCardSubscriptions401Response,
24
+ ListCardSubscriptions403Response,
25
+ ListCardSubscriptions500Response,
26
26
  UnprocessableEntity,
27
27
  UpdateCardSubscriptionRequest,
28
28
  } from '../models/index';
@@ -31,18 +31,18 @@ import {
31
31
  CardSubscriptionToJSON,
32
32
  ConflictFromJSON,
33
33
  ConflictToJSON,
34
- InlineObjectFromJSON,
35
- InlineObjectToJSON,
36
- InlineObject1FromJSON,
37
- InlineObject1ToJSON,
38
- InlineObject2FromJSON,
39
- InlineObject2ToJSON,
40
- InlineObject3FromJSON,
41
- InlineObject3ToJSON,
42
- InlineObject4FromJSON,
43
- InlineObject4ToJSON,
34
+ GetCardSubscription404ResponseFromJSON,
35
+ GetCardSubscription404ResponseToJSON,
44
36
  ListCardSubscriptions200ResponseFromJSON,
45
37
  ListCardSubscriptions200ResponseToJSON,
38
+ ListCardSubscriptions400ResponseFromJSON,
39
+ ListCardSubscriptions400ResponseToJSON,
40
+ ListCardSubscriptions401ResponseFromJSON,
41
+ ListCardSubscriptions401ResponseToJSON,
42
+ ListCardSubscriptions403ResponseFromJSON,
43
+ ListCardSubscriptions403ResponseToJSON,
44
+ ListCardSubscriptions500ResponseFromJSON,
45
+ ListCardSubscriptions500ResponseToJSON,
46
46
  UnprocessableEntityFromJSON,
47
47
  UnprocessableEntityToJSON,
48
48
  UpdateCardSubscriptionRequestFromJSON,
@@ -16,25 +16,25 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  Cardholder,
19
- InlineObject,
20
- InlineObject1,
21
- InlineObject2,
22
- InlineObject3,
23
- InlineObject4,
19
+ GetCardSubscription404Response,
20
+ ListCardSubscriptions400Response,
21
+ ListCardSubscriptions401Response,
22
+ ListCardSubscriptions403Response,
23
+ ListCardSubscriptions500Response,
24
24
  } from '../models/index';
25
25
  import {
26
26
  CardholderFromJSON,
27
27
  CardholderToJSON,
28
- InlineObjectFromJSON,
29
- InlineObjectToJSON,
30
- InlineObject1FromJSON,
31
- InlineObject1ToJSON,
32
- InlineObject2FromJSON,
33
- InlineObject2ToJSON,
34
- InlineObject3FromJSON,
35
- InlineObject3ToJSON,
36
- InlineObject4FromJSON,
37
- InlineObject4ToJSON,
28
+ GetCardSubscription404ResponseFromJSON,
29
+ GetCardSubscription404ResponseToJSON,
30
+ ListCardSubscriptions400ResponseFromJSON,
31
+ ListCardSubscriptions400ResponseToJSON,
32
+ ListCardSubscriptions401ResponseFromJSON,
33
+ ListCardSubscriptions401ResponseToJSON,
34
+ ListCardSubscriptions403ResponseFromJSON,
35
+ ListCardSubscriptions403ResponseToJSON,
36
+ ListCardSubscriptions500ResponseFromJSON,
37
+ ListCardSubscriptions500ResponseToJSON,
38
38
  } from '../models/index';
39
39
 
40
40
  export interface GetCardholderRequest {
@@ -16,28 +16,28 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  EnrollmentMethods200Response,
19
+ EnrollmentMethods413Response,
19
20
  EnrollmentMethodsRequest,
20
- InlineObject,
21
- InlineObject1,
22
- InlineObject2,
23
- InlineObject3,
24
- InlineObject5,
21
+ ListCardSubscriptions400Response,
22
+ ListCardSubscriptions401Response,
23
+ ListCardSubscriptions403Response,
24
+ ListCardSubscriptions500Response,
25
25
  } from '../models/index';
26
26
  import {
27
27
  EnrollmentMethods200ResponseFromJSON,
28
28
  EnrollmentMethods200ResponseToJSON,
29
+ EnrollmentMethods413ResponseFromJSON,
30
+ EnrollmentMethods413ResponseToJSON,
29
31
  EnrollmentMethodsRequestFromJSON,
30
32
  EnrollmentMethodsRequestToJSON,
31
- InlineObjectFromJSON,
32
- InlineObjectToJSON,
33
- InlineObject1FromJSON,
34
- InlineObject1ToJSON,
35
- InlineObject2FromJSON,
36
- InlineObject2ToJSON,
37
- InlineObject3FromJSON,
38
- InlineObject3ToJSON,
39
- InlineObject5FromJSON,
40
- InlineObject5ToJSON,
33
+ ListCardSubscriptions400ResponseFromJSON,
34
+ ListCardSubscriptions400ResponseToJSON,
35
+ ListCardSubscriptions401ResponseFromJSON,
36
+ ListCardSubscriptions401ResponseToJSON,
37
+ ListCardSubscriptions403ResponseFromJSON,
38
+ ListCardSubscriptions403ResponseToJSON,
39
+ ListCardSubscriptions500ResponseFromJSON,
40
+ ListCardSubscriptions500ResponseToJSON,
41
41
  } from '../models/index';
42
42
 
43
43
  export interface EnrollmentMethodsOperationRequest {