@schematichq/schematic-typescript-node 1.2.5 → 1.2.6

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 (84) hide show
  1. package/LICENSE +21 -0
  2. package/dist/api/resources/companies/client/Client.d.ts +6 -2
  3. package/dist/api/resources/companies/client/requests/DeleteCompanyRequest.d.ts +14 -0
  4. package/dist/api/resources/companies/client/requests/index.d.ts +1 -0
  5. package/dist/api/resources/companies/types/DeleteCompanyParams.d.ts +10 -0
  6. package/dist/api/resources/companies/types/DeleteCompanyResponse.d.ts +1 -1
  7. package/dist/api/resources/companies/types/index.d.ts +1 -0
  8. package/dist/api/resources/credits/client/Client.d.ts +24 -2
  9. package/dist/api/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.d.ts +8 -0
  10. package/dist/api/resources/credits/client/requests/DeleteBillingPlanCreditGrantRequest.d.ts +12 -0
  11. package/dist/api/resources/credits/client/requests/UpdateBillingPlanCreditGrantRequestBody.d.ts +21 -0
  12. package/dist/api/resources/credits/client/requests/index.d.ts +2 -0
  13. package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyAutoTopupExpiryType.d.ts +11 -0
  14. package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyAutoTopupExpiryUnit.d.ts +8 -0
  15. package/dist/api/resources/credits/types/DeleteBillingPlanCreditGrantParams.d.ts +9 -0
  16. package/dist/api/resources/credits/types/DeleteBillingPlanCreditGrantResponse.d.ts +1 -1
  17. package/dist/api/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyExpiryType.d.ts +11 -0
  18. package/dist/api/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyExpiryUnit.d.ts +8 -0
  19. package/dist/api/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyResetCadence.d.ts +10 -0
  20. package/dist/api/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyResetStart.d.ts +8 -0
  21. package/dist/api/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyResetType.d.ts +8 -0
  22. package/dist/api/resources/credits/types/UpdateBillingPlanCreditGrantResponse.d.ts +9 -0
  23. package/dist/api/resources/credits/types/index.d.ts +9 -0
  24. package/dist/api/types/BillingPlanCreditGrantResponseData.d.ts +7 -0
  25. package/dist/api/types/Condition.d.ts +4 -4
  26. package/dist/api/types/ConditionConditionType.d.ts +15 -0
  27. package/dist/api/types/ConditionMetricPeriod.d.ts +10 -0
  28. package/dist/api/types/ConditionMetricPeriodMonthReset.d.ts +8 -0
  29. package/dist/api/types/ConditionOperator.d.ts +14 -0
  30. package/dist/api/types/CreditGrantExpiryRequestBody.d.ts +12 -0
  31. package/dist/api/types/CreditGrantExpiryRequestBodyExpiryType.d.ts +11 -0
  32. package/dist/api/types/CreditGrantExpiryRequestBodyExpiryUnit.d.ts +8 -0
  33. package/dist/api/types/CreditGrantExpiryRequestBodyResetCadence.d.ts +10 -0
  34. package/dist/api/types/CreditGrantExpiryRequestBodyResetStart.d.ts +8 -0
  35. package/dist/api/types/CreditGrantExpiryRequestBodyResetType.d.ts +8 -0
  36. package/dist/api/types/CreditLedgerEnrichedEntryResponseData.d.ts +1 -0
  37. package/dist/api/types/PlanChangeResponseDataAction.d.ts +2 -1
  38. package/dist/api/types/PlanCreditGrantView.d.ts +7 -0
  39. package/dist/api/types/Rule.d.ts +1 -1
  40. package/dist/api/types/RuleRuleType.d.ts +13 -0
  41. package/dist/api/types/TraitDefinition.d.ts +3 -2
  42. package/dist/api/types/TraitDefinitionComparableType.d.ts +10 -0
  43. package/dist/api/types/TraitDefinitionEntityType.d.ts +8 -0
  44. package/dist/api/types/index.d.ts +13 -0
  45. package/dist/index.js +3 -3
  46. package/dist/serialization/resources/companies/types/DeleteCompanyParams.d.ts +13 -0
  47. package/dist/serialization/resources/companies/types/DeleteCompanyResponse.d.ts +2 -1
  48. package/dist/serialization/resources/companies/types/index.d.ts +1 -0
  49. package/dist/serialization/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.d.ts +10 -0
  50. package/dist/serialization/resources/credits/client/requests/UpdateBillingPlanCreditGrantRequestBody.d.ts +24 -0
  51. package/dist/serialization/resources/credits/client/requests/index.d.ts +1 -0
  52. package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyAutoTopupExpiryType.d.ts +10 -0
  53. package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyAutoTopupExpiryUnit.d.ts +10 -0
  54. package/dist/serialization/resources/credits/types/DeleteBillingPlanCreditGrantParams.d.ts +12 -0
  55. package/dist/serialization/resources/credits/types/DeleteBillingPlanCreditGrantResponse.d.ts +2 -1
  56. package/dist/serialization/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyExpiryType.d.ts +10 -0
  57. package/dist/serialization/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyExpiryUnit.d.ts +10 -0
  58. package/dist/serialization/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyResetCadence.d.ts +10 -0
  59. package/dist/serialization/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyResetStart.d.ts +10 -0
  60. package/dist/serialization/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyResetType.d.ts +10 -0
  61. package/dist/serialization/resources/credits/types/UpdateBillingPlanCreditGrantResponse.d.ts +14 -0
  62. package/dist/serialization/resources/credits/types/index.d.ts +9 -0
  63. package/dist/serialization/types/BillingPlanCreditGrantResponseData.d.ts +7 -0
  64. package/dist/serialization/types/Condition.d.ts +8 -4
  65. package/dist/serialization/types/ConditionConditionType.d.ts +10 -0
  66. package/dist/serialization/types/ConditionMetricPeriod.d.ts +10 -0
  67. package/dist/serialization/types/ConditionMetricPeriodMonthReset.d.ts +10 -0
  68. package/dist/serialization/types/ConditionOperator.d.ts +10 -0
  69. package/dist/serialization/types/CreditGrantExpiryRequestBody.d.ts +22 -0
  70. package/dist/serialization/types/CreditGrantExpiryRequestBodyExpiryType.d.ts +10 -0
  71. package/dist/serialization/types/CreditGrantExpiryRequestBodyExpiryUnit.d.ts +10 -0
  72. package/dist/serialization/types/CreditGrantExpiryRequestBodyResetCadence.d.ts +10 -0
  73. package/dist/serialization/types/CreditGrantExpiryRequestBodyResetStart.d.ts +10 -0
  74. package/dist/serialization/types/CreditGrantExpiryRequestBodyResetType.d.ts +10 -0
  75. package/dist/serialization/types/CreditLedgerEnrichedEntryResponseData.d.ts +1 -0
  76. package/dist/serialization/types/PlanChangeResponseDataAction.d.ts +1 -1
  77. package/dist/serialization/types/PlanCreditGrantView.d.ts +7 -0
  78. package/dist/serialization/types/Rule.d.ts +2 -1
  79. package/dist/serialization/types/RuleRuleType.d.ts +10 -0
  80. package/dist/serialization/types/TraitDefinition.d.ts +4 -2
  81. package/dist/serialization/types/TraitDefinitionComparableType.d.ts +10 -0
  82. package/dist/serialization/types/TraitDefinitionEntityType.d.ts +10 -0
  83. package/dist/serialization/types/index.d.ts +13 -0
  84. package/package.json +2 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-2025 Schematic, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -84,6 +84,7 @@ export declare class Companies {
84
84
  private __getCompany;
85
85
  /**
86
86
  * @param {string} companyId - company_id
87
+ * @param {Schematic.DeleteCompanyRequest} request
87
88
  * @param {Companies.RequestOptions} requestOptions - Request-specific configuration.
88
89
  *
89
90
  * @throws {@link Schematic.BadRequestError}
@@ -93,9 +94,12 @@ export declare class Companies {
93
94
  * @throws {@link Schematic.InternalServerError}
94
95
  *
95
96
  * @example
96
- * await client.companies.deleteCompany("company_id")
97
+ * await client.companies.deleteCompany("company_id", {
98
+ * cancelSubscription: true,
99
+ * prorate: true
100
+ * })
97
101
  */
98
- deleteCompany(companyId: string, requestOptions?: Companies.RequestOptions): core.HttpResponsePromise<Schematic.DeleteCompanyResponse>;
102
+ deleteCompany(companyId: string, request?: Schematic.DeleteCompanyRequest, requestOptions?: Companies.RequestOptions): core.HttpResponsePromise<Schematic.DeleteCompanyResponse>;
99
103
  private __deleteCompany;
100
104
  /**
101
105
  * @param {Schematic.CountCompaniesRequest} request
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * cancelSubscription: true,
8
+ * prorate: true
9
+ * }
10
+ */
11
+ export interface DeleteCompanyRequest {
12
+ cancelSubscription?: boolean;
13
+ prorate?: boolean;
14
+ }
@@ -1,4 +1,5 @@
1
1
  export { type ListCompaniesRequest } from "./ListCompaniesRequest";
2
+ export { type DeleteCompanyRequest } from "./DeleteCompanyRequest";
2
3
  export { type CountCompaniesRequest } from "./CountCompaniesRequest";
3
4
  export { type CountCompaniesForAdvancedFilterRequest } from "./CountCompaniesForAdvancedFilterRequest";
4
5
  export { type ListCompaniesForAdvancedFilterRequest } from "./ListCompaniesForAdvancedFilterRequest";
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Input parameters
6
+ */
7
+ export interface DeleteCompanyParams {
8
+ cancelSubscription?: boolean;
9
+ prorate?: boolean;
10
+ }
@@ -5,5 +5,5 @@ import * as Schematic from "../../../index";
5
5
  export interface DeleteCompanyResponse {
6
6
  data: Schematic.DeleteResponse;
7
7
  /** Input parameters */
8
- params: Record<string, unknown>;
8
+ params: Schematic.DeleteCompanyParams;
9
9
  }
@@ -2,6 +2,7 @@ export * from "./ListCompaniesParams";
2
2
  export * from "./ListCompaniesResponse";
3
3
  export * from "./UpsertCompanyResponse";
4
4
  export * from "./GetCompanyResponse";
5
+ export * from "./DeleteCompanyParams";
5
6
  export * from "./DeleteCompanyResponse";
6
7
  export * from "./CountCompaniesParams";
7
8
  export * from "./CountCompaniesResponse";
@@ -427,6 +427,7 @@ export declare class Credits {
427
427
  private __createBillingPlanCreditGrant;
428
428
  /**
429
429
  * @param {string} planGrantId - plan_grant_id
430
+ * @param {Schematic.UpdateBillingPlanCreditGrantRequestBody} request
430
431
  * @param {Credits.RequestOptions} requestOptions - Request-specific configuration.
431
432
  *
432
433
  * @throws {@link Schematic.BadRequestError}
@@ -436,9 +437,30 @@ export declare class Credits {
436
437
  * @throws {@link Schematic.InternalServerError}
437
438
  *
438
439
  * @example
439
- * await client.credits.deleteBillingPlanCreditGrant("plan_grant_id")
440
+ * await client.credits.updateBillingPlanCreditGrant("plan_grant_id", {
441
+ * resetCadence: "monthly",
442
+ * resetStart: "billing_period"
443
+ * })
444
+ */
445
+ updateBillingPlanCreditGrant(planGrantId: string, request: Schematic.UpdateBillingPlanCreditGrantRequestBody, requestOptions?: Credits.RequestOptions): core.HttpResponsePromise<Schematic.UpdateBillingPlanCreditGrantResponse>;
446
+ private __updateBillingPlanCreditGrant;
447
+ /**
448
+ * @param {string} planGrantId - plan_grant_id
449
+ * @param {Schematic.DeleteBillingPlanCreditGrantRequest} request
450
+ * @param {Credits.RequestOptions} requestOptions - Request-specific configuration.
451
+ *
452
+ * @throws {@link Schematic.BadRequestError}
453
+ * @throws {@link Schematic.UnauthorizedError}
454
+ * @throws {@link Schematic.ForbiddenError}
455
+ * @throws {@link Schematic.NotFoundError}
456
+ * @throws {@link Schematic.InternalServerError}
457
+ *
458
+ * @example
459
+ * await client.credits.deleteBillingPlanCreditGrant("plan_grant_id", {
460
+ * applyToExisting: true
461
+ * })
440
462
  */
441
- deleteBillingPlanCreditGrant(planGrantId: string, requestOptions?: Credits.RequestOptions): core.HttpResponsePromise<Schematic.DeleteBillingPlanCreditGrantResponse>;
463
+ deleteBillingPlanCreditGrant(planGrantId: string, request?: Schematic.DeleteBillingPlanCreditGrantRequest, requestOptions?: Credits.RequestOptions): core.HttpResponsePromise<Schematic.DeleteBillingPlanCreditGrantResponse>;
442
464
  private __deleteBillingPlanCreditGrant;
443
465
  /**
444
466
  * @param {Schematic.CountBillingPlanCreditGrantsRequest} request
@@ -13,6 +13,14 @@ import * as Schematic from "../../../../index";
13
13
  * }
14
14
  */
15
15
  export interface CreateBillingPlanCreditGrantRequestBody {
16
+ applyToExisting?: boolean;
17
+ autoTopupAmount?: number;
18
+ autoTopupAmountType?: "credit";
19
+ autoTopupEnabled?: boolean;
20
+ autoTopupExpiryType?: Schematic.CreateBillingPlanCreditGrantRequestBodyAutoTopupExpiryType;
21
+ autoTopupExpiryUnit?: Schematic.CreateBillingPlanCreditGrantRequestBodyAutoTopupExpiryUnit;
22
+ autoTopupExpiryUnitCount?: number;
23
+ autoTopupThresholdPercent?: number;
16
24
  creditAmount: number;
17
25
  creditId: string;
18
26
  expiryType?: Schematic.CreateBillingPlanCreditGrantRequestBodyExpiryType;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * applyToExisting: true
8
+ * }
9
+ */
10
+ export interface DeleteBillingPlanCreditGrantRequest {
11
+ applyToExisting?: boolean;
12
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Schematic from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * resetCadence: "monthly",
9
+ * resetStart: "billing_period"
10
+ * }
11
+ */
12
+ export interface UpdateBillingPlanCreditGrantRequestBody {
13
+ applyToExisting?: boolean;
14
+ creditAmount?: number;
15
+ expiryType?: Schematic.UpdateBillingPlanCreditGrantRequestBodyExpiryType;
16
+ expiryUnit?: Schematic.UpdateBillingPlanCreditGrantRequestBodyExpiryUnit;
17
+ expiryUnitCount?: number;
18
+ resetCadence: Schematic.UpdateBillingPlanCreditGrantRequestBodyResetCadence;
19
+ resetStart: Schematic.UpdateBillingPlanCreditGrantRequestBodyResetStart;
20
+ resetType?: Schematic.UpdateBillingPlanCreditGrantRequestBodyResetType;
21
+ }
@@ -15,4 +15,6 @@ export { type GetEnrichedCreditLedgerRequest } from "./GetEnrichedCreditLedgerRe
15
15
  export { type CountCreditLedgerRequest } from "./CountCreditLedgerRequest";
16
16
  export { type ListBillingPlanCreditGrantsRequest } from "./ListBillingPlanCreditGrantsRequest";
17
17
  export { type CreateBillingPlanCreditGrantRequestBody } from "./CreateBillingPlanCreditGrantRequestBody";
18
+ export { type UpdateBillingPlanCreditGrantRequestBody } from "./UpdateBillingPlanCreditGrantRequestBody";
19
+ export { type DeleteBillingPlanCreditGrantRequest } from "./DeleteBillingPlanCreditGrantRequest";
18
20
  export { type CountBillingPlanCreditGrantsRequest } from "./CountBillingPlanCreditGrantsRequest";
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type CreateBillingPlanCreditGrantRequestBodyAutoTopupExpiryType = "duration" | "no_expiry" | "end_of_trial" | "end_of_billing_period" | "end_of_next_billing_period";
5
+ export declare const CreateBillingPlanCreditGrantRequestBodyAutoTopupExpiryType: {
6
+ readonly Duration: "duration";
7
+ readonly NoExpiry: "no_expiry";
8
+ readonly EndOfTrial: "end_of_trial";
9
+ readonly EndOfBillingPeriod: "end_of_billing_period";
10
+ readonly EndOfNextBillingPeriod: "end_of_next_billing_period";
11
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type CreateBillingPlanCreditGrantRequestBodyAutoTopupExpiryUnit = "days" | "billing_periods";
5
+ export declare const CreateBillingPlanCreditGrantRequestBodyAutoTopupExpiryUnit: {
6
+ readonly Days: "days";
7
+ readonly BillingPeriods: "billing_periods";
8
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Input parameters
6
+ */
7
+ export interface DeleteBillingPlanCreditGrantParams {
8
+ applyToExisting?: boolean;
9
+ }
@@ -5,5 +5,5 @@ import * as Schematic from "../../../index";
5
5
  export interface DeleteBillingPlanCreditGrantResponse {
6
6
  data: Schematic.DeleteResponse;
7
7
  /** Input parameters */
8
- params: Record<string, unknown>;
8
+ params: Schematic.DeleteBillingPlanCreditGrantParams;
9
9
  }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type UpdateBillingPlanCreditGrantRequestBodyExpiryType = "duration" | "no_expiry" | "end_of_trial" | "end_of_billing_period" | "end_of_next_billing_period";
5
+ export declare const UpdateBillingPlanCreditGrantRequestBodyExpiryType: {
6
+ readonly Duration: "duration";
7
+ readonly NoExpiry: "no_expiry";
8
+ readonly EndOfTrial: "end_of_trial";
9
+ readonly EndOfBillingPeriod: "end_of_billing_period";
10
+ readonly EndOfNextBillingPeriod: "end_of_next_billing_period";
11
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type UpdateBillingPlanCreditGrantRequestBodyExpiryUnit = "days" | "billing_periods";
5
+ export declare const UpdateBillingPlanCreditGrantRequestBodyExpiryUnit: {
6
+ readonly Days: "days";
7
+ readonly BillingPeriods: "billing_periods";
8
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type UpdateBillingPlanCreditGrantRequestBodyResetCadence = "monthly" | "yearly" | "daily" | "weekly";
5
+ export declare const UpdateBillingPlanCreditGrantRequestBodyResetCadence: {
6
+ readonly Monthly: "monthly";
7
+ readonly Yearly: "yearly";
8
+ readonly Daily: "daily";
9
+ readonly Weekly: "weekly";
10
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type UpdateBillingPlanCreditGrantRequestBodyResetStart = "billing_period" | "first_of_month";
5
+ export declare const UpdateBillingPlanCreditGrantRequestBodyResetStart: {
6
+ readonly BillingPeriod: "billing_period";
7
+ readonly FirstOfMonth: "first_of_month";
8
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type UpdateBillingPlanCreditGrantRequestBodyResetType = "plan_period" | "no_reset";
5
+ export declare const UpdateBillingPlanCreditGrantRequestBodyResetType: {
6
+ readonly PlanPeriod: "plan_period";
7
+ readonly NoReset: "no_reset";
8
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Schematic from "../../../index";
5
+ export interface UpdateBillingPlanCreditGrantResponse {
6
+ data: Schematic.BillingPlanCreditGrantResponseData;
7
+ /** Input parameters */
8
+ params: Record<string, unknown>;
9
+ }
@@ -53,12 +53,21 @@ export * from "./CountCreditLedgerParams";
53
53
  export * from "./CountCreditLedgerResponse";
54
54
  export * from "./ListBillingPlanCreditGrantsParams";
55
55
  export * from "./ListBillingPlanCreditGrantsResponse";
56
+ export * from "./CreateBillingPlanCreditGrantRequestBodyAutoTopupExpiryType";
57
+ export * from "./CreateBillingPlanCreditGrantRequestBodyAutoTopupExpiryUnit";
56
58
  export * from "./CreateBillingPlanCreditGrantRequestBodyExpiryType";
57
59
  export * from "./CreateBillingPlanCreditGrantRequestBodyExpiryUnit";
58
60
  export * from "./CreateBillingPlanCreditGrantRequestBodyResetCadence";
59
61
  export * from "./CreateBillingPlanCreditGrantRequestBodyResetStart";
60
62
  export * from "./CreateBillingPlanCreditGrantRequestBodyResetType";
61
63
  export * from "./CreateBillingPlanCreditGrantResponse";
64
+ export * from "./UpdateBillingPlanCreditGrantRequestBodyExpiryType";
65
+ export * from "./UpdateBillingPlanCreditGrantRequestBodyExpiryUnit";
66
+ export * from "./UpdateBillingPlanCreditGrantRequestBodyResetCadence";
67
+ export * from "./UpdateBillingPlanCreditGrantRequestBodyResetStart";
68
+ export * from "./UpdateBillingPlanCreditGrantRequestBodyResetType";
69
+ export * from "./UpdateBillingPlanCreditGrantResponse";
70
+ export * from "./DeleteBillingPlanCreditGrantParams";
62
71
  export * from "./DeleteBillingPlanCreditGrantResponse";
63
72
  export * from "./CountBillingPlanCreditGrantsParams";
64
73
  export * from "./CountBillingPlanCreditGrantsResponse";
@@ -2,6 +2,13 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface BillingPlanCreditGrantResponseData {
5
+ autoTopupAmount?: number;
6
+ autoTopupAmountType?: string;
7
+ autoTopupEnabled: boolean;
8
+ autoTopupExpiryType?: string;
9
+ autoTopupExpiryUnit?: string;
10
+ autoTopupExpiryUnitCount?: number;
11
+ autoTopupThresholdPercent?: number;
5
12
  createdAt: Date;
6
13
  creditAmount: number;
7
14
  creditId: string;
@@ -5,16 +5,16 @@ import * as Schematic from "../index";
5
5
  export interface Condition {
6
6
  accountId: string;
7
7
  comparisonTraitDefinition?: Schematic.TraitDefinition;
8
- conditionType: string;
8
+ conditionType: Schematic.ConditionConditionType;
9
9
  consumptionRate?: number;
10
10
  creditId?: string;
11
11
  environmentId: string;
12
12
  eventSubtype?: string;
13
13
  id: string;
14
- metricPeriod?: string;
15
- metricPeriodMonthReset?: string;
14
+ metricPeriod?: Schematic.ConditionMetricPeriod;
15
+ metricPeriodMonthReset?: Schematic.ConditionMetricPeriodMonthReset;
16
16
  metricValue?: number;
17
- operator: string;
17
+ operator: Schematic.ConditionOperator;
18
18
  resourceIds: string[];
19
19
  traitDefinition?: Schematic.TraitDefinition;
20
20
  traitValue: string;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type ConditionConditionType = "base_plan" | "billing_product" | "company" | "credit" | "crm_product" | "metric" | "plan" | "trait" | "user";
5
+ export declare const ConditionConditionType: {
6
+ readonly BasePlan: "base_plan";
7
+ readonly BillingProduct: "billing_product";
8
+ readonly Company: "company";
9
+ readonly Credit: "credit";
10
+ readonly CrmProduct: "crm_product";
11
+ readonly Metric: "metric";
12
+ readonly Plan: "plan";
13
+ readonly Trait: "trait";
14
+ readonly User: "user";
15
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type ConditionMetricPeriod = "all_time" | "current_day" | "current_month" | "current_week";
5
+ export declare const ConditionMetricPeriod: {
6
+ readonly AllTime: "all_time";
7
+ readonly CurrentDay: "current_day";
8
+ readonly CurrentMonth: "current_month";
9
+ readonly CurrentWeek: "current_week";
10
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type ConditionMetricPeriodMonthReset = "first_of_month" | "billing_cycle";
5
+ export declare const ConditionMetricPeriodMonthReset: {
6
+ readonly FirstOfMonth: "first_of_month";
7
+ readonly BillingCycle: "billing_cycle";
8
+ };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type ConditionOperator = "eq" | "ne" | "gt" | "lt" | "gte" | "lte" | "is_empty" | "not_empty";
5
+ export declare const ConditionOperator: {
6
+ readonly Eq: "eq";
7
+ readonly Ne: "ne";
8
+ readonly Gt: "gt";
9
+ readonly Lt: "lt";
10
+ readonly Gte: "gte";
11
+ readonly Lte: "lte";
12
+ readonly IsEmpty: "is_empty";
13
+ readonly NotEmpty: "not_empty";
14
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Schematic from "../index";
5
+ export interface CreditGrantExpiryRequestBody {
6
+ expiryType?: Schematic.CreditGrantExpiryRequestBodyExpiryType;
7
+ expiryUnit?: Schematic.CreditGrantExpiryRequestBodyExpiryUnit;
8
+ expiryUnitCount?: number;
9
+ resetCadence: Schematic.CreditGrantExpiryRequestBodyResetCadence;
10
+ resetStart: Schematic.CreditGrantExpiryRequestBodyResetStart;
11
+ resetType?: Schematic.CreditGrantExpiryRequestBodyResetType;
12
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type CreditGrantExpiryRequestBodyExpiryType = "duration" | "no_expiry" | "end_of_trial" | "end_of_billing_period" | "end_of_next_billing_period";
5
+ export declare const CreditGrantExpiryRequestBodyExpiryType: {
6
+ readonly Duration: "duration";
7
+ readonly NoExpiry: "no_expiry";
8
+ readonly EndOfTrial: "end_of_trial";
9
+ readonly EndOfBillingPeriod: "end_of_billing_period";
10
+ readonly EndOfNextBillingPeriod: "end_of_next_billing_period";
11
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type CreditGrantExpiryRequestBodyExpiryUnit = "days" | "billing_periods";
5
+ export declare const CreditGrantExpiryRequestBodyExpiryUnit: {
6
+ readonly Days: "days";
7
+ readonly BillingPeriods: "billing_periods";
8
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type CreditGrantExpiryRequestBodyResetCadence = "monthly" | "yearly" | "daily" | "weekly";
5
+ export declare const CreditGrantExpiryRequestBodyResetCadence: {
6
+ readonly Monthly: "monthly";
7
+ readonly Yearly: "yearly";
8
+ readonly Daily: "daily";
9
+ readonly Weekly: "weekly";
10
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type CreditGrantExpiryRequestBodyResetStart = "billing_period" | "first_of_month";
5
+ export declare const CreditGrantExpiryRequestBodyResetStart: {
6
+ readonly BillingPeriod: "billing_period";
7
+ readonly FirstOfMonth: "first_of_month";
8
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type CreditGrantExpiryRequestBodyResetType = "plan_period" | "no_reset";
5
+ export declare const CreditGrantExpiryRequestBodyResetType: {
6
+ readonly PlanPeriod: "plan_period";
7
+ readonly NoReset: "no_reset";
8
+ };
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as Schematic from "../index";
5
5
  export interface CreditLedgerEnrichedEntryResponseData {
6
+ billingCreditAutoTopupGrantCount: number;
6
7
  billingCreditId: string;
7
8
  company?: Schematic.CompanyLedgerResponseData;
8
9
  companyId: string;
@@ -1,12 +1,13 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type PlanChangeResponseDataAction = "checkout" | "company_upsert" | "fallback_plan" | "manage_plan" | "plan_billing_product_changed" | "plan_deleted" | "quickstart" | "subscription_change";
4
+ export type PlanChangeResponseDataAction = "checkout" | "company_upsert" | "fallback_plan" | "manage_plan" | "migration" | "plan_billing_product_changed" | "plan_deleted" | "quickstart" | "subscription_change";
5
5
  export declare const PlanChangeResponseDataAction: {
6
6
  readonly Checkout: "checkout";
7
7
  readonly CompanyUpsert: "company_upsert";
8
8
  readonly FallbackPlan: "fallback_plan";
9
9
  readonly ManagePlan: "manage_plan";
10
+ readonly Migration: "migration";
10
11
  readonly PlanBillingProductChanged: "plan_billing_product_changed";
11
12
  readonly PlanDeleted: "plan_deleted";
12
13
  readonly Quickstart: "quickstart";
@@ -2,6 +2,13 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface PlanCreditGrantView {
5
+ billingCreditAutoTopupAmount?: number;
6
+ billingCreditAutoTopupAmountType?: string;
7
+ billingCreditAutoTopupEnabled: boolean;
8
+ billingCreditAutoTopupExpiryType?: string;
9
+ billingCreditAutoTopupExpiryUnit?: string;
10
+ billingCreditAutoTopupExpiryUnitCount?: number;
11
+ billingCreditAutoTopupThresholdPercent?: number;
5
12
  createdAt: Date;
6
13
  creditAmount: number;
7
14
  creditDescription: string;
@@ -11,6 +11,6 @@ export interface Rule {
11
11
  id: string;
12
12
  name: string;
13
13
  priority: number;
14
- ruleType: string;
14
+ ruleType: Schematic.RuleRuleType;
15
15
  value: boolean;
16
16
  }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type RuleRuleType = "default" | "global_override" | "company_override" | "company_override_usage_exceeded" | "plan_entitlement" | "plan_entitlement_usage_exceeded" | "standard";
5
+ export declare const RuleRuleType: {
6
+ readonly Default: "default";
7
+ readonly GlobalOverride: "global_override";
8
+ readonly CompanyOverride: "company_override";
9
+ readonly CompanyOverrideUsageExceeded: "company_override_usage_exceeded";
10
+ readonly PlanEntitlement: "plan_entitlement";
11
+ readonly PlanEntitlementUsageExceeded: "plan_entitlement_usage_exceeded";
12
+ readonly Standard: "standard";
13
+ };
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Schematic from "../index";
4
5
  export interface TraitDefinition {
5
- comparableType: string;
6
- entityType: string;
6
+ comparableType: Schematic.TraitDefinitionComparableType;
7
+ entityType: Schematic.TraitDefinitionEntityType;
7
8
  id: string;
8
9
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type TraitDefinitionComparableType = "bool" | "date" | "int" | "string";
5
+ export declare const TraitDefinitionComparableType: {
6
+ readonly Bool: "bool";
7
+ readonly Date: "date";
8
+ readonly Int: "int";
9
+ readonly String: "string";
10
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type TraitDefinitionEntityType = "user" | "company";
5
+ export declare const TraitDefinitionEntityType: {
6
+ readonly User: "user";
7
+ readonly Company: "company";
8
+ };
@@ -56,6 +56,10 @@ export * from "./ComponentCheckoutSettings";
56
56
  export * from "./ComponentHydrateResponseData";
57
57
  export * from "./ComponentPreviewResponseData";
58
58
  export * from "./ComponentResponseData";
59
+ export * from "./ConditionConditionType";
60
+ export * from "./ConditionMetricPeriod";
61
+ export * from "./ConditionMetricPeriodMonthReset";
62
+ export * from "./ConditionOperator";
59
63
  export * from "./Condition";
60
64
  export * from "./ConditionGroup";
61
65
  export * from "./CountResponse";
@@ -87,6 +91,12 @@ export * from "./CreditBundlePurchaseResponseData";
87
91
  export * from "./CreditCompanyGrantView";
88
92
  export * from "./CreditGrantDetailGrantReason";
89
93
  export * from "./CreditGrantDetail";
94
+ export * from "./CreditGrantExpiryRequestBodyExpiryType";
95
+ export * from "./CreditGrantExpiryRequestBodyExpiryUnit";
96
+ export * from "./CreditGrantExpiryRequestBodyResetCadence";
97
+ export * from "./CreditGrantExpiryRequestBodyResetStart";
98
+ export * from "./CreditGrantExpiryRequestBodyResetType";
99
+ export * from "./CreditGrantExpiryRequestBody";
90
100
  export * from "./CreditLedgerEnrichedEntryResponseData";
91
101
  export * from "./CreditTriggerConfig";
92
102
  export * from "./CreditUsage";
@@ -168,6 +178,7 @@ export * from "./PreviewSubscriptionUpcomingInvoiceLineItems";
168
178
  export * from "./QuickstartResp";
169
179
  export * from "./RawEventBatchResponseData";
170
180
  export * from "./RawEventResponseData";
181
+ export * from "./RuleRuleType";
171
182
  export * from "./Rule";
172
183
  export * from "./RuleConditionDetailResponseData";
173
184
  export * from "./RuleConditionGroupDetailResponseData";
@@ -180,6 +191,8 @@ export * from "./SegmentStatusResp";
180
191
  export * from "./StripeEmbedInfo";
181
192
  export * from "./SubscriptionTraitUpdate";
182
193
  export * from "./TemporaryAccessTokenResponseData";
194
+ export * from "./TraitDefinitionComparableType";
195
+ export * from "./TraitDefinitionEntityType";
183
196
  export * from "./TraitDefinition";
184
197
  export * from "./UpdateAddOnRequestBody";
185
198
  export * from "./UpdateCreditBundleRequestBody";