@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.
- package/LICENSE +21 -0
- package/dist/api/resources/companies/client/Client.d.ts +6 -2
- package/dist/api/resources/companies/client/requests/DeleteCompanyRequest.d.ts +14 -0
- package/dist/api/resources/companies/client/requests/index.d.ts +1 -0
- package/dist/api/resources/companies/types/DeleteCompanyParams.d.ts +10 -0
- package/dist/api/resources/companies/types/DeleteCompanyResponse.d.ts +1 -1
- package/dist/api/resources/companies/types/index.d.ts +1 -0
- package/dist/api/resources/credits/client/Client.d.ts +24 -2
- package/dist/api/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.d.ts +8 -0
- package/dist/api/resources/credits/client/requests/DeleteBillingPlanCreditGrantRequest.d.ts +12 -0
- package/dist/api/resources/credits/client/requests/UpdateBillingPlanCreditGrantRequestBody.d.ts +21 -0
- package/dist/api/resources/credits/client/requests/index.d.ts +2 -0
- package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyAutoTopupExpiryType.d.ts +11 -0
- package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyAutoTopupExpiryUnit.d.ts +8 -0
- package/dist/api/resources/credits/types/DeleteBillingPlanCreditGrantParams.d.ts +9 -0
- package/dist/api/resources/credits/types/DeleteBillingPlanCreditGrantResponse.d.ts +1 -1
- package/dist/api/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyExpiryType.d.ts +11 -0
- package/dist/api/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyExpiryUnit.d.ts +8 -0
- package/dist/api/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyResetCadence.d.ts +10 -0
- package/dist/api/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyResetStart.d.ts +8 -0
- package/dist/api/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyResetType.d.ts +8 -0
- package/dist/api/resources/credits/types/UpdateBillingPlanCreditGrantResponse.d.ts +9 -0
- package/dist/api/resources/credits/types/index.d.ts +9 -0
- package/dist/api/types/BillingPlanCreditGrantResponseData.d.ts +7 -0
- package/dist/api/types/Condition.d.ts +4 -4
- package/dist/api/types/ConditionConditionType.d.ts +15 -0
- package/dist/api/types/ConditionMetricPeriod.d.ts +10 -0
- package/dist/api/types/ConditionMetricPeriodMonthReset.d.ts +8 -0
- package/dist/api/types/ConditionOperator.d.ts +14 -0
- package/dist/api/types/CreditGrantExpiryRequestBody.d.ts +12 -0
- package/dist/api/types/CreditGrantExpiryRequestBodyExpiryType.d.ts +11 -0
- package/dist/api/types/CreditGrantExpiryRequestBodyExpiryUnit.d.ts +8 -0
- package/dist/api/types/CreditGrantExpiryRequestBodyResetCadence.d.ts +10 -0
- package/dist/api/types/CreditGrantExpiryRequestBodyResetStart.d.ts +8 -0
- package/dist/api/types/CreditGrantExpiryRequestBodyResetType.d.ts +8 -0
- package/dist/api/types/CreditLedgerEnrichedEntryResponseData.d.ts +1 -0
- package/dist/api/types/PlanChangeResponseDataAction.d.ts +2 -1
- package/dist/api/types/PlanCreditGrantView.d.ts +7 -0
- package/dist/api/types/Rule.d.ts +1 -1
- package/dist/api/types/RuleRuleType.d.ts +13 -0
- package/dist/api/types/TraitDefinition.d.ts +3 -2
- package/dist/api/types/TraitDefinitionComparableType.d.ts +10 -0
- package/dist/api/types/TraitDefinitionEntityType.d.ts +8 -0
- package/dist/api/types/index.d.ts +13 -0
- package/dist/index.js +3 -3
- package/dist/serialization/resources/companies/types/DeleteCompanyParams.d.ts +13 -0
- package/dist/serialization/resources/companies/types/DeleteCompanyResponse.d.ts +2 -1
- package/dist/serialization/resources/companies/types/index.d.ts +1 -0
- package/dist/serialization/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.d.ts +10 -0
- package/dist/serialization/resources/credits/client/requests/UpdateBillingPlanCreditGrantRequestBody.d.ts +24 -0
- package/dist/serialization/resources/credits/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyAutoTopupExpiryType.d.ts +10 -0
- package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyAutoTopupExpiryUnit.d.ts +10 -0
- package/dist/serialization/resources/credits/types/DeleteBillingPlanCreditGrantParams.d.ts +12 -0
- package/dist/serialization/resources/credits/types/DeleteBillingPlanCreditGrantResponse.d.ts +2 -1
- package/dist/serialization/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyExpiryType.d.ts +10 -0
- package/dist/serialization/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyExpiryUnit.d.ts +10 -0
- package/dist/serialization/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyResetCadence.d.ts +10 -0
- package/dist/serialization/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyResetStart.d.ts +10 -0
- package/dist/serialization/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyResetType.d.ts +10 -0
- package/dist/serialization/resources/credits/types/UpdateBillingPlanCreditGrantResponse.d.ts +14 -0
- package/dist/serialization/resources/credits/types/index.d.ts +9 -0
- package/dist/serialization/types/BillingPlanCreditGrantResponseData.d.ts +7 -0
- package/dist/serialization/types/Condition.d.ts +8 -4
- package/dist/serialization/types/ConditionConditionType.d.ts +10 -0
- package/dist/serialization/types/ConditionMetricPeriod.d.ts +10 -0
- package/dist/serialization/types/ConditionMetricPeriodMonthReset.d.ts +10 -0
- package/dist/serialization/types/ConditionOperator.d.ts +10 -0
- package/dist/serialization/types/CreditGrantExpiryRequestBody.d.ts +22 -0
- package/dist/serialization/types/CreditGrantExpiryRequestBodyExpiryType.d.ts +10 -0
- package/dist/serialization/types/CreditGrantExpiryRequestBodyExpiryUnit.d.ts +10 -0
- package/dist/serialization/types/CreditGrantExpiryRequestBodyResetCadence.d.ts +10 -0
- package/dist/serialization/types/CreditGrantExpiryRequestBodyResetStart.d.ts +10 -0
- package/dist/serialization/types/CreditGrantExpiryRequestBodyResetType.d.ts +10 -0
- package/dist/serialization/types/CreditLedgerEnrichedEntryResponseData.d.ts +1 -0
- package/dist/serialization/types/PlanChangeResponseDataAction.d.ts +1 -1
- package/dist/serialization/types/PlanCreditGrantView.d.ts +7 -0
- package/dist/serialization/types/Rule.d.ts +2 -1
- package/dist/serialization/types/RuleRuleType.d.ts +10 -0
- package/dist/serialization/types/TraitDefinition.d.ts +4 -2
- package/dist/serialization/types/TraitDefinitionComparableType.d.ts +10 -0
- package/dist/serialization/types/TraitDefinitionEntityType.d.ts +10 -0
- package/dist/serialization/types/index.d.ts +13 -0
- 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";
|
|
@@ -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.
|
|
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
|
package/dist/api/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.d.ts
CHANGED
|
@@ -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;
|
package/dist/api/resources/credits/client/requests/UpdateBillingPlanCreditGrantRequestBody.d.ts
ADDED
|
@@ -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
|
+
};
|
package/dist/api/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyExpiryType.d.ts
ADDED
|
@@ -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
|
+
};
|
package/dist/api/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyExpiryUnit.d.ts
ADDED
|
@@ -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
|
+
};
|
package/dist/api/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyResetCadence.d.ts
ADDED
|
@@ -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
|
+
};
|
package/dist/api/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyResetStart.d.ts
ADDED
|
@@ -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
|
+
};
|
package/dist/api/resources/credits/types/UpdateBillingPlanCreditGrantRequestBodyResetType.d.ts
ADDED
|
@@ -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:
|
|
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?:
|
|
15
|
-
metricPeriodMonthReset?:
|
|
14
|
+
metricPeriod?: Schematic.ConditionMetricPeriod;
|
|
15
|
+
metricPeriodMonthReset?: Schematic.ConditionMetricPeriodMonthReset;
|
|
16
16
|
metricValue?: number;
|
|
17
|
-
operator:
|
|
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
|
+
};
|
|
@@ -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;
|
package/dist/api/types/Rule.d.ts
CHANGED
|
@@ -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:
|
|
6
|
-
entityType:
|
|
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
|
+
};
|
|
@@ -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";
|