@schematichq/schematic-typescript-node 1.5.6 → 1.5.8

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.
Files changed (128) hide show
  1. package/dist/api/resources/accounts/client/requests/CreateApiKeyRequestBody.d.ts +1 -0
  2. package/dist/api/resources/accounts/client/requests/UpdateApiKeyRequestBody.d.ts +1 -0
  3. package/dist/api/resources/billing/client/Client.d.ts +2 -0
  4. package/dist/api/resources/billing/client/requests/ListBillingPricesRequest.d.ts +3 -0
  5. package/dist/api/resources/billing/client/requests/ListBillingProductPricesRequest.d.ts +3 -0
  6. package/dist/api/resources/billing/types/ListBillingPricesParams.d.ts +2 -0
  7. package/dist/api/resources/billing/types/ListBillingProductPricesParams.d.ts +2 -0
  8. package/dist/api/resources/catalogs/client/Client.d.ts +0 -1
  9. package/dist/api/resources/catalogs/client/requests/CreateCatalogRequestBody.d.ts +0 -2
  10. package/dist/api/resources/checkout/client/requests/UpdateCompanyBillingDetailsRequestBody.d.ts +1 -0
  11. package/dist/api/resources/companies/client/Client.d.ts +35 -0
  12. package/dist/api/resources/companies/client/requests/CountEntityKeysRequest.d.ts +18 -0
  13. package/dist/api/resources/companies/client/requests/index.d.ts +1 -0
  14. package/dist/api/resources/companies/types/CountEntityKeysParams.d.ts +12 -0
  15. package/dist/api/resources/companies/types/CountEntityKeysResponse.d.ts +6 -0
  16. package/dist/api/resources/companies/types/DeleteEntityKeyDefinitionResponse.d.ts +6 -0
  17. package/dist/api/resources/companies/types/index.d.ts +3 -0
  18. package/dist/api/resources/entitlements/client/Client.d.ts +38 -0
  19. package/dist/api/resources/entitlements/client/requests/GetUserUsageByCompanyRequest.d.ts +19 -0
  20. package/dist/api/resources/entitlements/client/requests/GetUserUsageDetailRequest.d.ts +19 -0
  21. package/dist/api/resources/entitlements/client/requests/index.d.ts +2 -0
  22. package/dist/api/resources/entitlements/types/GetUserUsageByCompanyParams.d.ts +13 -0
  23. package/dist/api/resources/entitlements/types/GetUserUsageByCompanyResponse.d.ts +6 -0
  24. package/dist/api/resources/entitlements/types/GetUserUsageDetailParams.d.ts +13 -0
  25. package/dist/api/resources/entitlements/types/GetUserUsageDetailResponse.d.ts +6 -0
  26. package/dist/api/resources/entitlements/types/index.d.ts +4 -0
  27. package/dist/api/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +6 -0
  28. package/dist/api/resources/plans/client/requests/RetryCustomPlanBillingRequestBody.d.ts +2 -0
  29. package/dist/api/types/ApiKeyCreateResponseData.d.ts +1 -0
  30. package/dist/api/types/ApiKeyResponseData.d.ts +1 -0
  31. package/dist/api/types/BillingCreditView.d.ts +1 -1
  32. package/dist/api/types/BillingPlanCreditGrantResponseData.d.ts +4 -0
  33. package/dist/api/types/BillingProductRecordResponseData.d.ts +12 -0
  34. package/dist/api/types/CatalogConfigOrderedEntitlement.d.ts +1 -1
  35. package/dist/api/types/CatalogConfigOrderedEntitlementResponseData.d.ts +1 -1
  36. package/dist/api/types/CatalogResponseData.d.ts +0 -1
  37. package/dist/api/types/CompanyBillingDetailsResponseData.d.ts +1 -0
  38. package/dist/api/types/CompanyBillingDetailsView.d.ts +1 -0
  39. package/dist/api/types/CompanyFeatureUsageExportMetadata.d.ts +9 -2
  40. package/dist/api/types/CompanyFeatureUsageExportMetadataSortOrderDirection.d.ts +6 -0
  41. package/dist/api/types/CompanyFeatureUsageExportMetadataVisibleColumnsItem.d.ts +7 -0
  42. package/dist/api/types/CompanyPlanCreditGrantView.d.ts +2 -0
  43. package/dist/api/types/CompanyPlanDetailResponseData.d.ts +2 -2
  44. package/dist/api/types/CompanyTaxIdView.d.ts +7 -0
  45. package/dist/api/types/ComponentCheckoutSettings.d.ts +2 -0
  46. package/dist/api/types/CreateBillingPlanCreditGrantRequestBody.d.ts +4 -0
  47. package/dist/api/types/CustomPlanBillingResponseData.d.ts +1 -0
  48. package/dist/api/types/DataExportMetadata.d.ts +4 -1
  49. package/dist/api/types/DataExportType.d.ts +1 -0
  50. package/dist/api/types/EventExportMetadata.d.ts +19 -0
  51. package/dist/api/types/EventExportMetadataEventTypesItem.d.ts +7 -0
  52. package/dist/api/types/FeatureView.d.ts +1 -1
  53. package/dist/api/types/PlanCreditGrantScaling.d.ts +5 -0
  54. package/dist/api/types/PlanCreditGrantView.d.ts +2 -0
  55. package/dist/api/types/PlanDetailResponseData.d.ts +2 -2
  56. package/dist/api/types/PlanGroupPlanDetailResponseData.d.ts +2 -2
  57. package/dist/api/types/PlanViewPublicResponseData.d.ts +2 -2
  58. package/dist/api/types/TaxIdInput.d.ts +5 -0
  59. package/dist/api/types/TaxIdType.d.ts +41 -0
  60. package/dist/api/types/TestWebhookResponseData.d.ts +1 -0
  61. package/dist/api/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +4 -0
  62. package/dist/api/types/UserCreditUsageResponseData.d.ts +14 -0
  63. package/dist/api/types/UserDailyCreditPointResponseData.d.ts +6 -0
  64. package/dist/api/types/UserDailyUsagePointResponseData.d.ts +8 -0
  65. package/dist/api/types/UserFeatureUsageResponseData.d.ts +14 -0
  66. package/dist/api/types/UserUsageByCompanyResponseData.d.ts +11 -0
  67. package/dist/api/types/UserUsageDetailResponseData.d.ts +16 -0
  68. package/dist/api/types/index.d.ts +15 -0
  69. package/dist/index.js +9 -9
  70. package/dist/serialization/resources/accounts/client/requests/CreateApiKeyRequestBody.d.ts +1 -0
  71. package/dist/serialization/resources/accounts/client/requests/UpdateApiKeyRequestBody.d.ts +1 -0
  72. package/dist/serialization/resources/billing/types/ListBillingPricesParams.d.ts +1 -0
  73. package/dist/serialization/resources/billing/types/ListBillingProductPricesParams.d.ts +1 -0
  74. package/dist/serialization/resources/catalogs/client/requests/CreateCatalogRequestBody.d.ts +0 -1
  75. package/dist/serialization/resources/checkout/client/requests/UpdateCompanyBillingDetailsRequestBody.d.ts +2 -0
  76. package/dist/serialization/resources/companies/types/CountEntityKeysParams.d.ts +13 -0
  77. package/dist/serialization/resources/companies/types/CountEntityKeysResponse.d.ts +12 -0
  78. package/dist/serialization/resources/companies/types/DeleteEntityKeyDefinitionResponse.d.ts +11 -0
  79. package/dist/serialization/resources/companies/types/index.d.ts +3 -0
  80. package/dist/serialization/resources/entitlements/types/GetUserUsageByCompanyParams.d.ts +12 -0
  81. package/dist/serialization/resources/entitlements/types/GetUserUsageByCompanyResponse.d.ts +12 -0
  82. package/dist/serialization/resources/entitlements/types/GetUserUsageDetailParams.d.ts +12 -0
  83. package/dist/serialization/resources/entitlements/types/GetUserUsageDetailResponse.d.ts +12 -0
  84. package/dist/serialization/resources/entitlements/types/index.d.ts +4 -0
  85. package/dist/serialization/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +8 -0
  86. package/dist/serialization/resources/plans/client/requests/RetryCustomPlanBillingRequestBody.d.ts +1 -0
  87. package/dist/serialization/types/ApiKeyCreateResponseData.d.ts +1 -0
  88. package/dist/serialization/types/ApiKeyResponseData.d.ts +1 -0
  89. package/dist/serialization/types/BillingCreditView.d.ts +2 -2
  90. package/dist/serialization/types/BillingPlanCreditGrantResponseData.d.ts +3 -0
  91. package/dist/serialization/types/BillingProductRecordResponseData.d.ts +18 -0
  92. package/dist/serialization/types/CatalogConfigOrderedEntitlement.d.ts +1 -1
  93. package/dist/serialization/types/CatalogConfigOrderedEntitlementResponseData.d.ts +1 -1
  94. package/dist/serialization/types/CatalogResponseData.d.ts +0 -1
  95. package/dist/serialization/types/CompanyBillingDetailsResponseData.d.ts +2 -0
  96. package/dist/serialization/types/CompanyBillingDetailsView.d.ts +2 -0
  97. package/dist/serialization/types/CompanyFeatureUsageExportMetadata.d.ts +6 -1
  98. package/dist/serialization/types/CompanyFeatureUsageExportMetadataSortOrderDirection.d.ts +7 -0
  99. package/dist/serialization/types/CompanyFeatureUsageExportMetadataVisibleColumnsItem.d.ts +7 -0
  100. package/dist/serialization/types/CompanyPlanCreditGrantView.d.ts +3 -0
  101. package/dist/serialization/types/CompanyPlanDetailResponseData.d.ts +1 -1
  102. package/dist/serialization/types/CompanyTaxIdView.d.ts +13 -0
  103. package/dist/serialization/types/ComponentCheckoutSettings.d.ts +2 -0
  104. package/dist/serialization/types/CreateBillingPlanCreditGrantRequestBody.d.ts +3 -0
  105. package/dist/serialization/types/CustomPlanBillingResponseData.d.ts +1 -0
  106. package/dist/serialization/types/DataExportMetadata.d.ts +5 -1
  107. package/dist/serialization/types/DataExportType.d.ts +1 -1
  108. package/dist/serialization/types/EventExportMetadata.d.ts +17 -0
  109. package/dist/serialization/types/EventExportMetadataEventTypesItem.d.ts +7 -0
  110. package/dist/serialization/types/FeatureView.d.ts +2 -2
  111. package/dist/serialization/types/PlanCreditGrantScaling.d.ts +7 -0
  112. package/dist/serialization/types/PlanCreditGrantView.d.ts +3 -0
  113. package/dist/serialization/types/PlanDetailResponseData.d.ts +1 -1
  114. package/dist/serialization/types/PlanGroupPlanDetailResponseData.d.ts +1 -1
  115. package/dist/serialization/types/PlanViewPublicResponseData.d.ts +1 -1
  116. package/dist/serialization/types/TaxIdInput.d.ts +11 -0
  117. package/dist/serialization/types/TaxIdType.d.ts +7 -0
  118. package/dist/serialization/types/TestWebhookResponseData.d.ts +1 -0
  119. package/dist/serialization/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +3 -0
  120. package/dist/serialization/types/UserCreditUsageResponseData.d.ts +15 -0
  121. package/dist/serialization/types/UserDailyCreditPointResponseData.d.ts +10 -0
  122. package/dist/serialization/types/UserDailyUsagePointResponseData.d.ts +12 -0
  123. package/dist/serialization/types/UserFeatureUsageResponseData.d.ts +16 -0
  124. package/dist/serialization/types/UserUsageByCompanyResponseData.d.ts +14 -0
  125. package/dist/serialization/types/UserUsageDetailResponseData.d.ts +20 -0
  126. package/dist/serialization/types/index.d.ts +15 -0
  127. package/dist/wasm/rulesengine.js +1 -1
  128. package/package.json +1 -1
@@ -8,5 +8,6 @@ export interface CreateApiKeyRequestBody {
8
8
  description?: string;
9
9
  environmentId?: string;
10
10
  name: string;
11
+ rateLimitPercent?: number;
11
12
  readonly?: boolean;
12
13
  }
@@ -5,4 +5,5 @@
5
5
  export interface UpdateApiKeyRequestBody {
6
6
  description?: string;
7
7
  name?: string;
8
+ rateLimitPercent?: number;
8
9
  }
@@ -319,6 +319,7 @@ export declare class BillingClient {
319
319
  * forTrialExpiryPlan: true,
320
320
  * ids: ["ids"],
321
321
  * interval: "interval",
322
+ * intervalCount: 1000000,
322
323
  * isActive: true,
323
324
  * planVersionId: "plan_version_id",
324
325
  * price: 1000000,
@@ -395,6 +396,7 @@ export declare class BillingClient {
395
396
  * forTrialExpiryPlan: true,
396
397
  * ids: ["ids"],
397
398
  * interval: "interval",
399
+ * intervalCount: 1000000,
398
400
  * isActive: true,
399
401
  * planVersionId: "plan_version_id",
400
402
  * price: 1000000,
@@ -7,6 +7,7 @@ import type * as Schematic from "../../../../index";
7
7
  * forTrialExpiryPlan: true,
8
8
  * ids: ["ids"],
9
9
  * interval: "interval",
10
+ * intervalCount: 1000000,
10
11
  * isActive: true,
11
12
  * planVersionId: "plan_version_id",
12
13
  * price: 1000000,
@@ -30,6 +31,8 @@ export interface ListBillingPricesRequest {
30
31
  forTrialExpiryPlan?: boolean;
31
32
  ids?: string | string[];
32
33
  interval?: string;
34
+ /** Filter for prices billed every N intervals; combine with interval (e.g. interval=month, interval_count=3 for quarterly) */
35
+ intervalCount?: number;
33
36
  /** Filter for active prices on active products (defaults to true if not specified) */
34
37
  isActive?: boolean;
35
38
  /** Filter for prices belonging to a specific plan version (e.g. the latest published version) */
@@ -7,6 +7,7 @@ import type * as Schematic from "../../../../index";
7
7
  * forTrialExpiryPlan: true,
8
8
  * ids: ["ids"],
9
9
  * interval: "interval",
10
+ * intervalCount: 1000000,
10
11
  * isActive: true,
11
12
  * planVersionId: "plan_version_id",
12
13
  * price: 1000000,
@@ -30,6 +31,8 @@ export interface ListBillingProductPricesRequest {
30
31
  forTrialExpiryPlan?: boolean;
31
32
  ids?: string | string[];
32
33
  interval?: string;
34
+ /** Filter for prices billed every N intervals; combine with interval (e.g. interval=month, interval_count=3 for quarterly) */
35
+ intervalCount?: number;
33
36
  /** Filter for active prices on active products (defaults to true if not specified) */
34
37
  isActive?: boolean;
35
38
  /** Filter for prices belonging to a specific plan version (e.g. the latest published version) */
@@ -11,6 +11,8 @@ export interface ListBillingPricesParams {
11
11
  forTrialExpiryPlan?: boolean;
12
12
  ids?: string[];
13
13
  interval?: string;
14
+ /** Filter for prices billed every N intervals; combine with interval (e.g. interval=month, interval_count=3 for quarterly) */
15
+ intervalCount?: number;
14
16
  /** Filter for active prices on active products (defaults to true if not specified) */
15
17
  isActive?: boolean;
16
18
  /** Page limit (default 100) */
@@ -11,6 +11,8 @@ export interface ListBillingProductPricesParams {
11
11
  forTrialExpiryPlan?: boolean;
12
12
  ids?: string[];
13
13
  interval?: string;
14
+ /** Filter for prices billed every N intervals; combine with interval (e.g. interval=month, interval_count=3 for quarterly) */
15
+ intervalCount?: number;
14
16
  /** Filter for active prices on active products (defaults to true if not specified) */
15
17
  isActive?: boolean;
16
18
  /** Page limit (default 100) */
@@ -42,7 +42,6 @@ export declare class CatalogsClient {
42
42
  *
43
43
  * @example
44
44
  * await client.catalogs.createCatalog({
45
- * isDefault: true,
46
45
  * name: "name"
47
46
  * })
48
47
  */
@@ -1,12 +1,10 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
- * isDefault: true,
5
4
  * name: "name"
6
5
  * }
7
6
  */
8
7
  export interface CreateCatalogRequestBody {
9
8
  description?: string;
10
- isDefault: boolean;
11
9
  name: string;
12
10
  }
@@ -12,5 +12,6 @@ export interface UpdateCompanyBillingDetailsRequestBody {
12
12
  address?: Schematic.CustomerBillingAddress;
13
13
  email?: string;
14
14
  phone?: string;
15
+ taxId?: Schematic.TaxIdInput;
15
16
  values: Schematic.CheckoutFieldValue[];
16
17
  }
@@ -344,6 +344,21 @@ export declare class CompaniesClient {
344
344
  */
345
345
  listEntityKeyDefinitions(request?: Schematic.ListEntityKeyDefinitionsRequest, requestOptions?: CompaniesClient.RequestOptions): core.HttpResponsePromise<Schematic.ListEntityKeyDefinitionsResponse>;
346
346
  private __listEntityKeyDefinitions;
347
+ /**
348
+ * @param {string} entity_key_definition_id - entity_key_definition_id
349
+ * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
350
+ *
351
+ * @throws {@link Schematic.BadRequestError}
352
+ * @throws {@link Schematic.UnauthorizedError}
353
+ * @throws {@link Schematic.ForbiddenError}
354
+ * @throws {@link Schematic.NotFoundError}
355
+ * @throws {@link Schematic.InternalServerError}
356
+ *
357
+ * @example
358
+ * await client.companies.deleteEntityKeyDefinition("entity_key_definition_id")
359
+ */
360
+ deleteEntityKeyDefinition(entity_key_definition_id: string, requestOptions?: CompaniesClient.RequestOptions): core.HttpResponsePromise<Schematic.DeleteEntityKeyDefinitionResponse>;
361
+ private __deleteEntityKeyDefinition;
347
362
  /**
348
363
  * @param {Schematic.CountEntityKeyDefinitionsRequest} request
349
364
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -365,6 +380,26 @@ export declare class CompaniesClient {
365
380
  */
366
381
  countEntityKeyDefinitions(request?: Schematic.CountEntityKeyDefinitionsRequest, requestOptions?: CompaniesClient.RequestOptions): core.HttpResponsePromise<Schematic.CountEntityKeyDefinitionsResponse>;
367
382
  private __countEntityKeyDefinitions;
383
+ /**
384
+ * @param {Schematic.CountEntityKeysRequest} request
385
+ * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
386
+ *
387
+ * @throws {@link Schematic.BadRequestError}
388
+ * @throws {@link Schematic.UnauthorizedError}
389
+ * @throws {@link Schematic.ForbiddenError}
390
+ * @throws {@link Schematic.NotFoundError}
391
+ * @throws {@link Schematic.InternalServerError}
392
+ *
393
+ * @example
394
+ * await client.companies.countEntityKeys({
395
+ * definitionId: "definition_id",
396
+ * entityType: "company",
397
+ * limit: 1000000,
398
+ * offset: 1000000
399
+ * })
400
+ */
401
+ countEntityKeys(request?: Schematic.CountEntityKeysRequest, requestOptions?: CompaniesClient.RequestOptions): core.HttpResponsePromise<Schematic.CountEntityKeysResponse>;
402
+ private __countEntityKeys;
368
403
  /**
369
404
  * @param {Schematic.ListEntityTraitDefinitionsRequest} request
370
405
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -0,0 +1,18 @@
1
+ import type * as Schematic from "../../../../index";
2
+ /**
3
+ * @example
4
+ * {
5
+ * definitionId: "definition_id",
6
+ * entityType: "company",
7
+ * limit: 1000000,
8
+ * offset: 1000000
9
+ * }
10
+ */
11
+ export interface CountEntityKeysRequest {
12
+ definitionId?: string;
13
+ entityType?: Schematic.EntityType;
14
+ /** Page limit (default 100) */
15
+ limit?: number;
16
+ /** Page offset (default 0) */
17
+ offset?: number;
18
+ }
@@ -1,5 +1,6 @@
1
1
  export type { CountCompaniesRequest } from "./CountCompaniesRequest";
2
2
  export type { CountEntityKeyDefinitionsRequest } from "./CountEntityKeyDefinitionsRequest";
3
+ export type { CountEntityKeysRequest } from "./CountEntityKeysRequest";
3
4
  export type { CountEntityTraitDefinitionsRequest } from "./CountEntityTraitDefinitionsRequest";
4
5
  export type { CountPlanTraitsRequest } from "./CountPlanTraitsRequest";
5
6
  export type { CountUsersRequest } from "./CountUsersRequest";
@@ -0,0 +1,12 @@
1
+ import type * as Schematic from "../../../index";
2
+ /**
3
+ * Input parameters
4
+ */
5
+ export interface CountEntityKeysParams {
6
+ definitionId?: string;
7
+ entityType?: Schematic.EntityType;
8
+ /** Page limit (default 100) */
9
+ limit?: number;
10
+ /** Page offset (default 0) */
11
+ offset?: number;
12
+ }
@@ -0,0 +1,6 @@
1
+ import type * as Schematic from "../../../index";
2
+ export interface CountEntityKeysResponse {
3
+ data: Schematic.CountResponse;
4
+ /** Input parameters */
5
+ params: Schematic.CountEntityKeysParams;
6
+ }
@@ -0,0 +1,6 @@
1
+ import type * as Schematic from "../../../index";
2
+ export interface DeleteEntityKeyDefinitionResponse {
3
+ data: Schematic.DeleteResponse;
4
+ /** Input parameters */
5
+ params: Record<string, unknown>;
6
+ }
@@ -2,6 +2,8 @@ export * from "./CountCompaniesParams";
2
2
  export * from "./CountCompaniesResponse";
3
3
  export * from "./CountEntityKeyDefinitionsParams";
4
4
  export * from "./CountEntityKeyDefinitionsResponse";
5
+ export * from "./CountEntityKeysParams";
6
+ export * from "./CountEntityKeysResponse";
5
7
  export * from "./CountEntityTraitDefinitionsParams";
6
8
  export * from "./CountEntityTraitDefinitionsResponse";
7
9
  export * from "./CountPlanTraitsParams";
@@ -14,6 +16,7 @@ export * from "./DeleteCompanyByKeysResponse";
14
16
  export * from "./DeleteCompanyMembershipResponse";
15
17
  export * from "./DeleteCompanyParams";
16
18
  export * from "./DeleteCompanyResponse";
19
+ export * from "./DeleteEntityKeyDefinitionResponse";
17
20
  export * from "./DeleteUserByKeysResponse";
18
21
  export * from "./DeleteUserResponse";
19
22
  export * from "./GetActiveCompanySubscriptionParams";
@@ -451,4 +451,42 @@ export declare class EntitlementsClient {
451
451
  */
452
452
  getFeatureUsageByCompany(request: Schematic.GetFeatureUsageByCompanyRequest, requestOptions?: EntitlementsClient.RequestOptions): core.HttpResponsePromise<Schematic.GetFeatureUsageByCompanyResponse>;
453
453
  private __getFeatureUsageByCompany;
454
+ /**
455
+ * @param {Schematic.GetUserUsageByCompanyRequest} request
456
+ * @param {EntitlementsClient.RequestOptions} requestOptions - Request-specific configuration.
457
+ *
458
+ * @throws {@link Schematic.UnauthorizedError}
459
+ * @throws {@link Schematic.ForbiddenError}
460
+ * @throws {@link Schematic.NotFoundError}
461
+ * @throws {@link Schematic.InternalServerError}
462
+ *
463
+ * @example
464
+ * await client.entitlements.getUserUsageByCompany({
465
+ * companyId: "company_id",
466
+ * endTime: new Date("2024-01-15T09:30:00.000Z"),
467
+ * featureId: "feature_id",
468
+ * startTime: new Date("2024-01-15T09:30:00.000Z")
469
+ * })
470
+ */
471
+ getUserUsageByCompany(request: Schematic.GetUserUsageByCompanyRequest, requestOptions?: EntitlementsClient.RequestOptions): core.HttpResponsePromise<Schematic.GetUserUsageByCompanyResponse>;
472
+ private __getUserUsageByCompany;
473
+ /**
474
+ * @param {Schematic.GetUserUsageDetailRequest} request
475
+ * @param {EntitlementsClient.RequestOptions} requestOptions - Request-specific configuration.
476
+ *
477
+ * @throws {@link Schematic.UnauthorizedError}
478
+ * @throws {@link Schematic.ForbiddenError}
479
+ * @throws {@link Schematic.NotFoundError}
480
+ * @throws {@link Schematic.InternalServerError}
481
+ *
482
+ * @example
483
+ * await client.entitlements.getUserUsageDetail({
484
+ * companyId: "company_id",
485
+ * endTime: new Date("2024-01-15T09:30:00.000Z"),
486
+ * startTime: new Date("2024-01-15T09:30:00.000Z"),
487
+ * userId: "user_id"
488
+ * })
489
+ */
490
+ getUserUsageDetail(request: Schematic.GetUserUsageDetailRequest, requestOptions?: EntitlementsClient.RequestOptions): core.HttpResponsePromise<Schematic.GetUserUsageDetailResponse>;
491
+ private __getUserUsageDetail;
454
492
  }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * companyId: "company_id",
5
+ * endTime: new Date("2024-01-15T09:30:00.000Z"),
6
+ * featureId: "feature_id",
7
+ * startTime: new Date("2024-01-15T09:30:00.000Z")
8
+ * }
9
+ */
10
+ export interface GetUserUsageByCompanyRequest {
11
+ /** Company to break usage down for */
12
+ companyId: string;
13
+ /** End of the usage window (exclusive); defaults to now */
14
+ endTime?: Date;
15
+ /** Restrict to a single event-based feature */
16
+ featureId?: string;
17
+ /** Start of the usage window; defaults to 30 days before the end */
18
+ startTime?: Date;
19
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * companyId: "company_id",
5
+ * endTime: new Date("2024-01-15T09:30:00.000Z"),
6
+ * startTime: new Date("2024-01-15T09:30:00.000Z"),
7
+ * userId: "user_id"
8
+ * }
9
+ */
10
+ export interface GetUserUsageDetailRequest {
11
+ /** Company the user belongs to */
12
+ companyId: string;
13
+ /** End of the usage window (exclusive); defaults to now */
14
+ endTime?: Date;
15
+ /** Start of the usage window; defaults to 30 days before the end */
16
+ startTime?: Date;
17
+ /** User to break usage down for */
18
+ userId: string;
19
+ }
@@ -9,6 +9,8 @@ export type { CreatePlanEntitlementRequestBody } from "./CreatePlanEntitlementRe
9
9
  export type { DuplicatePlanEntitlementsRequestBody } from "./DuplicatePlanEntitlementsRequestBody";
10
10
  export type { GetFeatureUsageByCompanyRequest } from "./GetFeatureUsageByCompanyRequest";
11
11
  export type { GetFeatureUsageTimeSeriesRequest } from "./GetFeatureUsageTimeSeriesRequest";
12
+ export type { GetUserUsageByCompanyRequest } from "./GetUserUsageByCompanyRequest";
13
+ export type { GetUserUsageDetailRequest } from "./GetUserUsageDetailRequest";
12
14
  export type { ListCompanyOverridesRequest } from "./ListCompanyOverridesRequest";
13
15
  export type { ListFeatureCompaniesRequest } from "./ListFeatureCompaniesRequest";
14
16
  export type { ListFeatureUsageRequest } from "./ListFeatureUsageRequest";
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Input parameters
3
+ */
4
+ export interface GetUserUsageByCompanyParams {
5
+ /** Company to break usage down for */
6
+ companyId?: string;
7
+ /** End of the usage window (exclusive); defaults to now */
8
+ endTime?: Date;
9
+ /** Restrict to a single event-based feature */
10
+ featureId?: string;
11
+ /** Start of the usage window; defaults to 30 days before the end */
12
+ startTime?: Date;
13
+ }
@@ -0,0 +1,6 @@
1
+ import type * as Schematic from "../../../index";
2
+ export interface GetUserUsageByCompanyResponse {
3
+ data: Schematic.UserUsageByCompanyResponseData;
4
+ /** Input parameters */
5
+ params: Schematic.GetUserUsageByCompanyParams;
6
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Input parameters
3
+ */
4
+ export interface GetUserUsageDetailParams {
5
+ /** Company the user belongs to */
6
+ companyId?: string;
7
+ /** End of the usage window (exclusive); defaults to now */
8
+ endTime?: Date;
9
+ /** Start of the usage window; defaults to 30 days before the end */
10
+ startTime?: Date;
11
+ /** User to break usage down for */
12
+ userId?: string;
13
+ }
@@ -0,0 +1,6 @@
1
+ import type * as Schematic from "../../../index";
2
+ export interface GetUserUsageDetailResponse {
3
+ data: Schematic.UserUsageDetailResponseData;
4
+ /** Input parameters */
5
+ params: Schematic.GetUserUsageDetailParams;
6
+ }
@@ -19,6 +19,10 @@ export * from "./GetFeatureUsageByCompanyResponse";
19
19
  export * from "./GetFeatureUsageTimeSeriesParams";
20
20
  export * from "./GetFeatureUsageTimeSeriesResponse";
21
21
  export * from "./GetPlanEntitlementResponse";
22
+ export * from "./GetUserUsageByCompanyParams";
23
+ export * from "./GetUserUsageByCompanyResponse";
24
+ export * from "./GetUserUsageDetailParams";
25
+ export * from "./GetUserUsageDetailResponse";
22
26
  export * from "./ListCompanyOverridesParams";
23
27
  export * from "./ListCompanyOverridesResponse";
24
28
  export * from "./ListFeatureCompaniesParams";
@@ -8,9 +8,15 @@ import type * as Schematic from "../../../../index";
8
8
  */
9
9
  export interface PublishPlanVersionRequestBody {
10
10
  activationStrategy?: Schematic.CustomPlanActivationStrategy;
11
+ address?: Schematic.CustomerBillingAddress;
11
12
  couponExternalId?: string;
13
+ customFieldValues?: Schematic.CheckoutFieldValue[];
12
14
  customerEmail?: string;
13
15
  daysUntilDue?: number;
14
16
  excludedCompanyIds: string[];
15
17
  migrationStrategy: Schematic.PlanVersionMigrationStrategy;
18
+ phone?: string;
19
+ /** Whether Stripe emails the invoice when it is finalized. Defaults to true. */
20
+ sendInvoice?: boolean;
21
+ taxId?: Schematic.TaxIdInput;
16
22
  }
@@ -9,4 +9,6 @@ export interface RetryCustomPlanBillingRequestBody {
9
9
  activationStrategy?: Schematic.CustomPlanActivationStrategy;
10
10
  customerEmail: string;
11
11
  daysUntilDue?: number;
12
+ /** Whether Stripe emails the invoice when it is finalized. Defaults to true. */
13
+ sendInvoice?: boolean;
12
14
  }
@@ -8,6 +8,7 @@ export interface ApiKeyCreateResponseData {
8
8
  integration?: Schematic.ApiKeyIntegrationResponseData;
9
9
  lastUsedAt?: Date;
10
10
  name: string;
11
+ rateLimitPercent?: number;
11
12
  readonly: boolean;
12
13
  scopes: Schematic.ApiKeyScope[];
13
14
  secret: string;
@@ -8,6 +8,7 @@ export interface ApiKeyResponseData {
8
8
  integration?: Schematic.ApiKeyIntegrationResponseData;
9
9
  lastUsedAt?: Date;
10
10
  name: string;
11
+ rateLimitPercent?: number;
11
12
  readonly: boolean;
12
13
  scopes: Schematic.ApiKeyScope[];
13
14
  updatedAt: Date;
@@ -18,7 +18,7 @@ export interface BillingCreditView {
18
18
  price?: Schematic.BillingPriceView;
19
19
  pricePerUnit?: number;
20
20
  pricePerUnitDecimal?: string;
21
- product?: Schematic.BillingProductResponseData;
21
+ product?: Schematic.BillingProductRecordResponseData;
22
22
  singularName?: string;
23
23
  updatedAt: Date;
24
24
  }
@@ -28,6 +28,8 @@ export interface BillingPlanCreditGrantResponseData {
28
28
  expiryUnit?: Schematic.BillingCreditExpiryUnit;
29
29
  expiryUnitCount?: number;
30
30
  id: string;
31
+ /** The license whose quantity scales this grant. Set only when scaling is per_license. */
32
+ licenseId?: string;
31
33
  plan?: Schematic.PreviewObjectResponseData;
32
34
  planId: string;
33
35
  /** Use plan.name from the nested plan object instead */
@@ -38,5 +40,7 @@ export interface BillingPlanCreditGrantResponseData {
38
40
  resetType?: Schematic.BillingPlanCreditGrantResetType;
39
41
  /** Percentage of unused credits that carry over when this grant resets. Only meaningful when reset_type is plan_period. */
40
42
  rolloverPercentage: number;
43
+ /** Whether the grant is a fixed amount per company, or issued once per license the company holds. */
44
+ scaling: Schematic.PlanCreditGrantScaling;
41
45
  updatedAt: Date;
42
46
  }
@@ -0,0 +1,12 @@
1
+ import type * as Schematic from "../index";
2
+ export interface BillingProductRecordResponseData {
3
+ accountId: string;
4
+ createdAt: Date;
5
+ environmentId: string;
6
+ externalId: string;
7
+ id: string;
8
+ isActive: boolean;
9
+ name: string;
10
+ providerType: Schematic.BillingProviderType;
11
+ updatedAt: Date;
12
+ }
@@ -1,4 +1,4 @@
1
1
  export interface CatalogConfigOrderedEntitlement {
2
- planEntitlementId: string;
2
+ featureId: string;
3
3
  visible?: boolean;
4
4
  }
@@ -1,4 +1,4 @@
1
1
  export interface CatalogConfigOrderedEntitlementResponseData {
2
- planEntitlementId: string;
2
+ featureId: string;
3
3
  visible: boolean;
4
4
  }
@@ -6,7 +6,6 @@ export interface CatalogResponseData {
6
6
  customPlanPriceText?: string;
7
7
  customPlansVisible: boolean;
8
8
  description?: string;
9
- environmentId: string;
10
9
  id: string;
11
10
  isDefault: boolean;
12
11
  name: string;
@@ -5,4 +5,5 @@ export interface CompanyBillingDetailsResponseData {
5
5
  customFields: Schematic.CheckoutFieldWithValue[];
6
6
  email?: string;
7
7
  phone?: string;
8
+ taxIds: Schematic.CompanyTaxIdView[];
8
9
  }
@@ -5,4 +5,5 @@ export interface CompanyBillingDetailsView {
5
5
  customFields: Schematic.CheckoutFieldWithValue[];
6
6
  email?: string;
7
7
  phone?: string;
8
+ taxIds: Schematic.CompanyTaxIdView[];
8
9
  }
@@ -1,10 +1,11 @@
1
+ import type * as Schematic from "../index";
1
2
  export interface CompanyFeatureUsageExportMetadata {
2
3
  /** Restrict the export to these Schematic company IDs (starting with 'comp_') */
3
4
  companyIds?: string[];
4
5
  /** Restrict the export to companies with these billing credit type IDs */
5
6
  creditTypeIds?: string[];
6
- /** Schematic feature IDs (starting with 'feat_') to include as usage columns; at least one is required */
7
- featureIds: string[];
7
+ /** Schematic feature IDs (starting with 'feat_') to include as usage columns; empty means no usage columns */
8
+ featureIds?: string[];
8
9
  /** Restrict the export to companies that do (or do not) have a scheduled downgrade */
9
10
  hasScheduledDowngrade?: boolean;
10
11
  /** Restrict the export to companies with (or without) a monetized subscription */
@@ -19,10 +20,16 @@ export interface CompanyFeatureUsageExportMetadata {
19
20
  planVersionId?: string;
20
21
  /** Free-text search over company name and keys */
21
22
  q?: string;
23
+ /** Column to sort the exported rows by (e.g. name, created_at, plan); defaults to name */
24
+ sortOrderColumn?: string;
25
+ /** Direction to sort the exported rows by; defaults to asc */
26
+ sortOrderDirection?: Schematic.CompanyFeatureUsageExportMetadataSortOrderDirection;
22
27
  /** Restrict the export to companies whose subscription has one of these statuses */
23
28
  subscriptionStatuses?: string[];
24
29
  /** Restrict the export to companies whose subscription has one of these types */
25
30
  subscriptionTypes?: string[];
31
+ /** Company columns to include, mirroring the companies list; omit to include the plan column only */
32
+ visibleColumns?: Schematic.CompanyFeatureUsageExportMetadataVisibleColumnsItem[];
26
33
  /** Restrict the export to companies that have an entitlement for this feature ID */
27
34
  withEntitlementFor?: string;
28
35
  /** Restrict the export to companies with a subscription */
@@ -0,0 +1,6 @@
1
+ /** Direction to sort the exported rows by; defaults to asc */
2
+ export declare const CompanyFeatureUsageExportMetadataSortOrderDirection: {
3
+ readonly Asc: "asc";
4
+ readonly Desc: "desc";
5
+ };
6
+ export type CompanyFeatureUsageExportMetadataSortOrderDirection = (typeof CompanyFeatureUsageExportMetadataSortOrderDirection)[keyof typeof CompanyFeatureUsageExportMetadataSortOrderDirection];
@@ -0,0 +1,7 @@
1
+ export declare const CompanyFeatureUsageExportMetadataVisibleColumnsItem: {
2
+ readonly Plan: "plan";
3
+ readonly Subscription: "subscription";
4
+ readonly Users: "users";
5
+ readonly LastSeenAt: "last_seen_at";
6
+ };
7
+ export type CompanyFeatureUsageExportMetadataVisibleColumnsItem = (typeof CompanyFeatureUsageExportMetadataVisibleColumnsItem)[keyof typeof CompanyFeatureUsageExportMetadataVisibleColumnsItem];
@@ -28,6 +28,7 @@ export interface CompanyPlanCreditGrantView {
28
28
  expiryUnit?: Schematic.BillingCreditExpiryUnit;
29
29
  expiryUnitCount?: number;
30
30
  id: string;
31
+ licenseId?: string;
31
32
  plan?: Schematic.GenericPreviewObject;
32
33
  planId: string;
33
34
  planVersionId?: string;
@@ -37,6 +38,7 @@ export interface CompanyPlanCreditGrantView {
37
38
  resetStart?: Schematic.BillingPlanCreditGrantResetStart;
38
39
  resetType: Schematic.BillingPlanCreditGrantResetType;
39
40
  rolloverPercentage: number;
41
+ scaling: Schematic.PlanCreditGrantScaling;
40
42
  /** Deprecated field, will be removed in the future. Use Credit.SingularName instead. */
41
43
  singularName?: string;
42
44
  updatedAt: Date;
@@ -32,8 +32,8 @@ export interface CompanyPlanDetailResponseData {
32
32
  invalidReason?: Schematic.CompanyPlanInvalidReason;
33
33
  isCustom: boolean;
34
34
  isDefault: boolean;
35
- /** Deprecated: Use BillingStrategy instead */
36
- isFree: boolean;
35
+ /** Deprecated: reports the plan's charge type, not its price. Read the plan's prices to tell whether it costs anything, or billing_strategy to tell how it is billed. */
36
+ isFree?: boolean;
37
37
  isTrialable: boolean;
38
38
  monthlyPrice?: Schematic.BillingPriceResponseData;
39
39
  name: string;
@@ -0,0 +1,7 @@
1
+ export interface CompanyTaxIdView {
2
+ country: string;
3
+ id: string;
4
+ type: string;
5
+ value: string;
6
+ verificationStatus?: string;
7
+ }
@@ -1,6 +1,8 @@
1
+ import type * as Schematic from "../index";
1
2
  export interface ComponentCheckoutSettings {
2
3
  collectAddress: boolean;
3
4
  collectEmail: boolean;
4
5
  collectPhone: boolean;
6
+ prorationBehavior: Schematic.ProrationBehavior;
5
7
  taxCollectionEnabled: boolean;
6
8
  }
@@ -17,6 +17,8 @@ export interface CreateBillingPlanCreditGrantRequestBody {
17
17
  expiryType?: Schematic.BillingCreditExpiryType;
18
18
  expiryUnit?: Schematic.BillingCreditExpiryUnit;
19
19
  expiryUnitCount?: number;
20
+ /** The license whose quantity scales this grant. Required when scaling is per_license. */
21
+ licenseId?: string;
20
22
  planId: string;
21
23
  planVersionId?: string;
22
24
  resetCadence: Schematic.BillingPlanCreditGrantResetCadence;
@@ -24,4 +26,6 @@ export interface CreateBillingPlanCreditGrantRequestBody {
24
26
  resetType?: Schematic.BillingPlanCreditGrantResetType;
25
27
  /** Percentage of unused credits that carry over when this grant resets. Only applies when reset_type is plan_period. Rolled-over credits expire at the next reset and are not rolled again. Defaults to 0. */
26
28
  rolloverPercentage?: number;
29
+ /** Whether the grant is a fixed amount per company, or issued once per license the company holds. Defaults to fixed. */
30
+ scaling?: Schematic.PlanCreditGrantScaling;
27
31
  }