@openmeter/sdk 1.0.0-beta-c7cff6874ab7 → 1.0.0-beta-cfda578c0c68

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.
@@ -769,6 +769,165 @@ export interface paths {
769
769
  patch?: never;
770
770
  trace?: never;
771
771
  };
772
+ '/api/v1/customers/{customerIdOrKey}/entitlements': {
773
+ parameters: {
774
+ query?: never;
775
+ header?: never;
776
+ path?: never;
777
+ cookie?: never;
778
+ };
779
+ /**
780
+ * List customer entitlements
781
+ * @description List all entitlements for a customer. For checking entitlement access, use the /value endpoint instead.
782
+ */
783
+ get: operations['listCustomerEntitlements'];
784
+ put?: never;
785
+ /**
786
+ * Create a customer entitlement
787
+ * @description OpenMeter has three types of entitlements: metered, boolean, and static. The type property determines the type of entitlement. The underlying feature has to be compatible with the entitlement type specified in the request (e.g., a metered entitlement needs a feature associated with a meter).
788
+ *
789
+ * - Boolean entitlements define static feature access, e.g. "Can use SSO authentication".
790
+ * - Static entitlements let you pass along a configuration while granting access, e.g. "Using this feature with X Y settings" (passed in the config).
791
+ * - Metered entitlements have many use cases, from setting up usage-based access to implementing complex credit systems. Example: The customer can use 10000 AI tokens during the usage period of the entitlement.
792
+ *
793
+ * A given customer can only have one active (non-deleted) entitlement per featureKey. If you try to create a new entitlement for a featureKey that already has an active entitlement, the request will fail with a 409 error.
794
+ *
795
+ * Once an entitlement is created you cannot modify it, only delete it.
796
+ */
797
+ post: operations['createCustomerEntitlement'];
798
+ delete?: never;
799
+ options?: never;
800
+ head?: never;
801
+ patch?: never;
802
+ trace?: never;
803
+ };
804
+ '/api/v1/customers/{customerIdOrKey}/entitlements/{featureKey}': {
805
+ parameters: {
806
+ query?: never;
807
+ header?: never;
808
+ path?: never;
809
+ cookie?: never;
810
+ };
811
+ /**
812
+ * Get customer entitlement
813
+ * @description Get entitlement by feature key. For checking entitlement access, use the /value endpoint instead.
814
+ */
815
+ get: operations['getCustomerEntitlement'];
816
+ put?: never;
817
+ post?: never;
818
+ /**
819
+ * Delete customer entitlement
820
+ * @description Deleting an entitlement revokes access to the associated feature. As a single customer can only have one entitlement per featureKey, when "migrating" features you have to delete the old entitlements as well.
821
+ * As access and status checks can be historical queries, deleting an entitlement populates the deletedAt timestamp. When queried for a time before that, the entitlement is still considered active, you cannot have retroactive changes to access, which is important for, among other things, auditing.
822
+ */
823
+ delete: operations['deleteCustomerEntitlement'];
824
+ options?: never;
825
+ head?: never;
826
+ patch?: never;
827
+ trace?: never;
828
+ };
829
+ '/api/v1/customers/{customerIdOrKey}/entitlements/{featureKey}/grants': {
830
+ parameters: {
831
+ query?: never;
832
+ header?: never;
833
+ path?: never;
834
+ cookie?: never;
835
+ };
836
+ /**
837
+ * List customer entitlement grants
838
+ * @description List all grants issued for an entitlement. The entitlement can be defined either by its id or featureKey.
839
+ */
840
+ get: operations['listCustomerEntitlementGrants'];
841
+ put?: never;
842
+ /**
843
+ * Create customer entitlement grant
844
+ * @description Grants define a behavior of granting usage for a metered entitlement. They can have complicated recurrence and rollover rules, thanks to which you can define a wide range of access patterns with a single grant, in most cases you don't have to periodically create new grants. You can only issue grants for active metered entitlements.
845
+ *
846
+ * A grant defines a given amount of usage that can be consumed for the entitlement. The grant is in effect between its effective date and its expiration date. Specifying both is mandatory for new grants.
847
+ *
848
+ * Grants have a priority setting that determines their order of use. Lower numbers have higher priority, with 0 being the highest priority.
849
+ *
850
+ * Grants can have a recurrence setting intended to automate the manual reissuing of grants. For example, a daily recurrence is equal to reissuing that same grant every day (ignoring rollover settings).
851
+ *
852
+ * Rollover settings define what happens to the remaining balance of a grant at a reset. Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))
853
+ *
854
+ * Grants cannot be changed once created, only deleted. This is to ensure that balance is deterministic regardless of when it is queried.
855
+ */
856
+ post: operations['createCustomerEntitlementGrant'];
857
+ delete?: never;
858
+ options?: never;
859
+ head?: never;
860
+ patch?: never;
861
+ trace?: never;
862
+ };
863
+ '/api/v1/customers/{customerIdOrKey}/entitlements/{featureKey}/history': {
864
+ parameters: {
865
+ query?: never;
866
+ header?: never;
867
+ path?: never;
868
+ cookie?: never;
869
+ };
870
+ /**
871
+ * Get customer entitlement history
872
+ * @description Returns historical balance and usage data for the entitlement. The queried history can span accross multiple reset events.
873
+ *
874
+ * BurndownHistory returns a continous history of segments, where the segments are seperated by events that changed either the grant burndown priority or the usage period.
875
+ *
876
+ * WindowedHistory returns windowed usage data for the period enriched with balance information and the list of grants that were being burnt down in that window.
877
+ */
878
+ get: operations['getCustomerEntitlementHistory'];
879
+ put?: never;
880
+ post?: never;
881
+ delete?: never;
882
+ options?: never;
883
+ head?: never;
884
+ patch?: never;
885
+ trace?: never;
886
+ };
887
+ '/api/v1/customers/{customerIdOrKey}/entitlements/{featureKey}/override': {
888
+ parameters: {
889
+ query?: never;
890
+ header?: never;
891
+ path?: never;
892
+ cookie?: never;
893
+ };
894
+ get?: never;
895
+ /**
896
+ * Override customer entitlement
897
+ * @description Overriding an entitlement creates a new entitlement from the provided inputs and soft deletes the previous entitlement for the provided customer-feature pair. If the previous entitlement is already deleted or otherwise doesnt exist, the override will fail.
898
+ *
899
+ * This endpoint is useful for upgrades, downgrades, or other changes to entitlements that require a new entitlement to be created with zero downtime.
900
+ */
901
+ put: operations['overrideCustomerEntitlement'];
902
+ post?: never;
903
+ delete?: never;
904
+ options?: never;
905
+ head?: never;
906
+ patch?: never;
907
+ trace?: never;
908
+ };
909
+ '/api/v1/customers/{customerIdOrKey}/entitlements/{featureKey}/reset': {
910
+ parameters: {
911
+ query?: never;
912
+ header?: never;
913
+ path?: never;
914
+ cookie?: never;
915
+ };
916
+ get?: never;
917
+ put?: never;
918
+ /**
919
+ * Reset customer entitlement
920
+ * @description Reset marks the start of a new usage period for the entitlement and initiates grant rollover. At the start of a period usage is zerod out and grants are rolled over based on their rollover settings. It would typically be synced with the customers billing period to enforce usage based on their subscription.
921
+ *
922
+ * Usage is automatically reset for metered entitlements based on their usage period, but this endpoint allows to manually reset it at any time. When doing so the period anchor of the entitlement can be changed if needed.
923
+ */
924
+ post: operations['resetCustomerEntitlementUsage'];
925
+ delete?: never;
926
+ options?: never;
927
+ head?: never;
928
+ patch?: never;
929
+ trace?: never;
930
+ };
772
931
  '/api/v1/customers/{customerIdOrKey}/entitlements/{featureKey}/value': {
773
932
  parameters: {
774
933
  query?: never;
@@ -15163,6 +15322,877 @@ export interface operations {
15163
15322
  };
15164
15323
  };
15165
15324
  };
15325
+ listCustomerEntitlements: {
15326
+ parameters: {
15327
+ query?: {
15328
+ includeDeleted?: boolean;
15329
+ };
15330
+ header?: never;
15331
+ path: {
15332
+ customerIdOrKey: components['schemas']['ULIDOrExternalKey'];
15333
+ };
15334
+ cookie?: never;
15335
+ };
15336
+ requestBody?: never;
15337
+ responses: {
15338
+ /** @description The request has succeeded. */
15339
+ 200: {
15340
+ headers: {
15341
+ [name: string]: unknown;
15342
+ };
15343
+ content: {
15344
+ 'application/json': components['schemas']['Entitlement'][];
15345
+ };
15346
+ };
15347
+ /** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
15348
+ 400: {
15349
+ headers: {
15350
+ [name: string]: unknown;
15351
+ };
15352
+ content: {
15353
+ 'application/problem+json': components['schemas']['BadRequestProblemResponse'];
15354
+ };
15355
+ };
15356
+ /** @description The request has not been applied because it lacks valid authentication credentials for the target resource. */
15357
+ 401: {
15358
+ headers: {
15359
+ [name: string]: unknown;
15360
+ };
15361
+ content: {
15362
+ 'application/problem+json': components['schemas']['UnauthorizedProblemResponse'];
15363
+ };
15364
+ };
15365
+ /** @description The server understood the request but refuses to authorize it. */
15366
+ 403: {
15367
+ headers: {
15368
+ [name: string]: unknown;
15369
+ };
15370
+ content: {
15371
+ 'application/problem+json': components['schemas']['ForbiddenProblemResponse'];
15372
+ };
15373
+ };
15374
+ /** @description One or more conditions given in the request header fields evaluated to false when tested on the server. */
15375
+ 412: {
15376
+ headers: {
15377
+ [name: string]: unknown;
15378
+ };
15379
+ content: {
15380
+ 'application/problem+json': components['schemas']['PreconditionFailedProblemResponse'];
15381
+ };
15382
+ };
15383
+ /** @description The server encountered an unexpected condition that prevented it from fulfilling the request. */
15384
+ 500: {
15385
+ headers: {
15386
+ [name: string]: unknown;
15387
+ };
15388
+ content: {
15389
+ 'application/problem+json': components['schemas']['InternalServerErrorProblemResponse'];
15390
+ };
15391
+ };
15392
+ /** @description The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. */
15393
+ 503: {
15394
+ headers: {
15395
+ [name: string]: unknown;
15396
+ };
15397
+ content: {
15398
+ 'application/problem+json': components['schemas']['ServiceUnavailableProblemResponse'];
15399
+ };
15400
+ };
15401
+ /** @description An unexpected error response. */
15402
+ default: {
15403
+ headers: {
15404
+ [name: string]: unknown;
15405
+ };
15406
+ content: {
15407
+ 'application/problem+json': components['schemas']['UnexpectedProblemResponse'];
15408
+ };
15409
+ };
15410
+ };
15411
+ };
15412
+ createCustomerEntitlement: {
15413
+ parameters: {
15414
+ query?: never;
15415
+ header?: never;
15416
+ path: {
15417
+ customerIdOrKey: components['schemas']['ULIDOrExternalKey'];
15418
+ };
15419
+ cookie?: never;
15420
+ };
15421
+ requestBody: {
15422
+ content: {
15423
+ 'application/json': components['schemas']['EntitlementCreateInputs'];
15424
+ };
15425
+ };
15426
+ responses: {
15427
+ /** @description The request has succeeded and a new resource has been created as a result. */
15428
+ 201: {
15429
+ headers: {
15430
+ [name: string]: unknown;
15431
+ };
15432
+ content: {
15433
+ 'application/json': components['schemas']['Entitlement'];
15434
+ };
15435
+ };
15436
+ /** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
15437
+ 400: {
15438
+ headers: {
15439
+ [name: string]: unknown;
15440
+ };
15441
+ content: {
15442
+ 'application/problem+json': components['schemas']['BadRequestProblemResponse'];
15443
+ };
15444
+ };
15445
+ /** @description The request has not been applied because it lacks valid authentication credentials for the target resource. */
15446
+ 401: {
15447
+ headers: {
15448
+ [name: string]: unknown;
15449
+ };
15450
+ content: {
15451
+ 'application/problem+json': components['schemas']['UnauthorizedProblemResponse'];
15452
+ };
15453
+ };
15454
+ /** @description The server understood the request but refuses to authorize it. */
15455
+ 403: {
15456
+ headers: {
15457
+ [name: string]: unknown;
15458
+ };
15459
+ content: {
15460
+ 'application/problem+json': components['schemas']['ForbiddenProblemResponse'];
15461
+ };
15462
+ };
15463
+ /** @description The request could not be completed due to a conflict with the current state of the target resource. */
15464
+ 409: {
15465
+ headers: {
15466
+ [name: string]: unknown;
15467
+ };
15468
+ content: {
15469
+ 'application/problem+json': components['schemas']['ConflictProblemResponse'];
15470
+ };
15471
+ };
15472
+ /** @description One or more conditions given in the request header fields evaluated to false when tested on the server. */
15473
+ 412: {
15474
+ headers: {
15475
+ [name: string]: unknown;
15476
+ };
15477
+ content: {
15478
+ 'application/problem+json': components['schemas']['PreconditionFailedProblemResponse'];
15479
+ };
15480
+ };
15481
+ /** @description The server encountered an unexpected condition that prevented it from fulfilling the request. */
15482
+ 500: {
15483
+ headers: {
15484
+ [name: string]: unknown;
15485
+ };
15486
+ content: {
15487
+ 'application/problem+json': components['schemas']['InternalServerErrorProblemResponse'];
15488
+ };
15489
+ };
15490
+ /** @description The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. */
15491
+ 503: {
15492
+ headers: {
15493
+ [name: string]: unknown;
15494
+ };
15495
+ content: {
15496
+ 'application/problem+json': components['schemas']['ServiceUnavailableProblemResponse'];
15497
+ };
15498
+ };
15499
+ /** @description An unexpected error response. */
15500
+ default: {
15501
+ headers: {
15502
+ [name: string]: unknown;
15503
+ };
15504
+ content: {
15505
+ 'application/problem+json': components['schemas']['UnexpectedProblemResponse'];
15506
+ };
15507
+ };
15508
+ };
15509
+ };
15510
+ getCustomerEntitlement: {
15511
+ parameters: {
15512
+ query?: never;
15513
+ header?: never;
15514
+ path: {
15515
+ customerIdOrKey: components['schemas']['ULIDOrExternalKey'];
15516
+ featureKey: string;
15517
+ };
15518
+ cookie?: never;
15519
+ };
15520
+ requestBody?: never;
15521
+ responses: {
15522
+ /** @description The request has succeeded. */
15523
+ 200: {
15524
+ headers: {
15525
+ [name: string]: unknown;
15526
+ };
15527
+ content: {
15528
+ 'application/json': components['schemas']['Entitlement'];
15529
+ };
15530
+ };
15531
+ /** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
15532
+ 400: {
15533
+ headers: {
15534
+ [name: string]: unknown;
15535
+ };
15536
+ content: {
15537
+ 'application/problem+json': components['schemas']['BadRequestProblemResponse'];
15538
+ };
15539
+ };
15540
+ /** @description The request has not been applied because it lacks valid authentication credentials for the target resource. */
15541
+ 401: {
15542
+ headers: {
15543
+ [name: string]: unknown;
15544
+ };
15545
+ content: {
15546
+ 'application/problem+json': components['schemas']['UnauthorizedProblemResponse'];
15547
+ };
15548
+ };
15549
+ /** @description The server understood the request but refuses to authorize it. */
15550
+ 403: {
15551
+ headers: {
15552
+ [name: string]: unknown;
15553
+ };
15554
+ content: {
15555
+ 'application/problem+json': components['schemas']['ForbiddenProblemResponse'];
15556
+ };
15557
+ };
15558
+ /** @description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. */
15559
+ 404: {
15560
+ headers: {
15561
+ [name: string]: unknown;
15562
+ };
15563
+ content: {
15564
+ 'application/problem+json': components['schemas']['NotFoundProblemResponse'];
15565
+ };
15566
+ };
15567
+ /** @description One or more conditions given in the request header fields evaluated to false when tested on the server. */
15568
+ 412: {
15569
+ headers: {
15570
+ [name: string]: unknown;
15571
+ };
15572
+ content: {
15573
+ 'application/problem+json': components['schemas']['PreconditionFailedProblemResponse'];
15574
+ };
15575
+ };
15576
+ /** @description The server encountered an unexpected condition that prevented it from fulfilling the request. */
15577
+ 500: {
15578
+ headers: {
15579
+ [name: string]: unknown;
15580
+ };
15581
+ content: {
15582
+ 'application/problem+json': components['schemas']['InternalServerErrorProblemResponse'];
15583
+ };
15584
+ };
15585
+ /** @description The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. */
15586
+ 503: {
15587
+ headers: {
15588
+ [name: string]: unknown;
15589
+ };
15590
+ content: {
15591
+ 'application/problem+json': components['schemas']['ServiceUnavailableProblemResponse'];
15592
+ };
15593
+ };
15594
+ /** @description An unexpected error response. */
15595
+ default: {
15596
+ headers: {
15597
+ [name: string]: unknown;
15598
+ };
15599
+ content: {
15600
+ 'application/problem+json': components['schemas']['UnexpectedProblemResponse'];
15601
+ };
15602
+ };
15603
+ };
15604
+ };
15605
+ deleteCustomerEntitlement: {
15606
+ parameters: {
15607
+ query?: never;
15608
+ header?: never;
15609
+ path: {
15610
+ customerIdOrKey: components['schemas']['ULIDOrExternalKey'];
15611
+ featureKey: string;
15612
+ };
15613
+ cookie?: never;
15614
+ };
15615
+ requestBody?: never;
15616
+ responses: {
15617
+ /** @description There is no content to send for this request, but the headers may be useful. */
15618
+ 204: {
15619
+ headers: {
15620
+ [name: string]: unknown;
15621
+ };
15622
+ content?: never;
15623
+ };
15624
+ /** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
15625
+ 400: {
15626
+ headers: {
15627
+ [name: string]: unknown;
15628
+ };
15629
+ content: {
15630
+ 'application/problem+json': components['schemas']['BadRequestProblemResponse'];
15631
+ };
15632
+ };
15633
+ /** @description The request has not been applied because it lacks valid authentication credentials for the target resource. */
15634
+ 401: {
15635
+ headers: {
15636
+ [name: string]: unknown;
15637
+ };
15638
+ content: {
15639
+ 'application/problem+json': components['schemas']['UnauthorizedProblemResponse'];
15640
+ };
15641
+ };
15642
+ /** @description The server understood the request but refuses to authorize it. */
15643
+ 403: {
15644
+ headers: {
15645
+ [name: string]: unknown;
15646
+ };
15647
+ content: {
15648
+ 'application/problem+json': components['schemas']['ForbiddenProblemResponse'];
15649
+ };
15650
+ };
15651
+ /** @description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. */
15652
+ 404: {
15653
+ headers: {
15654
+ [name: string]: unknown;
15655
+ };
15656
+ content: {
15657
+ 'application/problem+json': components['schemas']['NotFoundProblemResponse'];
15658
+ };
15659
+ };
15660
+ /** @description One or more conditions given in the request header fields evaluated to false when tested on the server. */
15661
+ 412: {
15662
+ headers: {
15663
+ [name: string]: unknown;
15664
+ };
15665
+ content: {
15666
+ 'application/problem+json': components['schemas']['PreconditionFailedProblemResponse'];
15667
+ };
15668
+ };
15669
+ /** @description The server encountered an unexpected condition that prevented it from fulfilling the request. */
15670
+ 500: {
15671
+ headers: {
15672
+ [name: string]: unknown;
15673
+ };
15674
+ content: {
15675
+ 'application/problem+json': components['schemas']['InternalServerErrorProblemResponse'];
15676
+ };
15677
+ };
15678
+ /** @description The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. */
15679
+ 503: {
15680
+ headers: {
15681
+ [name: string]: unknown;
15682
+ };
15683
+ content: {
15684
+ 'application/problem+json': components['schemas']['ServiceUnavailableProblemResponse'];
15685
+ };
15686
+ };
15687
+ /** @description An unexpected error response. */
15688
+ default: {
15689
+ headers: {
15690
+ [name: string]: unknown;
15691
+ };
15692
+ content: {
15693
+ 'application/problem+json': components['schemas']['UnexpectedProblemResponse'];
15694
+ };
15695
+ };
15696
+ };
15697
+ };
15698
+ listCustomerEntitlementGrants: {
15699
+ parameters: {
15700
+ query?: {
15701
+ includeDeleted?: boolean;
15702
+ orderBy?: components['schemas']['GrantOrderBy'];
15703
+ };
15704
+ header?: never;
15705
+ path: {
15706
+ customerIdOrKey: components['schemas']['ULIDOrExternalKey'];
15707
+ featureKey: string;
15708
+ };
15709
+ cookie?: never;
15710
+ };
15711
+ requestBody?: never;
15712
+ responses: {
15713
+ /** @description The request has succeeded. */
15714
+ 200: {
15715
+ headers: {
15716
+ [name: string]: unknown;
15717
+ };
15718
+ content: {
15719
+ 'application/json': components['schemas']['EntitlementGrant'][];
15720
+ };
15721
+ };
15722
+ /** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
15723
+ 400: {
15724
+ headers: {
15725
+ [name: string]: unknown;
15726
+ };
15727
+ content: {
15728
+ 'application/problem+json': components['schemas']['BadRequestProblemResponse'];
15729
+ };
15730
+ };
15731
+ /** @description The request has not been applied because it lacks valid authentication credentials for the target resource. */
15732
+ 401: {
15733
+ headers: {
15734
+ [name: string]: unknown;
15735
+ };
15736
+ content: {
15737
+ 'application/problem+json': components['schemas']['UnauthorizedProblemResponse'];
15738
+ };
15739
+ };
15740
+ /** @description The server understood the request but refuses to authorize it. */
15741
+ 403: {
15742
+ headers: {
15743
+ [name: string]: unknown;
15744
+ };
15745
+ content: {
15746
+ 'application/problem+json': components['schemas']['ForbiddenProblemResponse'];
15747
+ };
15748
+ };
15749
+ /** @description One or more conditions given in the request header fields evaluated to false when tested on the server. */
15750
+ 412: {
15751
+ headers: {
15752
+ [name: string]: unknown;
15753
+ };
15754
+ content: {
15755
+ 'application/problem+json': components['schemas']['PreconditionFailedProblemResponse'];
15756
+ };
15757
+ };
15758
+ /** @description The server encountered an unexpected condition that prevented it from fulfilling the request. */
15759
+ 500: {
15760
+ headers: {
15761
+ [name: string]: unknown;
15762
+ };
15763
+ content: {
15764
+ 'application/problem+json': components['schemas']['InternalServerErrorProblemResponse'];
15765
+ };
15766
+ };
15767
+ /** @description The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. */
15768
+ 503: {
15769
+ headers: {
15770
+ [name: string]: unknown;
15771
+ };
15772
+ content: {
15773
+ 'application/problem+json': components['schemas']['ServiceUnavailableProblemResponse'];
15774
+ };
15775
+ };
15776
+ /** @description An unexpected error response. */
15777
+ default: {
15778
+ headers: {
15779
+ [name: string]: unknown;
15780
+ };
15781
+ content: {
15782
+ 'application/problem+json': components['schemas']['UnexpectedProblemResponse'];
15783
+ };
15784
+ };
15785
+ };
15786
+ };
15787
+ createCustomerEntitlementGrant: {
15788
+ parameters: {
15789
+ query?: never;
15790
+ header?: never;
15791
+ path: {
15792
+ customerIdOrKey: components['schemas']['ULIDOrExternalKey'];
15793
+ featureKey: string;
15794
+ };
15795
+ cookie?: never;
15796
+ };
15797
+ requestBody: {
15798
+ content: {
15799
+ 'application/json': components['schemas']['EntitlementGrantCreateInput'];
15800
+ };
15801
+ };
15802
+ responses: {
15803
+ /** @description The request has succeeded and a new resource has been created as a result. */
15804
+ 201: {
15805
+ headers: {
15806
+ [name: string]: unknown;
15807
+ };
15808
+ content: {
15809
+ 'application/json': components['schemas']['EntitlementGrant'];
15810
+ };
15811
+ };
15812
+ /** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
15813
+ 400: {
15814
+ headers: {
15815
+ [name: string]: unknown;
15816
+ };
15817
+ content: {
15818
+ 'application/problem+json': components['schemas']['BadRequestProblemResponse'];
15819
+ };
15820
+ };
15821
+ /** @description The request has not been applied because it lacks valid authentication credentials for the target resource. */
15822
+ 401: {
15823
+ headers: {
15824
+ [name: string]: unknown;
15825
+ };
15826
+ content: {
15827
+ 'application/problem+json': components['schemas']['UnauthorizedProblemResponse'];
15828
+ };
15829
+ };
15830
+ /** @description The server understood the request but refuses to authorize it. */
15831
+ 403: {
15832
+ headers: {
15833
+ [name: string]: unknown;
15834
+ };
15835
+ content: {
15836
+ 'application/problem+json': components['schemas']['ForbiddenProblemResponse'];
15837
+ };
15838
+ };
15839
+ /** @description The request could not be completed due to a conflict with the current state of the target resource. */
15840
+ 409: {
15841
+ headers: {
15842
+ [name: string]: unknown;
15843
+ };
15844
+ content: {
15845
+ 'application/problem+json': components['schemas']['ConflictProblemResponse'];
15846
+ };
15847
+ };
15848
+ /** @description One or more conditions given in the request header fields evaluated to false when tested on the server. */
15849
+ 412: {
15850
+ headers: {
15851
+ [name: string]: unknown;
15852
+ };
15853
+ content: {
15854
+ 'application/problem+json': components['schemas']['PreconditionFailedProblemResponse'];
15855
+ };
15856
+ };
15857
+ /** @description The server encountered an unexpected condition that prevented it from fulfilling the request. */
15858
+ 500: {
15859
+ headers: {
15860
+ [name: string]: unknown;
15861
+ };
15862
+ content: {
15863
+ 'application/problem+json': components['schemas']['InternalServerErrorProblemResponse'];
15864
+ };
15865
+ };
15866
+ /** @description The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. */
15867
+ 503: {
15868
+ headers: {
15869
+ [name: string]: unknown;
15870
+ };
15871
+ content: {
15872
+ 'application/problem+json': components['schemas']['ServiceUnavailableProblemResponse'];
15873
+ };
15874
+ };
15875
+ /** @description An unexpected error response. */
15876
+ default: {
15877
+ headers: {
15878
+ [name: string]: unknown;
15879
+ };
15880
+ content: {
15881
+ 'application/problem+json': components['schemas']['UnexpectedProblemResponse'];
15882
+ };
15883
+ };
15884
+ };
15885
+ };
15886
+ getCustomerEntitlementHistory: {
15887
+ parameters: {
15888
+ query: {
15889
+ /** @description Start of time range to query entitlement: date-time in RFC 3339 format. Defaults to the last reset. Gets truncated to the granularity of the underlying meter. */
15890
+ from?: Date | string;
15891
+ /** @description End of time range to query entitlement: date-time in RFC 3339 format. Defaults to now.
15892
+ * If not now then gets truncated to the granularity of the underlying meter. */
15893
+ to?: Date | string;
15894
+ /** @description Windowsize */
15895
+ windowSize: components['schemas']['WindowSize'];
15896
+ /** @description The timezone used when calculating the windows. */
15897
+ windowTimeZone?: string;
15898
+ };
15899
+ header?: never;
15900
+ path: {
15901
+ customerIdOrKey: components['schemas']['ULIDOrExternalKey'];
15902
+ featureKey: string;
15903
+ };
15904
+ cookie?: never;
15905
+ };
15906
+ requestBody?: never;
15907
+ responses: {
15908
+ /** @description The request has succeeded. */
15909
+ 200: {
15910
+ headers: {
15911
+ [name: string]: unknown;
15912
+ };
15913
+ content: {
15914
+ 'application/json': components['schemas']['WindowedBalanceHistory'];
15915
+ };
15916
+ };
15917
+ /** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
15918
+ 400: {
15919
+ headers: {
15920
+ [name: string]: unknown;
15921
+ };
15922
+ content: {
15923
+ 'application/problem+json': components['schemas']['BadRequestProblemResponse'];
15924
+ };
15925
+ };
15926
+ /** @description The request has not been applied because it lacks valid authentication credentials for the target resource. */
15927
+ 401: {
15928
+ headers: {
15929
+ [name: string]: unknown;
15930
+ };
15931
+ content: {
15932
+ 'application/problem+json': components['schemas']['UnauthorizedProblemResponse'];
15933
+ };
15934
+ };
15935
+ /** @description The server understood the request but refuses to authorize it. */
15936
+ 403: {
15937
+ headers: {
15938
+ [name: string]: unknown;
15939
+ };
15940
+ content: {
15941
+ 'application/problem+json': components['schemas']['ForbiddenProblemResponse'];
15942
+ };
15943
+ };
15944
+ /** @description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. */
15945
+ 404: {
15946
+ headers: {
15947
+ [name: string]: unknown;
15948
+ };
15949
+ content: {
15950
+ 'application/problem+json': components['schemas']['NotFoundProblemResponse'];
15951
+ };
15952
+ };
15953
+ /** @description One or more conditions given in the request header fields evaluated to false when tested on the server. */
15954
+ 412: {
15955
+ headers: {
15956
+ [name: string]: unknown;
15957
+ };
15958
+ content: {
15959
+ 'application/problem+json': components['schemas']['PreconditionFailedProblemResponse'];
15960
+ };
15961
+ };
15962
+ /** @description The server encountered an unexpected condition that prevented it from fulfilling the request. */
15963
+ 500: {
15964
+ headers: {
15965
+ [name: string]: unknown;
15966
+ };
15967
+ content: {
15968
+ 'application/problem+json': components['schemas']['InternalServerErrorProblemResponse'];
15969
+ };
15970
+ };
15971
+ /** @description The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. */
15972
+ 503: {
15973
+ headers: {
15974
+ [name: string]: unknown;
15975
+ };
15976
+ content: {
15977
+ 'application/problem+json': components['schemas']['ServiceUnavailableProblemResponse'];
15978
+ };
15979
+ };
15980
+ /** @description An unexpected error response. */
15981
+ default: {
15982
+ headers: {
15983
+ [name: string]: unknown;
15984
+ };
15985
+ content: {
15986
+ 'application/problem+json': components['schemas']['UnexpectedProblemResponse'];
15987
+ };
15988
+ };
15989
+ };
15990
+ };
15991
+ overrideCustomerEntitlement: {
15992
+ parameters: {
15993
+ query?: never;
15994
+ header?: never;
15995
+ path: {
15996
+ customerIdOrKey: components['schemas']['ULIDOrExternalKey'];
15997
+ featureKey: string;
15998
+ };
15999
+ cookie?: never;
16000
+ };
16001
+ requestBody: {
16002
+ content: {
16003
+ 'application/json': components['schemas']['EntitlementCreateInputs'];
16004
+ };
16005
+ };
16006
+ responses: {
16007
+ /** @description The request has succeeded and a new resource has been created as a result. */
16008
+ 201: {
16009
+ headers: {
16010
+ [name: string]: unknown;
16011
+ };
16012
+ content: {
16013
+ 'application/json': components['schemas']['Entitlement'];
16014
+ };
16015
+ };
16016
+ /** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
16017
+ 400: {
16018
+ headers: {
16019
+ [name: string]: unknown;
16020
+ };
16021
+ content: {
16022
+ 'application/problem+json': components['schemas']['BadRequestProblemResponse'];
16023
+ };
16024
+ };
16025
+ /** @description The request has not been applied because it lacks valid authentication credentials for the target resource. */
16026
+ 401: {
16027
+ headers: {
16028
+ [name: string]: unknown;
16029
+ };
16030
+ content: {
16031
+ 'application/problem+json': components['schemas']['UnauthorizedProblemResponse'];
16032
+ };
16033
+ };
16034
+ /** @description The server understood the request but refuses to authorize it. */
16035
+ 403: {
16036
+ headers: {
16037
+ [name: string]: unknown;
16038
+ };
16039
+ content: {
16040
+ 'application/problem+json': components['schemas']['ForbiddenProblemResponse'];
16041
+ };
16042
+ };
16043
+ /** @description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. */
16044
+ 404: {
16045
+ headers: {
16046
+ [name: string]: unknown;
16047
+ };
16048
+ content: {
16049
+ 'application/problem+json': components['schemas']['NotFoundProblemResponse'];
16050
+ };
16051
+ };
16052
+ /** @description The request could not be completed due to a conflict with the current state of the target resource. */
16053
+ 409: {
16054
+ headers: {
16055
+ [name: string]: unknown;
16056
+ };
16057
+ content: {
16058
+ 'application/problem+json': components['schemas']['ConflictProblemResponse'];
16059
+ };
16060
+ };
16061
+ /** @description One or more conditions given in the request header fields evaluated to false when tested on the server. */
16062
+ 412: {
16063
+ headers: {
16064
+ [name: string]: unknown;
16065
+ };
16066
+ content: {
16067
+ 'application/problem+json': components['schemas']['PreconditionFailedProblemResponse'];
16068
+ };
16069
+ };
16070
+ /** @description The server encountered an unexpected condition that prevented it from fulfilling the request. */
16071
+ 500: {
16072
+ headers: {
16073
+ [name: string]: unknown;
16074
+ };
16075
+ content: {
16076
+ 'application/problem+json': components['schemas']['InternalServerErrorProblemResponse'];
16077
+ };
16078
+ };
16079
+ /** @description The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. */
16080
+ 503: {
16081
+ headers: {
16082
+ [name: string]: unknown;
16083
+ };
16084
+ content: {
16085
+ 'application/problem+json': components['schemas']['ServiceUnavailableProblemResponse'];
16086
+ };
16087
+ };
16088
+ /** @description An unexpected error response. */
16089
+ default: {
16090
+ headers: {
16091
+ [name: string]: unknown;
16092
+ };
16093
+ content: {
16094
+ 'application/problem+json': components['schemas']['UnexpectedProblemResponse'];
16095
+ };
16096
+ };
16097
+ };
16098
+ };
16099
+ resetCustomerEntitlementUsage: {
16100
+ parameters: {
16101
+ query?: never;
16102
+ header?: never;
16103
+ path: {
16104
+ customerIdOrKey: components['schemas']['ULIDOrExternalKey'];
16105
+ featureKey: string;
16106
+ };
16107
+ cookie?: never;
16108
+ };
16109
+ requestBody: {
16110
+ content: {
16111
+ 'application/json': components['schemas']['ResetEntitlementUsageInput'];
16112
+ };
16113
+ };
16114
+ responses: {
16115
+ /** @description There is no content to send for this request, but the headers may be useful. */
16116
+ 204: {
16117
+ headers: {
16118
+ [name: string]: unknown;
16119
+ };
16120
+ content?: never;
16121
+ };
16122
+ /** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
16123
+ 400: {
16124
+ headers: {
16125
+ [name: string]: unknown;
16126
+ };
16127
+ content: {
16128
+ 'application/problem+json': components['schemas']['BadRequestProblemResponse'];
16129
+ };
16130
+ };
16131
+ /** @description The request has not been applied because it lacks valid authentication credentials for the target resource. */
16132
+ 401: {
16133
+ headers: {
16134
+ [name: string]: unknown;
16135
+ };
16136
+ content: {
16137
+ 'application/problem+json': components['schemas']['UnauthorizedProblemResponse'];
16138
+ };
16139
+ };
16140
+ /** @description The server understood the request but refuses to authorize it. */
16141
+ 403: {
16142
+ headers: {
16143
+ [name: string]: unknown;
16144
+ };
16145
+ content: {
16146
+ 'application/problem+json': components['schemas']['ForbiddenProblemResponse'];
16147
+ };
16148
+ };
16149
+ /** @description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. */
16150
+ 404: {
16151
+ headers: {
16152
+ [name: string]: unknown;
16153
+ };
16154
+ content: {
16155
+ 'application/problem+json': components['schemas']['NotFoundProblemResponse'];
16156
+ };
16157
+ };
16158
+ /** @description One or more conditions given in the request header fields evaluated to false when tested on the server. */
16159
+ 412: {
16160
+ headers: {
16161
+ [name: string]: unknown;
16162
+ };
16163
+ content: {
16164
+ 'application/problem+json': components['schemas']['PreconditionFailedProblemResponse'];
16165
+ };
16166
+ };
16167
+ /** @description The server encountered an unexpected condition that prevented it from fulfilling the request. */
16168
+ 500: {
16169
+ headers: {
16170
+ [name: string]: unknown;
16171
+ };
16172
+ content: {
16173
+ 'application/problem+json': components['schemas']['InternalServerErrorProblemResponse'];
16174
+ };
16175
+ };
16176
+ /** @description The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. */
16177
+ 503: {
16178
+ headers: {
16179
+ [name: string]: unknown;
16180
+ };
16181
+ content: {
16182
+ 'application/problem+json': components['schemas']['ServiceUnavailableProblemResponse'];
16183
+ };
16184
+ };
16185
+ /** @description An unexpected error response. */
16186
+ default: {
16187
+ headers: {
16188
+ [name: string]: unknown;
16189
+ };
16190
+ content: {
16191
+ 'application/problem+json': components['schemas']['UnexpectedProblemResponse'];
16192
+ };
16193
+ };
16194
+ };
16195
+ };
15166
16196
  getCustomerEntitlementValue: {
15167
16197
  parameters: {
15168
16198
  query?: {