@mobilerun/sdk 5.3.0 → 5.5.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/CHANGELOG.md +16 -0
- package/client.d.mts +5 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -5
- package/client.d.ts.map +1 -1
- package/client.js +3 -3
- package/client.js.map +1 -1
- package/client.mjs +3 -3
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/apps.d.mts +10 -2
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +10 -2
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js +3 -1
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs +3 -1
- package/resources/apps.mjs.map +1 -1
- package/resources/assistant/conversations.d.mts +26 -4
- package/resources/assistant/conversations.d.mts.map +1 -1
- package/resources/assistant/conversations.d.ts +26 -4
- package/resources/assistant/conversations.d.ts.map +1 -1
- package/resources/assistant/conversations.js +12 -4
- package/resources/assistant/conversations.js.map +1 -1
- package/resources/assistant/conversations.mjs +12 -4
- package/resources/assistant/conversations.mjs.map +1 -1
- package/resources/connect/proxies.d.mts +36 -20
- package/resources/connect/proxies.d.mts.map +1 -1
- package/resources/connect/proxies.d.ts +36 -20
- package/resources/connect/proxies.d.ts.map +1 -1
- package/resources/connect/proxies.js +10 -2
- package/resources/connect/proxies.js.map +1 -1
- package/resources/connect/proxies.mjs +10 -2
- package/resources/connect/proxies.mjs.map +1 -1
- package/resources/devices/apps.d.mts +37 -17
- package/resources/devices/apps.d.mts.map +1 -1
- package/resources/devices/apps.d.ts +37 -17
- package/resources/devices/apps.d.ts.map +1 -1
- package/resources/devices/apps.js +15 -14
- package/resources/devices/apps.js.map +1 -1
- package/resources/devices/apps.mjs +15 -14
- package/resources/devices/apps.mjs.map +1 -1
- package/resources/devices/devices.d.mts +29 -4
- package/resources/devices/devices.d.mts.map +1 -1
- package/resources/devices/devices.d.ts +29 -4
- package/resources/devices/devices.d.ts.map +1 -1
- package/resources/devices/devices.js +7 -4
- package/resources/devices/devices.js.map +1 -1
- package/resources/devices/devices.mjs +7 -4
- package/resources/devices/devices.mjs.map +1 -1
- package/resources/devices/index.d.mts +1 -0
- package/resources/devices/index.d.mts.map +1 -1
- package/resources/devices/index.d.ts +1 -0
- package/resources/devices/index.d.ts.map +1 -1
- package/resources/devices/index.js +3 -1
- package/resources/devices/index.js.map +1 -1
- package/resources/devices/index.mjs +1 -0
- package/resources/devices/index.mjs.map +1 -1
- package/resources/devices/keyboard.d.mts +9 -3
- package/resources/devices/keyboard.d.mts.map +1 -1
- package/resources/devices/keyboard.d.ts +9 -3
- package/resources/devices/keyboard.d.ts.map +1 -1
- package/resources/devices/keyboard.js +3 -3
- package/resources/devices/keyboard.mjs +3 -3
- package/resources/devices/recordings.d.mts +11 -0
- package/resources/devices/recordings.d.mts.map +1 -1
- package/resources/devices/recordings.d.ts +11 -0
- package/resources/devices/recordings.d.ts.map +1 -1
- package/resources/devices/traffic-sessions.d.mts +173 -0
- package/resources/devices/traffic-sessions.d.mts.map +1 -0
- package/resources/devices/traffic-sessions.d.ts +173 -0
- package/resources/devices/traffic-sessions.d.ts.map +1 -0
- package/resources/devices/traffic-sessions.js +43 -0
- package/resources/devices/traffic-sessions.js.map +1 -0
- package/resources/devices/traffic-sessions.mjs +39 -0
- package/resources/devices/traffic-sessions.mjs.map +1 -0
- package/resources/files.d.mts +72 -0
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +72 -0
- package/resources/files.d.ts.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/mailboxes/index.d.mts +3 -0
- package/resources/mailboxes/index.d.mts.map +1 -0
- package/resources/mailboxes/index.d.ts +3 -0
- package/resources/mailboxes/index.d.ts.map +1 -0
- package/resources/{esims → mailboxes}/index.js +3 -3
- package/resources/mailboxes/index.js.map +1 -0
- package/resources/{esims → mailboxes}/index.mjs +1 -1
- package/resources/mailboxes/index.mjs.map +1 -0
- package/resources/mailboxes/mailboxes.d.mts +374 -0
- package/resources/mailboxes/mailboxes.d.mts.map +1 -0
- package/resources/mailboxes/mailboxes.d.ts +374 -0
- package/resources/mailboxes/mailboxes.d.ts.map +1 -0
- package/resources/mailboxes/mailboxes.js +139 -0
- package/resources/mailboxes/mailboxes.js.map +1 -0
- package/resources/mailboxes/mailboxes.mjs +134 -0
- package/resources/mailboxes/mailboxes.mjs.map +1 -0
- package/resources/mailboxes/messages.d.mts +82 -0
- package/resources/mailboxes/messages.d.mts.map +1 -0
- package/resources/mailboxes/messages.d.ts +82 -0
- package/resources/mailboxes/messages.d.ts.map +1 -0
- package/resources/mailboxes/messages.js +39 -0
- package/resources/mailboxes/messages.js.map +1 -0
- package/resources/mailboxes/messages.mjs +35 -0
- package/resources/mailboxes/messages.mjs.map +1 -0
- package/resources/mailboxes.d.mts +2 -0
- package/resources/mailboxes.d.mts.map +1 -0
- package/resources/mailboxes.d.ts +2 -0
- package/resources/mailboxes.d.ts.map +1 -0
- package/resources/{esims.js → mailboxes.js} +2 -2
- package/resources/mailboxes.js.map +1 -0
- package/resources/{esims.mjs → mailboxes.mjs} +2 -2
- package/resources/mailboxes.mjs.map +1 -0
- package/resources/messages/conversations.d.mts +4 -15
- package/resources/messages/conversations.d.mts.map +1 -1
- package/resources/messages/conversations.d.ts +4 -15
- package/resources/messages/conversations.d.ts.map +1 -1
- package/resources/messages/conversations.js +4 -15
- package/resources/messages/conversations.js.map +1 -1
- package/resources/messages/conversations.mjs +4 -15
- package/resources/messages/conversations.mjs.map +1 -1
- package/resources/messages/messages.d.mts +2 -4
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +2 -4
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +2 -4
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +2 -4
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/numbers/index.d.mts +1 -1
- package/resources/numbers/index.d.mts.map +1 -1
- package/resources/numbers/index.d.ts +1 -1
- package/resources/numbers/index.d.ts.map +1 -1
- package/resources/numbers/index.js.map +1 -1
- package/resources/numbers/index.mjs.map +1 -1
- package/resources/numbers/numbers.d.mts +48 -35
- package/resources/numbers/numbers.d.mts.map +1 -1
- package/resources/numbers/numbers.d.ts +48 -35
- package/resources/numbers/numbers.d.ts.map +1 -1
- package/resources/numbers/numbers.js +23 -29
- package/resources/numbers/numbers.js.map +1 -1
- package/resources/numbers/numbers.mjs +23 -29
- package/resources/numbers/numbers.mjs.map +1 -1
- package/resources/tasks/tasks.d.mts +80 -32
- package/resources/tasks/tasks.d.mts.map +1 -1
- package/resources/tasks/tasks.d.ts +80 -32
- package/resources/tasks/tasks.d.ts.map +1 -1
- package/resources/tasks/tasks.js.map +1 -1
- package/resources/tasks/tasks.mjs.map +1 -1
- package/resources/webhooks/webhooks.d.mts +1 -0
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +1 -0
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/resources/webhooks/webhooks.js.map +1 -1
- package/resources/webhooks/webhooks.mjs.map +1 -1
- package/resources/workflows/events.d.mts +18 -0
- package/resources/workflows/events.d.mts.map +1 -1
- package/resources/workflows/events.d.ts +18 -0
- package/resources/workflows/events.d.ts.map +1 -1
- package/resources/workflows/executions.d.mts +84 -5
- package/resources/workflows/executions.d.mts.map +1 -1
- package/resources/workflows/executions.d.ts +84 -5
- package/resources/workflows/executions.d.ts.map +1 -1
- package/resources/workflows/executions.js +3 -2
- package/resources/workflows/executions.js.map +1 -1
- package/resources/workflows/executions.mjs +3 -2
- package/resources/workflows/executions.mjs.map +1 -1
- package/resources/workflows/flows/actions.d.mts +19 -0
- package/resources/workflows/flows/actions.d.mts.map +1 -1
- package/resources/workflows/flows/actions.d.ts +19 -0
- package/resources/workflows/flows/actions.d.ts.map +1 -1
- package/resources/workflows/flows/flows.d.mts +142 -2
- package/resources/workflows/flows/flows.d.mts.map +1 -1
- package/resources/workflows/flows/flows.d.ts +142 -2
- package/resources/workflows/flows/flows.d.ts.map +1 -1
- package/resources/workflows/flows/flows.js +11 -1
- package/resources/workflows/flows/flows.js.map +1 -1
- package/resources/workflows/flows/flows.mjs +11 -1
- package/resources/workflows/flows/flows.mjs.map +1 -1
- package/resources/workflows/flows/index.d.mts +1 -1
- package/resources/workflows/flows/index.d.mts.map +1 -1
- package/resources/workflows/flows/index.d.ts +1 -1
- package/resources/workflows/flows/index.d.ts.map +1 -1
- package/resources/workflows/flows/index.js.map +1 -1
- package/resources/workflows/flows/index.mjs.map +1 -1
- package/resources/workflows/index.d.mts +1 -1
- package/resources/workflows/index.d.mts.map +1 -1
- package/resources/workflows/index.d.ts +1 -1
- package/resources/workflows/index.d.ts.map +1 -1
- package/resources/workflows/index.js.map +1 -1
- package/resources/workflows/index.mjs.map +1 -1
- package/resources/workflows/triggers.d.mts +17 -3
- package/resources/workflows/triggers.d.mts.map +1 -1
- package/resources/workflows/triggers.d.ts +17 -3
- package/resources/workflows/triggers.d.ts.map +1 -1
- package/resources/workflows/workflows.d.mts +2 -2
- package/resources/workflows/workflows.d.mts.map +1 -1
- package/resources/workflows/workflows.d.ts +2 -2
- package/resources/workflows/workflows.d.ts.map +1 -1
- package/resources/workflows/workflows.js.map +1 -1
- package/resources/workflows/workflows.mjs.map +1 -1
- package/src/client.ts +40 -40
- package/src/resources/apps.ts +11 -2
- package/src/resources/assistant/conversations.ts +38 -4
- package/src/resources/connect/proxies.ts +49 -21
- package/src/resources/devices/apps.ts +41 -17
- package/src/resources/devices/devices.ts +58 -4
- package/src/resources/devices/index.ts +11 -0
- package/src/resources/devices/keyboard.ts +10 -3
- package/src/resources/devices/recordings.ts +12 -0
- package/src/resources/devices/traffic-sessions.ts +299 -0
- package/src/resources/files.ts +114 -0
- package/src/resources/index.ts +19 -19
- package/src/resources/mailboxes/index.ts +26 -0
- package/src/resources/mailboxes/mailboxes.ts +637 -0
- package/src/resources/mailboxes/messages.ts +134 -0
- package/src/resources/{esims.ts → mailboxes.ts} +1 -1
- package/src/resources/messages/conversations.ts +4 -15
- package/src/resources/messages/messages.ts +2 -4
- package/src/resources/numbers/index.ts +2 -0
- package/src/resources/numbers/numbers.ts +58 -34
- package/src/resources/tasks/tasks.ts +120 -40
- package/src/resources/webhooks/webhooks.ts +2 -0
- package/src/resources/workflows/events.ts +24 -0
- package/src/resources/workflows/executions.ts +121 -5
- package/src/resources/workflows/flows/actions.ts +26 -0
- package/src/resources/workflows/flows/flows.ts +182 -1
- package/src/resources/workflows/flows/index.ts +1 -0
- package/src/resources/workflows/index.ts +1 -0
- package/src/resources/workflows/triggers.ts +19 -3
- package/src/resources/workflows/workflows.ts +2 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/esims/esims.d.mts +0 -566
- package/resources/esims/esims.d.mts.map +0 -1
- package/resources/esims/esims.d.ts +0 -566
- package/resources/esims/esims.d.ts.map +0 -1
- package/resources/esims/esims.js +0 -205
- package/resources/esims/esims.js.map +0 -1
- package/resources/esims/esims.mjs +0 -200
- package/resources/esims/esims.mjs.map +0 -1
- package/resources/esims/index.d.mts +0 -3
- package/resources/esims/index.d.mts.map +0 -1
- package/resources/esims/index.d.ts +0 -3
- package/resources/esims/index.d.ts.map +0 -1
- package/resources/esims/index.js.map +0 -1
- package/resources/esims/index.mjs.map +0 -1
- package/resources/esims/messages.d.mts +0 -106
- package/resources/esims/messages.d.mts.map +0 -1
- package/resources/esims/messages.d.ts +0 -106
- package/resources/esims/messages.d.ts.map +0 -1
- package/resources/esims/messages.js +0 -37
- package/resources/esims/messages.js.map +0 -1
- package/resources/esims/messages.mjs +0 -33
- package/resources/esims/messages.mjs.map +0 -1
- package/resources/esims.d.mts +0 -2
- package/resources/esims.d.mts.map +0 -1
- package/resources/esims.d.ts +0 -2
- package/resources/esims.d.ts.map +0 -1
- package/resources/esims.js.map +0 -1
- package/resources/esims.mjs.map +0 -1
- package/src/resources/esims/esims.ts +0 -1019
- package/src/resources/esims/index.ts +0 -28
- package/src/resources/esims/messages.ts +0 -187
|
@@ -7,9 +7,8 @@ import { RequestOptions } from "../../internal/request-options.mjs";
|
|
|
7
7
|
export declare class Numbers extends APIResource {
|
|
8
8
|
messages: MessagesAPI.Messages;
|
|
9
9
|
/**
|
|
10
|
-
* Starts a
|
|
11
|
-
*
|
|
12
|
-
* its business state. `purpose` and `country` are mutually exclusive.
|
|
10
|
+
* Starts a phone-number purchase. Poll the returned phone number for status
|
|
11
|
+
* updates. `purpose` and `country` cannot be combined.
|
|
13
12
|
*
|
|
14
13
|
* @example
|
|
15
14
|
* ```ts
|
|
@@ -29,11 +28,8 @@ export declare class Numbers extends APIResource {
|
|
|
29
28
|
*/
|
|
30
29
|
retrieve(id: string, options?: RequestOptions): APIPromise<NumberRetrieveResponse>;
|
|
31
30
|
/**
|
|
32
|
-
* Updates the
|
|
33
|
-
*
|
|
34
|
-
* capped at 100 characters, is display-only, and never affects routing. It also
|
|
35
|
-
* seeds the billing entity name when set at purchase time; a later change here
|
|
36
|
-
* does not rename the already-created billing entity.
|
|
31
|
+
* Updates the display label. Omitting `label` leaves it unchanged; null or an
|
|
32
|
+
* empty string clears it.
|
|
37
33
|
*
|
|
38
34
|
* @example
|
|
39
35
|
* ```ts
|
|
@@ -44,8 +40,7 @@ export declare class Numbers extends APIResource {
|
|
|
44
40
|
*/
|
|
45
41
|
update(id: string, body?: NumberUpdateParams | null | undefined, options?: RequestOptions): APIPromise<NumberUpdateResponse>;
|
|
46
42
|
/**
|
|
47
|
-
* Lists
|
|
48
|
-
* provisioned (`mobilerun`) numbers.
|
|
43
|
+
* Lists the caller's phone numbers.
|
|
49
44
|
*
|
|
50
45
|
* @example
|
|
51
46
|
* ```ts
|
|
@@ -54,23 +49,9 @@ export declare class Numbers extends APIResource {
|
|
|
54
49
|
*/
|
|
55
50
|
list(query?: NumberListParams | null | undefined, options?: RequestOptions): APIPromise<NumberListResponse>;
|
|
56
51
|
/**
|
|
57
|
-
* Cancels a
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* being processed, the checkout is closed immediately and the number is retired.
|
|
61
|
-
* - If the number is on the standard paid plan and already paid and in service,
|
|
62
|
-
* cancellation is scheduled for the end of the current billing period rather
|
|
63
|
-
* than taking effect immediately. The number stays usable through the period
|
|
64
|
-
* already paid for, with no partial refund. Calling this again while a
|
|
65
|
-
* cancellation is already scheduled is a no-op that returns the same result. The
|
|
66
|
-
* response's `state` reflects this as `cancel_scheduled` with
|
|
67
|
-
* `cancelAtPeriodEnd: true`; `currentPeriodEnd` is populated once billing
|
|
68
|
-
* confirms the cancellation.
|
|
69
|
-
*
|
|
70
|
-
* Any other state (already refunding, a permanent billing failure, a payment
|
|
71
|
-
* currently being processed, an included-plan number, or a non-hosted/BYO number)
|
|
72
|
-
* returns 409 `not_cancellable`. Returns 404 if the number doesn't exist or isn't
|
|
73
|
-
* owned by the caller.
|
|
52
|
+
* Cancels a pending purchase or schedules cancellation of an active paid phone
|
|
53
|
+
* number. Repeating a scheduled cancellation is safe. Returns 409 when
|
|
54
|
+
* cancellation is not available.
|
|
74
55
|
*
|
|
75
56
|
* @example
|
|
76
57
|
* ```ts
|
|
@@ -81,8 +62,19 @@ export declare class Numbers extends APIResource {
|
|
|
81
62
|
*/
|
|
82
63
|
delete(id: string, options?: RequestOptions): APIPromise<NumberDeleteResponse>;
|
|
83
64
|
/**
|
|
84
|
-
*
|
|
85
|
-
*
|
|
65
|
+
* Returns included phone capacity for a country. Creating a phone is
|
|
66
|
+
* authoritative.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* const response = await client.numbers.capacity({
|
|
71
|
+
* country: 'de',
|
|
72
|
+
* });
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
capacity(query: NumberCapacityParams, options?: RequestOptions): APIPromise<NumberCapacityResponse>;
|
|
76
|
+
/**
|
|
77
|
+
* Lists available countries and current phone-number availability.
|
|
86
78
|
*
|
|
87
79
|
* @example
|
|
88
80
|
* ```ts
|
|
@@ -195,6 +187,21 @@ export declare namespace NumberDeleteResponse {
|
|
|
195
187
|
updatedAt: string | null;
|
|
196
188
|
}
|
|
197
189
|
}
|
|
190
|
+
export interface NumberCapacityResponse {
|
|
191
|
+
data: NumberCapacityResponse.Data;
|
|
192
|
+
}
|
|
193
|
+
export declare namespace NumberCapacityResponse {
|
|
194
|
+
interface Data {
|
|
195
|
+
included: number;
|
|
196
|
+
/**
|
|
197
|
+
* @deprecated Deprecated — always equal to `remaining`. Migrate to `remaining`;
|
|
198
|
+
* this field will be removed in a future revision.
|
|
199
|
+
*/
|
|
200
|
+
includedRemaining: number;
|
|
201
|
+
remaining: number;
|
|
202
|
+
status: 'available' | 'exhausted' | 'not_included';
|
|
203
|
+
}
|
|
204
|
+
}
|
|
198
205
|
export interface NumberCountriesResponse {
|
|
199
206
|
data: NumberCountriesResponse.Data;
|
|
200
207
|
}
|
|
@@ -227,13 +234,13 @@ export declare namespace NumberPurposesResponse {
|
|
|
227
234
|
}
|
|
228
235
|
export interface NumberCreateParams {
|
|
229
236
|
/**
|
|
230
|
-
* Body param:
|
|
231
|
-
* checkout (
|
|
237
|
+
* Body param: Use included capacity when available, require included capacity
|
|
238
|
+
* without paid fallback (included_only), or start a paid checkout (rent).
|
|
232
239
|
*/
|
|
233
|
-
billingPreference?: 'included' | 'rent';
|
|
240
|
+
billingPreference?: 'included' | 'included_only' | 'rent';
|
|
234
241
|
/**
|
|
235
242
|
* Body param: Optional ISO 3166-1 alpha-2 country code from GET
|
|
236
|
-
* /numbers/countries. Cannot be combined with `purpose`.
|
|
243
|
+
* /numbers/phones/countries. Cannot be combined with `purpose`.
|
|
237
244
|
*/
|
|
238
245
|
country?: string;
|
|
239
246
|
/**
|
|
@@ -243,7 +250,7 @@ export interface NumberCreateParams {
|
|
|
243
250
|
*/
|
|
244
251
|
label?: string | null;
|
|
245
252
|
/**
|
|
246
|
-
* Body param: Optional
|
|
253
|
+
* Body param: Optional purpose from GET /numbers/phones/purposes.
|
|
247
254
|
*/
|
|
248
255
|
purpose?: string;
|
|
249
256
|
/**
|
|
@@ -263,8 +270,14 @@ export interface NumberListParams {
|
|
|
263
270
|
page?: number;
|
|
264
271
|
pageSize?: number;
|
|
265
272
|
}
|
|
273
|
+
export interface NumberCapacityParams {
|
|
274
|
+
/**
|
|
275
|
+
* ISO 3166-1 alpha-2 country code from GET /numbers/phones/countries.
|
|
276
|
+
*/
|
|
277
|
+
country: string;
|
|
278
|
+
}
|
|
266
279
|
export declare namespace Numbers {
|
|
267
|
-
export { type NumberCreateResponse as NumberCreateResponse, type NumberRetrieveResponse as NumberRetrieveResponse, type NumberUpdateResponse as NumberUpdateResponse, type NumberListResponse as NumberListResponse, type NumberDeleteResponse as NumberDeleteResponse, type NumberCountriesResponse as NumberCountriesResponse, type NumberPurposesResponse as NumberPurposesResponse, type NumberCreateParams as NumberCreateParams, type NumberUpdateParams as NumberUpdateParams, type NumberListParams as NumberListParams, };
|
|
280
|
+
export { type NumberCreateResponse as NumberCreateResponse, type NumberRetrieveResponse as NumberRetrieveResponse, type NumberUpdateResponse as NumberUpdateResponse, type NumberListResponse as NumberListResponse, type NumberDeleteResponse as NumberDeleteResponse, type NumberCapacityResponse as NumberCapacityResponse, type NumberCountriesResponse as NumberCountriesResponse, type NumberPurposesResponse as NumberPurposesResponse, type NumberCreateParams as NumberCreateParams, type NumberUpdateParams as NumberUpdateParams, type NumberListParams as NumberListParams, type NumberCapacityParams as NumberCapacityParams, };
|
|
268
281
|
export { Messages as Messages, type MessageListResponse as MessageListResponse, type MessageListParams as MessageListParams, };
|
|
269
282
|
}
|
|
270
283
|
//# sourceMappingURL=numbers.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numbers.d.mts","sourceRoot":"","sources":["../../src/resources/numbers/numbers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,KAAK,WAAW,uBAAmB;AAC1C,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,uBAAmB;AAC9E,OAAO,EAAE,UAAU,EAAE,mCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,OAAQ,SAAQ,WAAW;IACtC,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IAExE
|
|
1
|
+
{"version":3,"file":"numbers.d.mts","sourceRoot":"","sources":["../../src/resources/numbers/numbers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,KAAK,WAAW,uBAAmB;AAC1C,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,uBAAmB;AAC9E,OAAO,EAAE,UAAU,EAAE,mCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,OAAQ,SAAQ,WAAW;IACtC,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IAExE;;;;;;;;OAQG;IACH,MAAM,CACJ,MAAM,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oBAAoB,CAAC;IAYnC;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAIlF;;;;;;;;;;OAUG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,GAAE,kBA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C;IAEF,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
|
@@ -7,9 +7,8 @@ import { RequestOptions } from "../../internal/request-options.js";
|
|
|
7
7
|
export declare class Numbers extends APIResource {
|
|
8
8
|
messages: MessagesAPI.Messages;
|
|
9
9
|
/**
|
|
10
|
-
* Starts a
|
|
11
|
-
*
|
|
12
|
-
* its business state. `purpose` and `country` are mutually exclusive.
|
|
10
|
+
* Starts a phone-number purchase. Poll the returned phone number for status
|
|
11
|
+
* updates. `purpose` and `country` cannot be combined.
|
|
13
12
|
*
|
|
14
13
|
* @example
|
|
15
14
|
* ```ts
|
|
@@ -29,11 +28,8 @@ export declare class Numbers extends APIResource {
|
|
|
29
28
|
*/
|
|
30
29
|
retrieve(id: string, options?: RequestOptions): APIPromise<NumberRetrieveResponse>;
|
|
31
30
|
/**
|
|
32
|
-
* Updates the
|
|
33
|
-
*
|
|
34
|
-
* capped at 100 characters, is display-only, and never affects routing. It also
|
|
35
|
-
* seeds the billing entity name when set at purchase time; a later change here
|
|
36
|
-
* does not rename the already-created billing entity.
|
|
31
|
+
* Updates the display label. Omitting `label` leaves it unchanged; null or an
|
|
32
|
+
* empty string clears it.
|
|
37
33
|
*
|
|
38
34
|
* @example
|
|
39
35
|
* ```ts
|
|
@@ -44,8 +40,7 @@ export declare class Numbers extends APIResource {
|
|
|
44
40
|
*/
|
|
45
41
|
update(id: string, body?: NumberUpdateParams | null | undefined, options?: RequestOptions): APIPromise<NumberUpdateResponse>;
|
|
46
42
|
/**
|
|
47
|
-
* Lists
|
|
48
|
-
* provisioned (`mobilerun`) numbers.
|
|
43
|
+
* Lists the caller's phone numbers.
|
|
49
44
|
*
|
|
50
45
|
* @example
|
|
51
46
|
* ```ts
|
|
@@ -54,23 +49,9 @@ export declare class Numbers extends APIResource {
|
|
|
54
49
|
*/
|
|
55
50
|
list(query?: NumberListParams | null | undefined, options?: RequestOptions): APIPromise<NumberListResponse>;
|
|
56
51
|
/**
|
|
57
|
-
* Cancels a
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* being processed, the checkout is closed immediately and the number is retired.
|
|
61
|
-
* - If the number is on the standard paid plan and already paid and in service,
|
|
62
|
-
* cancellation is scheduled for the end of the current billing period rather
|
|
63
|
-
* than taking effect immediately. The number stays usable through the period
|
|
64
|
-
* already paid for, with no partial refund. Calling this again while a
|
|
65
|
-
* cancellation is already scheduled is a no-op that returns the same result. The
|
|
66
|
-
* response's `state` reflects this as `cancel_scheduled` with
|
|
67
|
-
* `cancelAtPeriodEnd: true`; `currentPeriodEnd` is populated once billing
|
|
68
|
-
* confirms the cancellation.
|
|
69
|
-
*
|
|
70
|
-
* Any other state (already refunding, a permanent billing failure, a payment
|
|
71
|
-
* currently being processed, an included-plan number, or a non-hosted/BYO number)
|
|
72
|
-
* returns 409 `not_cancellable`. Returns 404 if the number doesn't exist or isn't
|
|
73
|
-
* owned by the caller.
|
|
52
|
+
* Cancels a pending purchase or schedules cancellation of an active paid phone
|
|
53
|
+
* number. Repeating a scheduled cancellation is safe. Returns 409 when
|
|
54
|
+
* cancellation is not available.
|
|
74
55
|
*
|
|
75
56
|
* @example
|
|
76
57
|
* ```ts
|
|
@@ -81,8 +62,19 @@ export declare class Numbers extends APIResource {
|
|
|
81
62
|
*/
|
|
82
63
|
delete(id: string, options?: RequestOptions): APIPromise<NumberDeleteResponse>;
|
|
83
64
|
/**
|
|
84
|
-
*
|
|
85
|
-
*
|
|
65
|
+
* Returns included phone capacity for a country. Creating a phone is
|
|
66
|
+
* authoritative.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* const response = await client.numbers.capacity({
|
|
71
|
+
* country: 'de',
|
|
72
|
+
* });
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
capacity(query: NumberCapacityParams, options?: RequestOptions): APIPromise<NumberCapacityResponse>;
|
|
76
|
+
/**
|
|
77
|
+
* Lists available countries and current phone-number availability.
|
|
86
78
|
*
|
|
87
79
|
* @example
|
|
88
80
|
* ```ts
|
|
@@ -195,6 +187,21 @@ export declare namespace NumberDeleteResponse {
|
|
|
195
187
|
updatedAt: string | null;
|
|
196
188
|
}
|
|
197
189
|
}
|
|
190
|
+
export interface NumberCapacityResponse {
|
|
191
|
+
data: NumberCapacityResponse.Data;
|
|
192
|
+
}
|
|
193
|
+
export declare namespace NumberCapacityResponse {
|
|
194
|
+
interface Data {
|
|
195
|
+
included: number;
|
|
196
|
+
/**
|
|
197
|
+
* @deprecated Deprecated — always equal to `remaining`. Migrate to `remaining`;
|
|
198
|
+
* this field will be removed in a future revision.
|
|
199
|
+
*/
|
|
200
|
+
includedRemaining: number;
|
|
201
|
+
remaining: number;
|
|
202
|
+
status: 'available' | 'exhausted' | 'not_included';
|
|
203
|
+
}
|
|
204
|
+
}
|
|
198
205
|
export interface NumberCountriesResponse {
|
|
199
206
|
data: NumberCountriesResponse.Data;
|
|
200
207
|
}
|
|
@@ -227,13 +234,13 @@ export declare namespace NumberPurposesResponse {
|
|
|
227
234
|
}
|
|
228
235
|
export interface NumberCreateParams {
|
|
229
236
|
/**
|
|
230
|
-
* Body param:
|
|
231
|
-
* checkout (
|
|
237
|
+
* Body param: Use included capacity when available, require included capacity
|
|
238
|
+
* without paid fallback (included_only), or start a paid checkout (rent).
|
|
232
239
|
*/
|
|
233
|
-
billingPreference?: 'included' | 'rent';
|
|
240
|
+
billingPreference?: 'included' | 'included_only' | 'rent';
|
|
234
241
|
/**
|
|
235
242
|
* Body param: Optional ISO 3166-1 alpha-2 country code from GET
|
|
236
|
-
* /numbers/countries. Cannot be combined with `purpose`.
|
|
243
|
+
* /numbers/phones/countries. Cannot be combined with `purpose`.
|
|
237
244
|
*/
|
|
238
245
|
country?: string;
|
|
239
246
|
/**
|
|
@@ -243,7 +250,7 @@ export interface NumberCreateParams {
|
|
|
243
250
|
*/
|
|
244
251
|
label?: string | null;
|
|
245
252
|
/**
|
|
246
|
-
* Body param: Optional
|
|
253
|
+
* Body param: Optional purpose from GET /numbers/phones/purposes.
|
|
247
254
|
*/
|
|
248
255
|
purpose?: string;
|
|
249
256
|
/**
|
|
@@ -263,8 +270,14 @@ export interface NumberListParams {
|
|
|
263
270
|
page?: number;
|
|
264
271
|
pageSize?: number;
|
|
265
272
|
}
|
|
273
|
+
export interface NumberCapacityParams {
|
|
274
|
+
/**
|
|
275
|
+
* ISO 3166-1 alpha-2 country code from GET /numbers/phones/countries.
|
|
276
|
+
*/
|
|
277
|
+
country: string;
|
|
278
|
+
}
|
|
266
279
|
export declare namespace Numbers {
|
|
267
|
-
export { type NumberCreateResponse as NumberCreateResponse, type NumberRetrieveResponse as NumberRetrieveResponse, type NumberUpdateResponse as NumberUpdateResponse, type NumberListResponse as NumberListResponse, type NumberDeleteResponse as NumberDeleteResponse, type NumberCountriesResponse as NumberCountriesResponse, type NumberPurposesResponse as NumberPurposesResponse, type NumberCreateParams as NumberCreateParams, type NumberUpdateParams as NumberUpdateParams, type NumberListParams as NumberListParams, };
|
|
280
|
+
export { type NumberCreateResponse as NumberCreateResponse, type NumberRetrieveResponse as NumberRetrieveResponse, type NumberUpdateResponse as NumberUpdateResponse, type NumberListResponse as NumberListResponse, type NumberDeleteResponse as NumberDeleteResponse, type NumberCapacityResponse as NumberCapacityResponse, type NumberCountriesResponse as NumberCountriesResponse, type NumberPurposesResponse as NumberPurposesResponse, type NumberCreateParams as NumberCreateParams, type NumberUpdateParams as NumberUpdateParams, type NumberListParams as NumberListParams, type NumberCapacityParams as NumberCapacityParams, };
|
|
268
281
|
export { Messages as Messages, type MessageListResponse as MessageListResponse, type MessageListParams as MessageListParams, };
|
|
269
282
|
}
|
|
270
283
|
//# sourceMappingURL=numbers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numbers.d.ts","sourceRoot":"","sources":["../../src/resources/numbers/numbers.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GAC5C,CAAC;CACH"}
|
|
@@ -14,9 +14,8 @@ class Numbers extends resource_1.APIResource {
|
|
|
14
14
|
this.messages = new MessagesAPI.Messages(this._client);
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* Starts a
|
|
18
|
-
*
|
|
19
|
-
* its business state. `purpose` and `country` are mutually exclusive.
|
|
17
|
+
* Starts a phone-number purchase. Poll the returned phone number for status
|
|
18
|
+
* updates. `purpose` and `country` cannot be combined.
|
|
20
19
|
*
|
|
21
20
|
* @example
|
|
22
21
|
* ```ts
|
|
@@ -48,11 +47,8 @@ class Numbers extends resource_1.APIResource {
|
|
|
48
47
|
return this._client.get((0, path_1.path) `/numbers/phones/${id}`, options);
|
|
49
48
|
}
|
|
50
49
|
/**
|
|
51
|
-
* Updates the
|
|
52
|
-
*
|
|
53
|
-
* capped at 100 characters, is display-only, and never affects routing. It also
|
|
54
|
-
* seeds the billing entity name when set at purchase time; a later change here
|
|
55
|
-
* does not rename the already-created billing entity.
|
|
50
|
+
* Updates the display label. Omitting `label` leaves it unchanged; null or an
|
|
51
|
+
* empty string clears it.
|
|
56
52
|
*
|
|
57
53
|
* @example
|
|
58
54
|
* ```ts
|
|
@@ -65,8 +61,7 @@ class Numbers extends resource_1.APIResource {
|
|
|
65
61
|
return this._client.patch((0, path_1.path) `/numbers/phones/${id}`, { body, ...options });
|
|
66
62
|
}
|
|
67
63
|
/**
|
|
68
|
-
* Lists
|
|
69
|
-
* provisioned (`mobilerun`) numbers.
|
|
64
|
+
* Lists the caller's phone numbers.
|
|
70
65
|
*
|
|
71
66
|
* @example
|
|
72
67
|
* ```ts
|
|
@@ -77,23 +72,9 @@ class Numbers extends resource_1.APIResource {
|
|
|
77
72
|
return this._client.get('/numbers/phones', { query, ...options });
|
|
78
73
|
}
|
|
79
74
|
/**
|
|
80
|
-
* Cancels a
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* being processed, the checkout is closed immediately and the number is retired.
|
|
84
|
-
* - If the number is on the standard paid plan and already paid and in service,
|
|
85
|
-
* cancellation is scheduled for the end of the current billing period rather
|
|
86
|
-
* than taking effect immediately. The number stays usable through the period
|
|
87
|
-
* already paid for, with no partial refund. Calling this again while a
|
|
88
|
-
* cancellation is already scheduled is a no-op that returns the same result. The
|
|
89
|
-
* response's `state` reflects this as `cancel_scheduled` with
|
|
90
|
-
* `cancelAtPeriodEnd: true`; `currentPeriodEnd` is populated once billing
|
|
91
|
-
* confirms the cancellation.
|
|
92
|
-
*
|
|
93
|
-
* Any other state (already refunding, a permanent billing failure, a payment
|
|
94
|
-
* currently being processed, an included-plan number, or a non-hosted/BYO number)
|
|
95
|
-
* returns 409 `not_cancellable`. Returns 404 if the number doesn't exist or isn't
|
|
96
|
-
* owned by the caller.
|
|
75
|
+
* Cancels a pending purchase or schedules cancellation of an active paid phone
|
|
76
|
+
* number. Repeating a scheduled cancellation is safe. Returns 409 when
|
|
77
|
+
* cancellation is not available.
|
|
97
78
|
*
|
|
98
79
|
* @example
|
|
99
80
|
* ```ts
|
|
@@ -106,8 +87,21 @@ class Numbers extends resource_1.APIResource {
|
|
|
106
87
|
return this._client.delete((0, path_1.path) `/numbers/phones/${id}`, options);
|
|
107
88
|
}
|
|
108
89
|
/**
|
|
109
|
-
*
|
|
110
|
-
*
|
|
90
|
+
* Returns included phone capacity for a country. Creating a phone is
|
|
91
|
+
* authoritative.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
|
+
* const response = await client.numbers.capacity({
|
|
96
|
+
* country: 'de',
|
|
97
|
+
* });
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
capacity(query, options) {
|
|
101
|
+
return this._client.get('/numbers/phones/capacity', { query, ...options });
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Lists available countries and current phone-number availability.
|
|
111
105
|
*
|
|
112
106
|
* @example
|
|
113
107
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numbers.js","sourceRoot":"","sources":["../../src/resources/numbers/numbers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,mEAA0C;AAC1C,4CAA8E;AAE9E,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"numbers.js","sourceRoot":"","sources":["../../src/resources/numbers/numbers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,mEAA0C;AAC1C,4CAA8E;AAE9E,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAgI1E,CAAC;IA9HC;;;;;;;;OAQG;IACH,MAAM,CACJ,SAAgD,EAAE,EAClD,OAAwB;QAExB,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE;YAC1C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACnF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,mBAAmB,EAAE,EAAE,EAAE,O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);
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Starts a
|
|
14
|
-
*
|
|
15
|
-
* its business state. `purpose` and `country` are mutually exclusive.
|
|
13
|
+
* Starts a phone-number purchase. Poll the returned phone number for status
|
|
14
|
+
* updates. `purpose` and `country` cannot be combined.
|
|
16
15
|
*
|
|
17
16
|
* @example
|
|
18
17
|
* ```ts
|
|
@@ -44,11 +43,8 @@ export class Numbers extends APIResource {
|
|
|
44
43
|
return this._client.get(path `/numbers/phones/${id}`, options);
|
|
45
44
|
}
|
|
46
45
|
/**
|
|
47
|
-
* Updates the
|
|
48
|
-
*
|
|
49
|
-
* capped at 100 characters, is display-only, and never affects routing. It also
|
|
50
|
-
* seeds the billing entity name when set at purchase time; a later change here
|
|
51
|
-
* does not rename the already-created billing entity.
|
|
46
|
+
* Updates the display label. Omitting `label` leaves it unchanged; null or an
|
|
47
|
+
* empty string clears it.
|
|
52
48
|
*
|
|
53
49
|
* @example
|
|
54
50
|
* ```ts
|
|
@@ -61,8 +57,7 @@ export class Numbers extends APIResource {
|
|
|
61
57
|
return this._client.patch(path `/numbers/phones/${id}`, { body, ...options });
|
|
62
58
|
}
|
|
63
59
|
/**
|
|
64
|
-
* Lists
|
|
65
|
-
* provisioned (`mobilerun`) numbers.
|
|
60
|
+
* Lists the caller's phone numbers.
|
|
66
61
|
*
|
|
67
62
|
* @example
|
|
68
63
|
* ```ts
|
|
@@ -73,23 +68,9 @@ export class Numbers extends APIResource {
|
|
|
73
68
|
return this._client.get('/numbers/phones', { query, ...options });
|
|
74
69
|
}
|
|
75
70
|
/**
|
|
76
|
-
* Cancels a
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* being processed, the checkout is closed immediately and the number is retired.
|
|
80
|
-
* - If the number is on the standard paid plan and already paid and in service,
|
|
81
|
-
* cancellation is scheduled for the end of the current billing period rather
|
|
82
|
-
* than taking effect immediately. The number stays usable through the period
|
|
83
|
-
* already paid for, with no partial refund. Calling this again while a
|
|
84
|
-
* cancellation is already scheduled is a no-op that returns the same result. The
|
|
85
|
-
* response's `state` reflects this as `cancel_scheduled` with
|
|
86
|
-
* `cancelAtPeriodEnd: true`; `currentPeriodEnd` is populated once billing
|
|
87
|
-
* confirms the cancellation.
|
|
88
|
-
*
|
|
89
|
-
* Any other state (already refunding, a permanent billing failure, a payment
|
|
90
|
-
* currently being processed, an included-plan number, or a non-hosted/BYO number)
|
|
91
|
-
* returns 409 `not_cancellable`. Returns 404 if the number doesn't exist or isn't
|
|
92
|
-
* owned by the caller.
|
|
71
|
+
* Cancels a pending purchase or schedules cancellation of an active paid phone
|
|
72
|
+
* number. Repeating a scheduled cancellation is safe. Returns 409 when
|
|
73
|
+
* cancellation is not available.
|
|
93
74
|
*
|
|
94
75
|
* @example
|
|
95
76
|
* ```ts
|
|
@@ -102,8 +83,21 @@ export class Numbers extends APIResource {
|
|
|
102
83
|
return this._client.delete(path `/numbers/phones/${id}`, options);
|
|
103
84
|
}
|
|
104
85
|
/**
|
|
105
|
-
*
|
|
106
|
-
*
|
|
86
|
+
* Returns included phone capacity for a country. Creating a phone is
|
|
87
|
+
* authoritative.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```ts
|
|
91
|
+
* const response = await client.numbers.capacity({
|
|
92
|
+
* country: 'de',
|
|
93
|
+
* });
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
capacity(query, options) {
|
|
97
|
+
return this._client.get('/numbers/phones/capacity', { query, ...options });
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Lists available countries and current phone-number availability.
|
|
107
101
|
*
|
|
108
102
|
* @example
|
|
109
103
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numbers.mjs","sourceRoot":"","sources":["../../src/resources/numbers/numbers.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,KAAK,WAAW,uBAAmB;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