@schematichq/schematic-typescript-node 1.1.2 → 1.1.4
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/Client.d.ts +10 -0
- package/Client.js +88 -0
- package/api/resources/accesstokens/client/Client.js +1 -1
- package/api/resources/accounts/client/Client.js +14 -14
- package/api/resources/billing/client/Client.d.ts +61 -0
- package/api/resources/billing/client/Client.js +392 -8
- package/api/resources/billing/client/requests/ChangeSubscriptionRequestBody.d.ts +16 -0
- package/api/resources/billing/client/requests/CreateBillingPlanGroupRequestBody.d.ts +13 -0
- package/api/resources/billing/client/requests/UpdateBillingPlanGroupRequestBody.d.ts +13 -0
- package/api/resources/billing/client/requests/index.d.ts +3 -0
- package/api/resources/billing/types/ChangeSubscriptionWebResponse.d.ts +9 -0
- package/api/resources/billing/types/CreateBillingPlanGroupResponse.d.ts +9 -0
- package/api/resources/billing/types/GetBillingPlanGroupByAccountIdResponse.d.ts +9 -0
- package/api/resources/billing/types/UpdateBillingPlanGroupResponse.d.ts +9 -0
- package/api/resources/billing/types/index.d.ts +4 -0
- package/api/resources/billing/types/index.js +4 -0
- package/api/resources/companies/client/Client.d.ts +0 -13
- package/api/resources/companies/client/Client.js +31 -136
- package/api/resources/companies/client/requests/index.d.ts +0 -1
- package/api/resources/companies/types/index.d.ts +0 -2
- package/api/resources/companies/types/index.js +0 -2
- package/api/resources/components/client/Client.js +7 -7
- package/api/resources/crm/client/Client.js +5 -5
- package/api/resources/entitlements/client/Client.js +19 -19
- package/api/resources/events/client/Client.js +8 -8
- package/api/resources/features/client/Client.js +19 -19
- package/api/resources/plans/client/Client.d.ts +12 -1
- package/api/resources/plans/client/Client.js +99 -11
- package/api/resources/plans/client/requests/CreatePlanRequestBody.d.ts +0 -1
- package/api/resources/plans/client/requests/UpdatePlanRequestBody.d.ts +0 -2
- package/{dist/api/resources/companies/types/ListCompanyPlansResponse.d.ts → api/resources/plans/types/ListActivePlansResponse.d.ts} +3 -3
- package/api/resources/plans/types/index.d.ts +1 -0
- package/api/resources/plans/types/index.js +1 -0
- package/api/resources/webhooks/client/Client.js +9 -9
- package/api/types/BillingPlan.d.ts +11 -0
- package/api/types/BillingPlan.js +5 -0
- package/api/types/BillingPlanGroupResponseData.d.ts +11 -0
- package/api/types/BillingPlanGroupResponseData.js +5 -0
- package/api/types/BillingProductForSubscriptionResponseData.d.ts +16 -0
- package/api/types/BillingProductForSubscriptionResponseData.js +5 -0
- package/api/types/BillingProductPricing.d.ts +2 -0
- package/api/types/CompanyDetailResponseData.d.ts +1 -1
- package/api/types/CompanySubscriptionResponseData.d.ts +1 -1
- package/api/types/PlanDetailResponseData.d.ts +0 -1
- package/api/types/PlanResponseData.d.ts +0 -1
- package/api/types/index.d.ts +3 -1
- package/api/types/index.js +3 -1
- package/dist/Client.d.ts +10 -0
- package/dist/Client.js +88 -0
- package/dist/api/resources/accesstokens/client/Client.js +1 -1
- package/dist/api/resources/accounts/client/Client.js +14 -14
- package/dist/api/resources/billing/client/Client.d.ts +61 -0
- package/dist/api/resources/billing/client/Client.js +392 -8
- package/dist/api/resources/billing/client/requests/ChangeSubscriptionRequestBody.d.ts +16 -0
- package/dist/api/resources/billing/client/requests/ChangeSubscriptionRequestBody.js +5 -0
- package/dist/api/resources/billing/client/requests/CreateBillingPlanGroupRequestBody.d.ts +13 -0
- package/dist/api/resources/billing/client/requests/CreateBillingPlanGroupRequestBody.js +5 -0
- package/dist/api/resources/billing/client/requests/UpdateBillingPlanGroupRequestBody.d.ts +13 -0
- package/dist/api/resources/billing/client/requests/UpdateBillingPlanGroupRequestBody.js +5 -0
- package/dist/api/resources/billing/client/requests/index.d.ts +3 -0
- package/dist/api/resources/billing/types/ChangeSubscriptionWebResponse.d.ts +9 -0
- package/dist/api/resources/billing/types/ChangeSubscriptionWebResponse.js +5 -0
- package/dist/api/resources/billing/types/CreateBillingPlanGroupResponse.d.ts +9 -0
- package/dist/api/resources/billing/types/CreateBillingPlanGroupResponse.js +5 -0
- package/dist/api/resources/billing/types/GetBillingPlanGroupByAccountIdResponse.d.ts +9 -0
- package/dist/api/resources/billing/types/GetBillingPlanGroupByAccountIdResponse.js +5 -0
- package/dist/api/resources/billing/types/UpdateBillingPlanGroupResponse.d.ts +9 -0
- package/dist/api/resources/billing/types/UpdateBillingPlanGroupResponse.js +5 -0
- package/dist/api/resources/billing/types/index.d.ts +4 -0
- package/dist/api/resources/billing/types/index.js +4 -0
- package/dist/api/resources/companies/client/Client.d.ts +0 -13
- package/dist/api/resources/companies/client/Client.js +31 -136
- package/dist/api/resources/companies/client/requests/index.d.ts +0 -1
- package/dist/api/resources/companies/types/index.d.ts +0 -2
- package/dist/api/resources/companies/types/index.js +0 -2
- package/dist/api/resources/components/client/Client.js +7 -7
- package/dist/api/resources/crm/client/Client.js +5 -5
- package/dist/api/resources/entitlements/client/Client.js +19 -19
- package/dist/api/resources/events/client/Client.js +8 -8
- package/dist/api/resources/features/client/Client.js +19 -19
- package/dist/api/resources/plans/client/Client.d.ts +12 -1
- package/dist/api/resources/plans/client/Client.js +99 -11
- package/dist/api/resources/plans/client/requests/CreatePlanRequestBody.d.ts +0 -1
- package/dist/api/resources/plans/client/requests/UpdatePlanRequestBody.d.ts +0 -2
- package/{api/resources/companies/types/ListCompanyPlansResponse.d.ts → dist/api/resources/plans/types/ListActivePlansResponse.d.ts} +3 -3
- package/dist/api/resources/plans/types/ListActivePlansResponse.js +5 -0
- package/dist/api/resources/plans/types/index.d.ts +1 -0
- package/dist/api/resources/plans/types/index.js +1 -0
- package/dist/api/resources/webhooks/client/Client.js +9 -9
- package/dist/api/types/BillingPlan.d.ts +11 -0
- package/dist/api/types/BillingPlan.js +5 -0
- package/dist/api/types/BillingPlanGroupResponseData.d.ts +11 -0
- package/dist/api/types/BillingPlanGroupResponseData.js +5 -0
- package/dist/api/types/BillingProductForSubscriptionResponseData.d.ts +16 -0
- package/dist/api/types/BillingProductForSubscriptionResponseData.js +5 -0
- package/dist/api/types/BillingProductPricing.d.ts +2 -0
- package/dist/api/types/CompanyDetailResponseData.d.ts +1 -1
- package/dist/api/types/CompanySubscriptionResponseData.d.ts +1 -1
- package/dist/api/types/PlanDetailResponseData.d.ts +0 -1
- package/dist/api/types/PlanResponseData.d.ts +0 -1
- package/dist/api/types/index.d.ts +3 -1
- package/dist/api/types/index.js +3 -1
- package/dist/events.d.ts +3 -0
- package/dist/events.js +17 -5
- package/dist/serialization/resources/billing/client/requests/ChangeSubscriptionRequestBody.d.ts +14 -0
- package/dist/serialization/resources/billing/client/requests/ChangeSubscriptionRequestBody.js +35 -0
- package/dist/serialization/resources/billing/client/requests/CreateBillingPlanGroupRequestBody.d.ts +13 -0
- package/dist/serialization/resources/billing/client/requests/CreateBillingPlanGroupRequestBody.js +34 -0
- package/dist/serialization/resources/billing/client/requests/UpdateBillingPlanGroupRequestBody.d.ts +13 -0
- package/dist/serialization/resources/billing/client/requests/UpdateBillingPlanGroupRequestBody.js +34 -0
- package/dist/serialization/resources/billing/client/requests/index.d.ts +3 -0
- package/dist/serialization/resources/billing/client/requests/index.js +7 -1
- package/dist/serialization/resources/billing/types/ChangeSubscriptionWebResponse.d.ts +14 -0
- package/dist/serialization/resources/{companies/types/ListCompanyPlansParams.js → billing/types/ChangeSubscriptionWebResponse.js} +5 -6
- package/dist/serialization/resources/billing/types/CreateBillingPlanGroupResponse.d.ts +14 -0
- package/{serialization/resources/companies/types/ListCompanyPlansParams.js → dist/serialization/resources/billing/types/CreateBillingPlanGroupResponse.js} +5 -6
- package/dist/serialization/resources/billing/types/GetBillingPlanGroupByAccountIdResponse.d.ts +14 -0
- package/dist/serialization/resources/{companies/types/ListCompanyPlansResponse.js → billing/types/GetBillingPlanGroupByAccountIdResponse.js} +5 -6
- package/dist/serialization/resources/billing/types/UpdateBillingPlanGroupResponse.d.ts +14 -0
- package/{serialization/resources/companies/types/ListCompanyPlansResponse.js → dist/serialization/resources/billing/types/UpdateBillingPlanGroupResponse.js} +5 -6
- package/dist/serialization/resources/billing/types/index.d.ts +4 -0
- package/dist/serialization/resources/billing/types/index.js +4 -0
- package/dist/serialization/resources/companies/types/index.d.ts +0 -2
- package/dist/serialization/resources/companies/types/index.js +0 -2
- package/dist/serialization/resources/plans/client/requests/CreatePlanRequestBody.d.ts +0 -1
- package/dist/serialization/resources/plans/client/requests/CreatePlanRequestBody.js +0 -1
- package/dist/serialization/resources/plans/client/requests/UpdatePlanRequestBody.d.ts +0 -1
- package/dist/serialization/resources/plans/client/requests/UpdatePlanRequestBody.js +0 -1
- package/dist/serialization/resources/plans/types/ListActivePlansResponse.d.ts +14 -0
- package/dist/serialization/resources/plans/types/ListActivePlansResponse.js +35 -0
- package/dist/serialization/resources/plans/types/index.d.ts +1 -0
- package/dist/serialization/resources/plans/types/index.js +1 -0
- package/dist/serialization/types/BillingPlan.d.ts +17 -0
- package/dist/serialization/types/BillingPlan.js +38 -0
- package/dist/serialization/types/BillingPlanGroupResponseData.d.ts +14 -0
- package/dist/serialization/types/BillingPlanGroupResponseData.js +35 -0
- package/dist/serialization/types/BillingProductForSubscriptionResponseData.d.ts +22 -0
- package/{serialization/types/CompanyPlanResponseData.js → dist/serialization/types/BillingProductForSubscriptionResponseData.js} +9 -4
- package/dist/serialization/types/BillingProductPricing.d.ts +2 -0
- package/dist/serialization/types/BillingProductPricing.js +2 -0
- package/dist/serialization/types/CompanyDetailResponseData.d.ts +2 -1
- package/dist/serialization/types/CompanyDetailResponseData.js +2 -1
- package/dist/serialization/types/CompanySubscriptionResponseData.d.ts +2 -2
- package/dist/serialization/types/CompanySubscriptionResponseData.js +2 -2
- package/dist/serialization/types/PlanDetailResponseData.d.ts +0 -1
- package/dist/serialization/types/PlanDetailResponseData.js +0 -1
- package/dist/serialization/types/PlanResponseData.d.ts +0 -1
- package/dist/serialization/types/PlanResponseData.js +0 -1
- package/dist/serialization/types/index.d.ts +3 -1
- package/dist/serialization/types/index.js +3 -1
- package/dist/wrapper.js +20 -15
- package/events.d.ts +3 -0
- package/events.js +17 -5
- package/package.json +1 -1
- package/reference.md +282 -49
- package/serialization/resources/billing/client/requests/ChangeSubscriptionRequestBody.d.ts +14 -0
- package/serialization/resources/billing/client/requests/ChangeSubscriptionRequestBody.js +35 -0
- package/serialization/resources/billing/client/requests/CreateBillingPlanGroupRequestBody.d.ts +13 -0
- package/serialization/resources/billing/client/requests/CreateBillingPlanGroupRequestBody.js +34 -0
- package/serialization/resources/billing/client/requests/UpdateBillingPlanGroupRequestBody.d.ts +13 -0
- package/serialization/resources/billing/client/requests/UpdateBillingPlanGroupRequestBody.js +34 -0
- package/serialization/resources/billing/client/requests/index.d.ts +3 -0
- package/serialization/resources/billing/client/requests/index.js +7 -1
- package/serialization/resources/billing/types/ChangeSubscriptionWebResponse.d.ts +14 -0
- package/serialization/resources/billing/types/ChangeSubscriptionWebResponse.js +35 -0
- package/serialization/resources/billing/types/CreateBillingPlanGroupResponse.d.ts +14 -0
- package/serialization/resources/billing/types/CreateBillingPlanGroupResponse.js +35 -0
- package/serialization/resources/billing/types/GetBillingPlanGroupByAccountIdResponse.d.ts +14 -0
- package/serialization/resources/billing/types/GetBillingPlanGroupByAccountIdResponse.js +35 -0
- package/serialization/resources/billing/types/UpdateBillingPlanGroupResponse.d.ts +14 -0
- package/serialization/resources/billing/types/UpdateBillingPlanGroupResponse.js +35 -0
- package/serialization/resources/billing/types/index.d.ts +4 -0
- package/serialization/resources/billing/types/index.js +4 -0
- package/serialization/resources/companies/types/index.d.ts +0 -2
- package/serialization/resources/companies/types/index.js +0 -2
- package/serialization/resources/plans/client/requests/CreatePlanRequestBody.d.ts +0 -1
- package/serialization/resources/plans/client/requests/CreatePlanRequestBody.js +0 -1
- package/serialization/resources/plans/client/requests/UpdatePlanRequestBody.d.ts +0 -1
- package/serialization/resources/plans/client/requests/UpdatePlanRequestBody.js +0 -1
- package/serialization/resources/plans/types/ListActivePlansResponse.d.ts +14 -0
- package/serialization/resources/plans/types/ListActivePlansResponse.js +35 -0
- package/serialization/resources/plans/types/index.d.ts +1 -0
- package/serialization/resources/plans/types/index.js +1 -0
- package/serialization/types/BillingPlan.d.ts +17 -0
- package/serialization/types/BillingPlan.js +38 -0
- package/serialization/types/BillingPlanGroupResponseData.d.ts +14 -0
- package/serialization/types/BillingPlanGroupResponseData.js +35 -0
- package/serialization/types/BillingProductForSubscriptionResponseData.d.ts +22 -0
- package/{dist/serialization/types/CompanyPlanResponseData.js → serialization/types/BillingProductForSubscriptionResponseData.js} +9 -4
- package/serialization/types/BillingProductPricing.d.ts +2 -0
- package/serialization/types/BillingProductPricing.js +2 -0
- package/serialization/types/CompanyDetailResponseData.d.ts +2 -1
- package/serialization/types/CompanyDetailResponseData.js +2 -1
- package/serialization/types/CompanySubscriptionResponseData.d.ts +2 -2
- package/serialization/types/CompanySubscriptionResponseData.js +2 -2
- package/serialization/types/PlanDetailResponseData.d.ts +0 -1
- package/serialization/types/PlanDetailResponseData.js +0 -1
- package/serialization/types/PlanResponseData.d.ts +0 -1
- package/serialization/types/PlanResponseData.js +0 -1
- package/serialization/types/index.d.ts +3 -1
- package/serialization/types/index.js +3 -1
- package/wrapper.js +20 -15
- package/api/resources/companies/client/requests/ListCompanyPlansRequest.d.ts +0 -19
- package/api/resources/companies/types/ListCompanyPlansParams.d.ts +0 -14
- package/api/types/CompanyPlanResponseData.d.ts +0 -11
- package/dist/api/resources/companies/client/requests/ListCompanyPlansRequest.d.ts +0 -19
- package/dist/api/resources/companies/types/ListCompanyPlansParams.d.ts +0 -14
- package/dist/api/types/CompanyPlanResponseData.d.ts +0 -11
- package/dist/serialization/resources/companies/types/ListCompanyPlansParams.d.ts +0 -15
- package/dist/serialization/resources/companies/types/ListCompanyPlansResponse.d.ts +0 -15
- package/dist/serialization/types/CompanyPlanResponseData.d.ts +0 -17
- package/serialization/resources/companies/types/ListCompanyPlansParams.d.ts +0 -15
- package/serialization/resources/companies/types/ListCompanyPlansResponse.d.ts +0 -15
- package/serialization/types/CompanyPlanResponseData.d.ts +0 -17
- /package/api/resources/{companies/client/requests/ListCompanyPlansRequest.js → billing/client/requests/ChangeSubscriptionRequestBody.js} +0 -0
- /package/api/resources/{companies/types/ListCompanyPlansParams.js → billing/client/requests/CreateBillingPlanGroupRequestBody.js} +0 -0
- /package/api/resources/{companies/types/ListCompanyPlansResponse.js → billing/client/requests/UpdateBillingPlanGroupRequestBody.js} +0 -0
- /package/api/{types/CompanyPlanResponseData.js → resources/billing/types/ChangeSubscriptionWebResponse.js} +0 -0
- /package/{dist/api/resources/companies/client/requests/ListCompanyPlansRequest.js → api/resources/billing/types/CreateBillingPlanGroupResponse.js} +0 -0
- /package/{dist/api/resources/companies/types/ListCompanyPlansParams.js → api/resources/billing/types/GetBillingPlanGroupByAccountIdResponse.js} +0 -0
- /package/{dist/api/resources/companies/types/ListCompanyPlansResponse.js → api/resources/billing/types/UpdateBillingPlanGroupResponse.js} +0 -0
- /package/{dist/api/types/CompanyPlanResponseData.js → api/resources/plans/types/ListActivePlansResponse.js} +0 -0
|
@@ -26,13 +26,18 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
return result;
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
29
|
+
exports.BillingProductForSubscriptionResponseData = void 0;
|
|
30
30
|
const core = __importStar(require("../../core"));
|
|
31
|
-
exports.
|
|
32
|
-
|
|
31
|
+
exports.BillingProductForSubscriptionResponseData = core.serialization.object({
|
|
32
|
+
accountId: core.serialization.property("account_id", core.serialization.string()),
|
|
33
33
|
createdAt: core.serialization.property("created_at", core.serialization.date()),
|
|
34
|
+
currency: core.serialization.string(),
|
|
34
35
|
environmentId: core.serialization.property("environment_id", core.serialization.string()),
|
|
36
|
+
externalId: core.serialization.property("external_id", core.serialization.string()),
|
|
35
37
|
id: core.serialization.string(),
|
|
36
|
-
|
|
38
|
+
interval: core.serialization.string().optional(),
|
|
39
|
+
name: core.serialization.string(),
|
|
40
|
+
price: core.serialization.number(),
|
|
41
|
+
quantity: core.serialization.number(),
|
|
37
42
|
updatedAt: core.serialization.property("updated_at", core.serialization.date()),
|
|
38
43
|
});
|
|
@@ -7,7 +7,9 @@ import * as core from "../../core";
|
|
|
7
7
|
export declare const BillingProductPricing: core.serialization.ObjectSchema<serializers.BillingProductPricing.Raw, Schematic.BillingProductPricing>;
|
|
8
8
|
export declare namespace BillingProductPricing {
|
|
9
9
|
interface Raw {
|
|
10
|
+
interval?: string | null;
|
|
10
11
|
price: number;
|
|
12
|
+
price_external_id?: string | null;
|
|
11
13
|
product_external_id: string;
|
|
12
14
|
}
|
|
13
15
|
}
|
|
@@ -29,6 +29,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.BillingProductPricing = void 0;
|
|
30
30
|
const core = __importStar(require("../../core"));
|
|
31
31
|
exports.BillingProductPricing = core.serialization.object({
|
|
32
|
+
interval: core.serialization.string().optional(),
|
|
32
33
|
price: core.serialization.number(),
|
|
34
|
+
priceExternalId: core.serialization.property("price_external_id", core.serialization.string().optional()),
|
|
33
35
|
productExternalId: core.serialization.property("product_external_id", core.serialization.string()),
|
|
34
36
|
});
|
|
@@ -7,6 +7,7 @@ import * as core from "../../core";
|
|
|
7
7
|
import { PreviewObject } from "./PreviewObject";
|
|
8
8
|
import { EntityTraitDetailResponseData } from "./EntityTraitDetailResponseData";
|
|
9
9
|
import { EntityKeyDetailResponseData } from "./EntityKeyDetailResponseData";
|
|
10
|
+
import { BillingPlan } from "./BillingPlan";
|
|
10
11
|
export declare const CompanyDetailResponseData: core.serialization.ObjectSchema<serializers.CompanyDetailResponseData.Raw, Schematic.CompanyDetailResponseData>;
|
|
11
12
|
export declare namespace CompanyDetailResponseData {
|
|
12
13
|
interface Raw {
|
|
@@ -19,7 +20,7 @@ export declare namespace CompanyDetailResponseData {
|
|
|
19
20
|
last_seen_at?: string | null;
|
|
20
21
|
logo_url?: string | null;
|
|
21
22
|
name: string;
|
|
22
|
-
plan?:
|
|
23
|
+
plan?: BillingPlan.Raw | null;
|
|
23
24
|
plans: PreviewObject.Raw[];
|
|
24
25
|
traits?: Record<string, unknown> | null;
|
|
25
26
|
updated_at: string;
|
|
@@ -31,6 +31,7 @@ const core = __importStar(require("../../core"));
|
|
|
31
31
|
const PreviewObject_1 = require("./PreviewObject");
|
|
32
32
|
const EntityTraitDetailResponseData_1 = require("./EntityTraitDetailResponseData");
|
|
33
33
|
const EntityKeyDetailResponseData_1 = require("./EntityKeyDetailResponseData");
|
|
34
|
+
const BillingPlan_1 = require("./BillingPlan");
|
|
34
35
|
exports.CompanyDetailResponseData = core.serialization.object({
|
|
35
36
|
addOns: core.serialization.property("add_ons", core.serialization.list(PreviewObject_1.PreviewObject)),
|
|
36
37
|
createdAt: core.serialization.property("created_at", core.serialization.date()),
|
|
@@ -41,7 +42,7 @@ exports.CompanyDetailResponseData = core.serialization.object({
|
|
|
41
42
|
lastSeenAt: core.serialization.property("last_seen_at", core.serialization.date().optional()),
|
|
42
43
|
logoUrl: core.serialization.property("logo_url", core.serialization.string().optional()),
|
|
43
44
|
name: core.serialization.string(),
|
|
44
|
-
plan:
|
|
45
|
+
plan: BillingPlan_1.BillingPlan.optional(),
|
|
45
46
|
plans: core.serialization.list(PreviewObject_1.PreviewObject),
|
|
46
47
|
traits: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(),
|
|
47
48
|
updatedAt: core.serialization.property("updated_at", core.serialization.date()),
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
import * as serializers from "../index";
|
|
5
5
|
import * as Schematic from "../../api/index";
|
|
6
6
|
import * as core from "../../core";
|
|
7
|
-
import {
|
|
7
|
+
import { BillingProductForSubscriptionResponseData } from "./BillingProductForSubscriptionResponseData";
|
|
8
8
|
export declare const CompanySubscriptionResponseData: core.serialization.ObjectSchema<serializers.CompanySubscriptionResponseData.Raw, Schematic.CompanySubscriptionResponseData>;
|
|
9
9
|
export declare namespace CompanySubscriptionResponseData {
|
|
10
10
|
interface Raw {
|
|
11
11
|
customer_external_id: string;
|
|
12
12
|
expired_at?: string | null;
|
|
13
13
|
interval: string;
|
|
14
|
-
products:
|
|
14
|
+
products: BillingProductForSubscriptionResponseData.Raw[];
|
|
15
15
|
subscription_external_id: string;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -28,11 +28,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.CompanySubscriptionResponseData = void 0;
|
|
30
30
|
const core = __importStar(require("../../core"));
|
|
31
|
-
const
|
|
31
|
+
const BillingProductForSubscriptionResponseData_1 = require("./BillingProductForSubscriptionResponseData");
|
|
32
32
|
exports.CompanySubscriptionResponseData = core.serialization.object({
|
|
33
33
|
customerExternalId: core.serialization.property("customer_external_id", core.serialization.string()),
|
|
34
34
|
expiredAt: core.serialization.property("expired_at", core.serialization.date().optional()),
|
|
35
35
|
interval: core.serialization.string(),
|
|
36
|
-
products: core.serialization.list(
|
|
36
|
+
products: core.serialization.list(BillingProductForSubscriptionResponseData_1.BillingProductForSubscriptionResponseData),
|
|
37
37
|
subscriptionExternalId: core.serialization.property("subscription_external_id", core.serialization.string()),
|
|
38
38
|
});
|
|
@@ -9,7 +9,6 @@ import { FeatureDetailResponseData } from "./FeatureDetailResponseData";
|
|
|
9
9
|
export declare const PlanDetailResponseData: core.serialization.ObjectSchema<serializers.PlanDetailResponseData.Raw, Schematic.PlanDetailResponseData>;
|
|
10
10
|
export declare namespace PlanDetailResponseData {
|
|
11
11
|
interface Raw {
|
|
12
|
-
audience_type: string;
|
|
13
12
|
billing_product?: BillingProductDetailResponseData.Raw | null;
|
|
14
13
|
company_count: number;
|
|
15
14
|
created_at: string;
|
|
@@ -31,7 +31,6 @@ const core = __importStar(require("../../core"));
|
|
|
31
31
|
const BillingProductDetailResponseData_1 = require("./BillingProductDetailResponseData");
|
|
32
32
|
const FeatureDetailResponseData_1 = require("./FeatureDetailResponseData");
|
|
33
33
|
exports.PlanDetailResponseData = core.serialization.object({
|
|
34
|
-
audienceType: core.serialization.property("audience_type", core.serialization.string()),
|
|
35
34
|
billingProduct: core.serialization.property("billing_product", BillingProductDetailResponseData_1.BillingProductDetailResponseData.optional()),
|
|
36
35
|
companyCount: core.serialization.property("company_count", core.serialization.number()),
|
|
37
36
|
createdAt: core.serialization.property("created_at", core.serialization.date()),
|
|
@@ -7,7 +7,6 @@ import * as core from "../../core";
|
|
|
7
7
|
export declare const PlanResponseData: core.serialization.ObjectSchema<serializers.PlanResponseData.Raw, Schematic.PlanResponseData>;
|
|
8
8
|
export declare namespace PlanResponseData {
|
|
9
9
|
interface Raw {
|
|
10
|
-
audience_type: string;
|
|
11
10
|
created_at: string;
|
|
12
11
|
description: string;
|
|
13
12
|
icon: string;
|
|
@@ -29,7 +29,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.PlanResponseData = void 0;
|
|
30
30
|
const core = __importStar(require("../../core"));
|
|
31
31
|
exports.PlanResponseData = core.serialization.object({
|
|
32
|
-
audienceType: core.serialization.property("audience_type", core.serialization.string()),
|
|
33
32
|
createdAt: core.serialization.property("created_at", core.serialization.date()),
|
|
34
33
|
description: core.serialization.string(),
|
|
35
34
|
icon: core.serialization.string(),
|
|
@@ -7,8 +7,11 @@ export * from "./AudienceRequestBody";
|
|
|
7
7
|
export * from "./BillingCustomerResponseData";
|
|
8
8
|
export * from "./BillingCustomerSubscription";
|
|
9
9
|
export * from "./BillingCustomerWithSubscriptionsResponseData";
|
|
10
|
+
export * from "./BillingPlan";
|
|
11
|
+
export * from "./BillingPlanGroupResponseData";
|
|
10
12
|
export * from "./BillingPriceResponseData";
|
|
11
13
|
export * from "./BillingProductDetailResponseData";
|
|
14
|
+
export * from "./BillingProductForSubscriptionResponseData";
|
|
12
15
|
export * from "./BillingProductPlanResponseData";
|
|
13
16
|
export * from "./BillingProductPricing";
|
|
14
17
|
export * from "./BillingProductResponseData";
|
|
@@ -22,7 +25,6 @@ export * from "./CompanyDetailResponseData";
|
|
|
22
25
|
export * from "./CompanyMembershipDetailResponseData";
|
|
23
26
|
export * from "./CompanyMembershipResponseData";
|
|
24
27
|
export * from "./CompanyOverrideResponseData";
|
|
25
|
-
export * from "./CompanyPlanResponseData";
|
|
26
28
|
export * from "./CompanyResponseData";
|
|
27
29
|
export * from "./CompanySubscriptionResponseData";
|
|
28
30
|
export * from "./ComponentHydrateResponseData";
|
|
@@ -23,8 +23,11 @@ __exportStar(require("./AudienceRequestBody"), exports);
|
|
|
23
23
|
__exportStar(require("./BillingCustomerResponseData"), exports);
|
|
24
24
|
__exportStar(require("./BillingCustomerSubscription"), exports);
|
|
25
25
|
__exportStar(require("./BillingCustomerWithSubscriptionsResponseData"), exports);
|
|
26
|
+
__exportStar(require("./BillingPlan"), exports);
|
|
27
|
+
__exportStar(require("./BillingPlanGroupResponseData"), exports);
|
|
26
28
|
__exportStar(require("./BillingPriceResponseData"), exports);
|
|
27
29
|
__exportStar(require("./BillingProductDetailResponseData"), exports);
|
|
30
|
+
__exportStar(require("./BillingProductForSubscriptionResponseData"), exports);
|
|
28
31
|
__exportStar(require("./BillingProductPlanResponseData"), exports);
|
|
29
32
|
__exportStar(require("./BillingProductPricing"), exports);
|
|
30
33
|
__exportStar(require("./BillingProductResponseData"), exports);
|
|
@@ -38,7 +41,6 @@ __exportStar(require("./CompanyDetailResponseData"), exports);
|
|
|
38
41
|
__exportStar(require("./CompanyMembershipDetailResponseData"), exports);
|
|
39
42
|
__exportStar(require("./CompanyMembershipResponseData"), exports);
|
|
40
43
|
__exportStar(require("./CompanyOverrideResponseData"), exports);
|
|
41
|
-
__exportStar(require("./CompanyPlanResponseData"), exports);
|
|
42
44
|
__exportStar(require("./CompanyResponseData"), exports);
|
|
43
45
|
__exportStar(require("./CompanySubscriptionResponseData"), exports);
|
|
44
46
|
__exportStar(require("./ComponentHydrateResponseData"), exports);
|
package/wrapper.js
CHANGED
|
@@ -18,7 +18,9 @@ const custom_1 = require("./core/fetcher/custom");
|
|
|
18
18
|
class SchematicClient extends Client_1.SchematicClient {
|
|
19
19
|
constructor(opts) {
|
|
20
20
|
var _a, _b;
|
|
21
|
-
const { apiKey = "",
|
|
21
|
+
const { apiKey = "", basePath, eventBufferInterval, flagDefaults = {}, logger = new logger_1.ConsoleLogger(), } = opts !== null && opts !== void 0 ? opts : {};
|
|
22
|
+
let { offline = false } = opts !== null && opts !== void 0 ? opts : {};
|
|
23
|
+
// Set headers
|
|
22
24
|
const headers = {};
|
|
23
25
|
if (opts === null || opts === void 0 ? void 0 : opts.environmentId) {
|
|
24
26
|
headers["X-Schematic-Environment-Id"] = opts.environmentId;
|
|
@@ -26,28 +28,31 @@ class SchematicClient extends Client_1.SchematicClient {
|
|
|
26
28
|
if (opts === null || opts === void 0 ? void 0 : opts.headers) {
|
|
27
29
|
Object.assign(headers, opts.headers);
|
|
28
30
|
}
|
|
31
|
+
// Handle implied offline mode
|
|
32
|
+
if (offline) {
|
|
33
|
+
if (apiKey !== "") {
|
|
34
|
+
logger.debug("Offline mode enabled, ignoring API key");
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else if (apiKey === "" && !offline) {
|
|
38
|
+
logger.warn("No API key was provided, running in offline mode");
|
|
39
|
+
offline = true;
|
|
40
|
+
}
|
|
41
|
+
// Initialize wrapped client
|
|
29
42
|
super({
|
|
30
43
|
apiKey,
|
|
31
|
-
environment:
|
|
44
|
+
environment: basePath,
|
|
32
45
|
fetcher: offline ? custom_1.offlineFetcher : (0, custom_1.provideFetcher)(headers),
|
|
33
46
|
});
|
|
34
|
-
|
|
47
|
+
this.logger = logger;
|
|
35
48
|
this.eventBuffer = new events_1.EventBuffer(this.events, {
|
|
36
|
-
interval:
|
|
49
|
+
interval: eventBufferInterval,
|
|
50
|
+
logger,
|
|
51
|
+
offline,
|
|
37
52
|
});
|
|
38
53
|
this.flagCheckCacheProviders = (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.cacheProviders) === null || _a === void 0 ? void 0 : _a.flagChecks) !== null && _b !== void 0 ? _b : [new cache_1.LocalCache()];
|
|
39
|
-
this.logger = (opts === null || opts === void 0 ? void 0 : opts.logger) || new logger_1.ConsoleLogger();
|
|
40
|
-
if (offline) {
|
|
41
|
-
if (apiKey !== "") {
|
|
42
|
-
this.logger.debug("Offline mode enabled, ignoring API key");
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
else if (apiKey === "") {
|
|
46
|
-
this.logger.warn("No API key was provided, running in offline mode");
|
|
47
|
-
this.offline = true;
|
|
48
|
-
}
|
|
49
|
-
this.offline = offline;
|
|
50
54
|
this.flagDefaults = flagDefaults;
|
|
55
|
+
this.offline = offline;
|
|
51
56
|
}
|
|
52
57
|
checkFlag(evalCtx, key) {
|
|
53
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* @example
|
|
6
|
-
* {}
|
|
7
|
-
*/
|
|
8
|
-
export interface ListCompanyPlansRequest {
|
|
9
|
-
companyId?: string;
|
|
10
|
-
planId?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Page limit (default 100)
|
|
13
|
-
*/
|
|
14
|
-
limit?: number;
|
|
15
|
-
/**
|
|
16
|
-
* Page offset (default 0)
|
|
17
|
-
*/
|
|
18
|
-
offset?: number;
|
|
19
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Input parameters
|
|
6
|
-
*/
|
|
7
|
-
export interface ListCompanyPlansParams {
|
|
8
|
-
companyId?: string;
|
|
9
|
-
/** Page limit (default 100) */
|
|
10
|
-
limit?: number;
|
|
11
|
-
/** Page offset (default 0) */
|
|
12
|
-
offset?: number;
|
|
13
|
-
planId?: string;
|
|
14
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* @example
|
|
6
|
-
* {}
|
|
7
|
-
*/
|
|
8
|
-
export interface ListCompanyPlansRequest {
|
|
9
|
-
companyId?: string;
|
|
10
|
-
planId?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Page limit (default 100)
|
|
13
|
-
*/
|
|
14
|
-
limit?: number;
|
|
15
|
-
/**
|
|
16
|
-
* Page offset (default 0)
|
|
17
|
-
*/
|
|
18
|
-
offset?: number;
|
|
19
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Input parameters
|
|
6
|
-
*/
|
|
7
|
-
export interface ListCompanyPlansParams {
|
|
8
|
-
companyId?: string;
|
|
9
|
-
/** Page limit (default 100) */
|
|
10
|
-
limit?: number;
|
|
11
|
-
/** Page offset (default 0) */
|
|
12
|
-
offset?: number;
|
|
13
|
-
planId?: string;
|
|
14
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as serializers from "../../../index";
|
|
5
|
-
import * as Schematic from "../../../../api/index";
|
|
6
|
-
import * as core from "../../../../core";
|
|
7
|
-
export declare const ListCompanyPlansParams: core.serialization.ObjectSchema<serializers.ListCompanyPlansParams.Raw, Schematic.ListCompanyPlansParams>;
|
|
8
|
-
export declare namespace ListCompanyPlansParams {
|
|
9
|
-
interface Raw {
|
|
10
|
-
company_id?: string | null;
|
|
11
|
-
limit?: number | null;
|
|
12
|
-
offset?: number | null;
|
|
13
|
-
plan_id?: string | null;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as serializers from "../../../index";
|
|
5
|
-
import * as Schematic from "../../../../api/index";
|
|
6
|
-
import * as core from "../../../../core";
|
|
7
|
-
import { CompanyPlanResponseData } from "../../../types/CompanyPlanResponseData";
|
|
8
|
-
import { ListCompanyPlansParams } from "./ListCompanyPlansParams";
|
|
9
|
-
export declare const ListCompanyPlansResponse: core.serialization.ObjectSchema<serializers.ListCompanyPlansResponse.Raw, Schematic.ListCompanyPlansResponse>;
|
|
10
|
-
export declare namespace ListCompanyPlansResponse {
|
|
11
|
-
interface Raw {
|
|
12
|
-
data: CompanyPlanResponseData.Raw[];
|
|
13
|
-
params: ListCompanyPlansParams.Raw;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as serializers from "../index";
|
|
5
|
-
import * as Schematic from "../../api/index";
|
|
6
|
-
import * as core from "../../core";
|
|
7
|
-
export declare const CompanyPlanResponseData: core.serialization.ObjectSchema<serializers.CompanyPlanResponseData.Raw, Schematic.CompanyPlanResponseData>;
|
|
8
|
-
export declare namespace CompanyPlanResponseData {
|
|
9
|
-
interface Raw {
|
|
10
|
-
company_id: string;
|
|
11
|
-
created_at: string;
|
|
12
|
-
environment_id: string;
|
|
13
|
-
id: string;
|
|
14
|
-
plan_id: string;
|
|
15
|
-
updated_at: string;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as serializers from "../../../index";
|
|
5
|
-
import * as Schematic from "../../../../api/index";
|
|
6
|
-
import * as core from "../../../../core";
|
|
7
|
-
export declare const ListCompanyPlansParams: core.serialization.ObjectSchema<serializers.ListCompanyPlansParams.Raw, Schematic.ListCompanyPlansParams>;
|
|
8
|
-
export declare namespace ListCompanyPlansParams {
|
|
9
|
-
interface Raw {
|
|
10
|
-
company_id?: string | null;
|
|
11
|
-
limit?: number | null;
|
|
12
|
-
offset?: number | null;
|
|
13
|
-
plan_id?: string | null;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as serializers from "../../../index";
|
|
5
|
-
import * as Schematic from "../../../../api/index";
|
|
6
|
-
import * as core from "../../../../core";
|
|
7
|
-
import { CompanyPlanResponseData } from "../../../types/CompanyPlanResponseData";
|
|
8
|
-
import { ListCompanyPlansParams } from "./ListCompanyPlansParams";
|
|
9
|
-
export declare const ListCompanyPlansResponse: core.serialization.ObjectSchema<serializers.ListCompanyPlansResponse.Raw, Schematic.ListCompanyPlansResponse>;
|
|
10
|
-
export declare namespace ListCompanyPlansResponse {
|
|
11
|
-
interface Raw {
|
|
12
|
-
data: CompanyPlanResponseData.Raw[];
|
|
13
|
-
params: ListCompanyPlansParams.Raw;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as serializers from "../index";
|
|
5
|
-
import * as Schematic from "../../api/index";
|
|
6
|
-
import * as core from "../../core";
|
|
7
|
-
export declare const CompanyPlanResponseData: core.serialization.ObjectSchema<serializers.CompanyPlanResponseData.Raw, Schematic.CompanyPlanResponseData>;
|
|
8
|
-
export declare namespace CompanyPlanResponseData {
|
|
9
|
-
interface Raw {
|
|
10
|
-
company_id: string;
|
|
11
|
-
created_at: string;
|
|
12
|
-
environment_id: string;
|
|
13
|
-
id: string;
|
|
14
|
-
plan_id: string;
|
|
15
|
-
updated_at: string;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|