@schematichq/schematic-typescript-node 1.1.0 → 1.1.2

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 (111) hide show
  1. package/README.md +19 -11
  2. package/api/resources/accesstokens/client/Client.js +1 -1
  3. package/api/resources/accounts/client/Client.js +14 -14
  4. package/api/resources/billing/client/Client.js +8 -8
  5. package/api/resources/companies/client/Client.js +32 -32
  6. package/api/resources/components/client/Client.d.ts +0 -1
  7. package/api/resources/components/client/Client.js +7 -8
  8. package/api/resources/components/client/requests/CreateComponentRequestBody.d.ts +1 -2
  9. package/api/resources/components/client/requests/UpdateComponentRequestBody.d.ts +1 -1
  10. package/api/resources/crm/client/Client.js +5 -5
  11. package/api/resources/entitlements/client/Client.js +19 -19
  12. package/api/resources/events/client/Client.js +8 -8
  13. package/api/resources/features/client/Client.js +19 -19
  14. package/api/resources/plans/client/Client.js +18 -12
  15. package/api/resources/plans/client/requests/CountPlansRequest.d.ts +5 -0
  16. package/api/resources/plans/client/requests/ListPlansRequest.d.ts +5 -0
  17. package/api/resources/plans/types/CountPlansParams.d.ts +3 -0
  18. package/api/resources/plans/types/CountPlansRequestPlanType.d.ts +11 -0
  19. package/api/resources/plans/types/CountPlansRequestPlanType.js +10 -0
  20. package/api/resources/plans/types/CountPlansResponseParamsPlanType.d.ts +11 -0
  21. package/api/resources/plans/types/CountPlansResponseParamsPlanType.js +10 -0
  22. package/api/resources/plans/types/ListPlansParams.d.ts +3 -0
  23. package/api/resources/plans/types/ListPlansRequestPlanType.d.ts +11 -0
  24. package/api/resources/plans/types/ListPlansRequestPlanType.js +10 -0
  25. package/api/resources/plans/types/ListPlansResponseParamsPlanType.d.ts +11 -0
  26. package/api/resources/plans/types/ListPlansResponseParamsPlanType.js +10 -0
  27. package/api/resources/plans/types/index.d.ts +4 -0
  28. package/api/resources/plans/types/index.js +4 -0
  29. package/api/resources/webhooks/client/Client.js +9 -9
  30. package/api/types/ComponentResponseData.d.ts +1 -1
  31. package/dist/api/resources/accesstokens/client/Client.js +1 -1
  32. package/dist/api/resources/accounts/client/Client.js +14 -14
  33. package/dist/api/resources/billing/client/Client.js +8 -8
  34. package/dist/api/resources/companies/client/Client.js +32 -32
  35. package/dist/api/resources/components/client/Client.d.ts +0 -1
  36. package/dist/api/resources/components/client/Client.js +7 -8
  37. package/dist/api/resources/components/client/requests/CreateComponentRequestBody.d.ts +1 -2
  38. package/dist/api/resources/components/client/requests/UpdateComponentRequestBody.d.ts +1 -1
  39. package/dist/api/resources/crm/client/Client.js +5 -5
  40. package/dist/api/resources/entitlements/client/Client.js +19 -19
  41. package/dist/api/resources/events/client/Client.js +8 -8
  42. package/dist/api/resources/features/client/Client.js +19 -19
  43. package/dist/api/resources/plans/client/Client.js +18 -12
  44. package/dist/api/resources/plans/client/requests/CountPlansRequest.d.ts +5 -0
  45. package/dist/api/resources/plans/client/requests/ListPlansRequest.d.ts +5 -0
  46. package/dist/api/resources/plans/types/CountPlansParams.d.ts +3 -0
  47. package/dist/api/resources/plans/types/CountPlansRequestPlanType.d.ts +11 -0
  48. package/dist/api/resources/plans/types/CountPlansRequestPlanType.js +10 -0
  49. package/dist/api/resources/plans/types/CountPlansResponseParamsPlanType.d.ts +11 -0
  50. package/dist/api/resources/plans/types/CountPlansResponseParamsPlanType.js +10 -0
  51. package/dist/api/resources/plans/types/ListPlansParams.d.ts +3 -0
  52. package/dist/api/resources/plans/types/ListPlansRequestPlanType.d.ts +11 -0
  53. package/dist/api/resources/plans/types/ListPlansRequestPlanType.js +10 -0
  54. package/dist/api/resources/plans/types/ListPlansResponseParamsPlanType.d.ts +11 -0
  55. package/dist/api/resources/plans/types/ListPlansResponseParamsPlanType.js +10 -0
  56. package/dist/api/resources/plans/types/index.d.ts +4 -0
  57. package/dist/api/resources/plans/types/index.js +4 -0
  58. package/dist/api/resources/webhooks/client/Client.js +9 -9
  59. package/dist/api/types/ComponentResponseData.d.ts +1 -1
  60. package/dist/serialization/resources/components/client/requests/CreateComponentRequestBody.d.ts +1 -1
  61. package/dist/serialization/resources/components/client/requests/CreateComponentRequestBody.js +1 -1
  62. package/dist/serialization/resources/components/client/requests/UpdateComponentRequestBody.d.ts +1 -1
  63. package/dist/serialization/resources/components/client/requests/UpdateComponentRequestBody.js +1 -1
  64. package/dist/serialization/resources/plans/types/CountPlansParams.d.ts +2 -0
  65. package/dist/serialization/resources/plans/types/CountPlansParams.js +2 -0
  66. package/dist/serialization/resources/plans/types/CountPlansRequestPlanType.d.ts +10 -0
  67. package/dist/serialization/resources/plans/types/CountPlansRequestPlanType.js +31 -0
  68. package/dist/serialization/resources/plans/types/CountPlansResponseParamsPlanType.d.ts +10 -0
  69. package/dist/serialization/resources/plans/types/CountPlansResponseParamsPlanType.js +31 -0
  70. package/dist/serialization/resources/plans/types/ListPlansParams.d.ts +2 -0
  71. package/dist/serialization/resources/plans/types/ListPlansParams.js +2 -0
  72. package/dist/serialization/resources/plans/types/ListPlansRequestPlanType.d.ts +10 -0
  73. package/dist/serialization/resources/plans/types/ListPlansRequestPlanType.js +31 -0
  74. package/dist/serialization/resources/plans/types/ListPlansResponseParamsPlanType.d.ts +10 -0
  75. package/dist/serialization/resources/plans/types/ListPlansResponseParamsPlanType.js +31 -0
  76. package/dist/serialization/resources/plans/types/index.d.ts +4 -0
  77. package/dist/serialization/resources/plans/types/index.js +4 -0
  78. package/dist/serialization/types/ComponentResponseData.d.ts +1 -1
  79. package/dist/serialization/types/ComponentResponseData.js +1 -1
  80. package/dist/wrapper.d.ts +2 -1
  81. package/dist/wrapper.js +3 -6
  82. package/package.json +10 -13
  83. package/reference.md +0 -1
  84. package/serialization/resources/components/client/requests/CreateComponentRequestBody.d.ts +1 -1
  85. package/serialization/resources/components/client/requests/CreateComponentRequestBody.js +1 -1
  86. package/serialization/resources/components/client/requests/UpdateComponentRequestBody.d.ts +1 -1
  87. package/serialization/resources/components/client/requests/UpdateComponentRequestBody.js +1 -1
  88. package/serialization/resources/plans/types/CountPlansParams.d.ts +2 -0
  89. package/serialization/resources/plans/types/CountPlansParams.js +2 -0
  90. package/serialization/resources/plans/types/CountPlansRequestPlanType.d.ts +10 -0
  91. package/serialization/resources/plans/types/CountPlansRequestPlanType.js +31 -0
  92. package/serialization/resources/plans/types/CountPlansResponseParamsPlanType.d.ts +10 -0
  93. package/serialization/resources/plans/types/CountPlansResponseParamsPlanType.js +31 -0
  94. package/serialization/resources/plans/types/ListPlansParams.d.ts +2 -0
  95. package/serialization/resources/plans/types/ListPlansParams.js +2 -0
  96. package/serialization/resources/plans/types/ListPlansRequestPlanType.d.ts +10 -0
  97. package/serialization/resources/plans/types/ListPlansRequestPlanType.js +31 -0
  98. package/serialization/resources/plans/types/ListPlansResponseParamsPlanType.d.ts +10 -0
  99. package/serialization/resources/plans/types/ListPlansResponseParamsPlanType.js +31 -0
  100. package/serialization/resources/plans/types/index.d.ts +4 -0
  101. package/serialization/resources/plans/types/index.js +4 -0
  102. package/serialization/types/ComponentResponseData.d.ts +1 -1
  103. package/serialization/types/ComponentResponseData.js +1 -1
  104. package/wrapper.d.ts +2 -1
  105. package/wrapper.js +3 -6
  106. package/.husky/pre-commit +0 -1
  107. package/dist/version.d.ts +0 -1
  108. package/dist/version.js +0 -4
  109. package/generate-version.js +0 -6
  110. package/version.d.ts +0 -1
  111. package/version.js +0 -4
@@ -7,7 +7,7 @@ import * as core from "../../core";
7
7
  export declare const ComponentResponseData: core.serialization.ObjectSchema<serializers.ComponentResponseData.Raw, Schematic.ComponentResponseData>;
8
8
  export declare namespace ComponentResponseData {
9
9
  interface Raw {
10
- ast: number[];
10
+ ast?: Record<string, number> | null;
11
11
  created_at: string;
12
12
  id: string;
13
13
  name: string;
@@ -29,7 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.ComponentResponseData = void 0;
30
30
  const core = __importStar(require("../../core"));
31
31
  exports.ComponentResponseData = core.serialization.object({
32
- ast: core.serialization.list(core.serialization.number()),
32
+ ast: core.serialization.record(core.serialization.string(), core.serialization.number()).optional(),
33
33
  createdAt: core.serialization.property("created_at", core.serialization.date()),
34
34
  id: core.serialization.string(),
35
35
  name: core.serialization.string(),
package/dist/wrapper.d.ts CHANGED
@@ -3,6 +3,7 @@ import { SchematicClient as BaseClient } from "./Client";
3
3
  import { CacheProvider } from "./cache";
4
4
  import { Logger } from "./logger";
5
5
  export interface SchematicOptions {
6
+ apiKey?: string;
6
7
  basePath?: string;
7
8
  cacheProviders?: {
8
9
  flagChecks?: CacheProvider<boolean>[];
@@ -22,7 +23,7 @@ export declare class SchematicClient extends BaseClient {
22
23
  private flagDefaults;
23
24
  private logger;
24
25
  private offline;
25
- constructor(apiKey: string, opts?: SchematicOptions);
26
+ constructor(opts?: SchematicOptions);
26
27
  checkFlag(evalCtx: api.CheckFlagRequestBody, key: string): Promise<boolean>;
27
28
  close(): Promise<void>;
28
29
  identify(body: api.EventBodyIdentify): Promise<void>;
package/dist/wrapper.js CHANGED
@@ -15,14 +15,11 @@ const cache_1 = require("./cache");
15
15
  const logger_1 = require("./logger");
16
16
  const events_1 = require("./events");
17
17
  const custom_1 = require("./core/fetcher/custom");
18
- const version_1 = require("./version");
19
18
  class SchematicClient extends Client_1.SchematicClient {
20
- constructor(apiKey, opts) {
19
+ constructor(opts) {
21
20
  var _a, _b;
22
- const { offline = false } = opts !== null && opts !== void 0 ? opts : {};
23
- const headers = {
24
- "User-Agent": `schematic-typescript-node@${version_1.version}`,
25
- };
21
+ const { apiKey = "", offline = false } = opts !== null && opts !== void 0 ? opts : {};
22
+ const headers = {};
26
23
  if (opts === null || opts === void 0 ? void 0 : opts.environmentId) {
27
24
  headers["X-Schematic-Environment-Id"] = opts.environmentId;
28
25
  }
package/package.json CHANGED
@@ -1,36 +1,33 @@
1
1
  {
2
2
  "name": "@schematichq/schematic-typescript-node",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "private": false,
5
5
  "repository": "https://github.com/schematichq/schematic-node",
6
6
  "main": "./index.js",
7
7
  "types": "./index.d.ts",
8
8
  "scripts": {
9
- "build": "tsc",
10
9
  "format": "prettier . --write --ignore-unknown",
10
+ "build": "tsc",
11
11
  "prepack": "cp -rv dist/. .",
12
- "prepare": "husky",
13
- "test": "jest",
14
- "ts-version": "node generate-version.js && git add src/version.ts"
12
+ "test": "jest"
15
13
  },
16
14
  "dependencies": {
15
+ "url-join": "4.0.1",
17
16
  "form-data": "^4.0.0",
18
17
  "formdata-node": "^6.0.3",
19
18
  "node-fetch": "2.7.0",
20
- "qs": "6.11.2",
21
- "url-join": "4.0.1"
19
+ "qs": "6.11.2"
22
20
  },
23
21
  "devDependencies": {
24
- "@types/jest": "29.5.5",
25
- "@types/node": "17.0.33",
26
- "@types/node-fetch": "2.6.9",
27
- "@types/qs": "6.9.8",
28
22
  "@types/url-join": "4.0.1",
29
- "husky": "^9.1.4",
23
+ "@types/qs": "6.9.8",
24
+ "@types/node-fetch": "2.6.9",
30
25
  "jest": "29.7.0",
26
+ "@types/jest": "29.5.5",
27
+ "ts-jest": "29.1.1",
31
28
  "jest-environment-jsdom": "29.7.0",
29
+ "@types/node": "17.0.33",
32
30
  "prettier": "2.7.1",
33
- "ts-jest": "29.1.1",
34
31
  "typescript": "4.6.4"
35
32
  },
36
33
  "browser": {
package/reference.md CHANGED
@@ -4813,7 +4813,6 @@ await client.components.listComponents();
4813
4813
 
4814
4814
  ```typescript
4815
4815
  await client.components.createComponent({
4816
- ast: [1],
4817
4816
  entityType: Schematic.CreateComponentRequestBodyEntityType.Entitlement,
4818
4817
  name: "name",
4819
4818
  });
@@ -8,7 +8,7 @@ import { CreateComponentRequestBodyEntityType } from "../../types/CreateComponen
8
8
  export declare const CreateComponentRequestBody: core.serialization.Schema<serializers.CreateComponentRequestBody.Raw, Schematic.CreateComponentRequestBody>;
9
9
  export declare namespace CreateComponentRequestBody {
10
10
  interface Raw {
11
- ast: number[];
11
+ ast?: Record<string, number> | null;
12
12
  entity_type: CreateComponentRequestBodyEntityType.Raw;
13
13
  name: string;
14
14
  }
@@ -30,7 +30,7 @@ exports.CreateComponentRequestBody = void 0;
30
30
  const core = __importStar(require("../../../../../core"));
31
31
  const CreateComponentRequestBodyEntityType_1 = require("../../types/CreateComponentRequestBodyEntityType");
32
32
  exports.CreateComponentRequestBody = core.serialization.object({
33
- ast: core.serialization.list(core.serialization.number()),
33
+ ast: core.serialization.record(core.serialization.string(), core.serialization.number()).optional(),
34
34
  entityType: core.serialization.property("entity_type", CreateComponentRequestBodyEntityType_1.CreateComponentRequestBodyEntityType),
35
35
  name: core.serialization.string(),
36
36
  });
@@ -9,7 +9,7 @@ import { UpdateComponentRequestBodyState } from "../../types/UpdateComponentRequ
9
9
  export declare const UpdateComponentRequestBody: core.serialization.Schema<serializers.UpdateComponentRequestBody.Raw, Schematic.UpdateComponentRequestBody>;
10
10
  export declare namespace UpdateComponentRequestBody {
11
11
  interface Raw {
12
- ast?: number[] | null;
12
+ ast?: Record<string, number> | null;
13
13
  entity_type?: UpdateComponentRequestBodyEntityType.Raw | null;
14
14
  name?: string | null;
15
15
  state?: UpdateComponentRequestBodyState.Raw | null;
@@ -31,7 +31,7 @@ const core = __importStar(require("../../../../../core"));
31
31
  const UpdateComponentRequestBodyEntityType_1 = require("../../types/UpdateComponentRequestBodyEntityType");
32
32
  const UpdateComponentRequestBodyState_1 = require("../../types/UpdateComponentRequestBodyState");
33
33
  exports.UpdateComponentRequestBody = core.serialization.object({
34
- ast: core.serialization.list(core.serialization.number()).optional(),
34
+ ast: core.serialization.record(core.serialization.string(), core.serialization.number()).optional(),
35
35
  entityType: core.serialization.property("entity_type", UpdateComponentRequestBodyEntityType_1.UpdateComponentRequestBodyEntityType.optional()),
36
36
  name: core.serialization.string().optional(),
37
37
  state: UpdateComponentRequestBodyState_1.UpdateComponentRequestBodyState.optional(),
@@ -4,6 +4,7 @@
4
4
  import * as serializers from "../../../index";
5
5
  import * as Schematic from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
+ import { CountPlansResponseParamsPlanType } from "./CountPlansResponseParamsPlanType";
7
8
  export declare const CountPlansParams: core.serialization.ObjectSchema<serializers.CountPlansParams.Raw, Schematic.CountPlansParams>;
8
9
  export declare namespace CountPlansParams {
9
10
  interface Raw {
@@ -11,6 +12,7 @@ export declare namespace CountPlansParams {
11
12
  ids?: string[] | null;
12
13
  limit?: number | null;
13
14
  offset?: number | null;
15
+ plan_type?: CountPlansResponseParamsPlanType.Raw | null;
14
16
  q?: string | null;
15
17
  without_entitlement_for?: string | null;
16
18
  }
@@ -28,11 +28,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.CountPlansParams = void 0;
30
30
  const core = __importStar(require("../../../../core"));
31
+ const CountPlansResponseParamsPlanType_1 = require("./CountPlansResponseParamsPlanType");
31
32
  exports.CountPlansParams = core.serialization.object({
32
33
  companyId: core.serialization.property("company_id", core.serialization.string().optional()),
33
34
  ids: core.serialization.list(core.serialization.string()).optional(),
34
35
  limit: core.serialization.number().optional(),
35
36
  offset: core.serialization.number().optional(),
37
+ planType: core.serialization.property("plan_type", CountPlansResponseParamsPlanType_1.CountPlansResponseParamsPlanType.optional()),
36
38
  q: core.serialization.string().optional(),
37
39
  withoutEntitlementFor: core.serialization.property("without_entitlement_for", core.serialization.string().optional()),
38
40
  });
@@ -0,0 +1,10 @@
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 CountPlansRequestPlanType: core.serialization.Schema<serializers.CountPlansRequestPlanType.Raw, Schematic.CountPlansRequestPlanType>;
8
+ export declare namespace CountPlansRequestPlanType {
9
+ type Raw = "plan" | "add_on";
10
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.CountPlansRequestPlanType = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ exports.CountPlansRequestPlanType = core.serialization.enum_(["plan", "add_on"]);
@@ -0,0 +1,10 @@
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 CountPlansResponseParamsPlanType: core.serialization.Schema<serializers.CountPlansResponseParamsPlanType.Raw, Schematic.CountPlansResponseParamsPlanType>;
8
+ export declare namespace CountPlansResponseParamsPlanType {
9
+ type Raw = "plan" | "add_on";
10
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.CountPlansResponseParamsPlanType = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ exports.CountPlansResponseParamsPlanType = core.serialization.enum_(["plan", "add_on"]);
@@ -4,6 +4,7 @@
4
4
  import * as serializers from "../../../index";
5
5
  import * as Schematic from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
+ import { ListPlansResponseParamsPlanType } from "./ListPlansResponseParamsPlanType";
7
8
  export declare const ListPlansParams: core.serialization.ObjectSchema<serializers.ListPlansParams.Raw, Schematic.ListPlansParams>;
8
9
  export declare namespace ListPlansParams {
9
10
  interface Raw {
@@ -11,6 +12,7 @@ export declare namespace ListPlansParams {
11
12
  ids?: string[] | null;
12
13
  limit?: number | null;
13
14
  offset?: number | null;
15
+ plan_type?: ListPlansResponseParamsPlanType.Raw | null;
14
16
  q?: string | null;
15
17
  without_entitlement_for?: string | null;
16
18
  }
@@ -28,11 +28,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.ListPlansParams = void 0;
30
30
  const core = __importStar(require("../../../../core"));
31
+ const ListPlansResponseParamsPlanType_1 = require("./ListPlansResponseParamsPlanType");
31
32
  exports.ListPlansParams = core.serialization.object({
32
33
  companyId: core.serialization.property("company_id", core.serialization.string().optional()),
33
34
  ids: core.serialization.list(core.serialization.string()).optional(),
34
35
  limit: core.serialization.number().optional(),
35
36
  offset: core.serialization.number().optional(),
37
+ planType: core.serialization.property("plan_type", ListPlansResponseParamsPlanType_1.ListPlansResponseParamsPlanType.optional()),
36
38
  q: core.serialization.string().optional(),
37
39
  withoutEntitlementFor: core.serialization.property("without_entitlement_for", core.serialization.string().optional()),
38
40
  });
@@ -0,0 +1,10 @@
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 ListPlansRequestPlanType: core.serialization.Schema<serializers.ListPlansRequestPlanType.Raw, Schematic.ListPlansRequestPlanType>;
8
+ export declare namespace ListPlansRequestPlanType {
9
+ type Raw = "plan" | "add_on";
10
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.ListPlansRequestPlanType = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ exports.ListPlansRequestPlanType = core.serialization.enum_(["plan", "add_on"]);
@@ -0,0 +1,10 @@
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 ListPlansResponseParamsPlanType: core.serialization.Schema<serializers.ListPlansResponseParamsPlanType.Raw, Schematic.ListPlansResponseParamsPlanType>;
8
+ export declare namespace ListPlansResponseParamsPlanType {
9
+ type Raw = "plan" | "add_on";
10
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.ListPlansResponseParamsPlanType = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ exports.ListPlansResponseParamsPlanType = core.serialization.enum_(["plan", "add_on"]);
@@ -1,6 +1,8 @@
1
1
  export * from "./GetAudienceResponse";
2
2
  export * from "./UpdateAudienceResponse";
3
3
  export * from "./DeleteAudienceResponse";
4
+ export * from "./ListPlansRequestPlanType";
5
+ export * from "./ListPlansResponseParamsPlanType";
4
6
  export * from "./ListPlansParams";
5
7
  export * from "./ListPlansResponse";
6
8
  export * from "./CreatePlanRequestBodyPlanType";
@@ -9,5 +11,7 @@ export * from "./GetPlanResponse";
9
11
  export * from "./UpdatePlanResponse";
10
12
  export * from "./DeletePlanResponse";
11
13
  export * from "./UpsertBillingProductPlanResponse";
14
+ export * from "./CountPlansRequestPlanType";
15
+ export * from "./CountPlansResponseParamsPlanType";
12
16
  export * from "./CountPlansParams";
13
17
  export * from "./CountPlansResponse";
@@ -17,6 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./GetAudienceResponse"), exports);
18
18
  __exportStar(require("./UpdateAudienceResponse"), exports);
19
19
  __exportStar(require("./DeleteAudienceResponse"), exports);
20
+ __exportStar(require("./ListPlansRequestPlanType"), exports);
21
+ __exportStar(require("./ListPlansResponseParamsPlanType"), exports);
20
22
  __exportStar(require("./ListPlansParams"), exports);
21
23
  __exportStar(require("./ListPlansResponse"), exports);
22
24
  __exportStar(require("./CreatePlanRequestBodyPlanType"), exports);
@@ -25,5 +27,7 @@ __exportStar(require("./GetPlanResponse"), exports);
25
27
  __exportStar(require("./UpdatePlanResponse"), exports);
26
28
  __exportStar(require("./DeletePlanResponse"), exports);
27
29
  __exportStar(require("./UpsertBillingProductPlanResponse"), exports);
30
+ __exportStar(require("./CountPlansRequestPlanType"), exports);
31
+ __exportStar(require("./CountPlansResponseParamsPlanType"), exports);
28
32
  __exportStar(require("./CountPlansParams"), exports);
29
33
  __exportStar(require("./CountPlansResponse"), exports);
@@ -7,7 +7,7 @@ import * as core from "../../core";
7
7
  export declare const ComponentResponseData: core.serialization.ObjectSchema<serializers.ComponentResponseData.Raw, Schematic.ComponentResponseData>;
8
8
  export declare namespace ComponentResponseData {
9
9
  interface Raw {
10
- ast: number[];
10
+ ast?: Record<string, number> | null;
11
11
  created_at: string;
12
12
  id: string;
13
13
  name: string;
@@ -29,7 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.ComponentResponseData = void 0;
30
30
  const core = __importStar(require("../../core"));
31
31
  exports.ComponentResponseData = core.serialization.object({
32
- ast: core.serialization.list(core.serialization.number()),
32
+ ast: core.serialization.record(core.serialization.string(), core.serialization.number()).optional(),
33
33
  createdAt: core.serialization.property("created_at", core.serialization.date()),
34
34
  id: core.serialization.string(),
35
35
  name: core.serialization.string(),
package/wrapper.d.ts CHANGED
@@ -3,6 +3,7 @@ import { SchematicClient as BaseClient } from "./Client";
3
3
  import { CacheProvider } from "./cache";
4
4
  import { Logger } from "./logger";
5
5
  export interface SchematicOptions {
6
+ apiKey?: string;
6
7
  basePath?: string;
7
8
  cacheProviders?: {
8
9
  flagChecks?: CacheProvider<boolean>[];
@@ -22,7 +23,7 @@ export declare class SchematicClient extends BaseClient {
22
23
  private flagDefaults;
23
24
  private logger;
24
25
  private offline;
25
- constructor(apiKey: string, opts?: SchematicOptions);
26
+ constructor(opts?: SchematicOptions);
26
27
  checkFlag(evalCtx: api.CheckFlagRequestBody, key: string): Promise<boolean>;
27
28
  close(): Promise<void>;
28
29
  identify(body: api.EventBodyIdentify): Promise<void>;
package/wrapper.js CHANGED
@@ -15,14 +15,11 @@ const cache_1 = require("./cache");
15
15
  const logger_1 = require("./logger");
16
16
  const events_1 = require("./events");
17
17
  const custom_1 = require("./core/fetcher/custom");
18
- const version_1 = require("./version");
19
18
  class SchematicClient extends Client_1.SchematicClient {
20
- constructor(apiKey, opts) {
19
+ constructor(opts) {
21
20
  var _a, _b;
22
- const { offline = false } = opts !== null && opts !== void 0 ? opts : {};
23
- const headers = {
24
- "User-Agent": `schematic-typescript-node@${version_1.version}`,
25
- };
21
+ const { apiKey = "", offline = false } = opts !== null && opts !== void 0 ? opts : {};
22
+ const headers = {};
26
23
  if (opts === null || opts === void 0 ? void 0 : opts.environmentId) {
27
24
  headers["X-Schematic-Environment-Id"] = opts.environmentId;
28
25
  }
package/.husky/pre-commit DELETED
@@ -1 +0,0 @@
1
- yarn ts-version
package/dist/version.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare const version = "1.1.0";
package/dist/version.js DELETED
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.version = void 0;
4
- exports.version = "1.1.0";
@@ -1,6 +0,0 @@
1
- const fs = require("fs");
2
- const packageJson = require("./package.json");
3
-
4
- const versionString = `export const version = "${packageJson.version}";\n`;
5
-
6
- fs.writeFileSync("./src/version.ts", versionString);
package/version.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare const version = "1.1.0";
package/version.js DELETED
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.version = void 0;
4
- exports.version = "1.1.0";