@schematichq/schematic-typescript-node 1.0.20 → 1.0.21

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.
@@ -14962,6 +14962,9 @@ __export(src_exports, {
14962
14962
  EnvironmentResponseDataFromJSON: () => EnvironmentResponseDataFromJSON,
14963
14963
  EnvironmentResponseDataFromJSONTyped: () => EnvironmentResponseDataFromJSONTyped,
14964
14964
  EnvironmentResponseDataToJSON: () => EnvironmentResponseDataToJSON,
14965
+ EventBodyFlagCheckFromJSON: () => EventBodyFlagCheckFromJSON,
14966
+ EventBodyFlagCheckFromJSONTyped: () => EventBodyFlagCheckFromJSONTyped,
14967
+ EventBodyFlagCheckToJSON: () => EventBodyFlagCheckToJSON,
14965
14968
  EventBodyFromJSON: () => EventBodyFromJSON,
14966
14969
  EventBodyFromJSONTyped: () => EventBodyFromJSONTyped,
14967
14970
  EventBodyIdentifyCompanyFromJSON: () => EventBodyIdentifyCompanyFromJSON,
@@ -15678,6 +15681,7 @@ __export(src_exports, {
15678
15681
  instanceOfEntityTraitValue: () => instanceOfEntityTraitValue,
15679
15682
  instanceOfEnvironmentDetailResponseData: () => instanceOfEnvironmentDetailResponseData,
15680
15683
  instanceOfEnvironmentResponseData: () => instanceOfEnvironmentResponseData,
15684
+ instanceOfEventBodyFlagCheck: () => instanceOfEventBodyFlagCheck,
15681
15685
  instanceOfEventBodyIdentify: () => instanceOfEventBodyIdentify,
15682
15686
  instanceOfEventBodyIdentifyCompany: () => instanceOfEventBodyIdentifyCompany,
15683
15687
  instanceOfEventBodyTrack: () => instanceOfEventBodyTrack,
@@ -18485,6 +18489,7 @@ function PreviewObjectFromJSONTyped(json, ignoreDiscriminator) {
18485
18489
  return json;
18486
18490
  }
18487
18491
  return {
18492
+ description: json["description"] == null ? void 0 : json["description"],
18488
18493
  id: json["id"],
18489
18494
  imageUrl: json["image_url"] == null ? void 0 : json["image_url"],
18490
18495
  name: json["name"]
@@ -18495,6 +18500,7 @@ function PreviewObjectToJSON(value) {
18495
18500
  return value;
18496
18501
  }
18497
18502
  return {
18503
+ description: value["description"],
18498
18504
  id: value["id"],
18499
18505
  image_url: value["imageUrl"],
18500
18506
  name: value["name"]
@@ -18929,8 +18935,10 @@ function FeatureResponseDataFromJSONTyped(json, ignoreDiscriminator) {
18929
18935
  description: json["description"],
18930
18936
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
18931
18937
  featureType: json["feature_type"],
18938
+ icon: json["icon"] == null ? void 0 : json["icon"],
18932
18939
  id: json["id"],
18933
18940
  lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
18941
+ maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
18934
18942
  name: json["name"],
18935
18943
  traitId: json["trait_id"] == null ? void 0 : json["trait_id"],
18936
18944
  updatedAt: new Date(json["updated_at"])
@@ -18945,8 +18953,10 @@ function FeatureResponseDataToJSON(value) {
18945
18953
  description: value["description"],
18946
18954
  event_subtype: value["eventSubtype"],
18947
18955
  feature_type: value["featureType"],
18956
+ icon: value["icon"],
18948
18957
  id: value["id"],
18949
18958
  lifecycle_phase: value["lifecyclePhase"],
18959
+ maintainer_id: value["maintainerId"],
18950
18960
  name: value["name"],
18951
18961
  trait_id: value["traitId"],
18952
18962
  updated_at: value["updatedAt"].toISOString()
@@ -19559,7 +19569,9 @@ function FlagDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19559
19569
  flagType: json["flag_type"],
19560
19570
  id: json["id"],
19561
19571
  key: json["key"],
19572
+ lastCheckedAt: json["last_checked_at"] == null ? void 0 : new Date(json["last_checked_at"]),
19562
19573
  latestCheck: json["latest_check"] == null ? void 0 : FlagCheckLogResponseDataFromJSON(json["latest_check"]),
19574
+ maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
19563
19575
  name: json["name"],
19564
19576
  rules: json["rules"].map(RuleDetailResponseDataFromJSON),
19565
19577
  updatedAt: new Date(json["updated_at"])
@@ -19578,7 +19590,9 @@ function FlagDetailResponseDataToJSON(value) {
19578
19590
  flag_type: value["flagType"],
19579
19591
  id: value["id"],
19580
19592
  key: value["key"],
19593
+ last_checked_at: value["lastCheckedAt"] == null ? void 0 : value["lastCheckedAt"].toISOString(),
19581
19594
  latest_check: FlagCheckLogResponseDataToJSON(value["latestCheck"]),
19595
+ maintainer_id: value["maintainerId"],
19582
19596
  name: value["name"],
19583
19597
  rules: value["rules"].map(RuleDetailResponseDataToJSON),
19584
19598
  updated_at: value["updatedAt"].toISOString()
@@ -19619,8 +19633,10 @@ function FeatureDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19619
19633
  eventSummary: json["event_summary"] == null ? void 0 : EventSummaryResponseDataFromJSON(json["event_summary"]),
19620
19634
  featureType: json["feature_type"],
19621
19635
  flags: json["flags"].map(FlagDetailResponseDataFromJSON),
19636
+ icon: json["icon"] == null ? void 0 : json["icon"],
19622
19637
  id: json["id"],
19623
19638
  lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
19639
+ maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
19624
19640
  name: json["name"],
19625
19641
  plans: json["plans"].map(PreviewObjectFromJSON),
19626
19642
  trait: json["trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["trait"]),
@@ -19639,8 +19655,10 @@ function FeatureDetailResponseDataToJSON(value) {
19639
19655
  event_summary: EventSummaryResponseDataToJSON(value["eventSummary"]),
19640
19656
  feature_type: value["featureType"],
19641
19657
  flags: value["flags"].map(FlagDetailResponseDataToJSON),
19658
+ icon: value["icon"],
19642
19659
  id: value["id"],
19643
19660
  lifecycle_phase: value["lifecyclePhase"],
19661
+ maintainer_id: value["maintainerId"],
19644
19662
  name: value["name"],
19645
19663
  plans: value["plans"].map(PreviewObjectToJSON),
19646
19664
  trait: EntityTraitDefinitionResponseDataToJSON(value["trait"]),
@@ -19678,6 +19696,7 @@ function PlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19678
19696
  audienceType: json["audience_type"],
19679
19697
  createdAt: new Date(json["created_at"]),
19680
19698
  description: json["description"],
19699
+ icon: json["icon"] == null ? void 0 : json["icon"],
19681
19700
  id: json["id"],
19682
19701
  name: json["name"],
19683
19702
  planType: json["plan_type"],
@@ -19692,6 +19711,7 @@ function PlanResponseDataToJSON(value) {
19692
19711
  audience_type: value["audienceType"],
19693
19712
  created_at: value["createdAt"].toISOString(),
19694
19713
  description: value["description"],
19714
+ icon: value["icon"],
19695
19715
  id: value["id"],
19696
19716
  name: value["name"],
19697
19717
  plan_type: value["planType"],
@@ -21813,6 +21833,54 @@ function CreateEnvironmentResponseToJSON(value) {
21813
21833
  };
21814
21834
  }
21815
21835
 
21836
+ // src/api/models/EventBodyFlagCheck.ts
21837
+ function instanceOfEventBodyFlagCheck(value) {
21838
+ if (!("flagKey" in value) || value["flagKey"] === void 0)
21839
+ return false;
21840
+ if (!("reason" in value) || value["reason"] === void 0)
21841
+ return false;
21842
+ if (!("value" in value) || value["value"] === void 0)
21843
+ return false;
21844
+ return true;
21845
+ }
21846
+ function EventBodyFlagCheckFromJSON(json) {
21847
+ return EventBodyFlagCheckFromJSONTyped(json, false);
21848
+ }
21849
+ function EventBodyFlagCheckFromJSONTyped(json, ignoreDiscriminator) {
21850
+ if (json == null) {
21851
+ return json;
21852
+ }
21853
+ return {
21854
+ companyId: json["company_id"] == null ? void 0 : json["company_id"],
21855
+ error: json["error"] == null ? void 0 : json["error"],
21856
+ flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
21857
+ flagKey: json["flag_key"],
21858
+ reason: json["reason"],
21859
+ reqCompany: json["req_company"] == null ? void 0 : json["req_company"],
21860
+ reqUser: json["req_user"] == null ? void 0 : json["req_user"],
21861
+ ruleId: json["rule_id"] == null ? void 0 : json["rule_id"],
21862
+ userId: json["user_id"] == null ? void 0 : json["user_id"],
21863
+ value: json["value"]
21864
+ };
21865
+ }
21866
+ function EventBodyFlagCheckToJSON(value) {
21867
+ if (value == null) {
21868
+ return value;
21869
+ }
21870
+ return {
21871
+ company_id: value["companyId"],
21872
+ error: value["error"],
21873
+ flag_id: value["flagId"],
21874
+ flag_key: value["flagKey"],
21875
+ reason: value["reason"],
21876
+ req_company: value["reqCompany"],
21877
+ req_user: value["reqUser"],
21878
+ rule_id: value["ruleId"],
21879
+ user_id: value["userId"],
21880
+ value: value["value"]
21881
+ };
21882
+ }
21883
+
21816
21884
  // src/api/models/EventBodyIdentifyCompany.ts
21817
21885
  function instanceOfEventBodyIdentifyCompany(value) {
21818
21886
  if (!("keys" in value) || value["keys"] === void 0)
@@ -21915,6 +21983,9 @@ function EventBodyFromJSONTyped(json, ignoreDiscriminator) {
21915
21983
  if (json == null) {
21916
21984
  return json;
21917
21985
  }
21986
+ if (instanceOfEventBodyFlagCheck(json)) {
21987
+ return EventBodyFlagCheckFromJSONTyped(json, true);
21988
+ }
21918
21989
  if (instanceOfEventBodyIdentify(json)) {
21919
21990
  return EventBodyIdentifyFromJSONTyped(json, true);
21920
21991
  }
@@ -21927,6 +21998,9 @@ function EventBodyToJSON(value) {
21927
21998
  if (value == null) {
21928
21999
  return value;
21929
22000
  }
22001
+ if (instanceOfEventBodyFlagCheck(value)) {
22002
+ return EventBodyFlagCheckToJSON(value);
22003
+ }
21930
22004
  if (instanceOfEventBodyIdentify(value)) {
21931
22005
  return EventBodyIdentifyToJSON(value);
21932
22006
  }
@@ -21939,7 +22013,8 @@ function EventBodyToJSON(value) {
21939
22013
  // src/api/models/CreateEventRequestBody.ts
21940
22014
  var CreateEventRequestBodyEventTypeEnum = {
21941
22015
  Identify: "identify",
21942
- Track: "track"
22016
+ Track: "track",
22017
+ FlagCheck: "flag_check"
21943
22018
  };
21944
22019
  function instanceOfCreateEventRequestBody(value) {
21945
22020
  if (!("eventType" in value) || value["eventType"] === void 0)
@@ -22150,6 +22225,7 @@ function CreateOrUpdateFlagRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
22150
22225
  flagType: json["flag_type"],
22151
22226
  id: json["id"] == null ? void 0 : json["id"],
22152
22227
  key: json["key"],
22228
+ maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
22153
22229
  name: json["name"]
22154
22230
  };
22155
22231
  }
@@ -22164,6 +22240,7 @@ function CreateOrUpdateFlagRequestBodyToJSON(value) {
22164
22240
  flag_type: value["flagType"],
22165
22241
  id: value["id"],
22166
22242
  key: value["key"],
22243
+ maintainer_id: value["maintainerId"],
22167
22244
  name: value["name"]
22168
22245
  };
22169
22246
  }
@@ -22195,7 +22272,9 @@ function CreateFeatureRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
22195
22272
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
22196
22273
  featureType: json["feature_type"],
22197
22274
  flag: json["flag"] == null ? void 0 : CreateOrUpdateFlagRequestBodyFromJSON(json["flag"]),
22275
+ icon: json["icon"] == null ? void 0 : json["icon"],
22198
22276
  lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
22277
+ maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
22199
22278
  name: json["name"],
22200
22279
  traitId: json["trait_id"] == null ? void 0 : json["trait_id"]
22201
22280
  };
@@ -22209,7 +22288,9 @@ function CreateFeatureRequestBodyToJSON(value) {
22209
22288
  event_subtype: value["eventSubtype"],
22210
22289
  feature_type: value["featureType"],
22211
22290
  flag: CreateOrUpdateFlagRequestBodyToJSON(value["flag"]),
22291
+ icon: value["icon"],
22212
22292
  lifecycle_phase: value["lifecyclePhase"],
22293
+ maintainer_id: value["maintainerId"],
22213
22294
  name: value["name"],
22214
22295
  trait_id: value["traitId"]
22215
22296
  };
@@ -22272,6 +22353,7 @@ function CreateFlagRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
22272
22353
  featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
22273
22354
  flagType: json["flag_type"],
22274
22355
  key: json["key"],
22356
+ maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
22275
22357
  name: json["name"]
22276
22358
  };
22277
22359
  }
@@ -22285,6 +22367,7 @@ function CreateFlagRequestBodyToJSON(value) {
22285
22367
  feature_id: value["featureId"],
22286
22368
  flag_type: value["flagType"],
22287
22369
  key: value["key"],
22370
+ maintainer_id: value["maintainerId"],
22288
22371
  name: value["name"]
22289
22372
  };
22290
22373
  }
@@ -22560,6 +22643,7 @@ function CreatePlanRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
22560
22643
  return {
22561
22644
  audienceType: json["audience_type"] == null ? void 0 : json["audience_type"],
22562
22645
  description: json["description"],
22646
+ icon: json["icon"] == null ? void 0 : json["icon"],
22563
22647
  name: json["name"],
22564
22648
  planType: json["plan_type"]
22565
22649
  };
@@ -22571,6 +22655,7 @@ function CreatePlanRequestBodyToJSON(value) {
22571
22655
  return {
22572
22656
  audience_type: value["audienceType"],
22573
22657
  description: value["description"],
22658
+ icon: value["icon"],
22574
22659
  name: value["name"],
22575
22660
  plan_type: value["planType"]
22576
22661
  };
@@ -22580,6 +22665,8 @@ function CreatePlanRequestBodyToJSON(value) {
22580
22665
  function instanceOfPlanDetailResponseData(value) {
22581
22666
  if (!("audienceType" in value) || value["audienceType"] === void 0)
22582
22667
  return false;
22668
+ if (!("billingProducts" in value) || value["billingProducts"] === void 0)
22669
+ return false;
22583
22670
  if (!("companyCount" in value) || value["companyCount"] === void 0)
22584
22671
  return false;
22585
22672
  if (!("createdAt" in value) || value["createdAt"] === void 0)
@@ -22607,12 +22694,16 @@ function PlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
22607
22694
  }
22608
22695
  return {
22609
22696
  audienceType: json["audience_type"],
22697
+ billingProducts: json["billing_products"].map(
22698
+ BillingProductResponseDataFromJSON
22699
+ ),
22610
22700
  companyCount: json["company_count"],
22611
22701
  createdAt: new Date(json["created_at"]),
22612
22702
  description: json["description"],
22613
22703
  features: json["features"].map(
22614
22704
  FeatureDetailResponseDataFromJSON
22615
22705
  ),
22706
+ icon: json["icon"] == null ? void 0 : json["icon"],
22616
22707
  id: json["id"],
22617
22708
  name: json["name"],
22618
22709
  planType: json["plan_type"],
@@ -22625,12 +22716,16 @@ function PlanDetailResponseDataToJSON(value) {
22625
22716
  }
22626
22717
  return {
22627
22718
  audience_type: value["audienceType"],
22719
+ billing_products: value["billingProducts"].map(
22720
+ BillingProductResponseDataToJSON
22721
+ ),
22628
22722
  company_count: value["companyCount"],
22629
22723
  created_at: value["createdAt"].toISOString(),
22630
22724
  description: value["description"],
22631
22725
  features: value["features"].map(
22632
22726
  FeatureDetailResponseDataToJSON
22633
22727
  ),
22728
+ icon: value["icon"],
22634
22729
  id: value["id"],
22635
22730
  name: value["name"],
22636
22731
  plan_type: value["planType"],
@@ -24115,6 +24210,7 @@ function FlagResponseDataFromJSONTyped(json, ignoreDiscriminator) {
24115
24210
  flagType: json["flag_type"],
24116
24211
  id: json["id"],
24117
24212
  key: json["key"],
24213
+ maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
24118
24214
  name: json["name"],
24119
24215
  updatedAt: new Date(json["updated_at"])
24120
24216
  };
@@ -24131,6 +24227,7 @@ function FlagResponseDataToJSON(value) {
24131
24227
  flag_type: value["flagType"],
24132
24228
  id: value["id"],
24133
24229
  key: value["key"],
24230
+ maintainer_id: value["maintainerId"],
24134
24231
  name: value["name"],
24135
24232
  updated_at: value["updatedAt"].toISOString()
24136
24233
  };
@@ -26468,6 +26565,8 @@ function ListEventsParamsFromJSONTyped(json, ignoreDiscriminator) {
26468
26565
  return {
26469
26566
  companyId: json["company_id"] == null ? void 0 : json["company_id"],
26470
26567
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
26568
+ eventTypes: json["event_types"] == null ? void 0 : json["event_types"],
26569
+ flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
26471
26570
  limit: json["limit"] == null ? void 0 : json["limit"],
26472
26571
  offset: json["offset"] == null ? void 0 : json["offset"],
26473
26572
  userId: json["user_id"] == null ? void 0 : json["user_id"]
@@ -26480,6 +26579,8 @@ function ListEventsParamsToJSON(value) {
26480
26579
  return {
26481
26580
  company_id: value["companyId"],
26482
26581
  event_subtype: value["eventSubtype"],
26582
+ event_types: value["eventTypes"],
26583
+ flag_id: value["flagId"],
26483
26584
  limit: value["limit"],
26484
26585
  offset: value["offset"],
26485
26586
  user_id: value["userId"]
@@ -28207,7 +28308,9 @@ function UpdateFeatureRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
28207
28308
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
28208
28309
  featureType: json["feature_type"] == null ? void 0 : json["feature_type"],
28209
28310
  flag: json["flag"] == null ? void 0 : CreateOrUpdateFlagRequestBodyFromJSON(json["flag"]),
28311
+ icon: json["icon"] == null ? void 0 : json["icon"],
28210
28312
  lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
28313
+ maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
28211
28314
  name: json["name"] == null ? void 0 : json["name"],
28212
28315
  traitId: json["trait_id"] == null ? void 0 : json["trait_id"]
28213
28316
  };
@@ -28221,7 +28324,9 @@ function UpdateFeatureRequestBodyToJSON(value) {
28221
28324
  event_subtype: value["eventSubtype"],
28222
28325
  feature_type: value["featureType"],
28223
28326
  flag: CreateOrUpdateFlagRequestBodyToJSON(value["flag"]),
28327
+ icon: value["icon"],
28224
28328
  lifecycle_phase: value["lifecyclePhase"],
28329
+ maintainer_id: value["maintainerId"],
28225
28330
  name: value["name"],
28226
28331
  trait_id: value["traitId"]
28227
28332
  };
@@ -28448,6 +28553,7 @@ function UpdatePlanRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
28448
28553
  return {
28449
28554
  audienceType: json["audience_type"],
28450
28555
  description: json["description"] == null ? void 0 : json["description"],
28556
+ icon: json["icon"] == null ? void 0 : json["icon"],
28451
28557
  name: json["name"],
28452
28558
  planType: json["plan_type"] == null ? void 0 : json["plan_type"]
28453
28559
  };
@@ -28459,6 +28565,7 @@ function UpdatePlanRequestBodyToJSON(value) {
28459
28565
  return {
28460
28566
  audience_type: value["audienceType"],
28461
28567
  description: value["description"],
28568
+ icon: value["icon"],
28462
28569
  name: value["name"],
28463
28570
  plan_type: value["planType"]
28464
28571
  };
@@ -33611,12 +33718,18 @@ var EventsApi = class extends BaseAPI {
33611
33718
  if (requestParameters["companyId"] != null) {
33612
33719
  queryParameters["company_id"] = requestParameters["companyId"];
33613
33720
  }
33614
- if (requestParameters["userId"] != null) {
33615
- queryParameters["user_id"] = requestParameters["userId"];
33616
- }
33617
33721
  if (requestParameters["eventSubtype"] != null) {
33618
33722
  queryParameters["event_subtype"] = requestParameters["eventSubtype"];
33619
33723
  }
33724
+ if (requestParameters["eventTypes"] != null) {
33725
+ queryParameters["event_types"] = requestParameters["eventTypes"];
33726
+ }
33727
+ if (requestParameters["flagId"] != null) {
33728
+ queryParameters["flag_id"] = requestParameters["flagId"];
33729
+ }
33730
+ if (requestParameters["userId"] != null) {
33731
+ queryParameters["user_id"] = requestParameters["userId"];
33732
+ }
33620
33733
  if (requestParameters["limit"] != null) {
33621
33734
  queryParameters["limit"] = requestParameters["limit"];
33622
33735
  }
@@ -35885,7 +35998,7 @@ var Schematic = class {
35885
35998
  constructor(apiKey, opts) {
35886
35999
  const { offline = false } = opts ?? {};
35887
36000
  const { basePath, flagDefaults = {} } = opts ?? {};
35888
- const version = "1.0.20";
36001
+ const version = "1.0.21";
35889
36002
  const headers = {
35890
36003
  "User-Agent": `schematic-typescript-node@v${version}`
35891
36004
  };
@@ -36450,6 +36563,9 @@ function init(apiKey, opts) {
36450
36563
  EnvironmentResponseDataFromJSON,
36451
36564
  EnvironmentResponseDataFromJSONTyped,
36452
36565
  EnvironmentResponseDataToJSON,
36566
+ EventBodyFlagCheckFromJSON,
36567
+ EventBodyFlagCheckFromJSONTyped,
36568
+ EventBodyFlagCheckToJSON,
36453
36569
  EventBodyFromJSON,
36454
36570
  EventBodyFromJSONTyped,
36455
36571
  EventBodyIdentifyCompanyFromJSON,
@@ -37166,6 +37282,7 @@ function init(apiKey, opts) {
37166
37282
  instanceOfEntityTraitValue,
37167
37283
  instanceOfEnvironmentDetailResponseData,
37168
37284
  instanceOfEnvironmentResponseData,
37285
+ instanceOfEventBodyFlagCheck,
37169
37286
  instanceOfEventBodyIdentify,
37170
37287
  instanceOfEventBodyIdentifyCompany,
37171
37288
  instanceOfEventBodyTrack,
@@ -1028,6 +1028,11 @@ declare namespace api {
1028
1028
  EventBodyFromJSONTyped,
1029
1029
  EventBodyToJSON,
1030
1030
  EventBody,
1031
+ instanceOfEventBodyFlagCheck,
1032
+ EventBodyFlagCheckFromJSON,
1033
+ EventBodyFlagCheckFromJSONTyped,
1034
+ EventBodyFlagCheckToJSON,
1035
+ EventBodyFlagCheck,
1031
1036
  instanceOfEventBodyIdentify,
1032
1037
  EventBodyIdentifyFromJSON,
1033
1038
  EventBodyIdentifyFromJSONTyped,
@@ -7034,6 +7039,7 @@ export declare interface CreateEventRequestBody {
7034
7039
  export declare const CreateEventRequestBodyEventTypeEnum: {
7035
7040
  readonly Identify: "identify";
7036
7041
  readonly Track: "track";
7042
+ readonly FlagCheck: "flag_check";
7037
7043
  };
7038
7044
 
7039
7045
  export declare type CreateEventRequestBodyEventTypeEnum = (typeof CreateEventRequestBodyEventTypeEnum)[keyof typeof CreateEventRequestBodyEventTypeEnum];
@@ -7104,12 +7110,24 @@ export declare interface CreateFeatureRequestBody {
7104
7110
  * @memberof CreateFeatureRequestBody
7105
7111
  */
7106
7112
  flag?: CreateOrUpdateFlagRequestBody;
7113
+ /**
7114
+ *
7115
+ * @type {string}
7116
+ * @memberof CreateFeatureRequestBody
7117
+ */
7118
+ icon?: string;
7107
7119
  /**
7108
7120
  *
7109
7121
  * @type {string}
7110
7122
  * @memberof CreateFeatureRequestBody
7111
7123
  */
7112
7124
  lifecyclePhase?: string;
7125
+ /**
7126
+ *
7127
+ * @type {string}
7128
+ * @memberof CreateFeatureRequestBody
7129
+ */
7130
+ maintainerId?: string;
7113
7131
  /**
7114
7132
  *
7115
7133
  * @type {string}
@@ -7218,6 +7236,12 @@ export declare interface CreateFlagRequestBody {
7218
7236
  * @memberof CreateFlagRequestBody
7219
7237
  */
7220
7238
  key: string;
7239
+ /**
7240
+ *
7241
+ * @type {string}
7242
+ * @memberof CreateFlagRequestBody
7243
+ */
7244
+ maintainerId?: string;
7221
7245
  /**
7222
7246
  *
7223
7247
  * @type {string}
@@ -7474,6 +7498,12 @@ export declare interface CreateOrUpdateFlagRequestBody {
7474
7498
  * @memberof CreateOrUpdateFlagRequestBody
7475
7499
  */
7476
7500
  key: string;
7501
+ /**
7502
+ *
7503
+ * @type {string}
7504
+ * @memberof CreateOrUpdateFlagRequestBody
7505
+ */
7506
+ maintainerId?: string;
7477
7507
  /**
7478
7508
  *
7479
7509
  * @type {string}
@@ -7711,6 +7741,12 @@ export declare interface CreatePlanRequestBody {
7711
7741
  * @memberof CreatePlanRequestBody
7712
7742
  */
7713
7743
  description: string;
7744
+ /**
7745
+ *
7746
+ * @type {string}
7747
+ * @memberof CreatePlanRequestBody
7748
+ */
7749
+ icon?: string;
7714
7750
  /**
7715
7751
  *
7716
7752
  * @type {string}
@@ -9557,7 +9593,96 @@ export declare interface ErrorContext {
9557
9593
  *
9558
9594
  * @export
9559
9595
  */
9560
- export declare type EventBody = EventBodyIdentify | EventBodyTrack;
9596
+ export declare type EventBody = EventBodyFlagCheck | EventBodyIdentify | EventBodyTrack;
9597
+
9598
+ /**
9599
+ * Schematic API
9600
+ * Schematic API
9601
+ *
9602
+ * The version of the OpenAPI document: 0.1
9603
+ *
9604
+ *
9605
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9606
+ * https://openapi-generator.tech
9607
+ * Do not edit the class manually.
9608
+ */
9609
+ /**
9610
+ *
9611
+ * @export
9612
+ * @interface EventBodyFlagCheck
9613
+ */
9614
+ export declare interface EventBodyFlagCheck {
9615
+ /**
9616
+ * Schematic company ID (starting with 'comp_') of the company evaluated, if any
9617
+ * @type {string}
9618
+ * @memberof EventBodyFlagCheck
9619
+ */
9620
+ companyId?: string;
9621
+ /**
9622
+ * Report an error that occurred during the flag check
9623
+ * @type {string}
9624
+ * @memberof EventBodyFlagCheck
9625
+ */
9626
+ error?: string;
9627
+ /**
9628
+ * Schematic flag ID (starting with 'flag_') for the flag matching the key, if any
9629
+ * @type {string}
9630
+ * @memberof EventBodyFlagCheck
9631
+ */
9632
+ flagId?: string;
9633
+ /**
9634
+ * The key of the flag being checked
9635
+ * @type {string}
9636
+ * @memberof EventBodyFlagCheck
9637
+ */
9638
+ flagKey: string;
9639
+ /**
9640
+ * The reason why the value was returned
9641
+ * @type {string}
9642
+ * @memberof EventBodyFlagCheck
9643
+ */
9644
+ reason: string;
9645
+ /**
9646
+ * Key-value pairs used to to identify company for which the flag was checked
9647
+ * @type {{ [key: string]: string; }}
9648
+ * @memberof EventBodyFlagCheck
9649
+ */
9650
+ reqCompany?: {
9651
+ [key: string]: string;
9652
+ };
9653
+ /**
9654
+ * Key-value pairs used to to identify user for which the flag was checked
9655
+ * @type {{ [key: string]: string; }}
9656
+ * @memberof EventBodyFlagCheck
9657
+ */
9658
+ reqUser?: {
9659
+ [key: string]: string;
9660
+ };
9661
+ /**
9662
+ * Schematic rule ID (starting with 'rule_') of the rule that matched for the flag, if any
9663
+ * @type {string}
9664
+ * @memberof EventBodyFlagCheck
9665
+ */
9666
+ ruleId?: string;
9667
+ /**
9668
+ * Schematic user ID (starting with 'user_') of the user evaluated, if any
9669
+ * @type {string}
9670
+ * @memberof EventBodyFlagCheck
9671
+ */
9672
+ userId?: string;
9673
+ /**
9674
+ * The value of the flag for the given company and/or user
9675
+ * @type {boolean}
9676
+ * @memberof EventBodyFlagCheck
9677
+ */
9678
+ value: boolean;
9679
+ }
9680
+
9681
+ export declare function EventBodyFlagCheckFromJSON(json: any): EventBodyFlagCheck;
9682
+
9683
+ export declare function EventBodyFlagCheckFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventBodyFlagCheck;
9684
+
9685
+ export declare function EventBodyFlagCheckToJSON(value?: EventBodyFlagCheck | null): any;
9561
9686
 
9562
9687
  export declare function EventBodyFromJSON(json: any): EventBody;
9563
9688
 
@@ -10327,6 +10452,12 @@ export declare interface FeatureDetailResponseData {
10327
10452
  * @memberof FeatureDetailResponseData
10328
10453
  */
10329
10454
  flags: Array<FlagDetailResponseData>;
10455
+ /**
10456
+ *
10457
+ * @type {string}
10458
+ * @memberof FeatureDetailResponseData
10459
+ */
10460
+ icon?: string;
10330
10461
  /**
10331
10462
  *
10332
10463
  * @type {string}
@@ -10339,6 +10470,12 @@ export declare interface FeatureDetailResponseData {
10339
10470
  * @memberof FeatureDetailResponseData
10340
10471
  */
10341
10472
  lifecyclePhase?: string;
10473
+ /**
10474
+ *
10475
+ * @type {string}
10476
+ * @memberof FeatureDetailResponseData
10477
+ */
10478
+ maintainerId?: string;
10342
10479
  /**
10343
10480
  *
10344
10481
  * @type {string}
@@ -10418,6 +10555,12 @@ export declare interface FeatureResponseData {
10418
10555
  * @memberof FeatureResponseData
10419
10556
  */
10420
10557
  featureType: string;
10558
+ /**
10559
+ *
10560
+ * @type {string}
10561
+ * @memberof FeatureResponseData
10562
+ */
10563
+ icon?: string;
10421
10564
  /**
10422
10565
  *
10423
10566
  * @type {string}
@@ -10430,6 +10573,12 @@ export declare interface FeatureResponseData {
10430
10573
  * @memberof FeatureResponseData
10431
10574
  */
10432
10575
  lifecyclePhase?: string;
10576
+ /**
10577
+ *
10578
+ * @type {string}
10579
+ * @memberof FeatureResponseData
10580
+ */
10581
+ maintainerId?: string;
10433
10582
  /**
10434
10583
  *
10435
10584
  * @type {string}
@@ -11070,12 +11219,24 @@ export declare interface FlagDetailResponseData {
11070
11219
  * @memberof FlagDetailResponseData
11071
11220
  */
11072
11221
  key: string;
11222
+ /**
11223
+ *
11224
+ * @type {Date}
11225
+ * @memberof FlagDetailResponseData
11226
+ */
11227
+ lastCheckedAt?: Date;
11073
11228
  /**
11074
11229
  *
11075
11230
  * @type {FlagCheckLogResponseData}
11076
11231
  * @memberof FlagDetailResponseData
11077
11232
  */
11078
11233
  latestCheck?: FlagCheckLogResponseData;
11234
+ /**
11235
+ *
11236
+ * @type {string}
11237
+ * @memberof FlagDetailResponseData
11238
+ */
11239
+ maintainerId?: string;
11079
11240
  /**
11080
11241
  *
11081
11242
  * @type {string}
@@ -11161,6 +11322,12 @@ export declare interface FlagResponseData {
11161
11322
  * @memberof FlagResponseData
11162
11323
  */
11163
11324
  key: string;
11325
+ /**
11326
+ *
11327
+ * @type {string}
11328
+ * @memberof FlagResponseData
11329
+ */
11330
+ maintainerId?: string;
11164
11331
  /**
11165
11332
  *
11166
11333
  * @type {string}
@@ -13051,6 +13218,11 @@ export declare function instanceOfEnvironmentDetailResponseData(value: object):
13051
13218
  */
13052
13219
  export declare function instanceOfEnvironmentResponseData(value: object): value is EnvironmentResponseData;
13053
13220
 
13221
+ /**
13222
+ * Check if a given object implements the EventBodyFlagCheck interface.
13223
+ */
13224
+ export declare function instanceOfEventBodyFlagCheck(value: object): value is EventBodyFlagCheck;
13225
+
13054
13226
  /**
13055
13227
  * Check if a given object implements the EventBodyIdentify interface.
13056
13228
  */
@@ -15339,6 +15511,18 @@ export declare interface ListEventsParams {
15339
15511
  * @memberof ListEventsParams
15340
15512
  */
15341
15513
  eventSubtype?: string;
15514
+ /**
15515
+ *
15516
+ * @type {Array<string>}
15517
+ * @memberof ListEventsParams
15518
+ */
15519
+ eventTypes?: Array<string>;
15520
+ /**
15521
+ *
15522
+ * @type {string}
15523
+ * @memberof ListEventsParams
15524
+ */
15525
+ flagId?: string;
15342
15526
  /**
15343
15527
  * Page limit (default 100)
15344
15528
  * @type {number}
@@ -15367,8 +15551,10 @@ export declare function ListEventsParamsToJSON(value?: ListEventsParams | null):
15367
15551
 
15368
15552
  export declare interface ListEventsRequest {
15369
15553
  companyId?: string;
15370
- userId?: string;
15371
15554
  eventSubtype?: string;
15555
+ eventTypes?: Array<string>;
15556
+ flagId?: string;
15557
+ userId?: string;
15372
15558
  limit?: number;
15373
15559
  offset?: number;
15374
15560
  }
@@ -17056,6 +17242,12 @@ export declare interface PlanDetailResponseData {
17056
17242
  * @memberof PlanDetailResponseData
17057
17243
  */
17058
17244
  audienceType: string;
17245
+ /**
17246
+ *
17247
+ * @type {Array<BillingProductResponseData>}
17248
+ * @memberof PlanDetailResponseData
17249
+ */
17250
+ billingProducts: Array<BillingProductResponseData>;
17059
17251
  /**
17060
17252
  *
17061
17253
  * @type {number}
@@ -17080,6 +17272,12 @@ export declare interface PlanDetailResponseData {
17080
17272
  * @memberof PlanDetailResponseData
17081
17273
  */
17082
17274
  features: Array<FeatureDetailResponseData>;
17275
+ /**
17276
+ *
17277
+ * @type {string}
17278
+ * @memberof PlanDetailResponseData
17279
+ */
17280
+ icon?: string;
17083
17281
  /**
17084
17282
  *
17085
17283
  * @type {string}
@@ -17251,6 +17449,12 @@ export declare interface PlanResponseData {
17251
17449
  * @memberof PlanResponseData
17252
17450
  */
17253
17451
  description: string;
17452
+ /**
17453
+ *
17454
+ * @type {string}
17455
+ * @memberof PlanResponseData
17456
+ */
17457
+ icon?: string;
17254
17458
  /**
17255
17459
  *
17256
17460
  * @type {string}
@@ -17386,6 +17590,12 @@ export declare class PlansApi extends runtime.BaseAPI {
17386
17590
  * @interface PreviewObject
17387
17591
  */
17388
17592
  export declare interface PreviewObject {
17593
+ /**
17594
+ *
17595
+ * @type {string}
17596
+ * @memberof PreviewObject
17597
+ */
17598
+ description?: string;
17389
17599
  /**
17390
17600
  *
17391
17601
  * @type {string}
@@ -18894,12 +19104,24 @@ export declare interface UpdateFeatureRequestBody {
18894
19104
  * @memberof UpdateFeatureRequestBody
18895
19105
  */
18896
19106
  flag?: CreateOrUpdateFlagRequestBody;
19107
+ /**
19108
+ *
19109
+ * @type {string}
19110
+ * @memberof UpdateFeatureRequestBody
19111
+ */
19112
+ icon?: string;
18897
19113
  /**
18898
19114
  *
18899
19115
  * @type {string}
18900
19116
  * @memberof UpdateFeatureRequestBody
18901
19117
  */
18902
19118
  lifecyclePhase?: string;
19119
+ /**
19120
+ *
19121
+ * @type {string}
19122
+ * @memberof UpdateFeatureRequestBody
19123
+ */
19124
+ maintainerId?: string;
18903
19125
  /**
18904
19126
  *
18905
19127
  * @type {string}
@@ -19182,6 +19404,12 @@ export declare interface UpdatePlanRequestBody {
19182
19404
  * @memberof UpdatePlanRequestBody
19183
19405
  */
19184
19406
  description?: string;
19407
+ /**
19408
+ *
19409
+ * @type {string}
19410
+ * @memberof UpdatePlanRequestBody
19411
+ */
19412
+ icon?: string;
19185
19413
  /**
19186
19414
  *
19187
19415
  * @type {string}
@@ -17141,6 +17141,7 @@ function PreviewObjectFromJSONTyped(json, ignoreDiscriminator) {
17141
17141
  return json;
17142
17142
  }
17143
17143
  return {
17144
+ description: json["description"] == null ? void 0 : json["description"],
17144
17145
  id: json["id"],
17145
17146
  imageUrl: json["image_url"] == null ? void 0 : json["image_url"],
17146
17147
  name: json["name"]
@@ -17151,6 +17152,7 @@ function PreviewObjectToJSON(value) {
17151
17152
  return value;
17152
17153
  }
17153
17154
  return {
17155
+ description: value["description"],
17154
17156
  id: value["id"],
17155
17157
  image_url: value["imageUrl"],
17156
17158
  name: value["name"]
@@ -17585,8 +17587,10 @@ function FeatureResponseDataFromJSONTyped(json, ignoreDiscriminator) {
17585
17587
  description: json["description"],
17586
17588
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
17587
17589
  featureType: json["feature_type"],
17590
+ icon: json["icon"] == null ? void 0 : json["icon"],
17588
17591
  id: json["id"],
17589
17592
  lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
17593
+ maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
17590
17594
  name: json["name"],
17591
17595
  traitId: json["trait_id"] == null ? void 0 : json["trait_id"],
17592
17596
  updatedAt: new Date(json["updated_at"])
@@ -17601,8 +17605,10 @@ function FeatureResponseDataToJSON(value) {
17601
17605
  description: value["description"],
17602
17606
  event_subtype: value["eventSubtype"],
17603
17607
  feature_type: value["featureType"],
17608
+ icon: value["icon"],
17604
17609
  id: value["id"],
17605
17610
  lifecycle_phase: value["lifecyclePhase"],
17611
+ maintainer_id: value["maintainerId"],
17606
17612
  name: value["name"],
17607
17613
  trait_id: value["traitId"],
17608
17614
  updated_at: value["updatedAt"].toISOString()
@@ -18215,7 +18221,9 @@ function FlagDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
18215
18221
  flagType: json["flag_type"],
18216
18222
  id: json["id"],
18217
18223
  key: json["key"],
18224
+ lastCheckedAt: json["last_checked_at"] == null ? void 0 : new Date(json["last_checked_at"]),
18218
18225
  latestCheck: json["latest_check"] == null ? void 0 : FlagCheckLogResponseDataFromJSON(json["latest_check"]),
18226
+ maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
18219
18227
  name: json["name"],
18220
18228
  rules: json["rules"].map(RuleDetailResponseDataFromJSON),
18221
18229
  updatedAt: new Date(json["updated_at"])
@@ -18234,7 +18242,9 @@ function FlagDetailResponseDataToJSON(value) {
18234
18242
  flag_type: value["flagType"],
18235
18243
  id: value["id"],
18236
18244
  key: value["key"],
18245
+ last_checked_at: value["lastCheckedAt"] == null ? void 0 : value["lastCheckedAt"].toISOString(),
18237
18246
  latest_check: FlagCheckLogResponseDataToJSON(value["latestCheck"]),
18247
+ maintainer_id: value["maintainerId"],
18238
18248
  name: value["name"],
18239
18249
  rules: value["rules"].map(RuleDetailResponseDataToJSON),
18240
18250
  updated_at: value["updatedAt"].toISOString()
@@ -18275,8 +18285,10 @@ function FeatureDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
18275
18285
  eventSummary: json["event_summary"] == null ? void 0 : EventSummaryResponseDataFromJSON(json["event_summary"]),
18276
18286
  featureType: json["feature_type"],
18277
18287
  flags: json["flags"].map(FlagDetailResponseDataFromJSON),
18288
+ icon: json["icon"] == null ? void 0 : json["icon"],
18278
18289
  id: json["id"],
18279
18290
  lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
18291
+ maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
18280
18292
  name: json["name"],
18281
18293
  plans: json["plans"].map(PreviewObjectFromJSON),
18282
18294
  trait: json["trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["trait"]),
@@ -18295,8 +18307,10 @@ function FeatureDetailResponseDataToJSON(value) {
18295
18307
  event_summary: EventSummaryResponseDataToJSON(value["eventSummary"]),
18296
18308
  feature_type: value["featureType"],
18297
18309
  flags: value["flags"].map(FlagDetailResponseDataToJSON),
18310
+ icon: value["icon"],
18298
18311
  id: value["id"],
18299
18312
  lifecycle_phase: value["lifecyclePhase"],
18313
+ maintainer_id: value["maintainerId"],
18300
18314
  name: value["name"],
18301
18315
  plans: value["plans"].map(PreviewObjectToJSON),
18302
18316
  trait: EntityTraitDefinitionResponseDataToJSON(value["trait"]),
@@ -18334,6 +18348,7 @@ function PlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
18334
18348
  audienceType: json["audience_type"],
18335
18349
  createdAt: new Date(json["created_at"]),
18336
18350
  description: json["description"],
18351
+ icon: json["icon"] == null ? void 0 : json["icon"],
18337
18352
  id: json["id"],
18338
18353
  name: json["name"],
18339
18354
  planType: json["plan_type"],
@@ -18348,6 +18363,7 @@ function PlanResponseDataToJSON(value) {
18348
18363
  audience_type: value["audienceType"],
18349
18364
  created_at: value["createdAt"].toISOString(),
18350
18365
  description: value["description"],
18366
+ icon: value["icon"],
18351
18367
  id: value["id"],
18352
18368
  name: value["name"],
18353
18369
  plan_type: value["planType"],
@@ -20469,6 +20485,54 @@ function CreateEnvironmentResponseToJSON(value) {
20469
20485
  };
20470
20486
  }
20471
20487
 
20488
+ // src/api/models/EventBodyFlagCheck.ts
20489
+ function instanceOfEventBodyFlagCheck(value) {
20490
+ if (!("flagKey" in value) || value["flagKey"] === void 0)
20491
+ return false;
20492
+ if (!("reason" in value) || value["reason"] === void 0)
20493
+ return false;
20494
+ if (!("value" in value) || value["value"] === void 0)
20495
+ return false;
20496
+ return true;
20497
+ }
20498
+ function EventBodyFlagCheckFromJSON(json) {
20499
+ return EventBodyFlagCheckFromJSONTyped(json, false);
20500
+ }
20501
+ function EventBodyFlagCheckFromJSONTyped(json, ignoreDiscriminator) {
20502
+ if (json == null) {
20503
+ return json;
20504
+ }
20505
+ return {
20506
+ companyId: json["company_id"] == null ? void 0 : json["company_id"],
20507
+ error: json["error"] == null ? void 0 : json["error"],
20508
+ flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
20509
+ flagKey: json["flag_key"],
20510
+ reason: json["reason"],
20511
+ reqCompany: json["req_company"] == null ? void 0 : json["req_company"],
20512
+ reqUser: json["req_user"] == null ? void 0 : json["req_user"],
20513
+ ruleId: json["rule_id"] == null ? void 0 : json["rule_id"],
20514
+ userId: json["user_id"] == null ? void 0 : json["user_id"],
20515
+ value: json["value"]
20516
+ };
20517
+ }
20518
+ function EventBodyFlagCheckToJSON(value) {
20519
+ if (value == null) {
20520
+ return value;
20521
+ }
20522
+ return {
20523
+ company_id: value["companyId"],
20524
+ error: value["error"],
20525
+ flag_id: value["flagId"],
20526
+ flag_key: value["flagKey"],
20527
+ reason: value["reason"],
20528
+ req_company: value["reqCompany"],
20529
+ req_user: value["reqUser"],
20530
+ rule_id: value["ruleId"],
20531
+ user_id: value["userId"],
20532
+ value: value["value"]
20533
+ };
20534
+ }
20535
+
20472
20536
  // src/api/models/EventBodyIdentifyCompany.ts
20473
20537
  function instanceOfEventBodyIdentifyCompany(value) {
20474
20538
  if (!("keys" in value) || value["keys"] === void 0)
@@ -20571,6 +20635,9 @@ function EventBodyFromJSONTyped(json, ignoreDiscriminator) {
20571
20635
  if (json == null) {
20572
20636
  return json;
20573
20637
  }
20638
+ if (instanceOfEventBodyFlagCheck(json)) {
20639
+ return EventBodyFlagCheckFromJSONTyped(json, true);
20640
+ }
20574
20641
  if (instanceOfEventBodyIdentify(json)) {
20575
20642
  return EventBodyIdentifyFromJSONTyped(json, true);
20576
20643
  }
@@ -20583,6 +20650,9 @@ function EventBodyToJSON(value) {
20583
20650
  if (value == null) {
20584
20651
  return value;
20585
20652
  }
20653
+ if (instanceOfEventBodyFlagCheck(value)) {
20654
+ return EventBodyFlagCheckToJSON(value);
20655
+ }
20586
20656
  if (instanceOfEventBodyIdentify(value)) {
20587
20657
  return EventBodyIdentifyToJSON(value);
20588
20658
  }
@@ -20595,7 +20665,8 @@ function EventBodyToJSON(value) {
20595
20665
  // src/api/models/CreateEventRequestBody.ts
20596
20666
  var CreateEventRequestBodyEventTypeEnum = {
20597
20667
  Identify: "identify",
20598
- Track: "track"
20668
+ Track: "track",
20669
+ FlagCheck: "flag_check"
20599
20670
  };
20600
20671
  function instanceOfCreateEventRequestBody(value) {
20601
20672
  if (!("eventType" in value) || value["eventType"] === void 0)
@@ -20806,6 +20877,7 @@ function CreateOrUpdateFlagRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20806
20877
  flagType: json["flag_type"],
20807
20878
  id: json["id"] == null ? void 0 : json["id"],
20808
20879
  key: json["key"],
20880
+ maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
20809
20881
  name: json["name"]
20810
20882
  };
20811
20883
  }
@@ -20820,6 +20892,7 @@ function CreateOrUpdateFlagRequestBodyToJSON(value) {
20820
20892
  flag_type: value["flagType"],
20821
20893
  id: value["id"],
20822
20894
  key: value["key"],
20895
+ maintainer_id: value["maintainerId"],
20823
20896
  name: value["name"]
20824
20897
  };
20825
20898
  }
@@ -20851,7 +20924,9 @@ function CreateFeatureRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20851
20924
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
20852
20925
  featureType: json["feature_type"],
20853
20926
  flag: json["flag"] == null ? void 0 : CreateOrUpdateFlagRequestBodyFromJSON(json["flag"]),
20927
+ icon: json["icon"] == null ? void 0 : json["icon"],
20854
20928
  lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
20929
+ maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
20855
20930
  name: json["name"],
20856
20931
  traitId: json["trait_id"] == null ? void 0 : json["trait_id"]
20857
20932
  };
@@ -20865,7 +20940,9 @@ function CreateFeatureRequestBodyToJSON(value) {
20865
20940
  event_subtype: value["eventSubtype"],
20866
20941
  feature_type: value["featureType"],
20867
20942
  flag: CreateOrUpdateFlagRequestBodyToJSON(value["flag"]),
20943
+ icon: value["icon"],
20868
20944
  lifecycle_phase: value["lifecyclePhase"],
20945
+ maintainer_id: value["maintainerId"],
20869
20946
  name: value["name"],
20870
20947
  trait_id: value["traitId"]
20871
20948
  };
@@ -20928,6 +21005,7 @@ function CreateFlagRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20928
21005
  featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
20929
21006
  flagType: json["flag_type"],
20930
21007
  key: json["key"],
21008
+ maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
20931
21009
  name: json["name"]
20932
21010
  };
20933
21011
  }
@@ -20941,6 +21019,7 @@ function CreateFlagRequestBodyToJSON(value) {
20941
21019
  feature_id: value["featureId"],
20942
21020
  flag_type: value["flagType"],
20943
21021
  key: value["key"],
21022
+ maintainer_id: value["maintainerId"],
20944
21023
  name: value["name"]
20945
21024
  };
20946
21025
  }
@@ -21216,6 +21295,7 @@ function CreatePlanRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21216
21295
  return {
21217
21296
  audienceType: json["audience_type"] == null ? void 0 : json["audience_type"],
21218
21297
  description: json["description"],
21298
+ icon: json["icon"] == null ? void 0 : json["icon"],
21219
21299
  name: json["name"],
21220
21300
  planType: json["plan_type"]
21221
21301
  };
@@ -21227,6 +21307,7 @@ function CreatePlanRequestBodyToJSON(value) {
21227
21307
  return {
21228
21308
  audience_type: value["audienceType"],
21229
21309
  description: value["description"],
21310
+ icon: value["icon"],
21230
21311
  name: value["name"],
21231
21312
  plan_type: value["planType"]
21232
21313
  };
@@ -21236,6 +21317,8 @@ function CreatePlanRequestBodyToJSON(value) {
21236
21317
  function instanceOfPlanDetailResponseData(value) {
21237
21318
  if (!("audienceType" in value) || value["audienceType"] === void 0)
21238
21319
  return false;
21320
+ if (!("billingProducts" in value) || value["billingProducts"] === void 0)
21321
+ return false;
21239
21322
  if (!("companyCount" in value) || value["companyCount"] === void 0)
21240
21323
  return false;
21241
21324
  if (!("createdAt" in value) || value["createdAt"] === void 0)
@@ -21263,12 +21346,16 @@ function PlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21263
21346
  }
21264
21347
  return {
21265
21348
  audienceType: json["audience_type"],
21349
+ billingProducts: json["billing_products"].map(
21350
+ BillingProductResponseDataFromJSON
21351
+ ),
21266
21352
  companyCount: json["company_count"],
21267
21353
  createdAt: new Date(json["created_at"]),
21268
21354
  description: json["description"],
21269
21355
  features: json["features"].map(
21270
21356
  FeatureDetailResponseDataFromJSON
21271
21357
  ),
21358
+ icon: json["icon"] == null ? void 0 : json["icon"],
21272
21359
  id: json["id"],
21273
21360
  name: json["name"],
21274
21361
  planType: json["plan_type"],
@@ -21281,12 +21368,16 @@ function PlanDetailResponseDataToJSON(value) {
21281
21368
  }
21282
21369
  return {
21283
21370
  audience_type: value["audienceType"],
21371
+ billing_products: value["billingProducts"].map(
21372
+ BillingProductResponseDataToJSON
21373
+ ),
21284
21374
  company_count: value["companyCount"],
21285
21375
  created_at: value["createdAt"].toISOString(),
21286
21376
  description: value["description"],
21287
21377
  features: value["features"].map(
21288
21378
  FeatureDetailResponseDataToJSON
21289
21379
  ),
21380
+ icon: value["icon"],
21290
21381
  id: value["id"],
21291
21382
  name: value["name"],
21292
21383
  plan_type: value["planType"],
@@ -22771,6 +22862,7 @@ function FlagResponseDataFromJSONTyped(json, ignoreDiscriminator) {
22771
22862
  flagType: json["flag_type"],
22772
22863
  id: json["id"],
22773
22864
  key: json["key"],
22865
+ maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
22774
22866
  name: json["name"],
22775
22867
  updatedAt: new Date(json["updated_at"])
22776
22868
  };
@@ -22787,6 +22879,7 @@ function FlagResponseDataToJSON(value) {
22787
22879
  flag_type: value["flagType"],
22788
22880
  id: value["id"],
22789
22881
  key: value["key"],
22882
+ maintainer_id: value["maintainerId"],
22790
22883
  name: value["name"],
22791
22884
  updated_at: value["updatedAt"].toISOString()
22792
22885
  };
@@ -25124,6 +25217,8 @@ function ListEventsParamsFromJSONTyped(json, ignoreDiscriminator) {
25124
25217
  return {
25125
25218
  companyId: json["company_id"] == null ? void 0 : json["company_id"],
25126
25219
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
25220
+ eventTypes: json["event_types"] == null ? void 0 : json["event_types"],
25221
+ flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
25127
25222
  limit: json["limit"] == null ? void 0 : json["limit"],
25128
25223
  offset: json["offset"] == null ? void 0 : json["offset"],
25129
25224
  userId: json["user_id"] == null ? void 0 : json["user_id"]
@@ -25136,6 +25231,8 @@ function ListEventsParamsToJSON(value) {
25136
25231
  return {
25137
25232
  company_id: value["companyId"],
25138
25233
  event_subtype: value["eventSubtype"],
25234
+ event_types: value["eventTypes"],
25235
+ flag_id: value["flagId"],
25139
25236
  limit: value["limit"],
25140
25237
  offset: value["offset"],
25141
25238
  user_id: value["userId"]
@@ -26863,7 +26960,9 @@ function UpdateFeatureRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
26863
26960
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
26864
26961
  featureType: json["feature_type"] == null ? void 0 : json["feature_type"],
26865
26962
  flag: json["flag"] == null ? void 0 : CreateOrUpdateFlagRequestBodyFromJSON(json["flag"]),
26963
+ icon: json["icon"] == null ? void 0 : json["icon"],
26866
26964
  lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
26965
+ maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
26867
26966
  name: json["name"] == null ? void 0 : json["name"],
26868
26967
  traitId: json["trait_id"] == null ? void 0 : json["trait_id"]
26869
26968
  };
@@ -26877,7 +26976,9 @@ function UpdateFeatureRequestBodyToJSON(value) {
26877
26976
  event_subtype: value["eventSubtype"],
26878
26977
  feature_type: value["featureType"],
26879
26978
  flag: CreateOrUpdateFlagRequestBodyToJSON(value["flag"]),
26979
+ icon: value["icon"],
26880
26980
  lifecycle_phase: value["lifecyclePhase"],
26981
+ maintainer_id: value["maintainerId"],
26881
26982
  name: value["name"],
26882
26983
  trait_id: value["traitId"]
26883
26984
  };
@@ -27104,6 +27205,7 @@ function UpdatePlanRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
27104
27205
  return {
27105
27206
  audienceType: json["audience_type"],
27106
27207
  description: json["description"] == null ? void 0 : json["description"],
27208
+ icon: json["icon"] == null ? void 0 : json["icon"],
27107
27209
  name: json["name"],
27108
27210
  planType: json["plan_type"] == null ? void 0 : json["plan_type"]
27109
27211
  };
@@ -27115,6 +27217,7 @@ function UpdatePlanRequestBodyToJSON(value) {
27115
27217
  return {
27116
27218
  audience_type: value["audienceType"],
27117
27219
  description: value["description"],
27220
+ icon: value["icon"],
27118
27221
  name: value["name"],
27119
27222
  plan_type: value["planType"]
27120
27223
  };
@@ -32267,12 +32370,18 @@ var EventsApi = class extends BaseAPI {
32267
32370
  if (requestParameters["companyId"] != null) {
32268
32371
  queryParameters["company_id"] = requestParameters["companyId"];
32269
32372
  }
32270
- if (requestParameters["userId"] != null) {
32271
- queryParameters["user_id"] = requestParameters["userId"];
32272
- }
32273
32373
  if (requestParameters["eventSubtype"] != null) {
32274
32374
  queryParameters["event_subtype"] = requestParameters["eventSubtype"];
32275
32375
  }
32376
+ if (requestParameters["eventTypes"] != null) {
32377
+ queryParameters["event_types"] = requestParameters["eventTypes"];
32378
+ }
32379
+ if (requestParameters["flagId"] != null) {
32380
+ queryParameters["flag_id"] = requestParameters["flagId"];
32381
+ }
32382
+ if (requestParameters["userId"] != null) {
32383
+ queryParameters["user_id"] = requestParameters["userId"];
32384
+ }
32276
32385
  if (requestParameters["limit"] != null) {
32277
32386
  queryParameters["limit"] = requestParameters["limit"];
32278
32387
  }
@@ -34541,7 +34650,7 @@ var Schematic = class {
34541
34650
  constructor(apiKey, opts) {
34542
34651
  const { offline = false } = opts ?? {};
34543
34652
  const { basePath, flagDefaults = {} } = opts ?? {};
34544
- const version = "1.0.20";
34653
+ const version = "1.0.21";
34545
34654
  const headers = {
34546
34655
  "User-Agent": `schematic-typescript-node@v${version}`
34547
34656
  };
@@ -35105,6 +35214,9 @@ export {
35105
35214
  EnvironmentResponseDataFromJSON,
35106
35215
  EnvironmentResponseDataFromJSONTyped,
35107
35216
  EnvironmentResponseDataToJSON,
35217
+ EventBodyFlagCheckFromJSON,
35218
+ EventBodyFlagCheckFromJSONTyped,
35219
+ EventBodyFlagCheckToJSON,
35108
35220
  EventBodyFromJSON,
35109
35221
  EventBodyFromJSONTyped,
35110
35222
  EventBodyIdentifyCompanyFromJSON,
@@ -35821,6 +35933,7 @@ export {
35821
35933
  instanceOfEntityTraitValue,
35822
35934
  instanceOfEnvironmentDetailResponseData,
35823
35935
  instanceOfEnvironmentResponseData,
35936
+ instanceOfEventBodyFlagCheck,
35824
35937
  instanceOfEventBodyIdentify,
35825
35938
  instanceOfEventBodyIdentifyCompany,
35826
35939
  instanceOfEventBodyTrack,
package/package.json CHANGED
@@ -63,5 +63,5 @@
63
63
  "release": "npx standard-version && git push --follow-tags && yarn publish",
64
64
  "test": "jest"
65
65
  },
66
- "version": "1.0.20"
66
+ "version": "1.0.21"
67
67
  }