@binalyze/air-sdk 5.22.4 → 5.24.3
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/dist/generated/bindings-v2.d.ts +3 -0
- package/dist/generated/bindings-v2.js +44 -0
- package/dist/generated/bindings-v2.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/sdk/typescript-axios/sdk.gen.d.ts +441 -73
- package/dist/sdk/typescript-axios/sdk.gen.js +2014 -552
- package/dist/sdk/typescript-axios/sdk.gen.js.map +1 -1
- package/dist/sdk/typescript-axios/types.gen.d.ts +10683 -6110
- package/dist/sdk/typescript-axios-v2/client/client.gen.d.ts +2 -0
- package/dist/sdk/typescript-axios-v2/client/client.gen.js +141 -0
- package/dist/sdk/typescript-axios-v2/client/client.gen.js.map +1 -0
- package/dist/sdk/typescript-axios-v2/client/index.d.ts +7 -0
- package/dist/sdk/typescript-axios-v2/client/index.js +16 -0
- package/dist/sdk/typescript-axios-v2/client/index.js.map +1 -0
- package/dist/sdk/typescript-axios-v2/client/types.gen.d.ts +95 -0
- package/dist/sdk/typescript-axios-v2/client/types.gen.js +5 -0
- package/dist/sdk/typescript-axios-v2/client/types.gen.js.map +1 -0
- package/dist/sdk/typescript-axios-v2/client/utils.gen.d.ts +14 -0
- package/dist/sdk/typescript-axios-v2/client/utils.gen.js +175 -0
- package/dist/sdk/typescript-axios-v2/client/utils.gen.js.map +1 -0
- package/dist/sdk/typescript-axios-v2/client.gen.d.ts +12 -0
- package/dist/sdk/typescript-axios-v2/client.gen.js +8 -0
- package/dist/sdk/typescript-axios-v2/client.gen.js.map +1 -0
- package/dist/sdk/typescript-axios-v2/core/auth.gen.d.ts +18 -0
- package/dist/sdk/typescript-axios-v2/core/auth.gen.js +20 -0
- package/dist/sdk/typescript-axios-v2/core/auth.gen.js.map +1 -0
- package/dist/sdk/typescript-axios-v2/core/bodySerializer.gen.d.ts +17 -0
- package/dist/sdk/typescript-axios-v2/core/bodySerializer.gen.js +62 -0
- package/dist/sdk/typescript-axios-v2/core/bodySerializer.gen.js.map +1 -0
- package/dist/sdk/typescript-axios-v2/core/params.gen.d.ts +33 -0
- package/dist/sdk/typescript-axios-v2/core/params.gen.js +94 -0
- package/dist/sdk/typescript-axios-v2/core/params.gen.js.map +1 -0
- package/dist/sdk/typescript-axios-v2/core/pathSerializer.gen.d.ts +33 -0
- package/dist/sdk/typescript-axios-v2/core/pathSerializer.gen.js +125 -0
- package/dist/sdk/typescript-axios-v2/core/pathSerializer.gen.js.map +1 -0
- package/dist/sdk/typescript-axios-v2/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/sdk/typescript-axios-v2/core/serverSentEvents.gen.js +141 -0
- package/dist/sdk/typescript-axios-v2/core/serverSentEvents.gen.js.map +1 -0
- package/dist/sdk/typescript-axios-v2/core/types.gen.d.ts +78 -0
- package/dist/sdk/typescript-axios-v2/core/types.gen.js +5 -0
- package/dist/sdk/typescript-axios-v2/core/types.gen.js.map +1 -0
- package/dist/sdk/typescript-axios-v2/core/utils.gen.d.ts +19 -0
- package/dist/sdk/typescript-axios-v2/core/utils.gen.js +95 -0
- package/dist/sdk/typescript-axios-v2/core/utils.gen.js.map +1 -0
- package/dist/sdk/typescript-axios-v2/index.d.ts +2 -0
- package/dist/sdk/typescript-axios-v2/index.js +21 -0
- package/dist/sdk/typescript-axios-v2/index.js.map +1 -0
- package/dist/sdk/typescript-axios-v2/sdk.gen.d.ts +695 -0
- package/dist/sdk/typescript-axios-v2/sdk.gen.js +3435 -0
- package/dist/sdk/typescript-axios-v2/sdk.gen.js.map +1 -0
- package/dist/sdk/typescript-axios-v2/types.gen.d.ts +8221 -0
- package/dist/sdk/typescript-axios-v2/types.gen.js +5 -0
- package/dist/sdk/typescript-axios-v2/types.gen.js.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/page-iterator.d.ts +12 -0
- package/dist/utils/page-iterator.js +23 -0
- package/dist/utils/page-iterator.js.map +1 -0
- package/dist/utils/retry.d.ts +29 -0
- package/dist/utils/retry.js +70 -0
- package/dist/utils/retry.js.map +1 -0
- package/dist/utils/typed-errors.d.ts +44 -0
- package/dist/utils/typed-errors.js +82 -0
- package/dist/utils/typed-errors.js.map +1 -0
- package/dist/v2/AIR.d.ts +56 -0
- package/dist/v2/AIR.js +80 -0
- package/dist/v2/AIR.js.map +1 -0
- package/dist/v2/index.d.ts +1 -0
- package/dist/v2/index.js +18 -0
- package/dist/v2/index.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.gen.js","sourceRoot":"","sources":["../../../src/sdk/typescript-axios-v2/types.gen.ts"],"names":[],"mappings":";AAAA,cAAc;AACd,qDAAqD"}
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -18,4 +18,7 @@ __exportStar(require("./utils"), exports);
|
|
|
18
18
|
__exportStar(require("./error-helpers"), exports);
|
|
19
19
|
__exportStar(require("./builders"), exports);
|
|
20
20
|
__exportStar(require("./result"), exports);
|
|
21
|
+
__exportStar(require("./page-iterator"), exports);
|
|
22
|
+
__exportStar(require("./retry"), exports);
|
|
23
|
+
__exportStar(require("./typed-errors"), exports);
|
|
21
24
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,kDAAgC;AAChC,6CAA2B;AAC3B,2CAAyB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,kDAAgC;AAChC,6CAA2B;AAC3B,2CAAyB;AACzB,kDAAgC;AAChC,0CAAwB;AACxB,iDAA+B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Async iterator over v2 offset-paginated endpoints (Plan PR 18, design
|
|
3
|
+
* §5.6): requests increment pageNumber; the response's IOffsetPageV2 result
|
|
4
|
+
* carries currentPage/nextPage; iteration ends when nextPage is null. A
|
|
5
|
+
* non-advancing nextPage throws instead of looping forever.
|
|
6
|
+
*/
|
|
7
|
+
export interface OffsetPageLike<T> {
|
|
8
|
+
entities: T[];
|
|
9
|
+
currentPage: number;
|
|
10
|
+
nextPage: number | null;
|
|
11
|
+
}
|
|
12
|
+
export declare function iterateOffsetPages<T>(fetchPage: (pageNumber: number) => Promise<OffsetPageLike<T>>, startPage?: number): AsyncGenerator<T, void, undefined>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.iterateOffsetPages = iterateOffsetPages;
|
|
4
|
+
async function* iterateOffsetPages(fetchPage, startPage = 1) {
|
|
5
|
+
let pageNumber = startPage;
|
|
6
|
+
while (pageNumber !== null) {
|
|
7
|
+
const page = await fetchPage(pageNumber);
|
|
8
|
+
yield* page.entities;
|
|
9
|
+
if (page.nextPage === null) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
// The page shape comes from an unvalidated envelope cast, so a malformed
|
|
13
|
+
// response can carry undefined/NaN here; both would slip past a plain
|
|
14
|
+
// `<=` guard (undefined/NaN comparisons are false) and loop forever.
|
|
15
|
+
if (typeof page.nextPage !== 'number' ||
|
|
16
|
+
!Number.isFinite(page.nextPage) ||
|
|
17
|
+
page.nextPage <= pageNumber) {
|
|
18
|
+
throw new Error(`Offset pagination did not advance: requested page ${pageNumber}, nextPage ${page.nextPage}.`);
|
|
19
|
+
}
|
|
20
|
+
pageNumber = page.nextPage;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=page-iterator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-iterator.js","sourceRoot":"","sources":["../../src/utils/page-iterator.ts"],"names":[],"mappings":";;AAYA,gDAyBC;AAzBM,KAAK,SAAS,CAAC,CAAC,kBAAkB,CACvC,SAA6D,EAC7D,SAAS,GAAG,CAAC;IAEb,IAAI,UAAU,GAAkB,SAAS,CAAC;IAC1C,OAAO,UAAU,KAAK,IAAI,EAAE,CAAC;QAC3B,MAAM,IAAI,GAAG,MAAM,SAAS,CAAC,UAAU,CAAC,CAAC;QACzC,KAAK,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;QACrB,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;YAC3B,OAAO;QACT,CAAC;QACD,yEAAyE;QACzE,sEAAsE;QACtE,qEAAqE;QACrE,IACE,OAAO,IAAI,CAAC,QAAQ,KAAK,QAAQ;YACjC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC;YAC/B,IAAI,CAAC,QAAQ,IAAI,UAAU,EAC3B,CAAC;YACD,MAAM,IAAI,KAAK,CACb,qDAAqD,UAAU,cAAc,IAAI,CAAC,QAAQ,GAAG,CAC9F,CAAC;QACJ,CAAC;QACD,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC7B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response-status retry helper for the v2 SDK (Plan PR 18). The default
|
|
3
|
+
* retryable set is the design-reference `x-retry-on` list (§5.8); the spec
|
|
4
|
+
* does not carry the extension yet, so the list lives here, overridable via
|
|
5
|
+
* options. Retry-After (delta-seconds or HTTP-date) wins over backoff.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DEFAULT_RETRYABLE_STATUSES: readonly number[];
|
|
8
|
+
/**
|
|
9
|
+
* Safe set for non-idempotent operations: the v2 API has no idempotency keys,
|
|
10
|
+
* so a 5xx after the server-side effect must not re-send the mutation. 408
|
|
11
|
+
* (never reached the handler) and 429 (rejected before execution) are the
|
|
12
|
+
* only statuses that cannot have caused a partial effect.
|
|
13
|
+
*/
|
|
14
|
+
export declare const MUTATION_RETRYABLE_STATUSES: readonly number[];
|
|
15
|
+
export interface RetryableResponse {
|
|
16
|
+
status: number;
|
|
17
|
+
headers?: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
export interface RetryOptions {
|
|
20
|
+
maxAttempts?: number;
|
|
21
|
+
retryableStatuses?: readonly number[];
|
|
22
|
+
baseDelayMs?: number;
|
|
23
|
+
maxDelayMs?: number;
|
|
24
|
+
sleep?: (ms: number) => Promise<void>;
|
|
25
|
+
now?: () => number;
|
|
26
|
+
}
|
|
27
|
+
export declare function parseRetryAfterMs(value: unknown, now?: () => number): number | undefined;
|
|
28
|
+
export declare function withRetry<T extends RetryableResponse>(send: () => Promise<T>, options?: RetryOptions): Promise<T>;
|
|
29
|
+
export declare function readRetryAfterHeader(headers: Record<string, unknown> | undefined): string | undefined;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MUTATION_RETRYABLE_STATUSES = exports.DEFAULT_RETRYABLE_STATUSES = void 0;
|
|
4
|
+
exports.parseRetryAfterMs = parseRetryAfterMs;
|
|
5
|
+
exports.withRetry = withRetry;
|
|
6
|
+
exports.readRetryAfterHeader = readRetryAfterHeader;
|
|
7
|
+
/**
|
|
8
|
+
* Response-status retry helper for the v2 SDK (Plan PR 18). The default
|
|
9
|
+
* retryable set is the design-reference `x-retry-on` list (§5.8); the spec
|
|
10
|
+
* does not carry the extension yet, so the list lives here, overridable via
|
|
11
|
+
* options. Retry-After (delta-seconds or HTTP-date) wins over backoff.
|
|
12
|
+
*/
|
|
13
|
+
exports.DEFAULT_RETRYABLE_STATUSES = [408, 429, 500, 502, 503, 504];
|
|
14
|
+
/**
|
|
15
|
+
* Safe set for non-idempotent operations: the v2 API has no idempotency keys,
|
|
16
|
+
* so a 5xx after the server-side effect must not re-send the mutation. 408
|
|
17
|
+
* (never reached the handler) and 429 (rejected before execution) are the
|
|
18
|
+
* only statuses that cannot have caused a partial effect.
|
|
19
|
+
*/
|
|
20
|
+
exports.MUTATION_RETRYABLE_STATUSES = [408, 429];
|
|
21
|
+
function parseRetryAfterMs(value, now = Date.now) {
|
|
22
|
+
if (typeof value !== 'string' || value.trim() === '') {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
const seconds = Number(value);
|
|
26
|
+
if (Number.isFinite(seconds) && seconds >= 0) {
|
|
27
|
+
return seconds * 1000;
|
|
28
|
+
}
|
|
29
|
+
const dateMs = Date.parse(value);
|
|
30
|
+
if (Number.isNaN(dateMs)) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
return Math.max(0, dateMs - now());
|
|
34
|
+
}
|
|
35
|
+
async function withRetry(send, options = {}) {
|
|
36
|
+
const maxAttempts = options.maxAttempts ?? 3;
|
|
37
|
+
const retryableStatuses = options.retryableStatuses ?? exports.DEFAULT_RETRYABLE_STATUSES;
|
|
38
|
+
const baseDelayMs = options.baseDelayMs ?? 500;
|
|
39
|
+
const maxDelayMs = options.maxDelayMs ?? 30_000;
|
|
40
|
+
const sleep = options.sleep ?? defaultSleep;
|
|
41
|
+
let response = await send();
|
|
42
|
+
for (let attempt = 1; attempt < maxAttempts && retryableStatuses.includes(response.status); attempt += 1) {
|
|
43
|
+
const retryAfterMs = parseRetryAfterMs(readHeader(response.headers, 'retry-after'), options.now);
|
|
44
|
+
// Retry-After is honored exactly (server instruction) — maxDelayMs only
|
|
45
|
+
// caps our own computed backoff, never the server's explicit delay, or a
|
|
46
|
+
// 429/503 with a long Retry-After would be retried too early. Pure backoff
|
|
47
|
+
// gets half-jitter so a fleet of clients does not retry in lockstep.
|
|
48
|
+
const backoffMs = baseDelayMs * 2 ** (attempt - 1);
|
|
49
|
+
const jitteredBackoffMs = backoffMs / 2 + Math.random() * (backoffMs / 2);
|
|
50
|
+
const delayMs = retryAfterMs ?? Math.min(jitteredBackoffMs, maxDelayMs);
|
|
51
|
+
await sleep(delayMs);
|
|
52
|
+
response = await send();
|
|
53
|
+
}
|
|
54
|
+
return response;
|
|
55
|
+
}
|
|
56
|
+
function readRetryAfterHeader(headers) {
|
|
57
|
+
const value = readHeader(headers, 'retry-after');
|
|
58
|
+
return typeof value === 'string' ? value : undefined;
|
|
59
|
+
}
|
|
60
|
+
function readHeader(headers, name) {
|
|
61
|
+
if (!headers) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
const key = Object.keys(headers).find((header) => header.toLowerCase() === name);
|
|
65
|
+
return key === undefined ? undefined : headers[key];
|
|
66
|
+
}
|
|
67
|
+
function defaultSleep(ms) {
|
|
68
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=retry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../src/utils/retry.ts"],"names":[],"mappings":";;;AA8BA,8CAgBC;AAED,8BA4BC;AAED,oDAKC;AAnFD;;;;;GAKG;AACU,QAAA,0BAA0B,GAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAE5F;;;;;GAKG;AACU,QAAA,2BAA2B,GAAsB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAgBzE,SAAgB,iBAAiB,CAC/B,KAAc,EACd,MAAoB,IAAI,CAAC,GAAG;IAE5B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACrD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,IAAI,MAAM,CAA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TTP_STATUS in src/shared/filters/v2-exception.filter.ts;
|
|
5
|
+
* unknown codes and non-envelope payloads degrade to the UNKNOWN variant.
|
|
6
|
+
*/
|
|
7
|
+
export declare const V2_ERROR_CODES: readonly ["BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "VALIDATION_ERROR", "RATE_LIMITED", "INTERNAL_ERROR", "SERVICE_UNAVAILABLE"];
|
|
8
|
+
export type V2ErrorCode = (typeof V2_ERROR_CODES)[number];
|
|
9
|
+
export interface V2ApiErrorEntry {
|
|
10
|
+
code: string;
|
|
11
|
+
message: string;
|
|
12
|
+
field?: string;
|
|
13
|
+
details?: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
export interface V2Envelope<T = unknown> {
|
|
16
|
+
success: boolean;
|
|
17
|
+
statusCode: number;
|
|
18
|
+
errors: V2ApiErrorEntry[];
|
|
19
|
+
result: T | null;
|
|
20
|
+
}
|
|
21
|
+
interface BaseTypedV2Error {
|
|
22
|
+
statusCode: number;
|
|
23
|
+
message: string;
|
|
24
|
+
errors: V2ApiErrorEntry[];
|
|
25
|
+
}
|
|
26
|
+
export type TypedV2Error = (BaseTypedV2Error & {
|
|
27
|
+
code: 'VALIDATION_ERROR';
|
|
28
|
+
fieldErrors: V2ApiErrorEntry[];
|
|
29
|
+
}) | (BaseTypedV2Error & {
|
|
30
|
+
code: 'RATE_LIMITED';
|
|
31
|
+
retryAfterMs?: number;
|
|
32
|
+
}) | (BaseTypedV2Error & {
|
|
33
|
+
code: Exclude<V2ErrorCode, 'VALIDATION_ERROR' | 'RATE_LIMITED'>;
|
|
34
|
+
}) | (BaseTypedV2Error & {
|
|
35
|
+
code: 'UNKNOWN';
|
|
36
|
+
});
|
|
37
|
+
export declare class AirV2Error extends Error {
|
|
38
|
+
readonly typed: TypedV2Error;
|
|
39
|
+
constructor(typed: TypedV2Error);
|
|
40
|
+
}
|
|
41
|
+
export declare function isV2Envelope(value: unknown): value is V2Envelope;
|
|
42
|
+
export declare function classifyV2Error(payload: unknown, fallbackStatusCode: number, retryAfterHeader?: string): TypedV2Error;
|
|
43
|
+
export declare function unwrapV2Envelope<T>(payload: unknown, fallbackStatusCode?: number, retryAfterHeader?: string): T;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AirV2Error = exports.V2_ERROR_CODES = void 0;
|
|
4
|
+
exports.isV2Envelope = isV2Envelope;
|
|
5
|
+
exports.classifyV2Error = classifyV2Error;
|
|
6
|
+
exports.unwrapV2Envelope = unwrapV2Envelope;
|
|
7
|
+
const retry_1 = require("./retry");
|
|
8
|
+
/**
|
|
9
|
+
* Typed v2 error layer (Plan PR 18): a discriminated union over the stable
|
|
10
|
+
* `code` field inside the v2 envelope's errors[]. Codes mirror
|
|
11
|
+
* V2_ERROR_CODE_BY_HTTP_STATUS in src/shared/filters/v2-exception.filter.ts;
|
|
12
|
+
* unknown codes and non-envelope payloads degrade to the UNKNOWN variant.
|
|
13
|
+
*/
|
|
14
|
+
exports.V2_ERROR_CODES = [
|
|
15
|
+
'BAD_REQUEST',
|
|
16
|
+
'UNAUTHORIZED',
|
|
17
|
+
'FORBIDDEN',
|
|
18
|
+
'NOT_FOUND',
|
|
19
|
+
'CONFLICT',
|
|
20
|
+
'VALIDATION_ERROR',
|
|
21
|
+
'RATE_LIMITED',
|
|
22
|
+
'INTERNAL_ERROR',
|
|
23
|
+
'SERVICE_UNAVAILABLE',
|
|
24
|
+
];
|
|
25
|
+
class AirV2Error extends Error {
|
|
26
|
+
constructor(typed) {
|
|
27
|
+
super(typed.message);
|
|
28
|
+
this.name = 'AirV2Error';
|
|
29
|
+
this.typed = typed;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.AirV2Error = AirV2Error;
|
|
33
|
+
function isV2Envelope(value) {
|
|
34
|
+
if (typeof value !== 'object' || value === null) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
const candidate = value;
|
|
38
|
+
return (typeof candidate.success === 'boolean' &&
|
|
39
|
+
typeof candidate.statusCode === 'number' &&
|
|
40
|
+
Array.isArray(candidate.errors) &&
|
|
41
|
+
'result' in candidate);
|
|
42
|
+
}
|
|
43
|
+
function classifyV2Error(payload, fallbackStatusCode, retryAfterHeader) {
|
|
44
|
+
if (!isV2Envelope(payload)) {
|
|
45
|
+
return {
|
|
46
|
+
code: 'UNKNOWN',
|
|
47
|
+
statusCode: fallbackStatusCode,
|
|
48
|
+
message: 'Response is not a v2 envelope.',
|
|
49
|
+
errors: [],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
const errors = payload.errors;
|
|
53
|
+
const primaryCode = errors[0]?.code;
|
|
54
|
+
const message = errors[0]?.message ?? `Request failed with status ${payload.statusCode}.`;
|
|
55
|
+
const base = { statusCode: payload.statusCode, message, errors };
|
|
56
|
+
if (primaryCode === 'VALIDATION_ERROR') {
|
|
57
|
+
return { ...base, code: 'VALIDATION_ERROR', fieldErrors: errors };
|
|
58
|
+
}
|
|
59
|
+
if (primaryCode === 'RATE_LIMITED') {
|
|
60
|
+
return { ...base, code: 'RATE_LIMITED', retryAfterMs: (0, retry_1.parseRetryAfterMs)(retryAfterHeader) };
|
|
61
|
+
}
|
|
62
|
+
if (isKnownErrorCode(primaryCode)) {
|
|
63
|
+
return { ...base, code: primaryCode };
|
|
64
|
+
}
|
|
65
|
+
return { ...base, code: 'UNKNOWN' };
|
|
66
|
+
}
|
|
67
|
+
function unwrapV2Envelope(payload, fallbackStatusCode = 0, retryAfterHeader) {
|
|
68
|
+
if (!isV2Envelope(payload)) {
|
|
69
|
+
throw new AirV2Error(classifyV2Error(payload, fallbackStatusCode, retryAfterHeader));
|
|
70
|
+
}
|
|
71
|
+
if (!payload.success) {
|
|
72
|
+
throw new AirV2Error(classifyV2Error(payload, payload.statusCode, retryAfterHeader));
|
|
73
|
+
}
|
|
74
|
+
return payload.result;
|
|
75
|
+
}
|
|
76
|
+
function isKnownErrorCode(code) {
|
|
77
|
+
return (code !== undefined &&
|
|
78
|
+
code !== 'VALIDATION_ERROR' &&
|
|
79
|
+
code !== 'RATE_LIMITED' &&
|
|
80
|
+
exports.V2_ERROR_CODES.includes(code));
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=typed-errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typed-errors.js","sourceRoot":"","sources":["../../src/utils/typed-errors.ts"],"names":[],"mappings":";;;AA0DA,oCAWC;AAED,0CA4BC;AAED,4CAYC;AAjHD,mCAA4C;AAE5C;;;;;GAKG;AACU,QAAA,cAAc,GAAG;IAC5B,aAAa;IACb,cAAc;IACd,WAAW;IACX,WAAW;IACX,UAAU;IACV,kBAAkB;IAClB,cAAc;IACd,gBAAgB;IAChB,qBAAqB;CACb,CAAC;AA8BX,MAAa,UAAW,SAAQ,KAAK;IAGnC,YAAY,KAAmB;QAC7B,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF;AARD,gCAQC;AAED,SAAgB,YAAY,CAAC,KAAc;IACzC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,SAAS,GAAG,KAAgC,CAAC;IACnD,OAAO,CACL,OAAO,SAAS,CAAC,OAAO,KAAK,SAAS;QACtC,OAAO,SAAS,CAAC,UAAU,KAAK,QAAQ;QACxC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC;QAC/B,QAAQ,IAAI,SAAS,CACtB,CAAC;AACJ,CAAC;AAED,SAAgB,eAAe,CAC7B,OAAgB,EAChB,kBAA0B,EAC1B,gBAAyB;IAEzB,IAAI,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CAAC,CAAC,CAAC;IACvF,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QACrB,MAAM,IAAI,UAAU,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC;IACvF,CAAC;IACD,OAAO,OAAO,CAAC,MAAW,CAAC;AAC7B,CAAC;AAED,SAAS,gBAAgB,CACvB,IAAwB;IAExB,OAAO,CACL,IAAI,KAAK,SAAS;QAClB,IAAI,KAAK,kBAAkB;QAC3B,IAAI,KAAK,cAAc;QACtB,sBAAoC,CAAC,QAAQ,CAAC,IAAI,CAAC,CACrD,CAAC;AACJ,CAAC"}
|
package/dist/v2/AIR.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { sdkV2 } from '../generated/bindings-v2';
|
|
2
|
+
import { RetryOptions } from '../utils/retry';
|
|
3
|
+
interface V2AxiosResponse {
|
|
4
|
+
status: number;
|
|
5
|
+
headers?: Record<string, unknown>;
|
|
6
|
+
data?: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface RequestOptions {
|
|
9
|
+
/**
|
|
10
|
+
* Marks the wrapped operation as safe to re-send after a 5xx (GETs and
|
|
11
|
+
* other side-effect-free calls). Without it only 408/429 are retried: the
|
|
12
|
+
* v2 API has no idempotency keys, so a mutation that failed mid-flight
|
|
13
|
+
* must not be re-executed.
|
|
14
|
+
*/
|
|
15
|
+
idempotent?: boolean;
|
|
16
|
+
}
|
|
17
|
+
type SdkOperations = typeof sdkV2;
|
|
18
|
+
/**
|
|
19
|
+
* v2-aware AIR client (Plan PR 18). Exposes the full generated operation
|
|
20
|
+
* surface as `operations`, plus `request` (retry + envelope unwrap) and
|
|
21
|
+
* `listAll` (offset-pagination iterator) helpers that wrap any operation.
|
|
22
|
+
*
|
|
23
|
+
* Each instance owns its own HTTP client: constructing a second AIRV2 with a
|
|
24
|
+
* different URL or key does not affect earlier instances (unlike the v1 AIR
|
|
25
|
+
* class, which configures a process-wide singleton).
|
|
26
|
+
*/
|
|
27
|
+
export declare class AIRV2 {
|
|
28
|
+
private readonly retryOptions;
|
|
29
|
+
/**
|
|
30
|
+
* Raw generated v2 operations from swagger-v2.json (one per operationId),
|
|
31
|
+
* bound to this instance's client.
|
|
32
|
+
*/
|
|
33
|
+
readonly operations: SdkOperations;
|
|
34
|
+
private readonly client;
|
|
35
|
+
constructor(url: string, apiKey: string, retryOptions?: RetryOptions);
|
|
36
|
+
/**
|
|
37
|
+
* Runs a generated operation with status-based retry and unwraps the v2
|
|
38
|
+
* envelope, throwing AirV2Error on failure. Mutations retry only on
|
|
39
|
+
* 408/429 by default; pass { idempotent: true } for side-effect-free
|
|
40
|
+
* operations to also retry transient 5xx statuses.
|
|
41
|
+
*
|
|
42
|
+
* Example:
|
|
43
|
+
* const page = await air.request(() =>
|
|
44
|
+
* air.operations.caseV2ApiControllerFilterCases({ query: { pageNumber: 1 } }),
|
|
45
|
+
* { idempotent: true });
|
|
46
|
+
*/
|
|
47
|
+
request<T>(send: () => Promise<V2AxiosResponse>, options?: RequestOptions): Promise<T>;
|
|
48
|
+
/**
|
|
49
|
+
* Iterates every entity of an offset-paginated list operation, walking
|
|
50
|
+
* pageNumber until the envelope's result.nextPage is null. List reads are
|
|
51
|
+
* idempotent, so transient 5xx statuses are retried.
|
|
52
|
+
*/
|
|
53
|
+
listAll<T>(fetchPage: (pageNumber: number) => Promise<V2AxiosResponse>): AsyncGenerator<T, void, undefined>;
|
|
54
|
+
private retryOptionsFor;
|
|
55
|
+
}
|
|
56
|
+
export {};
|
package/dist/v2/AIR.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AIRV2 = void 0;
|
|
4
|
+
const bindings_v2_1 = require("../generated/bindings-v2");
|
|
5
|
+
const page_iterator_1 = require("../utils/page-iterator");
|
|
6
|
+
const retry_1 = require("../utils/retry");
|
|
7
|
+
const typed_errors_1 = require("../utils/typed-errors");
|
|
8
|
+
const utils_1 = require("../utils/utils");
|
|
9
|
+
/**
|
|
10
|
+
* v2-aware AIR client (Plan PR 18). Exposes the full generated operation
|
|
11
|
+
* surface as `operations`, plus `request` (retry + envelope unwrap) and
|
|
12
|
+
* `listAll` (offset-pagination iterator) helpers that wrap any operation.
|
|
13
|
+
*
|
|
14
|
+
* Each instance owns its own HTTP client: constructing a second AIRV2 with a
|
|
15
|
+
* different URL or key does not affect earlier instances (unlike the v1 AIR
|
|
16
|
+
* class, which configures a process-wide singleton).
|
|
17
|
+
*/
|
|
18
|
+
class AIRV2 {
|
|
19
|
+
constructor(url, apiKey, retryOptions = {}) {
|
|
20
|
+
this.retryOptions = retryOptions;
|
|
21
|
+
this.client = (0, bindings_v2_1.createClientV2)((0, bindings_v2_1.createConfigV2)());
|
|
22
|
+
this.client.setConfig({
|
|
23
|
+
baseURL: url,
|
|
24
|
+
headers: { Authorization: `Bearer ${apiKey}` },
|
|
25
|
+
validateStatus: () => true,
|
|
26
|
+
querySerializer: utils_1.serializeQueryDeep,
|
|
27
|
+
});
|
|
28
|
+
this.operations = bindOperations(this.client);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Runs a generated operation with status-based retry and unwraps the v2
|
|
32
|
+
* envelope, throwing AirV2Error on failure. Mutations retry only on
|
|
33
|
+
* 408/429 by default; pass { idempotent: true } for side-effect-free
|
|
34
|
+
* operations to also retry transient 5xx statuses.
|
|
35
|
+
*
|
|
36
|
+
* Example:
|
|
37
|
+
* const page = await air.request(() =>
|
|
38
|
+
* air.operations.caseV2ApiControllerFilterCases({ query: { pageNumber: 1 } }),
|
|
39
|
+
* { idempotent: true });
|
|
40
|
+
*/
|
|
41
|
+
async request(send, options = {}) {
|
|
42
|
+
const response = await (0, retry_1.withRetry)(send, this.retryOptionsFor(options.idempotent === true));
|
|
43
|
+
return (0, typed_errors_1.unwrapV2Envelope)(response.data, response.status, (0, retry_1.readRetryAfterHeader)(response.headers));
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Iterates every entity of an offset-paginated list operation, walking
|
|
47
|
+
* pageNumber until the envelope's result.nextPage is null. List reads are
|
|
48
|
+
* idempotent, so transient 5xx statuses are retried.
|
|
49
|
+
*/
|
|
50
|
+
listAll(fetchPage) {
|
|
51
|
+
const retryOptions = this.retryOptionsFor(true);
|
|
52
|
+
return (0, page_iterator_1.iterateOffsetPages)(async (pageNumber) => {
|
|
53
|
+
const response = await (0, retry_1.withRetry)(() => fetchPage(pageNumber), retryOptions);
|
|
54
|
+
return (0, typed_errors_1.unwrapV2Envelope)(response.data, response.status, (0, retry_1.readRetryAfterHeader)(response.headers));
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
retryOptionsFor(idempotent) {
|
|
58
|
+
return {
|
|
59
|
+
...this.retryOptions,
|
|
60
|
+
retryableStatuses: this.retryOptions.retryableStatuses ??
|
|
61
|
+
(idempotent ? retry_1.DEFAULT_RETRYABLE_STATUSES : retry_1.MUTATION_RETRYABLE_STATUSES),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.AIRV2 = AIRV2;
|
|
66
|
+
function bindOperations(client) {
|
|
67
|
+
const bound = {};
|
|
68
|
+
for (const [name, operation] of Object.entries(bindings_v2_1.sdkV2)) {
|
|
69
|
+
if (typeof operation !== 'function') {
|
|
70
|
+
bound[name] = operation;
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
// The instance client is spread last so a stray `client` in the caller's
|
|
74
|
+
// options cannot replace it — per-instance isolation must hold even when
|
|
75
|
+
// callers pass hey-api's per-call `client` option.
|
|
76
|
+
bound[name] = (options = {}) => operation({ ...options, client });
|
|
77
|
+
}
|
|
78
|
+
return bound;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=AIR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AIR.js","sourceRo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AU,CAAC,EAAE,YAAY,CAAC,CAAC;YAC5E,OAAO,IAAA,+BAAgB,EACrB,QAAQ,CAAC,IAAI,EACb,QAAQ,CAAC,MAAM,EACf,IAAA,4BAAoB,EAAC,QAAQ,CAAC,OAAO,CAAC,CACvC,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,eAAe,CAAC,UAAmB;QACzC,OAAO;YACL,GAAG,IAAI,CAAC,YAAY;YACpB,iBAAiB,EACf,IAAI,CAAC,YAAY,CAAC,iBAAiB;gBACnC,CAAC,UAAU,CAAC,CAAC,CAAC,kCAA0B,CAAC,CAAC,CAAC,mCAA2B,CAAC;SAC1E,CAAC;IACJ,CAAC;CACF;AA1ED,sBA0EC;AAED,SAAS,cAAc,CAAC,MAAgB;IACtC,MAAM,KAAK,GAA4B,EAAE,CAAC;IAC1C,KAAK,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,mBAAK,CAAC,EAAE,CAAC;QACtD,IAAI,OAAO,SAAS,KAAK,UAAU,EAAE,CAAC;YACpC,KAAK,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;YACxB,SAAS;QACX,CAAC;QACD,yEAAyE;QACzE,yEAAyE;QACzE,mDAAmD;QACnD,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,UAAmC,EAAE,EAAE,EAAE,CACrD,SAAwD,CAAC,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;IACtF,CAAC;IACD,OAAO,KAAsB,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AIR';
|
package/dist/v2/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./AIR"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v2/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB"}
|