increase 0.261.0 → 0.262.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 (63) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/index.d.mts +9 -0
  3. package/index.d.ts +9 -0
  4. package/index.d.ts.map +1 -1
  5. package/index.js +12 -0
  6. package/index.js.map +1 -1
  7. package/index.mjs +12 -0
  8. package/index.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/card-push-transfers.d.ts +633 -0
  11. package/resources/card-push-transfers.d.ts.map +1 -0
  12. package/resources/card-push-transfers.js +94 -0
  13. package/resources/card-push-transfers.js.map +1 -0
  14. package/resources/card-push-transfers.mjs +89 -0
  15. package/resources/card-push-transfers.mjs.map +1 -0
  16. package/resources/card-tokens.d.ts +154 -0
  17. package/resources/card-tokens.d.ts.map +1 -0
  18. package/resources/card-tokens.js +50 -0
  19. package/resources/card-tokens.js.map +1 -0
  20. package/resources/card-tokens.mjs +45 -0
  21. package/resources/card-tokens.mjs.map +1 -0
  22. package/resources/card-validations.d.ts +508 -0
  23. package/resources/card-validations.d.ts.map +1 -0
  24. package/resources/card-validations.js +54 -0
  25. package/resources/card-validations.js.map +1 -0
  26. package/resources/card-validations.mjs +49 -0
  27. package/resources/card-validations.mjs.map +1 -0
  28. package/resources/index.d.ts +3 -0
  29. package/resources/index.d.ts.map +1 -1
  30. package/resources/index.js +12 -2
  31. package/resources/index.js.map +1 -1
  32. package/resources/index.mjs +3 -0
  33. package/resources/index.mjs.map +1 -1
  34. package/resources/simulations/card-tokens.d.ts +66 -0
  35. package/resources/simulations/card-tokens.d.ts.map +1 -0
  36. package/resources/simulations/card-tokens.js +21 -0
  37. package/resources/simulations/card-tokens.js.map +1 -0
  38. package/resources/simulations/card-tokens.mjs +17 -0
  39. package/resources/simulations/card-tokens.mjs.map +1 -0
  40. package/resources/simulations/index.d.ts +1 -0
  41. package/resources/simulations/index.d.ts.map +1 -1
  42. package/resources/simulations/index.js +3 -1
  43. package/resources/simulations/index.js.map +1 -1
  44. package/resources/simulations/index.mjs +1 -0
  45. package/resources/simulations/index.mjs.map +1 -1
  46. package/resources/simulations/simulations.d.ts +4 -0
  47. package/resources/simulations/simulations.d.ts.map +1 -1
  48. package/resources/simulations/simulations.js +4 -0
  49. package/resources/simulations/simulations.js.map +1 -1
  50. package/resources/simulations/simulations.mjs +4 -0
  51. package/resources/simulations/simulations.mjs.map +1 -1
  52. package/src/index.ts +54 -0
  53. package/src/resources/card-push-transfers.ts +834 -0
  54. package/src/resources/card-tokens.ts +200 -0
  55. package/src/resources/card-validations.ts +643 -0
  56. package/src/resources/index.ts +21 -0
  57. package/src/resources/simulations/card-tokens.ts +82 -0
  58. package/src/resources/simulations/index.ts +1 -0
  59. package/src/resources/simulations/simulations.ts +6 -0
  60. package/src/version.ts +1 -1
  61. package/version.d.ts +1 -1
  62. package/version.js +1 -1
  63. package/version.mjs +1 -1
@@ -0,0 +1,200 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../resource';
4
+ import { isRequestOptions } from '../core';
5
+ import * as Core from '../core';
6
+ import { Page, type PageParams } from '../pagination';
7
+
8
+ export class CardTokens extends APIResource {
9
+ /**
10
+ * Retrieve a Card Token
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const cardToken = await client.cardTokens.retrieve(
15
+ * 'outbound_card_token_zlt0ml6youq3q7vcdlg0',
16
+ * );
17
+ * ```
18
+ */
19
+ retrieve(cardTokenId: string, options?: Core.RequestOptions): Core.APIPromise<CardToken> {
20
+ return this._client.get(`/card_tokens/${cardTokenId}`, options);
21
+ }
22
+
23
+ /**
24
+ * List Card Tokens
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * // Automatically fetches more pages as needed.
29
+ * for await (const cardToken of client.cardTokens.list()) {
30
+ * // ...
31
+ * }
32
+ * ```
33
+ */
34
+ list(
35
+ query?: CardTokenListParams,
36
+ options?: Core.RequestOptions,
37
+ ): Core.PagePromise<CardTokensPage, CardToken>;
38
+ list(options?: Core.RequestOptions): Core.PagePromise<CardTokensPage, CardToken>;
39
+ list(
40
+ query: CardTokenListParams | Core.RequestOptions = {},
41
+ options?: Core.RequestOptions,
42
+ ): Core.PagePromise<CardTokensPage, CardToken> {
43
+ if (isRequestOptions(query)) {
44
+ return this.list({}, query);
45
+ }
46
+ return this._client.getAPIList('/card_tokens', CardTokensPage, { query, ...options });
47
+ }
48
+
49
+ /**
50
+ * The capabilities of a Card Token describe whether the card can be used for
51
+ * specific operations, such as Card Push Transfers. The capabilities can change
52
+ * over time based on the issuing bank's configuration of the card range.
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * const cardTokenCapabilities =
57
+ * await client.cardTokens.capabilities(
58
+ * 'outbound_card_token_zlt0ml6youq3q7vcdlg0',
59
+ * );
60
+ * ```
61
+ */
62
+ capabilities(cardTokenId: string, options?: Core.RequestOptions): Core.APIPromise<CardTokenCapabilities> {
63
+ return this._client.get(`/card_tokens/${cardTokenId}/capabilities`, options);
64
+ }
65
+ }
66
+
67
+ export class CardTokensPage extends Page<CardToken> {}
68
+
69
+ /**
70
+ * Card Tokens represent a tokenized card number that can be used for Card Push
71
+ * Transfers and Card Validations.
72
+ */
73
+ export interface CardToken {
74
+ /**
75
+ * The Card Token's identifier.
76
+ */
77
+ id: string;
78
+
79
+ /**
80
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
81
+ * the card token was created.
82
+ */
83
+ created_at: string;
84
+
85
+ /**
86
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the card
87
+ * expires.
88
+ */
89
+ expiration_date: string;
90
+
91
+ /**
92
+ * The last 4 digits of the card number.
93
+ */
94
+ last4: string;
95
+
96
+ /**
97
+ * The length of the card number.
98
+ */
99
+ length: number;
100
+
101
+ /**
102
+ * The prefix of the card number, usually 8 digits.
103
+ */
104
+ prefix: string;
105
+
106
+ /**
107
+ * A constant representing the object's type. For this resource it will always be
108
+ * `card_token`.
109
+ */
110
+ type: 'card_token';
111
+ }
112
+
113
+ /**
114
+ * The capabilities of a Card Token describe whether the card can be used for
115
+ * specific operations, such as Card Push Transfers. The capabilities can change
116
+ * over time based on the issuing bank's configuration of the card range.
117
+ */
118
+ export interface CardTokenCapabilities {
119
+ /**
120
+ * Each route represent a path e.g., a push transfer can take.
121
+ */
122
+ routes: Array<CardTokenCapabilities.Route>;
123
+
124
+ /**
125
+ * A constant representing the object's type. For this resource it will always be
126
+ * `card_token_capabilities`.
127
+ */
128
+ type: 'card_token_capabilities';
129
+ }
130
+
131
+ export namespace CardTokenCapabilities {
132
+ export interface Route {
133
+ /**
134
+ * Whether you can push funds to the card using cross-border Card Push Transfers.
135
+ *
136
+ * - `supported` - The capability is supported.
137
+ * - `not_supported` - The capability is not supported.
138
+ */
139
+ cross_border_push_transfers: 'supported' | 'not_supported';
140
+
141
+ /**
142
+ * Whether you can push funds to the card using domestic Card Push Transfers.
143
+ *
144
+ * - `supported` - The capability is supported.
145
+ * - `not_supported` - The capability is not supported.
146
+ */
147
+ domestic_push_transfers: 'supported' | 'not_supported';
148
+
149
+ /**
150
+ * The card network route the capabilities apply to.
151
+ *
152
+ * - `visa` - Visa and Interlink
153
+ * - `mastercard` - Mastercard and Maestro
154
+ */
155
+ route: 'visa' | 'mastercard';
156
+ }
157
+ }
158
+
159
+ export interface CardTokenListParams extends PageParams {
160
+ created_at?: CardTokenListParams.CreatedAt;
161
+ }
162
+
163
+ export namespace CardTokenListParams {
164
+ export interface CreatedAt {
165
+ /**
166
+ * Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
167
+ * timestamp.
168
+ */
169
+ after?: string;
170
+
171
+ /**
172
+ * Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
173
+ * timestamp.
174
+ */
175
+ before?: string;
176
+
177
+ /**
178
+ * Return results on or after this
179
+ * [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
180
+ */
181
+ on_or_after?: string;
182
+
183
+ /**
184
+ * Return results on or before this
185
+ * [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
186
+ */
187
+ on_or_before?: string;
188
+ }
189
+ }
190
+
191
+ CardTokens.CardTokensPage = CardTokensPage;
192
+
193
+ export declare namespace CardTokens {
194
+ export {
195
+ type CardToken as CardToken,
196
+ type CardTokenCapabilities as CardTokenCapabilities,
197
+ CardTokensPage as CardTokensPage,
198
+ type CardTokenListParams as CardTokenListParams,
199
+ };
200
+ }