@schematichq/schematic-typescript-node 1.5.0 → 1.5.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.
- package/dist/Client.d.ts +8 -0
- package/dist/api/resources/credits/client/Client.d.ts +0 -48
- package/dist/api/resources/credits/client/requests/index.d.ts +0 -2
- package/dist/api/resources/credits/types/index.d.ts +0 -4
- package/dist/api/resources/plangroups/client/Client.d.ts +2 -0
- package/dist/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +4 -0
- package/dist/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +4 -0
- package/dist/api/resources/plans/client/Client.d.ts +1 -5
- package/dist/api/resources/plans/client/requests/RetryCustomPlanBillingRequestBody.d.ts +1 -6
- package/dist/api/types/BillingCreditGrantZeroedOutReason.d.ts +1 -0
- package/dist/api/types/ChangeSubscriptionInternalRequestBody.d.ts +1 -0
- package/dist/api/types/ChangeSubscriptionRequestBody.d.ts +1 -0
- package/dist/api/types/CheckoutSettingsResponseData.d.ts +3 -0
- package/dist/api/types/FeatureEntitlement.d.ts +5 -1
- package/dist/api/types/PlanChangeResponseData.d.ts +2 -0
- package/dist/api/types/PreviewSubscriptionChangeResponseData.d.ts +3 -0
- package/dist/api/types/RulesengineFeatureEntitlement.d.ts +5 -1
- package/dist/api/types/index.d.ts +0 -2
- package/dist/index.js +9 -9
- package/dist/serialization/resources/credits/types/index.d.ts +0 -4
- package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +3 -0
- package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +3 -0
- package/dist/serialization/resources/plans/client/requests/RetryCustomPlanBillingRequestBody.d.ts +0 -2
- package/dist/serialization/types/BillingCreditGrantZeroedOutReason.d.ts +1 -1
- package/dist/serialization/types/ChangeSubscriptionInternalRequestBody.d.ts +1 -0
- package/dist/serialization/types/ChangeSubscriptionRequestBody.d.ts +1 -0
- package/dist/serialization/types/CheckoutSettingsResponseData.d.ts +3 -0
- package/dist/serialization/types/FeatureEntitlement.d.ts +2 -0
- package/dist/serialization/types/PlanChangeResponseData.d.ts +1 -0
- package/dist/serialization/types/PreviewSubscriptionChangeResponseData.d.ts +3 -0
- package/dist/serialization/types/RulesengineFeatureEntitlement.d.ts +2 -0
- package/dist/serialization/types/index.d.ts +0 -2
- package/package.json +1 -1
- package/dist/api/resources/credits/client/requests/CountCreditLedgerRequest.d.ts +0 -26
- package/dist/api/resources/credits/client/requests/GetEnrichedCreditLedgerRequest.d.ts +0 -26
- package/dist/api/resources/credits/types/CountCreditLedgerParams.d.ts +0 -16
- package/dist/api/resources/credits/types/CountCreditLedgerResponse.d.ts +0 -6
- package/dist/api/resources/credits/types/GetEnrichedCreditLedgerParams.d.ts +0 -16
- package/dist/api/resources/credits/types/GetEnrichedCreditLedgerResponse.d.ts +0 -6
- package/dist/api/types/CreditLedgerEnrichedEntryResponseData.d.ts +0 -25
- package/dist/api/types/CreditLedgerPeriod.d.ts +0 -7
- package/dist/serialization/resources/credits/types/CountCreditLedgerParams.d.ts +0 -17
- package/dist/serialization/resources/credits/types/CountCreditLedgerResponse.d.ts +0 -12
- package/dist/serialization/resources/credits/types/GetEnrichedCreditLedgerParams.d.ts +0 -17
- package/dist/serialization/resources/credits/types/GetEnrichedCreditLedgerResponse.d.ts +0 -12
- package/dist/serialization/types/CreditLedgerEnrichedEntryResponseData.d.ts +0 -33
- package/dist/serialization/types/CreditLedgerPeriod.d.ts +0 -7
package/dist/Client.d.ts
CHANGED
|
@@ -69,6 +69,14 @@ export declare class SchematicClient {
|
|
|
69
69
|
get scheduledcheckout(): ScheduledcheckoutClient;
|
|
70
70
|
get accesstokens(): AccesstokensClient;
|
|
71
71
|
get webhooks(): WebhooksClient;
|
|
72
|
+
/**
|
|
73
|
+
* @param {SchematicClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* await client.getCreditLedger()
|
|
77
|
+
*/
|
|
78
|
+
getCreditLedger(requestOptions?: SchematicClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
79
|
+
private __getCreditLedger;
|
|
72
80
|
/**
|
|
73
81
|
* Make a passthrough request using the SDK's configured auth, retry, logging, etc.
|
|
74
82
|
* This is useful for making requests to endpoints not yet supported in the SDK.
|
|
@@ -419,54 +419,6 @@ export declare class CreditsClient {
|
|
|
419
419
|
*/
|
|
420
420
|
releaseCreditLease(lease_id: string, request: Schematic.ReleaseCreditLeaseRequestBody, requestOptions?: CreditsClient.RequestOptions): core.HttpResponsePromise<Schematic.ReleaseCreditLeaseResponse>;
|
|
421
421
|
private __releaseCreditLease;
|
|
422
|
-
/**
|
|
423
|
-
* @param {Schematic.GetEnrichedCreditLedgerRequest} request
|
|
424
|
-
* @param {CreditsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
425
|
-
*
|
|
426
|
-
* @throws {@link Schematic.BadRequestError}
|
|
427
|
-
* @throws {@link Schematic.UnauthorizedError}
|
|
428
|
-
* @throws {@link Schematic.ForbiddenError}
|
|
429
|
-
* @throws {@link Schematic.NotFoundError}
|
|
430
|
-
* @throws {@link Schematic.InternalServerError}
|
|
431
|
-
*
|
|
432
|
-
* @example
|
|
433
|
-
* await client.credits.getEnrichedCreditLedger({
|
|
434
|
-
* companyId: "company_id",
|
|
435
|
-
* billingCreditId: "billing_credit_id",
|
|
436
|
-
* featureId: "feature_id",
|
|
437
|
-
* period: "daily",
|
|
438
|
-
* startTime: "start_time",
|
|
439
|
-
* endTime: "end_time",
|
|
440
|
-
* limit: 1000000,
|
|
441
|
-
* offset: 1000000
|
|
442
|
-
* })
|
|
443
|
-
*/
|
|
444
|
-
getEnrichedCreditLedger(request: Schematic.GetEnrichedCreditLedgerRequest, requestOptions?: CreditsClient.RequestOptions): core.HttpResponsePromise<Schematic.GetEnrichedCreditLedgerResponse>;
|
|
445
|
-
private __getEnrichedCreditLedger;
|
|
446
|
-
/**
|
|
447
|
-
* @param {Schematic.CountCreditLedgerRequest} request
|
|
448
|
-
* @param {CreditsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
449
|
-
*
|
|
450
|
-
* @throws {@link Schematic.BadRequestError}
|
|
451
|
-
* @throws {@link Schematic.UnauthorizedError}
|
|
452
|
-
* @throws {@link Schematic.ForbiddenError}
|
|
453
|
-
* @throws {@link Schematic.NotFoundError}
|
|
454
|
-
* @throws {@link Schematic.InternalServerError}
|
|
455
|
-
*
|
|
456
|
-
* @example
|
|
457
|
-
* await client.credits.countCreditLedger({
|
|
458
|
-
* companyId: "company_id",
|
|
459
|
-
* billingCreditId: "billing_credit_id",
|
|
460
|
-
* featureId: "feature_id",
|
|
461
|
-
* period: "daily",
|
|
462
|
-
* startTime: "start_time",
|
|
463
|
-
* endTime: "end_time",
|
|
464
|
-
* limit: 1000000,
|
|
465
|
-
* offset: 1000000
|
|
466
|
-
* })
|
|
467
|
-
*/
|
|
468
|
-
countCreditLedger(request: Schematic.CountCreditLedgerRequest, requestOptions?: CreditsClient.RequestOptions): core.HttpResponsePromise<Schematic.CountCreditLedgerResponse>;
|
|
469
|
-
private __countCreditLedger;
|
|
470
422
|
/**
|
|
471
423
|
* @param {Schematic.ListBillingPlanCreditGrantsRequest} request
|
|
472
424
|
* @param {CreditsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -5,13 +5,11 @@ export type { CountBillingPlanCreditGrantsRequest } from "./CountBillingPlanCred
|
|
|
5
5
|
export type { CountCompanyGrantsRequest } from "./CountCompanyGrantsRequest";
|
|
6
6
|
export type { CountCreditBundlesRequest } from "./CountCreditBundlesRequest";
|
|
7
7
|
export type { CountCreditEventLedgerRequest } from "./CountCreditEventLedgerRequest";
|
|
8
|
-
export type { CountCreditLedgerRequest } from "./CountCreditLedgerRequest";
|
|
9
8
|
export type { CreateBillingCreditRequestBody } from "./CreateBillingCreditRequestBody";
|
|
10
9
|
export type { CreateCompanyCreditGrant } from "./CreateCompanyCreditGrant";
|
|
11
10
|
export type { CreateCreditBundleRequestBody } from "./CreateCreditBundleRequestBody";
|
|
12
11
|
export type { DeleteBillingPlanCreditGrantRequest } from "./DeleteBillingPlanCreditGrantRequest";
|
|
13
12
|
export type { ExtendCreditLeaseRequestBody } from "./ExtendCreditLeaseRequestBody";
|
|
14
|
-
export type { GetEnrichedCreditLedgerRequest } from "./GetEnrichedCreditLedgerRequest";
|
|
15
13
|
export type { ListBillingCreditsRequest } from "./ListBillingCreditsRequest";
|
|
16
14
|
export type { ListBillingPlanCreditGrantsRequest } from "./ListBillingPlanCreditGrantsRequest";
|
|
17
15
|
export type { ListCompanyCreditBalancesRequest } from "./ListCompanyCreditBalancesRequest";
|
|
@@ -11,8 +11,6 @@ export * from "./CountCreditBundlesParams";
|
|
|
11
11
|
export * from "./CountCreditBundlesResponse";
|
|
12
12
|
export * from "./CountCreditEventLedgerParams";
|
|
13
13
|
export * from "./CountCreditEventLedgerResponse";
|
|
14
|
-
export * from "./CountCreditLedgerParams";
|
|
15
|
-
export * from "./CountCreditLedgerResponse";
|
|
16
14
|
export * from "./CreateBillingCreditResponse";
|
|
17
15
|
export * from "./CreateBillingPlanCreditGrantResponse";
|
|
18
16
|
export * from "./CreateCreditBundleResponse";
|
|
@@ -21,8 +19,6 @@ export * from "./DeleteBillingPlanCreditGrantResponse";
|
|
|
21
19
|
export * from "./DeleteCreditBundleResponse";
|
|
22
20
|
export * from "./ExtendCreditLeaseResponse";
|
|
23
21
|
export * from "./GetCreditBundleResponse";
|
|
24
|
-
export * from "./GetEnrichedCreditLedgerParams";
|
|
25
|
-
export * from "./GetEnrichedCreditLedgerResponse";
|
|
26
22
|
export * from "./GetSingleBillingCreditResponse";
|
|
27
23
|
export * from "./GetSingleBillingPlanCreditGrantResponse";
|
|
28
24
|
export * from "./GrantBillingCreditsToCompanyResponse";
|
|
@@ -43,6 +43,7 @@ export declare class PlangroupsClient {
|
|
|
43
43
|
* checkoutCollectEmail: true,
|
|
44
44
|
* checkoutCollectPhone: true,
|
|
45
45
|
* enableTaxCollection: true,
|
|
46
|
+
* optInEnabled: true,
|
|
46
47
|
* orderedAddOns: [{
|
|
47
48
|
* planId: "plan_id"
|
|
48
49
|
* }],
|
|
@@ -84,6 +85,7 @@ export declare class PlangroupsClient {
|
|
|
84
85
|
* checkoutCollectEmail: true,
|
|
85
86
|
* checkoutCollectPhone: true,
|
|
86
87
|
* enableTaxCollection: true,
|
|
88
|
+
* optInEnabled: true,
|
|
87
89
|
* orderedAddOns: [{
|
|
88
90
|
* planId: "plan_id"
|
|
89
91
|
* }],
|
|
@@ -7,6 +7,7 @@ import type * as Schematic from "../../../../index";
|
|
|
7
7
|
* checkoutCollectEmail: true,
|
|
8
8
|
* checkoutCollectPhone: true,
|
|
9
9
|
* enableTaxCollection: true,
|
|
10
|
+
* optInEnabled: true,
|
|
10
11
|
* orderedAddOns: [{
|
|
11
12
|
* planId: "plan_id"
|
|
12
13
|
* }],
|
|
@@ -42,6 +43,9 @@ export interface CreatePlanGroupRequestBody {
|
|
|
42
43
|
fallbackPlanId?: string;
|
|
43
44
|
initialPlanId?: string;
|
|
44
45
|
initialPlanPriceId?: string;
|
|
46
|
+
optInEnabled: boolean;
|
|
47
|
+
optInText?: string;
|
|
48
|
+
optInTitle?: string;
|
|
45
49
|
orderedAddOns: Schematic.OrderedPlansInGroup[];
|
|
46
50
|
orderedBundleList: Schematic.PlanGroupBundleOrder[];
|
|
47
51
|
orderedPlans: Schematic.OrderedPlansInGroup[];
|
|
@@ -7,6 +7,7 @@ import type * as Schematic from "../../../../index";
|
|
|
7
7
|
* checkoutCollectEmail: true,
|
|
8
8
|
* checkoutCollectPhone: true,
|
|
9
9
|
* enableTaxCollection: true,
|
|
10
|
+
* optInEnabled: true,
|
|
10
11
|
* orderedAddOns: [{
|
|
11
12
|
* planId: "plan_id"
|
|
12
13
|
* }],
|
|
@@ -42,6 +43,9 @@ export interface UpdatePlanGroupRequestBody {
|
|
|
42
43
|
fallbackPlanId?: string;
|
|
43
44
|
initialPlanId?: string;
|
|
44
45
|
initialPlanPriceId?: string;
|
|
46
|
+
optInEnabled: boolean;
|
|
47
|
+
optInText?: string;
|
|
48
|
+
optInTitle?: string;
|
|
45
49
|
orderedAddOns: Schematic.OrderedPlansInGroup[];
|
|
46
50
|
orderedBundleList: Schematic.PlanGroupBundleOrder[];
|
|
47
51
|
orderedPlans: Schematic.OrderedPlansInGroup[];
|
|
@@ -81,11 +81,7 @@ export declare class PlansClient {
|
|
|
81
81
|
*
|
|
82
82
|
* @example
|
|
83
83
|
* await client.plans.retryCustomPlanBilling("custom_plan_billing_id", {
|
|
84
|
-
* customerEmail: "customer_email"
|
|
85
|
-
* payInAdvance: [{
|
|
86
|
-
* priceId: "price_id",
|
|
87
|
-
* quantity: 1000000
|
|
88
|
-
* }]
|
|
84
|
+
* customerEmail: "customer_email"
|
|
89
85
|
* })
|
|
90
86
|
*/
|
|
91
87
|
retryCustomPlanBilling(custom_plan_billing_id: string, request: Schematic.RetryCustomPlanBillingRequestBody, requestOptions?: PlansClient.RequestOptions): core.HttpResponsePromise<Schematic.RetryCustomPlanBillingResponse>;
|
|
@@ -2,16 +2,11 @@ import type * as Schematic from "../../../../index";
|
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
|
-
* customerEmail: "customer_email"
|
|
6
|
-
* payInAdvance: [{
|
|
7
|
-
* priceId: "price_id",
|
|
8
|
-
* quantity: 1000000
|
|
9
|
-
* }]
|
|
5
|
+
* customerEmail: "customer_email"
|
|
10
6
|
* }
|
|
11
7
|
*/
|
|
12
8
|
export interface RetryCustomPlanBillingRequestBody {
|
|
13
9
|
activationStrategy?: Schematic.CustomPlanActivationStrategy;
|
|
14
10
|
customerEmail: string;
|
|
15
11
|
daysUntilDue?: number;
|
|
16
|
-
payInAdvance: Schematic.UpdatePayInAdvanceRequestBody[];
|
|
17
12
|
}
|
|
@@ -3,5 +3,6 @@ export declare const BillingCreditGrantZeroedOutReason: {
|
|
|
3
3
|
readonly Manual: "manual";
|
|
4
4
|
readonly PlanChange: "plan_change";
|
|
5
5
|
readonly PlanPeriodReset: "plan_period_reset";
|
|
6
|
+
readonly Reconciled: "reconciled";
|
|
6
7
|
};
|
|
7
8
|
export type BillingCreditGrantZeroedOutReason = (typeof BillingCreditGrantZeroedOutReason)[keyof typeof BillingCreditGrantZeroedOutReason];
|
|
@@ -8,6 +8,7 @@ export interface ChangeSubscriptionInternalRequestBody {
|
|
|
8
8
|
customFieldValues: Schematic.CheckoutFieldValue[];
|
|
9
9
|
newPlanId: string;
|
|
10
10
|
newPriceId: string;
|
|
11
|
+
optInAccepted?: boolean;
|
|
11
12
|
payInAdvance: Schematic.UpdatePayInAdvanceRequestBody[];
|
|
12
13
|
paymentMethodId?: string;
|
|
13
14
|
promoCode?: string;
|
|
@@ -7,6 +7,7 @@ export interface ChangeSubscriptionRequestBody {
|
|
|
7
7
|
customFieldValues: Schematic.CheckoutFieldValue[];
|
|
8
8
|
newPlanId: string;
|
|
9
9
|
newPriceId: string;
|
|
10
|
+
optInAccepted?: boolean;
|
|
10
11
|
payInAdvance: Schematic.UpdatePayInAdvanceRequestBody[];
|
|
11
12
|
paymentMethodId?: string;
|
|
12
13
|
promoCode?: string;
|
|
@@ -4,8 +4,12 @@ export interface FeatureEntitlement {
|
|
|
4
4
|
allocation?: number;
|
|
5
5
|
/** If the company has a credit-based entitlement for this feature, the ID of the credit */
|
|
6
6
|
creditId?: string;
|
|
7
|
-
/** If the company has a credit-based entitlement for this feature, the
|
|
7
|
+
/** If the company has a credit-based entitlement for this feature, the credit available to fund new consumption or a new lease hold — open lease holds are excluded. Clients that hold a lease should gate on this plus their own unspent hold; clients with no lease awareness should use credit_settled instead */
|
|
8
8
|
creditRemaining?: number;
|
|
9
|
+
/** If the company has a credit-based entitlement for this feature, the unspent amount held by an open credit lease. Returns to credit_remaining when the lease is released */
|
|
10
|
+
creditReserved?: number;
|
|
11
|
+
/** If the company has a credit-based entitlement for this feature, the balance net of actual consumption, unaffected by open lease holds (credit_remaining plus credit_reserved). The number to display to end users */
|
|
12
|
+
creditSettled?: number;
|
|
9
13
|
/** If the company has a credit-based entitlement for this feature, the total credit amount */
|
|
10
14
|
creditTotal?: number;
|
|
11
15
|
/** If the company has a credit-based entitlement for this feature, the amount of credit used */
|
|
@@ -16,6 +16,8 @@ export interface PlanChangeResponseData {
|
|
|
16
16
|
createdAt: Date;
|
|
17
17
|
environmentId: string;
|
|
18
18
|
id: string;
|
|
19
|
+
/** True when this change moved the company to a different version of the same plan (e.g. a plan version migration) rather than to a different plan. */
|
|
20
|
+
isVersionUpgrade: boolean;
|
|
19
21
|
previousBasePlan?: Schematic.PlanSnapshotView;
|
|
20
22
|
/** The plan version of the previous base plan before this change. */
|
|
21
23
|
previousBasePlanVersion?: Schematic.PlanVersionSnapshotView;
|
|
@@ -5,6 +5,9 @@ export interface PreviewSubscriptionChangeResponseData {
|
|
|
5
5
|
finance?: Schematic.PreviewSubscriptionFinanceResponseData;
|
|
6
6
|
isScheduledDowngrade: boolean;
|
|
7
7
|
newCharges: number;
|
|
8
|
+
optInRequired: boolean;
|
|
9
|
+
optInText?: string;
|
|
10
|
+
optInTitle?: string;
|
|
8
11
|
paymentMethodRequired: boolean;
|
|
9
12
|
percentOff: number;
|
|
10
13
|
periodStart: Date;
|
|
@@ -4,8 +4,12 @@ export interface RulesengineFeatureEntitlement {
|
|
|
4
4
|
allocation?: number;
|
|
5
5
|
/** If the company has a credit-based entitlement for this feature, the ID of the credit */
|
|
6
6
|
creditId?: string;
|
|
7
|
-
/** If the company has a credit-based entitlement for this feature, the
|
|
7
|
+
/** If the company has a credit-based entitlement for this feature, the credit available to fund new consumption or a new lease hold — open lease holds are excluded. Clients that hold a lease should gate on this plus their own unspent hold; clients with no lease awareness should use credit_settled instead */
|
|
8
8
|
creditRemaining?: number;
|
|
9
|
+
/** If the company has a credit-based entitlement for this feature, the unspent amount held by an open credit lease. Returns to credit_remaining when the lease is released */
|
|
10
|
+
creditReserved?: number;
|
|
11
|
+
/** If the company has a credit-based entitlement for this feature, the balance net of actual consumption, unaffected by open lease holds (credit_remaining plus credit_reserved). The number to display to end users */
|
|
12
|
+
creditSettled?: number;
|
|
9
13
|
/** If the company has a credit-based entitlement for this feature, the total credit amount */
|
|
10
14
|
creditTotal?: number;
|
|
11
15
|
/** If the company has a credit-based entitlement for this feature, the amount of credit used */
|
|
@@ -137,8 +137,6 @@ export * from "./CreditGrantDetail";
|
|
|
137
137
|
export * from "./CreditGrantExpiryRequestBody";
|
|
138
138
|
export * from "./CreditGrantSortOrder";
|
|
139
139
|
export * from "./CreditLeaseResponseData";
|
|
140
|
-
export * from "./CreditLedgerEnrichedEntryResponseData";
|
|
141
|
-
export * from "./CreditLedgerPeriod";
|
|
142
140
|
export * from "./CreditsAutoTopupCompanySummary";
|
|
143
141
|
export * from "./CreditsAutoTopupCreditSummary";
|
|
144
142
|
export * from "./CreditsAutoTopupHardFailure";
|