@postman/sdk-config 0.4.0 → 0.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/README.md +7 -4
- package/dist/index.cjs +401 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +400 -77
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +393 -69
- package/dist/sdk-config/index.cjs.map +1 -1
- package/dist/sdk-config/index.d.cts +1 -1
- package/dist/sdk-config/index.d.ts +1 -1
- package/dist/sdk-config/index.js +393 -70
- package/dist/sdk-config/index.js.map +1 -1
- package/dist/sdk-config/v1/index.cjs +393 -69
- package/dist/sdk-config/v1/index.cjs.map +1 -1
- package/dist/sdk-config/v1/index.d.cts +707 -4147
- package/dist/sdk-config/v1/index.d.ts +707 -4147
- package/dist/sdk-config/v1/index.js +393 -70
- package/dist/sdk-config/v1/index.js.map +1 -1
- package/dist/sdk-config-ir/index.cjs +60 -1
- package/dist/sdk-config-ir/index.cjs.map +1 -1
- package/dist/sdk-config-ir/index.d.cts +1 -1
- package/dist/sdk-config-ir/index.d.ts +1 -1
- package/dist/sdk-config-ir/index.js +60 -2
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +60 -1
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +179 -1
- package/dist/sdk-config-ir/v1/index.d.ts +179 -1
- package/dist/sdk-config-ir/v1/index.js +60 -2
- package/dist/sdk-config-ir/v1/index.js.map +1 -1
- package/package.json +1 -1
- package/src/sdk-config/v1/README.md +9 -4
|
@@ -353,6 +353,64 @@ declare const apiConfigSchema: z.ZodObject<{
|
|
|
353
353
|
* remain included, while every audience-tagged node is excluded.
|
|
354
354
|
*/
|
|
355
355
|
audiences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
356
|
+
/**
|
|
357
|
+
* How the API signs the webhooks it sends, enabling a generated verification helper. API-wide, and
|
|
358
|
+
* independent of whether any webhook is modeled — see {@link webhookSignatureSchema}.
|
|
359
|
+
*/
|
|
360
|
+
webhookSignature: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
361
|
+
type: z.ZodLiteral<"hmac">;
|
|
362
|
+
header: z.ZodString;
|
|
363
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
364
|
+
sha1: "sha1";
|
|
365
|
+
sha256: "sha256";
|
|
366
|
+
sha384: "sha384";
|
|
367
|
+
sha512: "sha512";
|
|
368
|
+
}>>;
|
|
369
|
+
encoding: z.ZodOptional<z.ZodEnum<{
|
|
370
|
+
base64: "base64";
|
|
371
|
+
hex: "hex";
|
|
372
|
+
}>>;
|
|
373
|
+
signaturePrefix: z.ZodOptional<z.ZodString>;
|
|
374
|
+
payloadFormat: z.ZodOptional<z.ZodObject<{
|
|
375
|
+
components: z.ZodArray<z.ZodEnum<{
|
|
376
|
+
body: "body";
|
|
377
|
+
timestamp: "timestamp";
|
|
378
|
+
"notification-url": "notification-url";
|
|
379
|
+
"message-id": "message-id";
|
|
380
|
+
}>>;
|
|
381
|
+
delimiter: z.ZodOptional<z.ZodString>;
|
|
382
|
+
bodySort: z.ZodOptional<z.ZodLiteral<"alphabetical">>;
|
|
383
|
+
}, z.core.$strict>>;
|
|
384
|
+
timestamp: z.ZodOptional<z.ZodObject<{
|
|
385
|
+
header: z.ZodString;
|
|
386
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
387
|
+
"unix-seconds": "unix-seconds";
|
|
388
|
+
"unix-millis": "unix-millis";
|
|
389
|
+
iso8601: "iso8601";
|
|
390
|
+
}>>;
|
|
391
|
+
tolerance: z.ZodOptional<z.ZodNumber>;
|
|
392
|
+
}, z.core.$strict>>;
|
|
393
|
+
bodyHashBinding: z.ZodOptional<z.ZodObject<{
|
|
394
|
+
algorithm: z.ZodEnum<{
|
|
395
|
+
sha1: "sha1";
|
|
396
|
+
sha256: "sha256";
|
|
397
|
+
sha384: "sha384";
|
|
398
|
+
sha512: "sha512";
|
|
399
|
+
}>;
|
|
400
|
+
encoding: z.ZodOptional<z.ZodEnum<{
|
|
401
|
+
base64: "base64";
|
|
402
|
+
hex: "hex";
|
|
403
|
+
}>>;
|
|
404
|
+
location: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
405
|
+
type: z.ZodLiteral<"query-parameter">;
|
|
406
|
+
name: z.ZodString;
|
|
407
|
+
}, z.core.$strict>], "type">;
|
|
408
|
+
}, z.core.$strict>>;
|
|
409
|
+
urlNormalization: z.ZodOptional<z.ZodObject<{
|
|
410
|
+
portVariants: z.ZodOptional<z.ZodBoolean>;
|
|
411
|
+
legacyQueryEncoding: z.ZodOptional<z.ZodBoolean>;
|
|
412
|
+
}, z.core.$strict>>;
|
|
413
|
+
}, z.core.$strict>], "type">>;
|
|
356
414
|
}, z.core.$strict>;
|
|
357
415
|
type AuthScheme = z.infer<typeof authSchemeSchema>;
|
|
358
416
|
type AuthConfig = z.infer<typeof authConfigSchema>;
|
|
@@ -2413,6 +2471,60 @@ declare const sdkConfigIrV1Schema: z.ZodObject<{
|
|
|
2413
2471
|
environmentVariable: z.ZodOptional<z.ZodString>;
|
|
2414
2472
|
}, z.core.$strict>>>;
|
|
2415
2473
|
audiences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2474
|
+
webhookSignature: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2475
|
+
type: z.ZodLiteral<"hmac">;
|
|
2476
|
+
header: z.ZodString;
|
|
2477
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
2478
|
+
sha1: "sha1";
|
|
2479
|
+
sha256: "sha256";
|
|
2480
|
+
sha384: "sha384";
|
|
2481
|
+
sha512: "sha512";
|
|
2482
|
+
}>>;
|
|
2483
|
+
encoding: z.ZodOptional<z.ZodEnum<{
|
|
2484
|
+
base64: "base64";
|
|
2485
|
+
hex: "hex";
|
|
2486
|
+
}>>;
|
|
2487
|
+
signaturePrefix: z.ZodOptional<z.ZodString>;
|
|
2488
|
+
payloadFormat: z.ZodOptional<z.ZodObject<{
|
|
2489
|
+
components: z.ZodArray<z.ZodEnum<{
|
|
2490
|
+
body: "body";
|
|
2491
|
+
timestamp: "timestamp";
|
|
2492
|
+
"notification-url": "notification-url";
|
|
2493
|
+
"message-id": "message-id";
|
|
2494
|
+
}>>;
|
|
2495
|
+
delimiter: z.ZodOptional<z.ZodString>;
|
|
2496
|
+
bodySort: z.ZodOptional<z.ZodLiteral<"alphabetical">>;
|
|
2497
|
+
}, z.core.$strict>>;
|
|
2498
|
+
timestamp: z.ZodOptional<z.ZodObject<{
|
|
2499
|
+
header: z.ZodString;
|
|
2500
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
2501
|
+
"unix-seconds": "unix-seconds";
|
|
2502
|
+
"unix-millis": "unix-millis";
|
|
2503
|
+
iso8601: "iso8601";
|
|
2504
|
+
}>>;
|
|
2505
|
+
tolerance: z.ZodOptional<z.ZodNumber>;
|
|
2506
|
+
}, z.core.$strict>>;
|
|
2507
|
+
bodyHashBinding: z.ZodOptional<z.ZodObject<{
|
|
2508
|
+
algorithm: z.ZodEnum<{
|
|
2509
|
+
sha1: "sha1";
|
|
2510
|
+
sha256: "sha256";
|
|
2511
|
+
sha384: "sha384";
|
|
2512
|
+
sha512: "sha512";
|
|
2513
|
+
}>;
|
|
2514
|
+
encoding: z.ZodOptional<z.ZodEnum<{
|
|
2515
|
+
base64: "base64";
|
|
2516
|
+
hex: "hex";
|
|
2517
|
+
}>>;
|
|
2518
|
+
location: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2519
|
+
type: z.ZodLiteral<"query-parameter">;
|
|
2520
|
+
name: z.ZodString;
|
|
2521
|
+
}, z.core.$strict>], "type">;
|
|
2522
|
+
}, z.core.$strict>>;
|
|
2523
|
+
urlNormalization: z.ZodOptional<z.ZodObject<{
|
|
2524
|
+
portVariants: z.ZodOptional<z.ZodBoolean>;
|
|
2525
|
+
legacyQueryEncoding: z.ZodOptional<z.ZodBoolean>;
|
|
2526
|
+
}, z.core.$strict>>;
|
|
2527
|
+
}, z.core.$strict>], "type">>;
|
|
2416
2528
|
}, z.core.$strict>;
|
|
2417
2529
|
client: z.ZodObject<{
|
|
2418
2530
|
retry: z.ZodPrefault<z.ZodObject<{
|
|
@@ -3753,4 +3865,70 @@ declare const targetConfigSchema: z.ZodObject<{
|
|
|
3753
3865
|
type TargetLanguage = z.infer<typeof targetLanguageSchema>;
|
|
3754
3866
|
type TargetConfig = z.infer<typeof targetConfigSchema>;
|
|
3755
3867
|
|
|
3756
|
-
|
|
3868
|
+
declare const webhookSignatureSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3869
|
+
type: z.ZodLiteral<"hmac">;
|
|
3870
|
+
/** Request header carrying the signature. */
|
|
3871
|
+
header: z.ZodString;
|
|
3872
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
3873
|
+
sha1: "sha1";
|
|
3874
|
+
sha256: "sha256";
|
|
3875
|
+
sha384: "sha384";
|
|
3876
|
+
sha512: "sha512";
|
|
3877
|
+
}>>;
|
|
3878
|
+
encoding: z.ZodOptional<z.ZodEnum<{
|
|
3879
|
+
base64: "base64";
|
|
3880
|
+
hex: "hex";
|
|
3881
|
+
}>>;
|
|
3882
|
+
/** Stripped from the header value before comparison, e.g. `sha256=`. */
|
|
3883
|
+
signaturePrefix: z.ZodOptional<z.ZodString>;
|
|
3884
|
+
payloadFormat: z.ZodOptional<z.ZodObject<{
|
|
3885
|
+
components: z.ZodArray<z.ZodEnum<{
|
|
3886
|
+
body: "body";
|
|
3887
|
+
timestamp: "timestamp";
|
|
3888
|
+
"notification-url": "notification-url";
|
|
3889
|
+
"message-id": "message-id";
|
|
3890
|
+
}>>;
|
|
3891
|
+
delimiter: z.ZodOptional<z.ZodString>;
|
|
3892
|
+
/**
|
|
3893
|
+
* Set when the body is a form-encoded parameter map that must be canonicalized before signing:
|
|
3894
|
+
* keys sorted, each key's values deduped and sorted, concatenated as key-value pairs.
|
|
3895
|
+
*/
|
|
3896
|
+
bodySort: z.ZodOptional<z.ZodLiteral<"alphabetical">>;
|
|
3897
|
+
}, z.core.$strict>>;
|
|
3898
|
+
timestamp: z.ZodOptional<z.ZodObject<{
|
|
3899
|
+
header: z.ZodString;
|
|
3900
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
3901
|
+
"unix-seconds": "unix-seconds";
|
|
3902
|
+
"unix-millis": "unix-millis";
|
|
3903
|
+
iso8601: "iso8601";
|
|
3904
|
+
}>>;
|
|
3905
|
+
/** Replay window in seconds. */
|
|
3906
|
+
tolerance: z.ZodOptional<z.ZodNumber>;
|
|
3907
|
+
}, z.core.$strict>>;
|
|
3908
|
+
bodyHashBinding: z.ZodOptional<z.ZodObject<{
|
|
3909
|
+
algorithm: z.ZodEnum<{
|
|
3910
|
+
sha1: "sha1";
|
|
3911
|
+
sha256: "sha256";
|
|
3912
|
+
sha384: "sha384";
|
|
3913
|
+
sha512: "sha512";
|
|
3914
|
+
}>;
|
|
3915
|
+
encoding: z.ZodOptional<z.ZodEnum<{
|
|
3916
|
+
base64: "base64";
|
|
3917
|
+
hex: "hex";
|
|
3918
|
+
}>>;
|
|
3919
|
+
location: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3920
|
+
type: z.ZodLiteral<"query-parameter">;
|
|
3921
|
+
name: z.ZodString;
|
|
3922
|
+
}, z.core.$strict>], "type">;
|
|
3923
|
+
}, z.core.$strict>>;
|
|
3924
|
+
urlNormalization: z.ZodOptional<z.ZodObject<{
|
|
3925
|
+
/** Try the URL with and without an explicit default port. */
|
|
3926
|
+
portVariants: z.ZodOptional<z.ZodBoolean>;
|
|
3927
|
+
/** Try the URL with the pre-RFC3986 query encoding (`+` for space, unescaped `*`). */
|
|
3928
|
+
legacyQueryEncoding: z.ZodOptional<z.ZodBoolean>;
|
|
3929
|
+
}, z.core.$strict>>;
|
|
3930
|
+
}, z.core.$strict>], "type">;
|
|
3931
|
+
type WebhookSignatureInput = z.input<typeof webhookSignatureSchema>;
|
|
3932
|
+
type WebhookSignature = z.output<typeof webhookSignatureSchema>;
|
|
3933
|
+
|
|
3934
|
+
export { type ApiConfig, type ApiConfigInput, type ApiImportSettings, type AuthConfig, type AuthScheme, type ClientConfig, type ClientConfigInput, type ClientConfigOverride, type CompatibilityConfig, type CredentialResolution, type DocsConfig, type GenerationConfig, JsonObject, type LanguageGenerationConfig, type LegacyInput, type OutputConfig, type PublishConfig, type PublishRegistry, type ReadmeCustomSection, type ReadmeEndpoint, type ReplayConfig, SDK_CONFIG_IR_V1_SCHEMA_VERSION, type SdkConfigIrV1, type SdkConfigIrV1Input, type SourceConfig, type SourceSpecConfig, type SourceSpecType, type TargetConfig, type TargetLanguage, type UnsupportedField, type WebhookSignature, type WebhookSignatureInput, apiConfigSchema, apiImportSettingsSchema, authConfigSchema, authSchemeSchema, clientConfigOverrideSchema, clientConfigSchema, clientRetryOverrideSchema, compatibilityConfigSchema, docsConfigSchema, generationConfigSchema, languageGenerationConfigSchema, legacyInputSchema, outputConfigSchema, parseSdkConfigIrV1, publishConfigSchema, publishRegistrySchema, readmeCustomSectionSchema, readmeEndpointSchema, replayConfigSchema, sdkConfigIrV1Schema, sourceConfigSchema, sourceSpecConfigSchema, sourceSpecTypeSchema, targetConfigSchema, targetLanguageSchema, unsupportedFieldSchema, webhookSignatureSchema };
|
|
@@ -353,6 +353,64 @@ declare const apiConfigSchema: z.ZodObject<{
|
|
|
353
353
|
* remain included, while every audience-tagged node is excluded.
|
|
354
354
|
*/
|
|
355
355
|
audiences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
356
|
+
/**
|
|
357
|
+
* How the API signs the webhooks it sends, enabling a generated verification helper. API-wide, and
|
|
358
|
+
* independent of whether any webhook is modeled — see {@link webhookSignatureSchema}.
|
|
359
|
+
*/
|
|
360
|
+
webhookSignature: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
361
|
+
type: z.ZodLiteral<"hmac">;
|
|
362
|
+
header: z.ZodString;
|
|
363
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
364
|
+
sha1: "sha1";
|
|
365
|
+
sha256: "sha256";
|
|
366
|
+
sha384: "sha384";
|
|
367
|
+
sha512: "sha512";
|
|
368
|
+
}>>;
|
|
369
|
+
encoding: z.ZodOptional<z.ZodEnum<{
|
|
370
|
+
base64: "base64";
|
|
371
|
+
hex: "hex";
|
|
372
|
+
}>>;
|
|
373
|
+
signaturePrefix: z.ZodOptional<z.ZodString>;
|
|
374
|
+
payloadFormat: z.ZodOptional<z.ZodObject<{
|
|
375
|
+
components: z.ZodArray<z.ZodEnum<{
|
|
376
|
+
body: "body";
|
|
377
|
+
timestamp: "timestamp";
|
|
378
|
+
"notification-url": "notification-url";
|
|
379
|
+
"message-id": "message-id";
|
|
380
|
+
}>>;
|
|
381
|
+
delimiter: z.ZodOptional<z.ZodString>;
|
|
382
|
+
bodySort: z.ZodOptional<z.ZodLiteral<"alphabetical">>;
|
|
383
|
+
}, z.core.$strict>>;
|
|
384
|
+
timestamp: z.ZodOptional<z.ZodObject<{
|
|
385
|
+
header: z.ZodString;
|
|
386
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
387
|
+
"unix-seconds": "unix-seconds";
|
|
388
|
+
"unix-millis": "unix-millis";
|
|
389
|
+
iso8601: "iso8601";
|
|
390
|
+
}>>;
|
|
391
|
+
tolerance: z.ZodOptional<z.ZodNumber>;
|
|
392
|
+
}, z.core.$strict>>;
|
|
393
|
+
bodyHashBinding: z.ZodOptional<z.ZodObject<{
|
|
394
|
+
algorithm: z.ZodEnum<{
|
|
395
|
+
sha1: "sha1";
|
|
396
|
+
sha256: "sha256";
|
|
397
|
+
sha384: "sha384";
|
|
398
|
+
sha512: "sha512";
|
|
399
|
+
}>;
|
|
400
|
+
encoding: z.ZodOptional<z.ZodEnum<{
|
|
401
|
+
base64: "base64";
|
|
402
|
+
hex: "hex";
|
|
403
|
+
}>>;
|
|
404
|
+
location: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
405
|
+
type: z.ZodLiteral<"query-parameter">;
|
|
406
|
+
name: z.ZodString;
|
|
407
|
+
}, z.core.$strict>], "type">;
|
|
408
|
+
}, z.core.$strict>>;
|
|
409
|
+
urlNormalization: z.ZodOptional<z.ZodObject<{
|
|
410
|
+
portVariants: z.ZodOptional<z.ZodBoolean>;
|
|
411
|
+
legacyQueryEncoding: z.ZodOptional<z.ZodBoolean>;
|
|
412
|
+
}, z.core.$strict>>;
|
|
413
|
+
}, z.core.$strict>], "type">>;
|
|
356
414
|
}, z.core.$strict>;
|
|
357
415
|
type AuthScheme = z.infer<typeof authSchemeSchema>;
|
|
358
416
|
type AuthConfig = z.infer<typeof authConfigSchema>;
|
|
@@ -2413,6 +2471,60 @@ declare const sdkConfigIrV1Schema: z.ZodObject<{
|
|
|
2413
2471
|
environmentVariable: z.ZodOptional<z.ZodString>;
|
|
2414
2472
|
}, z.core.$strict>>>;
|
|
2415
2473
|
audiences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2474
|
+
webhookSignature: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2475
|
+
type: z.ZodLiteral<"hmac">;
|
|
2476
|
+
header: z.ZodString;
|
|
2477
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
2478
|
+
sha1: "sha1";
|
|
2479
|
+
sha256: "sha256";
|
|
2480
|
+
sha384: "sha384";
|
|
2481
|
+
sha512: "sha512";
|
|
2482
|
+
}>>;
|
|
2483
|
+
encoding: z.ZodOptional<z.ZodEnum<{
|
|
2484
|
+
base64: "base64";
|
|
2485
|
+
hex: "hex";
|
|
2486
|
+
}>>;
|
|
2487
|
+
signaturePrefix: z.ZodOptional<z.ZodString>;
|
|
2488
|
+
payloadFormat: z.ZodOptional<z.ZodObject<{
|
|
2489
|
+
components: z.ZodArray<z.ZodEnum<{
|
|
2490
|
+
body: "body";
|
|
2491
|
+
timestamp: "timestamp";
|
|
2492
|
+
"notification-url": "notification-url";
|
|
2493
|
+
"message-id": "message-id";
|
|
2494
|
+
}>>;
|
|
2495
|
+
delimiter: z.ZodOptional<z.ZodString>;
|
|
2496
|
+
bodySort: z.ZodOptional<z.ZodLiteral<"alphabetical">>;
|
|
2497
|
+
}, z.core.$strict>>;
|
|
2498
|
+
timestamp: z.ZodOptional<z.ZodObject<{
|
|
2499
|
+
header: z.ZodString;
|
|
2500
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
2501
|
+
"unix-seconds": "unix-seconds";
|
|
2502
|
+
"unix-millis": "unix-millis";
|
|
2503
|
+
iso8601: "iso8601";
|
|
2504
|
+
}>>;
|
|
2505
|
+
tolerance: z.ZodOptional<z.ZodNumber>;
|
|
2506
|
+
}, z.core.$strict>>;
|
|
2507
|
+
bodyHashBinding: z.ZodOptional<z.ZodObject<{
|
|
2508
|
+
algorithm: z.ZodEnum<{
|
|
2509
|
+
sha1: "sha1";
|
|
2510
|
+
sha256: "sha256";
|
|
2511
|
+
sha384: "sha384";
|
|
2512
|
+
sha512: "sha512";
|
|
2513
|
+
}>;
|
|
2514
|
+
encoding: z.ZodOptional<z.ZodEnum<{
|
|
2515
|
+
base64: "base64";
|
|
2516
|
+
hex: "hex";
|
|
2517
|
+
}>>;
|
|
2518
|
+
location: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2519
|
+
type: z.ZodLiteral<"query-parameter">;
|
|
2520
|
+
name: z.ZodString;
|
|
2521
|
+
}, z.core.$strict>], "type">;
|
|
2522
|
+
}, z.core.$strict>>;
|
|
2523
|
+
urlNormalization: z.ZodOptional<z.ZodObject<{
|
|
2524
|
+
portVariants: z.ZodOptional<z.ZodBoolean>;
|
|
2525
|
+
legacyQueryEncoding: z.ZodOptional<z.ZodBoolean>;
|
|
2526
|
+
}, z.core.$strict>>;
|
|
2527
|
+
}, z.core.$strict>], "type">>;
|
|
2416
2528
|
}, z.core.$strict>;
|
|
2417
2529
|
client: z.ZodObject<{
|
|
2418
2530
|
retry: z.ZodPrefault<z.ZodObject<{
|
|
@@ -3753,4 +3865,70 @@ declare const targetConfigSchema: z.ZodObject<{
|
|
|
3753
3865
|
type TargetLanguage = z.infer<typeof targetLanguageSchema>;
|
|
3754
3866
|
type TargetConfig = z.infer<typeof targetConfigSchema>;
|
|
3755
3867
|
|
|
3756
|
-
|
|
3868
|
+
declare const webhookSignatureSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3869
|
+
type: z.ZodLiteral<"hmac">;
|
|
3870
|
+
/** Request header carrying the signature. */
|
|
3871
|
+
header: z.ZodString;
|
|
3872
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
3873
|
+
sha1: "sha1";
|
|
3874
|
+
sha256: "sha256";
|
|
3875
|
+
sha384: "sha384";
|
|
3876
|
+
sha512: "sha512";
|
|
3877
|
+
}>>;
|
|
3878
|
+
encoding: z.ZodOptional<z.ZodEnum<{
|
|
3879
|
+
base64: "base64";
|
|
3880
|
+
hex: "hex";
|
|
3881
|
+
}>>;
|
|
3882
|
+
/** Stripped from the header value before comparison, e.g. `sha256=`. */
|
|
3883
|
+
signaturePrefix: z.ZodOptional<z.ZodString>;
|
|
3884
|
+
payloadFormat: z.ZodOptional<z.ZodObject<{
|
|
3885
|
+
components: z.ZodArray<z.ZodEnum<{
|
|
3886
|
+
body: "body";
|
|
3887
|
+
timestamp: "timestamp";
|
|
3888
|
+
"notification-url": "notification-url";
|
|
3889
|
+
"message-id": "message-id";
|
|
3890
|
+
}>>;
|
|
3891
|
+
delimiter: z.ZodOptional<z.ZodString>;
|
|
3892
|
+
/**
|
|
3893
|
+
* Set when the body is a form-encoded parameter map that must be canonicalized before signing:
|
|
3894
|
+
* keys sorted, each key's values deduped and sorted, concatenated as key-value pairs.
|
|
3895
|
+
*/
|
|
3896
|
+
bodySort: z.ZodOptional<z.ZodLiteral<"alphabetical">>;
|
|
3897
|
+
}, z.core.$strict>>;
|
|
3898
|
+
timestamp: z.ZodOptional<z.ZodObject<{
|
|
3899
|
+
header: z.ZodString;
|
|
3900
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
3901
|
+
"unix-seconds": "unix-seconds";
|
|
3902
|
+
"unix-millis": "unix-millis";
|
|
3903
|
+
iso8601: "iso8601";
|
|
3904
|
+
}>>;
|
|
3905
|
+
/** Replay window in seconds. */
|
|
3906
|
+
tolerance: z.ZodOptional<z.ZodNumber>;
|
|
3907
|
+
}, z.core.$strict>>;
|
|
3908
|
+
bodyHashBinding: z.ZodOptional<z.ZodObject<{
|
|
3909
|
+
algorithm: z.ZodEnum<{
|
|
3910
|
+
sha1: "sha1";
|
|
3911
|
+
sha256: "sha256";
|
|
3912
|
+
sha384: "sha384";
|
|
3913
|
+
sha512: "sha512";
|
|
3914
|
+
}>;
|
|
3915
|
+
encoding: z.ZodOptional<z.ZodEnum<{
|
|
3916
|
+
base64: "base64";
|
|
3917
|
+
hex: "hex";
|
|
3918
|
+
}>>;
|
|
3919
|
+
location: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3920
|
+
type: z.ZodLiteral<"query-parameter">;
|
|
3921
|
+
name: z.ZodString;
|
|
3922
|
+
}, z.core.$strict>], "type">;
|
|
3923
|
+
}, z.core.$strict>>;
|
|
3924
|
+
urlNormalization: z.ZodOptional<z.ZodObject<{
|
|
3925
|
+
/** Try the URL with and without an explicit default port. */
|
|
3926
|
+
portVariants: z.ZodOptional<z.ZodBoolean>;
|
|
3927
|
+
/** Try the URL with the pre-RFC3986 query encoding (`+` for space, unescaped `*`). */
|
|
3928
|
+
legacyQueryEncoding: z.ZodOptional<z.ZodBoolean>;
|
|
3929
|
+
}, z.core.$strict>>;
|
|
3930
|
+
}, z.core.$strict>], "type">;
|
|
3931
|
+
type WebhookSignatureInput = z.input<typeof webhookSignatureSchema>;
|
|
3932
|
+
type WebhookSignature = z.output<typeof webhookSignatureSchema>;
|
|
3933
|
+
|
|
3934
|
+
export { type ApiConfig, type ApiConfigInput, type ApiImportSettings, type AuthConfig, type AuthScheme, type ClientConfig, type ClientConfigInput, type ClientConfigOverride, type CompatibilityConfig, type CredentialResolution, type DocsConfig, type GenerationConfig, JsonObject, type LanguageGenerationConfig, type LegacyInput, type OutputConfig, type PublishConfig, type PublishRegistry, type ReadmeCustomSection, type ReadmeEndpoint, type ReplayConfig, SDK_CONFIG_IR_V1_SCHEMA_VERSION, type SdkConfigIrV1, type SdkConfigIrV1Input, type SourceConfig, type SourceSpecConfig, type SourceSpecType, type TargetConfig, type TargetLanguage, type UnsupportedField, type WebhookSignature, type WebhookSignatureInput, apiConfigSchema, apiImportSettingsSchema, authConfigSchema, authSchemeSchema, clientConfigOverrideSchema, clientConfigSchema, clientRetryOverrideSchema, compatibilityConfigSchema, docsConfigSchema, generationConfigSchema, languageGenerationConfigSchema, legacyInputSchema, outputConfigSchema, parseSdkConfigIrV1, publishConfigSchema, publishRegistrySchema, readmeCustomSectionSchema, readmeEndpointSchema, replayConfigSchema, sdkConfigIrV1Schema, sourceConfigSchema, sourceSpecConfigSchema, sourceSpecTypeSchema, targetConfigSchema, targetLanguageSchema, unsupportedFieldSchema, webhookSignatureSchema };
|
|
@@ -28,6 +28,59 @@ var jsonValueSchema = z.lazy(
|
|
|
28
28
|
])
|
|
29
29
|
);
|
|
30
30
|
var jsonObjectSchema = z.record(z.string(), jsonValueSchema);
|
|
31
|
+
var hashAlgorithmSchema = z.enum(["sha1", "sha256", "sha384", "sha512"]);
|
|
32
|
+
var encodingSchema = z.enum(["base64", "hex"]);
|
|
33
|
+
var payloadComponentSchema = z.enum(["body", "timestamp", "notification-url", "message-id"]);
|
|
34
|
+
var payloadFormatSchema = z.strictObject({
|
|
35
|
+
components: z.array(payloadComponentSchema).min(1),
|
|
36
|
+
delimiter: z.string().optional(),
|
|
37
|
+
/**
|
|
38
|
+
* Set when the body is a form-encoded parameter map that must be canonicalized before signing:
|
|
39
|
+
* keys sorted, each key's values deduped and sorted, concatenated as key-value pairs.
|
|
40
|
+
*/
|
|
41
|
+
bodySort: z.literal("alphabetical").optional()
|
|
42
|
+
});
|
|
43
|
+
var timestampSchema = z.strictObject({
|
|
44
|
+
header: nonEmptyStringSchema,
|
|
45
|
+
format: z.enum(["unix-seconds", "unix-millis", "iso8601"]).optional(),
|
|
46
|
+
/** Replay window in seconds. */
|
|
47
|
+
tolerance: z.number().positive().optional()
|
|
48
|
+
});
|
|
49
|
+
var bodyHashLocationSchema = z.discriminatedUnion("type", [
|
|
50
|
+
z.strictObject({
|
|
51
|
+
type: z.literal("query-parameter"),
|
|
52
|
+
name: nonEmptyStringSchema
|
|
53
|
+
})
|
|
54
|
+
]);
|
|
55
|
+
var bodyHashBindingSchema = z.strictObject({
|
|
56
|
+
algorithm: hashAlgorithmSchema,
|
|
57
|
+
encoding: encodingSchema.optional(),
|
|
58
|
+
location: bodyHashLocationSchema
|
|
59
|
+
});
|
|
60
|
+
var urlNormalizationSchema = z.strictObject({
|
|
61
|
+
/** Try the URL with and without an explicit default port. */
|
|
62
|
+
portVariants: z.boolean().optional(),
|
|
63
|
+
/** Try the URL with the pre-RFC3986 query encoding (`+` for space, unescaped `*`). */
|
|
64
|
+
legacyQueryEncoding: z.boolean().optional()
|
|
65
|
+
}).refine(
|
|
66
|
+
({ portVariants, legacyQueryEncoding }) => portVariants === true || legacyQueryEncoding === true,
|
|
67
|
+
{ message: "url normalization must enable at least one variant" }
|
|
68
|
+
);
|
|
69
|
+
var webhookSignatureSchema = z.discriminatedUnion("type", [
|
|
70
|
+
z.strictObject({
|
|
71
|
+
type: z.literal("hmac"),
|
|
72
|
+
/** Request header carrying the signature. */
|
|
73
|
+
header: nonEmptyStringSchema,
|
|
74
|
+
algorithm: hashAlgorithmSchema.optional(),
|
|
75
|
+
encoding: encodingSchema.optional(),
|
|
76
|
+
/** Stripped from the header value before comparison, e.g. `sha256=`. */
|
|
77
|
+
signaturePrefix: z.string().optional(),
|
|
78
|
+
payloadFormat: payloadFormatSchema.optional(),
|
|
79
|
+
timestamp: timestampSchema.optional(),
|
|
80
|
+
bodyHashBinding: bodyHashBindingSchema.optional(),
|
|
81
|
+
urlNormalization: urlNormalizationSchema.optional()
|
|
82
|
+
})
|
|
83
|
+
]);
|
|
31
84
|
|
|
32
85
|
// src/sdk-config-domain/v1/api.ts
|
|
33
86
|
var authVariableSchema = z.strictObject({
|
|
@@ -186,7 +239,12 @@ var apiConfigSchema = z.strictObject({
|
|
|
186
239
|
* Absent means all audiences. A present empty array selects no tagged audience: untagged nodes
|
|
187
240
|
* remain included, while every audience-tagged node is excluded.
|
|
188
241
|
*/
|
|
189
|
-
audiences: z.array(nonEmptyStringSchema).optional()
|
|
242
|
+
audiences: z.array(nonEmptyStringSchema).optional(),
|
|
243
|
+
/**
|
|
244
|
+
* How the API signs the webhooks it sends, enabling a generated verification helper. API-wide, and
|
|
245
|
+
* independent of whether any webhook is modeled — see {@link webhookSignatureSchema}.
|
|
246
|
+
*/
|
|
247
|
+
webhookSignature: webhookSignatureSchema.optional()
|
|
190
248
|
});
|
|
191
249
|
var retryOverrideShape = {
|
|
192
250
|
enabled: z.boolean().optional(),
|
|
@@ -1139,6 +1197,6 @@ function parseSdkConfigIrV1(value) {
|
|
|
1139
1197
|
return sdkConfigIrV1Schema.parse(value);
|
|
1140
1198
|
}
|
|
1141
1199
|
|
|
1142
|
-
export { SDK_CONFIG_IR_V1_SCHEMA_VERSION, apiConfigSchema, apiImportSettingsSchema, authConfigSchema, authSchemeSchema, cliGenerationConfigSchema, clientConfigOverrideSchema, clientConfigSchema, clientRetryOverrideSchema, compatibilityConfigSchema, composerPackageNameSchema, csharpGenerationConfigSchema, dependencySchema, docsConfigSchema, exactSemverSchema, generationConfigSchema, goGenerationConfigSchema, goModulePathSchema, javaGenerationConfigSchema, jsonObjectSchema, jsonValueSchema, kotlinGenerationConfigSchema, languageGenerationConfigSchema, legacyInputSchema, mcpAvailabilityStatuses, mcpGenerationConfigSchema, nonEmptyStringSchema, outputConfigSchema, packageConfigSchema, parseSdkConfigIrV1, phpGenerationConfigSchema, publishConfigSchema, publishRegistrySchema, pythonGenerationConfigSchema, readmeCustomSectionSchema, readmeEndpointSchema, relativePathSchema, replayConfigSchema, rubyGenerationConfigSchema, rustGenerationConfigSchema, sdkConfigIrV1Schema, sourceConfigSchema, sourceSpecConfigSchema, sourceSpecTypeSchema, swiftGenerationConfigSchema, targetConfigSchema, targetLanguageSchema, terraformGenerationConfigSchema, typescriptGenerationConfigSchema, unsupportedFieldSchema };
|
|
1200
|
+
export { SDK_CONFIG_IR_V1_SCHEMA_VERSION, apiConfigSchema, apiImportSettingsSchema, authConfigSchema, authSchemeSchema, cliGenerationConfigSchema, clientConfigOverrideSchema, clientConfigSchema, clientRetryOverrideSchema, compatibilityConfigSchema, composerPackageNameSchema, csharpGenerationConfigSchema, dependencySchema, docsConfigSchema, exactSemverSchema, generationConfigSchema, goGenerationConfigSchema, goModulePathSchema, javaGenerationConfigSchema, jsonObjectSchema, jsonValueSchema, kotlinGenerationConfigSchema, languageGenerationConfigSchema, legacyInputSchema, mcpAvailabilityStatuses, mcpGenerationConfigSchema, nonEmptyStringSchema, outputConfigSchema, packageConfigSchema, parseSdkConfigIrV1, phpGenerationConfigSchema, publishConfigSchema, publishRegistrySchema, pythonGenerationConfigSchema, readmeCustomSectionSchema, readmeEndpointSchema, relativePathSchema, replayConfigSchema, rubyGenerationConfigSchema, rustGenerationConfigSchema, sdkConfigIrV1Schema, sourceConfigSchema, sourceSpecConfigSchema, sourceSpecTypeSchema, swiftGenerationConfigSchema, targetConfigSchema, targetLanguageSchema, terraformGenerationConfigSchema, typescriptGenerationConfigSchema, unsupportedFieldSchema, webhookSignatureSchema };
|
|
1143
1201
|
//# sourceMappingURL=index.js.map
|
|
1144
1202
|
//# sourceMappingURL=index.js.map
|