@postman/sdk-config 0.8.0 → 0.10.1

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.
@@ -482,6 +482,20 @@ declare const clientConfigOverrideSchema: z.ZodObject<{
482
482
  accessTokenField: z.ZodOptional<z.ZodString>;
483
483
  refreshTokenField: z.ZodOptional<z.ZodString>;
484
484
  }, z.core.$strict>>;
485
+ idempotencyKeyGeneration: z.ZodOptional<z.ZodObject<{
486
+ enabled: z.ZodBoolean;
487
+ headerName: z.ZodOptional<z.ZodString>;
488
+ methods: z.ZodOptional<z.ZodArray<z.ZodString>>;
489
+ }, z.core.$strict>>;
490
+ userAgent: z.ZodOptional<z.ZodObject<{
491
+ template: z.ZodOptional<z.ZodString>;
492
+ includePlatformInfo: z.ZodOptional<z.ZodBoolean>;
493
+ allowAppInfo: z.ZodOptional<z.ZodBoolean>;
494
+ }, z.core.$strict>>;
495
+ offsetSemantics: z.ZodOptional<z.ZodEnum<{
496
+ "item-index": "item-index";
497
+ "page-index": "page-index";
498
+ }>>;
485
499
  }, z.core.$strict>;
486
500
  declare const clientConfigSchema: z.ZodObject<{
487
501
  retry: z.ZodPrefault<z.ZodObject<{
@@ -532,6 +546,20 @@ declare const clientConfigSchema: z.ZodObject<{
532
546
  accessTokenField: z.ZodOptional<z.ZodString>;
533
547
  refreshTokenField: z.ZodOptional<z.ZodString>;
534
548
  }, z.core.$strict>>;
549
+ idempotencyKeyGeneration: z.ZodOptional<z.ZodObject<{
550
+ enabled: z.ZodBoolean;
551
+ headerName: z.ZodOptional<z.ZodString>;
552
+ methods: z.ZodOptional<z.ZodArray<z.ZodString>>;
553
+ }, z.core.$strict>>;
554
+ userAgent: z.ZodOptional<z.ZodObject<{
555
+ template: z.ZodOptional<z.ZodString>;
556
+ includePlatformInfo: z.ZodOptional<z.ZodBoolean>;
557
+ allowAppInfo: z.ZodOptional<z.ZodBoolean>;
558
+ }, z.core.$strict>>;
559
+ offsetSemantics: z.ZodOptional<z.ZodEnum<{
560
+ "item-index": "item-index";
561
+ "page-index": "page-index";
562
+ }>>;
535
563
  }, z.core.$strict>;
536
564
  type ClientConfigOverride = z.infer<typeof clientConfigOverrideSchema>;
537
565
  type ClientConfigInput = z.input<typeof clientConfigSchema>;
@@ -609,12 +637,12 @@ type CompatibilityConfig = z.infer<typeof compatibilityConfigSchema>;
609
637
  declare const readmeEndpointSchema: z.ZodObject<{
610
638
  method: z.ZodEnum<{
611
639
  GET: "GET";
612
- POST: "POST";
613
640
  PUT: "PUT";
614
641
  DELETE: "DELETE";
615
- PATCH: "PATCH";
616
642
  HEAD: "HEAD";
617
643
  OPTIONS: "OPTIONS";
644
+ POST: "POST";
645
+ PATCH: "PATCH";
618
646
  TRACE: "TRACE";
619
647
  CONNECT: "CONNECT";
620
648
  }>;
@@ -639,12 +667,12 @@ declare const docsConfigSchema: z.ZodObject<{
639
667
  defaultEndpoint: z.ZodOptional<z.ZodObject<{
640
668
  method: z.ZodEnum<{
641
669
  GET: "GET";
642
- POST: "POST";
643
670
  PUT: "PUT";
644
671
  DELETE: "DELETE";
645
- PATCH: "PATCH";
646
672
  HEAD: "HEAD";
647
673
  OPTIONS: "OPTIONS";
674
+ POST: "POST";
675
+ PATCH: "PATCH";
648
676
  TRACE: "TRACE";
649
677
  CONNECT: "CONNECT";
650
678
  }>;
@@ -654,12 +682,12 @@ declare const docsConfigSchema: z.ZodObject<{
654
682
  features: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
655
683
  method: z.ZodEnum<{
656
684
  GET: "GET";
657
- POST: "POST";
658
685
  PUT: "PUT";
659
686
  DELETE: "DELETE";
660
- PATCH: "PATCH";
661
687
  HEAD: "HEAD";
662
688
  OPTIONS: "OPTIONS";
689
+ POST: "POST";
690
+ PATCH: "PATCH";
663
691
  TRACE: "TRACE";
664
692
  CONNECT: "CONNECT";
665
693
  }>;
@@ -2589,6 +2617,20 @@ declare const sdkConfigIrV1Schema: z.ZodObject<{
2589
2617
  accessTokenField: z.ZodOptional<z.ZodString>;
2590
2618
  refreshTokenField: z.ZodOptional<z.ZodString>;
2591
2619
  }, z.core.$strict>>;
2620
+ idempotencyKeyGeneration: z.ZodOptional<z.ZodObject<{
2621
+ enabled: z.ZodBoolean;
2622
+ headerName: z.ZodOptional<z.ZodString>;
2623
+ methods: z.ZodOptional<z.ZodArray<z.ZodString>>;
2624
+ }, z.core.$strict>>;
2625
+ userAgent: z.ZodOptional<z.ZodObject<{
2626
+ template: z.ZodOptional<z.ZodString>;
2627
+ includePlatformInfo: z.ZodOptional<z.ZodBoolean>;
2628
+ allowAppInfo: z.ZodOptional<z.ZodBoolean>;
2629
+ }, z.core.$strict>>;
2630
+ offsetSemantics: z.ZodOptional<z.ZodEnum<{
2631
+ "item-index": "item-index";
2632
+ "page-index": "page-index";
2633
+ }>>;
2592
2634
  }, z.core.$strict>;
2593
2635
  package: z.ZodObject<{
2594
2636
  packageName: z.ZodOptional<z.ZodString>;
@@ -3183,12 +3225,12 @@ declare const sdkConfigIrV1Schema: z.ZodObject<{
3183
3225
  defaultEndpoint: z.ZodOptional<z.ZodObject<{
3184
3226
  method: z.ZodEnum<{
3185
3227
  GET: "GET";
3186
- POST: "POST";
3187
3228
  PUT: "PUT";
3188
3229
  DELETE: "DELETE";
3189
- PATCH: "PATCH";
3190
3230
  HEAD: "HEAD";
3191
3231
  OPTIONS: "OPTIONS";
3232
+ POST: "POST";
3233
+ PATCH: "PATCH";
3192
3234
  TRACE: "TRACE";
3193
3235
  CONNECT: "CONNECT";
3194
3236
  }>;
@@ -3198,12 +3240,12 @@ declare const sdkConfigIrV1Schema: z.ZodObject<{
3198
3240
  features: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
3199
3241
  method: z.ZodEnum<{
3200
3242
  GET: "GET";
3201
- POST: "POST";
3202
3243
  PUT: "PUT";
3203
3244
  DELETE: "DELETE";
3204
- PATCH: "PATCH";
3205
3245
  HEAD: "HEAD";
3206
3246
  OPTIONS: "OPTIONS";
3247
+ POST: "POST";
3248
+ PATCH: "PATCH";
3207
3249
  TRACE: "TRACE";
3208
3250
  CONNECT: "CONNECT";
3209
3251
  }>;
@@ -482,6 +482,20 @@ declare const clientConfigOverrideSchema: z.ZodObject<{
482
482
  accessTokenField: z.ZodOptional<z.ZodString>;
483
483
  refreshTokenField: z.ZodOptional<z.ZodString>;
484
484
  }, z.core.$strict>>;
485
+ idempotencyKeyGeneration: z.ZodOptional<z.ZodObject<{
486
+ enabled: z.ZodBoolean;
487
+ headerName: z.ZodOptional<z.ZodString>;
488
+ methods: z.ZodOptional<z.ZodArray<z.ZodString>>;
489
+ }, z.core.$strict>>;
490
+ userAgent: z.ZodOptional<z.ZodObject<{
491
+ template: z.ZodOptional<z.ZodString>;
492
+ includePlatformInfo: z.ZodOptional<z.ZodBoolean>;
493
+ allowAppInfo: z.ZodOptional<z.ZodBoolean>;
494
+ }, z.core.$strict>>;
495
+ offsetSemantics: z.ZodOptional<z.ZodEnum<{
496
+ "item-index": "item-index";
497
+ "page-index": "page-index";
498
+ }>>;
485
499
  }, z.core.$strict>;
486
500
  declare const clientConfigSchema: z.ZodObject<{
487
501
  retry: z.ZodPrefault<z.ZodObject<{
@@ -532,6 +546,20 @@ declare const clientConfigSchema: z.ZodObject<{
532
546
  accessTokenField: z.ZodOptional<z.ZodString>;
533
547
  refreshTokenField: z.ZodOptional<z.ZodString>;
534
548
  }, z.core.$strict>>;
549
+ idempotencyKeyGeneration: z.ZodOptional<z.ZodObject<{
550
+ enabled: z.ZodBoolean;
551
+ headerName: z.ZodOptional<z.ZodString>;
552
+ methods: z.ZodOptional<z.ZodArray<z.ZodString>>;
553
+ }, z.core.$strict>>;
554
+ userAgent: z.ZodOptional<z.ZodObject<{
555
+ template: z.ZodOptional<z.ZodString>;
556
+ includePlatformInfo: z.ZodOptional<z.ZodBoolean>;
557
+ allowAppInfo: z.ZodOptional<z.ZodBoolean>;
558
+ }, z.core.$strict>>;
559
+ offsetSemantics: z.ZodOptional<z.ZodEnum<{
560
+ "item-index": "item-index";
561
+ "page-index": "page-index";
562
+ }>>;
535
563
  }, z.core.$strict>;
536
564
  type ClientConfigOverride = z.infer<typeof clientConfigOverrideSchema>;
537
565
  type ClientConfigInput = z.input<typeof clientConfigSchema>;
@@ -609,12 +637,12 @@ type CompatibilityConfig = z.infer<typeof compatibilityConfigSchema>;
609
637
  declare const readmeEndpointSchema: z.ZodObject<{
610
638
  method: z.ZodEnum<{
611
639
  GET: "GET";
612
- POST: "POST";
613
640
  PUT: "PUT";
614
641
  DELETE: "DELETE";
615
- PATCH: "PATCH";
616
642
  HEAD: "HEAD";
617
643
  OPTIONS: "OPTIONS";
644
+ POST: "POST";
645
+ PATCH: "PATCH";
618
646
  TRACE: "TRACE";
619
647
  CONNECT: "CONNECT";
620
648
  }>;
@@ -639,12 +667,12 @@ declare const docsConfigSchema: z.ZodObject<{
639
667
  defaultEndpoint: z.ZodOptional<z.ZodObject<{
640
668
  method: z.ZodEnum<{
641
669
  GET: "GET";
642
- POST: "POST";
643
670
  PUT: "PUT";
644
671
  DELETE: "DELETE";
645
- PATCH: "PATCH";
646
672
  HEAD: "HEAD";
647
673
  OPTIONS: "OPTIONS";
674
+ POST: "POST";
675
+ PATCH: "PATCH";
648
676
  TRACE: "TRACE";
649
677
  CONNECT: "CONNECT";
650
678
  }>;
@@ -654,12 +682,12 @@ declare const docsConfigSchema: z.ZodObject<{
654
682
  features: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
655
683
  method: z.ZodEnum<{
656
684
  GET: "GET";
657
- POST: "POST";
658
685
  PUT: "PUT";
659
686
  DELETE: "DELETE";
660
- PATCH: "PATCH";
661
687
  HEAD: "HEAD";
662
688
  OPTIONS: "OPTIONS";
689
+ POST: "POST";
690
+ PATCH: "PATCH";
663
691
  TRACE: "TRACE";
664
692
  CONNECT: "CONNECT";
665
693
  }>;
@@ -2589,6 +2617,20 @@ declare const sdkConfigIrV1Schema: z.ZodObject<{
2589
2617
  accessTokenField: z.ZodOptional<z.ZodString>;
2590
2618
  refreshTokenField: z.ZodOptional<z.ZodString>;
2591
2619
  }, z.core.$strict>>;
2620
+ idempotencyKeyGeneration: z.ZodOptional<z.ZodObject<{
2621
+ enabled: z.ZodBoolean;
2622
+ headerName: z.ZodOptional<z.ZodString>;
2623
+ methods: z.ZodOptional<z.ZodArray<z.ZodString>>;
2624
+ }, z.core.$strict>>;
2625
+ userAgent: z.ZodOptional<z.ZodObject<{
2626
+ template: z.ZodOptional<z.ZodString>;
2627
+ includePlatformInfo: z.ZodOptional<z.ZodBoolean>;
2628
+ allowAppInfo: z.ZodOptional<z.ZodBoolean>;
2629
+ }, z.core.$strict>>;
2630
+ offsetSemantics: z.ZodOptional<z.ZodEnum<{
2631
+ "item-index": "item-index";
2632
+ "page-index": "page-index";
2633
+ }>>;
2592
2634
  }, z.core.$strict>;
2593
2635
  package: z.ZodObject<{
2594
2636
  packageName: z.ZodOptional<z.ZodString>;
@@ -3183,12 +3225,12 @@ declare const sdkConfigIrV1Schema: z.ZodObject<{
3183
3225
  defaultEndpoint: z.ZodOptional<z.ZodObject<{
3184
3226
  method: z.ZodEnum<{
3185
3227
  GET: "GET";
3186
- POST: "POST";
3187
3228
  PUT: "PUT";
3188
3229
  DELETE: "DELETE";
3189
- PATCH: "PATCH";
3190
3230
  HEAD: "HEAD";
3191
3231
  OPTIONS: "OPTIONS";
3232
+ POST: "POST";
3233
+ PATCH: "PATCH";
3192
3234
  TRACE: "TRACE";
3193
3235
  CONNECT: "CONNECT";
3194
3236
  }>;
@@ -3198,12 +3240,12 @@ declare const sdkConfigIrV1Schema: z.ZodObject<{
3198
3240
  features: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
3199
3241
  method: z.ZodEnum<{
3200
3242
  GET: "GET";
3201
- POST: "POST";
3202
3243
  PUT: "PUT";
3203
3244
  DELETE: "DELETE";
3204
- PATCH: "PATCH";
3205
3245
  HEAD: "HEAD";
3206
3246
  OPTIONS: "OPTIONS";
3247
+ POST: "POST";
3248
+ PATCH: "PATCH";
3207
3249
  TRACE: "TRACE";
3208
3250
  CONNECT: "CONNECT";
3209
3251
  }>;
@@ -291,7 +291,7 @@ var retryConfigSchema = z.strictObject({
291
291
  maxDelayMs: z.number().nonnegative().default(5e3).describe("The maximum backoff delay between attempts, in milliseconds."),
292
292
  jitterMs: z.number().nonnegative().default(50).describe("The maximum random jitter added to retry delays, in milliseconds."),
293
293
  backoffFactor: z.number().positive().default(2).describe("The multiplier applied to the delay after each failed attempt."),
294
- methods: z.array(nonEmptyStringSchema).default(["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]).describe("HTTP methods that are eligible for retries."),
294
+ methods: z.array(nonEmptyStringSchema).default(["GET", "PUT", "DELETE", "HEAD", "OPTIONS"]).describe("HTTP methods that are eligible for retries."),
295
295
  maxRetryAfterDelayMs: z.number().nonnegative().default(6e4).describe("The longest Retry-After delay the client will honor, in milliseconds.")
296
296
  }).superRefine(validateRetryDelays);
297
297
  var constructorParameterSchema = z.strictObject({
@@ -317,6 +317,22 @@ var tokenRefreshConfigSchema = z.strictObject({
317
317
  });
318
318
  }
319
319
  });
320
+ var idempotencyKeyGenerationSchema = z.strictObject({
321
+ enabled: z.boolean().describe("Whether the client generates an idempotency key when the caller supplies none."),
322
+ headerName: nonEmptyStringSchema.optional().describe("The header that carries the generated key. Generators default to Idempotency-Key."),
323
+ methods: z.array(nonEmptyStringSchema).optional().describe("HTTP methods that receive a generated key. Generators default to POST and PUT.")
324
+ });
325
+ var userAgentConfigSchema = z.strictObject({
326
+ template: nonEmptyStringSchema.optional().describe(
327
+ "The User-Agent product token, resolved at generation time. Supports the {packageName}, {version}, {language}, {generatorVersion}, {organization}, and {apiName} placeholders."
328
+ ),
329
+ includePlatformInfo: z.boolean().optional().describe(
330
+ "Whether the User-Agent carries operating system, architecture, and runtime details, as `{product} ({os}; {arch}) {runtime}/{runtimeVersion}`."
331
+ ),
332
+ allowAppInfo: z.boolean().optional().describe(
333
+ "Whether callers can pass application info that is appended to the User-Agent as a `{name}/{version} ({comment})` product token."
334
+ )
335
+ });
320
336
  var clientOverrideShape = {
321
337
  retry: clientRetryOverrideSchema.optional().describe("Retry behavior for generated API requests."),
322
338
  responseHeaders: z.boolean().optional().describe("Whether generated operations expose HTTP response headers."),
@@ -329,7 +345,12 @@ var clientOverrideShape = {
329
345
  filePropertyStyle: parameterStyleSchema.optional().describe("Whether generated file properties are wrapped or passed inline."),
330
346
  useDefaultRequestParameterValues: z.boolean().optional().describe("Whether schema defaults are applied to omitted request parameters."),
331
347
  respectOptionalRequestBody: z.boolean().optional().describe("Whether an optional request body remains optional in generated methods."),
332
- tokenRefresh: tokenRefreshConfigSchema.optional().describe("Refresh-token behavior for the generated client.")
348
+ tokenRefresh: tokenRefreshConfigSchema.optional().describe("Refresh-token behavior for the generated client."),
349
+ idempotencyKeyGeneration: idempotencyKeyGenerationSchema.optional().describe("Automatic idempotency keys on eligible requests."),
350
+ userAgent: userAgentConfigSchema.optional().describe("The User-Agent header the generated client sends."),
351
+ offsetSemantics: z.enum(["item-index", "page-index"]).optional().describe(
352
+ "How an offset-paginated endpoint advances: by the number of items returned, or by one page."
353
+ )
333
354
  };
334
355
  var clientConfigOverrideSchema = z.strictObject(clientOverrideShape);
335
356
  var clientConfigSchema = z.strictObject({