@schematichq/schematic-typescript-node 1.0.18 → 1.0.19

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.
@@ -17651,2809 +17651,2943 @@ function ComponentResponseDataToJSON(value) {
17651
17651
  };
17652
17652
  }
17653
17653
 
17654
- // src/api/models/ComponentHydrateView.ts
17655
- function instanceOfComponentHydrateView(value) {
17656
- if (!("data" in value) || value["data"] === void 0)
17654
+ // src/api/models/EventSummaryResponseData.ts
17655
+ function instanceOfEventSummaryResponseData(value) {
17656
+ if (!("companyCount" in value) || value["companyCount"] === void 0)
17657
+ return false;
17658
+ if (!("environmentId" in value) || value["environmentId"] === void 0)
17659
+ return false;
17660
+ if (!("eventCount" in value) || value["eventCount"] === void 0)
17661
+ return false;
17662
+ if (!("eventSubtype" in value) || value["eventSubtype"] === void 0)
17663
+ return false;
17664
+ if (!("userCount" in value) || value["userCount"] === void 0)
17657
17665
  return false;
17658
17666
  return true;
17659
17667
  }
17660
- function ComponentHydrateViewFromJSON(json) {
17661
- return ComponentHydrateViewFromJSONTyped(json, false);
17668
+ function EventSummaryResponseDataFromJSON(json) {
17669
+ return EventSummaryResponseDataFromJSONTyped(json, false);
17662
17670
  }
17663
- function ComponentHydrateViewFromJSONTyped(json, ignoreDiscriminator) {
17671
+ function EventSummaryResponseDataFromJSONTyped(json, ignoreDiscriminator) {
17664
17672
  if (json == null) {
17665
17673
  return json;
17666
17674
  }
17667
17675
  return {
17668
- component: json["component"] == null ? void 0 : ComponentResponseDataFromJSON(json["component"]),
17669
- data: json["data"]
17676
+ companyCount: json["company_count"],
17677
+ environmentId: json["environment_id"],
17678
+ eventCount: json["event_count"],
17679
+ eventSubtype: json["event_subtype"],
17680
+ lastSeenAt: json["last_seen_at"] == null ? void 0 : new Date(json["last_seen_at"]),
17681
+ userCount: json["user_count"]
17670
17682
  };
17671
17683
  }
17672
- function ComponentHydrateViewToJSON(value) {
17684
+ function EventSummaryResponseDataToJSON(value) {
17673
17685
  if (value == null) {
17674
17686
  return value;
17675
17687
  }
17676
17688
  return {
17677
- component: ComponentResponseDataToJSON(value["component"]),
17678
- data: value["data"]
17689
+ company_count: value["companyCount"],
17690
+ environment_id: value["environmentId"],
17691
+ event_count: value["eventCount"],
17692
+ event_subtype: value["eventSubtype"],
17693
+ last_seen_at: value["lastSeenAt"] == null ? void 0 : value["lastSeenAt"].toISOString(),
17694
+ user_count: value["userCount"]
17679
17695
  };
17680
17696
  }
17681
17697
 
17682
- // src/api/models/CountApiKeysParams.ts
17683
- function instanceOfCountApiKeysParams(value) {
17698
+ // src/api/models/RuleConditionResourceResponseData.ts
17699
+ function instanceOfRuleConditionResourceResponseData(value) {
17700
+ if (!("id" in value) || value["id"] === void 0)
17701
+ return false;
17702
+ if (!("name" in value) || value["name"] === void 0)
17703
+ return false;
17684
17704
  return true;
17685
17705
  }
17686
- function CountApiKeysParamsFromJSON(json) {
17687
- return CountApiKeysParamsFromJSONTyped(json, false);
17706
+ function RuleConditionResourceResponseDataFromJSON(json) {
17707
+ return RuleConditionResourceResponseDataFromJSONTyped(json, false);
17688
17708
  }
17689
- function CountApiKeysParamsFromJSONTyped(json, ignoreDiscriminator) {
17709
+ function RuleConditionResourceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
17690
17710
  if (json == null) {
17691
17711
  return json;
17692
17712
  }
17693
17713
  return {
17694
- environmentId: json["environment_id"] == null ? void 0 : json["environment_id"],
17695
- limit: json["limit"] == null ? void 0 : json["limit"],
17696
- offset: json["offset"] == null ? void 0 : json["offset"],
17697
- requireEnvironment: json["require_environment"] == null ? void 0 : json["require_environment"]
17714
+ id: json["id"],
17715
+ name: json["name"]
17698
17716
  };
17699
17717
  }
17700
- function CountApiKeysParamsToJSON(value) {
17718
+ function RuleConditionResourceResponseDataToJSON(value) {
17701
17719
  if (value == null) {
17702
17720
  return value;
17703
17721
  }
17704
17722
  return {
17705
- environment_id: value["environmentId"],
17706
- limit: value["limit"],
17707
- offset: value["offset"],
17708
- require_environment: value["requireEnvironment"]
17723
+ id: value["id"],
17724
+ name: value["name"]
17709
17725
  };
17710
17726
  }
17711
17727
 
17712
- // src/api/models/CountResponse.ts
17713
- function instanceOfCountResponse(value) {
17714
- if (!("count" in value) || value["count"] === void 0)
17728
+ // src/api/models/RuleConditionDetailResponseData.ts
17729
+ function instanceOfRuleConditionDetailResponseData(value) {
17730
+ if (!("conditionType" in value) || value["conditionType"] === void 0)
17731
+ return false;
17732
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
17733
+ return false;
17734
+ if (!("environmentId" in value) || value["environmentId"] === void 0)
17735
+ return false;
17736
+ if (!("id" in value) || value["id"] === void 0)
17737
+ return false;
17738
+ if (!("operator" in value) || value["operator"] === void 0)
17739
+ return false;
17740
+ if (!("resourceIds" in value) || value["resourceIds"] === void 0)
17741
+ return false;
17742
+ if (!("resources" in value) || value["resources"] === void 0)
17743
+ return false;
17744
+ if (!("ruleId" in value) || value["ruleId"] === void 0)
17745
+ return false;
17746
+ if (!("traitValue" in value) || value["traitValue"] === void 0)
17747
+ return false;
17748
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
17715
17749
  return false;
17716
17750
  return true;
17717
17751
  }
17718
- function CountResponseFromJSON(json) {
17719
- return CountResponseFromJSONTyped(json, false);
17752
+ function RuleConditionDetailResponseDataFromJSON(json) {
17753
+ return RuleConditionDetailResponseDataFromJSONTyped(json, false);
17720
17754
  }
17721
- function CountResponseFromJSONTyped(json, ignoreDiscriminator) {
17755
+ function RuleConditionDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
17722
17756
  if (json == null) {
17723
17757
  return json;
17724
17758
  }
17725
17759
  return {
17726
- count: json["count"]
17760
+ comparisonTrait: json["comparison_trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["comparison_trait"]),
17761
+ comparisonTraitId: json["comparison_trait_id"] == null ? void 0 : json["comparison_trait_id"],
17762
+ conditionGroupId: json["condition_group_id"] == null ? void 0 : json["condition_group_id"],
17763
+ conditionType: json["condition_type"],
17764
+ createdAt: new Date(json["created_at"]),
17765
+ environmentId: json["environment_id"],
17766
+ eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
17767
+ flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
17768
+ id: json["id"],
17769
+ metricPeriod: json["metric_period"] == null ? void 0 : json["metric_period"],
17770
+ metricValue: json["metric_value"] == null ? void 0 : json["metric_value"],
17771
+ operator: json["operator"],
17772
+ planId: json["plan_id"] == null ? void 0 : json["plan_id"],
17773
+ resourceIds: json["resource_ids"],
17774
+ resources: json["resources"].map(
17775
+ RuleConditionResourceResponseDataFromJSON
17776
+ ),
17777
+ ruleId: json["rule_id"],
17778
+ trait: json["trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["trait"]),
17779
+ traitEntityType: json["trait_entity_type"] == null ? void 0 : json["trait_entity_type"],
17780
+ traitId: json["trait_id"] == null ? void 0 : json["trait_id"],
17781
+ traitValue: json["trait_value"],
17782
+ updatedAt: new Date(json["updated_at"])
17727
17783
  };
17728
17784
  }
17729
- function CountResponseToJSON(value) {
17785
+ function RuleConditionDetailResponseDataToJSON(value) {
17730
17786
  if (value == null) {
17731
17787
  return value;
17732
17788
  }
17733
17789
  return {
17734
- count: value["count"]
17790
+ comparison_trait: EntityTraitDefinitionResponseDataToJSON(
17791
+ value["comparisonTrait"]
17792
+ ),
17793
+ comparison_trait_id: value["comparisonTraitId"],
17794
+ condition_group_id: value["conditionGroupId"],
17795
+ condition_type: value["conditionType"],
17796
+ created_at: value["createdAt"].toISOString(),
17797
+ environment_id: value["environmentId"],
17798
+ event_subtype: value["eventSubtype"],
17799
+ flag_id: value["flagId"],
17800
+ id: value["id"],
17801
+ metric_period: value["metricPeriod"],
17802
+ metric_value: value["metricValue"],
17803
+ operator: value["operator"],
17804
+ plan_id: value["planId"],
17805
+ resource_ids: value["resourceIds"],
17806
+ resources: value["resources"].map(
17807
+ RuleConditionResourceResponseDataToJSON
17808
+ ),
17809
+ rule_id: value["ruleId"],
17810
+ trait: EntityTraitDefinitionResponseDataToJSON(value["trait"]),
17811
+ trait_entity_type: value["traitEntityType"],
17812
+ trait_id: value["traitId"],
17813
+ trait_value: value["traitValue"],
17814
+ updated_at: value["updatedAt"].toISOString()
17735
17815
  };
17736
17816
  }
17737
17817
 
17738
- // src/api/models/CountApiKeysResponse.ts
17739
- function instanceOfCountApiKeysResponse(value) {
17740
- if (!("data" in value) || value["data"] === void 0)
17818
+ // src/api/models/RuleConditionGroupDetailResponseData.ts
17819
+ function instanceOfRuleConditionGroupDetailResponseData(value) {
17820
+ if (!("conditions" in value) || value["conditions"] === void 0)
17741
17821
  return false;
17742
- if (!("params" in value) || value["params"] === void 0)
17822
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
17823
+ return false;
17824
+ if (!("environmentId" in value) || value["environmentId"] === void 0)
17825
+ return false;
17826
+ if (!("id" in value) || value["id"] === void 0)
17827
+ return false;
17828
+ if (!("ruleId" in value) || value["ruleId"] === void 0)
17829
+ return false;
17830
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
17743
17831
  return false;
17744
17832
  return true;
17745
17833
  }
17746
- function CountApiKeysResponseFromJSON(json) {
17747
- return CountApiKeysResponseFromJSONTyped(json, false);
17834
+ function RuleConditionGroupDetailResponseDataFromJSON(json) {
17835
+ return RuleConditionGroupDetailResponseDataFromJSONTyped(json, false);
17748
17836
  }
17749
- function CountApiKeysResponseFromJSONTyped(json, ignoreDiscriminator) {
17837
+ function RuleConditionGroupDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
17750
17838
  if (json == null) {
17751
17839
  return json;
17752
17840
  }
17753
17841
  return {
17754
- data: CountResponseFromJSON(json["data"]),
17755
- params: CountApiKeysParamsFromJSON(json["params"])
17842
+ conditions: json["conditions"].map(
17843
+ RuleConditionDetailResponseDataFromJSON
17844
+ ),
17845
+ createdAt: new Date(json["created_at"]),
17846
+ environmentId: json["environment_id"],
17847
+ flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
17848
+ id: json["id"],
17849
+ planId: json["plan_id"] == null ? void 0 : json["plan_id"],
17850
+ ruleId: json["rule_id"],
17851
+ updatedAt: new Date(json["updated_at"])
17756
17852
  };
17757
17853
  }
17758
- function CountApiKeysResponseToJSON(value) {
17854
+ function RuleConditionGroupDetailResponseDataToJSON(value) {
17759
17855
  if (value == null) {
17760
17856
  return value;
17761
17857
  }
17762
17858
  return {
17763
- data: CountResponseToJSON(value["data"]),
17764
- params: CountApiKeysParamsToJSON(value["params"])
17859
+ conditions: value["conditions"].map(
17860
+ RuleConditionDetailResponseDataToJSON
17861
+ ),
17862
+ created_at: value["createdAt"].toISOString(),
17863
+ environment_id: value["environmentId"],
17864
+ flag_id: value["flagId"],
17865
+ id: value["id"],
17866
+ plan_id: value["planId"],
17867
+ rule_id: value["ruleId"],
17868
+ updated_at: value["updatedAt"].toISOString()
17765
17869
  };
17766
17870
  }
17767
17871
 
17768
- // src/api/models/CountApiRequestsParams.ts
17769
- function instanceOfCountApiRequestsParams(value) {
17872
+ // src/api/models/RuleDetailResponseData.ts
17873
+ function instanceOfRuleDetailResponseData(value) {
17874
+ if (!("conditionGroups" in value) || value["conditionGroups"] === void 0)
17875
+ return false;
17876
+ if (!("conditions" in value) || value["conditions"] === void 0)
17877
+ return false;
17878
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
17879
+ return false;
17880
+ if (!("environmentId" in value) || value["environmentId"] === void 0)
17881
+ return false;
17882
+ if (!("id" in value) || value["id"] === void 0)
17883
+ return false;
17884
+ if (!("name" in value) || value["name"] === void 0)
17885
+ return false;
17886
+ if (!("priority" in value) || value["priority"] === void 0)
17887
+ return false;
17888
+ if (!("ruleType" in value) || value["ruleType"] === void 0)
17889
+ return false;
17890
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
17891
+ return false;
17892
+ if (!("value" in value) || value["value"] === void 0)
17893
+ return false;
17770
17894
  return true;
17771
17895
  }
17772
- function CountApiRequestsParamsFromJSON(json) {
17773
- return CountApiRequestsParamsFromJSONTyped(json, false);
17896
+ function RuleDetailResponseDataFromJSON(json) {
17897
+ return RuleDetailResponseDataFromJSONTyped(json, false);
17774
17898
  }
17775
- function CountApiRequestsParamsFromJSONTyped(json, ignoreDiscriminator) {
17899
+ function RuleDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
17776
17900
  if (json == null) {
17777
17901
  return json;
17778
17902
  }
17779
17903
  return {
17780
- environmentId: json["environment_id"] == null ? void 0 : json["environment_id"],
17781
- limit: json["limit"] == null ? void 0 : json["limit"],
17782
- offset: json["offset"] == null ? void 0 : json["offset"],
17783
- q: json["q"] == null ? void 0 : json["q"],
17784
- requestType: json["request_type"] == null ? void 0 : json["request_type"]
17904
+ conditionGroups: json["condition_groups"].map(
17905
+ RuleConditionGroupDetailResponseDataFromJSON
17906
+ ),
17907
+ conditions: json["conditions"].map(
17908
+ RuleConditionDetailResponseDataFromJSON
17909
+ ),
17910
+ createdAt: new Date(json["created_at"]),
17911
+ environmentId: json["environment_id"],
17912
+ flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
17913
+ id: json["id"],
17914
+ name: json["name"],
17915
+ planId: json["plan_id"] == null ? void 0 : json["plan_id"],
17916
+ priority: json["priority"],
17917
+ ruleType: json["rule_type"],
17918
+ updatedAt: new Date(json["updated_at"]),
17919
+ value: json["value"]
17785
17920
  };
17786
17921
  }
17787
- function CountApiRequestsParamsToJSON(value) {
17922
+ function RuleDetailResponseDataToJSON(value) {
17788
17923
  if (value == null) {
17789
17924
  return value;
17790
17925
  }
17791
17926
  return {
17927
+ condition_groups: value["conditionGroups"].map(
17928
+ RuleConditionGroupDetailResponseDataToJSON
17929
+ ),
17930
+ conditions: value["conditions"].map(
17931
+ RuleConditionDetailResponseDataToJSON
17932
+ ),
17933
+ created_at: value["createdAt"].toISOString(),
17792
17934
  environment_id: value["environmentId"],
17793
- limit: value["limit"],
17794
- offset: value["offset"],
17795
- q: value["q"],
17796
- request_type: value["requestType"]
17797
- };
17798
- }
17799
-
17800
- // src/api/models/CountApiRequestsResponse.ts
17801
- function instanceOfCountApiRequestsResponse(value) {
17802
- if (!("data" in value) || value["data"] === void 0)
17935
+ flag_id: value["flagId"],
17936
+ id: value["id"],
17937
+ name: value["name"],
17938
+ plan_id: value["planId"],
17939
+ priority: value["priority"],
17940
+ rule_type: value["ruleType"],
17941
+ updated_at: value["updatedAt"].toISOString(),
17942
+ value: value["value"]
17943
+ };
17944
+ }
17945
+
17946
+ // src/api/models/FlagCheckLogResponseData.ts
17947
+ function instanceOfFlagCheckLogResponseData(value) {
17948
+ if (!("checkStatus" in value) || value["checkStatus"] === void 0)
17803
17949
  return false;
17804
- if (!("params" in value) || value["params"] === void 0)
17950
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
17951
+ return false;
17952
+ if (!("environmentId" in value) || value["environmentId"] === void 0)
17953
+ return false;
17954
+ if (!("flagKey" in value) || value["flagKey"] === void 0)
17955
+ return false;
17956
+ if (!("id" in value) || value["id"] === void 0)
17957
+ return false;
17958
+ if (!("reason" in value) || value["reason"] === void 0)
17959
+ return false;
17960
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
17961
+ return false;
17962
+ if (!("value" in value) || value["value"] === void 0)
17805
17963
  return false;
17806
17964
  return true;
17807
17965
  }
17808
- function CountApiRequestsResponseFromJSON(json) {
17809
- return CountApiRequestsResponseFromJSONTyped(json, false);
17966
+ function FlagCheckLogResponseDataFromJSON(json) {
17967
+ return FlagCheckLogResponseDataFromJSONTyped(json, false);
17810
17968
  }
17811
- function CountApiRequestsResponseFromJSONTyped(json, ignoreDiscriminator) {
17969
+ function FlagCheckLogResponseDataFromJSONTyped(json, ignoreDiscriminator) {
17812
17970
  if (json == null) {
17813
17971
  return json;
17814
17972
  }
17815
17973
  return {
17816
- data: CountResponseFromJSON(json["data"]),
17817
- params: CountApiRequestsParamsFromJSON(json["params"])
17974
+ checkStatus: json["check_status"],
17975
+ companyId: json["company_id"] == null ? void 0 : json["company_id"],
17976
+ createdAt: new Date(json["created_at"]),
17977
+ environmentId: json["environment_id"],
17978
+ error: json["error"] == null ? void 0 : json["error"],
17979
+ flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
17980
+ flagKey: json["flag_key"],
17981
+ id: json["id"],
17982
+ reason: json["reason"],
17983
+ reqCompany: json["req_company"] == null ? void 0 : json["req_company"],
17984
+ reqUser: json["req_user"] == null ? void 0 : json["req_user"],
17985
+ ruleId: json["rule_id"] == null ? void 0 : json["rule_id"],
17986
+ updatedAt: new Date(json["updated_at"]),
17987
+ userId: json["user_id"] == null ? void 0 : json["user_id"],
17988
+ value: json["value"]
17818
17989
  };
17819
17990
  }
17820
- function CountApiRequestsResponseToJSON(value) {
17991
+ function FlagCheckLogResponseDataToJSON(value) {
17821
17992
  if (value == null) {
17822
17993
  return value;
17823
17994
  }
17824
17995
  return {
17825
- data: CountResponseToJSON(value["data"]),
17826
- params: CountApiRequestsParamsToJSON(value["params"])
17996
+ check_status: value["checkStatus"],
17997
+ company_id: value["companyId"],
17998
+ created_at: value["createdAt"].toISOString(),
17999
+ environment_id: value["environmentId"],
18000
+ error: value["error"],
18001
+ flag_id: value["flagId"],
18002
+ flag_key: value["flagKey"],
18003
+ id: value["id"],
18004
+ reason: value["reason"],
18005
+ req_company: value["reqCompany"],
18006
+ req_user: value["reqUser"],
18007
+ rule_id: value["ruleId"],
18008
+ updated_at: value["updatedAt"].toISOString(),
18009
+ user_id: value["userId"],
18010
+ value: value["value"]
17827
18011
  };
17828
18012
  }
17829
18013
 
17830
- // src/api/models/CountAudienceCompaniesResponse.ts
17831
- function instanceOfCountAudienceCompaniesResponse(value) {
17832
- if (!("data" in value) || value["data"] === void 0)
18014
+ // src/api/models/FlagDetailResponseData.ts
18015
+ function instanceOfFlagDetailResponseData(value) {
18016
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
17833
18017
  return false;
17834
- if (!("params" in value) || value["params"] === void 0)
18018
+ if (!("defaultValue" in value) || value["defaultValue"] === void 0)
18019
+ return false;
18020
+ if (!("description" in value) || value["description"] === void 0)
18021
+ return false;
18022
+ if (!("flagType" in value) || value["flagType"] === void 0)
18023
+ return false;
18024
+ if (!("id" in value) || value["id"] === void 0)
18025
+ return false;
18026
+ if (!("key" in value) || value["key"] === void 0)
18027
+ return false;
18028
+ if (!("name" in value) || value["name"] === void 0)
18029
+ return false;
18030
+ if (!("rules" in value) || value["rules"] === void 0)
18031
+ return false;
18032
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
17835
18033
  return false;
17836
18034
  return true;
17837
18035
  }
17838
- function CountAudienceCompaniesResponseFromJSON(json) {
17839
- return CountAudienceCompaniesResponseFromJSONTyped(json, false);
18036
+ function FlagDetailResponseDataFromJSON(json) {
18037
+ return FlagDetailResponseDataFromJSONTyped(json, false);
17840
18038
  }
17841
- function CountAudienceCompaniesResponseFromJSONTyped(json, ignoreDiscriminator) {
18039
+ function FlagDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
17842
18040
  if (json == null) {
17843
18041
  return json;
17844
18042
  }
17845
18043
  return {
17846
- data: CountResponseFromJSON(json["data"]),
17847
- params: json["params"]
18044
+ createdAt: new Date(json["created_at"]),
18045
+ defaultValue: json["default_value"],
18046
+ description: json["description"],
18047
+ feature: json["feature"] == null ? void 0 : FeatureResponseDataFromJSON(json["feature"]),
18048
+ featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
18049
+ flagType: json["flag_type"],
18050
+ id: json["id"],
18051
+ key: json["key"],
18052
+ latestCheck: json["latest_check"] == null ? void 0 : FlagCheckLogResponseDataFromJSON(json["latest_check"]),
18053
+ name: json["name"],
18054
+ rules: json["rules"].map(RuleDetailResponseDataFromJSON),
18055
+ updatedAt: new Date(json["updated_at"])
17848
18056
  };
17849
18057
  }
17850
- function CountAudienceCompaniesResponseToJSON(value) {
18058
+ function FlagDetailResponseDataToJSON(value) {
17851
18059
  if (value == null) {
17852
18060
  return value;
17853
18061
  }
17854
18062
  return {
17855
- data: CountResponseToJSON(value["data"]),
17856
- params: value["params"]
18063
+ created_at: value["createdAt"].toISOString(),
18064
+ default_value: value["defaultValue"],
18065
+ description: value["description"],
18066
+ feature: FeatureResponseDataToJSON(value["feature"]),
18067
+ feature_id: value["featureId"],
18068
+ flag_type: value["flagType"],
18069
+ id: value["id"],
18070
+ key: value["key"],
18071
+ latest_check: FlagCheckLogResponseDataToJSON(value["latestCheck"]),
18072
+ name: value["name"],
18073
+ rules: value["rules"].map(RuleDetailResponseDataToJSON),
18074
+ updated_at: value["updatedAt"].toISOString()
17857
18075
  };
17858
18076
  }
17859
18077
 
17860
- // src/api/models/CountAudienceUsersResponse.ts
17861
- function instanceOfCountAudienceUsersResponse(value) {
17862
- if (!("data" in value) || value["data"] === void 0)
18078
+ // src/api/models/FeatureDetailResponseData.ts
18079
+ function instanceOfFeatureDetailResponseData(value) {
18080
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
17863
18081
  return false;
17864
- if (!("params" in value) || value["params"] === void 0)
18082
+ if (!("description" in value) || value["description"] === void 0)
18083
+ return false;
18084
+ if (!("featureType" in value) || value["featureType"] === void 0)
18085
+ return false;
18086
+ if (!("flags" in value) || value["flags"] === void 0)
18087
+ return false;
18088
+ if (!("id" in value) || value["id"] === void 0)
18089
+ return false;
18090
+ if (!("name" in value) || value["name"] === void 0)
18091
+ return false;
18092
+ if (!("plans" in value) || value["plans"] === void 0)
18093
+ return false;
18094
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
17865
18095
  return false;
17866
18096
  return true;
17867
18097
  }
17868
- function CountAudienceUsersResponseFromJSON(json) {
17869
- return CountAudienceUsersResponseFromJSONTyped(json, false);
18098
+ function FeatureDetailResponseDataFromJSON(json) {
18099
+ return FeatureDetailResponseDataFromJSONTyped(json, false);
17870
18100
  }
17871
- function CountAudienceUsersResponseFromJSONTyped(json, ignoreDiscriminator) {
18101
+ function FeatureDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
17872
18102
  if (json == null) {
17873
18103
  return json;
17874
18104
  }
17875
18105
  return {
17876
- data: CountResponseFromJSON(json["data"]),
17877
- params: json["params"]
18106
+ createdAt: new Date(json["created_at"]),
18107
+ description: json["description"],
18108
+ eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
18109
+ eventSummary: json["event_summary"] == null ? void 0 : EventSummaryResponseDataFromJSON(json["event_summary"]),
18110
+ featureType: json["feature_type"],
18111
+ flags: json["flags"].map(FlagDetailResponseDataFromJSON),
18112
+ id: json["id"],
18113
+ lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
18114
+ name: json["name"],
18115
+ plans: json["plans"].map(PreviewObjectFromJSON),
18116
+ trait: json["trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["trait"]),
18117
+ traitId: json["trait_id"] == null ? void 0 : json["trait_id"],
18118
+ updatedAt: new Date(json["updated_at"])
17878
18119
  };
17879
18120
  }
17880
- function CountAudienceUsersResponseToJSON(value) {
18121
+ function FeatureDetailResponseDataToJSON(value) {
17881
18122
  if (value == null) {
17882
18123
  return value;
17883
18124
  }
17884
18125
  return {
17885
- data: CountResponseToJSON(value["data"]),
17886
- params: value["params"]
18126
+ created_at: value["createdAt"].toISOString(),
18127
+ description: value["description"],
18128
+ event_subtype: value["eventSubtype"],
18129
+ event_summary: EventSummaryResponseDataToJSON(value["eventSummary"]),
18130
+ feature_type: value["featureType"],
18131
+ flags: value["flags"].map(FlagDetailResponseDataToJSON),
18132
+ id: value["id"],
18133
+ lifecycle_phase: value["lifecyclePhase"],
18134
+ name: value["name"],
18135
+ plans: value["plans"].map(PreviewObjectToJSON),
18136
+ trait: EntityTraitDefinitionResponseDataToJSON(value["trait"]),
18137
+ trait_id: value["traitId"],
18138
+ updated_at: value["updatedAt"].toISOString()
17887
18139
  };
17888
18140
  }
17889
18141
 
17890
- // src/api/models/CountCompaniesParams.ts
17891
- function instanceOfCountCompaniesParams(value) {
18142
+ // src/api/models/PlanResponseData.ts
18143
+ function instanceOfPlanResponseData(value) {
18144
+ if (!("audienceType" in value) || value["audienceType"] === void 0)
18145
+ return false;
18146
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
18147
+ return false;
18148
+ if (!("description" in value) || value["description"] === void 0)
18149
+ return false;
18150
+ if (!("id" in value) || value["id"] === void 0)
18151
+ return false;
18152
+ if (!("name" in value) || value["name"] === void 0)
18153
+ return false;
18154
+ if (!("planType" in value) || value["planType"] === void 0)
18155
+ return false;
18156
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
18157
+ return false;
17892
18158
  return true;
17893
18159
  }
17894
- function CountCompaniesParamsFromJSON(json) {
17895
- return CountCompaniesParamsFromJSONTyped(json, false);
18160
+ function PlanResponseDataFromJSON(json) {
18161
+ return PlanResponseDataFromJSONTyped(json, false);
17896
18162
  }
17897
- function CountCompaniesParamsFromJSONTyped(json, ignoreDiscriminator) {
18163
+ function PlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
17898
18164
  if (json == null) {
17899
18165
  return json;
17900
18166
  }
17901
18167
  return {
17902
- ids: json["ids"] == null ? void 0 : json["ids"],
17903
- limit: json["limit"] == null ? void 0 : json["limit"],
17904
- offset: json["offset"] == null ? void 0 : json["offset"],
17905
- planId: json["plan_id"] == null ? void 0 : json["plan_id"],
17906
- q: json["q"] == null ? void 0 : json["q"],
17907
- withoutFeatureOverrideFor: json["without_feature_override_for"] == null ? void 0 : json["without_feature_override_for"]
18168
+ audienceType: json["audience_type"],
18169
+ createdAt: new Date(json["created_at"]),
18170
+ description: json["description"],
18171
+ id: json["id"],
18172
+ name: json["name"],
18173
+ planType: json["plan_type"],
18174
+ updatedAt: new Date(json["updated_at"])
17908
18175
  };
17909
18176
  }
17910
- function CountCompaniesParamsToJSON(value) {
18177
+ function PlanResponseDataToJSON(value) {
17911
18178
  if (value == null) {
17912
18179
  return value;
17913
18180
  }
17914
18181
  return {
17915
- ids: value["ids"],
17916
- limit: value["limit"],
17917
- offset: value["offset"],
17918
- plan_id: value["planId"],
17919
- q: value["q"],
17920
- without_feature_override_for: value["withoutFeatureOverrideFor"]
18182
+ audience_type: value["audienceType"],
18183
+ created_at: value["createdAt"].toISOString(),
18184
+ description: value["description"],
18185
+ id: value["id"],
18186
+ name: value["name"],
18187
+ plan_type: value["planType"],
18188
+ updated_at: value["updatedAt"].toISOString()
17921
18189
  };
17922
18190
  }
17923
18191
 
17924
- // src/api/models/CountCompaniesResponse.ts
17925
- function instanceOfCountCompaniesResponse(value) {
17926
- if (!("data" in value) || value["data"] === void 0)
18192
+ // src/api/models/FeatureUsageResponseData.ts
18193
+ var FeatureUsageResponseDataAllocationTypeEnum = {
18194
+ Boolean: "boolean",
18195
+ Numeric: "numeric",
18196
+ Trait: "trait",
18197
+ Unlimited: "unlimited"
18198
+ };
18199
+ function instanceOfFeatureUsageResponseData(value) {
18200
+ if (!("access" in value) || value["access"] === void 0)
17927
18201
  return false;
17928
- if (!("params" in value) || value["params"] === void 0)
18202
+ if (!("allocationType" in value) || value["allocationType"] === void 0)
17929
18203
  return false;
17930
- return true;
17931
- }
17932
- function CountCompaniesResponseFromJSON(json) {
17933
- return CountCompaniesResponseFromJSONTyped(json, false);
18204
+ if (!("entitlementId" in value) || value["entitlementId"] === void 0)
18205
+ return false;
18206
+ if (!("entitlementType" in value) || value["entitlementType"] === void 0)
18207
+ return false;
18208
+ return true;
17934
18209
  }
17935
- function CountCompaniesResponseFromJSONTyped(json, ignoreDiscriminator) {
18210
+ function FeatureUsageResponseDataFromJSON(json) {
18211
+ return FeatureUsageResponseDataFromJSONTyped(json, false);
18212
+ }
18213
+ function FeatureUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
17936
18214
  if (json == null) {
17937
18215
  return json;
17938
18216
  }
17939
18217
  return {
17940
- data: CountResponseFromJSON(json["data"]),
17941
- params: CountCompaniesParamsFromJSON(json["params"])
18218
+ access: json["access"],
18219
+ allocation: json["allocation"] == null ? void 0 : json["allocation"],
18220
+ allocationType: json["allocation_type"],
18221
+ entitlementId: json["entitlement_id"],
18222
+ entitlementType: json["entitlement_type"],
18223
+ feature: json["feature"] == null ? void 0 : FeatureDetailResponseDataFromJSON(json["feature"]),
18224
+ period: json["period"] == null ? void 0 : json["period"],
18225
+ plan: json["plan"] == null ? void 0 : PlanResponseDataFromJSON(json["plan"]),
18226
+ usage: json["usage"] == null ? void 0 : json["usage"]
17942
18227
  };
17943
18228
  }
17944
- function CountCompaniesResponseToJSON(value) {
18229
+ function FeatureUsageResponseDataToJSON(value) {
17945
18230
  if (value == null) {
17946
18231
  return value;
17947
18232
  }
17948
18233
  return {
17949
- data: CountResponseToJSON(value["data"]),
17950
- params: CountCompaniesParamsToJSON(value["params"])
18234
+ access: value["access"],
18235
+ allocation: value["allocation"],
18236
+ allocation_type: value["allocationType"],
18237
+ entitlement_id: value["entitlementId"],
18238
+ entitlement_type: value["entitlementType"],
18239
+ feature: FeatureDetailResponseDataToJSON(value["feature"]),
18240
+ period: value["period"],
18241
+ plan: PlanResponseDataToJSON(value["plan"]),
18242
+ usage: value["usage"]
17951
18243
  };
17952
18244
  }
17953
18245
 
17954
- // src/api/models/CountCompanyOverridesParams.ts
17955
- function instanceOfCountCompanyOverridesParams(value) {
18246
+ // src/api/models/FeatureUsageDetailResponseData.ts
18247
+ function instanceOfFeatureUsageDetailResponseData(value) {
18248
+ if (!("features" in value) || value["features"] === void 0)
18249
+ return false;
17956
18250
  return true;
17957
18251
  }
17958
- function CountCompanyOverridesParamsFromJSON(json) {
17959
- return CountCompanyOverridesParamsFromJSONTyped(json, false);
18252
+ function FeatureUsageDetailResponseDataFromJSON(json) {
18253
+ return FeatureUsageDetailResponseDataFromJSONTyped(json, false);
17960
18254
  }
17961
- function CountCompanyOverridesParamsFromJSONTyped(json, ignoreDiscriminator) {
18255
+ function FeatureUsageDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
17962
18256
  if (json == null) {
17963
18257
  return json;
17964
18258
  }
17965
18259
  return {
17966
- companyId: json["company_id"] == null ? void 0 : json["company_id"],
17967
- companyIds: json["company_ids"] == null ? void 0 : json["company_ids"],
17968
- featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
17969
- featureIds: json["feature_ids"] == null ? void 0 : json["feature_ids"],
17970
- ids: json["ids"] == null ? void 0 : json["ids"],
17971
- limit: json["limit"] == null ? void 0 : json["limit"],
17972
- offset: json["offset"] == null ? void 0 : json["offset"],
17973
- q: json["q"] == null ? void 0 : json["q"]
18260
+ features: json["features"].map(
18261
+ FeatureUsageResponseDataFromJSON
18262
+ )
17974
18263
  };
17975
18264
  }
17976
- function CountCompanyOverridesParamsToJSON(value) {
18265
+ function FeatureUsageDetailResponseDataToJSON(value) {
17977
18266
  if (value == null) {
17978
18267
  return value;
17979
18268
  }
17980
18269
  return {
17981
- company_id: value["companyId"],
17982
- company_ids: value["companyIds"],
17983
- feature_id: value["featureId"],
17984
- feature_ids: value["featureIds"],
17985
- ids: value["ids"],
17986
- limit: value["limit"],
17987
- offset: value["offset"],
17988
- q: value["q"]
18270
+ features: value["features"].map(
18271
+ FeatureUsageResponseDataToJSON
18272
+ )
17989
18273
  };
17990
18274
  }
17991
18275
 
17992
- // src/api/models/CountCompanyOverridesResponse.ts
17993
- function instanceOfCountCompanyOverridesResponse(value) {
17994
- if (!("data" in value) || value["data"] === void 0)
17995
- return false;
17996
- if (!("params" in value) || value["params"] === void 0)
17997
- return false;
18276
+ // src/api/models/ComponentHydrateResponseData.ts
18277
+ function instanceOfComponentHydrateResponseData(value) {
17998
18278
  return true;
17999
18279
  }
18000
- function CountCompanyOverridesResponseFromJSON(json) {
18001
- return CountCompanyOverridesResponseFromJSONTyped(json, false);
18280
+ function ComponentHydrateResponseDataFromJSON(json) {
18281
+ return ComponentHydrateResponseDataFromJSONTyped(json, false);
18002
18282
  }
18003
- function CountCompanyOverridesResponseFromJSONTyped(json, ignoreDiscriminator) {
18283
+ function ComponentHydrateResponseDataFromJSONTyped(json, ignoreDiscriminator) {
18004
18284
  if (json == null) {
18005
18285
  return json;
18006
18286
  }
18007
18287
  return {
18008
- data: CountResponseFromJSON(json["data"]),
18009
- params: CountCompanyOverridesParamsFromJSON(json["params"])
18288
+ company: json["company"] == null ? void 0 : CompanyDetailResponseDataFromJSON(json["company"]),
18289
+ component: json["component"] == null ? void 0 : ComponentResponseDataFromJSON(json["component"]),
18290
+ featureUsage: json["feature_usage"] == null ? void 0 : FeatureUsageDetailResponseDataFromJSON(json["feature_usage"])
18010
18291
  };
18011
18292
  }
18012
- function CountCompanyOverridesResponseToJSON(value) {
18293
+ function ComponentHydrateResponseDataToJSON(value) {
18013
18294
  if (value == null) {
18014
18295
  return value;
18015
18296
  }
18016
18297
  return {
18017
- data: CountResponseToJSON(value["data"]),
18018
- params: CountCompanyOverridesParamsToJSON(value["params"])
18298
+ company: CompanyDetailResponseDataToJSON(value["company"]),
18299
+ component: ComponentResponseDataToJSON(value["component"]),
18300
+ feature_usage: FeatureUsageDetailResponseDataToJSON(value["featureUsage"])
18019
18301
  };
18020
18302
  }
18021
18303
 
18022
- // src/api/models/CountComponentsParams.ts
18023
- function instanceOfCountComponentsParams(value) {
18304
+ // src/api/models/CountApiKeysParams.ts
18305
+ function instanceOfCountApiKeysParams(value) {
18024
18306
  return true;
18025
18307
  }
18026
- function CountComponentsParamsFromJSON(json) {
18027
- return CountComponentsParamsFromJSONTyped(json, false);
18308
+ function CountApiKeysParamsFromJSON(json) {
18309
+ return CountApiKeysParamsFromJSONTyped(json, false);
18028
18310
  }
18029
- function CountComponentsParamsFromJSONTyped(json, ignoreDiscriminator) {
18311
+ function CountApiKeysParamsFromJSONTyped(json, ignoreDiscriminator) {
18030
18312
  if (json == null) {
18031
18313
  return json;
18032
18314
  }
18033
18315
  return {
18316
+ environmentId: json["environment_id"] == null ? void 0 : json["environment_id"],
18034
18317
  limit: json["limit"] == null ? void 0 : json["limit"],
18035
18318
  offset: json["offset"] == null ? void 0 : json["offset"],
18036
- q: json["q"] == null ? void 0 : json["q"]
18319
+ requireEnvironment: json["require_environment"] == null ? void 0 : json["require_environment"]
18037
18320
  };
18038
18321
  }
18039
- function CountComponentsParamsToJSON(value) {
18322
+ function CountApiKeysParamsToJSON(value) {
18040
18323
  if (value == null) {
18041
18324
  return value;
18042
18325
  }
18043
18326
  return {
18327
+ environment_id: value["environmentId"],
18044
18328
  limit: value["limit"],
18045
18329
  offset: value["offset"],
18046
- q: value["q"]
18330
+ require_environment: value["requireEnvironment"]
18047
18331
  };
18048
18332
  }
18049
18333
 
18050
- // src/api/models/CountComponentsResponse.ts
18051
- function instanceOfCountComponentsResponse(value) {
18334
+ // src/api/models/CountResponse.ts
18335
+ function instanceOfCountResponse(value) {
18336
+ if (!("count" in value) || value["count"] === void 0)
18337
+ return false;
18338
+ return true;
18339
+ }
18340
+ function CountResponseFromJSON(json) {
18341
+ return CountResponseFromJSONTyped(json, false);
18342
+ }
18343
+ function CountResponseFromJSONTyped(json, ignoreDiscriminator) {
18344
+ if (json == null) {
18345
+ return json;
18346
+ }
18347
+ return {
18348
+ count: json["count"]
18349
+ };
18350
+ }
18351
+ function CountResponseToJSON(value) {
18352
+ if (value == null) {
18353
+ return value;
18354
+ }
18355
+ return {
18356
+ count: value["count"]
18357
+ };
18358
+ }
18359
+
18360
+ // src/api/models/CountApiKeysResponse.ts
18361
+ function instanceOfCountApiKeysResponse(value) {
18052
18362
  if (!("data" in value) || value["data"] === void 0)
18053
18363
  return false;
18054
18364
  if (!("params" in value) || value["params"] === void 0)
18055
18365
  return false;
18056
18366
  return true;
18057
18367
  }
18058
- function CountComponentsResponseFromJSON(json) {
18059
- return CountComponentsResponseFromJSONTyped(json, false);
18368
+ function CountApiKeysResponseFromJSON(json) {
18369
+ return CountApiKeysResponseFromJSONTyped(json, false);
18060
18370
  }
18061
- function CountComponentsResponseFromJSONTyped(json, ignoreDiscriminator) {
18371
+ function CountApiKeysResponseFromJSONTyped(json, ignoreDiscriminator) {
18062
18372
  if (json == null) {
18063
18373
  return json;
18064
18374
  }
18065
18375
  return {
18066
18376
  data: CountResponseFromJSON(json["data"]),
18067
- params: CountComponentsParamsFromJSON(json["params"])
18377
+ params: CountApiKeysParamsFromJSON(json["params"])
18068
18378
  };
18069
18379
  }
18070
- function CountComponentsResponseToJSON(value) {
18380
+ function CountApiKeysResponseToJSON(value) {
18071
18381
  if (value == null) {
18072
18382
  return value;
18073
18383
  }
18074
18384
  return {
18075
18385
  data: CountResponseToJSON(value["data"]),
18076
- params: CountComponentsParamsToJSON(value["params"])
18386
+ params: CountApiKeysParamsToJSON(value["params"])
18077
18387
  };
18078
18388
  }
18079
18389
 
18080
- // src/api/models/CountEntityKeyDefinitionsParams.ts
18081
- var CountEntityKeyDefinitionsParamsEntityTypeEnum = {
18082
- Company: "company",
18083
- User: "user"
18084
- };
18085
- function instanceOfCountEntityKeyDefinitionsParams(value) {
18390
+ // src/api/models/CountApiRequestsParams.ts
18391
+ function instanceOfCountApiRequestsParams(value) {
18086
18392
  return true;
18087
18393
  }
18088
- function CountEntityKeyDefinitionsParamsFromJSON(json) {
18089
- return CountEntityKeyDefinitionsParamsFromJSONTyped(json, false);
18394
+ function CountApiRequestsParamsFromJSON(json) {
18395
+ return CountApiRequestsParamsFromJSONTyped(json, false);
18090
18396
  }
18091
- function CountEntityKeyDefinitionsParamsFromJSONTyped(json, ignoreDiscriminator) {
18397
+ function CountApiRequestsParamsFromJSONTyped(json, ignoreDiscriminator) {
18092
18398
  if (json == null) {
18093
18399
  return json;
18094
18400
  }
18095
18401
  return {
18096
- entityType: json["entity_type"] == null ? void 0 : json["entity_type"],
18097
- ids: json["ids"] == null ? void 0 : json["ids"],
18402
+ environmentId: json["environment_id"] == null ? void 0 : json["environment_id"],
18098
18403
  limit: json["limit"] == null ? void 0 : json["limit"],
18099
18404
  offset: json["offset"] == null ? void 0 : json["offset"],
18100
- q: json["q"] == null ? void 0 : json["q"]
18405
+ q: json["q"] == null ? void 0 : json["q"],
18406
+ requestType: json["request_type"] == null ? void 0 : json["request_type"]
18101
18407
  };
18102
18408
  }
18103
- function CountEntityKeyDefinitionsParamsToJSON(value) {
18409
+ function CountApiRequestsParamsToJSON(value) {
18104
18410
  if (value == null) {
18105
18411
  return value;
18106
18412
  }
18107
18413
  return {
18108
- entity_type: value["entityType"],
18109
- ids: value["ids"],
18414
+ environment_id: value["environmentId"],
18110
18415
  limit: value["limit"],
18111
18416
  offset: value["offset"],
18112
- q: value["q"]
18417
+ q: value["q"],
18418
+ request_type: value["requestType"]
18113
18419
  };
18114
18420
  }
18115
18421
 
18116
- // src/api/models/CountEntityKeyDefinitionsResponse.ts
18117
- function instanceOfCountEntityKeyDefinitionsResponse(value) {
18422
+ // src/api/models/CountApiRequestsResponse.ts
18423
+ function instanceOfCountApiRequestsResponse(value) {
18118
18424
  if (!("data" in value) || value["data"] === void 0)
18119
18425
  return false;
18120
18426
  if (!("params" in value) || value["params"] === void 0)
18121
18427
  return false;
18122
18428
  return true;
18123
18429
  }
18124
- function CountEntityKeyDefinitionsResponseFromJSON(json) {
18125
- return CountEntityKeyDefinitionsResponseFromJSONTyped(json, false);
18430
+ function CountApiRequestsResponseFromJSON(json) {
18431
+ return CountApiRequestsResponseFromJSONTyped(json, false);
18126
18432
  }
18127
- function CountEntityKeyDefinitionsResponseFromJSONTyped(json, ignoreDiscriminator) {
18433
+ function CountApiRequestsResponseFromJSONTyped(json, ignoreDiscriminator) {
18128
18434
  if (json == null) {
18129
18435
  return json;
18130
18436
  }
18131
18437
  return {
18132
18438
  data: CountResponseFromJSON(json["data"]),
18133
- params: CountEntityKeyDefinitionsParamsFromJSON(json["params"])
18439
+ params: CountApiRequestsParamsFromJSON(json["params"])
18134
18440
  };
18135
18441
  }
18136
- function CountEntityKeyDefinitionsResponseToJSON(value) {
18442
+ function CountApiRequestsResponseToJSON(value) {
18137
18443
  if (value == null) {
18138
18444
  return value;
18139
18445
  }
18140
18446
  return {
18141
18447
  data: CountResponseToJSON(value["data"]),
18142
- params: CountEntityKeyDefinitionsParamsToJSON(value["params"])
18448
+ params: CountApiRequestsParamsToJSON(value["params"])
18143
18449
  };
18144
18450
  }
18145
18451
 
18146
- // src/api/models/CountEntityTraitDefinitionsParams.ts
18147
- var CountEntityTraitDefinitionsParamsEntityTypeEnum = {
18148
- Company: "company",
18149
- User: "user"
18150
- };
18151
- var CountEntityTraitDefinitionsParamsTraitTypeEnum = {
18152
- Boolean: "boolean",
18153
- Currency: "currency",
18154
- Date: "date",
18155
- Number: "number",
18156
- String: "string",
18157
- Url: "url"
18158
- };
18159
- function instanceOfCountEntityTraitDefinitionsParams(value) {
18452
+ // src/api/models/CountAudienceCompaniesResponse.ts
18453
+ function instanceOfCountAudienceCompaniesResponse(value) {
18454
+ if (!("data" in value) || value["data"] === void 0)
18455
+ return false;
18456
+ if (!("params" in value) || value["params"] === void 0)
18457
+ return false;
18160
18458
  return true;
18161
18459
  }
18162
- function CountEntityTraitDefinitionsParamsFromJSON(json) {
18163
- return CountEntityTraitDefinitionsParamsFromJSONTyped(json, false);
18460
+ function CountAudienceCompaniesResponseFromJSON(json) {
18461
+ return CountAudienceCompaniesResponseFromJSONTyped(json, false);
18164
18462
  }
18165
- function CountEntityTraitDefinitionsParamsFromJSONTyped(json, ignoreDiscriminator) {
18463
+ function CountAudienceCompaniesResponseFromJSONTyped(json, ignoreDiscriminator) {
18166
18464
  if (json == null) {
18167
18465
  return json;
18168
18466
  }
18169
18467
  return {
18170
- entityType: json["entity_type"] == null ? void 0 : json["entity_type"],
18171
- ids: json["ids"] == null ? void 0 : json["ids"],
18172
- limit: json["limit"] == null ? void 0 : json["limit"],
18173
- offset: json["offset"] == null ? void 0 : json["offset"],
18174
- q: json["q"] == null ? void 0 : json["q"],
18175
- traitType: json["trait_type"] == null ? void 0 : json["trait_type"]
18468
+ data: CountResponseFromJSON(json["data"]),
18469
+ params: json["params"]
18176
18470
  };
18177
18471
  }
18178
- function CountEntityTraitDefinitionsParamsToJSON(value) {
18472
+ function CountAudienceCompaniesResponseToJSON(value) {
18179
18473
  if (value == null) {
18180
18474
  return value;
18181
18475
  }
18182
18476
  return {
18183
- entity_type: value["entityType"],
18184
- ids: value["ids"],
18185
- limit: value["limit"],
18186
- offset: value["offset"],
18187
- q: value["q"],
18188
- trait_type: value["traitType"]
18477
+ data: CountResponseToJSON(value["data"]),
18478
+ params: value["params"]
18189
18479
  };
18190
18480
  }
18191
18481
 
18192
- // src/api/models/CountEntityTraitDefinitionsResponse.ts
18193
- function instanceOfCountEntityTraitDefinitionsResponse(value) {
18482
+ // src/api/models/CountAudienceUsersResponse.ts
18483
+ function instanceOfCountAudienceUsersResponse(value) {
18194
18484
  if (!("data" in value) || value["data"] === void 0)
18195
18485
  return false;
18196
18486
  if (!("params" in value) || value["params"] === void 0)
18197
18487
  return false;
18198
18488
  return true;
18199
18489
  }
18200
- function CountEntityTraitDefinitionsResponseFromJSON(json) {
18201
- return CountEntityTraitDefinitionsResponseFromJSONTyped(json, false);
18490
+ function CountAudienceUsersResponseFromJSON(json) {
18491
+ return CountAudienceUsersResponseFromJSONTyped(json, false);
18202
18492
  }
18203
- function CountEntityTraitDefinitionsResponseFromJSONTyped(json, ignoreDiscriminator) {
18493
+ function CountAudienceUsersResponseFromJSONTyped(json, ignoreDiscriminator) {
18204
18494
  if (json == null) {
18205
18495
  return json;
18206
18496
  }
18207
18497
  return {
18208
18498
  data: CountResponseFromJSON(json["data"]),
18209
- params: CountEntityTraitDefinitionsParamsFromJSON(json["params"])
18499
+ params: json["params"]
18210
18500
  };
18211
18501
  }
18212
- function CountEntityTraitDefinitionsResponseToJSON(value) {
18502
+ function CountAudienceUsersResponseToJSON(value) {
18213
18503
  if (value == null) {
18214
18504
  return value;
18215
18505
  }
18216
18506
  return {
18217
18507
  data: CountResponseToJSON(value["data"]),
18218
- params: CountEntityTraitDefinitionsParamsToJSON(value["params"])
18508
+ params: value["params"]
18219
18509
  };
18220
18510
  }
18221
18511
 
18222
- // src/api/models/CountFeatureCompaniesParams.ts
18223
- function instanceOfCountFeatureCompaniesParams(value) {
18512
+ // src/api/models/CountCompaniesParams.ts
18513
+ function instanceOfCountCompaniesParams(value) {
18224
18514
  return true;
18225
18515
  }
18226
- function CountFeatureCompaniesParamsFromJSON(json) {
18227
- return CountFeatureCompaniesParamsFromJSONTyped(json, false);
18516
+ function CountCompaniesParamsFromJSON(json) {
18517
+ return CountCompaniesParamsFromJSONTyped(json, false);
18228
18518
  }
18229
- function CountFeatureCompaniesParamsFromJSONTyped(json, ignoreDiscriminator) {
18519
+ function CountCompaniesParamsFromJSONTyped(json, ignoreDiscriminator) {
18230
18520
  if (json == null) {
18231
18521
  return json;
18232
18522
  }
18233
18523
  return {
18234
- featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
18524
+ ids: json["ids"] == null ? void 0 : json["ids"],
18235
18525
  limit: json["limit"] == null ? void 0 : json["limit"],
18236
18526
  offset: json["offset"] == null ? void 0 : json["offset"],
18237
- q: json["q"] == null ? void 0 : json["q"]
18527
+ planId: json["plan_id"] == null ? void 0 : json["plan_id"],
18528
+ q: json["q"] == null ? void 0 : json["q"],
18529
+ withoutFeatureOverrideFor: json["without_feature_override_for"] == null ? void 0 : json["without_feature_override_for"]
18238
18530
  };
18239
18531
  }
18240
- function CountFeatureCompaniesParamsToJSON(value) {
18532
+ function CountCompaniesParamsToJSON(value) {
18241
18533
  if (value == null) {
18242
18534
  return value;
18243
18535
  }
18244
18536
  return {
18245
- feature_id: value["featureId"],
18537
+ ids: value["ids"],
18246
18538
  limit: value["limit"],
18247
18539
  offset: value["offset"],
18248
- q: value["q"]
18540
+ plan_id: value["planId"],
18541
+ q: value["q"],
18542
+ without_feature_override_for: value["withoutFeatureOverrideFor"]
18249
18543
  };
18250
18544
  }
18251
18545
 
18252
- // src/api/models/CountFeatureCompaniesResponse.ts
18253
- function instanceOfCountFeatureCompaniesResponse(value) {
18546
+ // src/api/models/CountCompaniesResponse.ts
18547
+ function instanceOfCountCompaniesResponse(value) {
18254
18548
  if (!("data" in value) || value["data"] === void 0)
18255
18549
  return false;
18256
18550
  if (!("params" in value) || value["params"] === void 0)
18257
18551
  return false;
18258
18552
  return true;
18259
18553
  }
18260
- function CountFeatureCompaniesResponseFromJSON(json) {
18261
- return CountFeatureCompaniesResponseFromJSONTyped(json, false);
18554
+ function CountCompaniesResponseFromJSON(json) {
18555
+ return CountCompaniesResponseFromJSONTyped(json, false);
18262
18556
  }
18263
- function CountFeatureCompaniesResponseFromJSONTyped(json, ignoreDiscriminator) {
18557
+ function CountCompaniesResponseFromJSONTyped(json, ignoreDiscriminator) {
18264
18558
  if (json == null) {
18265
18559
  return json;
18266
18560
  }
18267
18561
  return {
18268
18562
  data: CountResponseFromJSON(json["data"]),
18269
- params: CountFeatureCompaniesParamsFromJSON(json["params"])
18563
+ params: CountCompaniesParamsFromJSON(json["params"])
18270
18564
  };
18271
18565
  }
18272
- function CountFeatureCompaniesResponseToJSON(value) {
18566
+ function CountCompaniesResponseToJSON(value) {
18273
18567
  if (value == null) {
18274
18568
  return value;
18275
18569
  }
18276
18570
  return {
18277
18571
  data: CountResponseToJSON(value["data"]),
18278
- params: CountFeatureCompaniesParamsToJSON(value["params"])
18572
+ params: CountCompaniesParamsToJSON(value["params"])
18279
18573
  };
18280
18574
  }
18281
18575
 
18282
- // src/api/models/CountFeatureUsageParams.ts
18283
- function instanceOfCountFeatureUsageParams(value) {
18576
+ // src/api/models/CountCompanyOverridesParams.ts
18577
+ function instanceOfCountCompanyOverridesParams(value) {
18284
18578
  return true;
18285
18579
  }
18286
- function CountFeatureUsageParamsFromJSON(json) {
18287
- return CountFeatureUsageParamsFromJSONTyped(json, false);
18580
+ function CountCompanyOverridesParamsFromJSON(json) {
18581
+ return CountCompanyOverridesParamsFromJSONTyped(json, false);
18288
18582
  }
18289
- function CountFeatureUsageParamsFromJSONTyped(json, ignoreDiscriminator) {
18583
+ function CountCompanyOverridesParamsFromJSONTyped(json, ignoreDiscriminator) {
18290
18584
  if (json == null) {
18291
18585
  return json;
18292
18586
  }
18293
18587
  return {
18294
18588
  companyId: json["company_id"] == null ? void 0 : json["company_id"],
18295
- companyKeys: json["company_keys"] == null ? void 0 : json["company_keys"],
18589
+ companyIds: json["company_ids"] == null ? void 0 : json["company_ids"],
18590
+ featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
18296
18591
  featureIds: json["feature_ids"] == null ? void 0 : json["feature_ids"],
18592
+ ids: json["ids"] == null ? void 0 : json["ids"],
18297
18593
  limit: json["limit"] == null ? void 0 : json["limit"],
18298
18594
  offset: json["offset"] == null ? void 0 : json["offset"],
18299
18595
  q: json["q"] == null ? void 0 : json["q"]
18300
18596
  };
18301
18597
  }
18302
- function CountFeatureUsageParamsToJSON(value) {
18598
+ function CountCompanyOverridesParamsToJSON(value) {
18303
18599
  if (value == null) {
18304
18600
  return value;
18305
18601
  }
18306
18602
  return {
18307
18603
  company_id: value["companyId"],
18308
- company_keys: value["companyKeys"],
18604
+ company_ids: value["companyIds"],
18605
+ feature_id: value["featureId"],
18309
18606
  feature_ids: value["featureIds"],
18607
+ ids: value["ids"],
18310
18608
  limit: value["limit"],
18311
18609
  offset: value["offset"],
18312
18610
  q: value["q"]
18313
18611
  };
18314
18612
  }
18315
18613
 
18316
- // src/api/models/CountFeatureUsageResponse.ts
18317
- function instanceOfCountFeatureUsageResponse(value) {
18614
+ // src/api/models/CountCompanyOverridesResponse.ts
18615
+ function instanceOfCountCompanyOverridesResponse(value) {
18318
18616
  if (!("data" in value) || value["data"] === void 0)
18319
18617
  return false;
18320
18618
  if (!("params" in value) || value["params"] === void 0)
18321
18619
  return false;
18322
18620
  return true;
18323
18621
  }
18324
- function CountFeatureUsageResponseFromJSON(json) {
18325
- return CountFeatureUsageResponseFromJSONTyped(json, false);
18622
+ function CountCompanyOverridesResponseFromJSON(json) {
18623
+ return CountCompanyOverridesResponseFromJSONTyped(json, false);
18326
18624
  }
18327
- function CountFeatureUsageResponseFromJSONTyped(json, ignoreDiscriminator) {
18625
+ function CountCompanyOverridesResponseFromJSONTyped(json, ignoreDiscriminator) {
18328
18626
  if (json == null) {
18329
18627
  return json;
18330
18628
  }
18331
18629
  return {
18332
18630
  data: CountResponseFromJSON(json["data"]),
18333
- params: CountFeatureUsageParamsFromJSON(json["params"])
18631
+ params: CountCompanyOverridesParamsFromJSON(json["params"])
18334
18632
  };
18335
18633
  }
18336
- function CountFeatureUsageResponseToJSON(value) {
18634
+ function CountCompanyOverridesResponseToJSON(value) {
18337
18635
  if (value == null) {
18338
18636
  return value;
18339
18637
  }
18340
18638
  return {
18341
18639
  data: CountResponseToJSON(value["data"]),
18342
- params: CountFeatureUsageParamsToJSON(value["params"])
18640
+ params: CountCompanyOverridesParamsToJSON(value["params"])
18343
18641
  };
18344
18642
  }
18345
18643
 
18346
- // src/api/models/CountFeatureUsersParams.ts
18347
- function instanceOfCountFeatureUsersParams(value) {
18644
+ // src/api/models/CountComponentsParams.ts
18645
+ function instanceOfCountComponentsParams(value) {
18348
18646
  return true;
18349
18647
  }
18350
- function CountFeatureUsersParamsFromJSON(json) {
18351
- return CountFeatureUsersParamsFromJSONTyped(json, false);
18648
+ function CountComponentsParamsFromJSON(json) {
18649
+ return CountComponentsParamsFromJSONTyped(json, false);
18352
18650
  }
18353
- function CountFeatureUsersParamsFromJSONTyped(json, ignoreDiscriminator) {
18651
+ function CountComponentsParamsFromJSONTyped(json, ignoreDiscriminator) {
18354
18652
  if (json == null) {
18355
18653
  return json;
18356
18654
  }
18357
18655
  return {
18358
- featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
18359
18656
  limit: json["limit"] == null ? void 0 : json["limit"],
18360
18657
  offset: json["offset"] == null ? void 0 : json["offset"],
18361
18658
  q: json["q"] == null ? void 0 : json["q"]
18362
18659
  };
18363
18660
  }
18364
- function CountFeatureUsersParamsToJSON(value) {
18661
+ function CountComponentsParamsToJSON(value) {
18365
18662
  if (value == null) {
18366
18663
  return value;
18367
18664
  }
18368
18665
  return {
18369
- feature_id: value["featureId"],
18370
18666
  limit: value["limit"],
18371
18667
  offset: value["offset"],
18372
18668
  q: value["q"]
18373
18669
  };
18374
18670
  }
18375
18671
 
18376
- // src/api/models/CountFeatureUsersResponse.ts
18377
- function instanceOfCountFeatureUsersResponse(value) {
18672
+ // src/api/models/CountComponentsResponse.ts
18673
+ function instanceOfCountComponentsResponse(value) {
18378
18674
  if (!("data" in value) || value["data"] === void 0)
18379
18675
  return false;
18380
18676
  if (!("params" in value) || value["params"] === void 0)
18381
18677
  return false;
18382
18678
  return true;
18383
18679
  }
18384
- function CountFeatureUsersResponseFromJSON(json) {
18385
- return CountFeatureUsersResponseFromJSONTyped(json, false);
18680
+ function CountComponentsResponseFromJSON(json) {
18681
+ return CountComponentsResponseFromJSONTyped(json, false);
18386
18682
  }
18387
- function CountFeatureUsersResponseFromJSONTyped(json, ignoreDiscriminator) {
18683
+ function CountComponentsResponseFromJSONTyped(json, ignoreDiscriminator) {
18388
18684
  if (json == null) {
18389
18685
  return json;
18390
18686
  }
18391
18687
  return {
18392
18688
  data: CountResponseFromJSON(json["data"]),
18393
- params: CountFeatureUsersParamsFromJSON(json["params"])
18689
+ params: CountComponentsParamsFromJSON(json["params"])
18394
18690
  };
18395
18691
  }
18396
- function CountFeatureUsersResponseToJSON(value) {
18692
+ function CountComponentsResponseToJSON(value) {
18397
18693
  if (value == null) {
18398
18694
  return value;
18399
18695
  }
18400
18696
  return {
18401
18697
  data: CountResponseToJSON(value["data"]),
18402
- params: CountFeatureUsersParamsToJSON(value["params"])
18698
+ params: CountComponentsParamsToJSON(value["params"])
18403
18699
  };
18404
18700
  }
18405
18701
 
18406
- // src/api/models/CountFeaturesParams.ts
18407
- function instanceOfCountFeaturesParams(value) {
18702
+ // src/api/models/CountEntityKeyDefinitionsParams.ts
18703
+ var CountEntityKeyDefinitionsParamsEntityTypeEnum = {
18704
+ Company: "company",
18705
+ User: "user"
18706
+ };
18707
+ function instanceOfCountEntityKeyDefinitionsParams(value) {
18408
18708
  return true;
18409
18709
  }
18410
- function CountFeaturesParamsFromJSON(json) {
18411
- return CountFeaturesParamsFromJSONTyped(json, false);
18710
+ function CountEntityKeyDefinitionsParamsFromJSON(json) {
18711
+ return CountEntityKeyDefinitionsParamsFromJSONTyped(json, false);
18412
18712
  }
18413
- function CountFeaturesParamsFromJSONTyped(json, ignoreDiscriminator) {
18713
+ function CountEntityKeyDefinitionsParamsFromJSONTyped(json, ignoreDiscriminator) {
18414
18714
  if (json == null) {
18415
18715
  return json;
18416
18716
  }
18417
18717
  return {
18718
+ entityType: json["entity_type"] == null ? void 0 : json["entity_type"],
18418
18719
  ids: json["ids"] == null ? void 0 : json["ids"],
18419
18720
  limit: json["limit"] == null ? void 0 : json["limit"],
18420
18721
  offset: json["offset"] == null ? void 0 : json["offset"],
18421
- q: json["q"] == null ? void 0 : json["q"],
18422
- withoutCompanyOverrideFor: json["without_company_override_for"] == null ? void 0 : json["without_company_override_for"],
18423
- withoutPlanEntitlementFor: json["without_plan_entitlement_for"] == null ? void 0 : json["without_plan_entitlement_for"]
18722
+ q: json["q"] == null ? void 0 : json["q"]
18424
18723
  };
18425
18724
  }
18426
- function CountFeaturesParamsToJSON(value) {
18725
+ function CountEntityKeyDefinitionsParamsToJSON(value) {
18427
18726
  if (value == null) {
18428
18727
  return value;
18429
18728
  }
18430
18729
  return {
18730
+ entity_type: value["entityType"],
18431
18731
  ids: value["ids"],
18432
18732
  limit: value["limit"],
18433
18733
  offset: value["offset"],
18434
- q: value["q"],
18435
- without_company_override_for: value["withoutCompanyOverrideFor"],
18436
- without_plan_entitlement_for: value["withoutPlanEntitlementFor"]
18734
+ q: value["q"]
18437
18735
  };
18438
18736
  }
18439
18737
 
18440
- // src/api/models/CountFeaturesResponse.ts
18441
- function instanceOfCountFeaturesResponse(value) {
18738
+ // src/api/models/CountEntityKeyDefinitionsResponse.ts
18739
+ function instanceOfCountEntityKeyDefinitionsResponse(value) {
18442
18740
  if (!("data" in value) || value["data"] === void 0)
18443
18741
  return false;
18444
18742
  if (!("params" in value) || value["params"] === void 0)
18445
18743
  return false;
18446
18744
  return true;
18447
18745
  }
18448
- function CountFeaturesResponseFromJSON(json) {
18449
- return CountFeaturesResponseFromJSONTyped(json, false);
18746
+ function CountEntityKeyDefinitionsResponseFromJSON(json) {
18747
+ return CountEntityKeyDefinitionsResponseFromJSONTyped(json, false);
18450
18748
  }
18451
- function CountFeaturesResponseFromJSONTyped(json, ignoreDiscriminator) {
18749
+ function CountEntityKeyDefinitionsResponseFromJSONTyped(json, ignoreDiscriminator) {
18452
18750
  if (json == null) {
18453
18751
  return json;
18454
18752
  }
18455
18753
  return {
18456
18754
  data: CountResponseFromJSON(json["data"]),
18457
- params: CountFeaturesParamsFromJSON(json["params"])
18755
+ params: CountEntityKeyDefinitionsParamsFromJSON(json["params"])
18458
18756
  };
18459
18757
  }
18460
- function CountFeaturesResponseToJSON(value) {
18758
+ function CountEntityKeyDefinitionsResponseToJSON(value) {
18461
18759
  if (value == null) {
18462
18760
  return value;
18463
18761
  }
18464
18762
  return {
18465
18763
  data: CountResponseToJSON(value["data"]),
18466
- params: CountFeaturesParamsToJSON(value["params"])
18764
+ params: CountEntityKeyDefinitionsParamsToJSON(value["params"])
18467
18765
  };
18468
18766
  }
18469
18767
 
18470
- // src/api/models/CountFlagChecksParams.ts
18471
- function instanceOfCountFlagChecksParams(value) {
18768
+ // src/api/models/CountEntityTraitDefinitionsParams.ts
18769
+ var CountEntityTraitDefinitionsParamsEntityTypeEnum = {
18770
+ Company: "company",
18771
+ User: "user"
18772
+ };
18773
+ var CountEntityTraitDefinitionsParamsTraitTypeEnum = {
18774
+ Boolean: "boolean",
18775
+ Currency: "currency",
18776
+ Date: "date",
18777
+ Number: "number",
18778
+ String: "string",
18779
+ Url: "url"
18780
+ };
18781
+ function instanceOfCountEntityTraitDefinitionsParams(value) {
18472
18782
  return true;
18473
18783
  }
18474
- function CountFlagChecksParamsFromJSON(json) {
18475
- return CountFlagChecksParamsFromJSONTyped(json, false);
18784
+ function CountEntityTraitDefinitionsParamsFromJSON(json) {
18785
+ return CountEntityTraitDefinitionsParamsFromJSONTyped(json, false);
18476
18786
  }
18477
- function CountFlagChecksParamsFromJSONTyped(json, ignoreDiscriminator) {
18787
+ function CountEntityTraitDefinitionsParamsFromJSONTyped(json, ignoreDiscriminator) {
18478
18788
  if (json == null) {
18479
18789
  return json;
18480
18790
  }
18481
18791
  return {
18482
- flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
18483
- flagIds: json["flag_ids"] == null ? void 0 : json["flag_ids"],
18484
- id: json["id"] == null ? void 0 : json["id"],
18792
+ entityType: json["entity_type"] == null ? void 0 : json["entity_type"],
18793
+ ids: json["ids"] == null ? void 0 : json["ids"],
18485
18794
  limit: json["limit"] == null ? void 0 : json["limit"],
18486
- offset: json["offset"] == null ? void 0 : json["offset"]
18795
+ offset: json["offset"] == null ? void 0 : json["offset"],
18796
+ q: json["q"] == null ? void 0 : json["q"],
18797
+ traitType: json["trait_type"] == null ? void 0 : json["trait_type"]
18487
18798
  };
18488
18799
  }
18489
- function CountFlagChecksParamsToJSON(value) {
18800
+ function CountEntityTraitDefinitionsParamsToJSON(value) {
18490
18801
  if (value == null) {
18491
18802
  return value;
18492
18803
  }
18493
18804
  return {
18494
- flag_id: value["flagId"],
18495
- flag_ids: value["flagIds"],
18496
- id: value["id"],
18805
+ entity_type: value["entityType"],
18806
+ ids: value["ids"],
18497
18807
  limit: value["limit"],
18498
- offset: value["offset"]
18808
+ offset: value["offset"],
18809
+ q: value["q"],
18810
+ trait_type: value["traitType"]
18499
18811
  };
18500
18812
  }
18501
18813
 
18502
- // src/api/models/CountFlagChecksResponse.ts
18503
- function instanceOfCountFlagChecksResponse(value) {
18814
+ // src/api/models/CountEntityTraitDefinitionsResponse.ts
18815
+ function instanceOfCountEntityTraitDefinitionsResponse(value) {
18504
18816
  if (!("data" in value) || value["data"] === void 0)
18505
18817
  return false;
18506
18818
  if (!("params" in value) || value["params"] === void 0)
18507
18819
  return false;
18508
18820
  return true;
18509
18821
  }
18510
- function CountFlagChecksResponseFromJSON(json) {
18511
- return CountFlagChecksResponseFromJSONTyped(json, false);
18822
+ function CountEntityTraitDefinitionsResponseFromJSON(json) {
18823
+ return CountEntityTraitDefinitionsResponseFromJSONTyped(json, false);
18512
18824
  }
18513
- function CountFlagChecksResponseFromJSONTyped(json, ignoreDiscriminator) {
18825
+ function CountEntityTraitDefinitionsResponseFromJSONTyped(json, ignoreDiscriminator) {
18514
18826
  if (json == null) {
18515
18827
  return json;
18516
18828
  }
18517
18829
  return {
18518
18830
  data: CountResponseFromJSON(json["data"]),
18519
- params: CountFlagChecksParamsFromJSON(json["params"])
18831
+ params: CountEntityTraitDefinitionsParamsFromJSON(json["params"])
18520
18832
  };
18521
18833
  }
18522
- function CountFlagChecksResponseToJSON(value) {
18834
+ function CountEntityTraitDefinitionsResponseToJSON(value) {
18523
18835
  if (value == null) {
18524
18836
  return value;
18525
18837
  }
18526
18838
  return {
18527
18839
  data: CountResponseToJSON(value["data"]),
18528
- params: CountFlagChecksParamsToJSON(value["params"])
18840
+ params: CountEntityTraitDefinitionsParamsToJSON(value["params"])
18529
18841
  };
18530
18842
  }
18531
18843
 
18532
- // src/api/models/CountFlagsParams.ts
18533
- function instanceOfCountFlagsParams(value) {
18844
+ // src/api/models/CountFeatureCompaniesParams.ts
18845
+ function instanceOfCountFeatureCompaniesParams(value) {
18534
18846
  return true;
18535
18847
  }
18536
- function CountFlagsParamsFromJSON(json) {
18537
- return CountFlagsParamsFromJSONTyped(json, false);
18848
+ function CountFeatureCompaniesParamsFromJSON(json) {
18849
+ return CountFeatureCompaniesParamsFromJSONTyped(json, false);
18538
18850
  }
18539
- function CountFlagsParamsFromJSONTyped(json, ignoreDiscriminator) {
18851
+ function CountFeatureCompaniesParamsFromJSONTyped(json, ignoreDiscriminator) {
18540
18852
  if (json == null) {
18541
18853
  return json;
18542
18854
  }
18543
18855
  return {
18544
18856
  featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
18545
- ids: json["ids"] == null ? void 0 : json["ids"],
18546
18857
  limit: json["limit"] == null ? void 0 : json["limit"],
18547
18858
  offset: json["offset"] == null ? void 0 : json["offset"],
18548
18859
  q: json["q"] == null ? void 0 : json["q"]
18549
18860
  };
18550
18861
  }
18551
- function CountFlagsParamsToJSON(value) {
18862
+ function CountFeatureCompaniesParamsToJSON(value) {
18552
18863
  if (value == null) {
18553
18864
  return value;
18554
18865
  }
18555
18866
  return {
18556
18867
  feature_id: value["featureId"],
18557
- ids: value["ids"],
18558
18868
  limit: value["limit"],
18559
18869
  offset: value["offset"],
18560
18870
  q: value["q"]
18561
18871
  };
18562
18872
  }
18563
18873
 
18564
- // src/api/models/CountFlagsResponse.ts
18565
- function instanceOfCountFlagsResponse(value) {
18874
+ // src/api/models/CountFeatureCompaniesResponse.ts
18875
+ function instanceOfCountFeatureCompaniesResponse(value) {
18566
18876
  if (!("data" in value) || value["data"] === void 0)
18567
18877
  return false;
18568
18878
  if (!("params" in value) || value["params"] === void 0)
18569
18879
  return false;
18570
18880
  return true;
18571
18881
  }
18572
- function CountFlagsResponseFromJSON(json) {
18573
- return CountFlagsResponseFromJSONTyped(json, false);
18882
+ function CountFeatureCompaniesResponseFromJSON(json) {
18883
+ return CountFeatureCompaniesResponseFromJSONTyped(json, false);
18574
18884
  }
18575
- function CountFlagsResponseFromJSONTyped(json, ignoreDiscriminator) {
18885
+ function CountFeatureCompaniesResponseFromJSONTyped(json, ignoreDiscriminator) {
18576
18886
  if (json == null) {
18577
18887
  return json;
18578
18888
  }
18579
18889
  return {
18580
18890
  data: CountResponseFromJSON(json["data"]),
18581
- params: CountFlagsParamsFromJSON(json["params"])
18891
+ params: CountFeatureCompaniesParamsFromJSON(json["params"])
18582
18892
  };
18583
18893
  }
18584
- function CountFlagsResponseToJSON(value) {
18894
+ function CountFeatureCompaniesResponseToJSON(value) {
18585
18895
  if (value == null) {
18586
18896
  return value;
18587
18897
  }
18588
18898
  return {
18589
18899
  data: CountResponseToJSON(value["data"]),
18590
- params: CountFlagsParamsToJSON(value["params"])
18900
+ params: CountFeatureCompaniesParamsToJSON(value["params"])
18591
18901
  };
18592
18902
  }
18593
18903
 
18594
- // src/api/models/CountPlanEntitlementsParams.ts
18595
- function instanceOfCountPlanEntitlementsParams(value) {
18904
+ // src/api/models/CountFeatureUsageParams.ts
18905
+ function instanceOfCountFeatureUsageParams(value) {
18596
18906
  return true;
18597
18907
  }
18598
- function CountPlanEntitlementsParamsFromJSON(json) {
18599
- return CountPlanEntitlementsParamsFromJSONTyped(json, false);
18908
+ function CountFeatureUsageParamsFromJSON(json) {
18909
+ return CountFeatureUsageParamsFromJSONTyped(json, false);
18600
18910
  }
18601
- function CountPlanEntitlementsParamsFromJSONTyped(json, ignoreDiscriminator) {
18911
+ function CountFeatureUsageParamsFromJSONTyped(json, ignoreDiscriminator) {
18602
18912
  if (json == null) {
18603
18913
  return json;
18604
18914
  }
18605
18915
  return {
18606
- featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
18916
+ companyId: json["company_id"] == null ? void 0 : json["company_id"],
18917
+ companyKeys: json["company_keys"] == null ? void 0 : json["company_keys"],
18607
18918
  featureIds: json["feature_ids"] == null ? void 0 : json["feature_ids"],
18608
- ids: json["ids"] == null ? void 0 : json["ids"],
18609
18919
  limit: json["limit"] == null ? void 0 : json["limit"],
18610
18920
  offset: json["offset"] == null ? void 0 : json["offset"],
18611
- planId: json["plan_id"] == null ? void 0 : json["plan_id"],
18612
- planIds: json["plan_ids"] == null ? void 0 : json["plan_ids"],
18613
18921
  q: json["q"] == null ? void 0 : json["q"]
18614
18922
  };
18615
18923
  }
18616
- function CountPlanEntitlementsParamsToJSON(value) {
18924
+ function CountFeatureUsageParamsToJSON(value) {
18617
18925
  if (value == null) {
18618
18926
  return value;
18619
18927
  }
18620
18928
  return {
18621
- feature_id: value["featureId"],
18929
+ company_id: value["companyId"],
18930
+ company_keys: value["companyKeys"],
18622
18931
  feature_ids: value["featureIds"],
18623
- ids: value["ids"],
18624
18932
  limit: value["limit"],
18625
18933
  offset: value["offset"],
18626
- plan_id: value["planId"],
18627
- plan_ids: value["planIds"],
18628
18934
  q: value["q"]
18629
18935
  };
18630
18936
  }
18631
18937
 
18632
- // src/api/models/CountPlanEntitlementsResponse.ts
18633
- function instanceOfCountPlanEntitlementsResponse(value) {
18938
+ // src/api/models/CountFeatureUsageResponse.ts
18939
+ function instanceOfCountFeatureUsageResponse(value) {
18634
18940
  if (!("data" in value) || value["data"] === void 0)
18635
18941
  return false;
18636
18942
  if (!("params" in value) || value["params"] === void 0)
18637
18943
  return false;
18638
18944
  return true;
18639
18945
  }
18640
- function CountPlanEntitlementsResponseFromJSON(json) {
18641
- return CountPlanEntitlementsResponseFromJSONTyped(json, false);
18946
+ function CountFeatureUsageResponseFromJSON(json) {
18947
+ return CountFeatureUsageResponseFromJSONTyped(json, false);
18642
18948
  }
18643
- function CountPlanEntitlementsResponseFromJSONTyped(json, ignoreDiscriminator) {
18949
+ function CountFeatureUsageResponseFromJSONTyped(json, ignoreDiscriminator) {
18644
18950
  if (json == null) {
18645
18951
  return json;
18646
18952
  }
18647
18953
  return {
18648
18954
  data: CountResponseFromJSON(json["data"]),
18649
- params: CountPlanEntitlementsParamsFromJSON(json["params"])
18955
+ params: CountFeatureUsageParamsFromJSON(json["params"])
18650
18956
  };
18651
18957
  }
18652
- function CountPlanEntitlementsResponseToJSON(value) {
18958
+ function CountFeatureUsageResponseToJSON(value) {
18653
18959
  if (value == null) {
18654
18960
  return value;
18655
18961
  }
18656
18962
  return {
18657
18963
  data: CountResponseToJSON(value["data"]),
18658
- params: CountPlanEntitlementsParamsToJSON(value["params"])
18964
+ params: CountFeatureUsageParamsToJSON(value["params"])
18659
18965
  };
18660
18966
  }
18661
18967
 
18662
- // src/api/models/CountPlansParams.ts
18663
- function instanceOfCountPlansParams(value) {
18968
+ // src/api/models/CountFeatureUsersParams.ts
18969
+ function instanceOfCountFeatureUsersParams(value) {
18664
18970
  return true;
18665
18971
  }
18666
- function CountPlansParamsFromJSON(json) {
18667
- return CountPlansParamsFromJSONTyped(json, false);
18972
+ function CountFeatureUsersParamsFromJSON(json) {
18973
+ return CountFeatureUsersParamsFromJSONTyped(json, false);
18668
18974
  }
18669
- function CountPlansParamsFromJSONTyped(json, ignoreDiscriminator) {
18975
+ function CountFeatureUsersParamsFromJSONTyped(json, ignoreDiscriminator) {
18670
18976
  if (json == null) {
18671
18977
  return json;
18672
18978
  }
18673
18979
  return {
18674
- companyId: json["company_id"] == null ? void 0 : json["company_id"],
18675
- ids: json["ids"] == null ? void 0 : json["ids"],
18980
+ featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
18676
18981
  limit: json["limit"] == null ? void 0 : json["limit"],
18677
18982
  offset: json["offset"] == null ? void 0 : json["offset"],
18678
- q: json["q"] == null ? void 0 : json["q"],
18679
- withoutEntitlementFor: json["without_entitlement_for"] == null ? void 0 : json["without_entitlement_for"]
18983
+ q: json["q"] == null ? void 0 : json["q"]
18680
18984
  };
18681
18985
  }
18682
- function CountPlansParamsToJSON(value) {
18986
+ function CountFeatureUsersParamsToJSON(value) {
18683
18987
  if (value == null) {
18684
18988
  return value;
18685
18989
  }
18686
18990
  return {
18687
- company_id: value["companyId"],
18688
- ids: value["ids"],
18991
+ feature_id: value["featureId"],
18689
18992
  limit: value["limit"],
18690
18993
  offset: value["offset"],
18691
- q: value["q"],
18692
- without_entitlement_for: value["withoutEntitlementFor"]
18994
+ q: value["q"]
18693
18995
  };
18694
18996
  }
18695
18997
 
18696
- // src/api/models/CountPlansResponse.ts
18697
- function instanceOfCountPlansResponse(value) {
18998
+ // src/api/models/CountFeatureUsersResponse.ts
18999
+ function instanceOfCountFeatureUsersResponse(value) {
18698
19000
  if (!("data" in value) || value["data"] === void 0)
18699
19001
  return false;
18700
19002
  if (!("params" in value) || value["params"] === void 0)
18701
19003
  return false;
18702
19004
  return true;
18703
19005
  }
18704
- function CountPlansResponseFromJSON(json) {
18705
- return CountPlansResponseFromJSONTyped(json, false);
19006
+ function CountFeatureUsersResponseFromJSON(json) {
19007
+ return CountFeatureUsersResponseFromJSONTyped(json, false);
18706
19008
  }
18707
- function CountPlansResponseFromJSONTyped(json, ignoreDiscriminator) {
19009
+ function CountFeatureUsersResponseFromJSONTyped(json, ignoreDiscriminator) {
18708
19010
  if (json == null) {
18709
19011
  return json;
18710
19012
  }
18711
19013
  return {
18712
19014
  data: CountResponseFromJSON(json["data"]),
18713
- params: CountPlansParamsFromJSON(json["params"])
19015
+ params: CountFeatureUsersParamsFromJSON(json["params"])
18714
19016
  };
18715
19017
  }
18716
- function CountPlansResponseToJSON(value) {
19018
+ function CountFeatureUsersResponseToJSON(value) {
18717
19019
  if (value == null) {
18718
19020
  return value;
18719
19021
  }
18720
19022
  return {
18721
19023
  data: CountResponseToJSON(value["data"]),
18722
- params: CountPlansParamsToJSON(value["params"])
19024
+ params: CountFeatureUsersParamsToJSON(value["params"])
18723
19025
  };
18724
19026
  }
18725
19027
 
18726
- // src/api/models/CountUsersParams.ts
18727
- function instanceOfCountUsersParams(value) {
19028
+ // src/api/models/CountFeaturesParams.ts
19029
+ function instanceOfCountFeaturesParams(value) {
18728
19030
  return true;
18729
19031
  }
18730
- function CountUsersParamsFromJSON(json) {
18731
- return CountUsersParamsFromJSONTyped(json, false);
19032
+ function CountFeaturesParamsFromJSON(json) {
19033
+ return CountFeaturesParamsFromJSONTyped(json, false);
18732
19034
  }
18733
- function CountUsersParamsFromJSONTyped(json, ignoreDiscriminator) {
19035
+ function CountFeaturesParamsFromJSONTyped(json, ignoreDiscriminator) {
18734
19036
  if (json == null) {
18735
19037
  return json;
18736
19038
  }
18737
19039
  return {
18738
- companyId: json["company_id"] == null ? void 0 : json["company_id"],
18739
19040
  ids: json["ids"] == null ? void 0 : json["ids"],
18740
19041
  limit: json["limit"] == null ? void 0 : json["limit"],
18741
19042
  offset: json["offset"] == null ? void 0 : json["offset"],
18742
- planId: json["plan_id"] == null ? void 0 : json["plan_id"],
18743
- q: json["q"] == null ? void 0 : json["q"]
19043
+ q: json["q"] == null ? void 0 : json["q"],
19044
+ withoutCompanyOverrideFor: json["without_company_override_for"] == null ? void 0 : json["without_company_override_for"],
19045
+ withoutPlanEntitlementFor: json["without_plan_entitlement_for"] == null ? void 0 : json["without_plan_entitlement_for"]
18744
19046
  };
18745
19047
  }
18746
- function CountUsersParamsToJSON(value) {
19048
+ function CountFeaturesParamsToJSON(value) {
18747
19049
  if (value == null) {
18748
19050
  return value;
18749
19051
  }
18750
19052
  return {
18751
- company_id: value["companyId"],
18752
19053
  ids: value["ids"],
18753
19054
  limit: value["limit"],
18754
19055
  offset: value["offset"],
18755
- plan_id: value["planId"],
18756
- q: value["q"]
19056
+ q: value["q"],
19057
+ without_company_override_for: value["withoutCompanyOverrideFor"],
19058
+ without_plan_entitlement_for: value["withoutPlanEntitlementFor"]
18757
19059
  };
18758
19060
  }
18759
19061
 
18760
- // src/api/models/CountUsersResponse.ts
18761
- function instanceOfCountUsersResponse(value) {
19062
+ // src/api/models/CountFeaturesResponse.ts
19063
+ function instanceOfCountFeaturesResponse(value) {
18762
19064
  if (!("data" in value) || value["data"] === void 0)
18763
19065
  return false;
18764
19066
  if (!("params" in value) || value["params"] === void 0)
18765
19067
  return false;
18766
19068
  return true;
18767
19069
  }
18768
- function CountUsersResponseFromJSON(json) {
18769
- return CountUsersResponseFromJSONTyped(json, false);
19070
+ function CountFeaturesResponseFromJSON(json) {
19071
+ return CountFeaturesResponseFromJSONTyped(json, false);
18770
19072
  }
18771
- function CountUsersResponseFromJSONTyped(json, ignoreDiscriminator) {
19073
+ function CountFeaturesResponseFromJSONTyped(json, ignoreDiscriminator) {
18772
19074
  if (json == null) {
18773
19075
  return json;
18774
19076
  }
18775
19077
  return {
18776
19078
  data: CountResponseFromJSON(json["data"]),
18777
- params: CountUsersParamsFromJSON(json["params"])
19079
+ params: CountFeaturesParamsFromJSON(json["params"])
18778
19080
  };
18779
19081
  }
18780
- function CountUsersResponseToJSON(value) {
19082
+ function CountFeaturesResponseToJSON(value) {
18781
19083
  if (value == null) {
18782
19084
  return value;
18783
19085
  }
18784
19086
  return {
18785
19087
  data: CountResponseToJSON(value["data"]),
18786
- params: CountUsersParamsToJSON(value["params"])
19088
+ params: CountFeaturesParamsToJSON(value["params"])
18787
19089
  };
18788
19090
  }
18789
19091
 
18790
- // src/api/models/CountWebhookEventsParams.ts
18791
- function instanceOfCountWebhookEventsParams(value) {
19092
+ // src/api/models/CountFlagChecksParams.ts
19093
+ function instanceOfCountFlagChecksParams(value) {
18792
19094
  return true;
18793
19095
  }
18794
- function CountWebhookEventsParamsFromJSON(json) {
18795
- return CountWebhookEventsParamsFromJSONTyped(json, false);
19096
+ function CountFlagChecksParamsFromJSON(json) {
19097
+ return CountFlagChecksParamsFromJSONTyped(json, false);
18796
19098
  }
18797
- function CountWebhookEventsParamsFromJSONTyped(json, ignoreDiscriminator) {
19099
+ function CountFlagChecksParamsFromJSONTyped(json, ignoreDiscriminator) {
18798
19100
  if (json == null) {
18799
19101
  return json;
18800
19102
  }
18801
19103
  return {
18802
- ids: json["ids"] == null ? void 0 : json["ids"],
19104
+ flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
19105
+ flagIds: json["flag_ids"] == null ? void 0 : json["flag_ids"],
19106
+ id: json["id"] == null ? void 0 : json["id"],
18803
19107
  limit: json["limit"] == null ? void 0 : json["limit"],
18804
- offset: json["offset"] == null ? void 0 : json["offset"],
18805
- q: json["q"] == null ? void 0 : json["q"],
18806
- webhookId: json["webhook_id"] == null ? void 0 : json["webhook_id"]
19108
+ offset: json["offset"] == null ? void 0 : json["offset"]
18807
19109
  };
18808
19110
  }
18809
- function CountWebhookEventsParamsToJSON(value) {
19111
+ function CountFlagChecksParamsToJSON(value) {
18810
19112
  if (value == null) {
18811
19113
  return value;
18812
19114
  }
18813
19115
  return {
18814
- ids: value["ids"],
19116
+ flag_id: value["flagId"],
19117
+ flag_ids: value["flagIds"],
19118
+ id: value["id"],
18815
19119
  limit: value["limit"],
18816
- offset: value["offset"],
18817
- q: value["q"],
18818
- webhook_id: value["webhookId"]
19120
+ offset: value["offset"]
18819
19121
  };
18820
19122
  }
18821
19123
 
18822
- // src/api/models/CountWebhookEventsResponse.ts
18823
- function instanceOfCountWebhookEventsResponse(value) {
19124
+ // src/api/models/CountFlagChecksResponse.ts
19125
+ function instanceOfCountFlagChecksResponse(value) {
18824
19126
  if (!("data" in value) || value["data"] === void 0)
18825
19127
  return false;
18826
19128
  if (!("params" in value) || value["params"] === void 0)
18827
19129
  return false;
18828
19130
  return true;
18829
19131
  }
18830
- function CountWebhookEventsResponseFromJSON(json) {
18831
- return CountWebhookEventsResponseFromJSONTyped(json, false);
19132
+ function CountFlagChecksResponseFromJSON(json) {
19133
+ return CountFlagChecksResponseFromJSONTyped(json, false);
18832
19134
  }
18833
- function CountWebhookEventsResponseFromJSONTyped(json, ignoreDiscriminator) {
19135
+ function CountFlagChecksResponseFromJSONTyped(json, ignoreDiscriminator) {
18834
19136
  if (json == null) {
18835
19137
  return json;
18836
19138
  }
18837
19139
  return {
18838
19140
  data: CountResponseFromJSON(json["data"]),
18839
- params: CountWebhookEventsParamsFromJSON(json["params"])
19141
+ params: CountFlagChecksParamsFromJSON(json["params"])
18840
19142
  };
18841
19143
  }
18842
- function CountWebhookEventsResponseToJSON(value) {
19144
+ function CountFlagChecksResponseToJSON(value) {
18843
19145
  if (value == null) {
18844
19146
  return value;
18845
19147
  }
18846
19148
  return {
18847
19149
  data: CountResponseToJSON(value["data"]),
18848
- params: CountWebhookEventsParamsToJSON(value["params"])
19150
+ params: CountFlagChecksParamsToJSON(value["params"])
18849
19151
  };
18850
19152
  }
18851
19153
 
18852
- // src/api/models/CountWebhooksParams.ts
18853
- function instanceOfCountWebhooksParams(value) {
19154
+ // src/api/models/CountFlagsParams.ts
19155
+ function instanceOfCountFlagsParams(value) {
18854
19156
  return true;
18855
19157
  }
18856
- function CountWebhooksParamsFromJSON(json) {
18857
- return CountWebhooksParamsFromJSONTyped(json, false);
19158
+ function CountFlagsParamsFromJSON(json) {
19159
+ return CountFlagsParamsFromJSONTyped(json, false);
18858
19160
  }
18859
- function CountWebhooksParamsFromJSONTyped(json, ignoreDiscriminator) {
19161
+ function CountFlagsParamsFromJSONTyped(json, ignoreDiscriminator) {
18860
19162
  if (json == null) {
18861
19163
  return json;
18862
19164
  }
18863
19165
  return {
19166
+ featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
19167
+ ids: json["ids"] == null ? void 0 : json["ids"],
18864
19168
  limit: json["limit"] == null ? void 0 : json["limit"],
18865
19169
  offset: json["offset"] == null ? void 0 : json["offset"],
18866
19170
  q: json["q"] == null ? void 0 : json["q"]
18867
19171
  };
18868
19172
  }
18869
- function CountWebhooksParamsToJSON(value) {
19173
+ function CountFlagsParamsToJSON(value) {
18870
19174
  if (value == null) {
18871
19175
  return value;
18872
19176
  }
18873
19177
  return {
19178
+ feature_id: value["featureId"],
19179
+ ids: value["ids"],
18874
19180
  limit: value["limit"],
18875
19181
  offset: value["offset"],
18876
19182
  q: value["q"]
18877
19183
  };
18878
19184
  }
18879
19185
 
18880
- // src/api/models/CountWebhooksResponse.ts
18881
- function instanceOfCountWebhooksResponse(value) {
19186
+ // src/api/models/CountFlagsResponse.ts
19187
+ function instanceOfCountFlagsResponse(value) {
18882
19188
  if (!("data" in value) || value["data"] === void 0)
18883
19189
  return false;
18884
19190
  if (!("params" in value) || value["params"] === void 0)
18885
19191
  return false;
18886
19192
  return true;
18887
19193
  }
18888
- function CountWebhooksResponseFromJSON(json) {
18889
- return CountWebhooksResponseFromJSONTyped(json, false);
19194
+ function CountFlagsResponseFromJSON(json) {
19195
+ return CountFlagsResponseFromJSONTyped(json, false);
18890
19196
  }
18891
- function CountWebhooksResponseFromJSONTyped(json, ignoreDiscriminator) {
19197
+ function CountFlagsResponseFromJSONTyped(json, ignoreDiscriminator) {
18892
19198
  if (json == null) {
18893
19199
  return json;
18894
19200
  }
18895
19201
  return {
18896
19202
  data: CountResponseFromJSON(json["data"]),
18897
- params: CountWebhooksParamsFromJSON(json["params"])
19203
+ params: CountFlagsParamsFromJSON(json["params"])
18898
19204
  };
18899
19205
  }
18900
- function CountWebhooksResponseToJSON(value) {
19206
+ function CountFlagsResponseToJSON(value) {
18901
19207
  if (value == null) {
18902
19208
  return value;
18903
19209
  }
18904
19210
  return {
18905
19211
  data: CountResponseToJSON(value["data"]),
18906
- params: CountWebhooksParamsToJSON(value["params"])
19212
+ params: CountFlagsParamsToJSON(value["params"])
18907
19213
  };
18908
19214
  }
18909
19215
 
18910
- // src/api/models/CreateApiKeyRequestBody.ts
18911
- function instanceOfCreateApiKeyRequestBody(value) {
18912
- if (!("name" in value) || value["name"] === void 0)
18913
- return false;
19216
+ // src/api/models/CountPlanEntitlementsParams.ts
19217
+ function instanceOfCountPlanEntitlementsParams(value) {
18914
19218
  return true;
18915
19219
  }
18916
- function CreateApiKeyRequestBodyFromJSON(json) {
18917
- return CreateApiKeyRequestBodyFromJSONTyped(json, false);
19220
+ function CountPlanEntitlementsParamsFromJSON(json) {
19221
+ return CountPlanEntitlementsParamsFromJSONTyped(json, false);
18918
19222
  }
18919
- function CreateApiKeyRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19223
+ function CountPlanEntitlementsParamsFromJSONTyped(json, ignoreDiscriminator) {
18920
19224
  if (json == null) {
18921
19225
  return json;
18922
19226
  }
18923
19227
  return {
18924
- description: json["description"] == null ? void 0 : json["description"],
18925
- environmentId: json["environment_id"] == null ? void 0 : json["environment_id"],
18926
- name: json["name"]
19228
+ featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
19229
+ featureIds: json["feature_ids"] == null ? void 0 : json["feature_ids"],
19230
+ ids: json["ids"] == null ? void 0 : json["ids"],
19231
+ limit: json["limit"] == null ? void 0 : json["limit"],
19232
+ offset: json["offset"] == null ? void 0 : json["offset"],
19233
+ planId: json["plan_id"] == null ? void 0 : json["plan_id"],
19234
+ planIds: json["plan_ids"] == null ? void 0 : json["plan_ids"],
19235
+ q: json["q"] == null ? void 0 : json["q"]
18927
19236
  };
18928
19237
  }
18929
- function CreateApiKeyRequestBodyToJSON(value) {
19238
+ function CountPlanEntitlementsParamsToJSON(value) {
18930
19239
  if (value == null) {
18931
19240
  return value;
18932
19241
  }
18933
19242
  return {
18934
- description: value["description"],
18935
- environment_id: value["environmentId"],
18936
- name: value["name"]
19243
+ feature_id: value["featureId"],
19244
+ feature_ids: value["featureIds"],
19245
+ ids: value["ids"],
19246
+ limit: value["limit"],
19247
+ offset: value["offset"],
19248
+ plan_id: value["planId"],
19249
+ plan_ids: value["planIds"],
19250
+ q: value["q"]
18937
19251
  };
18938
19252
  }
18939
19253
 
18940
- // src/api/models/CreateApiKeyResponse.ts
18941
- function instanceOfCreateApiKeyResponse(value) {
19254
+ // src/api/models/CountPlanEntitlementsResponse.ts
19255
+ function instanceOfCountPlanEntitlementsResponse(value) {
18942
19256
  if (!("data" in value) || value["data"] === void 0)
18943
19257
  return false;
18944
19258
  if (!("params" in value) || value["params"] === void 0)
18945
19259
  return false;
18946
19260
  return true;
18947
19261
  }
18948
- function CreateApiKeyResponseFromJSON(json) {
18949
- return CreateApiKeyResponseFromJSONTyped(json, false);
19262
+ function CountPlanEntitlementsResponseFromJSON(json) {
19263
+ return CountPlanEntitlementsResponseFromJSONTyped(json, false);
18950
19264
  }
18951
- function CreateApiKeyResponseFromJSONTyped(json, ignoreDiscriminator) {
19265
+ function CountPlanEntitlementsResponseFromJSONTyped(json, ignoreDiscriminator) {
18952
19266
  if (json == null) {
18953
19267
  return json;
18954
19268
  }
18955
19269
  return {
18956
- data: ApiKeyCreateResponseDataFromJSON(json["data"]),
18957
- params: json["params"]
19270
+ data: CountResponseFromJSON(json["data"]),
19271
+ params: CountPlanEntitlementsParamsFromJSON(json["params"])
18958
19272
  };
18959
19273
  }
18960
- function CreateApiKeyResponseToJSON(value) {
19274
+ function CountPlanEntitlementsResponseToJSON(value) {
18961
19275
  if (value == null) {
18962
19276
  return value;
18963
19277
  }
18964
19278
  return {
18965
- data: ApiKeyCreateResponseDataToJSON(value["data"]),
18966
- params: value["params"]
19279
+ data: CountResponseToJSON(value["data"]),
19280
+ params: CountPlanEntitlementsParamsToJSON(value["params"])
18967
19281
  };
18968
19282
  }
18969
19283
 
18970
- // src/api/models/CreateBillingProductRequestBody.ts
18971
- function instanceOfCreateBillingProductRequestBody(value) {
18972
- if (!("currency" in value) || value["currency"] === void 0)
18973
- return false;
18974
- if (!("externalId" in value) || value["externalId"] === void 0)
18975
- return false;
18976
- if (!("name" in value) || value["name"] === void 0)
18977
- return false;
18978
- if (!("price" in value) || value["price"] === void 0)
18979
- return false;
18980
- if (!("quantity" in value) || value["quantity"] === void 0)
18981
- return false;
19284
+ // src/api/models/CountPlansParams.ts
19285
+ function instanceOfCountPlansParams(value) {
18982
19286
  return true;
18983
19287
  }
18984
- function CreateBillingProductRequestBodyFromJSON(json) {
18985
- return CreateBillingProductRequestBodyFromJSONTyped(json, false);
19288
+ function CountPlansParamsFromJSON(json) {
19289
+ return CountPlansParamsFromJSONTyped(json, false);
18986
19290
  }
18987
- function CreateBillingProductRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19291
+ function CountPlansParamsFromJSONTyped(json, ignoreDiscriminator) {
18988
19292
  if (json == null) {
18989
19293
  return json;
18990
19294
  }
18991
19295
  return {
18992
- currency: json["currency"],
18993
- externalId: json["external_id"],
18994
- name: json["name"],
18995
- price: json["price"],
18996
- quantity: json["quantity"]
18997
- };
19296
+ companyId: json["company_id"] == null ? void 0 : json["company_id"],
19297
+ ids: json["ids"] == null ? void 0 : json["ids"],
19298
+ limit: json["limit"] == null ? void 0 : json["limit"],
19299
+ offset: json["offset"] == null ? void 0 : json["offset"],
19300
+ q: json["q"] == null ? void 0 : json["q"],
19301
+ withoutEntitlementFor: json["without_entitlement_for"] == null ? void 0 : json["without_entitlement_for"]
19302
+ };
18998
19303
  }
18999
- function CreateBillingProductRequestBodyToJSON(value) {
19304
+ function CountPlansParamsToJSON(value) {
19000
19305
  if (value == null) {
19001
19306
  return value;
19002
19307
  }
19003
19308
  return {
19004
- currency: value["currency"],
19005
- external_id: value["externalId"],
19006
- name: value["name"],
19007
- price: value["price"],
19008
- quantity: value["quantity"]
19309
+ company_id: value["companyId"],
19310
+ ids: value["ids"],
19311
+ limit: value["limit"],
19312
+ offset: value["offset"],
19313
+ q: value["q"],
19314
+ without_entitlement_for: value["withoutEntitlementFor"]
19009
19315
  };
19010
19316
  }
19011
19317
 
19012
- // src/api/models/CreateBillingSubscriptionsRequestBody.ts
19013
- function instanceOfCreateBillingSubscriptionsRequestBody(value) {
19014
- if (!("customerExternalId" in value) || value["customerExternalId"] === void 0)
19015
- return false;
19016
- if (!("expiredAt" in value) || value["expiredAt"] === void 0)
19017
- return false;
19018
- if (!("productExternalIds" in value) || value["productExternalIds"] === void 0)
19318
+ // src/api/models/CountPlansResponse.ts
19319
+ function instanceOfCountPlansResponse(value) {
19320
+ if (!("data" in value) || value["data"] === void 0)
19019
19321
  return false;
19020
- if (!("subscriptionExternalId" in value) || value["subscriptionExternalId"] === void 0)
19322
+ if (!("params" in value) || value["params"] === void 0)
19021
19323
  return false;
19022
19324
  return true;
19023
19325
  }
19024
- function CreateBillingSubscriptionsRequestBodyFromJSON(json) {
19025
- return CreateBillingSubscriptionsRequestBodyFromJSONTyped(json, false);
19326
+ function CountPlansResponseFromJSON(json) {
19327
+ return CountPlansResponseFromJSONTyped(json, false);
19026
19328
  }
19027
- function CreateBillingSubscriptionsRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19329
+ function CountPlansResponseFromJSONTyped(json, ignoreDiscriminator) {
19028
19330
  if (json == null) {
19029
19331
  return json;
19030
19332
  }
19031
19333
  return {
19032
- customerExternalId: json["customer_external_id"],
19033
- expiredAt: new Date(json["expired_at"]),
19034
- interval: json["interval"] == null ? void 0 : json["interval"],
19035
- productExternalIds: json["product_external_ids"],
19036
- subscriptionExternalId: json["subscription_external_id"]
19334
+ data: CountResponseFromJSON(json["data"]),
19335
+ params: CountPlansParamsFromJSON(json["params"])
19037
19336
  };
19038
19337
  }
19039
- function CreateBillingSubscriptionsRequestBodyToJSON(value) {
19338
+ function CountPlansResponseToJSON(value) {
19040
19339
  if (value == null) {
19041
19340
  return value;
19042
19341
  }
19043
19342
  return {
19044
- customer_external_id: value["customerExternalId"],
19045
- expired_at: value["expiredAt"].toISOString(),
19046
- interval: value["interval"],
19047
- product_external_ids: value["productExternalIds"],
19048
- subscription_external_id: value["subscriptionExternalId"]
19343
+ data: CountResponseToJSON(value["data"]),
19344
+ params: CountPlansParamsToJSON(value["params"])
19049
19345
  };
19050
19346
  }
19051
19347
 
19052
- // src/api/models/CreateCompanyOverrideRequestBody.ts
19053
- var CreateCompanyOverrideRequestBodyMetricPeriodEnum = {
19054
- Month: "current_month",
19055
- Week: "current_week",
19056
- Day: "current_day"
19057
- };
19058
- var CreateCompanyOverrideRequestBodyValueTypeEnum = {
19059
- Boolean: "boolean",
19060
- Numeric: "numeric",
19061
- Trait: "trait",
19062
- Unlimited: "unlimited"
19063
- };
19064
- function instanceOfCreateCompanyOverrideRequestBody(value) {
19065
- if (!("companyId" in value) || value["companyId"] === void 0)
19066
- return false;
19067
- if (!("featureId" in value) || value["featureId"] === void 0)
19068
- return false;
19069
- if (!("valueType" in value) || value["valueType"] === void 0)
19070
- return false;
19348
+ // src/api/models/CountUsersParams.ts
19349
+ function instanceOfCountUsersParams(value) {
19071
19350
  return true;
19072
19351
  }
19073
- function CreateCompanyOverrideRequestBodyFromJSON(json) {
19074
- return CreateCompanyOverrideRequestBodyFromJSONTyped(json, false);
19352
+ function CountUsersParamsFromJSON(json) {
19353
+ return CountUsersParamsFromJSONTyped(json, false);
19075
19354
  }
19076
- function CreateCompanyOverrideRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19355
+ function CountUsersParamsFromJSONTyped(json, ignoreDiscriminator) {
19077
19356
  if (json == null) {
19078
19357
  return json;
19079
19358
  }
19080
19359
  return {
19081
- companyId: json["company_id"],
19082
- featureId: json["feature_id"],
19083
- metricPeriod: json["metric_period"] == null ? void 0 : json["metric_period"],
19084
- valueBool: json["value_bool"] == null ? void 0 : json["value_bool"],
19085
- valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
19086
- valueTraitId: json["value_trait_id"] == null ? void 0 : json["value_trait_id"],
19087
- valueType: json["value_type"]
19360
+ companyId: json["company_id"] == null ? void 0 : json["company_id"],
19361
+ ids: json["ids"] == null ? void 0 : json["ids"],
19362
+ limit: json["limit"] == null ? void 0 : json["limit"],
19363
+ offset: json["offset"] == null ? void 0 : json["offset"],
19364
+ planId: json["plan_id"] == null ? void 0 : json["plan_id"],
19365
+ q: json["q"] == null ? void 0 : json["q"]
19088
19366
  };
19089
19367
  }
19090
- function CreateCompanyOverrideRequestBodyToJSON(value) {
19368
+ function CountUsersParamsToJSON(value) {
19091
19369
  if (value == null) {
19092
19370
  return value;
19093
19371
  }
19094
19372
  return {
19095
19373
  company_id: value["companyId"],
19096
- feature_id: value["featureId"],
19097
- metric_period: value["metricPeriod"],
19098
- value_bool: value["valueBool"],
19099
- value_numeric: value["valueNumeric"],
19100
- value_trait_id: value["valueTraitId"],
19101
- value_type: value["valueType"]
19374
+ ids: value["ids"],
19375
+ limit: value["limit"],
19376
+ offset: value["offset"],
19377
+ plan_id: value["planId"],
19378
+ q: value["q"]
19102
19379
  };
19103
19380
  }
19104
19381
 
19105
- // src/api/models/CreateCompanyOverrideResponse.ts
19106
- function instanceOfCreateCompanyOverrideResponse(value) {
19382
+ // src/api/models/CountUsersResponse.ts
19383
+ function instanceOfCountUsersResponse(value) {
19107
19384
  if (!("data" in value) || value["data"] === void 0)
19108
19385
  return false;
19109
19386
  if (!("params" in value) || value["params"] === void 0)
19110
19387
  return false;
19111
19388
  return true;
19112
19389
  }
19113
- function CreateCompanyOverrideResponseFromJSON(json) {
19114
- return CreateCompanyOverrideResponseFromJSONTyped(json, false);
19390
+ function CountUsersResponseFromJSON(json) {
19391
+ return CountUsersResponseFromJSONTyped(json, false);
19115
19392
  }
19116
- function CreateCompanyOverrideResponseFromJSONTyped(json, ignoreDiscriminator) {
19393
+ function CountUsersResponseFromJSONTyped(json, ignoreDiscriminator) {
19117
19394
  if (json == null) {
19118
19395
  return json;
19119
19396
  }
19120
19397
  return {
19121
- data: CompanyOverrideResponseDataFromJSON(json["data"]),
19122
- params: json["params"]
19398
+ data: CountResponseFromJSON(json["data"]),
19399
+ params: CountUsersParamsFromJSON(json["params"])
19123
19400
  };
19124
19401
  }
19125
- function CreateCompanyOverrideResponseToJSON(value) {
19402
+ function CountUsersResponseToJSON(value) {
19126
19403
  if (value == null) {
19127
19404
  return value;
19128
19405
  }
19129
19406
  return {
19130
- data: CompanyOverrideResponseDataToJSON(value["data"]),
19131
- params: value["params"]
19407
+ data: CountResponseToJSON(value["data"]),
19408
+ params: CountUsersParamsToJSON(value["params"])
19132
19409
  };
19133
19410
  }
19134
19411
 
19135
- // src/api/models/CreateCompanyResponse.ts
19136
- function instanceOfCreateCompanyResponse(value) {
19137
- if (!("data" in value) || value["data"] === void 0)
19138
- return false;
19139
- if (!("params" in value) || value["params"] === void 0)
19140
- return false;
19412
+ // src/api/models/CountWebhookEventsParams.ts
19413
+ function instanceOfCountWebhookEventsParams(value) {
19141
19414
  return true;
19142
19415
  }
19143
- function CreateCompanyResponseFromJSON(json) {
19144
- return CreateCompanyResponseFromJSONTyped(json, false);
19416
+ function CountWebhookEventsParamsFromJSON(json) {
19417
+ return CountWebhookEventsParamsFromJSONTyped(json, false);
19145
19418
  }
19146
- function CreateCompanyResponseFromJSONTyped(json, ignoreDiscriminator) {
19419
+ function CountWebhookEventsParamsFromJSONTyped(json, ignoreDiscriminator) {
19147
19420
  if (json == null) {
19148
19421
  return json;
19149
19422
  }
19150
19423
  return {
19151
- data: CompanyDetailResponseDataFromJSON(json["data"]),
19152
- params: json["params"]
19424
+ ids: json["ids"] == null ? void 0 : json["ids"],
19425
+ limit: json["limit"] == null ? void 0 : json["limit"],
19426
+ offset: json["offset"] == null ? void 0 : json["offset"],
19427
+ q: json["q"] == null ? void 0 : json["q"],
19428
+ webhookId: json["webhook_id"] == null ? void 0 : json["webhook_id"]
19153
19429
  };
19154
19430
  }
19155
- function CreateCompanyResponseToJSON(value) {
19431
+ function CountWebhookEventsParamsToJSON(value) {
19156
19432
  if (value == null) {
19157
19433
  return value;
19158
19434
  }
19159
19435
  return {
19160
- data: CompanyDetailResponseDataToJSON(value["data"]),
19161
- params: value["params"]
19436
+ ids: value["ids"],
19437
+ limit: value["limit"],
19438
+ offset: value["offset"],
19439
+ q: value["q"],
19440
+ webhook_id: value["webhookId"]
19162
19441
  };
19163
19442
  }
19164
19443
 
19165
- // src/api/models/CreateComponentRequestBody.ts
19166
- var CreateComponentRequestBodyEntityTypeEnum = {
19167
- Entitlement: "entitlement",
19168
- Billing: "billing"
19169
- };
19170
- function instanceOfCreateComponentRequestBody(value) {
19171
- if (!("ast" in value) || value["ast"] === void 0)
19172
- return false;
19173
- if (!("entityType" in value) || value["entityType"] === void 0)
19444
+ // src/api/models/CountWebhookEventsResponse.ts
19445
+ function instanceOfCountWebhookEventsResponse(value) {
19446
+ if (!("data" in value) || value["data"] === void 0)
19174
19447
  return false;
19175
- if (!("name" in value) || value["name"] === void 0)
19448
+ if (!("params" in value) || value["params"] === void 0)
19176
19449
  return false;
19177
19450
  return true;
19178
19451
  }
19179
- function CreateComponentRequestBodyFromJSON(json) {
19180
- return CreateComponentRequestBodyFromJSONTyped(json, false);
19452
+ function CountWebhookEventsResponseFromJSON(json) {
19453
+ return CountWebhookEventsResponseFromJSONTyped(json, false);
19181
19454
  }
19182
- function CreateComponentRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19455
+ function CountWebhookEventsResponseFromJSONTyped(json, ignoreDiscriminator) {
19183
19456
  if (json == null) {
19184
19457
  return json;
19185
19458
  }
19186
19459
  return {
19187
- ast: json["ast"],
19188
- entityType: json["entity_type"],
19189
- name: json["name"]
19460
+ data: CountResponseFromJSON(json["data"]),
19461
+ params: CountWebhookEventsParamsFromJSON(json["params"])
19190
19462
  };
19191
19463
  }
19192
- function CreateComponentRequestBodyToJSON(value) {
19464
+ function CountWebhookEventsResponseToJSON(value) {
19193
19465
  if (value == null) {
19194
19466
  return value;
19195
19467
  }
19196
19468
  return {
19197
- ast: value["ast"],
19198
- entity_type: value["entityType"],
19199
- name: value["name"]
19469
+ data: CountResponseToJSON(value["data"]),
19470
+ params: CountWebhookEventsParamsToJSON(value["params"])
19200
19471
  };
19201
19472
  }
19202
19473
 
19203
- // src/api/models/CreateComponentResponse.ts
19204
- function instanceOfCreateComponentResponse(value) {
19205
- if (!("data" in value) || value["data"] === void 0)
19206
- return false;
19207
- if (!("params" in value) || value["params"] === void 0)
19208
- return false;
19474
+ // src/api/models/CountWebhooksParams.ts
19475
+ function instanceOfCountWebhooksParams(value) {
19209
19476
  return true;
19210
19477
  }
19211
- function CreateComponentResponseFromJSON(json) {
19212
- return CreateComponentResponseFromJSONTyped(json, false);
19478
+ function CountWebhooksParamsFromJSON(json) {
19479
+ return CountWebhooksParamsFromJSONTyped(json, false);
19213
19480
  }
19214
- function CreateComponentResponseFromJSONTyped(json, ignoreDiscriminator) {
19481
+ function CountWebhooksParamsFromJSONTyped(json, ignoreDiscriminator) {
19215
19482
  if (json == null) {
19216
19483
  return json;
19217
19484
  }
19218
19485
  return {
19219
- data: ComponentResponseDataFromJSON(json["data"]),
19220
- params: json["params"]
19486
+ limit: json["limit"] == null ? void 0 : json["limit"],
19487
+ offset: json["offset"] == null ? void 0 : json["offset"],
19488
+ q: json["q"] == null ? void 0 : json["q"]
19221
19489
  };
19222
19490
  }
19223
- function CreateComponentResponseToJSON(value) {
19491
+ function CountWebhooksParamsToJSON(value) {
19224
19492
  if (value == null) {
19225
19493
  return value;
19226
19494
  }
19227
19495
  return {
19228
- data: ComponentResponseDataToJSON(value["data"]),
19229
- params: value["params"]
19496
+ limit: value["limit"],
19497
+ offset: value["offset"],
19498
+ q: value["q"]
19230
19499
  };
19231
19500
  }
19232
19501
 
19233
- // src/api/models/CreateCrmDealLineItemAssociationRequestBody.ts
19234
- function instanceOfCreateCrmDealLineItemAssociationRequestBody(value) {
19235
- if (!("dealExternalId" in value) || value["dealExternalId"] === void 0)
19502
+ // src/api/models/CountWebhooksResponse.ts
19503
+ function instanceOfCountWebhooksResponse(value) {
19504
+ if (!("data" in value) || value["data"] === void 0)
19236
19505
  return false;
19237
- if (!("lineItemExternalId" in value) || value["lineItemExternalId"] === void 0)
19506
+ if (!("params" in value) || value["params"] === void 0)
19238
19507
  return false;
19239
19508
  return true;
19240
19509
  }
19241
- function CreateCrmDealLineItemAssociationRequestBodyFromJSON(json) {
19242
- return CreateCrmDealLineItemAssociationRequestBodyFromJSONTyped(json, false);
19510
+ function CountWebhooksResponseFromJSON(json) {
19511
+ return CountWebhooksResponseFromJSONTyped(json, false);
19243
19512
  }
19244
- function CreateCrmDealLineItemAssociationRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19513
+ function CountWebhooksResponseFromJSONTyped(json, ignoreDiscriminator) {
19245
19514
  if (json == null) {
19246
19515
  return json;
19247
19516
  }
19248
19517
  return {
19249
- dealExternalId: json["deal_external_id"],
19250
- lineItemExternalId: json["line_item_external_id"]
19518
+ data: CountResponseFromJSON(json["data"]),
19519
+ params: CountWebhooksParamsFromJSON(json["params"])
19251
19520
  };
19252
19521
  }
19253
- function CreateCrmDealLineItemAssociationRequestBodyToJSON(value) {
19522
+ function CountWebhooksResponseToJSON(value) {
19254
19523
  if (value == null) {
19255
19524
  return value;
19256
19525
  }
19257
19526
  return {
19258
- deal_external_id: value["dealExternalId"],
19259
- line_item_external_id: value["lineItemExternalId"]
19527
+ data: CountResponseToJSON(value["data"]),
19528
+ params: CountWebhooksParamsToJSON(value["params"])
19260
19529
  };
19261
19530
  }
19262
19531
 
19263
- // src/api/models/CreateCrmDealRequestBody.ts
19264
- function instanceOfCreateCrmDealRequestBody(value) {
19265
- if (!("crmCompanyKey" in value) || value["crmCompanyKey"] === void 0)
19266
- return false;
19267
- if (!("crmType" in value) || value["crmType"] === void 0)
19268
- return false;
19269
- if (!("dealExternalId" in value) || value["dealExternalId"] === void 0)
19532
+ // src/api/models/CreateApiKeyRequestBody.ts
19533
+ function instanceOfCreateApiKeyRequestBody(value) {
19534
+ if (!("name" in value) || value["name"] === void 0)
19270
19535
  return false;
19271
19536
  return true;
19272
19537
  }
19273
- function CreateCrmDealRequestBodyFromJSON(json) {
19274
- return CreateCrmDealRequestBodyFromJSONTyped(json, false);
19538
+ function CreateApiKeyRequestBodyFromJSON(json) {
19539
+ return CreateApiKeyRequestBodyFromJSONTyped(json, false);
19275
19540
  }
19276
- function CreateCrmDealRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19541
+ function CreateApiKeyRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19277
19542
  if (json == null) {
19278
19543
  return json;
19279
19544
  }
19280
19545
  return {
19281
- arr: json["arr"] == null ? void 0 : json["arr"],
19282
- crmCompanyId: json["crm_company_id"] == null ? void 0 : json["crm_company_id"],
19283
- crmCompanyKey: json["crm_company_key"],
19284
- crmProductId: json["crm_product_id"] == null ? void 0 : json["crm_product_id"],
19285
- crmType: json["crm_type"],
19286
- dealExternalId: json["deal_external_id"],
19287
- dealName: json["deal_name"] == null ? void 0 : json["deal_name"],
19288
- dealStage: json["deal_stage"] == null ? void 0 : json["deal_stage"],
19289
- mrr: json["mrr"] == null ? void 0 : json["mrr"]
19546
+ description: json["description"] == null ? void 0 : json["description"],
19547
+ environmentId: json["environment_id"] == null ? void 0 : json["environment_id"],
19548
+ name: json["name"]
19290
19549
  };
19291
19550
  }
19292
- function CreateCrmDealRequestBodyToJSON(value) {
19551
+ function CreateApiKeyRequestBodyToJSON(value) {
19293
19552
  if (value == null) {
19294
19553
  return value;
19295
19554
  }
19296
19555
  return {
19297
- arr: value["arr"],
19298
- crm_company_id: value["crmCompanyId"],
19299
- crm_company_key: value["crmCompanyKey"],
19300
- crm_product_id: value["crmProductId"],
19301
- crm_type: value["crmType"],
19302
- deal_external_id: value["dealExternalId"],
19303
- deal_name: value["dealName"],
19304
- deal_stage: value["dealStage"],
19305
- mrr: value["mrr"]
19556
+ description: value["description"],
19557
+ environment_id: value["environmentId"],
19558
+ name: value["name"]
19306
19559
  };
19307
19560
  }
19308
19561
 
19309
- // src/api/models/CreateCrmLineItemRequestBody.ts
19310
- function instanceOfCreateCrmLineItemRequestBody(value) {
19311
- if (!("amount" in value) || value["amount"] === void 0)
19312
- return false;
19313
- if (!("interval" in value) || value["interval"] === void 0)
19314
- return false;
19315
- if (!("lineItemExternalId" in value) || value["lineItemExternalId"] === void 0)
19316
- return false;
19317
- if (!("productExternalId" in value) || value["productExternalId"] === void 0)
19562
+ // src/api/models/CreateApiKeyResponse.ts
19563
+ function instanceOfCreateApiKeyResponse(value) {
19564
+ if (!("data" in value) || value["data"] === void 0)
19318
19565
  return false;
19319
- if (!("quantity" in value) || value["quantity"] === void 0)
19566
+ if (!("params" in value) || value["params"] === void 0)
19320
19567
  return false;
19321
19568
  return true;
19322
19569
  }
19323
- function CreateCrmLineItemRequestBodyFromJSON(json) {
19324
- return CreateCrmLineItemRequestBodyFromJSONTyped(json, false);
19570
+ function CreateApiKeyResponseFromJSON(json) {
19571
+ return CreateApiKeyResponseFromJSONTyped(json, false);
19325
19572
  }
19326
- function CreateCrmLineItemRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19573
+ function CreateApiKeyResponseFromJSONTyped(json, ignoreDiscriminator) {
19327
19574
  if (json == null) {
19328
19575
  return json;
19329
19576
  }
19330
19577
  return {
19331
- termMonth: json["TermMonth"] == null ? void 0 : json["TermMonth"],
19332
- amount: json["amount"],
19333
- discountPercentage: json["discount_percentage"] == null ? void 0 : json["discount_percentage"],
19334
- interval: json["interval"],
19335
- lineItemExternalId: json["line_item_external_id"],
19336
- productExternalId: json["product_external_id"],
19337
- quantity: json["quantity"],
19338
- totalDiscount: json["total_discount"] == null ? void 0 : json["total_discount"]
19578
+ data: ApiKeyCreateResponseDataFromJSON(json["data"]),
19579
+ params: json["params"]
19339
19580
  };
19340
19581
  }
19341
- function CreateCrmLineItemRequestBodyToJSON(value) {
19582
+ function CreateApiKeyResponseToJSON(value) {
19342
19583
  if (value == null) {
19343
19584
  return value;
19344
19585
  }
19345
19586
  return {
19346
- TermMonth: value["termMonth"],
19347
- amount: value["amount"],
19348
- discount_percentage: value["discountPercentage"],
19349
- interval: value["interval"],
19350
- line_item_external_id: value["lineItemExternalId"],
19351
- product_external_id: value["productExternalId"],
19352
- quantity: value["quantity"],
19353
- total_discount: value["totalDiscount"]
19587
+ data: ApiKeyCreateResponseDataToJSON(value["data"]),
19588
+ params: value["params"]
19354
19589
  };
19355
19590
  }
19356
19591
 
19357
- // src/api/models/CreateCrmProductRequestBody.ts
19358
- function instanceOfCreateCrmProductRequestBody(value) {
19592
+ // src/api/models/CreateBillingProductRequestBody.ts
19593
+ function instanceOfCreateBillingProductRequestBody(value) {
19359
19594
  if (!("currency" in value) || value["currency"] === void 0)
19360
19595
  return false;
19361
- if (!("description" in value) || value["description"] === void 0)
19362
- return false;
19363
19596
  if (!("externalId" in value) || value["externalId"] === void 0)
19364
19597
  return false;
19365
- if (!("interval" in value) || value["interval"] === void 0)
19366
- return false;
19367
19598
  if (!("name" in value) || value["name"] === void 0)
19368
19599
  return false;
19369
19600
  if (!("price" in value) || value["price"] === void 0)
19370
19601
  return false;
19371
19602
  if (!("quantity" in value) || value["quantity"] === void 0)
19372
19603
  return false;
19373
- if (!("sku" in value) || value["sku"] === void 0)
19374
- return false;
19375
19604
  return true;
19376
19605
  }
19377
- function CreateCrmProductRequestBodyFromJSON(json) {
19378
- return CreateCrmProductRequestBodyFromJSONTyped(json, false);
19606
+ function CreateBillingProductRequestBodyFromJSON(json) {
19607
+ return CreateBillingProductRequestBodyFromJSONTyped(json, false);
19379
19608
  }
19380
- function CreateCrmProductRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19609
+ function CreateBillingProductRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19381
19610
  if (json == null) {
19382
19611
  return json;
19383
19612
  }
19384
19613
  return {
19385
19614
  currency: json["currency"],
19386
- description: json["description"],
19387
19615
  externalId: json["external_id"],
19388
- interval: json["interval"],
19389
19616
  name: json["name"],
19390
19617
  price: json["price"],
19391
- quantity: json["quantity"],
19392
- sku: json["sku"]
19618
+ quantity: json["quantity"]
19393
19619
  };
19394
19620
  }
19395
- function CreateCrmProductRequestBodyToJSON(value) {
19621
+ function CreateBillingProductRequestBodyToJSON(value) {
19396
19622
  if (value == null) {
19397
19623
  return value;
19398
19624
  }
19399
19625
  return {
19400
19626
  currency: value["currency"],
19401
- description: value["description"],
19402
19627
  external_id: value["externalId"],
19403
- interval: value["interval"],
19404
19628
  name: value["name"],
19405
19629
  price: value["price"],
19406
- quantity: value["quantity"],
19407
- sku: value["sku"]
19630
+ quantity: value["quantity"]
19408
19631
  };
19409
19632
  }
19410
19633
 
19411
- // src/api/models/CreateEntityTraitDefinitionRequestBody.ts
19412
- var CreateEntityTraitDefinitionRequestBodyEntityTypeEnum = {
19413
- Company: "company",
19414
- User: "user"
19415
- };
19416
- var CreateEntityTraitDefinitionRequestBodyTraitTypeEnum = {
19417
- Boolean: "boolean",
19418
- Currency: "currency",
19419
- Date: "date",
19420
- Number: "number",
19421
- String: "string",
19422
- Url: "url"
19423
- };
19424
- function instanceOfCreateEntityTraitDefinitionRequestBody(value) {
19425
- if (!("entityType" in value) || value["entityType"] === void 0)
19634
+ // src/api/models/CreateBillingSubscriptionsRequestBody.ts
19635
+ function instanceOfCreateBillingSubscriptionsRequestBody(value) {
19636
+ if (!("customerExternalId" in value) || value["customerExternalId"] === void 0)
19426
19637
  return false;
19427
- if (!("hierarchy" in value) || value["hierarchy"] === void 0)
19638
+ if (!("expiredAt" in value) || value["expiredAt"] === void 0)
19428
19639
  return false;
19429
- if (!("traitType" in value) || value["traitType"] === void 0)
19640
+ if (!("productExternalIds" in value) || value["productExternalIds"] === void 0)
19641
+ return false;
19642
+ if (!("subscriptionExternalId" in value) || value["subscriptionExternalId"] === void 0)
19430
19643
  return false;
19431
19644
  return true;
19432
19645
  }
19433
- function CreateEntityTraitDefinitionRequestBodyFromJSON(json) {
19434
- return CreateEntityTraitDefinitionRequestBodyFromJSONTyped(json, false);
19646
+ function CreateBillingSubscriptionsRequestBodyFromJSON(json) {
19647
+ return CreateBillingSubscriptionsRequestBodyFromJSONTyped(json, false);
19435
19648
  }
19436
- function CreateEntityTraitDefinitionRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19649
+ function CreateBillingSubscriptionsRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19437
19650
  if (json == null) {
19438
19651
  return json;
19439
19652
  }
19440
19653
  return {
19441
- displayName: json["display_name"] == null ? void 0 : json["display_name"],
19442
- entityType: json["entity_type"],
19443
- hierarchy: json["hierarchy"],
19444
- traitType: json["trait_type"]
19654
+ customerExternalId: json["customer_external_id"],
19655
+ expiredAt: new Date(json["expired_at"]),
19656
+ interval: json["interval"] == null ? void 0 : json["interval"],
19657
+ productExternalIds: json["product_external_ids"],
19658
+ subscriptionExternalId: json["subscription_external_id"]
19445
19659
  };
19446
19660
  }
19447
- function CreateEntityTraitDefinitionRequestBodyToJSON(value) {
19661
+ function CreateBillingSubscriptionsRequestBodyToJSON(value) {
19448
19662
  if (value == null) {
19449
19663
  return value;
19450
19664
  }
19451
19665
  return {
19452
- display_name: value["displayName"],
19453
- entity_type: value["entityType"],
19454
- hierarchy: value["hierarchy"],
19455
- trait_type: value["traitType"]
19666
+ customer_external_id: value["customerExternalId"],
19667
+ expired_at: value["expiredAt"].toISOString(),
19668
+ interval: value["interval"],
19669
+ product_external_ids: value["productExternalIds"],
19670
+ subscription_external_id: value["subscriptionExternalId"]
19456
19671
  };
19457
19672
  }
19458
19673
 
19459
- // src/api/models/CreateEnvironmentRequestBody.ts
19460
- var CreateEnvironmentRequestBodyEnvironmentTypeEnum = {
19461
- Development: "development",
19462
- Staging: "staging",
19463
- Production: "production"
19674
+ // src/api/models/CreateCompanyOverrideRequestBody.ts
19675
+ var CreateCompanyOverrideRequestBodyMetricPeriodEnum = {
19676
+ Month: "current_month",
19677
+ Week: "current_week",
19678
+ Day: "current_day"
19464
19679
  };
19465
- function instanceOfCreateEnvironmentRequestBody(value) {
19466
- if (!("environmentType" in value) || value["environmentType"] === void 0)
19680
+ var CreateCompanyOverrideRequestBodyValueTypeEnum = {
19681
+ Boolean: "boolean",
19682
+ Numeric: "numeric",
19683
+ Trait: "trait",
19684
+ Unlimited: "unlimited"
19685
+ };
19686
+ function instanceOfCreateCompanyOverrideRequestBody(value) {
19687
+ if (!("companyId" in value) || value["companyId"] === void 0)
19467
19688
  return false;
19468
- if (!("name" in value) || value["name"] === void 0)
19689
+ if (!("featureId" in value) || value["featureId"] === void 0)
19690
+ return false;
19691
+ if (!("valueType" in value) || value["valueType"] === void 0)
19469
19692
  return false;
19470
19693
  return true;
19471
19694
  }
19472
- function CreateEnvironmentRequestBodyFromJSON(json) {
19473
- return CreateEnvironmentRequestBodyFromJSONTyped(json, false);
19695
+ function CreateCompanyOverrideRequestBodyFromJSON(json) {
19696
+ return CreateCompanyOverrideRequestBodyFromJSONTyped(json, false);
19474
19697
  }
19475
- function CreateEnvironmentRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19698
+ function CreateCompanyOverrideRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19476
19699
  if (json == null) {
19477
19700
  return json;
19478
19701
  }
19479
19702
  return {
19480
- environmentType: json["environment_type"],
19481
- name: json["name"]
19703
+ companyId: json["company_id"],
19704
+ featureId: json["feature_id"],
19705
+ metricPeriod: json["metric_period"] == null ? void 0 : json["metric_period"],
19706
+ valueBool: json["value_bool"] == null ? void 0 : json["value_bool"],
19707
+ valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
19708
+ valueTraitId: json["value_trait_id"] == null ? void 0 : json["value_trait_id"],
19709
+ valueType: json["value_type"]
19482
19710
  };
19483
19711
  }
19484
- function CreateEnvironmentRequestBodyToJSON(value) {
19712
+ function CreateCompanyOverrideRequestBodyToJSON(value) {
19485
19713
  if (value == null) {
19486
19714
  return value;
19487
19715
  }
19488
19716
  return {
19489
- environment_type: value["environmentType"],
19490
- name: value["name"]
19717
+ company_id: value["companyId"],
19718
+ feature_id: value["featureId"],
19719
+ metric_period: value["metricPeriod"],
19720
+ value_bool: value["valueBool"],
19721
+ value_numeric: value["valueNumeric"],
19722
+ value_trait_id: value["valueTraitId"],
19723
+ value_type: value["valueType"]
19491
19724
  };
19492
19725
  }
19493
19726
 
19494
- // src/api/models/EnvironmentDetailResponseData.ts
19495
- function instanceOfEnvironmentDetailResponseData(value) {
19496
- if (!("apiKeys" in value) || value["apiKeys"] === void 0)
19497
- return false;
19498
- if (!("createdAt" in value) || value["createdAt"] === void 0)
19499
- return false;
19500
- if (!("environmentType" in value) || value["environmentType"] === void 0)
19501
- return false;
19502
- if (!("id" in value) || value["id"] === void 0)
19503
- return false;
19504
- if (!("name" in value) || value["name"] === void 0)
19727
+ // src/api/models/CreateCompanyOverrideResponse.ts
19728
+ function instanceOfCreateCompanyOverrideResponse(value) {
19729
+ if (!("data" in value) || value["data"] === void 0)
19505
19730
  return false;
19506
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
19731
+ if (!("params" in value) || value["params"] === void 0)
19507
19732
  return false;
19508
19733
  return true;
19509
19734
  }
19510
- function EnvironmentDetailResponseDataFromJSON(json) {
19511
- return EnvironmentDetailResponseDataFromJSONTyped(json, false);
19735
+ function CreateCompanyOverrideResponseFromJSON(json) {
19736
+ return CreateCompanyOverrideResponseFromJSONTyped(json, false);
19512
19737
  }
19513
- function EnvironmentDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19738
+ function CreateCompanyOverrideResponseFromJSONTyped(json, ignoreDiscriminator) {
19514
19739
  if (json == null) {
19515
19740
  return json;
19516
19741
  }
19517
19742
  return {
19518
- apiKeys: json["api_keys"].map(ApiKeyResponseDataFromJSON),
19519
- createdAt: new Date(json["created_at"]),
19520
- environmentType: json["environment_type"],
19521
- id: json["id"],
19522
- name: json["name"],
19523
- updatedAt: new Date(json["updated_at"])
19743
+ data: CompanyOverrideResponseDataFromJSON(json["data"]),
19744
+ params: json["params"]
19524
19745
  };
19525
19746
  }
19526
- function EnvironmentDetailResponseDataToJSON(value) {
19747
+ function CreateCompanyOverrideResponseToJSON(value) {
19527
19748
  if (value == null) {
19528
19749
  return value;
19529
19750
  }
19530
19751
  return {
19531
- api_keys: value["apiKeys"].map(ApiKeyResponseDataToJSON),
19532
- created_at: value["createdAt"].toISOString(),
19533
- environment_type: value["environmentType"],
19534
- id: value["id"],
19535
- name: value["name"],
19536
- updated_at: value["updatedAt"].toISOString()
19752
+ data: CompanyOverrideResponseDataToJSON(value["data"]),
19753
+ params: value["params"]
19537
19754
  };
19538
19755
  }
19539
19756
 
19540
- // src/api/models/CreateEnvironmentResponse.ts
19541
- function instanceOfCreateEnvironmentResponse(value) {
19757
+ // src/api/models/CreateCompanyResponse.ts
19758
+ function instanceOfCreateCompanyResponse(value) {
19542
19759
  if (!("data" in value) || value["data"] === void 0)
19543
19760
  return false;
19544
19761
  if (!("params" in value) || value["params"] === void 0)
19545
19762
  return false;
19546
19763
  return true;
19547
19764
  }
19548
- function CreateEnvironmentResponseFromJSON(json) {
19549
- return CreateEnvironmentResponseFromJSONTyped(json, false);
19765
+ function CreateCompanyResponseFromJSON(json) {
19766
+ return CreateCompanyResponseFromJSONTyped(json, false);
19550
19767
  }
19551
- function CreateEnvironmentResponseFromJSONTyped(json, ignoreDiscriminator) {
19768
+ function CreateCompanyResponseFromJSONTyped(json, ignoreDiscriminator) {
19552
19769
  if (json == null) {
19553
19770
  return json;
19554
19771
  }
19555
19772
  return {
19556
- data: EnvironmentDetailResponseDataFromJSON(json["data"]),
19773
+ data: CompanyDetailResponseDataFromJSON(json["data"]),
19557
19774
  params: json["params"]
19558
19775
  };
19559
19776
  }
19560
- function CreateEnvironmentResponseToJSON(value) {
19777
+ function CreateCompanyResponseToJSON(value) {
19561
19778
  if (value == null) {
19562
19779
  return value;
19563
19780
  }
19564
19781
  return {
19565
- data: EnvironmentDetailResponseDataToJSON(value["data"]),
19782
+ data: CompanyDetailResponseDataToJSON(value["data"]),
19566
19783
  params: value["params"]
19567
19784
  };
19568
19785
  }
19569
19786
 
19570
- // src/api/models/EventBodyIdentifyCompany.ts
19571
- function instanceOfEventBodyIdentifyCompany(value) {
19572
- if (!("keys" in value) || value["keys"] === void 0)
19573
- return false;
19574
- return true;
19787
+ // src/api/models/CreateComponentRequestBody.ts
19788
+ var CreateComponentRequestBodyEntityTypeEnum = {
19789
+ Entitlement: "entitlement",
19790
+ Billing: "billing"
19791
+ };
19792
+ function instanceOfCreateComponentRequestBody(value) {
19793
+ if (!("ast" in value) || value["ast"] === void 0)
19794
+ return false;
19795
+ if (!("entityType" in value) || value["entityType"] === void 0)
19796
+ return false;
19797
+ if (!("name" in value) || value["name"] === void 0)
19798
+ return false;
19799
+ return true;
19575
19800
  }
19576
- function EventBodyIdentifyCompanyFromJSON(json) {
19577
- return EventBodyIdentifyCompanyFromJSONTyped(json, false);
19801
+ function CreateComponentRequestBodyFromJSON(json) {
19802
+ return CreateComponentRequestBodyFromJSONTyped(json, false);
19578
19803
  }
19579
- function EventBodyIdentifyCompanyFromJSONTyped(json, ignoreDiscriminator) {
19804
+ function CreateComponentRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19580
19805
  if (json == null) {
19581
19806
  return json;
19582
19807
  }
19583
19808
  return {
19584
- keys: json["keys"],
19585
- name: json["name"] == null ? void 0 : json["name"],
19586
- traits: json["traits"] == null ? void 0 : json["traits"]
19809
+ ast: json["ast"],
19810
+ entityType: json["entity_type"],
19811
+ name: json["name"]
19587
19812
  };
19588
19813
  }
19589
- function EventBodyIdentifyCompanyToJSON(value) {
19814
+ function CreateComponentRequestBodyToJSON(value) {
19590
19815
  if (value == null) {
19591
19816
  return value;
19592
19817
  }
19593
19818
  return {
19594
- keys: value["keys"],
19595
- name: value["name"],
19596
- traits: value["traits"]
19819
+ ast: value["ast"],
19820
+ entity_type: value["entityType"],
19821
+ name: value["name"]
19597
19822
  };
19598
19823
  }
19599
19824
 
19600
- // src/api/models/EventBodyIdentify.ts
19601
- function instanceOfEventBodyIdentify(value) {
19602
- if (!("keys" in value) || value["keys"] === void 0)
19825
+ // src/api/models/CreateComponentResponse.ts
19826
+ function instanceOfCreateComponentResponse(value) {
19827
+ if (!("data" in value) || value["data"] === void 0)
19828
+ return false;
19829
+ if (!("params" in value) || value["params"] === void 0)
19603
19830
  return false;
19604
19831
  return true;
19605
19832
  }
19606
- function EventBodyIdentifyFromJSON(json) {
19607
- return EventBodyIdentifyFromJSONTyped(json, false);
19833
+ function CreateComponentResponseFromJSON(json) {
19834
+ return CreateComponentResponseFromJSONTyped(json, false);
19608
19835
  }
19609
- function EventBodyIdentifyFromJSONTyped(json, ignoreDiscriminator) {
19836
+ function CreateComponentResponseFromJSONTyped(json, ignoreDiscriminator) {
19610
19837
  if (json == null) {
19611
19838
  return json;
19612
19839
  }
19613
19840
  return {
19614
- company: json["company"] == null ? void 0 : EventBodyIdentifyCompanyFromJSON(json["company"]),
19615
- keys: json["keys"],
19616
- name: json["name"] == null ? void 0 : json["name"],
19617
- traits: json["traits"] == null ? void 0 : json["traits"]
19841
+ data: ComponentResponseDataFromJSON(json["data"]),
19842
+ params: json["params"]
19618
19843
  };
19619
19844
  }
19620
- function EventBodyIdentifyToJSON(value) {
19845
+ function CreateComponentResponseToJSON(value) {
19621
19846
  if (value == null) {
19622
19847
  return value;
19623
19848
  }
19624
19849
  return {
19625
- company: EventBodyIdentifyCompanyToJSON(value["company"]),
19626
- keys: value["keys"],
19627
- name: value["name"],
19628
- traits: value["traits"]
19850
+ data: ComponentResponseDataToJSON(value["data"]),
19851
+ params: value["params"]
19629
19852
  };
19630
19853
  }
19631
19854
 
19632
- // src/api/models/EventBodyTrack.ts
19633
- function instanceOfEventBodyTrack(value) {
19634
- if (!("event" in value) || value["event"] === void 0)
19855
+ // src/api/models/CreateCrmDealLineItemAssociationRequestBody.ts
19856
+ function instanceOfCreateCrmDealLineItemAssociationRequestBody(value) {
19857
+ if (!("dealExternalId" in value) || value["dealExternalId"] === void 0)
19858
+ return false;
19859
+ if (!("lineItemExternalId" in value) || value["lineItemExternalId"] === void 0)
19635
19860
  return false;
19636
19861
  return true;
19637
19862
  }
19638
- function EventBodyTrackFromJSON(json) {
19639
- return EventBodyTrackFromJSONTyped(json, false);
19863
+ function CreateCrmDealLineItemAssociationRequestBodyFromJSON(json) {
19864
+ return CreateCrmDealLineItemAssociationRequestBodyFromJSONTyped(json, false);
19640
19865
  }
19641
- function EventBodyTrackFromJSONTyped(json, ignoreDiscriminator) {
19866
+ function CreateCrmDealLineItemAssociationRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19642
19867
  if (json == null) {
19643
19868
  return json;
19644
19869
  }
19645
19870
  return {
19646
- company: json["company"] == null ? void 0 : json["company"],
19647
- event: json["event"],
19648
- traits: json["traits"] == null ? void 0 : json["traits"],
19649
- user: json["user"] == null ? void 0 : json["user"]
19871
+ dealExternalId: json["deal_external_id"],
19872
+ lineItemExternalId: json["line_item_external_id"]
19650
19873
  };
19651
19874
  }
19652
- function EventBodyTrackToJSON(value) {
19875
+ function CreateCrmDealLineItemAssociationRequestBodyToJSON(value) {
19653
19876
  if (value == null) {
19654
19877
  return value;
19655
19878
  }
19656
19879
  return {
19657
- company: value["company"],
19658
- event: value["event"],
19659
- traits: value["traits"],
19660
- user: value["user"]
19880
+ deal_external_id: value["dealExternalId"],
19881
+ line_item_external_id: value["lineItemExternalId"]
19661
19882
  };
19662
19883
  }
19663
19884
 
19664
- // src/api/models/EventBody.ts
19665
- function EventBodyFromJSON(json) {
19666
- return EventBodyFromJSONTyped(json, false);
19667
- }
19668
- function EventBodyFromJSONTyped(json, ignoreDiscriminator) {
19669
- if (json == null) {
19670
- return json;
19671
- }
19672
- if (instanceOfEventBodyIdentify(json)) {
19673
- return EventBodyIdentifyFromJSONTyped(json, true);
19674
- }
19675
- if (instanceOfEventBodyTrack(json)) {
19676
- return EventBodyTrackFromJSONTyped(json, true);
19677
- }
19678
- throw new Error("Invalid EventBody");
19679
- }
19680
- function EventBodyToJSON(value) {
19681
- if (value == null) {
19682
- return value;
19683
- }
19684
- if (instanceOfEventBodyIdentify(value)) {
19685
- return EventBodyIdentifyToJSON(value);
19686
- }
19687
- if (instanceOfEventBodyTrack(value)) {
19688
- return EventBodyTrackToJSON(value);
19689
- }
19690
- return {};
19691
- }
19692
-
19693
- // src/api/models/CreateEventRequestBody.ts
19694
- var CreateEventRequestBodyEventTypeEnum = {
19695
- Identify: "identify",
19696
- Track: "track"
19697
- };
19698
- function instanceOfCreateEventRequestBody(value) {
19699
- if (!("eventType" in value) || value["eventType"] === void 0)
19885
+ // src/api/models/CreateCrmDealRequestBody.ts
19886
+ function instanceOfCreateCrmDealRequestBody(value) {
19887
+ if (!("crmCompanyKey" in value) || value["crmCompanyKey"] === void 0)
19888
+ return false;
19889
+ if (!("crmType" in value) || value["crmType"] === void 0)
19890
+ return false;
19891
+ if (!("dealExternalId" in value) || value["dealExternalId"] === void 0)
19700
19892
  return false;
19701
19893
  return true;
19702
19894
  }
19703
- function CreateEventRequestBodyFromJSON(json) {
19704
- return CreateEventRequestBodyFromJSONTyped(json, false);
19895
+ function CreateCrmDealRequestBodyFromJSON(json) {
19896
+ return CreateCrmDealRequestBodyFromJSONTyped(json, false);
19705
19897
  }
19706
- function CreateEventRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19898
+ function CreateCrmDealRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19707
19899
  if (json == null) {
19708
19900
  return json;
19709
19901
  }
19710
19902
  return {
19711
- body: json["body"] == null ? void 0 : EventBodyFromJSON(json["body"]),
19712
- eventType: json["event_type"],
19713
- sentAt: json["sent_at"] == null ? void 0 : new Date(json["sent_at"])
19903
+ arr: json["arr"] == null ? void 0 : json["arr"],
19904
+ crmCompanyId: json["crm_company_id"] == null ? void 0 : json["crm_company_id"],
19905
+ crmCompanyKey: json["crm_company_key"],
19906
+ crmProductId: json["crm_product_id"] == null ? void 0 : json["crm_product_id"],
19907
+ crmType: json["crm_type"],
19908
+ dealExternalId: json["deal_external_id"],
19909
+ dealName: json["deal_name"] == null ? void 0 : json["deal_name"],
19910
+ dealStage: json["deal_stage"] == null ? void 0 : json["deal_stage"],
19911
+ mrr: json["mrr"] == null ? void 0 : json["mrr"]
19714
19912
  };
19715
19913
  }
19716
- function CreateEventRequestBodyToJSON(value) {
19914
+ function CreateCrmDealRequestBodyToJSON(value) {
19717
19915
  if (value == null) {
19718
19916
  return value;
19719
19917
  }
19720
19918
  return {
19721
- body: EventBodyToJSON(value["body"]),
19722
- event_type: value["eventType"],
19723
- sent_at: value["sentAt"] == null ? void 0 : value["sentAt"].toISOString()
19919
+ arr: value["arr"],
19920
+ crm_company_id: value["crmCompanyId"],
19921
+ crm_company_key: value["crmCompanyKey"],
19922
+ crm_product_id: value["crmProductId"],
19923
+ crm_type: value["crmType"],
19924
+ deal_external_id: value["dealExternalId"],
19925
+ deal_name: value["dealName"],
19926
+ deal_stage: value["dealStage"],
19927
+ mrr: value["mrr"]
19724
19928
  };
19725
19929
  }
19726
19930
 
19727
- // src/api/models/CreateEventBatchRequestBody.ts
19728
- function instanceOfCreateEventBatchRequestBody(value) {
19729
- if (!("events" in value) || value["events"] === void 0)
19931
+ // src/api/models/CreateCrmLineItemRequestBody.ts
19932
+ function instanceOfCreateCrmLineItemRequestBody(value) {
19933
+ if (!("amount" in value) || value["amount"] === void 0)
19934
+ return false;
19935
+ if (!("interval" in value) || value["interval"] === void 0)
19936
+ return false;
19937
+ if (!("lineItemExternalId" in value) || value["lineItemExternalId"] === void 0)
19938
+ return false;
19939
+ if (!("productExternalId" in value) || value["productExternalId"] === void 0)
19940
+ return false;
19941
+ if (!("quantity" in value) || value["quantity"] === void 0)
19730
19942
  return false;
19731
19943
  return true;
19732
19944
  }
19733
- function CreateEventBatchRequestBodyFromJSON(json) {
19734
- return CreateEventBatchRequestBodyFromJSONTyped(json, false);
19945
+ function CreateCrmLineItemRequestBodyFromJSON(json) {
19946
+ return CreateCrmLineItemRequestBodyFromJSONTyped(json, false);
19735
19947
  }
19736
- function CreateEventBatchRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19948
+ function CreateCrmLineItemRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19737
19949
  if (json == null) {
19738
19950
  return json;
19739
19951
  }
19740
19952
  return {
19741
- events: json["events"].map(CreateEventRequestBodyFromJSON)
19953
+ termMonth: json["TermMonth"] == null ? void 0 : json["TermMonth"],
19954
+ amount: json["amount"],
19955
+ discountPercentage: json["discount_percentage"] == null ? void 0 : json["discount_percentage"],
19956
+ interval: json["interval"],
19957
+ lineItemExternalId: json["line_item_external_id"],
19958
+ productExternalId: json["product_external_id"],
19959
+ quantity: json["quantity"],
19960
+ totalDiscount: json["total_discount"] == null ? void 0 : json["total_discount"]
19742
19961
  };
19743
19962
  }
19744
- function CreateEventBatchRequestBodyToJSON(value) {
19963
+ function CreateCrmLineItemRequestBodyToJSON(value) {
19745
19964
  if (value == null) {
19746
19965
  return value;
19747
19966
  }
19748
19967
  return {
19749
- events: value["events"].map(CreateEventRequestBodyToJSON)
19968
+ TermMonth: value["termMonth"],
19969
+ amount: value["amount"],
19970
+ discount_percentage: value["discountPercentage"],
19971
+ interval: value["interval"],
19972
+ line_item_external_id: value["lineItemExternalId"],
19973
+ product_external_id: value["productExternalId"],
19974
+ quantity: value["quantity"],
19975
+ total_discount: value["totalDiscount"]
19750
19976
  };
19751
19977
  }
19752
19978
 
19753
- // src/api/models/RawEventResponseData.ts
19754
- function instanceOfRawEventResponseData(value) {
19755
- if (!("capturedAt" in value) || value["capturedAt"] === void 0)
19979
+ // src/api/models/CreateCrmProductRequestBody.ts
19980
+ function instanceOfCreateCrmProductRequestBody(value) {
19981
+ if (!("currency" in value) || value["currency"] === void 0)
19756
19982
  return false;
19757
- if (!("remoteAddr" in value) || value["remoteAddr"] === void 0)
19983
+ if (!("description" in value) || value["description"] === void 0)
19758
19984
  return false;
19759
- if (!("remoteIp" in value) || value["remoteIp"] === void 0)
19985
+ if (!("externalId" in value) || value["externalId"] === void 0)
19760
19986
  return false;
19761
- if (!("userAgent" in value) || value["userAgent"] === void 0)
19987
+ if (!("interval" in value) || value["interval"] === void 0)
19988
+ return false;
19989
+ if (!("name" in value) || value["name"] === void 0)
19990
+ return false;
19991
+ if (!("price" in value) || value["price"] === void 0)
19992
+ return false;
19993
+ if (!("quantity" in value) || value["quantity"] === void 0)
19994
+ return false;
19995
+ if (!("sku" in value) || value["sku"] === void 0)
19762
19996
  return false;
19763
19997
  return true;
19764
19998
  }
19765
- function RawEventResponseDataFromJSON(json) {
19766
- return RawEventResponseDataFromJSONTyped(json, false);
19999
+ function CreateCrmProductRequestBodyFromJSON(json) {
20000
+ return CreateCrmProductRequestBodyFromJSONTyped(json, false);
19767
20001
  }
19768
- function RawEventResponseDataFromJSONTyped(json, ignoreDiscriminator) {
20002
+ function CreateCrmProductRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19769
20003
  if (json == null) {
19770
20004
  return json;
19771
20005
  }
19772
20006
  return {
19773
- capturedAt: new Date(json["captured_at"]),
19774
- eventId: json["event_id"] == null ? void 0 : json["event_id"],
19775
- remoteAddr: json["remote_addr"],
19776
- remoteIp: json["remote_ip"],
19777
- userAgent: json["user_agent"]
20007
+ currency: json["currency"],
20008
+ description: json["description"],
20009
+ externalId: json["external_id"],
20010
+ interval: json["interval"],
20011
+ name: json["name"],
20012
+ price: json["price"],
20013
+ quantity: json["quantity"],
20014
+ sku: json["sku"]
19778
20015
  };
19779
20016
  }
19780
- function RawEventResponseDataToJSON(value) {
20017
+ function CreateCrmProductRequestBodyToJSON(value) {
19781
20018
  if (value == null) {
19782
20019
  return value;
19783
20020
  }
19784
20021
  return {
19785
- captured_at: value["capturedAt"].toISOString(),
19786
- event_id: value["eventId"],
19787
- remote_addr: value["remoteAddr"],
19788
- remote_ip: value["remoteIp"],
19789
- user_agent: value["userAgent"]
19790
- };
19791
- }
19792
-
19793
- // src/api/models/RawEventBatchResponseData.ts
19794
- function instanceOfRawEventBatchResponseData(value) {
19795
- if (!("events" in value) || value["events"] === void 0)
19796
- return false;
19797
- return true;
19798
- }
19799
- function RawEventBatchResponseDataFromJSON(json) {
19800
- return RawEventBatchResponseDataFromJSONTyped(json, false);
19801
- }
19802
- function RawEventBatchResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19803
- if (json == null) {
19804
- return json;
19805
- }
19806
- return {
19807
- events: json["events"].map(RawEventResponseDataFromJSON)
19808
- };
19809
- }
19810
- function RawEventBatchResponseDataToJSON(value) {
19811
- if (value == null) {
19812
- return value;
19813
- }
19814
- return {
19815
- events: value["events"].map(RawEventResponseDataToJSON)
20022
+ currency: value["currency"],
20023
+ description: value["description"],
20024
+ external_id: value["externalId"],
20025
+ interval: value["interval"],
20026
+ name: value["name"],
20027
+ price: value["price"],
20028
+ quantity: value["quantity"],
20029
+ sku: value["sku"]
19816
20030
  };
19817
20031
  }
19818
20032
 
19819
- // src/api/models/CreateEventBatchResponse.ts
19820
- function instanceOfCreateEventBatchResponse(value) {
19821
- if (!("data" in value) || value["data"] === void 0)
20033
+ // src/api/models/CreateEntityTraitDefinitionRequestBody.ts
20034
+ var CreateEntityTraitDefinitionRequestBodyEntityTypeEnum = {
20035
+ Company: "company",
20036
+ User: "user"
20037
+ };
20038
+ var CreateEntityTraitDefinitionRequestBodyTraitTypeEnum = {
20039
+ Boolean: "boolean",
20040
+ Currency: "currency",
20041
+ Date: "date",
20042
+ Number: "number",
20043
+ String: "string",
20044
+ Url: "url"
20045
+ };
20046
+ function instanceOfCreateEntityTraitDefinitionRequestBody(value) {
20047
+ if (!("entityType" in value) || value["entityType"] === void 0)
19822
20048
  return false;
19823
- if (!("params" in value) || value["params"] === void 0)
20049
+ if (!("hierarchy" in value) || value["hierarchy"] === void 0)
20050
+ return false;
20051
+ if (!("traitType" in value) || value["traitType"] === void 0)
19824
20052
  return false;
19825
20053
  return true;
19826
20054
  }
19827
- function CreateEventBatchResponseFromJSON(json) {
19828
- return CreateEventBatchResponseFromJSONTyped(json, false);
20055
+ function CreateEntityTraitDefinitionRequestBodyFromJSON(json) {
20056
+ return CreateEntityTraitDefinitionRequestBodyFromJSONTyped(json, false);
19829
20057
  }
19830
- function CreateEventBatchResponseFromJSONTyped(json, ignoreDiscriminator) {
20058
+ function CreateEntityTraitDefinitionRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19831
20059
  if (json == null) {
19832
20060
  return json;
19833
20061
  }
19834
20062
  return {
19835
- data: RawEventBatchResponseDataFromJSON(json["data"]),
19836
- params: json["params"]
20063
+ displayName: json["display_name"] == null ? void 0 : json["display_name"],
20064
+ entityType: json["entity_type"],
20065
+ hierarchy: json["hierarchy"],
20066
+ traitType: json["trait_type"]
19837
20067
  };
19838
20068
  }
19839
- function CreateEventBatchResponseToJSON(value) {
20069
+ function CreateEntityTraitDefinitionRequestBodyToJSON(value) {
19840
20070
  if (value == null) {
19841
20071
  return value;
19842
20072
  }
19843
20073
  return {
19844
- data: RawEventBatchResponseDataToJSON(value["data"]),
19845
- params: value["params"]
20074
+ display_name: value["displayName"],
20075
+ entity_type: value["entityType"],
20076
+ hierarchy: value["hierarchy"],
20077
+ trait_type: value["traitType"]
19846
20078
  };
19847
20079
  }
19848
20080
 
19849
- // src/api/models/CreateEventResponse.ts
19850
- function instanceOfCreateEventResponse(value) {
19851
- if (!("data" in value) || value["data"] === void 0)
20081
+ // src/api/models/CreateEnvironmentRequestBody.ts
20082
+ var CreateEnvironmentRequestBodyEnvironmentTypeEnum = {
20083
+ Development: "development",
20084
+ Staging: "staging",
20085
+ Production: "production"
20086
+ };
20087
+ function instanceOfCreateEnvironmentRequestBody(value) {
20088
+ if (!("environmentType" in value) || value["environmentType"] === void 0)
19852
20089
  return false;
19853
- if (!("params" in value) || value["params"] === void 0)
20090
+ if (!("name" in value) || value["name"] === void 0)
19854
20091
  return false;
19855
20092
  return true;
19856
20093
  }
19857
- function CreateEventResponseFromJSON(json) {
19858
- return CreateEventResponseFromJSONTyped(json, false);
20094
+ function CreateEnvironmentRequestBodyFromJSON(json) {
20095
+ return CreateEnvironmentRequestBodyFromJSONTyped(json, false);
19859
20096
  }
19860
- function CreateEventResponseFromJSONTyped(json, ignoreDiscriminator) {
20097
+ function CreateEnvironmentRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
19861
20098
  if (json == null) {
19862
20099
  return json;
19863
20100
  }
19864
20101
  return {
19865
- data: RawEventResponseDataFromJSON(json["data"]),
19866
- params: json["params"]
20102
+ environmentType: json["environment_type"],
20103
+ name: json["name"]
19867
20104
  };
19868
20105
  }
19869
- function CreateEventResponseToJSON(value) {
20106
+ function CreateEnvironmentRequestBodyToJSON(value) {
19870
20107
  if (value == null) {
19871
20108
  return value;
19872
20109
  }
19873
20110
  return {
19874
- data: RawEventResponseDataToJSON(value["data"]),
19875
- params: value["params"]
20111
+ environment_type: value["environmentType"],
20112
+ name: value["name"]
19876
20113
  };
19877
20114
  }
19878
20115
 
19879
- // src/api/models/CreateOrUpdateFlagRequestBody.ts
19880
- function instanceOfCreateOrUpdateFlagRequestBody(value) {
19881
- if (!("defaultValue" in value) || value["defaultValue"] === void 0)
20116
+ // src/api/models/EnvironmentDetailResponseData.ts
20117
+ function instanceOfEnvironmentDetailResponseData(value) {
20118
+ if (!("apiKeys" in value) || value["apiKeys"] === void 0)
19882
20119
  return false;
19883
- if (!("description" in value) || value["description"] === void 0)
20120
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
19884
20121
  return false;
19885
- if (!("flagType" in value) || value["flagType"] === void 0)
20122
+ if (!("environmentType" in value) || value["environmentType"] === void 0)
19886
20123
  return false;
19887
- if (!("key" in value) || value["key"] === void 0)
20124
+ if (!("id" in value) || value["id"] === void 0)
19888
20125
  return false;
19889
20126
  if (!("name" in value) || value["name"] === void 0)
19890
20127
  return false;
20128
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
20129
+ return false;
19891
20130
  return true;
19892
20131
  }
19893
- function CreateOrUpdateFlagRequestBodyFromJSON(json) {
19894
- return CreateOrUpdateFlagRequestBodyFromJSONTyped(json, false);
20132
+ function EnvironmentDetailResponseDataFromJSON(json) {
20133
+ return EnvironmentDetailResponseDataFromJSONTyped(json, false);
19895
20134
  }
19896
- function CreateOrUpdateFlagRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20135
+ function EnvironmentDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19897
20136
  if (json == null) {
19898
20137
  return json;
19899
20138
  }
19900
20139
  return {
19901
- defaultValue: json["default_value"],
19902
- description: json["description"],
19903
- featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
19904
- flagType: json["flag_type"],
19905
- id: json["id"] == null ? void 0 : json["id"],
19906
- key: json["key"],
19907
- name: json["name"]
20140
+ apiKeys: json["api_keys"].map(ApiKeyResponseDataFromJSON),
20141
+ createdAt: new Date(json["created_at"]),
20142
+ environmentType: json["environment_type"],
20143
+ id: json["id"],
20144
+ name: json["name"],
20145
+ updatedAt: new Date(json["updated_at"])
19908
20146
  };
19909
20147
  }
19910
- function CreateOrUpdateFlagRequestBodyToJSON(value) {
20148
+ function EnvironmentDetailResponseDataToJSON(value) {
19911
20149
  if (value == null) {
19912
20150
  return value;
19913
20151
  }
19914
20152
  return {
19915
- default_value: value["defaultValue"],
19916
- description: value["description"],
19917
- feature_id: value["featureId"],
19918
- flag_type: value["flagType"],
20153
+ api_keys: value["apiKeys"].map(ApiKeyResponseDataToJSON),
20154
+ created_at: value["createdAt"].toISOString(),
20155
+ environment_type: value["environmentType"],
19919
20156
  id: value["id"],
19920
- key: value["key"],
19921
- name: value["name"]
20157
+ name: value["name"],
20158
+ updated_at: value["updatedAt"].toISOString()
19922
20159
  };
19923
20160
  }
19924
20161
 
19925
- // src/api/models/CreateFeatureRequestBody.ts
19926
- var CreateFeatureRequestBodyFeatureTypeEnum = {
19927
- Boolean: "boolean",
19928
- Event: "event",
19929
- Trait: "trait"
19930
- };
19931
- function instanceOfCreateFeatureRequestBody(value) {
19932
- if (!("description" in value) || value["description"] === void 0)
19933
- return false;
19934
- if (!("featureType" in value) || value["featureType"] === void 0)
20162
+ // src/api/models/CreateEnvironmentResponse.ts
20163
+ function instanceOfCreateEnvironmentResponse(value) {
20164
+ if (!("data" in value) || value["data"] === void 0)
19935
20165
  return false;
19936
- if (!("name" in value) || value["name"] === void 0)
20166
+ if (!("params" in value) || value["params"] === void 0)
19937
20167
  return false;
19938
20168
  return true;
19939
20169
  }
19940
- function CreateFeatureRequestBodyFromJSON(json) {
19941
- return CreateFeatureRequestBodyFromJSONTyped(json, false);
20170
+ function CreateEnvironmentResponseFromJSON(json) {
20171
+ return CreateEnvironmentResponseFromJSONTyped(json, false);
19942
20172
  }
19943
- function CreateFeatureRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20173
+ function CreateEnvironmentResponseFromJSONTyped(json, ignoreDiscriminator) {
19944
20174
  if (json == null) {
19945
20175
  return json;
19946
20176
  }
19947
20177
  return {
19948
- description: json["description"],
19949
- eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
19950
- featureType: json["feature_type"],
19951
- flag: json["flag"] == null ? void 0 : CreateOrUpdateFlagRequestBodyFromJSON(json["flag"]),
19952
- lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
19953
- name: json["name"],
19954
- traitId: json["trait_id"] == null ? void 0 : json["trait_id"]
20178
+ data: EnvironmentDetailResponseDataFromJSON(json["data"]),
20179
+ params: json["params"]
19955
20180
  };
19956
20181
  }
19957
- function CreateFeatureRequestBodyToJSON(value) {
20182
+ function CreateEnvironmentResponseToJSON(value) {
19958
20183
  if (value == null) {
19959
20184
  return value;
19960
20185
  }
19961
20186
  return {
19962
- description: value["description"],
19963
- event_subtype: value["eventSubtype"],
19964
- feature_type: value["featureType"],
19965
- flag: CreateOrUpdateFlagRequestBodyToJSON(value["flag"]),
19966
- lifecycle_phase: value["lifecyclePhase"],
19967
- name: value["name"],
19968
- trait_id: value["traitId"]
20187
+ data: EnvironmentDetailResponseDataToJSON(value["data"]),
20188
+ params: value["params"]
19969
20189
  };
19970
20190
  }
19971
20191
 
19972
- // src/api/models/EventSummaryResponseData.ts
19973
- function instanceOfEventSummaryResponseData(value) {
19974
- if (!("companyCount" in value) || value["companyCount"] === void 0)
19975
- return false;
19976
- if (!("environmentId" in value) || value["environmentId"] === void 0)
19977
- return false;
19978
- if (!("eventCount" in value) || value["eventCount"] === void 0)
19979
- return false;
19980
- if (!("eventSubtype" in value) || value["eventSubtype"] === void 0)
19981
- return false;
19982
- if (!("userCount" in value) || value["userCount"] === void 0)
20192
+ // src/api/models/EventBodyIdentifyCompany.ts
20193
+ function instanceOfEventBodyIdentifyCompany(value) {
20194
+ if (!("keys" in value) || value["keys"] === void 0)
19983
20195
  return false;
19984
20196
  return true;
19985
20197
  }
19986
- function EventSummaryResponseDataFromJSON(json) {
19987
- return EventSummaryResponseDataFromJSONTyped(json, false);
20198
+ function EventBodyIdentifyCompanyFromJSON(json) {
20199
+ return EventBodyIdentifyCompanyFromJSONTyped(json, false);
19988
20200
  }
19989
- function EventSummaryResponseDataFromJSONTyped(json, ignoreDiscriminator) {
20201
+ function EventBodyIdentifyCompanyFromJSONTyped(json, ignoreDiscriminator) {
19990
20202
  if (json == null) {
19991
20203
  return json;
19992
20204
  }
19993
20205
  return {
19994
- companyCount: json["company_count"],
19995
- environmentId: json["environment_id"],
19996
- eventCount: json["event_count"],
19997
- eventSubtype: json["event_subtype"],
19998
- lastSeenAt: json["last_seen_at"] == null ? void 0 : new Date(json["last_seen_at"]),
19999
- userCount: json["user_count"]
20206
+ keys: json["keys"],
20207
+ name: json["name"] == null ? void 0 : json["name"],
20208
+ traits: json["traits"] == null ? void 0 : json["traits"]
20000
20209
  };
20001
20210
  }
20002
- function EventSummaryResponseDataToJSON(value) {
20211
+ function EventBodyIdentifyCompanyToJSON(value) {
20003
20212
  if (value == null) {
20004
20213
  return value;
20005
20214
  }
20006
20215
  return {
20007
- company_count: value["companyCount"],
20008
- environment_id: value["environmentId"],
20009
- event_count: value["eventCount"],
20010
- event_subtype: value["eventSubtype"],
20011
- last_seen_at: value["lastSeenAt"] == null ? void 0 : value["lastSeenAt"].toISOString(),
20012
- user_count: value["userCount"]
20216
+ keys: value["keys"],
20217
+ name: value["name"],
20218
+ traits: value["traits"]
20013
20219
  };
20014
20220
  }
20015
20221
 
20016
- // src/api/models/RuleConditionResourceResponseData.ts
20017
- function instanceOfRuleConditionResourceResponseData(value) {
20018
- if (!("id" in value) || value["id"] === void 0)
20019
- return false;
20020
- if (!("name" in value) || value["name"] === void 0)
20222
+ // src/api/models/EventBodyIdentify.ts
20223
+ function instanceOfEventBodyIdentify(value) {
20224
+ if (!("keys" in value) || value["keys"] === void 0)
20021
20225
  return false;
20022
20226
  return true;
20023
20227
  }
20024
- function RuleConditionResourceResponseDataFromJSON(json) {
20025
- return RuleConditionResourceResponseDataFromJSONTyped(json, false);
20228
+ function EventBodyIdentifyFromJSON(json) {
20229
+ return EventBodyIdentifyFromJSONTyped(json, false);
20026
20230
  }
20027
- function RuleConditionResourceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
20231
+ function EventBodyIdentifyFromJSONTyped(json, ignoreDiscriminator) {
20028
20232
  if (json == null) {
20029
20233
  return json;
20030
20234
  }
20031
20235
  return {
20032
- id: json["id"],
20033
- name: json["name"]
20236
+ company: json["company"] == null ? void 0 : EventBodyIdentifyCompanyFromJSON(json["company"]),
20237
+ keys: json["keys"],
20238
+ name: json["name"] == null ? void 0 : json["name"],
20239
+ traits: json["traits"] == null ? void 0 : json["traits"]
20034
20240
  };
20035
20241
  }
20036
- function RuleConditionResourceResponseDataToJSON(value) {
20242
+ function EventBodyIdentifyToJSON(value) {
20037
20243
  if (value == null) {
20038
20244
  return value;
20039
20245
  }
20040
20246
  return {
20041
- id: value["id"],
20042
- name: value["name"]
20247
+ company: EventBodyIdentifyCompanyToJSON(value["company"]),
20248
+ keys: value["keys"],
20249
+ name: value["name"],
20250
+ traits: value["traits"]
20043
20251
  };
20044
20252
  }
20045
20253
 
20046
- // src/api/models/RuleConditionDetailResponseData.ts
20047
- function instanceOfRuleConditionDetailResponseData(value) {
20048
- if (!("conditionType" in value) || value["conditionType"] === void 0)
20049
- return false;
20050
- if (!("createdAt" in value) || value["createdAt"] === void 0)
20051
- return false;
20052
- if (!("environmentId" in value) || value["environmentId"] === void 0)
20053
- return false;
20054
- if (!("id" in value) || value["id"] === void 0)
20055
- return false;
20056
- if (!("operator" in value) || value["operator"] === void 0)
20057
- return false;
20058
- if (!("resourceIds" in value) || value["resourceIds"] === void 0)
20059
- return false;
20060
- if (!("resources" in value) || value["resources"] === void 0)
20061
- return false;
20062
- if (!("ruleId" in value) || value["ruleId"] === void 0)
20063
- return false;
20064
- if (!("traitValue" in value) || value["traitValue"] === void 0)
20065
- return false;
20066
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
20254
+ // src/api/models/EventBodyTrack.ts
20255
+ function instanceOfEventBodyTrack(value) {
20256
+ if (!("event" in value) || value["event"] === void 0)
20067
20257
  return false;
20068
20258
  return true;
20069
20259
  }
20070
- function RuleConditionDetailResponseDataFromJSON(json) {
20071
- return RuleConditionDetailResponseDataFromJSONTyped(json, false);
20260
+ function EventBodyTrackFromJSON(json) {
20261
+ return EventBodyTrackFromJSONTyped(json, false);
20072
20262
  }
20073
- function RuleConditionDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
20263
+ function EventBodyTrackFromJSONTyped(json, ignoreDiscriminator) {
20074
20264
  if (json == null) {
20075
20265
  return json;
20076
20266
  }
20077
20267
  return {
20078
- comparisonTrait: json["comparison_trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["comparison_trait"]),
20079
- comparisonTraitId: json["comparison_trait_id"] == null ? void 0 : json["comparison_trait_id"],
20080
- conditionGroupId: json["condition_group_id"] == null ? void 0 : json["condition_group_id"],
20081
- conditionType: json["condition_type"],
20082
- createdAt: new Date(json["created_at"]),
20083
- environmentId: json["environment_id"],
20084
- eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
20085
- flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
20086
- id: json["id"],
20087
- metricPeriod: json["metric_period"] == null ? void 0 : json["metric_period"],
20088
- metricValue: json["metric_value"] == null ? void 0 : json["metric_value"],
20089
- operator: json["operator"],
20090
- planId: json["plan_id"] == null ? void 0 : json["plan_id"],
20091
- resourceIds: json["resource_ids"],
20092
- resources: json["resources"].map(
20093
- RuleConditionResourceResponseDataFromJSON
20094
- ),
20095
- ruleId: json["rule_id"],
20096
- trait: json["trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["trait"]),
20097
- traitEntityType: json["trait_entity_type"] == null ? void 0 : json["trait_entity_type"],
20098
- traitId: json["trait_id"] == null ? void 0 : json["trait_id"],
20099
- traitValue: json["trait_value"],
20100
- updatedAt: new Date(json["updated_at"])
20268
+ company: json["company"] == null ? void 0 : json["company"],
20269
+ event: json["event"],
20270
+ traits: json["traits"] == null ? void 0 : json["traits"],
20271
+ user: json["user"] == null ? void 0 : json["user"]
20101
20272
  };
20102
20273
  }
20103
- function RuleConditionDetailResponseDataToJSON(value) {
20274
+ function EventBodyTrackToJSON(value) {
20104
20275
  if (value == null) {
20105
20276
  return value;
20106
20277
  }
20107
20278
  return {
20108
- comparison_trait: EntityTraitDefinitionResponseDataToJSON(
20109
- value["comparisonTrait"]
20110
- ),
20111
- comparison_trait_id: value["comparisonTraitId"],
20112
- condition_group_id: value["conditionGroupId"],
20113
- condition_type: value["conditionType"],
20114
- created_at: value["createdAt"].toISOString(),
20115
- environment_id: value["environmentId"],
20116
- event_subtype: value["eventSubtype"],
20117
- flag_id: value["flagId"],
20118
- id: value["id"],
20119
- metric_period: value["metricPeriod"],
20120
- metric_value: value["metricValue"],
20121
- operator: value["operator"],
20122
- plan_id: value["planId"],
20123
- resource_ids: value["resourceIds"],
20124
- resources: value["resources"].map(
20125
- RuleConditionResourceResponseDataToJSON
20126
- ),
20127
- rule_id: value["ruleId"],
20128
- trait: EntityTraitDefinitionResponseDataToJSON(value["trait"]),
20129
- trait_entity_type: value["traitEntityType"],
20130
- trait_id: value["traitId"],
20131
- trait_value: value["traitValue"],
20132
- updated_at: value["updatedAt"].toISOString()
20279
+ company: value["company"],
20280
+ event: value["event"],
20281
+ traits: value["traits"],
20282
+ user: value["user"]
20133
20283
  };
20134
20284
  }
20135
20285
 
20136
- // src/api/models/RuleConditionGroupDetailResponseData.ts
20137
- function instanceOfRuleConditionGroupDetailResponseData(value) {
20138
- if (!("conditions" in value) || value["conditions"] === void 0)
20139
- return false;
20140
- if (!("createdAt" in value) || value["createdAt"] === void 0)
20141
- return false;
20142
- if (!("environmentId" in value) || value["environmentId"] === void 0)
20143
- return false;
20144
- if (!("id" in value) || value["id"] === void 0)
20145
- return false;
20146
- if (!("ruleId" in value) || value["ruleId"] === void 0)
20147
- return false;
20148
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
20286
+ // src/api/models/EventBody.ts
20287
+ function EventBodyFromJSON(json) {
20288
+ return EventBodyFromJSONTyped(json, false);
20289
+ }
20290
+ function EventBodyFromJSONTyped(json, ignoreDiscriminator) {
20291
+ if (json == null) {
20292
+ return json;
20293
+ }
20294
+ if (instanceOfEventBodyIdentify(json)) {
20295
+ return EventBodyIdentifyFromJSONTyped(json, true);
20296
+ }
20297
+ if (instanceOfEventBodyTrack(json)) {
20298
+ return EventBodyTrackFromJSONTyped(json, true);
20299
+ }
20300
+ throw new Error("Invalid EventBody");
20301
+ }
20302
+ function EventBodyToJSON(value) {
20303
+ if (value == null) {
20304
+ return value;
20305
+ }
20306
+ if (instanceOfEventBodyIdentify(value)) {
20307
+ return EventBodyIdentifyToJSON(value);
20308
+ }
20309
+ if (instanceOfEventBodyTrack(value)) {
20310
+ return EventBodyTrackToJSON(value);
20311
+ }
20312
+ return {};
20313
+ }
20314
+
20315
+ // src/api/models/CreateEventRequestBody.ts
20316
+ var CreateEventRequestBodyEventTypeEnum = {
20317
+ Identify: "identify",
20318
+ Track: "track"
20319
+ };
20320
+ function instanceOfCreateEventRequestBody(value) {
20321
+ if (!("eventType" in value) || value["eventType"] === void 0)
20149
20322
  return false;
20150
20323
  return true;
20151
20324
  }
20152
- function RuleConditionGroupDetailResponseDataFromJSON(json) {
20153
- return RuleConditionGroupDetailResponseDataFromJSONTyped(json, false);
20325
+ function CreateEventRequestBodyFromJSON(json) {
20326
+ return CreateEventRequestBodyFromJSONTyped(json, false);
20154
20327
  }
20155
- function RuleConditionGroupDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
20328
+ function CreateEventRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20156
20329
  if (json == null) {
20157
20330
  return json;
20158
20331
  }
20159
20332
  return {
20160
- conditions: json["conditions"].map(
20161
- RuleConditionDetailResponseDataFromJSON
20162
- ),
20163
- createdAt: new Date(json["created_at"]),
20164
- environmentId: json["environment_id"],
20165
- flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
20166
- id: json["id"],
20167
- planId: json["plan_id"] == null ? void 0 : json["plan_id"],
20168
- ruleId: json["rule_id"],
20169
- updatedAt: new Date(json["updated_at"])
20333
+ body: json["body"] == null ? void 0 : EventBodyFromJSON(json["body"]),
20334
+ eventType: json["event_type"],
20335
+ sentAt: json["sent_at"] == null ? void 0 : new Date(json["sent_at"])
20170
20336
  };
20171
20337
  }
20172
- function RuleConditionGroupDetailResponseDataToJSON(value) {
20338
+ function CreateEventRequestBodyToJSON(value) {
20173
20339
  if (value == null) {
20174
20340
  return value;
20175
20341
  }
20176
20342
  return {
20177
- conditions: value["conditions"].map(
20178
- RuleConditionDetailResponseDataToJSON
20179
- ),
20180
- created_at: value["createdAt"].toISOString(),
20181
- environment_id: value["environmentId"],
20182
- flag_id: value["flagId"],
20183
- id: value["id"],
20184
- plan_id: value["planId"],
20185
- rule_id: value["ruleId"],
20186
- updated_at: value["updatedAt"].toISOString()
20343
+ body: EventBodyToJSON(value["body"]),
20344
+ event_type: value["eventType"],
20345
+ sent_at: value["sentAt"] == null ? void 0 : value["sentAt"].toISOString()
20187
20346
  };
20188
20347
  }
20189
20348
 
20190
- // src/api/models/RuleDetailResponseData.ts
20191
- function instanceOfRuleDetailResponseData(value) {
20192
- if (!("conditionGroups" in value) || value["conditionGroups"] === void 0)
20193
- return false;
20194
- if (!("conditions" in value) || value["conditions"] === void 0)
20195
- return false;
20196
- if (!("createdAt" in value) || value["createdAt"] === void 0)
20197
- return false;
20198
- if (!("environmentId" in value) || value["environmentId"] === void 0)
20199
- return false;
20200
- if (!("id" in value) || value["id"] === void 0)
20201
- return false;
20202
- if (!("name" in value) || value["name"] === void 0)
20203
- return false;
20204
- if (!("priority" in value) || value["priority"] === void 0)
20205
- return false;
20206
- if (!("ruleType" in value) || value["ruleType"] === void 0)
20207
- return false;
20208
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
20209
- return false;
20210
- if (!("value" in value) || value["value"] === void 0)
20349
+ // src/api/models/CreateEventBatchRequestBody.ts
20350
+ function instanceOfCreateEventBatchRequestBody(value) {
20351
+ if (!("events" in value) || value["events"] === void 0)
20211
20352
  return false;
20212
20353
  return true;
20213
20354
  }
20214
- function RuleDetailResponseDataFromJSON(json) {
20215
- return RuleDetailResponseDataFromJSONTyped(json, false);
20355
+ function CreateEventBatchRequestBodyFromJSON(json) {
20356
+ return CreateEventBatchRequestBodyFromJSONTyped(json, false);
20216
20357
  }
20217
- function RuleDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
20358
+ function CreateEventBatchRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20218
20359
  if (json == null) {
20219
20360
  return json;
20220
20361
  }
20221
20362
  return {
20222
- conditionGroups: json["condition_groups"].map(
20223
- RuleConditionGroupDetailResponseDataFromJSON
20224
- ),
20225
- conditions: json["conditions"].map(
20226
- RuleConditionDetailResponseDataFromJSON
20227
- ),
20228
- createdAt: new Date(json["created_at"]),
20229
- environmentId: json["environment_id"],
20230
- flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
20231
- id: json["id"],
20232
- name: json["name"],
20233
- planId: json["plan_id"] == null ? void 0 : json["plan_id"],
20234
- priority: json["priority"],
20235
- ruleType: json["rule_type"],
20236
- updatedAt: new Date(json["updated_at"]),
20237
- value: json["value"]
20363
+ events: json["events"].map(CreateEventRequestBodyFromJSON)
20238
20364
  };
20239
20365
  }
20240
- function RuleDetailResponseDataToJSON(value) {
20366
+ function CreateEventBatchRequestBodyToJSON(value) {
20241
20367
  if (value == null) {
20242
20368
  return value;
20243
20369
  }
20244
20370
  return {
20245
- condition_groups: value["conditionGroups"].map(
20246
- RuleConditionGroupDetailResponseDataToJSON
20247
- ),
20248
- conditions: value["conditions"].map(
20249
- RuleConditionDetailResponseDataToJSON
20250
- ),
20251
- created_at: value["createdAt"].toISOString(),
20252
- environment_id: value["environmentId"],
20253
- flag_id: value["flagId"],
20254
- id: value["id"],
20255
- name: value["name"],
20256
- plan_id: value["planId"],
20257
- priority: value["priority"],
20258
- rule_type: value["ruleType"],
20259
- updated_at: value["updatedAt"].toISOString(),
20260
- value: value["value"]
20371
+ events: value["events"].map(CreateEventRequestBodyToJSON)
20261
20372
  };
20262
20373
  }
20263
20374
 
20264
- // src/api/models/FlagCheckLogResponseData.ts
20265
- function instanceOfFlagCheckLogResponseData(value) {
20266
- if (!("checkStatus" in value) || value["checkStatus"] === void 0)
20267
- return false;
20268
- if (!("createdAt" in value) || value["createdAt"] === void 0)
20375
+ // src/api/models/RawEventResponseData.ts
20376
+ function instanceOfRawEventResponseData(value) {
20377
+ if (!("capturedAt" in value) || value["capturedAt"] === void 0)
20269
20378
  return false;
20270
- if (!("environmentId" in value) || value["environmentId"] === void 0)
20379
+ if (!("remoteAddr" in value) || value["remoteAddr"] === void 0)
20271
20380
  return false;
20272
- if (!("flagKey" in value) || value["flagKey"] === void 0)
20381
+ if (!("remoteIp" in value) || value["remoteIp"] === void 0)
20273
20382
  return false;
20274
- if (!("id" in value) || value["id"] === void 0)
20383
+ if (!("userAgent" in value) || value["userAgent"] === void 0)
20275
20384
  return false;
20276
- if (!("reason" in value) || value["reason"] === void 0)
20385
+ return true;
20386
+ }
20387
+ function RawEventResponseDataFromJSON(json) {
20388
+ return RawEventResponseDataFromJSONTyped(json, false);
20389
+ }
20390
+ function RawEventResponseDataFromJSONTyped(json, ignoreDiscriminator) {
20391
+ if (json == null) {
20392
+ return json;
20393
+ }
20394
+ return {
20395
+ capturedAt: new Date(json["captured_at"]),
20396
+ eventId: json["event_id"] == null ? void 0 : json["event_id"],
20397
+ remoteAddr: json["remote_addr"],
20398
+ remoteIp: json["remote_ip"],
20399
+ userAgent: json["user_agent"]
20400
+ };
20401
+ }
20402
+ function RawEventResponseDataToJSON(value) {
20403
+ if (value == null) {
20404
+ return value;
20405
+ }
20406
+ return {
20407
+ captured_at: value["capturedAt"].toISOString(),
20408
+ event_id: value["eventId"],
20409
+ remote_addr: value["remoteAddr"],
20410
+ remote_ip: value["remoteIp"],
20411
+ user_agent: value["userAgent"]
20412
+ };
20413
+ }
20414
+
20415
+ // src/api/models/RawEventBatchResponseData.ts
20416
+ function instanceOfRawEventBatchResponseData(value) {
20417
+ if (!("events" in value) || value["events"] === void 0)
20277
20418
  return false;
20278
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
20419
+ return true;
20420
+ }
20421
+ function RawEventBatchResponseDataFromJSON(json) {
20422
+ return RawEventBatchResponseDataFromJSONTyped(json, false);
20423
+ }
20424
+ function RawEventBatchResponseDataFromJSONTyped(json, ignoreDiscriminator) {
20425
+ if (json == null) {
20426
+ return json;
20427
+ }
20428
+ return {
20429
+ events: json["events"].map(RawEventResponseDataFromJSON)
20430
+ };
20431
+ }
20432
+ function RawEventBatchResponseDataToJSON(value) {
20433
+ if (value == null) {
20434
+ return value;
20435
+ }
20436
+ return {
20437
+ events: value["events"].map(RawEventResponseDataToJSON)
20438
+ };
20439
+ }
20440
+
20441
+ // src/api/models/CreateEventBatchResponse.ts
20442
+ function instanceOfCreateEventBatchResponse(value) {
20443
+ if (!("data" in value) || value["data"] === void 0)
20279
20444
  return false;
20280
- if (!("value" in value) || value["value"] === void 0)
20445
+ if (!("params" in value) || value["params"] === void 0)
20281
20446
  return false;
20282
20447
  return true;
20283
20448
  }
20284
- function FlagCheckLogResponseDataFromJSON(json) {
20285
- return FlagCheckLogResponseDataFromJSONTyped(json, false);
20449
+ function CreateEventBatchResponseFromJSON(json) {
20450
+ return CreateEventBatchResponseFromJSONTyped(json, false);
20286
20451
  }
20287
- function FlagCheckLogResponseDataFromJSONTyped(json, ignoreDiscriminator) {
20452
+ function CreateEventBatchResponseFromJSONTyped(json, ignoreDiscriminator) {
20288
20453
  if (json == null) {
20289
20454
  return json;
20290
20455
  }
20291
20456
  return {
20292
- checkStatus: json["check_status"],
20293
- companyId: json["company_id"] == null ? void 0 : json["company_id"],
20294
- createdAt: new Date(json["created_at"]),
20295
- environmentId: json["environment_id"],
20296
- error: json["error"] == null ? void 0 : json["error"],
20297
- flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
20298
- flagKey: json["flag_key"],
20299
- id: json["id"],
20300
- reason: json["reason"],
20301
- reqCompany: json["req_company"] == null ? void 0 : json["req_company"],
20302
- reqUser: json["req_user"] == null ? void 0 : json["req_user"],
20303
- ruleId: json["rule_id"] == null ? void 0 : json["rule_id"],
20304
- updatedAt: new Date(json["updated_at"]),
20305
- userId: json["user_id"] == null ? void 0 : json["user_id"],
20306
- value: json["value"]
20457
+ data: RawEventBatchResponseDataFromJSON(json["data"]),
20458
+ params: json["params"]
20459
+ };
20460
+ }
20461
+ function CreateEventBatchResponseToJSON(value) {
20462
+ if (value == null) {
20463
+ return value;
20464
+ }
20465
+ return {
20466
+ data: RawEventBatchResponseDataToJSON(value["data"]),
20467
+ params: value["params"]
20468
+ };
20469
+ }
20470
+
20471
+ // src/api/models/CreateEventResponse.ts
20472
+ function instanceOfCreateEventResponse(value) {
20473
+ if (!("data" in value) || value["data"] === void 0)
20474
+ return false;
20475
+ if (!("params" in value) || value["params"] === void 0)
20476
+ return false;
20477
+ return true;
20478
+ }
20479
+ function CreateEventResponseFromJSON(json) {
20480
+ return CreateEventResponseFromJSONTyped(json, false);
20481
+ }
20482
+ function CreateEventResponseFromJSONTyped(json, ignoreDiscriminator) {
20483
+ if (json == null) {
20484
+ return json;
20485
+ }
20486
+ return {
20487
+ data: RawEventResponseDataFromJSON(json["data"]),
20488
+ params: json["params"]
20307
20489
  };
20308
20490
  }
20309
- function FlagCheckLogResponseDataToJSON(value) {
20491
+ function CreateEventResponseToJSON(value) {
20310
20492
  if (value == null) {
20311
20493
  return value;
20312
20494
  }
20313
20495
  return {
20314
- check_status: value["checkStatus"],
20315
- company_id: value["companyId"],
20316
- created_at: value["createdAt"].toISOString(),
20317
- environment_id: value["environmentId"],
20318
- error: value["error"],
20319
- flag_id: value["flagId"],
20320
- flag_key: value["flagKey"],
20321
- id: value["id"],
20322
- reason: value["reason"],
20323
- req_company: value["reqCompany"],
20324
- req_user: value["reqUser"],
20325
- rule_id: value["ruleId"],
20326
- updated_at: value["updatedAt"].toISOString(),
20327
- user_id: value["userId"],
20328
- value: value["value"]
20496
+ data: RawEventResponseDataToJSON(value["data"]),
20497
+ params: value["params"]
20329
20498
  };
20330
20499
  }
20331
20500
 
20332
- // src/api/models/FlagDetailResponseData.ts
20333
- function instanceOfFlagDetailResponseData(value) {
20334
- if (!("createdAt" in value) || value["createdAt"] === void 0)
20335
- return false;
20501
+ // src/api/models/CreateOrUpdateFlagRequestBody.ts
20502
+ function instanceOfCreateOrUpdateFlagRequestBody(value) {
20336
20503
  if (!("defaultValue" in value) || value["defaultValue"] === void 0)
20337
20504
  return false;
20338
20505
  if (!("description" in value) || value["description"] === void 0)
20339
20506
  return false;
20340
20507
  if (!("flagType" in value) || value["flagType"] === void 0)
20341
20508
  return false;
20342
- if (!("id" in value) || value["id"] === void 0)
20343
- return false;
20344
20509
  if (!("key" in value) || value["key"] === void 0)
20345
20510
  return false;
20346
20511
  if (!("name" in value) || value["name"] === void 0)
20347
20512
  return false;
20348
- if (!("rules" in value) || value["rules"] === void 0)
20349
- return false;
20350
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
20351
- return false;
20352
20513
  return true;
20353
20514
  }
20354
- function FlagDetailResponseDataFromJSON(json) {
20355
- return FlagDetailResponseDataFromJSONTyped(json, false);
20515
+ function CreateOrUpdateFlagRequestBodyFromJSON(json) {
20516
+ return CreateOrUpdateFlagRequestBodyFromJSONTyped(json, false);
20356
20517
  }
20357
- function FlagDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
20518
+ function CreateOrUpdateFlagRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20358
20519
  if (json == null) {
20359
20520
  return json;
20360
20521
  }
20361
20522
  return {
20362
- createdAt: new Date(json["created_at"]),
20363
20523
  defaultValue: json["default_value"],
20364
20524
  description: json["description"],
20365
- feature: json["feature"] == null ? void 0 : FeatureResponseDataFromJSON(json["feature"]),
20366
20525
  featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
20367
20526
  flagType: json["flag_type"],
20368
- id: json["id"],
20527
+ id: json["id"] == null ? void 0 : json["id"],
20369
20528
  key: json["key"],
20370
- latestCheck: json["latest_check"] == null ? void 0 : FlagCheckLogResponseDataFromJSON(json["latest_check"]),
20371
- name: json["name"],
20372
- rules: json["rules"].map(RuleDetailResponseDataFromJSON),
20373
- updatedAt: new Date(json["updated_at"])
20529
+ name: json["name"]
20374
20530
  };
20375
20531
  }
20376
- function FlagDetailResponseDataToJSON(value) {
20532
+ function CreateOrUpdateFlagRequestBodyToJSON(value) {
20377
20533
  if (value == null) {
20378
20534
  return value;
20379
20535
  }
20380
20536
  return {
20381
- created_at: value["createdAt"].toISOString(),
20382
20537
  default_value: value["defaultValue"],
20383
20538
  description: value["description"],
20384
- feature: FeatureResponseDataToJSON(value["feature"]),
20385
20539
  feature_id: value["featureId"],
20386
20540
  flag_type: value["flagType"],
20387
20541
  id: value["id"],
20388
20542
  key: value["key"],
20389
- latest_check: FlagCheckLogResponseDataToJSON(value["latestCheck"]),
20390
- name: value["name"],
20391
- rules: value["rules"].map(RuleDetailResponseDataToJSON),
20392
- updated_at: value["updatedAt"].toISOString()
20543
+ name: value["name"]
20393
20544
  };
20394
20545
  }
20395
20546
 
20396
- // src/api/models/FeatureDetailResponseData.ts
20397
- function instanceOfFeatureDetailResponseData(value) {
20398
- if (!("createdAt" in value) || value["createdAt"] === void 0)
20399
- return false;
20547
+ // src/api/models/CreateFeatureRequestBody.ts
20548
+ var CreateFeatureRequestBodyFeatureTypeEnum = {
20549
+ Boolean: "boolean",
20550
+ Event: "event",
20551
+ Trait: "trait"
20552
+ };
20553
+ function instanceOfCreateFeatureRequestBody(value) {
20400
20554
  if (!("description" in value) || value["description"] === void 0)
20401
20555
  return false;
20402
20556
  if (!("featureType" in value) || value["featureType"] === void 0)
20403
20557
  return false;
20404
- if (!("flags" in value) || value["flags"] === void 0)
20405
- return false;
20406
- if (!("id" in value) || value["id"] === void 0)
20407
- return false;
20408
20558
  if (!("name" in value) || value["name"] === void 0)
20409
20559
  return false;
20410
- if (!("plans" in value) || value["plans"] === void 0)
20411
- return false;
20412
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
20413
- return false;
20414
20560
  return true;
20415
20561
  }
20416
- function FeatureDetailResponseDataFromJSON(json) {
20417
- return FeatureDetailResponseDataFromJSONTyped(json, false);
20562
+ function CreateFeatureRequestBodyFromJSON(json) {
20563
+ return CreateFeatureRequestBodyFromJSONTyped(json, false);
20418
20564
  }
20419
- function FeatureDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
20565
+ function CreateFeatureRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20420
20566
  if (json == null) {
20421
20567
  return json;
20422
20568
  }
20423
20569
  return {
20424
- createdAt: new Date(json["created_at"]),
20425
20570
  description: json["description"],
20426
20571
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
20427
- eventSummary: json["event_summary"] == null ? void 0 : EventSummaryResponseDataFromJSON(json["event_summary"]),
20428
20572
  featureType: json["feature_type"],
20429
- flags: json["flags"].map(FlagDetailResponseDataFromJSON),
20430
- id: json["id"],
20573
+ flag: json["flag"] == null ? void 0 : CreateOrUpdateFlagRequestBodyFromJSON(json["flag"]),
20431
20574
  lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
20432
20575
  name: json["name"],
20433
- plans: json["plans"].map(PreviewObjectFromJSON),
20434
- trait: json["trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["trait"]),
20435
- traitId: json["trait_id"] == null ? void 0 : json["trait_id"],
20436
- updatedAt: new Date(json["updated_at"])
20576
+ traitId: json["trait_id"] == null ? void 0 : json["trait_id"]
20437
20577
  };
20438
20578
  }
20439
- function FeatureDetailResponseDataToJSON(value) {
20579
+ function CreateFeatureRequestBodyToJSON(value) {
20440
20580
  if (value == null) {
20441
20581
  return value;
20442
20582
  }
20443
20583
  return {
20444
- created_at: value["createdAt"].toISOString(),
20445
20584
  description: value["description"],
20446
20585
  event_subtype: value["eventSubtype"],
20447
- event_summary: EventSummaryResponseDataToJSON(value["eventSummary"]),
20448
20586
  feature_type: value["featureType"],
20449
- flags: value["flags"].map(FlagDetailResponseDataToJSON),
20450
- id: value["id"],
20587
+ flag: CreateOrUpdateFlagRequestBodyToJSON(value["flag"]),
20451
20588
  lifecycle_phase: value["lifecyclePhase"],
20452
20589
  name: value["name"],
20453
- plans: value["plans"].map(PreviewObjectToJSON),
20454
- trait: EntityTraitDefinitionResponseDataToJSON(value["trait"]),
20455
- trait_id: value["traitId"],
20456
- updated_at: value["updatedAt"].toISOString()
20590
+ trait_id: value["traitId"]
20457
20591
  };
20458
20592
  }
20459
20593
 
@@ -20676,56 +20810,6 @@ function CreatePlanEntitlementRequestBodyToJSON(value) {
20676
20810
  };
20677
20811
  }
20678
20812
 
20679
- // src/api/models/PlanResponseData.ts
20680
- function instanceOfPlanResponseData(value) {
20681
- if (!("audienceType" in value) || value["audienceType"] === void 0)
20682
- return false;
20683
- if (!("createdAt" in value) || value["createdAt"] === void 0)
20684
- return false;
20685
- if (!("description" in value) || value["description"] === void 0)
20686
- return false;
20687
- if (!("id" in value) || value["id"] === void 0)
20688
- return false;
20689
- if (!("name" in value) || value["name"] === void 0)
20690
- return false;
20691
- if (!("planType" in value) || value["planType"] === void 0)
20692
- return false;
20693
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
20694
- return false;
20695
- return true;
20696
- }
20697
- function PlanResponseDataFromJSON(json) {
20698
- return PlanResponseDataFromJSONTyped(json, false);
20699
- }
20700
- function PlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
20701
- if (json == null) {
20702
- return json;
20703
- }
20704
- return {
20705
- audienceType: json["audience_type"],
20706
- createdAt: new Date(json["created_at"]),
20707
- description: json["description"],
20708
- id: json["id"],
20709
- name: json["name"],
20710
- planType: json["plan_type"],
20711
- updatedAt: new Date(json["updated_at"])
20712
- };
20713
- }
20714
- function PlanResponseDataToJSON(value) {
20715
- if (value == null) {
20716
- return value;
20717
- }
20718
- return {
20719
- audience_type: value["audienceType"],
20720
- created_at: value["createdAt"].toISOString(),
20721
- description: value["description"],
20722
- id: value["id"],
20723
- name: value["name"],
20724
- plan_type: value["planType"],
20725
- updated_at: value["updatedAt"].toISOString()
20726
- };
20727
- }
20728
-
20729
20813
  // src/api/models/PlanEntitlementResponseData.ts
20730
20814
  function instanceOfPlanEntitlementResponseData(value) {
20731
20815
  if (!("createdAt" in value) || value["createdAt"] === void 0)
@@ -22372,90 +22456,6 @@ function FeatureCompanyUserResponseDataToJSON(value) {
22372
22456
  };
22373
22457
  }
22374
22458
 
22375
- // src/api/models/FeatureUsageResponseData.ts
22376
- var FeatureUsageResponseDataAllocationTypeEnum = {
22377
- Boolean: "boolean",
22378
- Numeric: "numeric",
22379
- Trait: "trait",
22380
- Unlimited: "unlimited"
22381
- };
22382
- function instanceOfFeatureUsageResponseData(value) {
22383
- if (!("access" in value) || value["access"] === void 0)
22384
- return false;
22385
- if (!("allocationType" in value) || value["allocationType"] === void 0)
22386
- return false;
22387
- if (!("entitlementId" in value) || value["entitlementId"] === void 0)
22388
- return false;
22389
- if (!("entitlementType" in value) || value["entitlementType"] === void 0)
22390
- return false;
22391
- return true;
22392
- }
22393
- function FeatureUsageResponseDataFromJSON(json) {
22394
- return FeatureUsageResponseDataFromJSONTyped(json, false);
22395
- }
22396
- function FeatureUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
22397
- if (json == null) {
22398
- return json;
22399
- }
22400
- return {
22401
- access: json["access"],
22402
- allocation: json["allocation"] == null ? void 0 : json["allocation"],
22403
- allocationType: json["allocation_type"],
22404
- entitlementId: json["entitlement_id"],
22405
- entitlementType: json["entitlement_type"],
22406
- feature: json["feature"] == null ? void 0 : FeatureDetailResponseDataFromJSON(json["feature"]),
22407
- period: json["period"] == null ? void 0 : json["period"],
22408
- plan: json["plan"] == null ? void 0 : PlanResponseDataFromJSON(json["plan"]),
22409
- usage: json["usage"] == null ? void 0 : json["usage"]
22410
- };
22411
- }
22412
- function FeatureUsageResponseDataToJSON(value) {
22413
- if (value == null) {
22414
- return value;
22415
- }
22416
- return {
22417
- access: value["access"],
22418
- allocation: value["allocation"],
22419
- allocation_type: value["allocationType"],
22420
- entitlement_id: value["entitlementId"],
22421
- entitlement_type: value["entitlementType"],
22422
- feature: FeatureDetailResponseDataToJSON(value["feature"]),
22423
- period: value["period"],
22424
- plan: PlanResponseDataToJSON(value["plan"]),
22425
- usage: value["usage"]
22426
- };
22427
- }
22428
-
22429
- // src/api/models/FeatureUsageDetailResponseData.ts
22430
- function instanceOfFeatureUsageDetailResponseData(value) {
22431
- if (!("features" in value) || value["features"] === void 0)
22432
- return false;
22433
- return true;
22434
- }
22435
- function FeatureUsageDetailResponseDataFromJSON(json) {
22436
- return FeatureUsageDetailResponseDataFromJSONTyped(json, false);
22437
- }
22438
- function FeatureUsageDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
22439
- if (json == null) {
22440
- return json;
22441
- }
22442
- return {
22443
- features: json["features"].map(
22444
- FeatureUsageResponseDataFromJSON
22445
- )
22446
- };
22447
- }
22448
- function FeatureUsageDetailResponseDataToJSON(value) {
22449
- if (value == null) {
22450
- return value;
22451
- }
22452
- return {
22453
- features: value["features"].map(
22454
- FeatureUsageResponseDataToJSON
22455
- )
22456
- };
22457
- }
22458
-
22459
22459
  // src/api/models/FlagResponseData.ts
22460
22460
  function instanceOfFlagResponseData(value) {
22461
22461
  if (!("createdAt" in value) || value["createdAt"] === void 0)
@@ -23842,7 +23842,7 @@ function HydrateComponentResponseFromJSONTyped(json, ignoreDiscriminator) {
23842
23842
  return json;
23843
23843
  }
23844
23844
  return {
23845
- data: ComponentHydrateViewFromJSON(json["data"]),
23845
+ data: ComponentHydrateResponseDataFromJSON(json["data"]),
23846
23846
  params: json["params"]
23847
23847
  };
23848
23848
  }
@@ -23851,7 +23851,7 @@ function HydrateComponentResponseToJSON(value) {
23851
23851
  return value;
23852
23852
  }
23853
23853
  return {
23854
- data: ComponentHydrateViewToJSON(value["data"]),
23854
+ data: ComponentHydrateResponseDataToJSON(value["data"]),
23855
23855
  params: value["params"]
23856
23856
  };
23857
23857
  }
@@ -23888,8 +23888,6 @@ function IssueTemporaryAccessTokenRequestBodyToJSON(value) {
23888
23888
 
23889
23889
  // src/api/models/IssueTemporaryAccessTokenResponseData.ts
23890
23890
  function instanceOfIssueTemporaryAccessTokenResponseData(value) {
23891
- if (!("accountId" in value) || value["accountId"] === void 0)
23892
- return false;
23893
23891
  if (!("apiKeyId" in value) || value["apiKeyId"] === void 0)
23894
23892
  return false;
23895
23893
  if (!("createdAt" in value) || value["createdAt"] === void 0)
@@ -23916,7 +23914,6 @@ function IssueTemporaryAccessTokenResponseDataFromJSONTyped(json, ignoreDiscrimi
23916
23914
  return json;
23917
23915
  }
23918
23916
  return {
23919
- accountId: json["account_id"],
23920
23917
  apiKeyId: json["api_key_id"],
23921
23918
  createdAt: new Date(json["created_at"]),
23922
23919
  environmentId: json["environment_id"],
@@ -23932,7 +23929,6 @@ function IssueTemporaryAccessTokenResponseDataToJSON(value) {
23932
23929
  return value;
23933
23930
  }
23934
23931
  return {
23935
- account_id: value["accountId"],
23936
23932
  api_key_id: value["apiKeyId"],
23937
23933
  created_at: value["createdAt"].toISOString(),
23938
23934
  environment_id: value["environmentId"],
@@ -26058,8 +26054,6 @@ function RulesDetailResponseDataToJSON(value) {
26058
26054
 
26059
26055
  // src/api/models/TemporaryAccessTokenResponseData.ts
26060
26056
  function instanceOfTemporaryAccessTokenResponseData(value) {
26061
- if (!("accountId" in value) || value["accountId"] === void 0)
26062
- return false;
26063
26057
  if (!("apiKeyId" in value) || value["apiKeyId"] === void 0)
26064
26058
  return false;
26065
26059
  if (!("createdAt" in value) || value["createdAt"] === void 0)
@@ -26084,7 +26078,6 @@ function TemporaryAccessTokenResponseDataFromJSONTyped(json, ignoreDiscriminator
26084
26078
  return json;
26085
26079
  }
26086
26080
  return {
26087
- accountId: json["account_id"],
26088
26081
  apiKeyId: json["api_key_id"],
26089
26082
  createdAt: new Date(json["created_at"]),
26090
26083
  environmentId: json["environment_id"],
@@ -26099,7 +26092,6 @@ function TemporaryAccessTokenResponseDataToJSON(value) {
26099
26092
  return value;
26100
26093
  }
26101
26094
  return {
26102
- account_id: value["accountId"],
26103
26095
  api_key_id: value["apiKeyId"],
26104
26096
  created_at: value["createdAt"].toISOString(),
26105
26097
  environment_id: value["environmentId"],
@@ -34028,7 +34020,7 @@ var Schematic = class {
34028
34020
  constructor(apiKey, opts) {
34029
34021
  const { offline = false } = opts ?? {};
34030
34022
  const { basePath, flagDefaults = {} } = opts ?? {};
34031
- const version = "1.0.18";
34023
+ const version = "1.0.19";
34032
34024
  const headers = {
34033
34025
  "User-Agent": `schematic-typescript-node@v${version}`
34034
34026
  };
@@ -34224,9 +34216,9 @@ export {
34224
34216
  CompanySubscriptionResponseDataFromJSON,
34225
34217
  CompanySubscriptionResponseDataFromJSONTyped,
34226
34218
  CompanySubscriptionResponseDataToJSON,
34227
- ComponentHydrateViewFromJSON,
34228
- ComponentHydrateViewFromJSONTyped,
34229
- ComponentHydrateViewToJSON,
34219
+ ComponentHydrateResponseDataFromJSON,
34220
+ ComponentHydrateResponseDataFromJSONTyped,
34221
+ ComponentHydrateResponseDataToJSON,
34230
34222
  ComponentResponseDataFromJSON,
34231
34223
  ComponentResponseDataFromJSONTyped,
34232
34224
  ComponentResponseDataToJSON,
@@ -35165,7 +35157,7 @@ export {
35165
35157
  instanceOfCompanyPlanResponseData,
35166
35158
  instanceOfCompanyResponseData,
35167
35159
  instanceOfCompanySubscriptionResponseData,
35168
- instanceOfComponentHydrateView,
35160
+ instanceOfComponentHydrateResponseData,
35169
35161
  instanceOfComponentResponseData,
35170
35162
  instanceOfCountApiKeysParams,
35171
35163
  instanceOfCountApiKeysResponse,