@isnap/sdk 1.3.0-next.17 → 1.3.0-next.170
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 +3 -0
- package/README.md +1 -1
- package/dist/client.d.ts +2 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +3 -0
- package/dist/client.js.map +1 -1
- package/dist/generated/openapi.d.ts +1968 -898
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/resources/apps.d.ts +11 -4
- package/dist/resources/apps.d.ts.map +1 -1
- package/dist/resources/apps.js +11 -4
- package/dist/resources/apps.js.map +1 -1
- package/dist/resources/lines.d.ts +94 -4
- package/dist/resources/lines.d.ts.map +1 -1
- package/dist/resources/lines.js +100 -4
- package/dist/resources/lines.js.map +1 -1
- package/dist/resources/macos-sessions.d.ts +48 -0
- package/dist/resources/macos-sessions.d.ts.map +1 -0
- package/dist/resources/macos-sessions.js +51 -0
- package/dist/resources/macos-sessions.js.map +1 -0
- package/dist/resources/preorders.d.ts +19 -7
- package/dist/resources/preorders.d.ts.map +1 -1
- package/dist/resources/preorders.js +19 -7
- package/dist/resources/preorders.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +12 -4
- package/dist/version.js.map +1 -1
- package/dist/webhooks/types.d.ts +34 -3
- package/dist/webhooks/types.d.ts.map +1 -1
- package/dist/webhooks/types.js +3 -0
- package/dist/webhooks/types.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export { ByodResource } from './resources/byod.js';
|
|
|
13
13
|
export { ChatsResource } from './resources/chats.js';
|
|
14
14
|
export { LinesResource } from './resources/lines.js';
|
|
15
15
|
export { LookupResource } from './resources/lookup.js';
|
|
16
|
+
export { MacosSessionsResource } from './resources/macos-sessions.js';
|
|
16
17
|
export { MessagesResource } from './resources/messages.js';
|
|
17
18
|
export { PreOrdersResource } from './resources/preorders.js';
|
|
18
19
|
export { TrialResource } from './resources/trial.js';
|
|
@@ -20,8 +21,9 @@ export { WebhooksResource } from './resources/webhooks.js';
|
|
|
20
21
|
export type { AppDownloadEntry, AppManifest } from './resources/apps.js';
|
|
21
22
|
export type { AreaCode, AreaCodes, Country, ListAreaCodesQuery } from './resources/area-codes.js';
|
|
22
23
|
export type { Chat, ChatMarkRead, ChatTypingStart, ChatTypingStop, ListChatsQuery, MarkReadBody, ShareContactCardBody, ShareContactCardResult, TypingStartBody } from './resources/chats.js';
|
|
23
|
-
export type { ActivateLineBody, AssignLineBody, Line, LineConfigPatch, LineConfigResponseData, LineHealth, LineList, ListLinesQuery, ListQueueQuery, MintSharedLineBody, MyLines, PatchLineBody, QueueResponseData, QuotaSnapshot, TransferOwnershipBody } from './resources/lines.js';
|
|
24
|
+
export type { ActivateLineBody, AssignLineBody, Line, LineConfigPatch, LineConfigResponseData, LineHealth, LineList, ListLinesQuery, ListQueueQuery, MintSharedLineBody, MyLines, PatchLineBody, QueueResponseData, QuotaSnapshot, SetLineAnniversaryBody, TerminateLineBody, TransferOwnershipBody } from './resources/lines.js';
|
|
24
25
|
export type { LookupRequest, LookupResult } from './resources/lookup.js';
|
|
26
|
+
export type { MacosSession } from './resources/macos-sessions.js';
|
|
25
27
|
export type { ListMessagesQuery, Message, Reaction, ReactionRemoval, ReactionType, SendMessageBody, SendReactionBody } from './resources/messages.js';
|
|
26
28
|
export type { Attachment, CreateAttachmentBody, CreateAttachmentResponse, UploadInput, UploadMetadata, UploadOptions } from './resources/attachments.js';
|
|
27
29
|
export type { ByodPairBody, ByodPairResponse } from './resources/byod.js';
|
|
@@ -31,6 +33,6 @@ export type { CreateWebhookBody, ListDeliveriesQuery, ListEventsQuery, UpdateWeb
|
|
|
31
33
|
export { parseWebhookEvent } from './webhooks/parse.js';
|
|
32
34
|
export { verifyWebhook } from './webhooks/verify.js';
|
|
33
35
|
export type { VerifyWebhookOptions } from './webhooks/verify.js';
|
|
34
|
-
export { isAdminEvent, isBindingEvent, isLineEvent, isMessageEvent, isPreOrderEvent, isReactionEvent, isTrialEvent, isTypingIndicatorEvent } from './webhooks/types.js';
|
|
35
|
-
export type { AdminEvent, AdminEventType, BindingEvent, BindingEventType, LineEvent, LineEventType, MessageEvent, MessageEventType, PreOrderEvent, PreOrderEventType, ReactionEvent, ReactionEventData, ReactionEventType, TrialEvent, TrialEventType, TypingIndicatorEvent, TypingIndicatorEventType, WebhookEvent, WebhookEventBase } from './webhooks/types.js';
|
|
36
|
+
export { isAdminEvent, isBindingEvent, isLineEvent, isMacosSessionEvent, isMessageEvent, isPreOrderEvent, isReactionEvent, isTrialEvent, isTypingIndicatorEvent } from './webhooks/types.js';
|
|
37
|
+
export type { AdminEvent, AdminEventType, BindingEvent, BindingEventType, LineEvent, LineEventType, MacosSessionEvent, MacosSessionEventType, MessageEvent, MessageEventType, PreOrderEvent, PreOrderEventType, ReactionEvent, ReactionEventData, ReactionEventType, TrialEvent, TrialEventType, TypingIndicatorEvent, TypingIndicatorEventType, WebhookEvent, WebhookEventBase } from './webhooks/types.js';
|
|
36
38
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC5D,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAO,EACL,kBAAkB,EAClB,QAAQ,EACR,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,SAAS,EACT,mBAAmB,EACnB,aAAa,EACb,oBAAoB,EACpB,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AAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACzE,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACf,MAAM,0BAA0B,CAAA;AACjC,YAAY,EACV,iBAAiB,EACjB,aAAa,EACb,aAAa,EAGb,eAAe,EACf,eAAe,EACf,eAAe,EAChB,MAAM,sBAAsB,CAAA;AAC7B,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,OAAO,EACP,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EACX,mBAAmB,EACpB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EACL,YAAY,EACZ,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,eAAe,EACf,YAAY,EACZ,sBAAsB,EACvB,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,UAAU,EACV,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,wBAAwB,EACxB,YAAY,EACZ,gBAAgB,EACjB,MAAM,qBAAqB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -8,11 +8,12 @@ export { ByodResource } from './resources/byod.js';
|
|
|
8
8
|
export { ChatsResource } from './resources/chats.js';
|
|
9
9
|
export { LinesResource } from './resources/lines.js';
|
|
10
10
|
export { LookupResource } from './resources/lookup.js';
|
|
11
|
+
export { MacosSessionsResource } from './resources/macos-sessions.js';
|
|
11
12
|
export { MessagesResource } from './resources/messages.js';
|
|
12
13
|
export { PreOrdersResource } from './resources/preorders.js';
|
|
13
14
|
export { TrialResource } from './resources/trial.js';
|
|
14
15
|
export { WebhooksResource } from './resources/webhooks.js';
|
|
15
16
|
export { parseWebhookEvent } from './webhooks/parse.js';
|
|
16
17
|
export { verifyWebhook } from './webhooks/verify.js';
|
|
17
|
-
export { isAdminEvent, isBindingEvent, isLineEvent, isMessageEvent, isPreOrderEvent, isReactionEvent, isTrialEvent, isTypingIndicatorEvent } from './webhooks/types.js';
|
|
18
|
+
export { isAdminEvent, isBindingEvent, isLineEvent, isMacosSessionEvent, isMessageEvent, isPreOrderEvent, isReactionEvent, isTrialEvent, isTypingIndicatorEvent } from './webhooks/types.js';
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAGzC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAO,EACL,kBAAkB,EAClB,QAAQ,EACR,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,SAAS,EACT,mBAAmB,EACnB,aAAa,EACb,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,aAAa,CAAA;AAKpB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,M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AAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAqF1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,eAAe,EACf,YAAY,EACZ,sBAAsB,EACvB,MAAM,qBAAqB,CAAA"}
|
package/dist/resources/apps.d.ts
CHANGED
|
@@ -6,15 +6,22 @@ export type AppDownloadEntry = components['schemas']['AppDownloadEntry'];
|
|
|
6
6
|
export declare class AppsResource extends BaseResource {
|
|
7
7
|
/**
|
|
8
8
|
* `GET /v1/apps` — the app/bridge download manifest: per-platform installer
|
|
9
|
-
* URL, the
|
|
10
|
-
* artifact configured for
|
|
9
|
+
* URL, the version currently published for that platform, and whether this
|
|
10
|
+
* deployment has an artifact configured for it. Public (no auth) and, unlike
|
|
11
11
|
* `byod.pair`, requires no pairing in flight — use it for setup guides,
|
|
12
12
|
* "add a device" flows, reinstalls, and update prompts (compare `version`
|
|
13
13
|
* against the version the device reports).
|
|
14
14
|
*
|
|
15
15
|
* The URLs are the same stable redirects `byod.pair` returns in
|
|
16
|
-
* `download_urls
|
|
17
|
-
*
|
|
16
|
+
* `download_urls` — one builder server-side, so they cannot drift.
|
|
17
|
+
*
|
|
18
|
+
* `version` is `string | null`. It is read from the release feed beside the
|
|
19
|
+
* artifact `url` resolves to, so the number and the file cannot name
|
|
20
|
+
* different releases, and it is `null` when that feed publishes nothing.
|
|
21
|
+
* Render the absence ("version not published"); never substitute a number,
|
|
22
|
+
* and do not treat `null` as an error. It is deliberately NOT the
|
|
23
|
+
* `bridge_version` string `byod.pair` returns — that field is a separate,
|
|
24
|
+
* device-facing value (WHA-2538).
|
|
18
25
|
*
|
|
19
26
|
* A platform with `available: false` still appears in the response; hide the
|
|
20
27
|
* affordance rather than offering a link that 404s on click.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/resources/apps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,CAAA;AACtE,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAA;AAExE,qBAAa,YAAa,SAAQ,YAAY;IAC5C
|
|
1
|
+
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/resources/apps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,CAAA;AACtE,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAA;AAExE,qBAAa,YAAa,SAAQ,YAAY;IAC5C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC;CAGtD"}
|
package/dist/resources/apps.js
CHANGED
|
@@ -2,15 +2,22 @@ import { BaseResource } from './base.js';
|
|
|
2
2
|
export class AppsResource extends BaseResource {
|
|
3
3
|
/**
|
|
4
4
|
* `GET /v1/apps` — the app/bridge download manifest: per-platform installer
|
|
5
|
-
* URL, the
|
|
6
|
-
* artifact configured for
|
|
5
|
+
* URL, the version currently published for that platform, and whether this
|
|
6
|
+
* deployment has an artifact configured for it. Public (no auth) and, unlike
|
|
7
7
|
* `byod.pair`, requires no pairing in flight — use it for setup guides,
|
|
8
8
|
* "add a device" flows, reinstalls, and update prompts (compare `version`
|
|
9
9
|
* against the version the device reports).
|
|
10
10
|
*
|
|
11
11
|
* The URLs are the same stable redirects `byod.pair` returns in
|
|
12
|
-
* `download_urls
|
|
13
|
-
*
|
|
12
|
+
* `download_urls` — one builder server-side, so they cannot drift.
|
|
13
|
+
*
|
|
14
|
+
* `version` is `string | null`. It is read from the release feed beside the
|
|
15
|
+
* artifact `url` resolves to, so the number and the file cannot name
|
|
16
|
+
* different releases, and it is `null` when that feed publishes nothing.
|
|
17
|
+
* Render the absence ("version not published"); never substitute a number,
|
|
18
|
+
* and do not treat `null` as an error. It is deliberately NOT the
|
|
19
|
+
* `bridge_version` string `byod.pair` returns — that field is a separate,
|
|
20
|
+
* device-facing value (WHA-2538).
|
|
14
21
|
*
|
|
15
22
|
* A platform with `available: false` still appears in the response; hide the
|
|
16
23
|
* affordance rather than offering a link that 404s on click.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps.js","sourceRoot":"","sources":["../../src/resources/apps.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAKxC,MAAM,OAAO,YAAa,SAAQ,YAAY;IAC5C
|
|
1
|
+
{"version":3,"file":"apps.js","sourceRoot":"","sources":["../../src/resources/apps.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAKxC,MAAM,OAAO,YAAa,SAAQ,YAAY;IAC5C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,QAAQ,CAAC,IAAqB;QAC5B,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAc,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;IAC7E,CAAC;CACF"}
|
|
@@ -9,6 +9,8 @@ export type ActivateLineBody = components['schemas']['ActivateLine'];
|
|
|
9
9
|
export type TransferOwnershipBody = components['schemas']['TransferOwnership'];
|
|
10
10
|
export type PatchLineBody = components['schemas']['PatchLine'];
|
|
11
11
|
export type MintSharedLineBody = components['schemas']['MintSharedLine'];
|
|
12
|
+
export type TerminateLineBody = components['schemas']['TerminateLine'];
|
|
13
|
+
export type SetLineAnniversaryBody = components['schemas']['SetLineAnniversary'];
|
|
12
14
|
export type LineConfigPatch = components['schemas']['LineConfigPatch'];
|
|
13
15
|
export type LineConfigResponseData = components['schemas']['LineConfigResponseData'];
|
|
14
16
|
export type LineHealth = components['schemas']['LineHealth'];
|
|
@@ -56,14 +58,102 @@ export declare class LinesResource extends BaseResource {
|
|
|
56
58
|
reserve(id: string, opts?: RequestOptions): Promise<Line>;
|
|
57
59
|
/**
|
|
58
60
|
* `POST /v1/lines/{id}/activate` — commit a reserved line to `active`.
|
|
59
|
-
* Wholesale partners
|
|
60
|
-
* Stripe checkout, EOM-metered)
|
|
61
|
-
* via `body.inbound_only`. Direct
|
|
62
|
-
*
|
|
61
|
+
* **Wholesale partners only**: the second phase of reserve→activate (no
|
|
62
|
+
* Stripe checkout, EOM-metered), which may pick the inbound-only rental
|
|
63
|
+
* variant via `body.inbound_only`. Direct customers get `402
|
|
64
|
+
* checkout_required` — their line activates when the Stripe Checkout session
|
|
65
|
+
* from `billing.checkout()` is paid, and their `inbound_only` comes from the
|
|
66
|
+
* price they paid.
|
|
63
67
|
*/
|
|
64
68
|
activate(id: string, body?: ActivateLineBody, opts?: RequestOptions): Promise<Line>;
|
|
65
69
|
/** `POST /v1/lines/{id}/release` — release an active or reserved line back to the pool. */
|
|
66
70
|
release(id: string, opts?: RequestOptions): Promise<Line>;
|
|
71
|
+
/**
|
|
72
|
+
* `POST /v1/lines/{id}/terminate` — permanently END a line you own. The
|
|
73
|
+
* self-serve counterpart to the admin terminate, and the verb to call when
|
|
74
|
+
* your own customer cancels: `release()` only returns a *reserved*
|
|
75
|
+
* marketplace line to the shelf, while this ends a live `rental` line or a
|
|
76
|
+
* virtual `shared` line for good.
|
|
77
|
+
*
|
|
78
|
+
* The line comes back at the terminal `cancelled` status, keeping its owner.
|
|
79
|
+
* Queued messages fail, shared-fleet bindings release, device sessions are
|
|
80
|
+
* revoked, and `line.disconnected` fires with `reason: "customer_initiated"`.
|
|
81
|
+
* Billing stops in both shapes — a per-line Stripe subscription is cancelled
|
|
82
|
+
* immediately, and a wholesale partner's end-of-month active-line count drops
|
|
83
|
+
* the line in the same breath.
|
|
84
|
+
*
|
|
85
|
+
* **Idempotent.** Terminating an already-terminated line resolves with the
|
|
86
|
+
* unchanged line (200), never a `ConflictError` — so a retry after a timeout
|
|
87
|
+
* is always safe and no `opts.idempotencyKey` is needed for it.
|
|
88
|
+
*
|
|
89
|
+
* Refusals: `BadRequestError` (400 `byod_not_customer_terminable`) — a BYOD
|
|
90
|
+
* line is your own hardware, billed per device slot by `/v1/byod/*`;
|
|
91
|
+
* `PermissionDeniedError` (403 `pool_line_not_terminable`) — an owned test
|
|
92
|
+
* line must go through `convertFromTest()` first; `NotFoundError` (404) — a
|
|
93
|
+
* line that does not exist, or one you do not own (the same code for both, so
|
|
94
|
+
* nothing leaks).
|
|
95
|
+
*
|
|
96
|
+
* `body` defaults to `{}` (not `undefined`) so the request always carries
|
|
97
|
+
* `Content-Type: application/json`; the route's body is optional and the
|
|
98
|
+
* handler treats a missing body as `{}`.
|
|
99
|
+
*/
|
|
100
|
+
terminate(id: string, body?: TerminateLineBody, opts?: RequestOptions): Promise<Line>;
|
|
101
|
+
/**
|
|
102
|
+
* `POST /v1/lines/{id}/cancel` — schedule the END of a line you own for its
|
|
103
|
+
* next billing anniversary, and keep using it until then.
|
|
104
|
+
*
|
|
105
|
+
* This is the verb for "my own customer cancelled". The month is already paid
|
|
106
|
+
* for and iSnap never prorates, so `terminate()` — which ends the line on the
|
|
107
|
+
* spot — throws away days you have bought. The line stays fully `active` and
|
|
108
|
+
* bills exactly as before; iSnap ends it itself when `cancel_at` arrives and
|
|
109
|
+
* fires `line.terminated` with `origin: "scheduled_cancellation"`.
|
|
110
|
+
*
|
|
111
|
+
* The resolved line carries `cancel_at`: the next occurrence of its
|
|
112
|
+
* `anniversary_at` strictly after now, clamped to the last day of a shorter
|
|
113
|
+
* month (a line taken on the 31st renews on the 28th in February and on the
|
|
114
|
+
* 31st again in March — the clamp never sticks).
|
|
115
|
+
*
|
|
116
|
+
* **Idempotent, and in the way that matters here.** Cancelling an
|
|
117
|
+
* already-cancelled line resolves with the SAME `cancel_at`, never a
|
|
118
|
+
* recomputed one — so a retry that happens to land after the stored date has
|
|
119
|
+
* passed cannot push your own cancellation a month into the future.
|
|
120
|
+
*
|
|
121
|
+
* Refusals: `ConflictError` (409 `line_has_no_anniversary`) — the line has no
|
|
122
|
+
* anniversary to cancel at; state it with `setAnniversary()`, or end the line
|
|
123
|
+
* now with `terminate()`. `ConflictError` (409
|
|
124
|
+
* `line_not_customer_cancellable`) — only an `active` or `suspended` line can
|
|
125
|
+
* be cancelled. `BadRequestError` (400 `byod_not_customer_cancellable`) and
|
|
126
|
+
* `PermissionDeniedError` (403 `pool_line_not_cancellable`) — those tiers have
|
|
127
|
+
* no per-line anniversary. `NotFoundError` (404) — a line that does not exist,
|
|
128
|
+
* or one you do not own (the same code for both, so nothing leaks).
|
|
129
|
+
*/
|
|
130
|
+
cancel(id: string, opts?: RequestOptions): Promise<Line>;
|
|
131
|
+
/**
|
|
132
|
+
* `POST /v1/lines/{id}/uncancel` — undo a scheduled cancellation. `cancel_at`
|
|
133
|
+
* goes back to `null` and the line resumes renewing at its anniversary.
|
|
134
|
+
*
|
|
135
|
+
* **A no-op on a line that is not cancelled**: resolves 200 with the line and
|
|
136
|
+
* `cancel_at: null`, never an error — so a reconciliation loop that asserts
|
|
137
|
+
* "this line must not be cancelled" can run unconditionally.
|
|
138
|
+
*
|
|
139
|
+
* Refusal: `ConflictError` (409 `line_already_terminated`) once the
|
|
140
|
+
* anniversary has passed and iSnap has ended the line. That cannot be undone.
|
|
141
|
+
*/
|
|
142
|
+
uncancel(id: string, opts?: RequestOptions): Promise<Line>;
|
|
143
|
+
/**
|
|
144
|
+
* `POST /v1/lines/{id}/anniversary` — state the instant you took this line,
|
|
145
|
+
* which becomes the day of the month it renews on and the date `cancel()`
|
|
146
|
+
* waits for.
|
|
147
|
+
*
|
|
148
|
+
* **For lines migrated from your own system**, whose real start date iSnap
|
|
149
|
+
* cannot know. A line taken through the iSnap API is stamped automatically at
|
|
150
|
+
* activation and needs no call.
|
|
151
|
+
*
|
|
152
|
+
* Refusal: `ConflictError` (409 `line_cancellation_pending`) while a
|
|
153
|
+
* cancellation is scheduled — that `cancel_at` was computed from the
|
|
154
|
+
* anniversary you are replacing, so uncancel, set the date, and cancel again.
|
|
155
|
+
*/
|
|
156
|
+
setAnniversary(id: string, body: SetLineAnniversaryBody, opts?: RequestOptions): Promise<Line>;
|
|
67
157
|
/**
|
|
68
158
|
* `POST /v1/lines/{id}/transfer-ownership` — reassign a line to a
|
|
69
159
|
* different end-user account without re-pairing the underlying device.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lines.d.ts","sourceRoot":"","sources":["../../src/resources/lines.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,MAAM,MAAM,IAAI,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAA;AAChD,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAA;AACxD,MAAM,MAAM,OAAO,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,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,CAAC,sBAAsB,CAAC;CAQnC"}
|
package/dist/resources/lines.js
CHANGED
|
@@ -54,10 +54,12 @@ export class LinesResource extends BaseResource {
|
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
* `POST /v1/lines/{id}/activate` — commit a reserved line to `active`.
|
|
57
|
-
* Wholesale partners
|
|
58
|
-
* Stripe checkout, EOM-metered)
|
|
59
|
-
* via `body.inbound_only`. Direct
|
|
60
|
-
*
|
|
57
|
+
* **Wholesale partners only**: the second phase of reserve→activate (no
|
|
58
|
+
* Stripe checkout, EOM-metered), which may pick the inbound-only rental
|
|
59
|
+
* variant via `body.inbound_only`. Direct customers get `402
|
|
60
|
+
* checkout_required` — their line activates when the Stripe Checkout session
|
|
61
|
+
* from `billing.checkout()` is paid, and their `inbound_only` comes from the
|
|
62
|
+
* price they paid.
|
|
61
63
|
*/
|
|
62
64
|
activate(id, body = {}, opts) {
|
|
63
65
|
return this.client.request('POST', `/v1/lines/${encodeURIComponent(id)}/activate`, body, opts);
|
|
@@ -66,6 +68,100 @@ export class LinesResource extends BaseResource {
|
|
|
66
68
|
release(id, opts) {
|
|
67
69
|
return this.client.request('POST', `/v1/lines/${encodeURIComponent(id)}/release`, undefined, opts);
|
|
68
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* `POST /v1/lines/{id}/terminate` — permanently END a line you own. The
|
|
73
|
+
* self-serve counterpart to the admin terminate, and the verb to call when
|
|
74
|
+
* your own customer cancels: `release()` only returns a *reserved*
|
|
75
|
+
* marketplace line to the shelf, while this ends a live `rental` line or a
|
|
76
|
+
* virtual `shared` line for good.
|
|
77
|
+
*
|
|
78
|
+
* The line comes back at the terminal `cancelled` status, keeping its owner.
|
|
79
|
+
* Queued messages fail, shared-fleet bindings release, device sessions are
|
|
80
|
+
* revoked, and `line.disconnected` fires with `reason: "customer_initiated"`.
|
|
81
|
+
* Billing stops in both shapes — a per-line Stripe subscription is cancelled
|
|
82
|
+
* immediately, and a wholesale partner's end-of-month active-line count drops
|
|
83
|
+
* the line in the same breath.
|
|
84
|
+
*
|
|
85
|
+
* **Idempotent.** Terminating an already-terminated line resolves with the
|
|
86
|
+
* unchanged line (200), never a `ConflictError` — so a retry after a timeout
|
|
87
|
+
* is always safe and no `opts.idempotencyKey` is needed for it.
|
|
88
|
+
*
|
|
89
|
+
* Refusals: `BadRequestError` (400 `byod_not_customer_terminable`) — a BYOD
|
|
90
|
+
* line is your own hardware, billed per device slot by `/v1/byod/*`;
|
|
91
|
+
* `PermissionDeniedError` (403 `pool_line_not_terminable`) — an owned test
|
|
92
|
+
* line must go through `convertFromTest()` first; `NotFoundError` (404) — a
|
|
93
|
+
* line that does not exist, or one you do not own (the same code for both, so
|
|
94
|
+
* nothing leaks).
|
|
95
|
+
*
|
|
96
|
+
* `body` defaults to `{}` (not `undefined`) so the request always carries
|
|
97
|
+
* `Content-Type: application/json`; the route's body is optional and the
|
|
98
|
+
* handler treats a missing body as `{}`.
|
|
99
|
+
*/
|
|
100
|
+
terminate(id, body = {}, opts) {
|
|
101
|
+
return this.client.request('POST', `/v1/lines/${encodeURIComponent(id)}/terminate`, body, opts);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* `POST /v1/lines/{id}/cancel` — schedule the END of a line you own for its
|
|
105
|
+
* next billing anniversary, and keep using it until then.
|
|
106
|
+
*
|
|
107
|
+
* This is the verb for "my own customer cancelled". The month is already paid
|
|
108
|
+
* for and iSnap never prorates, so `terminate()` — which ends the line on the
|
|
109
|
+
* spot — throws away days you have bought. The line stays fully `active` and
|
|
110
|
+
* bills exactly as before; iSnap ends it itself when `cancel_at` arrives and
|
|
111
|
+
* fires `line.terminated` with `origin: "scheduled_cancellation"`.
|
|
112
|
+
*
|
|
113
|
+
* The resolved line carries `cancel_at`: the next occurrence of its
|
|
114
|
+
* `anniversary_at` strictly after now, clamped to the last day of a shorter
|
|
115
|
+
* month (a line taken on the 31st renews on the 28th in February and on the
|
|
116
|
+
* 31st again in March — the clamp never sticks).
|
|
117
|
+
*
|
|
118
|
+
* **Idempotent, and in the way that matters here.** Cancelling an
|
|
119
|
+
* already-cancelled line resolves with the SAME `cancel_at`, never a
|
|
120
|
+
* recomputed one — so a retry that happens to land after the stored date has
|
|
121
|
+
* passed cannot push your own cancellation a month into the future.
|
|
122
|
+
*
|
|
123
|
+
* Refusals: `ConflictError` (409 `line_has_no_anniversary`) — the line has no
|
|
124
|
+
* anniversary to cancel at; state it with `setAnniversary()`, or end the line
|
|
125
|
+
* now with `terminate()`. `ConflictError` (409
|
|
126
|
+
* `line_not_customer_cancellable`) — only an `active` or `suspended` line can
|
|
127
|
+
* be cancelled. `BadRequestError` (400 `byod_not_customer_cancellable`) and
|
|
128
|
+
* `PermissionDeniedError` (403 `pool_line_not_cancellable`) — those tiers have
|
|
129
|
+
* no per-line anniversary. `NotFoundError` (404) — a line that does not exist,
|
|
130
|
+
* or one you do not own (the same code for both, so nothing leaks).
|
|
131
|
+
*/
|
|
132
|
+
cancel(id, opts) {
|
|
133
|
+
return this.client.request('POST', `/v1/lines/${encodeURIComponent(id)}/cancel`, undefined, opts);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* `POST /v1/lines/{id}/uncancel` — undo a scheduled cancellation. `cancel_at`
|
|
137
|
+
* goes back to `null` and the line resumes renewing at its anniversary.
|
|
138
|
+
*
|
|
139
|
+
* **A no-op on a line that is not cancelled**: resolves 200 with the line and
|
|
140
|
+
* `cancel_at: null`, never an error — so a reconciliation loop that asserts
|
|
141
|
+
* "this line must not be cancelled" can run unconditionally.
|
|
142
|
+
*
|
|
143
|
+
* Refusal: `ConflictError` (409 `line_already_terminated`) once the
|
|
144
|
+
* anniversary has passed and iSnap has ended the line. That cannot be undone.
|
|
145
|
+
*/
|
|
146
|
+
uncancel(id, opts) {
|
|
147
|
+
return this.client.request('POST', `/v1/lines/${encodeURIComponent(id)}/uncancel`, undefined, opts);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* `POST /v1/lines/{id}/anniversary` — state the instant you took this line,
|
|
151
|
+
* which becomes the day of the month it renews on and the date `cancel()`
|
|
152
|
+
* waits for.
|
|
153
|
+
*
|
|
154
|
+
* **For lines migrated from your own system**, whose real start date iSnap
|
|
155
|
+
* cannot know. A line taken through the iSnap API is stamped automatically at
|
|
156
|
+
* activation and needs no call.
|
|
157
|
+
*
|
|
158
|
+
* Refusal: `ConflictError` (409 `line_cancellation_pending`) while a
|
|
159
|
+
* cancellation is scheduled — that `cancel_at` was computed from the
|
|
160
|
+
* anniversary you are replacing, so uncancel, set the date, and cancel again.
|
|
161
|
+
*/
|
|
162
|
+
setAnniversary(id, body, opts) {
|
|
163
|
+
return this.client.request('POST', `/v1/lines/${encodeURIComponent(id)}/anniversary`, body, opts);
|
|
164
|
+
}
|
|
69
165
|
/**
|
|
70
166
|
* `POST /v1/lines/{id}/transfer-ownership` — reassign a line to a
|
|
71
167
|
* different end-user account without re-pairing the underlying device.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lines.js","sourceRoot":"","sources":["../../src/resources/lines.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"lines.js","sourceRoot":"","sources":["../../src/resources/lines.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAuBxC,MAAM,OAAO,aAAc,SAAQ,YAAY;IAC7C;;;;;OAKG;IACH,IAAI,CAAC,QAAwB,EAAE,EAAE,IAAqB;QACpD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAW,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE;YAClE,GAAG,IAAI;YACP,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE;SACpC,CAAC,CAAA;IACJ,CAAC;IAED,uEAAuE;IACvE,QAAQ,CAAC,IAA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F;IAC7F,SAAS,CAAC,EAAU,EAAE,IAAqB;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,KAAK,EACL,aAAa,kBAAkB,CAAC,EAAE,CAAC,SAAS,EAC5C,SAAS,EACT,IAAI,CACL,CAAA;IACH,CAAC;IAED;;;;OAIG;IACH,YAAY,CACV,EAAU,EACV,IAAqB,EACrB,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,OAAO,EACP,aAAa,kBAAkB,CAAC,EAAE,CAAC,SAAS,EAC5C,IAAI,EACJ,IAAI,CACL,CAAA;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { components } from '../generated/openapi.js';
|
|
2
|
+
import type { RequestOptions } from '../types.js';
|
|
3
|
+
import { BaseResource } from './base.js';
|
|
4
|
+
export type MacosSession = components['schemas']['MacosSession'];
|
|
5
|
+
/**
|
|
6
|
+
* Hosted macOS sessions rented on a wholesale partner's account (contract §2.16).
|
|
7
|
+
*
|
|
8
|
+
* A session is a macOS environment the partner runs their own iPhone's bridge
|
|
9
|
+
* against, with their OWN Apple ID signed into it. It is NOT a line: it carries
|
|
10
|
+
* no number and originates no messages, so nothing here has a direction, a
|
|
11
|
+
* platform or a capability.
|
|
12
|
+
*
|
|
13
|
+
* Direct customers do not use this resource — they buy sessions through
|
|
14
|
+
* `POST /v1/billing/mac-checkout` and every method here answers `403
|
|
15
|
+
* not_a_wholesale_partner` for them.
|
|
16
|
+
*/
|
|
17
|
+
export declare class MacosSessionsResource extends BaseResource {
|
|
18
|
+
/**
|
|
19
|
+
* `POST /v1/macos-sessions/rent` — take one session out of iSnap stock.
|
|
20
|
+
*
|
|
21
|
+
* The tenancy starts immediately and `anniversary_at` is the day it was taken:
|
|
22
|
+
* that day of the month is what the session bills on, clamped to the last day
|
|
23
|
+
* of shorter months. Throws `ConflictError` (`409 no_macos_session_in_stock`)
|
|
24
|
+
* when no session is free — iSnap provisions one and attaches it, so the call
|
|
25
|
+
* does not need to be retried on a schedule.
|
|
26
|
+
*
|
|
27
|
+
* One call rents one session; rent three by calling three times.
|
|
28
|
+
*/
|
|
29
|
+
rent(opts?: RequestOptions): Promise<MacosSession>;
|
|
30
|
+
/**
|
|
31
|
+
* `POST /v1/macos-sessions/{id}/cancel` — end the tenancy at its next anniversary.
|
|
32
|
+
*
|
|
33
|
+
* The session stays usable and keeps billing until `cancel_at`, the next
|
|
34
|
+
* occurrence of `anniversary_at` strictly after the call. Idempotent: a second
|
|
35
|
+
* call returns the `cancel_at` the first one set rather than pushing it a
|
|
36
|
+
* month further out.
|
|
37
|
+
*/
|
|
38
|
+
cancel(id: string, opts?: RequestOptions): Promise<MacosSession>;
|
|
39
|
+
/**
|
|
40
|
+
* `POST /v1/macos-sessions/{id}/uncancel` — withdraw a pending cancellation.
|
|
41
|
+
*
|
|
42
|
+
* Clears `cancel_at` and leaves `anniversary_at` untouched, so the billing day
|
|
43
|
+
* does not move. Idempotent on a session that is not cancelled, and `404` once
|
|
44
|
+
* the release has already returned the session to stock.
|
|
45
|
+
*/
|
|
46
|
+
uncancel(id: string, opts?: RequestOptions): Promise<MacosSession>;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=macos-sessions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"macos-sessions.d.ts","sourceRoot":"","sources":["../../src/resources/macos-sessions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,CAAA;AAEhE;;;;;;;;;;;GAWG;AACH,qBAAa,qBAAsB,SAAQ,YAAY;IACrD;;;;;;;;;;OAUG;IACH,IAAI,CAAC,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC;IAIlD;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC;IAShE;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC;CAQnE"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { BaseResource } from './base.js';
|
|
2
|
+
/**
|
|
3
|
+
* Hosted macOS sessions rented on a wholesale partner's account (contract §2.16).
|
|
4
|
+
*
|
|
5
|
+
* A session is a macOS environment the partner runs their own iPhone's bridge
|
|
6
|
+
* against, with their OWN Apple ID signed into it. It is NOT a line: it carries
|
|
7
|
+
* no number and originates no messages, so nothing here has a direction, a
|
|
8
|
+
* platform or a capability.
|
|
9
|
+
*
|
|
10
|
+
* Direct customers do not use this resource — they buy sessions through
|
|
11
|
+
* `POST /v1/billing/mac-checkout` and every method here answers `403
|
|
12
|
+
* not_a_wholesale_partner` for them.
|
|
13
|
+
*/
|
|
14
|
+
export class MacosSessionsResource extends BaseResource {
|
|
15
|
+
/**
|
|
16
|
+
* `POST /v1/macos-sessions/rent` — take one session out of iSnap stock.
|
|
17
|
+
*
|
|
18
|
+
* The tenancy starts immediately and `anniversary_at` is the day it was taken:
|
|
19
|
+
* that day of the month is what the session bills on, clamped to the last day
|
|
20
|
+
* of shorter months. Throws `ConflictError` (`409 no_macos_session_in_stock`)
|
|
21
|
+
* when no session is free — iSnap provisions one and attaches it, so the call
|
|
22
|
+
* does not need to be retried on a schedule.
|
|
23
|
+
*
|
|
24
|
+
* One call rents one session; rent three by calling three times.
|
|
25
|
+
*/
|
|
26
|
+
rent(opts) {
|
|
27
|
+
return this.client.request('POST', '/v1/macos-sessions/rent', undefined, opts);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* `POST /v1/macos-sessions/{id}/cancel` — end the tenancy at its next anniversary.
|
|
31
|
+
*
|
|
32
|
+
* The session stays usable and keeps billing until `cancel_at`, the next
|
|
33
|
+
* occurrence of `anniversary_at` strictly after the call. Idempotent: a second
|
|
34
|
+
* call returns the `cancel_at` the first one set rather than pushing it a
|
|
35
|
+
* month further out.
|
|
36
|
+
*/
|
|
37
|
+
cancel(id, opts) {
|
|
38
|
+
return this.client.request('POST', `/v1/macos-sessions/${encodeURIComponent(id)}/cancel`, undefined, opts);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* `POST /v1/macos-sessions/{id}/uncancel` — withdraw a pending cancellation.
|
|
42
|
+
*
|
|
43
|
+
* Clears `cancel_at` and leaves `anniversary_at` untouched, so the billing day
|
|
44
|
+
* does not move. Idempotent on a session that is not cancelled, and `404` once
|
|
45
|
+
* the release has already returned the session to stock.
|
|
46
|
+
*/
|
|
47
|
+
uncancel(id, opts) {
|
|
48
|
+
return this.client.request('POST', `/v1/macos-sessions/${encodeURIComponent(id)}/uncancel`, undefined, opts);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=macos-sessions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"macos-sessions.js","sourceRoot":"","sources":["../../src/resources/macos-sessions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAIxC;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,qBAAsB,SAAQ,YAAY;IACrD;;;;;;;;;;OAUG;IACH,IAAI,CAAC,IAAqB;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAe,MAAM,EAAE,yBAAyB,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;IAC9F,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,EAAU,EAAE,IAAqB;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,MAAM,EACN,sBAAsB,kBAAkB,CAAC,EAAE,CAAC,SAAS,EACrD,SAAS,EACT,IAAI,CACL,CAAA;IACH,CAAC;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,EAAU,EAAE,IAAqB;QACxC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,MAAM,EACN,sBAAsB,kBAAkB,CAAC,EAAE,CAAC,WAAW,EACvD,SAAS,EACT,IAAI,CACL,CAAA;IACH,CAAC;CACF"}
|
|
@@ -10,19 +10,31 @@ export declare class PreOrdersResource extends BaseResource {
|
|
|
10
10
|
/**
|
|
11
11
|
* `POST /v1/pre-orders` — place a pre-order for a rental tier with no
|
|
12
12
|
* in-stock inventory. Set `inbound_only: true` to request the inbound-only
|
|
13
|
-
* rental variant.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
13
|
+
* rental variant. `billing_tier` is optional and ORTHOGONAL to that plan —
|
|
14
|
+
* omitting it means `rental_iphone`, the only tier this flow mints, and
|
|
15
|
+
* `rental_iphone` covers BOTH rental products (`inbound_only` is what picks
|
|
16
|
+
* between them), so naming both is never a contradiction. When named it is
|
|
17
|
+
* answered rather than discarded (WHA-2949): `rental_android` is a
|
|
18
|
+
* `400 android_rental_not_purchasable` — no Android product exists in the
|
|
19
|
+
* Stripe catalogue — and a BYOD / virtual-shared / pool tier is a
|
|
20
|
+
* `400 tier_not_pre_orderable` whose message names the endpoint that
|
|
21
|
+
* acquires it instead. Returns a `draft` pre-order and NOTHING else: no
|
|
22
|
+
* line, no fulfillment task, no ops notification, no Stripe charge, and
|
|
23
|
+
* `stripe_client_secret` is always `null`. A draft costs nothing to place
|
|
24
|
+
* and binds nobody — call `confirm()` to engage the month and start
|
|
25
|
+
* procurement.
|
|
18
26
|
*/
|
|
19
27
|
create(body: CreatePreOrderBody, opts?: RequestOptions): Promise<PreOrder>;
|
|
20
28
|
/**
|
|
21
29
|
* `POST /v1/pre-orders/{id}/confirm` — confirm a `draft` pre-order. The
|
|
22
30
|
* binding step: engages the one-month commitment (full month, no proration)
|
|
23
31
|
* and triggers procurement (mints the provisioning line + fulfillment task,
|
|
24
|
-
* notifies ops
|
|
25
|
-
*
|
|
32
|
+
* notifies ops). Returns the pre-order in `provisioning`; ops procures the
|
|
33
|
+
* hardware and the partner is notified via the `pre_order.fulfilled` webhook
|
|
34
|
+
* when a matching line is ready. Direct customers get a Stripe
|
|
35
|
+
* `stripe_client_secret` to confirm the first-month charge; wholesale
|
|
36
|
+
* partners are billed EOM (no per-line Stripe sub). Only a draft can be
|
|
37
|
+
* confirmed.
|
|
26
38
|
*/
|
|
27
39
|
confirm(id: string, opts?: RequestOptions): Promise<PreOrder>;
|
|
28
40
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preorders.d.ts","sourceRoot":"","sources":["../../src/resources/preorders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAA;AACxD,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,gBAAgB,CAAC,CAAA;AAIpE,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAE5E,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAC1C,KAAK,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAC/C,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAA;AAChC,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,KAA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CAAC,KAAK,GAAE,kBAAuB,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAOtF,kEAAkE;IAClE,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC;IASzD;;;;OAIG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC;CAQ7D"}
|
|
@@ -3,11 +3,19 @@ export class PreOrdersResource extends BaseResource {
|
|
|
3
3
|
/**
|
|
4
4
|
* `POST /v1/pre-orders` — place a pre-order for a rental tier with no
|
|
5
5
|
* in-stock inventory. Set `inbound_only: true` to request the inbound-only
|
|
6
|
-
* rental variant.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
6
|
+
* rental variant. `billing_tier` is optional and ORTHOGONAL to that plan —
|
|
7
|
+
* omitting it means `rental_iphone`, the only tier this flow mints, and
|
|
8
|
+
* `rental_iphone` covers BOTH rental products (`inbound_only` is what picks
|
|
9
|
+
* between them), so naming both is never a contradiction. When named it is
|
|
10
|
+
* answered rather than discarded (WHA-2949): `rental_android` is a
|
|
11
|
+
* `400 android_rental_not_purchasable` — no Android product exists in the
|
|
12
|
+
* Stripe catalogue — and a BYOD / virtual-shared / pool tier is a
|
|
13
|
+
* `400 tier_not_pre_orderable` whose message names the endpoint that
|
|
14
|
+
* acquires it instead. Returns a `draft` pre-order and NOTHING else: no
|
|
15
|
+
* line, no fulfillment task, no ops notification, no Stripe charge, and
|
|
16
|
+
* `stripe_client_secret` is always `null`. A draft costs nothing to place
|
|
17
|
+
* and binds nobody — call `confirm()` to engage the month and start
|
|
18
|
+
* procurement.
|
|
11
19
|
*/
|
|
12
20
|
create(body, opts) {
|
|
13
21
|
return this.client.request('POST', '/v1/pre-orders', body, opts);
|
|
@@ -16,8 +24,12 @@ export class PreOrdersResource extends BaseResource {
|
|
|
16
24
|
* `POST /v1/pre-orders/{id}/confirm` — confirm a `draft` pre-order. The
|
|
17
25
|
* binding step: engages the one-month commitment (full month, no proration)
|
|
18
26
|
* and triggers procurement (mints the provisioning line + fulfillment task,
|
|
19
|
-
* notifies ops
|
|
20
|
-
*
|
|
27
|
+
* notifies ops). Returns the pre-order in `provisioning`; ops procures the
|
|
28
|
+
* hardware and the partner is notified via the `pre_order.fulfilled` webhook
|
|
29
|
+
* when a matching line is ready. Direct customers get a Stripe
|
|
30
|
+
* `stripe_client_secret` to confirm the first-month charge; wholesale
|
|
31
|
+
* partners are billed EOM (no per-line Stripe sub). Only a draft can be
|
|
32
|
+
* confirmed.
|
|
21
33
|
*/
|
|
22
34
|
confirm(id, opts) {
|
|
23
35
|
return this.client.request('POST', `/v1/pre-orders/${encodeURIComponent(id)}/confirm`, undefined, opts);
|