vercel-api-js 1.12.0 → 1.13.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.
@@ -555,10 +555,12 @@ const userEventSchema = z.object({
555
555
  "ai-gateway-api-key-created",
556
556
  "ai-gateway-api-key-deleted",
557
557
  "ai-gateway-api-key-quota-updated",
558
+ "ai-gateway-auto-reload-updated",
558
559
  "ai-gateway-budget-default-updated",
559
560
  "ai-gateway-byok-credential-created",
560
561
  "ai-gateway-byok-credential-deleted",
561
562
  "ai-gateway-byok-credential-updated",
563
+ "ai-gateway-credits-purchased",
562
564
  "ai-gateway-guardrails-updated",
563
565
  "ai-gateway-model-allowlist-models-updated",
564
566
  "ai-gateway-model-allowlist-toggled",
@@ -745,6 +747,9 @@ const userEventSchema = z.object({
745
747
  "env-variable-read:unknown-source",
746
748
  "env-variable-read:v0:env:pull",
747
749
  "env-variable-rotated",
750
+ "experiment-created",
751
+ "experiment-transitioned",
752
+ "experiment-updated",
748
753
  "firewall-bypass-created",
749
754
  "firewall-bypass-deleted",
750
755
  "firewall-config-modified",
@@ -1277,6 +1282,18 @@ const userEventSchema = z.object({
1277
1282
  projectId: z.string(),
1278
1283
  projectName: z.string().optional()
1279
1284
  }).strict(),
1285
+ z.object({
1286
+ action: z.enum([
1287
+ "created",
1288
+ "transitioned",
1289
+ "updated"
1290
+ ]),
1291
+ id: z.string(),
1292
+ name: z.string(),
1293
+ state: z.string(),
1294
+ projectId: z.string(),
1295
+ projectName: z.string().optional()
1296
+ }).strict(),
1280
1297
  z.object({
1281
1298
  action: z.enum([
1282
1299
  "added",
@@ -1429,6 +1446,29 @@ const userEventSchema = z.object({
1429
1446
  "set"
1430
1447
  ])
1431
1448
  }).strict(),
1449
+ z.object({
1450
+ change: z.enum([
1451
+ "disable",
1452
+ "disable-commitment",
1453
+ "enable",
1454
+ "enable-commitment",
1455
+ "update"
1456
+ ]),
1457
+ settings: z.object({
1458
+ minimumBalance: z.string(),
1459
+ targetBalance: z.string(),
1460
+ maximumMonthlySpend: z.string().nullable()
1461
+ }).optional(),
1462
+ previous: z.object({
1463
+ minimumBalance: z.string(),
1464
+ targetBalance: z.string(),
1465
+ maximumMonthlySpend: z.string().nullable()
1466
+ }).optional(),
1467
+ commitment: z.object({
1468
+ maximumMonthlySpend: z.string().nullable(),
1469
+ deferredInvoiceTargetBalance: z.string()
1470
+ }).optional()
1471
+ }).strict(),
1432
1472
  z.object({
1433
1473
  scopeType: z.enum([
1434
1474
  "api-key",
@@ -1481,6 +1521,10 @@ const userEventSchema = z.object({
1481
1521
  providerSlug: z.string()
1482
1522
  })
1483
1523
  }).strict(),
1524
+ z.object({
1525
+ amount: z.string(),
1526
+ purchaseIntentId: z.string()
1527
+ }).strict(),
1484
1528
  z.object({
1485
1529
  enabled: z.union([
1486
1530
  z.literal(false),
@@ -8751,10 +8795,12 @@ const listEventTypeSchema = z.object({
8751
8795
  "ai-gateway-api-key-created",
8752
8796
  "ai-gateway-api-key-deleted",
8753
8797
  "ai-gateway-api-key-quota-updated",
8798
+ "ai-gateway-auto-reload-updated",
8754
8799
  "ai-gateway-budget-default-updated",
8755
8800
  "ai-gateway-byok-credential-created",
8756
8801
  "ai-gateway-byok-credential-deleted",
8757
8802
  "ai-gateway-byok-credential-updated",
8803
+ "ai-gateway-credits-purchased",
8758
8804
  "ai-gateway-guardrails-updated",
8759
8805
  "ai-gateway-model-allowlist-models-updated",
8760
8806
  "ai-gateway-model-allowlist-toggled",
@@ -8941,6 +8987,9 @@ const listEventTypeSchema = z.object({
8941
8987
  "env-variable-read:unknown-source",
8942
8988
  "env-variable-read:v0:env:pull",
8943
8989
  "env-variable-rotated",
8990
+ "experiment-created",
8991
+ "experiment-transitioned",
8992
+ "experiment-updated",
8944
8993
  "firewall-bypass-created",
8945
8994
  "firewall-bypass-deleted",
8946
8995
  "firewall-config-modified",
@@ -9416,10 +9465,12 @@ const listEventTypeSchema = z.object({
9416
9465
  "ai-gateway-api-key-created",
9417
9466
  "ai-gateway-api-key-deleted",
9418
9467
  "ai-gateway-api-key-quota-updated",
9468
+ "ai-gateway-auto-reload-updated",
9419
9469
  "ai-gateway-budget-default-updated",
9420
9470
  "ai-gateway-byok-credential-created",
9421
9471
  "ai-gateway-byok-credential-deleted",
9422
9472
  "ai-gateway-byok-credential-updated",
9473
+ "ai-gateway-credits-purchased",
9423
9474
  "ai-gateway-guardrails-updated",
9424
9475
  "ai-gateway-model-allowlist-models-updated",
9425
9476
  "ai-gateway-model-allowlist-toggled",
@@ -9606,6 +9657,9 @@ const listEventTypeSchema = z.object({
9606
9657
  "env-variable-read:unknown-source",
9607
9658
  "env-variable-read:v0:env:pull",
9608
9659
  "env-variable-rotated",
9660
+ "experiment-created",
9661
+ "experiment-transitioned",
9662
+ "experiment-updated",
9609
9663
  "firewall-bypass-created",
9610
9664
  "firewall-bypass-deleted",
9611
9665
  "firewall-config-modified",
@@ -10057,90 +10111,30 @@ const listEventTypesResponseSchema = z.object({
10057
10111
  }).describe("Response returned by the List Event Types endpoint.");
10058
10112
  const flagSchema = z.object({
10059
10113
  description: z.string().optional(),
10114
+ experiment: z.object({
10115
+ rampId: z.string().optional(),
10116
+ rampPercentage: z.number().optional(),
10117
+ id: z.string(),
10118
+ base: z.object({
10119
+ type: z.enum([
10120
+ "entity"
10121
+ ]),
10122
+ kind: z.string(),
10123
+ attribute: z.string()
10124
+ }),
10125
+ weights: z.object({}).catchall(z.number()),
10126
+ defaultVariantId: z.string(),
10127
+ exposureLogging: z.union([
10128
+ z.literal(false),
10129
+ z.literal(true)
10130
+ ])
10131
+ }).nullish(),
10060
10132
  maintainerIds: z.array(z.string()).optional(),
10061
10133
  permanent: z.union([
10062
10134
  z.literal(false),
10063
10135
  z.literal(true)
10064
10136
  ]).optional(),
10065
10137
  tags: z.array(z.string()).optional(),
10066
- experiment: z.object({
10067
- id: z.string().optional(),
10068
- name: z.string().optional(),
10069
- numVariants: z.number().optional(),
10070
- surfaceArea: z.string().optional(),
10071
- stickyRequirement: z.union([
10072
- z.literal(false),
10073
- z.literal(true)
10074
- ]).optional(),
10075
- layer: z.string().optional(),
10076
- guardrailMetrics: z.array(z.object({
10077
- description: z.string().optional(),
10078
- metricFormula: z.string().optional(),
10079
- name: z.string(),
10080
- metricType: z.enum([
10081
- "count",
10082
- "currency",
10083
- "percentage"
10084
- ]),
10085
- metricUnit: z.enum([
10086
- "session",
10087
- "user",
10088
- "visitor"
10089
- ]),
10090
- directionality: z.enum([
10091
- "decreaseIsGood",
10092
- "increaseIsGood"
10093
- ])
10094
- })).optional(),
10095
- hypothesis: z.string().optional(),
10096
- device: z.enum([
10097
- "android",
10098
- "desktop",
10099
- "ios",
10100
- "mweb"
10101
- ]).optional(),
10102
- controlVariantId: z.string().optional(),
10103
- startedAt: z.number().optional(),
10104
- endedAt: z.number().optional(),
10105
- decision: z.string().optional(),
10106
- decisionReason: z.string().optional(),
10107
- duration: z.number().optional(),
10108
- durationUnit: z.enum([
10109
- "days",
10110
- "exposures"
10111
- ]).optional(),
10112
- allocationPercent: z.number().optional(),
10113
- allocationUnit: z.enum([
10114
- "cookieId",
10115
- "userId",
10116
- "visitorId"
10117
- ]),
10118
- primaryMetrics: z.array(z.object({
10119
- description: z.string().optional(),
10120
- metricFormula: z.string().optional(),
10121
- name: z.string(),
10122
- metricType: z.enum([
10123
- "count",
10124
- "currency",
10125
- "percentage"
10126
- ]),
10127
- metricUnit: z.enum([
10128
- "session",
10129
- "user",
10130
- "visitor"
10131
- ]),
10132
- directionality: z.enum([
10133
- "decreaseIsGood",
10134
- "increaseIsGood"
10135
- ])
10136
- })),
10137
- status: z.enum([
10138
- "closed",
10139
- "draft",
10140
- "paused",
10141
- "running"
10142
- ])
10143
- }).optional(),
10144
10138
  updatedBy: z.string().optional(),
10145
10139
  variants: z.array(z.object({})),
10146
10140
  id: z.string(),
@@ -10203,6 +10197,11 @@ const flagSchema = z.object({
10203
10197
  promille: z.number(),
10204
10198
  durationMs: z.number()
10205
10199
  }))
10200
+ }).strict(),
10201
+ z.object({
10202
+ type: z.enum([
10203
+ "experiment"
10204
+ ])
10206
10205
  }).strict()
10207
10206
  ]),
10208
10207
  active: z.union([
@@ -10251,6 +10250,11 @@ const flagSchema = z.object({
10251
10250
  promille: z.number(),
10252
10251
  durationMs: z.number()
10253
10252
  }))
10253
+ }).strict(),
10254
+ z.object({
10255
+ type: z.enum([
10256
+ "experiment"
10257
+ ])
10254
10258
  }).strict()
10255
10259
  ]),
10256
10260
  conditions: z.array(z.object({
@@ -575,10 +575,12 @@ const userEventSchema = z__namespace.object({
575
575
  "ai-gateway-api-key-created",
576
576
  "ai-gateway-api-key-deleted",
577
577
  "ai-gateway-api-key-quota-updated",
578
+ "ai-gateway-auto-reload-updated",
578
579
  "ai-gateway-budget-default-updated",
579
580
  "ai-gateway-byok-credential-created",
580
581
  "ai-gateway-byok-credential-deleted",
581
582
  "ai-gateway-byok-credential-updated",
583
+ "ai-gateway-credits-purchased",
582
584
  "ai-gateway-guardrails-updated",
583
585
  "ai-gateway-model-allowlist-models-updated",
584
586
  "ai-gateway-model-allowlist-toggled",
@@ -765,6 +767,9 @@ const userEventSchema = z__namespace.object({
765
767
  "env-variable-read:unknown-source",
766
768
  "env-variable-read:v0:env:pull",
767
769
  "env-variable-rotated",
770
+ "experiment-created",
771
+ "experiment-transitioned",
772
+ "experiment-updated",
768
773
  "firewall-bypass-created",
769
774
  "firewall-bypass-deleted",
770
775
  "firewall-config-modified",
@@ -1297,6 +1302,18 @@ const userEventSchema = z__namespace.object({
1297
1302
  projectId: z__namespace.string(),
1298
1303
  projectName: z__namespace.string().optional()
1299
1304
  }).strict(),
1305
+ z__namespace.object({
1306
+ action: z__namespace.enum([
1307
+ "created",
1308
+ "transitioned",
1309
+ "updated"
1310
+ ]),
1311
+ id: z__namespace.string(),
1312
+ name: z__namespace.string(),
1313
+ state: z__namespace.string(),
1314
+ projectId: z__namespace.string(),
1315
+ projectName: z__namespace.string().optional()
1316
+ }).strict(),
1300
1317
  z__namespace.object({
1301
1318
  action: z__namespace.enum([
1302
1319
  "added",
@@ -1449,6 +1466,29 @@ const userEventSchema = z__namespace.object({
1449
1466
  "set"
1450
1467
  ])
1451
1468
  }).strict(),
1469
+ z__namespace.object({
1470
+ change: z__namespace.enum([
1471
+ "disable",
1472
+ "disable-commitment",
1473
+ "enable",
1474
+ "enable-commitment",
1475
+ "update"
1476
+ ]),
1477
+ settings: z__namespace.object({
1478
+ minimumBalance: z__namespace.string(),
1479
+ targetBalance: z__namespace.string(),
1480
+ maximumMonthlySpend: z__namespace.string().nullable()
1481
+ }).optional(),
1482
+ previous: z__namespace.object({
1483
+ minimumBalance: z__namespace.string(),
1484
+ targetBalance: z__namespace.string(),
1485
+ maximumMonthlySpend: z__namespace.string().nullable()
1486
+ }).optional(),
1487
+ commitment: z__namespace.object({
1488
+ maximumMonthlySpend: z__namespace.string().nullable(),
1489
+ deferredInvoiceTargetBalance: z__namespace.string()
1490
+ }).optional()
1491
+ }).strict(),
1452
1492
  z__namespace.object({
1453
1493
  scopeType: z__namespace.enum([
1454
1494
  "api-key",
@@ -1501,6 +1541,10 @@ const userEventSchema = z__namespace.object({
1501
1541
  providerSlug: z__namespace.string()
1502
1542
  })
1503
1543
  }).strict(),
1544
+ z__namespace.object({
1545
+ amount: z__namespace.string(),
1546
+ purchaseIntentId: z__namespace.string()
1547
+ }).strict(),
1504
1548
  z__namespace.object({
1505
1549
  enabled: z__namespace.union([
1506
1550
  z__namespace.literal(false),
@@ -8771,10 +8815,12 @@ const listEventTypeSchema = z__namespace.object({
8771
8815
  "ai-gateway-api-key-created",
8772
8816
  "ai-gateway-api-key-deleted",
8773
8817
  "ai-gateway-api-key-quota-updated",
8818
+ "ai-gateway-auto-reload-updated",
8774
8819
  "ai-gateway-budget-default-updated",
8775
8820
  "ai-gateway-byok-credential-created",
8776
8821
  "ai-gateway-byok-credential-deleted",
8777
8822
  "ai-gateway-byok-credential-updated",
8823
+ "ai-gateway-credits-purchased",
8778
8824
  "ai-gateway-guardrails-updated",
8779
8825
  "ai-gateway-model-allowlist-models-updated",
8780
8826
  "ai-gateway-model-allowlist-toggled",
@@ -8961,6 +9007,9 @@ const listEventTypeSchema = z__namespace.object({
8961
9007
  "env-variable-read:unknown-source",
8962
9008
  "env-variable-read:v0:env:pull",
8963
9009
  "env-variable-rotated",
9010
+ "experiment-created",
9011
+ "experiment-transitioned",
9012
+ "experiment-updated",
8964
9013
  "firewall-bypass-created",
8965
9014
  "firewall-bypass-deleted",
8966
9015
  "firewall-config-modified",
@@ -9436,10 +9485,12 @@ const listEventTypeSchema = z__namespace.object({
9436
9485
  "ai-gateway-api-key-created",
9437
9486
  "ai-gateway-api-key-deleted",
9438
9487
  "ai-gateway-api-key-quota-updated",
9488
+ "ai-gateway-auto-reload-updated",
9439
9489
  "ai-gateway-budget-default-updated",
9440
9490
  "ai-gateway-byok-credential-created",
9441
9491
  "ai-gateway-byok-credential-deleted",
9442
9492
  "ai-gateway-byok-credential-updated",
9493
+ "ai-gateway-credits-purchased",
9443
9494
  "ai-gateway-guardrails-updated",
9444
9495
  "ai-gateway-model-allowlist-models-updated",
9445
9496
  "ai-gateway-model-allowlist-toggled",
@@ -9626,6 +9677,9 @@ const listEventTypeSchema = z__namespace.object({
9626
9677
  "env-variable-read:unknown-source",
9627
9678
  "env-variable-read:v0:env:pull",
9628
9679
  "env-variable-rotated",
9680
+ "experiment-created",
9681
+ "experiment-transitioned",
9682
+ "experiment-updated",
9629
9683
  "firewall-bypass-created",
9630
9684
  "firewall-bypass-deleted",
9631
9685
  "firewall-config-modified",
@@ -10077,90 +10131,30 @@ const listEventTypesResponseSchema = z__namespace.object({
10077
10131
  }).describe("Response returned by the List Event Types endpoint.");
10078
10132
  const flagSchema = z__namespace.object({
10079
10133
  description: z__namespace.string().optional(),
10134
+ experiment: z__namespace.object({
10135
+ rampId: z__namespace.string().optional(),
10136
+ rampPercentage: z__namespace.number().optional(),
10137
+ id: z__namespace.string(),
10138
+ base: z__namespace.object({
10139
+ type: z__namespace.enum([
10140
+ "entity"
10141
+ ]),
10142
+ kind: z__namespace.string(),
10143
+ attribute: z__namespace.string()
10144
+ }),
10145
+ weights: z__namespace.object({}).catchall(z__namespace.number()),
10146
+ defaultVariantId: z__namespace.string(),
10147
+ exposureLogging: z__namespace.union([
10148
+ z__namespace.literal(false),
10149
+ z__namespace.literal(true)
10150
+ ])
10151
+ }).nullish(),
10080
10152
  maintainerIds: z__namespace.array(z__namespace.string()).optional(),
10081
10153
  permanent: z__namespace.union([
10082
10154
  z__namespace.literal(false),
10083
10155
  z__namespace.literal(true)
10084
10156
  ]).optional(),
10085
10157
  tags: z__namespace.array(z__namespace.string()).optional(),
10086
- experiment: z__namespace.object({
10087
- id: z__namespace.string().optional(),
10088
- name: z__namespace.string().optional(),
10089
- numVariants: z__namespace.number().optional(),
10090
- surfaceArea: z__namespace.string().optional(),
10091
- stickyRequirement: z__namespace.union([
10092
- z__namespace.literal(false),
10093
- z__namespace.literal(true)
10094
- ]).optional(),
10095
- layer: z__namespace.string().optional(),
10096
- guardrailMetrics: z__namespace.array(z__namespace.object({
10097
- description: z__namespace.string().optional(),
10098
- metricFormula: z__namespace.string().optional(),
10099
- name: z__namespace.string(),
10100
- metricType: z__namespace.enum([
10101
- "count",
10102
- "currency",
10103
- "percentage"
10104
- ]),
10105
- metricUnit: z__namespace.enum([
10106
- "session",
10107
- "user",
10108
- "visitor"
10109
- ]),
10110
- directionality: z__namespace.enum([
10111
- "decreaseIsGood",
10112
- "increaseIsGood"
10113
- ])
10114
- })).optional(),
10115
- hypothesis: z__namespace.string().optional(),
10116
- device: z__namespace.enum([
10117
- "android",
10118
- "desktop",
10119
- "ios",
10120
- "mweb"
10121
- ]).optional(),
10122
- controlVariantId: z__namespace.string().optional(),
10123
- startedAt: z__namespace.number().optional(),
10124
- endedAt: z__namespace.number().optional(),
10125
- decision: z__namespace.string().optional(),
10126
- decisionReason: z__namespace.string().optional(),
10127
- duration: z__namespace.number().optional(),
10128
- durationUnit: z__namespace.enum([
10129
- "days",
10130
- "exposures"
10131
- ]).optional(),
10132
- allocationPercent: z__namespace.number().optional(),
10133
- allocationUnit: z__namespace.enum([
10134
- "cookieId",
10135
- "userId",
10136
- "visitorId"
10137
- ]),
10138
- primaryMetrics: z__namespace.array(z__namespace.object({
10139
- description: z__namespace.string().optional(),
10140
- metricFormula: z__namespace.string().optional(),
10141
- name: z__namespace.string(),
10142
- metricType: z__namespace.enum([
10143
- "count",
10144
- "currency",
10145
- "percentage"
10146
- ]),
10147
- metricUnit: z__namespace.enum([
10148
- "session",
10149
- "user",
10150
- "visitor"
10151
- ]),
10152
- directionality: z__namespace.enum([
10153
- "decreaseIsGood",
10154
- "increaseIsGood"
10155
- ])
10156
- })),
10157
- status: z__namespace.enum([
10158
- "closed",
10159
- "draft",
10160
- "paused",
10161
- "running"
10162
- ])
10163
- }).optional(),
10164
10158
  updatedBy: z__namespace.string().optional(),
10165
10159
  variants: z__namespace.array(z__namespace.object({})),
10166
10160
  id: z__namespace.string(),
@@ -10223,6 +10217,11 @@ const flagSchema = z__namespace.object({
10223
10217
  promille: z__namespace.number(),
10224
10218
  durationMs: z__namespace.number()
10225
10219
  }))
10220
+ }).strict(),
10221
+ z__namespace.object({
10222
+ type: z__namespace.enum([
10223
+ "experiment"
10224
+ ])
10226
10225
  }).strict()
10227
10226
  ]),
10228
10227
  active: z__namespace.union([
@@ -10271,6 +10270,11 @@ const flagSchema = z__namespace.object({
10271
10270
  promille: z__namespace.number(),
10272
10271
  durationMs: z__namespace.number()
10273
10272
  }))
10273
+ }).strict(),
10274
+ z__namespace.object({
10275
+ type: z__namespace.enum([
10276
+ "experiment"
10277
+ ])
10274
10278
  }).strict()
10275
10279
  ]),
10276
10280
  conditions: z__namespace.array(z__namespace.object({
package/dist/schemas.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
 
3
- var schemas = require('./schemas-i3c9gf4z.cjs');
3
+ var schemas = require('./schemas-nxmmau12.cjs');
4
4
 
5
5
 
6
6