@isnap/sdk 2.1.0-next.207 → 2.1.0-next.208
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.
|
@@ -726,12 +726,15 @@ export interface paths {
|
|
|
726
726
|
put?: never;
|
|
727
727
|
/**
|
|
728
728
|
* Atomically reserve + activate a line
|
|
729
|
-
* @description Find an available line matching `billing_tier` (and optional `area_code`), reserve it, and activate it in a single round-trip. Useful when the partner doesn't care which specific number they get — saves the reserve→checkout→activate dance. Scoped API keys are rejected (cannot assign lines outside their allowlist).
|
|
729
|
+
* @description Find an available line matching `billing_tier` (and optional `area_code`), reserve it, and activate it in a single round-trip. Useful when the partner doesn't care which specific number they get — saves the reserve→checkout→activate dance. Scoped API keys are rejected (cannot assign lines outside their allowlist). Every call takes one more line out of stock and makes it yours, so a retry MUST carry the same `Idempotency-Key` as the call it retries: the same key with the same body replays the first response instead of assigning a second line.
|
|
730
730
|
*/
|
|
731
731
|
post: {
|
|
732
732
|
parameters: {
|
|
733
733
|
query?: never;
|
|
734
|
-
header?:
|
|
734
|
+
header?: {
|
|
735
|
+
/** @description Optional. Makes a retry safe: the same key with the same body within 24h replays the first successful response instead of acting again, and the same key with a different body is `409 idempotency_key_collision`. While the first request is still running, a retry gets `503 idempotency_in_flight` and should retry shortly. A request that fails records nothing, so retrying it runs it again. At most 255 characters. Alias: `X-Idempotency-Key`. */
|
|
736
|
+
"idempotency-key"?: string;
|
|
737
|
+
};
|
|
735
738
|
path?: never;
|
|
736
739
|
cookie?: never;
|
|
737
740
|
};
|
|
@@ -819,6 +822,15 @@ export interface paths {
|
|
|
819
822
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
820
823
|
};
|
|
821
824
|
};
|
|
825
|
+
/** @description Service unavailable — a concurrent request is in flight */
|
|
826
|
+
503: {
|
|
827
|
+
headers: {
|
|
828
|
+
[name: string]: unknown;
|
|
829
|
+
};
|
|
830
|
+
content: {
|
|
831
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
832
|
+
};
|
|
833
|
+
};
|
|
822
834
|
};
|
|
823
835
|
};
|
|
824
836
|
delete?: never;
|
|
@@ -843,7 +855,10 @@ export interface paths {
|
|
|
843
855
|
post: {
|
|
844
856
|
parameters: {
|
|
845
857
|
query?: never;
|
|
846
|
-
header?:
|
|
858
|
+
header?: {
|
|
859
|
+
/** @description Optional. Makes a retry safe: the same key with the same body within 24h replays the first successful response instead of acting again, and the same key with a different body is `409 idempotency_key_collision`. While the first request is still running, a retry gets `503 idempotency_in_flight` and should retry shortly. A request that fails records nothing, so retrying it runs it again. At most 255 characters. Alias: `X-Idempotency-Key`. */
|
|
860
|
+
"idempotency-key"?: string;
|
|
861
|
+
};
|
|
847
862
|
path?: never;
|
|
848
863
|
cookie?: never;
|
|
849
864
|
};
|
|
@@ -931,6 +946,15 @@ export interface paths {
|
|
|
931
946
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
932
947
|
};
|
|
933
948
|
};
|
|
949
|
+
/** @description Service unavailable — a concurrent request is in flight */
|
|
950
|
+
503: {
|
|
951
|
+
headers: {
|
|
952
|
+
[name: string]: unknown;
|
|
953
|
+
};
|
|
954
|
+
content: {
|
|
955
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
956
|
+
};
|
|
957
|
+
};
|
|
934
958
|
};
|
|
935
959
|
};
|
|
936
960
|
delete?: never;
|
|
@@ -7016,12 +7040,15 @@ export interface paths {
|
|
|
7016
7040
|
put?: never;
|
|
7017
7041
|
/**
|
|
7018
7042
|
* Rent a hosted macOS session
|
|
7019
|
-
* @description Take one hosted macOS session out of iSnap stock on the calling wholesale partner’s account. An optional `metadata` object tags the tenancy with your own identifiers; it is returned on the session and echoed on every `macos_session.*` webhook. The tenancy starts immediately and `anniversary_at` is stamped with the day it was taken — that day of the month is what the session bills on, clamped to the last day of shorter months. Returns `409 no_macos_session_in_stock` when no confirmed, unrented session sits on a delivered Mac; iSnap provisions one and attaches it, and no request needs to be repeated. Direct customers do not use this verb — they buy sessions through `POST /v1/billing/mac-checkout` and are refused here with `403 not_a_wholesale_partner`.
|
|
7043
|
+
* @description Take one hosted macOS session out of iSnap stock on the calling wholesale partner’s account. An optional `metadata` object tags the tenancy with your own identifiers; it is returned on the session and echoed on every `macos_session.*` webhook. The tenancy starts immediately and `anniversary_at` is stamped with the day it was taken — that day of the month is what the session bills on, clamped to the last day of shorter months. Returns `409 no_macos_session_in_stock` when no confirmed, unrented session sits on a delivered Mac; iSnap provisions one and attaches it, and no request needs to be repeated. Direct customers do not use this verb — they buy sessions through `POST /v1/billing/mac-checkout` and are refused here with `403 not_a_wholesale_partner`. Every call rents a fresh billable session, so a retry MUST carry the same `Idempotency-Key` as the call it retries: the same key with the same body replays the first `201` instead of renting again.
|
|
7020
7044
|
*/
|
|
7021
7045
|
post: {
|
|
7022
7046
|
parameters: {
|
|
7023
7047
|
query?: never;
|
|
7024
|
-
header?:
|
|
7048
|
+
header?: {
|
|
7049
|
+
/** @description Optional. Makes a retry safe: the same key with the same body within 24h replays the first successful response instead of acting again, and the same key with a different body is `409 idempotency_key_collision`. While the first request is still running, a retry gets `503 idempotency_in_flight` and should retry shortly. A request that fails records nothing, so retrying it runs it again. At most 255 characters. Alias: `X-Idempotency-Key`. */
|
|
7050
|
+
"idempotency-key"?: string;
|
|
7051
|
+
};
|
|
7025
7052
|
path?: never;
|
|
7026
7053
|
cookie?: never;
|
|
7027
7054
|
};
|
|
@@ -7094,6 +7121,15 @@ export interface paths {
|
|
|
7094
7121
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
7095
7122
|
};
|
|
7096
7123
|
};
|
|
7124
|
+
/** @description Service unavailable — a concurrent request is in flight */
|
|
7125
|
+
503: {
|
|
7126
|
+
headers: {
|
|
7127
|
+
[name: string]: unknown;
|
|
7128
|
+
};
|
|
7129
|
+
content: {
|
|
7130
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
7131
|
+
};
|
|
7132
|
+
};
|
|
7097
7133
|
};
|
|
7098
7134
|
};
|
|
7099
7135
|
delete?: never;
|
|
@@ -26,7 +26,11 @@ export declare class MacosSessionsResource extends BaseResource {
|
|
|
26
26
|
* when no session is free — iSnap provisions one and attaches it, so the call
|
|
27
27
|
* does not need to be retried on a schedule.
|
|
28
28
|
*
|
|
29
|
-
* One call rents one session; rent three by calling three times
|
|
29
|
+
* One call rents one session; rent three by calling three times, each with
|
|
30
|
+
* its OWN idempotency key. The key (auto-generated per call unless you pass
|
|
31
|
+
* `opts.idempotencyKey`) is what makes a retry safe: calls that share a key
|
|
32
|
+
* rent ONE session between them, and the later ones get the first one's
|
|
33
|
+
* response back. Reuse a key only to retry the call it was first sent with.
|
|
30
34
|
*
|
|
31
35
|
* Pass `{ metadata }` to tag the tenancy with your own identifiers: they come
|
|
32
36
|
* back on the session and as `data.metadata` on every `macos_session.*`
|
|
@@ -1 +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;AAChE,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAA;AAC5E,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,mBAAmB,CAAC,CAAA;AAE9E;;;;;;;;;;;GAWG;AACH,qBAAa,qBAAsB,SAAQ,YAAY;IACrD
|
|
1
|
+
{"version":3,"file":"macos-sessions.d.ts","sourceRoot":"","sources":["../../src/resources/macos-sessions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,E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