@schematichq/schematic-typescript-node 1.3.0 → 1.3.1

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 (109) hide show
  1. package/dist/Client.d.ts +3 -0
  2. package/dist/api/resources/billing/client/Client.d.ts +0 -3
  3. package/dist/api/resources/billing/client/requests/CountBillingProductsRequest.d.ts +1 -1
  4. package/dist/api/resources/billing/client/requests/CountCustomersRequest.d.ts +0 -2
  5. package/dist/api/resources/billing/client/requests/CreateBillingCustomerRequestBody.d.ts +0 -2
  6. package/dist/api/resources/billing/client/requests/ListBillingProductsRequest.d.ts +1 -1
  7. package/dist/api/resources/billing/client/requests/ListCustomersWithSubscriptionsRequest.d.ts +0 -2
  8. package/dist/api/resources/billing/types/CountBillingProductsParams.d.ts +1 -1
  9. package/dist/api/resources/billing/types/CountCustomersParams.d.ts +0 -1
  10. package/dist/api/resources/billing/types/ListBillingProductsParams.d.ts +1 -1
  11. package/dist/api/resources/billing/types/ListCustomersWithSubscriptionsParams.d.ts +0 -1
  12. package/dist/api/resources/credits/client/Client.d.ts +21 -0
  13. package/dist/api/resources/credits/client/requests/CountCompanyGrantsRequest.d.ts +20 -0
  14. package/dist/api/resources/credits/client/requests/index.d.ts +1 -2
  15. package/dist/api/resources/credits/types/CountCompanyGrantsParams.d.ts +13 -0
  16. package/dist/api/resources/credits/types/CountCompanyGrantsResponse.d.ts +6 -0
  17. package/dist/api/resources/credits/types/index.d.ts +2 -0
  18. package/dist/api/resources/index.d.ts +3 -0
  19. package/dist/api/resources/planbundle/client/Client.d.ts +52 -0
  20. package/dist/api/resources/planbundle/client/index.d.ts +1 -0
  21. package/dist/api/resources/planbundle/client/requests/CreatePlanBundleRequestBody.d.ts +16 -0
  22. package/dist/api/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.d.ts +16 -0
  23. package/dist/api/resources/planbundle/client/requests/index.d.ts +2 -0
  24. package/dist/api/resources/planbundle/index.d.ts +2 -0
  25. package/dist/api/resources/planbundle/types/CreatePlanBundleResponse.d.ts +6 -0
  26. package/dist/api/resources/planbundle/types/UpdatePlanBundleResponse.d.ts +6 -0
  27. package/dist/api/resources/planbundle/types/index.d.ts +2 -0
  28. package/dist/api/resources/plans/client/requests/index.d.ts +0 -3
  29. package/dist/api/types/BillingCreditGrantResponseData.d.ts +2 -0
  30. package/dist/api/types/BillingCustomerResponseData.d.ts +0 -1
  31. package/dist/api/types/BillingCustomerWithSubscriptionsResponseData.d.ts +0 -1
  32. package/dist/api/types/CompanyPlanDetailResponseData.d.ts +1 -0
  33. package/dist/api/types/CompanyPlanWithBillingSubView.d.ts +1 -0
  34. package/dist/api/{resources/credits/client/requests → types}/CreateBillingPlanCreditGrantRequestBody.d.ts +1 -11
  35. package/dist/api/types/CreateEntitlementInBundleRequestBody.d.ts +29 -0
  36. package/dist/api/types/CreateEntitlementInBundleRequestBodyMetricPeriod.d.ts +7 -0
  37. package/dist/api/types/CreateEntitlementInBundleRequestBodyMetricPeriodMonthReset.d.ts +5 -0
  38. package/dist/api/types/CreatePlanRequestBody.d.ts +7 -0
  39. package/dist/api/types/CreditCompanyGrantView.d.ts +2 -0
  40. package/dist/api/types/DeleteBillingPlanCreditGrantRequestBody.d.ts +3 -0
  41. package/dist/api/types/EventDetailResponseData.d.ts +1 -1
  42. package/dist/api/types/EventResponseData.d.ts +1 -1
  43. package/dist/api/types/PlanBundleAction.d.ts +6 -0
  44. package/dist/api/types/PlanBundleCreditGrantRequestBody.d.ts +8 -0
  45. package/dist/api/types/PlanBundleEntitlementRequestBody.d.ts +6 -0
  46. package/dist/api/types/PlanBundleResponseData.d.ts +8 -0
  47. package/dist/api/types/PlanChangeSubscriptionAction.d.ts +1 -0
  48. package/dist/api/types/PlanDetailResponseData.d.ts +1 -0
  49. package/dist/api/types/PlanGroupPlanDetailResponseData.d.ts +1 -0
  50. package/dist/api/types/PlanVersionResponseData.d.ts +14 -0
  51. package/dist/api/types/PlanVersionStatus.d.ts +6 -0
  52. package/dist/api/types/RawEventResponseData.d.ts +1 -1
  53. package/dist/api/{resources/credits/client/requests → types}/UpdateBillingPlanCreditGrantRequestBody.d.ts +1 -8
  54. package/dist/api/{resources/plans/client/requests → types}/UpdatePlanRequestBody.d.ts +0 -6
  55. package/dist/api/{resources/plans/client/requests → types}/UpsertBillingProductRequestBody.d.ts +1 -8
  56. package/dist/api/types/WebhookRequestType.d.ts +2 -0
  57. package/dist/api/types/index.d.ts +15 -0
  58. package/dist/index.js +3 -3
  59. package/dist/serialization/resources/billing/client/requests/CreateBillingCustomerRequestBody.d.ts +0 -1
  60. package/dist/serialization/resources/billing/types/CountCustomersParams.d.ts +0 -1
  61. package/dist/serialization/resources/billing/types/ListCustomersWithSubscriptionsParams.d.ts +0 -1
  62. package/dist/serialization/resources/credits/client/requests/index.d.ts +0 -2
  63. package/dist/serialization/resources/credits/types/CountCompanyGrantsParams.d.ts +15 -0
  64. package/dist/serialization/resources/credits/types/CountCompanyGrantsResponse.d.ts +12 -0
  65. package/dist/serialization/resources/credits/types/index.d.ts +2 -0
  66. package/dist/serialization/resources/index.d.ts +3 -0
  67. package/dist/serialization/resources/planbundle/client/index.d.ts +1 -0
  68. package/dist/serialization/resources/planbundle/client/requests/CreatePlanBundleRequestBody.d.ts +18 -0
  69. package/dist/serialization/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.d.ts +18 -0
  70. package/dist/serialization/resources/planbundle/client/requests/index.d.ts +2 -0
  71. package/dist/serialization/resources/planbundle/index.d.ts +2 -0
  72. package/dist/serialization/resources/planbundle/types/CreatePlanBundleResponse.d.ts +11 -0
  73. package/dist/serialization/resources/planbundle/types/UpdatePlanBundleResponse.d.ts +11 -0
  74. package/dist/serialization/resources/planbundle/types/index.d.ts +2 -0
  75. package/dist/serialization/resources/plans/client/requests/index.d.ts +0 -3
  76. package/dist/serialization/types/BillingCreditGrantResponseData.d.ts +3 -0
  77. package/dist/serialization/types/BillingCustomerResponseData.d.ts +0 -1
  78. package/dist/serialization/types/BillingCustomerWithSubscriptionsResponseData.d.ts +0 -1
  79. package/dist/serialization/types/CompanyPlanDetailResponseData.d.ts +2 -0
  80. package/dist/serialization/types/CompanyPlanWithBillingSubView.d.ts +1 -0
  81. package/dist/serialization/{resources/credits/client/requests → types}/CreateBillingPlanCreditGrantRequestBody.d.ts +10 -10
  82. package/dist/serialization/types/CreateEntitlementInBundleRequestBody.d.ts +39 -0
  83. package/dist/serialization/types/CreateEntitlementInBundleRequestBodyMetricPeriod.d.ts +7 -0
  84. package/dist/serialization/types/CreateEntitlementInBundleRequestBodyMetricPeriodMonthReset.d.ts +7 -0
  85. package/dist/serialization/types/CreatePlanRequestBody.d.ts +13 -0
  86. package/dist/serialization/types/CreditCompanyGrantView.d.ts +3 -0
  87. package/dist/serialization/types/DeleteBillingPlanCreditGrantRequestBody.d.ts +9 -0
  88. package/dist/serialization/types/EventDetailResponseData.d.ts +1 -1
  89. package/dist/serialization/types/EventResponseData.d.ts +1 -1
  90. package/dist/serialization/types/PlanBundleAction.d.ts +7 -0
  91. package/dist/serialization/types/PlanBundleCreditGrantRequestBody.d.ts +17 -0
  92. package/dist/serialization/types/PlanBundleEntitlementRequestBody.d.ts +13 -0
  93. package/dist/serialization/types/PlanBundleResponseData.d.ts +18 -0
  94. package/dist/serialization/types/PlanChangeSubscriptionAction.d.ts +1 -1
  95. package/dist/serialization/types/PlanDetailResponseData.d.ts +2 -0
  96. package/dist/serialization/types/PlanGroupPlanDetailResponseData.d.ts +2 -0
  97. package/dist/serialization/types/PlanVersionResponseData.d.ts +21 -0
  98. package/dist/serialization/types/PlanVersionStatus.d.ts +7 -0
  99. package/dist/serialization/types/RawEventResponseData.d.ts +1 -1
  100. package/dist/serialization/{resources/credits/client/requests → types}/UpdateBillingPlanCreditGrantRequestBody.d.ts +10 -10
  101. package/dist/serialization/types/UpdatePlanRequestBody.d.ts +11 -0
  102. package/dist/serialization/{resources/plans/client/requests → types}/UpsertBillingProductRequestBody.d.ts +5 -5
  103. package/dist/serialization/types/WebhookRequestType.d.ts +1 -1
  104. package/dist/serialization/types/index.d.ts +15 -0
  105. package/dist/wrapper.d.ts +10 -1
  106. package/package.json +1 -1
  107. package/dist/api/resources/plans/client/requests/CreatePlanRequestBody.d.ts +0 -15
  108. package/dist/serialization/resources/plans/client/requests/CreatePlanRequestBody.d.ts +0 -13
  109. package/dist/serialization/resources/plans/client/requests/UpdatePlanRequestBody.d.ts +0 -11
package/dist/Client.d.ts CHANGED
@@ -9,6 +9,7 @@ import { DataexportsClient } from "./api/resources/dataexports/client/Client";
9
9
  import { EntitlementsClient } from "./api/resources/entitlements/client/Client";
10
10
  import { EventsClient } from "./api/resources/events/client/Client";
11
11
  import { FeaturesClient } from "./api/resources/features/client/Client";
12
+ import { PlanbundleClient } from "./api/resources/planbundle/client/Client";
12
13
  import { PlangroupsClient } from "./api/resources/plangroups/client/Client";
13
14
  import { PlansClient } from "./api/resources/plans/client/Client";
14
15
  import { WebhooksClient } from "./api/resources/webhooks/client/Client";
@@ -33,6 +34,7 @@ export declare class SchematicClient {
33
34
  protected _dataexports: DataexportsClient | undefined;
34
35
  protected _events: EventsClient | undefined;
35
36
  protected _features: FeaturesClient | undefined;
37
+ protected _planbundle: PlanbundleClient | undefined;
36
38
  protected _plangroups: PlangroupsClient | undefined;
37
39
  protected _accesstokens: AccesstokensClient | undefined;
38
40
  protected _webhooks: WebhooksClient | undefined;
@@ -48,6 +50,7 @@ export declare class SchematicClient {
48
50
  get dataexports(): DataexportsClient;
49
51
  get events(): EventsClient;
50
52
  get features(): FeaturesClient;
53
+ get planbundle(): PlanbundleClient;
51
54
  get plangroups(): PlangroupsClient;
52
55
  get accesstokens(): AccesstokensClient;
53
56
  get webhooks(): WebhooksClient;
@@ -68,7 +68,6 @@ export declare class BillingClient {
68
68
  * await client.billing.upsertBillingCustomer({
69
69
  * email: "email",
70
70
  * externalId: "external_id",
71
- * failedToImport: true,
72
71
  * meta: {
73
72
  * "key": "value"
74
73
  * },
@@ -89,7 +88,6 @@ export declare class BillingClient {
89
88
  *
90
89
  * @example
91
90
  * await client.billing.listCustomersWithSubscriptions({
92
- * failedToImport: true,
93
91
  * name: "name",
94
92
  * providerType: "schematic",
95
93
  * q: "q",
@@ -111,7 +109,6 @@ export declare class BillingClient {
111
109
  *
112
110
  * @example
113
111
  * await client.billing.countCustomers({
114
- * failedToImport: true,
115
112
  * name: "name",
116
113
  * providerType: "schematic",
117
114
  * q: "q",
@@ -17,7 +17,7 @@ import type * as Schematic from "../../../../index";
17
17
  */
18
18
  export interface CountBillingProductsRequest {
19
19
  ids?: string | string[];
20
- /** Filter products that are active */
20
+ /** Filter products that are active. Defaults to true if not specified */
21
21
  isActive?: boolean;
22
22
  name?: string;
23
23
  priceUsageType?: Schematic.BillingPriceUsageType;
@@ -2,7 +2,6 @@ import type * as Schematic from "../../../../index";
2
2
  /**
3
3
  * @example
4
4
  * {
5
- * failedToImport: true,
6
5
  * name: "name",
7
6
  * providerType: "schematic",
8
7
  * q: "q",
@@ -12,7 +11,6 @@ import type * as Schematic from "../../../../index";
12
11
  */
13
12
  export interface CountCustomersRequest {
14
13
  companyIds?: string | string[];
15
- failedToImport?: boolean;
16
14
  name?: string;
17
15
  providerType?: Schematic.BillingProviderType;
18
16
  q?: string;
@@ -4,7 +4,6 @@ import type * as Schematic from "../../../../index";
4
4
  * {
5
5
  * email: "email",
6
6
  * externalId: "external_id",
7
- * failedToImport: true,
8
7
  * meta: {
9
8
  * "key": "value"
10
9
  * },
@@ -16,7 +15,6 @@ export interface CreateBillingCustomerRequestBody {
16
15
  defaultPaymentMethodId?: string;
17
16
  email: string;
18
17
  externalId: string;
19
- failedToImport: boolean;
20
18
  meta: Record<string, string>;
21
19
  name: string;
22
20
  providerType?: Schematic.BillingProviderType;
@@ -17,7 +17,7 @@ import type * as Schematic from "../../../../index";
17
17
  */
18
18
  export interface ListBillingProductsRequest {
19
19
  ids?: string | string[];
20
- /** Filter products that are active */
20
+ /** Filter products that are active. Defaults to true if not specified */
21
21
  isActive?: boolean;
22
22
  name?: string;
23
23
  priceUsageType?: Schematic.BillingPriceUsageType;
@@ -2,7 +2,6 @@ import type * as Schematic from "../../../../index";
2
2
  /**
3
3
  * @example
4
4
  * {
5
- * failedToImport: true,
6
5
  * name: "name",
7
6
  * providerType: "schematic",
8
7
  * q: "q",
@@ -12,7 +11,6 @@ import type * as Schematic from "../../../../index";
12
11
  */
13
12
  export interface ListCustomersWithSubscriptionsRequest {
14
13
  companyIds?: string | string[];
15
- failedToImport?: boolean;
16
14
  name?: string;
17
15
  providerType?: Schematic.BillingProviderType;
18
16
  q?: string;
@@ -4,7 +4,7 @@ import type * as Schematic from "../../../index";
4
4
  */
5
5
  export interface CountBillingProductsParams {
6
6
  ids?: string[];
7
- /** Filter products that are active */
7
+ /** Filter products that are active. Defaults to true if not specified */
8
8
  isActive?: boolean;
9
9
  /** Page limit (default 100) */
10
10
  limit?: number;
@@ -4,7 +4,6 @@ import type * as Schematic from "../../../index";
4
4
  */
5
5
  export interface CountCustomersParams {
6
6
  companyIds?: string[];
7
- failedToImport?: boolean;
8
7
  /** Page limit (default 100) */
9
8
  limit?: number;
10
9
  name?: string;
@@ -4,7 +4,7 @@ import type * as Schematic from "../../../index";
4
4
  */
5
5
  export interface ListBillingProductsParams {
6
6
  ids?: string[];
7
- /** Filter products that are active */
7
+ /** Filter products that are active. Defaults to true if not specified */
8
8
  isActive?: boolean;
9
9
  /** Page limit (default 100) */
10
10
  limit?: number;
@@ -4,7 +4,6 @@ import type * as Schematic from "../../../index";
4
4
  */
5
5
  export interface ListCustomersWithSubscriptionsParams {
6
6
  companyIds?: string[];
7
- failedToImport?: boolean;
8
7
  /** Page limit (default 100) */
9
8
  limit?: number;
10
9
  name?: string;
@@ -261,6 +261,27 @@ export declare class CreditsClient {
261
261
  */
262
262
  grantBillingCreditsToCompany(request: Schematic.CreateCompanyCreditGrant, requestOptions?: CreditsClient.RequestOptions): core.HttpResponsePromise<Schematic.GrantBillingCreditsToCompanyResponse>;
263
263
  private __grantBillingCreditsToCompany;
264
+ /**
265
+ * @param {Schematic.CountCompanyGrantsRequest} request
266
+ * @param {CreditsClient.RequestOptions} requestOptions - Request-specific configuration.
267
+ *
268
+ * @throws {@link Schematic.BadRequestError}
269
+ * @throws {@link Schematic.UnauthorizedError}
270
+ * @throws {@link Schematic.ForbiddenError}
271
+ * @throws {@link Schematic.NotFoundError}
272
+ * @throws {@link Schematic.InternalServerError}
273
+ *
274
+ * @example
275
+ * await client.credits.countCompanyGrants({
276
+ * companyId: "company_id",
277
+ * order: "created_at",
278
+ * dir: "asc",
279
+ * limit: 1,
280
+ * offset: 1
281
+ * })
282
+ */
283
+ countCompanyGrants(request?: Schematic.CountCompanyGrantsRequest, requestOptions?: CreditsClient.RequestOptions): core.HttpResponsePromise<Schematic.CountCompanyGrantsResponse>;
284
+ private __countCompanyGrants;
264
285
  /**
265
286
  * @param {Schematic.ListCompanyGrantsRequest} request
266
287
  * @param {CreditsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -0,0 +1,20 @@
1
+ import type * as Schematic from "../../../../index";
2
+ /**
3
+ * @example
4
+ * {
5
+ * companyId: "company_id",
6
+ * order: "created_at",
7
+ * dir: "asc",
8
+ * limit: 1,
9
+ * offset: 1
10
+ * }
11
+ */
12
+ export interface CountCompanyGrantsRequest {
13
+ companyId?: string;
14
+ order?: Schematic.CreditGrantSortOrder;
15
+ dir?: Schematic.SortDirection;
16
+ /** Page limit (default 100) */
17
+ limit?: number;
18
+ /** Page offset (default 0) */
19
+ offset?: number;
20
+ }
@@ -1,10 +1,10 @@
1
1
  export type { CountBillingCreditsGrantsRequest } from "./CountBillingCreditsGrantsRequest";
2
2
  export type { CountBillingCreditsRequest } from "./CountBillingCreditsRequest";
3
3
  export type { CountBillingPlanCreditGrantsRequest } from "./CountBillingPlanCreditGrantsRequest";
4
+ export type { CountCompanyGrantsRequest } from "./CountCompanyGrantsRequest";
4
5
  export type { CountCreditBundlesRequest } from "./CountCreditBundlesRequest";
5
6
  export type { CountCreditLedgerRequest } from "./CountCreditLedgerRequest";
6
7
  export type { CreateBillingCreditRequestBody } from "./CreateBillingCreditRequestBody";
7
- export type { CreateBillingPlanCreditGrantRequestBody } from "./CreateBillingPlanCreditGrantRequestBody";
8
8
  export type { CreateCompanyCreditGrant } from "./CreateCompanyCreditGrant";
9
9
  export type { CreateCreditBundleRequestBody } from "./CreateCreditBundleRequestBody";
10
10
  export type { DeleteBillingPlanCreditGrantRequest } from "./DeleteBillingPlanCreditGrantRequest";
@@ -15,6 +15,5 @@ export type { ListCompanyGrantsRequest } from "./ListCompanyGrantsRequest";
15
15
  export type { ListCreditBundlesRequest } from "./ListCreditBundlesRequest";
16
16
  export type { ListGrantsForCreditRequest } from "./ListGrantsForCreditRequest";
17
17
  export type { UpdateBillingCreditRequestBody } from "./UpdateBillingCreditRequestBody";
18
- export type { UpdateBillingPlanCreditGrantRequestBody } from "./UpdateBillingPlanCreditGrantRequestBody";
19
18
  export type { UpdateCreditBundleDetailsRequestBody } from "./UpdateCreditBundleDetailsRequestBody";
20
19
  export type { ZeroOutGrantRequestBody } from "./ZeroOutGrantRequestBody";
@@ -0,0 +1,13 @@
1
+ import type * as Schematic from "../../../index";
2
+ /**
3
+ * Input parameters
4
+ */
5
+ export interface CountCompanyGrantsParams {
6
+ companyId?: string;
7
+ dir?: Schematic.SortDirection;
8
+ /** Page limit (default 100) */
9
+ limit?: number;
10
+ /** Page offset (default 0) */
11
+ offset?: number;
12
+ order?: Schematic.CreditGrantSortOrder;
13
+ }
@@ -0,0 +1,6 @@
1
+ import type * as Schematic from "../../../index";
2
+ export interface CountCompanyGrantsResponse {
3
+ data: Schematic.CountResponse;
4
+ /** Input parameters */
5
+ params: Schematic.CountCompanyGrantsParams;
6
+ }
@@ -4,6 +4,8 @@ export * from "./CountBillingCreditsParams";
4
4
  export * from "./CountBillingCreditsResponse";
5
5
  export * from "./CountBillingPlanCreditGrantsParams";
6
6
  export * from "./CountBillingPlanCreditGrantsResponse";
7
+ export * from "./CountCompanyGrantsParams";
8
+ export * from "./CountCompanyGrantsResponse";
7
9
  export * from "./CountCreditBundlesParams";
8
10
  export * from "./CountCreditBundlesResponse";
9
11
  export * from "./CountCreditLedgerParams";
@@ -31,6 +31,9 @@ export * from "./events/types";
31
31
  export * as features from "./features";
32
32
  export * from "./features/client/requests";
33
33
  export * from "./features/types";
34
+ export * as planbundle from "./planbundle";
35
+ export * from "./planbundle/client/requests";
36
+ export * from "./planbundle/types";
34
37
  export * as plangroups from "./plangroups";
35
38
  export * from "./plangroups/client/requests";
36
39
  export * from "./plangroups/types";
@@ -0,0 +1,52 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient";
3
+ import * as core from "../../../../core";
4
+ import * as Schematic from "../../../index";
5
+ export declare namespace PlanbundleClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class PlanbundleClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<PlanbundleClient.Options>;
12
+ constructor(options: PlanbundleClient.Options);
13
+ /**
14
+ * @param {Schematic.CreatePlanBundleRequestBody} request
15
+ * @param {PlanbundleClient.RequestOptions} requestOptions - Request-specific configuration.
16
+ *
17
+ * @throws {@link Schematic.BadRequestError}
18
+ * @throws {@link Schematic.UnauthorizedError}
19
+ * @throws {@link Schematic.ForbiddenError}
20
+ * @throws {@link Schematic.NotFoundError}
21
+ * @throws {@link Schematic.InternalServerError}
22
+ *
23
+ * @example
24
+ * await client.planbundle.createPlanBundle({
25
+ * entitlements: [{
26
+ * action: "create"
27
+ * }]
28
+ * })
29
+ */
30
+ createPlanBundle(request: Schematic.CreatePlanBundleRequestBody, requestOptions?: PlanbundleClient.RequestOptions): core.HttpResponsePromise<Schematic.CreatePlanBundleResponse>;
31
+ private __createPlanBundle;
32
+ /**
33
+ * @param {string} plan_bundle_id - plan_bundle_id
34
+ * @param {Schematic.UpdatePlanBundleRequestBody} request
35
+ * @param {PlanbundleClient.RequestOptions} requestOptions - Request-specific configuration.
36
+ *
37
+ * @throws {@link Schematic.BadRequestError}
38
+ * @throws {@link Schematic.UnauthorizedError}
39
+ * @throws {@link Schematic.ForbiddenError}
40
+ * @throws {@link Schematic.NotFoundError}
41
+ * @throws {@link Schematic.InternalServerError}
42
+ *
43
+ * @example
44
+ * await client.planbundle.updatePlanBundle("plan_bundle_id", {
45
+ * entitlements: [{
46
+ * action: "create"
47
+ * }]
48
+ * })
49
+ */
50
+ updatePlanBundle(plan_bundle_id: string, request: Schematic.UpdatePlanBundleRequestBody, requestOptions?: PlanbundleClient.RequestOptions): core.HttpResponsePromise<Schematic.UpdatePlanBundleResponse>;
51
+ private __updatePlanBundle;
52
+ }
@@ -0,0 +1 @@
1
+ export * from "./requests";
@@ -0,0 +1,16 @@
1
+ import type * as Schematic from "../../../../index";
2
+ /**
3
+ * @example
4
+ * {
5
+ * entitlements: [{
6
+ * action: "create"
7
+ * }]
8
+ * }
9
+ */
10
+ export interface CreatePlanBundleRequestBody {
11
+ billingProduct?: Schematic.UpsertBillingProductRequestBody;
12
+ creditGrants?: Schematic.PlanBundleCreditGrantRequestBody[];
13
+ entitlements: Schematic.PlanBundleEntitlementRequestBody[];
14
+ plan?: Schematic.CreatePlanRequestBody;
15
+ traits?: Schematic.UpdatePlanTraitTraitRequestBody[];
16
+ }
@@ -0,0 +1,16 @@
1
+ import type * as Schematic from "../../../../index";
2
+ /**
3
+ * @example
4
+ * {
5
+ * entitlements: [{
6
+ * action: "create"
7
+ * }]
8
+ * }
9
+ */
10
+ export interface UpdatePlanBundleRequestBody {
11
+ billingProduct?: Schematic.UpsertBillingProductRequestBody;
12
+ creditGrants?: Schematic.PlanBundleCreditGrantRequestBody[];
13
+ entitlements: Schematic.PlanBundleEntitlementRequestBody[];
14
+ plan?: Schematic.UpdatePlanRequestBody;
15
+ traits?: Schematic.UpdatePlanTraitTraitRequestBody[];
16
+ }
@@ -0,0 +1,2 @@
1
+ export type { CreatePlanBundleRequestBody } from "./CreatePlanBundleRequestBody";
2
+ export type { UpdatePlanBundleRequestBody } from "./UpdatePlanBundleRequestBody";
@@ -0,0 +1,2 @@
1
+ export * from "./client";
2
+ export * from "./types";
@@ -0,0 +1,6 @@
1
+ import type * as Schematic from "../../../index";
2
+ export interface CreatePlanBundleResponse {
3
+ data: Schematic.PlanBundleResponseData;
4
+ /** Input parameters */
5
+ params: Record<string, unknown>;
6
+ }
@@ -0,0 +1,6 @@
1
+ import type * as Schematic from "../../../index";
2
+ export interface UpdatePlanBundleResponse {
3
+ data: Schematic.PlanBundleResponseData;
4
+ /** Input parameters */
5
+ params: Record<string, unknown>;
6
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./CreatePlanBundleResponse";
2
+ export * from "./UpdatePlanBundleResponse";
@@ -1,7 +1,4 @@
1
1
  export type { CountPlansRequest } from "./CountPlansRequest";
2
- export type { CreatePlanRequestBody } from "./CreatePlanRequestBody";
3
2
  export type { ListPlanIssuesRequest } from "./ListPlanIssuesRequest";
4
3
  export type { ListPlansRequest } from "./ListPlansRequest";
5
4
  export type { UpdateCompanyPlansRequestBody } from "./UpdateCompanyPlansRequestBody";
6
- export type { UpdatePlanRequestBody } from "./UpdatePlanRequestBody";
7
- export type { UpsertBillingProductRequestBody } from "./UpsertBillingProductRequestBody";
@@ -15,6 +15,8 @@ export interface BillingCreditGrantResponseData {
15
15
  quantity: number;
16
16
  quantityRemaining: number;
17
17
  quantityUsed: number;
18
+ renewalEnabled: boolean;
19
+ renewalPeriod?: Schematic.BillingPlanCreditGrantResetCadence;
18
20
  sourceLabel: string;
19
21
  transfers?: Schematic.CreditTransferResponseData[];
20
22
  updatedAt: Date;
@@ -4,7 +4,6 @@ export interface BillingCustomerResponseData {
4
4
  deletedAt?: Date;
5
5
  email: string;
6
6
  externalId: string;
7
- failedToImport: boolean;
8
7
  id: string;
9
8
  name: string;
10
9
  providerType: Schematic.BillingProviderType;
@@ -4,7 +4,6 @@ export interface BillingCustomerWithSubscriptionsResponseData {
4
4
  deletedAt?: Date;
5
5
  email: string;
6
6
  externalId: string;
7
- failedToImport: boolean;
8
7
  id: string;
9
8
  name: string;
10
9
  providerType: Schematic.BillingProviderType;
@@ -30,5 +30,6 @@ export interface CompanyPlanDetailResponseData {
30
30
  updatedAt: Date;
31
31
  usageViolations: Schematic.FeatureUsageResponseData[];
32
32
  valid: boolean;
33
+ versions: Schematic.PlanVersionResponseData[];
33
34
  yearlyPrice?: Schematic.BillingPriceResponseData;
34
35
  }
@@ -10,4 +10,5 @@ export interface CompanyPlanWithBillingSubView {
10
10
  name: string;
11
11
  planPeriod?: string;
12
12
  planPrice?: number;
13
+ planVersionId?: string;
13
14
  }
@@ -1,14 +1,4 @@
1
- import type * as Schematic from "../../../../index";
2
- /**
3
- * @example
4
- * {
5
- * creditAmount: 1,
6
- * creditId: "credit_id",
7
- * planId: "plan_id",
8
- * resetCadence: "daily",
9
- * resetStart: "billing_period"
10
- * }
11
- */
1
+ import type * as Schematic from "../index";
12
2
  export interface CreateBillingPlanCreditGrantRequestBody {
13
3
  applyToExisting?: boolean;
14
4
  autoTopupAmount?: number;
@@ -0,0 +1,29 @@
1
+ import type * as Schematic from "../index";
2
+ export interface CreateEntitlementInBundleRequestBody {
3
+ billingProductId?: string;
4
+ billingThreshold?: number;
5
+ creditConsumptionRate?: number;
6
+ currency?: string;
7
+ featureId: string;
8
+ metricPeriod?: Schematic.CreateEntitlementInBundleRequestBodyMetricPeriod;
9
+ metricPeriodMonthReset?: Schematic.CreateEntitlementInBundleRequestBodyMetricPeriodMonthReset;
10
+ monthlyMeteredPriceId?: string;
11
+ monthlyPriceTiers?: Schematic.CreatePriceTierRequestBody[];
12
+ monthlyUnitPrice?: number;
13
+ monthlyUnitPriceDecimal?: string;
14
+ overageBillingProductId?: string;
15
+ priceBehavior?: Schematic.EntitlementPriceBehavior;
16
+ /** Use MonthlyPriceTiers or YearlyPriceTiers instead */
17
+ priceTiers?: Schematic.CreatePriceTierRequestBody[];
18
+ softLimit?: number;
19
+ tierMode?: Schematic.BillingTiersMode;
20
+ valueBool?: boolean;
21
+ valueCreditId?: string;
22
+ valueNumeric?: number;
23
+ valueTraitId?: string;
24
+ valueType: Schematic.EntitlementValueType;
25
+ yearlyMeteredPriceId?: string;
26
+ yearlyPriceTiers?: Schematic.CreatePriceTierRequestBody[];
27
+ yearlyUnitPrice?: number;
28
+ yearlyUnitPriceDecimal?: string;
29
+ }
@@ -0,0 +1,7 @@
1
+ export declare const CreateEntitlementInBundleRequestBodyMetricPeriod: {
2
+ readonly AllTime: "all_time";
3
+ readonly CurrentMonth: "current_month";
4
+ readonly CurrentWeek: "current_week";
5
+ readonly CurrentDay: "current_day";
6
+ };
7
+ export type CreateEntitlementInBundleRequestBodyMetricPeriod = (typeof CreateEntitlementInBundleRequestBodyMetricPeriod)[keyof typeof CreateEntitlementInBundleRequestBodyMetricPeriod];
@@ -0,0 +1,5 @@
1
+ export declare const CreateEntitlementInBundleRequestBodyMetricPeriodMonthReset: {
2
+ readonly FirstOfMonth: "first_of_month";
3
+ readonly BillingCycle: "billing_cycle";
4
+ };
5
+ export type CreateEntitlementInBundleRequestBodyMetricPeriodMonthReset = (typeof CreateEntitlementInBundleRequestBodyMetricPeriodMonthReset)[keyof typeof CreateEntitlementInBundleRequestBodyMetricPeriodMonthReset];
@@ -0,0 +1,7 @@
1
+ import type * as Schematic from "../index";
2
+ export interface CreatePlanRequestBody {
3
+ description: string;
4
+ icon?: string;
5
+ name: string;
6
+ planType: Schematic.PlanType;
7
+ }
@@ -22,6 +22,8 @@ export interface CreditCompanyGrantView {
22
22
  quantity: number;
23
23
  quantityRemaining: number;
24
24
  quantityUsed: number;
25
+ renewalEnabled: boolean;
26
+ renewalPeriod?: Schematic.BillingPlanCreditGrantResetCadence;
25
27
  singularName?: string;
26
28
  sourceLabel: string;
27
29
  transfers?: Schematic.CreditTransferView[];
@@ -0,0 +1,3 @@
1
+ export interface DeleteBillingPlanCreditGrantRequestBody {
2
+ applyToExisting?: boolean;
3
+ }
@@ -19,7 +19,7 @@ export interface EventDetailResponseData {
19
19
  status: Schematic.EventStatus;
20
20
  subtype?: string;
21
21
  type: Schematic.EventType;
22
- updatedAt: Date;
22
+ updatedAt?: Date;
23
23
  user?: Schematic.PreviewObject;
24
24
  userId?: string;
25
25
  }
@@ -17,6 +17,6 @@ export interface EventResponseData {
17
17
  status: Schematic.EventStatus;
18
18
  subtype?: string;
19
19
  type: Schematic.EventType;
20
- updatedAt: Date;
20
+ updatedAt?: Date;
21
21
  userId?: string;
22
22
  }
@@ -0,0 +1,6 @@
1
+ export declare const PlanBundleAction: {
2
+ readonly Create: "create";
3
+ readonly Update: "update";
4
+ readonly Delete: "delete";
5
+ };
6
+ export type PlanBundleAction = (typeof PlanBundleAction)[keyof typeof PlanBundleAction];
@@ -0,0 +1,8 @@
1
+ import type * as Schematic from "../index";
2
+ export interface PlanBundleCreditGrantRequestBody {
3
+ action: Schematic.PlanBundleAction;
4
+ createReq?: Schematic.CreateBillingPlanCreditGrantRequestBody;
5
+ creditGrantId?: string;
6
+ deleteReq?: Schematic.DeleteBillingPlanCreditGrantRequestBody;
7
+ updateReq?: Schematic.UpdateBillingPlanCreditGrantRequestBody;
8
+ }
@@ -0,0 +1,6 @@
1
+ import type * as Schematic from "../index";
2
+ export interface PlanBundleEntitlementRequestBody {
3
+ action: Schematic.PlanBundleAction;
4
+ entitlementId?: string;
5
+ req?: Schematic.CreateEntitlementInBundleRequestBody;
6
+ }
@@ -0,0 +1,8 @@
1
+ import type * as Schematic from "../index";
2
+ export interface PlanBundleResponseData {
3
+ billingProduct?: Schematic.BillingProductPlanResponseData;
4
+ creditGrants?: Schematic.BillingPlanCreditGrantResponseData[];
5
+ entitlements?: Schematic.PlanEntitlementResponseData[];
6
+ plan?: Schematic.PlanResponseData;
7
+ traits?: Schematic.PlanTraitResponseData[];
8
+ }
@@ -1,4 +1,5 @@
1
1
  export declare const PlanChangeSubscriptionAction: {
2
+ readonly Adjustment: "adjustment";
2
3
  readonly Downgrade: "downgrade";
3
4
  readonly Invalid: "invalid";
4
5
  readonly Subscribe: "subscribe";
@@ -20,5 +20,6 @@ export interface PlanDetailResponseData {
20
20
  planType: Schematic.PlanType;
21
21
  trialDays?: number;
22
22
  updatedAt: Date;
23
+ versions: Schematic.PlanVersionResponseData[];
23
24
  yearlyPrice?: Schematic.BillingPriceResponseData;
24
25
  }
@@ -24,5 +24,6 @@ export interface PlanGroupPlanDetailResponseData {
24
24
  planType: Schematic.PlanType;
25
25
  trialDays?: number;
26
26
  updatedAt: Date;
27
+ versions: Schematic.PlanVersionResponseData[];
27
28
  yearlyPrice?: Schematic.BillingPriceResponseData;
28
29
  }
@@ -0,0 +1,14 @@
1
+ import type * as Schematic from "../index";
2
+ export interface PlanVersionResponseData {
3
+ createdAt: Date;
4
+ description: string;
5
+ environmentId: string;
6
+ icon: string;
7
+ id: string;
8
+ name: string;
9
+ originalPlanId?: string;
10
+ planType: Schematic.PlanType;
11
+ status: Schematic.PlanVersionStatus;
12
+ updatedAt: Date;
13
+ version: number;
14
+ }
@@ -0,0 +1,6 @@
1
+ export declare const PlanVersionStatus: {
2
+ readonly Published: "published";
3
+ readonly Draft: "draft";
4
+ readonly Archived: "archived";
5
+ };
6
+ export type PlanVersionStatus = (typeof PlanVersionStatus)[keyof typeof PlanVersionStatus];