@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.
@@ -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({