@schematichq/schematic-typescript-node 1.5.0 → 1.5.2

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 (89) hide show
  1. package/dist/Client.d.ts +8 -0
  2. package/dist/api/resources/billing/client/Client.d.ts +47 -0
  3. package/dist/api/resources/billing/client/requests/ListBillingPricesRequest.d.ts +3 -0
  4. package/dist/api/resources/billing/client/requests/ListBillingProductPricesRequest.d.ts +3 -0
  5. package/dist/api/resources/billing/types/DeleteBillingCouponResponse.d.ts +6 -0
  6. package/dist/api/resources/billing/types/DeleteBillingCustomerResponse.d.ts +6 -0
  7. package/dist/api/resources/billing/types/DeleteBillingInvoiceResponse.d.ts +6 -0
  8. package/dist/api/resources/billing/types/ListBillingPricesParams.d.ts +2 -0
  9. package/dist/api/resources/billing/types/ListBillingProductPricesParams.d.ts +2 -0
  10. package/dist/api/resources/billing/types/index.d.ts +3 -0
  11. package/dist/api/resources/credits/client/Client.d.ts +0 -48
  12. package/dist/api/resources/credits/client/requests/index.d.ts +0 -2
  13. package/dist/api/resources/credits/types/index.d.ts +0 -4
  14. package/dist/api/resources/plangroups/client/Client.d.ts +2 -0
  15. package/dist/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +4 -0
  16. package/dist/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +4 -0
  17. package/dist/api/resources/plans/client/Client.d.ts +2 -10
  18. package/dist/api/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +1 -6
  19. package/dist/api/resources/plans/client/requests/RetryCustomPlanBillingRequestBody.d.ts +1 -6
  20. package/dist/api/resources/webhooks/client/Client.d.ts +18 -0
  21. package/dist/api/resources/webhooks/client/requests/TestWebhookRequestBody.d.ts +10 -0
  22. package/dist/api/resources/webhooks/client/requests/index.d.ts +1 -0
  23. package/dist/api/resources/webhooks/types/SendTestWebhookActionResponse.d.ts +6 -0
  24. package/dist/api/resources/webhooks/types/index.d.ts +1 -0
  25. package/dist/api/types/AccountMemberPermission.d.ts +0 -1
  26. package/dist/api/types/BillingCreditGrantZeroedOutReason.d.ts +1 -0
  27. package/dist/api/types/ChangeSubscriptionInternalRequestBody.d.ts +1 -0
  28. package/dist/api/types/ChangeSubscriptionRequestBody.d.ts +1 -0
  29. package/dist/api/types/CheckFlagsResponseData.d.ts +2 -0
  30. package/dist/api/types/CheckoutSettingsResponseData.d.ts +3 -0
  31. package/dist/api/types/CompanyCreditBalance.d.ts +8 -0
  32. package/dist/api/types/CompanySubscriptionResponseData.d.ts +1 -0
  33. package/dist/api/types/FeatureEntitlement.d.ts +9 -1
  34. package/dist/api/types/PlanChangeResponseData.d.ts +2 -0
  35. package/dist/api/types/PreviewSubscriptionChangeResponseData.d.ts +3 -0
  36. package/dist/api/types/RulesengineFeatureEntitlement.d.ts +9 -1
  37. package/dist/api/types/TestWebhookResponseData.d.ts +4 -0
  38. package/dist/api/types/index.d.ts +2 -2
  39. package/dist/credits/check.d.ts +9 -5
  40. package/dist/credits/types.d.ts +11 -9
  41. package/dist/datastream/merge.d.ts +1 -1
  42. package/dist/index.js +9 -9
  43. package/dist/rules-engine.d.ts +4 -0
  44. package/dist/serialization/resources/billing/types/DeleteBillingCouponResponse.d.ts +11 -0
  45. package/dist/serialization/resources/billing/types/DeleteBillingCustomerResponse.d.ts +11 -0
  46. package/dist/serialization/resources/billing/types/DeleteBillingInvoiceResponse.d.ts +11 -0
  47. package/dist/serialization/resources/billing/types/ListBillingPricesParams.d.ts +1 -0
  48. package/dist/serialization/resources/billing/types/ListBillingProductPricesParams.d.ts +1 -0
  49. package/dist/serialization/resources/billing/types/index.d.ts +3 -0
  50. package/dist/serialization/resources/credits/types/index.d.ts +0 -4
  51. package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +3 -0
  52. package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +3 -0
  53. package/dist/serialization/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +0 -2
  54. package/dist/serialization/resources/plans/client/requests/RetryCustomPlanBillingRequestBody.d.ts +0 -2
  55. package/dist/serialization/resources/webhooks/client/requests/TestWebhookRequestBody.d.ts +10 -0
  56. package/dist/serialization/resources/webhooks/client/requests/index.d.ts +1 -0
  57. package/dist/serialization/resources/webhooks/types/SendTestWebhookActionResponse.d.ts +11 -0
  58. package/dist/serialization/resources/webhooks/types/index.d.ts +1 -0
  59. package/dist/serialization/types/AccountMemberPermission.d.ts +1 -1
  60. package/dist/serialization/types/BillingCreditGrantZeroedOutReason.d.ts +1 -1
  61. package/dist/serialization/types/ChangeSubscriptionInternalRequestBody.d.ts +1 -0
  62. package/dist/serialization/types/ChangeSubscriptionRequestBody.d.ts +1 -0
  63. package/dist/serialization/types/CheckFlagsResponseData.d.ts +2 -0
  64. package/dist/serialization/types/CheckoutSettingsResponseData.d.ts +3 -0
  65. package/dist/serialization/types/CompanyCreditBalance.d.ts +11 -0
  66. package/dist/serialization/types/CompanySubscriptionResponseData.d.ts +1 -0
  67. package/dist/serialization/types/FeatureEntitlement.d.ts +4 -0
  68. package/dist/serialization/types/PlanChangeResponseData.d.ts +1 -0
  69. package/dist/serialization/types/PreviewSubscriptionChangeResponseData.d.ts +3 -0
  70. package/dist/serialization/types/RulesengineFeatureEntitlement.d.ts +4 -0
  71. package/dist/serialization/types/TestWebhookResponseData.d.ts +10 -0
  72. package/dist/serialization/types/index.d.ts +2 -2
  73. package/dist/wasm/rulesengine.js +4 -4
  74. package/dist/wrapper.d.ts +0 -30
  75. package/package.json +1 -1
  76. package/dist/api/resources/credits/client/requests/CountCreditLedgerRequest.d.ts +0 -26
  77. package/dist/api/resources/credits/client/requests/GetEnrichedCreditLedgerRequest.d.ts +0 -26
  78. package/dist/api/resources/credits/types/CountCreditLedgerParams.d.ts +0 -16
  79. package/dist/api/resources/credits/types/CountCreditLedgerResponse.d.ts +0 -6
  80. package/dist/api/resources/credits/types/GetEnrichedCreditLedgerParams.d.ts +0 -16
  81. package/dist/api/resources/credits/types/GetEnrichedCreditLedgerResponse.d.ts +0 -6
  82. package/dist/api/types/CreditLedgerEnrichedEntryResponseData.d.ts +0 -25
  83. package/dist/api/types/CreditLedgerPeriod.d.ts +0 -7
  84. package/dist/serialization/resources/credits/types/CountCreditLedgerParams.d.ts +0 -17
  85. package/dist/serialization/resources/credits/types/CountCreditLedgerResponse.d.ts +0 -12
  86. package/dist/serialization/resources/credits/types/GetEnrichedCreditLedgerParams.d.ts +0 -17
  87. package/dist/serialization/resources/credits/types/GetEnrichedCreditLedgerResponse.d.ts +0 -12
  88. package/dist/serialization/types/CreditLedgerEnrichedEntryResponseData.d.ts +0 -33
  89. package/dist/serialization/types/CreditLedgerPeriod.d.ts +0 -7
package/dist/Client.d.ts CHANGED
@@ -69,6 +69,14 @@ export declare class SchematicClient {
69
69
  get scheduledcheckout(): ScheduledcheckoutClient;
70
70
  get accesstokens(): AccesstokensClient;
71
71
  get webhooks(): WebhooksClient;
72
+ /**
73
+ * @param {SchematicClient.RequestOptions} requestOptions - Request-specific configuration.
74
+ *
75
+ * @example
76
+ * await client.getCreditLedger()
77
+ */
78
+ getCreditLedger(requestOptions?: SchematicClient.RequestOptions): core.HttpResponsePromise<void>;
79
+ private __getCreditLedger;
72
80
  /**
73
81
  * Make a passthrough request using the SDK's configured auth, retry, logging, etc.
74
82
  * This is useful for making requests to endpoints not yet supported in the SDK.
@@ -54,6 +54,36 @@ export declare class BillingClient {
54
54
  */
55
55
  upsertBillingCoupon(request: Schematic.CreateCouponRequestBody, requestOptions?: BillingClient.RequestOptions): core.HttpResponsePromise<Schematic.UpsertBillingCouponResponse>;
56
56
  private __upsertBillingCoupon;
57
+ /**
58
+ * @param {string} billing_id - billing_id
59
+ * @param {BillingClient.RequestOptions} requestOptions - Request-specific configuration.
60
+ *
61
+ * @throws {@link Schematic.BadRequestError}
62
+ * @throws {@link Schematic.UnauthorizedError}
63
+ * @throws {@link Schematic.ForbiddenError}
64
+ * @throws {@link Schematic.NotFoundError}
65
+ * @throws {@link Schematic.InternalServerError}
66
+ *
67
+ * @example
68
+ * await client.billing.deleteBillingCoupon("billing_id")
69
+ */
70
+ deleteBillingCoupon(billing_id: string, requestOptions?: BillingClient.RequestOptions): core.HttpResponsePromise<Schematic.DeleteBillingCouponResponse>;
71
+ private __deleteBillingCoupon;
72
+ /**
73
+ * @param {string} billing_id - billing_id
74
+ * @param {BillingClient.RequestOptions} requestOptions - Request-specific configuration.
75
+ *
76
+ * @throws {@link Schematic.BadRequestError}
77
+ * @throws {@link Schematic.UnauthorizedError}
78
+ * @throws {@link Schematic.ForbiddenError}
79
+ * @throws {@link Schematic.NotFoundError}
80
+ * @throws {@link Schematic.InternalServerError}
81
+ *
82
+ * @example
83
+ * await client.billing.deleteBillingCustomer("billing_id")
84
+ */
85
+ deleteBillingCustomer(billing_id: string, requestOptions?: BillingClient.RequestOptions): core.HttpResponsePromise<Schematic.DeleteBillingCustomerResponse>;
86
+ private __deleteBillingCustomer;
57
87
  /**
58
88
  * @param {Schematic.CreateBillingCustomerRequestBody} request
59
89
  * @param {BillingClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -164,6 +194,21 @@ export declare class BillingClient {
164
194
  */
165
195
  upsertInvoice(request: Schematic.CreateInvoiceRequestBody, requestOptions?: BillingClient.RequestOptions): core.HttpResponsePromise<Schematic.UpsertInvoiceResponse>;
166
196
  private __upsertInvoice;
197
+ /**
198
+ * @param {string} billing_id - billing_id
199
+ * @param {BillingClient.RequestOptions} requestOptions - Request-specific configuration.
200
+ *
201
+ * @throws {@link Schematic.BadRequestError}
202
+ * @throws {@link Schematic.UnauthorizedError}
203
+ * @throws {@link Schematic.ForbiddenError}
204
+ * @throws {@link Schematic.NotFoundError}
205
+ * @throws {@link Schematic.InternalServerError}
206
+ *
207
+ * @example
208
+ * await client.billing.deleteBillingInvoice("billing_id")
209
+ */
210
+ deleteBillingInvoice(billing_id: string, requestOptions?: BillingClient.RequestOptions): core.HttpResponsePromise<Schematic.DeleteBillingInvoiceResponse>;
211
+ private __deleteBillingInvoice;
167
212
  /**
168
213
  * @param {Schematic.ListMetersRequest} request
169
214
  * @param {BillingClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -275,6 +320,7 @@ export declare class BillingClient {
275
320
  * ids: ["ids"],
276
321
  * interval: "interval",
277
322
  * isActive: true,
323
+ * planVersionId: "plan_version_id",
278
324
  * price: 1000000,
279
325
  * productId: "product_id",
280
326
  * productIds: ["product_ids"],
@@ -350,6 +396,7 @@ export declare class BillingClient {
350
396
  * ids: ["ids"],
351
397
  * interval: "interval",
352
398
  * isActive: true,
399
+ * planVersionId: "plan_version_id",
353
400
  * price: 1000000,
354
401
  * productId: "product_id",
355
402
  * productIds: ["product_ids"],
@@ -8,6 +8,7 @@ import type * as Schematic from "../../../../index";
8
8
  * ids: ["ids"],
9
9
  * interval: "interval",
10
10
  * isActive: true,
11
+ * planVersionId: "plan_version_id",
11
12
  * price: 1000000,
12
13
  * productId: "product_id",
13
14
  * productIds: ["product_ids"],
@@ -31,6 +32,8 @@ export interface ListBillingPricesRequest {
31
32
  interval?: string;
32
33
  /** Filter for active prices on active products (defaults to true if not specified) */
33
34
  isActive?: boolean;
35
+ /** Filter for prices belonging to a specific plan version (e.g. the latest published version) */
36
+ planVersionId?: string;
34
37
  price?: number;
35
38
  productId?: string;
36
39
  productIds?: string | string[];
@@ -8,6 +8,7 @@ import type * as Schematic from "../../../../index";
8
8
  * ids: ["ids"],
9
9
  * interval: "interval",
10
10
  * isActive: true,
11
+ * planVersionId: "plan_version_id",
11
12
  * price: 1000000,
12
13
  * productId: "product_id",
13
14
  * productIds: ["product_ids"],
@@ -31,6 +32,8 @@ export interface ListBillingProductPricesRequest {
31
32
  interval?: string;
32
33
  /** Filter for active prices on active products (defaults to true if not specified) */
33
34
  isActive?: boolean;
35
+ /** Filter for prices belonging to a specific plan version (e.g. the latest published version) */
36
+ planVersionId?: string;
34
37
  price?: number;
35
38
  productId?: string;
36
39
  productIds?: string | string[];
@@ -0,0 +1,6 @@
1
+ import type * as Schematic from "../../../index";
2
+ export interface DeleteBillingCouponResponse {
3
+ data: Schematic.DeleteResponse;
4
+ /** Input parameters */
5
+ params: Record<string, unknown>;
6
+ }
@@ -0,0 +1,6 @@
1
+ import type * as Schematic from "../../../index";
2
+ export interface DeleteBillingCustomerResponse {
3
+ data: Schematic.DeleteResponse;
4
+ /** Input parameters */
5
+ params: Record<string, unknown>;
6
+ }
@@ -0,0 +1,6 @@
1
+ import type * as Schematic from "../../../index";
2
+ export interface DeleteBillingInvoiceResponse {
3
+ data: Schematic.DeleteResponse;
4
+ /** Input parameters */
5
+ params: Record<string, unknown>;
6
+ }
@@ -17,6 +17,8 @@ export interface ListBillingPricesParams {
17
17
  limit?: number;
18
18
  /** Page offset (default 0) */
19
19
  offset?: number;
20
+ /** Filter for prices belonging to a specific plan version (e.g. the latest published version) */
21
+ planVersionId?: string;
20
22
  price?: number;
21
23
  productId?: string;
22
24
  productIds?: string[];
@@ -17,6 +17,8 @@ export interface ListBillingProductPricesParams {
17
17
  limit?: number;
18
18
  /** Page offset (default 0) */
19
19
  offset?: number;
20
+ /** Filter for prices belonging to a specific plan version (e.g. the latest published version) */
21
+ planVersionId?: string;
20
22
  price?: number;
21
23
  productId?: string;
22
24
  productIds?: string[];
@@ -2,6 +2,9 @@ export * from "./CountBillingProductsParams";
2
2
  export * from "./CountBillingProductsResponse";
3
3
  export * from "./CountCustomersParams";
4
4
  export * from "./CountCustomersResponse";
5
+ export * from "./DeleteBillingCouponResponse";
6
+ export * from "./DeleteBillingCustomerResponse";
7
+ export * from "./DeleteBillingInvoiceResponse";
5
8
  export * from "./DeleteBillingProductResponse";
6
9
  export * from "./DeletePaymentMethodByExternalIdResponse";
7
10
  export * from "./DeleteProductPriceResponse";
@@ -419,54 +419,6 @@ export declare class CreditsClient {
419
419
  */
420
420
  releaseCreditLease(lease_id: string, request: Schematic.ReleaseCreditLeaseRequestBody, requestOptions?: CreditsClient.RequestOptions): core.HttpResponsePromise<Schematic.ReleaseCreditLeaseResponse>;
421
421
  private __releaseCreditLease;
422
- /**
423
- * @param {Schematic.GetEnrichedCreditLedgerRequest} request
424
- * @param {CreditsClient.RequestOptions} requestOptions - Request-specific configuration.
425
- *
426
- * @throws {@link Schematic.BadRequestError}
427
- * @throws {@link Schematic.UnauthorizedError}
428
- * @throws {@link Schematic.ForbiddenError}
429
- * @throws {@link Schematic.NotFoundError}
430
- * @throws {@link Schematic.InternalServerError}
431
- *
432
- * @example
433
- * await client.credits.getEnrichedCreditLedger({
434
- * companyId: "company_id",
435
- * billingCreditId: "billing_credit_id",
436
- * featureId: "feature_id",
437
- * period: "daily",
438
- * startTime: "start_time",
439
- * endTime: "end_time",
440
- * limit: 1000000,
441
- * offset: 1000000
442
- * })
443
- */
444
- getEnrichedCreditLedger(request: Schematic.GetEnrichedCreditLedgerRequest, requestOptions?: CreditsClient.RequestOptions): core.HttpResponsePromise<Schematic.GetEnrichedCreditLedgerResponse>;
445
- private __getEnrichedCreditLedger;
446
- /**
447
- * @param {Schematic.CountCreditLedgerRequest} request
448
- * @param {CreditsClient.RequestOptions} requestOptions - Request-specific configuration.
449
- *
450
- * @throws {@link Schematic.BadRequestError}
451
- * @throws {@link Schematic.UnauthorizedError}
452
- * @throws {@link Schematic.ForbiddenError}
453
- * @throws {@link Schematic.NotFoundError}
454
- * @throws {@link Schematic.InternalServerError}
455
- *
456
- * @example
457
- * await client.credits.countCreditLedger({
458
- * companyId: "company_id",
459
- * billingCreditId: "billing_credit_id",
460
- * featureId: "feature_id",
461
- * period: "daily",
462
- * startTime: "start_time",
463
- * endTime: "end_time",
464
- * limit: 1000000,
465
- * offset: 1000000
466
- * })
467
- */
468
- countCreditLedger(request: Schematic.CountCreditLedgerRequest, requestOptions?: CreditsClient.RequestOptions): core.HttpResponsePromise<Schematic.CountCreditLedgerResponse>;
469
- private __countCreditLedger;
470
422
  /**
471
423
  * @param {Schematic.ListBillingPlanCreditGrantsRequest} request
472
424
  * @param {CreditsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -5,13 +5,11 @@ export type { CountBillingPlanCreditGrantsRequest } from "./CountBillingPlanCred
5
5
  export type { CountCompanyGrantsRequest } from "./CountCompanyGrantsRequest";
6
6
  export type { CountCreditBundlesRequest } from "./CountCreditBundlesRequest";
7
7
  export type { CountCreditEventLedgerRequest } from "./CountCreditEventLedgerRequest";
8
- export type { CountCreditLedgerRequest } from "./CountCreditLedgerRequest";
9
8
  export type { CreateBillingCreditRequestBody } from "./CreateBillingCreditRequestBody";
10
9
  export type { CreateCompanyCreditGrant } from "./CreateCompanyCreditGrant";
11
10
  export type { CreateCreditBundleRequestBody } from "./CreateCreditBundleRequestBody";
12
11
  export type { DeleteBillingPlanCreditGrantRequest } from "./DeleteBillingPlanCreditGrantRequest";
13
12
  export type { ExtendCreditLeaseRequestBody } from "./ExtendCreditLeaseRequestBody";
14
- export type { GetEnrichedCreditLedgerRequest } from "./GetEnrichedCreditLedgerRequest";
15
13
  export type { ListBillingCreditsRequest } from "./ListBillingCreditsRequest";
16
14
  export type { ListBillingPlanCreditGrantsRequest } from "./ListBillingPlanCreditGrantsRequest";
17
15
  export type { ListCompanyCreditBalancesRequest } from "./ListCompanyCreditBalancesRequest";
@@ -11,8 +11,6 @@ export * from "./CountCreditBundlesParams";
11
11
  export * from "./CountCreditBundlesResponse";
12
12
  export * from "./CountCreditEventLedgerParams";
13
13
  export * from "./CountCreditEventLedgerResponse";
14
- export * from "./CountCreditLedgerParams";
15
- export * from "./CountCreditLedgerResponse";
16
14
  export * from "./CreateBillingCreditResponse";
17
15
  export * from "./CreateBillingPlanCreditGrantResponse";
18
16
  export * from "./CreateCreditBundleResponse";
@@ -21,8 +19,6 @@ export * from "./DeleteBillingPlanCreditGrantResponse";
21
19
  export * from "./DeleteCreditBundleResponse";
22
20
  export * from "./ExtendCreditLeaseResponse";
23
21
  export * from "./GetCreditBundleResponse";
24
- export * from "./GetEnrichedCreditLedgerParams";
25
- export * from "./GetEnrichedCreditLedgerResponse";
26
22
  export * from "./GetSingleBillingCreditResponse";
27
23
  export * from "./GetSingleBillingPlanCreditGrantResponse";
28
24
  export * from "./GrantBillingCreditsToCompanyResponse";
@@ -43,6 +43,7 @@ export declare class PlangroupsClient {
43
43
  * checkoutCollectEmail: true,
44
44
  * checkoutCollectPhone: true,
45
45
  * enableTaxCollection: true,
46
+ * optInEnabled: true,
46
47
  * orderedAddOns: [{
47
48
  * planId: "plan_id"
48
49
  * }],
@@ -84,6 +85,7 @@ export declare class PlangroupsClient {
84
85
  * checkoutCollectEmail: true,
85
86
  * checkoutCollectPhone: true,
86
87
  * enableTaxCollection: true,
88
+ * optInEnabled: true,
87
89
  * orderedAddOns: [{
88
90
  * planId: "plan_id"
89
91
  * }],
@@ -7,6 +7,7 @@ import type * as Schematic from "../../../../index";
7
7
  * checkoutCollectEmail: true,
8
8
  * checkoutCollectPhone: true,
9
9
  * enableTaxCollection: true,
10
+ * optInEnabled: true,
10
11
  * orderedAddOns: [{
11
12
  * planId: "plan_id"
12
13
  * }],
@@ -42,6 +43,9 @@ export interface CreatePlanGroupRequestBody {
42
43
  fallbackPlanId?: string;
43
44
  initialPlanId?: string;
44
45
  initialPlanPriceId?: string;
46
+ optInEnabled: boolean;
47
+ optInText?: string;
48
+ optInTitle?: string;
45
49
  orderedAddOns: Schematic.OrderedPlansInGroup[];
46
50
  orderedBundleList: Schematic.PlanGroupBundleOrder[];
47
51
  orderedPlans: Schematic.OrderedPlansInGroup[];
@@ -7,6 +7,7 @@ import type * as Schematic from "../../../../index";
7
7
  * checkoutCollectEmail: true,
8
8
  * checkoutCollectPhone: true,
9
9
  * enableTaxCollection: true,
10
+ * optInEnabled: true,
10
11
  * orderedAddOns: [{
11
12
  * planId: "plan_id"
12
13
  * }],
@@ -42,6 +43,9 @@ export interface UpdatePlanGroupRequestBody {
42
43
  fallbackPlanId?: string;
43
44
  initialPlanId?: string;
44
45
  initialPlanPriceId?: string;
46
+ optInEnabled: boolean;
47
+ optInText?: string;
48
+ optInTitle?: string;
45
49
  orderedAddOns: Schematic.OrderedPlansInGroup[];
46
50
  orderedBundleList: Schematic.PlanGroupBundleOrder[];
47
51
  orderedPlans: Schematic.OrderedPlansInGroup[];
@@ -81,11 +81,7 @@ export declare class PlansClient {
81
81
  *
82
82
  * @example
83
83
  * await client.plans.retryCustomPlanBilling("custom_plan_billing_id", {
84
- * customerEmail: "customer_email",
85
- * payInAdvance: [{
86
- * priceId: "price_id",
87
- * quantity: 1000000
88
- * }]
84
+ * customerEmail: "customer_email"
89
85
  * })
90
86
  */
91
87
  retryCustomPlanBilling(custom_plan_billing_id: string, request: Schematic.RetryCustomPlanBillingRequestBody, requestOptions?: PlansClient.RequestOptions): core.HttpResponsePromise<Schematic.RetryCustomPlanBillingResponse>;
@@ -374,11 +370,7 @@ export declare class PlansClient {
374
370
  * @example
375
371
  * await client.plans.publishPlanVersion("plan_id", {
376
372
  * excludedCompanyIds: ["excluded_company_ids"],
377
- * migrationStrategy: "immediate",
378
- * payInAdvance: [{
379
- * priceId: "price_id",
380
- * quantity: 1000000
381
- * }]
373
+ * migrationStrategy: "immediate"
382
374
  * })
383
375
  */
384
376
  publishPlanVersion(plan_id: string, request: Schematic.PublishPlanVersionRequestBody, requestOptions?: PlansClient.RequestOptions): core.HttpResponsePromise<Schematic.PublishPlanVersionResponse>;
@@ -3,11 +3,7 @@ import type * as Schematic from "../../../../index";
3
3
  * @example
4
4
  * {
5
5
  * excludedCompanyIds: ["excluded_company_ids"],
6
- * migrationStrategy: "immediate",
7
- * payInAdvance: [{
8
- * priceId: "price_id",
9
- * quantity: 1000000
10
- * }]
6
+ * migrationStrategy: "immediate"
11
7
  * }
12
8
  */
13
9
  export interface PublishPlanVersionRequestBody {
@@ -16,5 +12,4 @@ export interface PublishPlanVersionRequestBody {
16
12
  daysUntilDue?: number;
17
13
  excludedCompanyIds: string[];
18
14
  migrationStrategy: Schematic.PlanVersionMigrationStrategy;
19
- payInAdvance: Schematic.UpdatePayInAdvanceRequestBody[];
20
15
  }
@@ -2,16 +2,11 @@ import type * as Schematic from "../../../../index";
2
2
  /**
3
3
  * @example
4
4
  * {
5
- * customerEmail: "customer_email",
6
- * payInAdvance: [{
7
- * priceId: "price_id",
8
- * quantity: 1000000
9
- * }]
5
+ * customerEmail: "customer_email"
10
6
  * }
11
7
  */
12
8
  export interface RetryCustomPlanBillingRequestBody {
13
9
  activationStrategy?: Schematic.CustomPlanActivationStrategy;
14
10
  customerEmail: string;
15
11
  daysUntilDue?: number;
16
- payInAdvance: Schematic.UpdatePayInAdvanceRequestBody[];
17
12
  }
@@ -149,6 +149,24 @@ export declare class WebhooksClient {
149
149
  */
150
150
  deleteWebhook(webhook_id: string, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Schematic.DeleteWebhookResponse>;
151
151
  private __deleteWebhook;
152
+ /**
153
+ * @param {string} webhook_id - webhook_id
154
+ * @param {Schematic.TestWebhookRequestBody} request
155
+ * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
156
+ *
157
+ * @throws {@link Schematic.BadRequestError}
158
+ * @throws {@link Schematic.UnauthorizedError}
159
+ * @throws {@link Schematic.ForbiddenError}
160
+ * @throws {@link Schematic.NotFoundError}
161
+ * @throws {@link Schematic.InternalServerError}
162
+ *
163
+ * @example
164
+ * await client.webhooks.sendTestWebhookAction("webhook_id", {
165
+ * requestType: "subscription.trial.ended"
166
+ * })
167
+ */
168
+ sendTestWebhookAction(webhook_id: string, request: Schematic.TestWebhookRequestBody, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Schematic.SendTestWebhookActionResponse>;
169
+ private __sendTestWebhookAction;
152
170
  /**
153
171
  * @param {Schematic.CountWebhooksRequest} request
154
172
  * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -0,0 +1,10 @@
1
+ import type * as Schematic from "../../../../index";
2
+ /**
3
+ * @example
4
+ * {
5
+ * requestType: "subscription.trial.ended"
6
+ * }
7
+ */
8
+ export interface TestWebhookRequestBody {
9
+ requestType: Schematic.WebhookRequestType;
10
+ }
@@ -3,4 +3,5 @@ export type { CountWebhooksRequest } from "./CountWebhooksRequest";
3
3
  export type { CreateWebhookRequestBody } from "./CreateWebhookRequestBody";
4
4
  export type { ListWebhookEventsRequest } from "./ListWebhookEventsRequest";
5
5
  export type { ListWebhooksRequest } from "./ListWebhooksRequest";
6
+ export type { TestWebhookRequestBody } from "./TestWebhookRequestBody";
6
7
  export type { UpdateWebhookRequestBody } from "./UpdateWebhookRequestBody";
@@ -0,0 +1,6 @@
1
+ import type * as Schematic from "../../../index";
2
+ export interface SendTestWebhookActionResponse {
3
+ data: Schematic.TestWebhookResponseData;
4
+ /** Input parameters */
5
+ params: Record<string, unknown>;
6
+ }
@@ -10,4 +10,5 @@ export * from "./ListWebhookEventsParams";
10
10
  export * from "./ListWebhookEventsResponse";
11
11
  export * from "./ListWebhooksParams";
12
12
  export * from "./ListWebhooksResponse";
13
+ export * from "./SendTestWebhookActionResponse";
13
14
  export * from "./UpdateWebhookResponse";
@@ -1,5 +1,4 @@
1
1
  export declare const AccountMemberPermission: {
2
- readonly BillingCreditsEdit: "billing_credits_edit";
3
2
  readonly CompaniesEdit: "companies_edit";
4
3
  readonly CompanyUsersEdit: "company_users_edit";
5
4
  readonly ComponentsEdit: "components_edit";
@@ -3,5 +3,6 @@ export declare const BillingCreditGrantZeroedOutReason: {
3
3
  readonly Manual: "manual";
4
4
  readonly PlanChange: "plan_change";
5
5
  readonly PlanPeriodReset: "plan_period_reset";
6
+ readonly Reconciled: "reconciled";
6
7
  };
7
8
  export type BillingCreditGrantZeroedOutReason = (typeof BillingCreditGrantZeroedOutReason)[keyof typeof BillingCreditGrantZeroedOutReason];
@@ -8,6 +8,7 @@ export interface ChangeSubscriptionInternalRequestBody {
8
8
  customFieldValues: Schematic.CheckoutFieldValue[];
9
9
  newPlanId: string;
10
10
  newPriceId: string;
11
+ optInAccepted?: boolean;
11
12
  payInAdvance: Schematic.UpdatePayInAdvanceRequestBody[];
12
13
  paymentMethodId?: string;
13
14
  promoCode?: string;
@@ -7,6 +7,7 @@ export interface ChangeSubscriptionRequestBody {
7
7
  customFieldValues: Schematic.CheckoutFieldValue[];
8
8
  newPlanId: string;
9
9
  newPriceId: string;
10
+ optInAccepted?: boolean;
10
11
  payInAdvance: Schematic.UpdatePayInAdvanceRequestBody[];
11
12
  paymentMethodId?: string;
12
13
  promoCode?: string;
@@ -1,5 +1,7 @@
1
1
  import type * as Schematic from "../index";
2
2
  export interface CheckFlagsResponseData {
3
+ /** Lease-aware credit balances keyed by credit ID, covering every credit type the company holds a balance in */
4
+ creditBalances?: Record<string, Schematic.CompanyCreditBalance>;
3
5
  flags: Schematic.CheckFlagResponseData[];
4
6
  plan?: Schematic.DatastreamCompanyPlan;
5
7
  }
@@ -2,4 +2,7 @@ export interface CheckoutSettingsResponseData {
2
2
  collectAddress: boolean;
3
3
  collectEmail: boolean;
4
4
  collectPhone: boolean;
5
+ optInEnabled: boolean;
6
+ optInText?: string;
7
+ optInTitle?: string;
5
8
  }
@@ -0,0 +1,8 @@
1
+ export interface CompanyCreditBalance {
2
+ /** Remaining credit, excluding any open lease hold (the value SDKs gate on) */
3
+ remaining: number;
4
+ /** Amount held by the company's open credit lease, 0 when none is open */
5
+ reserved: number;
6
+ /** Spendable balance including the open lease hold (remaining + reserved) */
7
+ settled: number;
8
+ }
@@ -7,6 +7,7 @@ export interface CompanySubscriptionResponseData {
7
7
  discounts: Schematic.BillingSubscriptionDiscountView[];
8
8
  expiredAt?: Date;
9
9
  interval: string;
10
+ isInitial: boolean;
10
11
  latestInvoice?: Schematic.InvoiceResponseData;
11
12
  paymentMethod?: Schematic.PaymentMethodResponseData;
12
13
  products: Schematic.BillingProductForSubscriptionResponseData[];
@@ -2,16 +2,24 @@ import type * as Schematic from "../index";
2
2
  export interface FeatureEntitlement {
3
3
  /** If the company has a numeric entitlement for this feature, the allocated amount */
4
4
  allocation?: number;
5
+ /** If the company has a credit-based entitlement for this feature, the credit cost per unit of usage */
6
+ consumptionRate?: number;
5
7
  /** If the company has a credit-based entitlement for this feature, the ID of the credit */
6
8
  creditId?: string;
7
- /** If the company has a credit-based entitlement for this feature, the remaining credit amount */
9
+ /** If the company has a credit-based entitlement for this feature, the credit available to fund new consumption or a new lease hold — open lease holds are excluded. Clients that hold a lease should gate on this plus their own unspent hold; clients with no lease awareness should use credit_settled instead */
8
10
  creditRemaining?: number;
11
+ /** If the company has a credit-based entitlement for this feature, the unspent amount held by an open credit lease. Returns to credit_remaining when the lease is released */
12
+ creditReserved?: number;
13
+ /** If the company has a credit-based entitlement for this feature, the balance net of actual consumption, unaffected by open lease holds (credit_remaining plus credit_reserved). The number to display to end users */
14
+ creditSettled?: number;
9
15
  /** If the company has a credit-based entitlement for this feature, the total credit amount */
10
16
  creditTotal?: number;
11
17
  /** If the company has a credit-based entitlement for this feature, the amount of credit used */
12
18
  creditUsed?: number;
13
19
  /** If the feature is event-based, the name of the event tracked for usage */
14
20
  eventName?: string;
21
+ /** For event-based or credit-metered feature entitlements, the event subtype whose usage is tracked */
22
+ eventSubtype?: string;
15
23
  /** The ID of the feature */
16
24
  featureId: string;
17
25
  /** The key of the flag associated with the feature */
@@ -16,6 +16,8 @@ export interface PlanChangeResponseData {
16
16
  createdAt: Date;
17
17
  environmentId: string;
18
18
  id: string;
19
+ /** True when this change moved the company to a different version of the same plan (e.g. a plan version migration) rather than to a different plan. */
20
+ isVersionUpgrade: boolean;
19
21
  previousBasePlan?: Schematic.PlanSnapshotView;
20
22
  /** The plan version of the previous base plan before this change. */
21
23
  previousBasePlanVersion?: Schematic.PlanVersionSnapshotView;
@@ -5,6 +5,9 @@ export interface PreviewSubscriptionChangeResponseData {
5
5
  finance?: Schematic.PreviewSubscriptionFinanceResponseData;
6
6
  isScheduledDowngrade: boolean;
7
7
  newCharges: number;
8
+ optInRequired: boolean;
9
+ optInText?: string;
10
+ optInTitle?: string;
8
11
  paymentMethodRequired: boolean;
9
12
  percentOff: number;
10
13
  periodStart: Date;
@@ -2,16 +2,24 @@ import type * as Schematic from "../index";
2
2
  export interface RulesengineFeatureEntitlement {
3
3
  /** If the company has a numeric entitlement for this feature, the allocated amount */
4
4
  allocation?: number;
5
+ /** If the company has a credit-based entitlement for this feature, the credit cost per unit of usage */
6
+ consumptionRate?: number;
5
7
  /** If the company has a credit-based entitlement for this feature, the ID of the credit */
6
8
  creditId?: string;
7
- /** If the company has a credit-based entitlement for this feature, the remaining credit amount */
9
+ /** If the company has a credit-based entitlement for this feature, the credit available to fund new consumption or a new lease hold — open lease holds are excluded. Clients that hold a lease should gate on this plus their own unspent hold; clients with no lease awareness should use credit_settled instead */
8
10
  creditRemaining?: number;
11
+ /** If the company has a credit-based entitlement for this feature, the unspent amount held by an open credit lease. Returns to credit_remaining when the lease is released */
12
+ creditReserved?: number;
13
+ /** If the company has a credit-based entitlement for this feature, the balance net of actual consumption, unaffected by open lease holds (credit_remaining plus credit_reserved). The number to display to end users */
14
+ creditSettled?: number;
9
15
  /** If the company has a credit-based entitlement for this feature, the total credit amount */
10
16
  creditTotal?: number;
11
17
  /** If the company has a credit-based entitlement for this feature, the amount of credit used */
12
18
  creditUsed?: number;
13
19
  /** If the feature is event-based, the name of the event tracked for usage */
14
20
  eventName?: string;
21
+ /** For event-based or credit-metered feature entitlements, the event subtype whose usage is tracked */
22
+ eventSubtype?: string;
15
23
  /** The ID of the feature */
16
24
  featureId: string;
17
25
  /** The key of the flag associated with the feature */
@@ -0,0 +1,4 @@
1
+ export interface TestWebhookResponseData {
2
+ responseCode: number;
3
+ success: boolean;
4
+ }
@@ -73,6 +73,7 @@ export * from "./CheckoutFieldWithValue";
73
73
  export * from "./CheckoutSettingsResponseData";
74
74
  export * from "./CheckoutSubscription";
75
75
  export * from "./ClerkIntegrationConfig";
76
+ export * from "./CompanyCreditBalance";
76
77
  export * from "./CompanyCreditBalanceResponseData";
77
78
  export * from "./CompanyDetailResponseData";
78
79
  export * from "./CompanyEventPeriodMetricsResponseData";
@@ -137,8 +138,6 @@ export * from "./CreditGrantDetail";
137
138
  export * from "./CreditGrantExpiryRequestBody";
138
139
  export * from "./CreditGrantSortOrder";
139
140
  export * from "./CreditLeaseResponseData";
140
- export * from "./CreditLedgerEnrichedEntryResponseData";
141
- export * from "./CreditLedgerPeriod";
142
141
  export * from "./CreditsAutoTopupCompanySummary";
143
142
  export * from "./CreditsAutoTopupCreditSummary";
144
143
  export * from "./CreditsAutoTopupHardFailure";
@@ -341,6 +340,7 @@ export * from "./SubscriptionTraitUpdate";
341
340
  export * from "./SubscriptionType";
342
341
  export * from "./TemporaryAccessTokenResourceType";
343
342
  export * from "./TemporaryAccessTokenResponseData";
343
+ export * from "./TestWebhookResponseData";
344
344
  export * from "./TimeSeriesGranularity";
345
345
  export * from "./TopFeatureByUsageResponseData";
346
346
  export * from "./TopFeaturesByUsageResponseData";