@schematichq/schematic-typescript-node 1.5.6 → 1.5.7

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 (95) 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/entitlements/client/Client.d.ts +38 -0
  12. package/dist/api/resources/entitlements/client/requests/GetUserUsageByCompanyRequest.d.ts +19 -0
  13. package/dist/api/resources/entitlements/client/requests/GetUserUsageDetailRequest.d.ts +19 -0
  14. package/dist/api/resources/entitlements/client/requests/index.d.ts +2 -0
  15. package/dist/api/resources/entitlements/types/GetUserUsageByCompanyParams.d.ts +13 -0
  16. package/dist/api/resources/entitlements/types/GetUserUsageByCompanyResponse.d.ts +6 -0
  17. package/dist/api/resources/entitlements/types/GetUserUsageDetailParams.d.ts +13 -0
  18. package/dist/api/resources/entitlements/types/GetUserUsageDetailResponse.d.ts +6 -0
  19. package/dist/api/resources/entitlements/types/index.d.ts +4 -0
  20. package/dist/api/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +6 -0
  21. package/dist/api/resources/plans/client/requests/RetryCustomPlanBillingRequestBody.d.ts +2 -0
  22. package/dist/api/types/ApiKeyCreateResponseData.d.ts +1 -0
  23. package/dist/api/types/ApiKeyResponseData.d.ts +1 -0
  24. package/dist/api/types/BillingPlanCreditGrantResponseData.d.ts +4 -0
  25. package/dist/api/types/CatalogConfigOrderedEntitlement.d.ts +1 -1
  26. package/dist/api/types/CatalogConfigOrderedEntitlementResponseData.d.ts +1 -1
  27. package/dist/api/types/CatalogResponseData.d.ts +0 -1
  28. package/dist/api/types/CompanyBillingDetailsResponseData.d.ts +1 -0
  29. package/dist/api/types/CompanyBillingDetailsView.d.ts +1 -0
  30. package/dist/api/types/CompanyPlanCreditGrantView.d.ts +2 -0
  31. package/dist/api/types/CompanyPlanDetailResponseData.d.ts +2 -2
  32. package/dist/api/types/CompanyTaxIdView.d.ts +7 -0
  33. package/dist/api/types/ComponentCheckoutSettings.d.ts +2 -0
  34. package/dist/api/types/CreateBillingPlanCreditGrantRequestBody.d.ts +4 -0
  35. package/dist/api/types/CustomPlanBillingResponseData.d.ts +1 -0
  36. package/dist/api/types/PlanCreditGrantScaling.d.ts +5 -0
  37. package/dist/api/types/PlanCreditGrantView.d.ts +2 -0
  38. package/dist/api/types/PlanDetailResponseData.d.ts +2 -2
  39. package/dist/api/types/PlanGroupPlanDetailResponseData.d.ts +2 -2
  40. package/dist/api/types/PlanViewPublicResponseData.d.ts +2 -2
  41. package/dist/api/types/TaxIdInput.d.ts +5 -0
  42. package/dist/api/types/TaxIdType.d.ts +41 -0
  43. package/dist/api/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +4 -0
  44. package/dist/api/types/UserCreditUsageResponseData.d.ts +14 -0
  45. package/dist/api/types/UserDailyCreditPointResponseData.d.ts +6 -0
  46. package/dist/api/types/UserDailyUsagePointResponseData.d.ts +8 -0
  47. package/dist/api/types/UserFeatureUsageResponseData.d.ts +14 -0
  48. package/dist/api/types/UserUsageByCompanyResponseData.d.ts +11 -0
  49. package/dist/api/types/UserUsageDetailResponseData.d.ts +16 -0
  50. package/dist/api/types/index.d.ts +10 -0
  51. package/dist/index.js +9 -9
  52. package/dist/serialization/resources/accounts/client/requests/CreateApiKeyRequestBody.d.ts +1 -0
  53. package/dist/serialization/resources/accounts/client/requests/UpdateApiKeyRequestBody.d.ts +1 -0
  54. package/dist/serialization/resources/billing/types/ListBillingPricesParams.d.ts +1 -0
  55. package/dist/serialization/resources/billing/types/ListBillingProductPricesParams.d.ts +1 -0
  56. package/dist/serialization/resources/catalogs/client/requests/CreateCatalogRequestBody.d.ts +0 -1
  57. package/dist/serialization/resources/checkout/client/requests/UpdateCompanyBillingDetailsRequestBody.d.ts +2 -0
  58. package/dist/serialization/resources/entitlements/types/GetUserUsageByCompanyParams.d.ts +12 -0
  59. package/dist/serialization/resources/entitlements/types/GetUserUsageByCompanyResponse.d.ts +12 -0
  60. package/dist/serialization/resources/entitlements/types/GetUserUsageDetailParams.d.ts +12 -0
  61. package/dist/serialization/resources/entitlements/types/GetUserUsageDetailResponse.d.ts +12 -0
  62. package/dist/serialization/resources/entitlements/types/index.d.ts +4 -0
  63. package/dist/serialization/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +8 -0
  64. package/dist/serialization/resources/plans/client/requests/RetryCustomPlanBillingRequestBody.d.ts +1 -0
  65. package/dist/serialization/types/ApiKeyCreateResponseData.d.ts +1 -0
  66. package/dist/serialization/types/ApiKeyResponseData.d.ts +1 -0
  67. package/dist/serialization/types/BillingPlanCreditGrantResponseData.d.ts +3 -0
  68. package/dist/serialization/types/CatalogConfigOrderedEntitlement.d.ts +1 -1
  69. package/dist/serialization/types/CatalogConfigOrderedEntitlementResponseData.d.ts +1 -1
  70. package/dist/serialization/types/CatalogResponseData.d.ts +0 -1
  71. package/dist/serialization/types/CompanyBillingDetailsResponseData.d.ts +2 -0
  72. package/dist/serialization/types/CompanyBillingDetailsView.d.ts +2 -0
  73. package/dist/serialization/types/CompanyPlanCreditGrantView.d.ts +3 -0
  74. package/dist/serialization/types/CompanyPlanDetailResponseData.d.ts +1 -1
  75. package/dist/serialization/types/CompanyTaxIdView.d.ts +13 -0
  76. package/dist/serialization/types/ComponentCheckoutSettings.d.ts +2 -0
  77. package/dist/serialization/types/CreateBillingPlanCreditGrantRequestBody.d.ts +3 -0
  78. package/dist/serialization/types/CustomPlanBillingResponseData.d.ts +1 -0
  79. package/dist/serialization/types/PlanCreditGrantScaling.d.ts +7 -0
  80. package/dist/serialization/types/PlanCreditGrantView.d.ts +3 -0
  81. package/dist/serialization/types/PlanDetailResponseData.d.ts +1 -1
  82. package/dist/serialization/types/PlanGroupPlanDetailResponseData.d.ts +1 -1
  83. package/dist/serialization/types/PlanViewPublicResponseData.d.ts +1 -1
  84. package/dist/serialization/types/TaxIdInput.d.ts +11 -0
  85. package/dist/serialization/types/TaxIdType.d.ts +7 -0
  86. package/dist/serialization/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +3 -0
  87. package/dist/serialization/types/UserCreditUsageResponseData.d.ts +15 -0
  88. package/dist/serialization/types/UserDailyCreditPointResponseData.d.ts +10 -0
  89. package/dist/serialization/types/UserDailyUsagePointResponseData.d.ts +12 -0
  90. package/dist/serialization/types/UserFeatureUsageResponseData.d.ts +16 -0
  91. package/dist/serialization/types/UserUsageByCompanyResponseData.d.ts +14 -0
  92. package/dist/serialization/types/UserUsageDetailResponseData.d.ts +20 -0
  93. package/dist/serialization/types/index.d.ts +10 -0
  94. package/dist/wasm/rulesengine.js +1 -1
  95. 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
  }
@@ -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;
@@ -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
  }
@@ -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
  }
@@ -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
  }
@@ -9,6 +9,7 @@ export interface CustomPlanBillingResponseData {
9
9
  paidAt?: Date;
10
10
  planId: string;
11
11
  publishedAt?: Date;
12
+ sendInvoice: boolean;
12
13
  status: Schematic.CustomPlanBillingStatus;
13
14
  stripeInvoiceUrl?: string;
14
15
  updatedAt: Date;
@@ -0,0 +1,5 @@
1
+ export declare const PlanCreditGrantScaling: {
2
+ readonly Fixed: "fixed";
3
+ readonly PerLicense: "per_license";
4
+ };
5
+ export type PlanCreditGrantScaling = (typeof PlanCreditGrantScaling)[keyof typeof PlanCreditGrantScaling];
@@ -25,6 +25,7 @@ export interface PlanCreditGrantView {
25
25
  expiryUnit?: Schematic.BillingCreditExpiryUnit;
26
26
  expiryUnitCount?: number;
27
27
  id: string;
28
+ licenseId?: string;
28
29
  plan?: Schematic.GenericPreviewObject;
29
30
  planId: string;
30
31
  planVersionId?: string;
@@ -34,6 +35,7 @@ export interface PlanCreditGrantView {
34
35
  resetStart?: Schematic.BillingPlanCreditGrantResetStart;
35
36
  resetType: Schematic.BillingPlanCreditGrantResetType;
36
37
  rolloverPercentage: number;
38
+ scaling: Schematic.PlanCreditGrantScaling;
37
39
  /** Deprecated field, will be removed in the future. Use Credit.SingularName instead. */
38
40
  singularName?: string;
39
41
  updatedAt: Date;
@@ -24,8 +24,8 @@ export interface PlanDetailResponseData {
24
24
  id: string;
25
25
  includedCreditGrants?: Schematic.BillingPlanCreditGrantResponseData[];
26
26
  isDefault: boolean;
27
- /** Deprecated: Use BillingStrategy instead */
28
- isFree: boolean;
27
+ /** 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. */
28
+ isFree?: boolean;
29
29
  isTrialable: boolean;
30
30
  monthlyPrice?: Schematic.BillingPriceResponseData;
31
31
  name: string;
@@ -28,8 +28,8 @@ export interface PlanGroupPlanDetailResponseData {
28
28
  includedCreditGrants?: Schematic.BillingPlanCreditGrantResponseData[];
29
29
  isCustom: boolean;
30
30
  isDefault: boolean;
31
- /** Deprecated: Use BillingStrategy instead */
32
- isFree: boolean;
31
+ /** 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. */
32
+ isFree?: boolean;
33
33
  isTrialable: boolean;
34
34
  monthlyPrice?: Schematic.BillingPriceResponseData;
35
35
  name: string;
@@ -29,8 +29,8 @@ export interface PlanViewPublicResponseData {
29
29
  includedCreditGrants: Schematic.PlanCreditGrantView[];
30
30
  isCustom: boolean;
31
31
  isDefault: boolean;
32
- /** Deprecated: Use BillingStrategy instead */
33
- isFree: boolean;
32
+ /** 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. */
33
+ isFree?: boolean;
34
34
  isTrialable: boolean;
35
35
  monthlyPrice?: Schematic.BillingPriceResponseData;
36
36
  name: string;
@@ -0,0 +1,5 @@
1
+ import type * as Schematic from "../index";
2
+ export interface TaxIdInput {
3
+ type: Schematic.TaxIdType;
4
+ value: string;
5
+ }
@@ -0,0 +1,41 @@
1
+ export declare const TaxIdType: {
2
+ readonly AeTrn: "ae_trn";
3
+ readonly AuAbn: "au_abn";
4
+ readonly AuArn: "au_arn";
5
+ readonly BrCnpj: "br_cnpj";
6
+ readonly BrCpf: "br_cpf";
7
+ readonly CaBn: "ca_bn";
8
+ readonly CaGstHst: "ca_gst_hst";
9
+ readonly CaPstBc: "ca_pst_bc";
10
+ readonly CaPstMb: "ca_pst_mb";
11
+ readonly CaPstSk: "ca_pst_sk";
12
+ readonly CaQst: "ca_qst";
13
+ readonly ChUid: "ch_uid";
14
+ readonly ChVat: "ch_vat";
15
+ readonly EuVat: "eu_vat";
16
+ readonly GbVat: "gb_vat";
17
+ readonly HkBr: "hk_br";
18
+ readonly IdNpwp: "id_npwp";
19
+ readonly IlVat: "il_vat";
20
+ readonly InGst: "in_gst";
21
+ readonly JpCn: "jp_cn";
22
+ readonly JpRn: "jp_rn";
23
+ readonly JpTrn: "jp_trn";
24
+ readonly KrBrn: "kr_brn";
25
+ readonly MxRfc: "mx_rfc";
26
+ readonly MyFrp: "my_frp";
27
+ readonly MyItn: "my_itn";
28
+ readonly MySst: "my_sst";
29
+ readonly NoVat: "no_vat";
30
+ readonly NzGst: "nz_gst";
31
+ readonly PhTin: "ph_tin";
32
+ readonly SaVat: "sa_vat";
33
+ readonly SgGst: "sg_gst";
34
+ readonly SgUen: "sg_uen";
35
+ readonly ThVat: "th_vat";
36
+ readonly TrTin: "tr_tin";
37
+ readonly TwVat: "tw_vat";
38
+ readonly UsEin: "us_ein";
39
+ readonly ZaVat: "za_vat";
40
+ };
41
+ export type TaxIdType = (typeof TaxIdType)[keyof typeof TaxIdType];
@@ -16,9 +16,13 @@ export interface UpdateBillingPlanCreditGrantRequestBody {
16
16
  expiryType?: Schematic.BillingCreditExpiryType;
17
17
  expiryUnit?: Schematic.BillingCreditExpiryUnit;
18
18
  expiryUnitCount?: number;
19
+ /** The license whose quantity scales this grant. Cannot be changed after creation. */
20
+ licenseId?: string;
19
21
  resetCadence: Schematic.BillingPlanCreditGrantResetCadence;
20
22
  resetStart: Schematic.BillingPlanCreditGrantResetStart;
21
23
  resetType?: Schematic.BillingPlanCreditGrantResetType;
22
24
  /** 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. */
23
25
  rolloverPercentage?: number;
26
+ /** Whether the grant is a fixed amount per company, or issued once per license the company holds. Cannot be changed after creation. */
27
+ scaling?: Schematic.PlanCreditGrantScaling;
24
28
  }
@@ -0,0 +1,14 @@
1
+ import type * as Schematic from "../index";
2
+ export interface UserCreditUsageResponseData {
3
+ billingCreditId: string;
4
+ /** The display name of the credit type */
5
+ creditName: string;
6
+ /** The user's net track-driven consumption of the credit within the window (draws minus refunds) */
7
+ creditsUsed: number;
8
+ /** This row's fraction (0-1) of the company's total track-driven consumption of the credit within the window, including unattributed consumption */
9
+ share: number;
10
+ /** The user the consumption is attributed to; null for consumption from events sent without a user */
11
+ user?: Schematic.UserResponseData;
12
+ /** The user the consumption is attributed to; null for unattributed consumption */
13
+ userId?: string;
14
+ }
@@ -0,0 +1,6 @@
1
+ export interface UserDailyCreditPointResponseData {
2
+ /** The user's net credit consumption on the day */
3
+ creditsUsed: number;
4
+ /** The UTC day */
5
+ date: Date;
6
+ }
@@ -0,0 +1,8 @@
1
+ import type * as Schematic from "../index";
2
+ export interface UserDailyUsagePointResponseData {
3
+ /** The UTC day */
4
+ date: Date;
5
+ feature?: Schematic.FeatureResponseData;
6
+ /** The user's usage of the feature on the day */
7
+ value: number;
8
+ }
@@ -0,0 +1,14 @@
1
+ import type * as Schematic from "../index";
2
+ export interface UserFeatureUsageResponseData {
3
+ feature?: Schematic.FeatureResponseData;
4
+ /** When the user last used the feature within the window */
5
+ lastSeen: Date;
6
+ /** This row's fraction (0-1) of the company's total usage of the feature within the window, including unattributed usage */
7
+ share: number;
8
+ /** The user the usage is attributed to; null for usage from events sent without a user */
9
+ user?: Schematic.UserResponseData;
10
+ /** The user the usage is attributed to; null for unattributed usage */
11
+ userId?: string;
12
+ /** The user's usage of the feature within the window */
13
+ value: number;
14
+ }
@@ -0,0 +1,11 @@
1
+ import type * as Schematic from "../index";
2
+ export interface UserUsageByCompanyResponseData {
3
+ /** Per-user net credit consumption within the window */
4
+ credits: Schematic.UserCreditUsageResponseData[];
5
+ /** End of the usage window (exclusive) */
6
+ endTime: Date;
7
+ /** Per-user, per-feature usage within the window; rows for a feature sum to the company total */
8
+ rows: Schematic.UserFeatureUsageResponseData[];
9
+ /** Start of the usage window */
10
+ startTime: Date;
11
+ }