@openmeter/sdk 1.0.0-beta-30b7a9c5b75f → 1.0.0-beta-89ca80a99dcf
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/cjs/src/client/notifications.d.cts +214 -36
- package/dist/cjs/src/client/schemas.d.cts +355 -12
- package/dist/cjs/src/zod/index.cjs +245 -93
- package/dist/cjs/src/zod/index.d.cts +116 -4
- package/dist/cjs/src/zod/index.js.map +1 -1
- package/dist/cjs/{tsconfig.085ed0ec.tsbuildinfo → tsconfig.5bd66586.tsbuildinfo} +1 -1
- package/dist/cjs/{tsconfig.c7d73a46.tsbuildinfo → tsconfig.a32ebdee.tsbuildinfo} +1 -1
- package/dist/src/client/notifications.d.ts +214 -36
- package/dist/src/client/schemas.d.ts +355 -12
- package/dist/src/zod/index.d.ts +116 -4
- package/dist/src/zod/index.js +234 -82
- package/dist/src/zod/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/src/zod/index.js
CHANGED
|
@@ -6364,50 +6364,126 @@ export const createNotificationRuleBodyThresholdsMax = 10;
|
|
|
6364
6364
|
export const createNotificationRuleBodyChannelsItemRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6365
6365
|
export const createNotificationRuleBodyFeaturesItemMax = 64;
|
|
6366
6366
|
export const createNotificationRuleBodyFeaturesItemRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6367
|
+
export const createNotificationRuleBodyDisabledDefaultOne = false;
|
|
6368
|
+
export const createNotificationRuleBodyChannelsItemRegExpOne = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6369
|
+
export const createNotificationRuleBodyFeaturesItemMaxOne = 64;
|
|
6370
|
+
export const createNotificationRuleBodyFeaturesItemRegExpOne = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6371
|
+
export const createNotificationRuleBodyDisabledDefaultTwo = false;
|
|
6372
|
+
export const createNotificationRuleBodyChannelsItemRegExpTwo = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6373
|
+
export const createNotificationRuleBodyDisabledDefaultThree = false;
|
|
6374
|
+
export const createNotificationRuleBodyChannelsItemRegExpThree = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6367
6375
|
export const createNotificationRuleBody = zod
|
|
6368
|
-
.
|
|
6369
|
-
|
|
6370
|
-
.array(zod
|
|
6371
|
-
.string()
|
|
6372
|
-
.regex(createNotificationRuleBodyChannelsItemRegExp)
|
|
6373
|
-
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'))
|
|
6374
|
-
.min(1)
|
|
6375
|
-
.describe('List of notification channels the rule is applied to.'),
|
|
6376
|
-
disabled: zod
|
|
6377
|
-
.boolean()
|
|
6378
|
-
.optional()
|
|
6379
|
-
.describe('Whether the rule is disabled or not.'),
|
|
6380
|
-
features: zod
|
|
6381
|
-
.array(zod
|
|
6382
|
-
.string()
|
|
6383
|
-
.min(1)
|
|
6384
|
-
.max(createNotificationRuleBodyFeaturesItemMax)
|
|
6385
|
-
.regex(createNotificationRuleBodyFeaturesItemRegExp)
|
|
6386
|
-
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).\nA key is a unique string that is used to identify a resource.\n\nTODO: this is a temporary solution to support both ULID and Key in the same spec for codegen.'))
|
|
6387
|
-
.min(1)
|
|
6388
|
-
.optional()
|
|
6389
|
-
.describe('Optional field for defining the scope of notification by feature. It may contain features by id or key.'),
|
|
6390
|
-
name: zod
|
|
6391
|
-
.string()
|
|
6392
|
-
.describe('The user friendly name of the notification rule.'),
|
|
6393
|
-
thresholds: zod
|
|
6394
|
-
.array(zod
|
|
6376
|
+
.discriminatedUnion('type', [
|
|
6377
|
+
zod
|
|
6395
6378
|
.object({
|
|
6396
|
-
|
|
6397
|
-
.
|
|
6398
|
-
.
|
|
6399
|
-
.
|
|
6400
|
-
|
|
6379
|
+
channels: zod
|
|
6380
|
+
.array(zod
|
|
6381
|
+
.string()
|
|
6382
|
+
.regex(createNotificationRuleBodyChannelsItemRegExp)
|
|
6383
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'))
|
|
6384
|
+
.min(1)
|
|
6385
|
+
.describe('List of notification channels the rule is applied to.'),
|
|
6386
|
+
disabled: zod
|
|
6387
|
+
.boolean()
|
|
6388
|
+
.optional()
|
|
6389
|
+
.describe('Whether the rule is disabled or not.'),
|
|
6390
|
+
features: zod
|
|
6391
|
+
.array(zod
|
|
6392
|
+
.string()
|
|
6393
|
+
.min(1)
|
|
6394
|
+
.max(createNotificationRuleBodyFeaturesItemMax)
|
|
6395
|
+
.regex(createNotificationRuleBodyFeaturesItemRegExp)
|
|
6396
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).\nA key is a unique string that is used to identify a resource.\n\nTODO: this is a temporary solution to support both ULID and Key in the same spec for codegen.'))
|
|
6397
|
+
.min(1)
|
|
6398
|
+
.optional()
|
|
6399
|
+
.describe('Optional field for defining the scope of notification by feature. It may contain features by id or key.'),
|
|
6400
|
+
name: zod
|
|
6401
|
+
.string()
|
|
6402
|
+
.describe('The user friendly name of the notification rule.'),
|
|
6403
|
+
thresholds: zod
|
|
6404
|
+
.array(zod
|
|
6405
|
+
.object({
|
|
6406
|
+
type: zod
|
|
6407
|
+
.enum(['PERCENT', 'NUMBER'])
|
|
6408
|
+
.describe('Type of the rule in the balance threshold specification.')
|
|
6409
|
+
.describe('Type of the threshold.'),
|
|
6410
|
+
value: zod.number().describe('Value of the threshold.'),
|
|
6411
|
+
})
|
|
6412
|
+
.describe('Threshold value with multiple supported types.'))
|
|
6413
|
+
.min(1)
|
|
6414
|
+
.max(createNotificationRuleBodyThresholdsMax)
|
|
6415
|
+
.describe('List of thresholds the rule suppose to be triggered.'),
|
|
6416
|
+
type: zod.enum(['entitlements.balance.threshold']),
|
|
6401
6417
|
})
|
|
6402
|
-
.describe('
|
|
6403
|
-
|
|
6404
|
-
.
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6418
|
+
.describe('Request with input parameters for creating new notification rule with entitlements.balance.threshold type.'),
|
|
6419
|
+
zod
|
|
6420
|
+
.object({
|
|
6421
|
+
channels: zod
|
|
6422
|
+
.array(zod
|
|
6423
|
+
.string()
|
|
6424
|
+
.regex(createNotificationRuleBodyChannelsItemRegExpOne)
|
|
6425
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'))
|
|
6426
|
+
.min(1)
|
|
6427
|
+
.describe('List of notification channels the rule is applied to.'),
|
|
6428
|
+
disabled: zod
|
|
6429
|
+
.boolean()
|
|
6430
|
+
.optional()
|
|
6431
|
+
.describe('Whether the rule is disabled or not.'),
|
|
6432
|
+
features: zod
|
|
6433
|
+
.array(zod
|
|
6434
|
+
.string()
|
|
6435
|
+
.min(1)
|
|
6436
|
+
.max(createNotificationRuleBodyFeaturesItemMaxOne)
|
|
6437
|
+
.regex(createNotificationRuleBodyFeaturesItemRegExpOne)
|
|
6438
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).\nA key is a unique string that is used to identify a resource.\n\nTODO: this is a temporary solution to support both ULID and Key in the same spec for codegen.'))
|
|
6439
|
+
.min(1)
|
|
6440
|
+
.optional()
|
|
6441
|
+
.describe('Optional field for defining the scope of notification by feature. It may contain features by id or key.'),
|
|
6442
|
+
name: zod
|
|
6443
|
+
.string()
|
|
6444
|
+
.describe('The user friendly name of the notification rule.'),
|
|
6445
|
+
type: zod.enum(['entitlements.reset']),
|
|
6446
|
+
})
|
|
6447
|
+
.describe('Request with input parameters for creating new notification rule with entitlements.reset type.'),
|
|
6448
|
+
zod
|
|
6449
|
+
.object({
|
|
6450
|
+
channels: zod
|
|
6451
|
+
.array(zod
|
|
6452
|
+
.string()
|
|
6453
|
+
.regex(createNotificationRuleBodyChannelsItemRegExpTwo)
|
|
6454
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'))
|
|
6455
|
+
.min(1)
|
|
6456
|
+
.describe('List of notification channels the rule is applied to.'),
|
|
6457
|
+
disabled: zod
|
|
6458
|
+
.boolean()
|
|
6459
|
+
.optional()
|
|
6460
|
+
.describe('Whether the rule is disabled or not.'),
|
|
6461
|
+
name: zod
|
|
6462
|
+
.string()
|
|
6463
|
+
.describe('The user friendly name of the notification rule.'),
|
|
6464
|
+
type: zod.enum(['invoice.created']),
|
|
6465
|
+
})
|
|
6466
|
+
.describe('Request with input parameters for creating new notification rule with invoice.created type.'),
|
|
6467
|
+
zod
|
|
6468
|
+
.object({
|
|
6469
|
+
channels: zod
|
|
6470
|
+
.array(zod
|
|
6471
|
+
.string()
|
|
6472
|
+
.regex(createNotificationRuleBodyChannelsItemRegExpThree)
|
|
6473
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'))
|
|
6474
|
+
.min(1)
|
|
6475
|
+
.describe('List of notification channels the rule is applied to.'),
|
|
6476
|
+
disabled: zod
|
|
6477
|
+
.boolean()
|
|
6478
|
+
.optional()
|
|
6479
|
+
.describe('Whether the rule is disabled or not.'),
|
|
6480
|
+
name: zod
|
|
6481
|
+
.string()
|
|
6482
|
+
.describe('The user friendly name of the notification rule.'),
|
|
6483
|
+
type: zod.enum(['invoice.updated']),
|
|
6484
|
+
})
|
|
6485
|
+
.describe('Request with input parameters for creating new notification rule with invoice.updated type.'),
|
|
6486
|
+
])
|
|
6411
6487
|
.describe('Union type for requests creating new notification rule with certain type.');
|
|
6412
6488
|
/**
|
|
6413
6489
|
* Update notification rule.
|
|
@@ -6422,50 +6498,126 @@ export const updateNotificationRuleBodyThresholdsMax = 10;
|
|
|
6422
6498
|
export const updateNotificationRuleBodyChannelsItemRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6423
6499
|
export const updateNotificationRuleBodyFeaturesItemMax = 64;
|
|
6424
6500
|
export const updateNotificationRuleBodyFeaturesItemRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6501
|
+
export const updateNotificationRuleBodyDisabledDefaultOne = false;
|
|
6502
|
+
export const updateNotificationRuleBodyChannelsItemRegExpOne = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6503
|
+
export const updateNotificationRuleBodyFeaturesItemMaxOne = 64;
|
|
6504
|
+
export const updateNotificationRuleBodyFeaturesItemRegExpOne = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6505
|
+
export const updateNotificationRuleBodyDisabledDefaultTwo = false;
|
|
6506
|
+
export const updateNotificationRuleBodyChannelsItemRegExpTwo = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6507
|
+
export const updateNotificationRuleBodyDisabledDefaultThree = false;
|
|
6508
|
+
export const updateNotificationRuleBodyChannelsItemRegExpThree = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6425
6509
|
export const updateNotificationRuleBody = zod
|
|
6426
|
-
.
|
|
6427
|
-
|
|
6428
|
-
.array(zod
|
|
6429
|
-
.string()
|
|
6430
|
-
.regex(updateNotificationRuleBodyChannelsItemRegExp)
|
|
6431
|
-
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'))
|
|
6432
|
-
.min(1)
|
|
6433
|
-
.describe('List of notification channels the rule is applied to.'),
|
|
6434
|
-
disabled: zod
|
|
6435
|
-
.boolean()
|
|
6436
|
-
.optional()
|
|
6437
|
-
.describe('Whether the rule is disabled or not.'),
|
|
6438
|
-
features: zod
|
|
6439
|
-
.array(zod
|
|
6440
|
-
.string()
|
|
6441
|
-
.min(1)
|
|
6442
|
-
.max(updateNotificationRuleBodyFeaturesItemMax)
|
|
6443
|
-
.regex(updateNotificationRuleBodyFeaturesItemRegExp)
|
|
6444
|
-
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).\nA key is a unique string that is used to identify a resource.\n\nTODO: this is a temporary solution to support both ULID and Key in the same spec for codegen.'))
|
|
6445
|
-
.min(1)
|
|
6446
|
-
.optional()
|
|
6447
|
-
.describe('Optional field for defining the scope of notification by feature. It may contain features by id or key.'),
|
|
6448
|
-
name: zod
|
|
6449
|
-
.string()
|
|
6450
|
-
.describe('The user friendly name of the notification rule.'),
|
|
6451
|
-
thresholds: zod
|
|
6452
|
-
.array(zod
|
|
6510
|
+
.discriminatedUnion('type', [
|
|
6511
|
+
zod
|
|
6453
6512
|
.object({
|
|
6454
|
-
|
|
6455
|
-
.
|
|
6456
|
-
.
|
|
6457
|
-
.
|
|
6458
|
-
|
|
6513
|
+
channels: zod
|
|
6514
|
+
.array(zod
|
|
6515
|
+
.string()
|
|
6516
|
+
.regex(updateNotificationRuleBodyChannelsItemRegExp)
|
|
6517
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'))
|
|
6518
|
+
.min(1)
|
|
6519
|
+
.describe('List of notification channels the rule is applied to.'),
|
|
6520
|
+
disabled: zod
|
|
6521
|
+
.boolean()
|
|
6522
|
+
.optional()
|
|
6523
|
+
.describe('Whether the rule is disabled or not.'),
|
|
6524
|
+
features: zod
|
|
6525
|
+
.array(zod
|
|
6526
|
+
.string()
|
|
6527
|
+
.min(1)
|
|
6528
|
+
.max(updateNotificationRuleBodyFeaturesItemMax)
|
|
6529
|
+
.regex(updateNotificationRuleBodyFeaturesItemRegExp)
|
|
6530
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).\nA key is a unique string that is used to identify a resource.\n\nTODO: this is a temporary solution to support both ULID and Key in the same spec for codegen.'))
|
|
6531
|
+
.min(1)
|
|
6532
|
+
.optional()
|
|
6533
|
+
.describe('Optional field for defining the scope of notification by feature. It may contain features by id or key.'),
|
|
6534
|
+
name: zod
|
|
6535
|
+
.string()
|
|
6536
|
+
.describe('The user friendly name of the notification rule.'),
|
|
6537
|
+
thresholds: zod
|
|
6538
|
+
.array(zod
|
|
6539
|
+
.object({
|
|
6540
|
+
type: zod
|
|
6541
|
+
.enum(['PERCENT', 'NUMBER'])
|
|
6542
|
+
.describe('Type of the rule in the balance threshold specification.')
|
|
6543
|
+
.describe('Type of the threshold.'),
|
|
6544
|
+
value: zod.number().describe('Value of the threshold.'),
|
|
6545
|
+
})
|
|
6546
|
+
.describe('Threshold value with multiple supported types.'))
|
|
6547
|
+
.min(1)
|
|
6548
|
+
.max(updateNotificationRuleBodyThresholdsMax)
|
|
6549
|
+
.describe('List of thresholds the rule suppose to be triggered.'),
|
|
6550
|
+
type: zod.enum(['entitlements.balance.threshold']),
|
|
6459
6551
|
})
|
|
6460
|
-
.describe('
|
|
6461
|
-
|
|
6462
|
-
.
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
|
|
6552
|
+
.describe('Request with input parameters for creating new notification rule with entitlements.balance.threshold type.'),
|
|
6553
|
+
zod
|
|
6554
|
+
.object({
|
|
6555
|
+
channels: zod
|
|
6556
|
+
.array(zod
|
|
6557
|
+
.string()
|
|
6558
|
+
.regex(updateNotificationRuleBodyChannelsItemRegExpOne)
|
|
6559
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'))
|
|
6560
|
+
.min(1)
|
|
6561
|
+
.describe('List of notification channels the rule is applied to.'),
|
|
6562
|
+
disabled: zod
|
|
6563
|
+
.boolean()
|
|
6564
|
+
.optional()
|
|
6565
|
+
.describe('Whether the rule is disabled or not.'),
|
|
6566
|
+
features: zod
|
|
6567
|
+
.array(zod
|
|
6568
|
+
.string()
|
|
6569
|
+
.min(1)
|
|
6570
|
+
.max(updateNotificationRuleBodyFeaturesItemMaxOne)
|
|
6571
|
+
.regex(updateNotificationRuleBodyFeaturesItemRegExpOne)
|
|
6572
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).\nA key is a unique string that is used to identify a resource.\n\nTODO: this is a temporary solution to support both ULID and Key in the same spec for codegen.'))
|
|
6573
|
+
.min(1)
|
|
6574
|
+
.optional()
|
|
6575
|
+
.describe('Optional field for defining the scope of notification by feature. It may contain features by id or key.'),
|
|
6576
|
+
name: zod
|
|
6577
|
+
.string()
|
|
6578
|
+
.describe('The user friendly name of the notification rule.'),
|
|
6579
|
+
type: zod.enum(['entitlements.reset']),
|
|
6580
|
+
})
|
|
6581
|
+
.describe('Request with input parameters for creating new notification rule with entitlements.reset type.'),
|
|
6582
|
+
zod
|
|
6583
|
+
.object({
|
|
6584
|
+
channels: zod
|
|
6585
|
+
.array(zod
|
|
6586
|
+
.string()
|
|
6587
|
+
.regex(updateNotificationRuleBodyChannelsItemRegExpTwo)
|
|
6588
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'))
|
|
6589
|
+
.min(1)
|
|
6590
|
+
.describe('List of notification channels the rule is applied to.'),
|
|
6591
|
+
disabled: zod
|
|
6592
|
+
.boolean()
|
|
6593
|
+
.optional()
|
|
6594
|
+
.describe('Whether the rule is disabled or not.'),
|
|
6595
|
+
name: zod
|
|
6596
|
+
.string()
|
|
6597
|
+
.describe('The user friendly name of the notification rule.'),
|
|
6598
|
+
type: zod.enum(['invoice.created']),
|
|
6599
|
+
})
|
|
6600
|
+
.describe('Request with input parameters for creating new notification rule with invoice.created type.'),
|
|
6601
|
+
zod
|
|
6602
|
+
.object({
|
|
6603
|
+
channels: zod
|
|
6604
|
+
.array(zod
|
|
6605
|
+
.string()
|
|
6606
|
+
.regex(updateNotificationRuleBodyChannelsItemRegExpThree)
|
|
6607
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'))
|
|
6608
|
+
.min(1)
|
|
6609
|
+
.describe('List of notification channels the rule is applied to.'),
|
|
6610
|
+
disabled: zod
|
|
6611
|
+
.boolean()
|
|
6612
|
+
.optional()
|
|
6613
|
+
.describe('Whether the rule is disabled or not.'),
|
|
6614
|
+
name: zod
|
|
6615
|
+
.string()
|
|
6616
|
+
.describe('The user friendly name of the notification rule.'),
|
|
6617
|
+
type: zod.enum(['invoice.updated']),
|
|
6618
|
+
})
|
|
6619
|
+
.describe('Request with input parameters for creating new notification rule with invoice.updated type.'),
|
|
6620
|
+
])
|
|
6469
6621
|
.describe('Union type for requests creating new notification rule with certain type.');
|
|
6470
6622
|
/**
|
|
6471
6623
|
* Get a notification rule by id.
|