@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.
@@ -14594,9 +14594,9 @@ __export(src_exports, {
14594
14594
  CompanySubscriptionResponseDataFromJSON: () => CompanySubscriptionResponseDataFromJSON,
14595
14595
  CompanySubscriptionResponseDataFromJSONTyped: () => CompanySubscriptionResponseDataFromJSONTyped,
14596
14596
  CompanySubscriptionResponseDataToJSON: () => CompanySubscriptionResponseDataToJSON,
14597
- ComponentHydrateViewFromJSON: () => ComponentHydrateViewFromJSON,
14598
- ComponentHydrateViewFromJSONTyped: () => ComponentHydrateViewFromJSONTyped,
14599
- ComponentHydrateViewToJSON: () => ComponentHydrateViewToJSON,
14597
+ ComponentHydrateResponseDataFromJSON: () => ComponentHydrateResponseDataFromJSON,
14598
+ ComponentHydrateResponseDataFromJSONTyped: () => ComponentHydrateResponseDataFromJSONTyped,
14599
+ ComponentHydrateResponseDataToJSON: () => ComponentHydrateResponseDataToJSON,
14600
14600
  ComponentResponseDataFromJSON: () => ComponentResponseDataFromJSON,
14601
14601
  ComponentResponseDataFromJSONTyped: () => ComponentResponseDataFromJSONTyped,
14602
14602
  ComponentResponseDataToJSON: () => ComponentResponseDataToJSON,
@@ -15535,7 +15535,7 @@ __export(src_exports, {
15535
15535
  instanceOfCompanyPlanResponseData: () => instanceOfCompanyPlanResponseData,
15536
15536
  instanceOfCompanyResponseData: () => instanceOfCompanyResponseData,
15537
15537
  instanceOfCompanySubscriptionResponseData: () => instanceOfCompanySubscriptionResponseData,
15538
- instanceOfComponentHydrateView: () => instanceOfComponentHydrateView,
15538
+ instanceOfComponentHydrateResponseData: () => instanceOfComponentHydrateResponseData,
15539
15539
  instanceOfComponentResponseData: () => instanceOfComponentResponseData,
15540
15540
  instanceOfCountApiKeysParams: () => instanceOfCountApiKeysParams,
15541
15541
  instanceOfCountApiKeysResponse: () => instanceOfCountApiKeysResponse,
@@ -18955,2809 +18955,2943 @@ function ComponentResponseDataToJSON(value) {
18955
18955
  };
18956
18956
  }
18957
18957
 
18958
- // src/api/models/ComponentHydrateView.ts
18959
- function instanceOfComponentHydrateView(value) {
18960
- if (!("data" in value) || value["data"] === void 0)
18958
+ // src/api/models/EventSummaryResponseData.ts
18959
+ function instanceOfEventSummaryResponseData(value) {
18960
+ if (!("companyCount" in value) || value["companyCount"] === void 0)
18961
+ return false;
18962
+ if (!("environmentId" in value) || value["environmentId"] === void 0)
18963
+ return false;
18964
+ if (!("eventCount" in value) || value["eventCount"] === void 0)
18965
+ return false;
18966
+ if (!("eventSubtype" in value) || value["eventSubtype"] === void 0)
18967
+ return false;
18968
+ if (!("userCount" in value) || value["userCount"] === void 0)
18961
18969
  return false;
18962
18970
  return true;
18963
18971
  }
18964
- function ComponentHydrateViewFromJSON(json) {
18965
- return ComponentHydrateViewFromJSONTyped(json, false);
18972
+ function EventSummaryResponseDataFromJSON(json) {
18973
+ return EventSummaryResponseDataFromJSONTyped(json, false);
18966
18974
  }
18967
- function ComponentHydrateViewFromJSONTyped(json, ignoreDiscriminator) {
18975
+ function EventSummaryResponseDataFromJSONTyped(json, ignoreDiscriminator) {
18968
18976
  if (json == null) {
18969
18977
  return json;
18970
18978
  }
18971
18979
  return {
18972
- component: json["component"] == null ? void 0 : ComponentResponseDataFromJSON(json["component"]),
18973
- data: json["data"]
18980
+ companyCount: json["company_count"],
18981
+ environmentId: json["environment_id"],
18982
+ eventCount: json["event_count"],
18983
+ eventSubtype: json["event_subtype"],
18984
+ lastSeenAt: json["last_seen_at"] == null ? void 0 : new Date(json["last_seen_at"]),
18985
+ userCount: json["user_count"]
18974
18986
  };
18975
18987
  }
18976
- function ComponentHydrateViewToJSON(value) {
18988
+ function EventSummaryResponseDataToJSON(value) {
18977
18989
  if (value == null) {
18978
18990
  return value;
18979
18991
  }
18980
18992
  return {
18981
- component: ComponentResponseDataToJSON(value["component"]),
18982
- data: value["data"]
18993
+ company_count: value["companyCount"],
18994
+ environment_id: value["environmentId"],
18995
+ event_count: value["eventCount"],
18996
+ event_subtype: value["eventSubtype"],
18997
+ last_seen_at: value["lastSeenAt"] == null ? void 0 : value["lastSeenAt"].toISOString(),
18998
+ user_count: value["userCount"]
18983
18999
  };
18984
19000
  }
18985
19001
 
18986
- // src/api/models/CountApiKeysParams.ts
18987
- function instanceOfCountApiKeysParams(value) {
19002
+ // src/api/models/RuleConditionResourceResponseData.ts
19003
+ function instanceOfRuleConditionResourceResponseData(value) {
19004
+ if (!("id" in value) || value["id"] === void 0)
19005
+ return false;
19006
+ if (!("name" in value) || value["name"] === void 0)
19007
+ return false;
18988
19008
  return true;
18989
19009
  }
18990
- function CountApiKeysParamsFromJSON(json) {
18991
- return CountApiKeysParamsFromJSONTyped(json, false);
19010
+ function RuleConditionResourceResponseDataFromJSON(json) {
19011
+ return RuleConditionResourceResponseDataFromJSONTyped(json, false);
18992
19012
  }
18993
- function CountApiKeysParamsFromJSONTyped(json, ignoreDiscriminator) {
19013
+ function RuleConditionResourceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
18994
19014
  if (json == null) {
18995
19015
  return json;
18996
19016
  }
18997
19017
  return {
18998
- environmentId: json["environment_id"] == null ? void 0 : json["environment_id"],
18999
- limit: json["limit"] == null ? void 0 : json["limit"],
19000
- offset: json["offset"] == null ? void 0 : json["offset"],
19001
- requireEnvironment: json["require_environment"] == null ? void 0 : json["require_environment"]
19018
+ id: json["id"],
19019
+ name: json["name"]
19002
19020
  };
19003
19021
  }
19004
- function CountApiKeysParamsToJSON(value) {
19022
+ function RuleConditionResourceResponseDataToJSON(value) {
19005
19023
  if (value == null) {
19006
19024
  return value;
19007
19025
  }
19008
19026
  return {
19009
- environment_id: value["environmentId"],
19010
- limit: value["limit"],
19011
- offset: value["offset"],
19012
- require_environment: value["requireEnvironment"]
19027
+ id: value["id"],
19028
+ name: value["name"]
19013
19029
  };
19014
19030
  }
19015
19031
 
19016
- // src/api/models/CountResponse.ts
19017
- function instanceOfCountResponse(value) {
19018
- if (!("count" in value) || value["count"] === void 0)
19032
+ // src/api/models/RuleConditionDetailResponseData.ts
19033
+ function instanceOfRuleConditionDetailResponseData(value) {
19034
+ if (!("conditionType" in value) || value["conditionType"] === void 0)
19035
+ return false;
19036
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
19037
+ return false;
19038
+ if (!("environmentId" in value) || value["environmentId"] === void 0)
19039
+ return false;
19040
+ if (!("id" in value) || value["id"] === void 0)
19041
+ return false;
19042
+ if (!("operator" in value) || value["operator"] === void 0)
19043
+ return false;
19044
+ if (!("resourceIds" in value) || value["resourceIds"] === void 0)
19045
+ return false;
19046
+ if (!("resources" in value) || value["resources"] === void 0)
19047
+ return false;
19048
+ if (!("ruleId" in value) || value["ruleId"] === void 0)
19049
+ return false;
19050
+ if (!("traitValue" in value) || value["traitValue"] === void 0)
19051
+ return false;
19052
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
19019
19053
  return false;
19020
19054
  return true;
19021
19055
  }
19022
- function CountResponseFromJSON(json) {
19023
- return CountResponseFromJSONTyped(json, false);
19056
+ function RuleConditionDetailResponseDataFromJSON(json) {
19057
+ return RuleConditionDetailResponseDataFromJSONTyped(json, false);
19024
19058
  }
19025
- function CountResponseFromJSONTyped(json, ignoreDiscriminator) {
19059
+ function RuleConditionDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19026
19060
  if (json == null) {
19027
19061
  return json;
19028
19062
  }
19029
19063
  return {
19030
- count: json["count"]
19064
+ comparisonTrait: json["comparison_trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["comparison_trait"]),
19065
+ comparisonTraitId: json["comparison_trait_id"] == null ? void 0 : json["comparison_trait_id"],
19066
+ conditionGroupId: json["condition_group_id"] == null ? void 0 : json["condition_group_id"],
19067
+ conditionType: json["condition_type"],
19068
+ createdAt: new Date(json["created_at"]),
19069
+ environmentId: json["environment_id"],
19070
+ eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
19071
+ flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
19072
+ id: json["id"],
19073
+ metricPeriod: json["metric_period"] == null ? void 0 : json["metric_period"],
19074
+ metricValue: json["metric_value"] == null ? void 0 : json["metric_value"],
19075
+ operator: json["operator"],
19076
+ planId: json["plan_id"] == null ? void 0 : json["plan_id"],
19077
+ resourceIds: json["resource_ids"],
19078
+ resources: json["resources"].map(
19079
+ RuleConditionResourceResponseDataFromJSON
19080
+ ),
19081
+ ruleId: json["rule_id"],
19082
+ trait: json["trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["trait"]),
19083
+ traitEntityType: json["trait_entity_type"] == null ? void 0 : json["trait_entity_type"],
19084
+ traitId: json["trait_id"] == null ? void 0 : json["trait_id"],
19085
+ traitValue: json["trait_value"],
19086
+ updatedAt: new Date(json["updated_at"])
19031
19087
  };
19032
19088
  }
19033
- function CountResponseToJSON(value) {
19089
+ function RuleConditionDetailResponseDataToJSON(value) {
19034
19090
  if (value == null) {
19035
19091
  return value;
19036
19092
  }
19037
19093
  return {
19038
- count: value["count"]
19094
+ comparison_trait: EntityTraitDefinitionResponseDataToJSON(
19095
+ value["comparisonTrait"]
19096
+ ),
19097
+ comparison_trait_id: value["comparisonTraitId"],
19098
+ condition_group_id: value["conditionGroupId"],
19099
+ condition_type: value["conditionType"],
19100
+ created_at: value["createdAt"].toISOString(),
19101
+ environment_id: value["environmentId"],
19102
+ event_subtype: value["eventSubtype"],
19103
+ flag_id: value["flagId"],
19104
+ id: value["id"],
19105
+ metric_period: value["metricPeriod"],
19106
+ metric_value: value["metricValue"],
19107
+ operator: value["operator"],
19108
+ plan_id: value["planId"],
19109
+ resource_ids: value["resourceIds"],
19110
+ resources: value["resources"].map(
19111
+ RuleConditionResourceResponseDataToJSON
19112
+ ),
19113
+ rule_id: value["ruleId"],
19114
+ trait: EntityTraitDefinitionResponseDataToJSON(value["trait"]),
19115
+ trait_entity_type: value["traitEntityType"],
19116
+ trait_id: value["traitId"],
19117
+ trait_value: value["traitValue"],
19118
+ updated_at: value["updatedAt"].toISOString()
19039
19119
  };
19040
19120
  }
19041
19121
 
19042
- // src/api/models/CountApiKeysResponse.ts
19043
- function instanceOfCountApiKeysResponse(value) {
19044
- if (!("data" in value) || value["data"] === void 0)
19122
+ // src/api/models/RuleConditionGroupDetailResponseData.ts
19123
+ function instanceOfRuleConditionGroupDetailResponseData(value) {
19124
+ if (!("conditions" in value) || value["conditions"] === void 0)
19045
19125
  return false;
19046
- if (!("params" in value) || value["params"] === void 0)
19126
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
19127
+ return false;
19128
+ if (!("environmentId" in value) || value["environmentId"] === void 0)
19129
+ return false;
19130
+ if (!("id" in value) || value["id"] === void 0)
19131
+ return false;
19132
+ if (!("ruleId" in value) || value["ruleId"] === void 0)
19133
+ return false;
19134
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
19047
19135
  return false;
19048
19136
  return true;
19049
19137
  }
19050
- function CountApiKeysResponseFromJSON(json) {
19051
- return CountApiKeysResponseFromJSONTyped(json, false);
19138
+ function RuleConditionGroupDetailResponseDataFromJSON(json) {
19139
+ return RuleConditionGroupDetailResponseDataFromJSONTyped(json, false);
19052
19140
  }
19053
- function CountApiKeysResponseFromJSONTyped(json, ignoreDiscriminator) {
19141
+ function RuleConditionGroupDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19054
19142
  if (json == null) {
19055
19143
  return json;
19056
19144
  }
19057
19145
  return {
19058
- data: CountResponseFromJSON(json["data"]),
19059
- params: CountApiKeysParamsFromJSON(json["params"])
19146
+ conditions: json["conditions"].map(
19147
+ RuleConditionDetailResponseDataFromJSON
19148
+ ),
19149
+ createdAt: new Date(json["created_at"]),
19150
+ environmentId: json["environment_id"],
19151
+ flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
19152
+ id: json["id"],
19153
+ planId: json["plan_id"] == null ? void 0 : json["plan_id"],
19154
+ ruleId: json["rule_id"],
19155
+ updatedAt: new Date(json["updated_at"])
19060
19156
  };
19061
19157
  }
19062
- function CountApiKeysResponseToJSON(value) {
19158
+ function RuleConditionGroupDetailResponseDataToJSON(value) {
19063
19159
  if (value == null) {
19064
19160
  return value;
19065
19161
  }
19066
19162
  return {
19067
- data: CountResponseToJSON(value["data"]),
19068
- params: CountApiKeysParamsToJSON(value["params"])
19163
+ conditions: value["conditions"].map(
19164
+ RuleConditionDetailResponseDataToJSON
19165
+ ),
19166
+ created_at: value["createdAt"].toISOString(),
19167
+ environment_id: value["environmentId"],
19168
+ flag_id: value["flagId"],
19169
+ id: value["id"],
19170
+ plan_id: value["planId"],
19171
+ rule_id: value["ruleId"],
19172
+ updated_at: value["updatedAt"].toISOString()
19069
19173
  };
19070
19174
  }
19071
19175
 
19072
- // src/api/models/CountApiRequestsParams.ts
19073
- function instanceOfCountApiRequestsParams(value) {
19176
+ // src/api/models/RuleDetailResponseData.ts
19177
+ function instanceOfRuleDetailResponseData(value) {
19178
+ if (!("conditionGroups" in value) || value["conditionGroups"] === void 0)
19179
+ return false;
19180
+ if (!("conditions" in value) || value["conditions"] === void 0)
19181
+ return false;
19182
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
19183
+ return false;
19184
+ if (!("environmentId" in value) || value["environmentId"] === void 0)
19185
+ return false;
19186
+ if (!("id" in value) || value["id"] === void 0)
19187
+ return false;
19188
+ if (!("name" in value) || value["name"] === void 0)
19189
+ return false;
19190
+ if (!("priority" in value) || value["priority"] === void 0)
19191
+ return false;
19192
+ if (!("ruleType" in value) || value["ruleType"] === void 0)
19193
+ return false;
19194
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
19195
+ return false;
19196
+ if (!("value" in value) || value["value"] === void 0)
19197
+ return false;
19074
19198
  return true;
19075
19199
  }
19076
- function CountApiRequestsParamsFromJSON(json) {
19077
- return CountApiRequestsParamsFromJSONTyped(json, false);
19200
+ function RuleDetailResponseDataFromJSON(json) {
19201
+ return RuleDetailResponseDataFromJSONTyped(json, false);
19078
19202
  }
19079
- function CountApiRequestsParamsFromJSONTyped(json, ignoreDiscriminator) {
19203
+ function RuleDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19080
19204
  if (json == null) {
19081
19205
  return json;
19082
19206
  }
19083
19207
  return {
19084
- environmentId: json["environment_id"] == null ? void 0 : json["environment_id"],
19085
- limit: json["limit"] == null ? void 0 : json["limit"],
19086
- offset: json["offset"] == null ? void 0 : json["offset"],
19087
- q: json["q"] == null ? void 0 : json["q"],
19088
- requestType: json["request_type"] == null ? void 0 : json["request_type"]
19208
+ conditionGroups: json["condition_groups"].map(
19209
+ RuleConditionGroupDetailResponseDataFromJSON
19210
+ ),
19211
+ conditions: json["conditions"].map(
19212
+ RuleConditionDetailResponseDataFromJSON
19213
+ ),
19214
+ createdAt: new Date(json["created_at"]),
19215
+ environmentId: json["environment_id"],
19216
+ flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
19217
+ id: json["id"],
19218
+ name: json["name"],
19219
+ planId: json["plan_id"] == null ? void 0 : json["plan_id"],
19220
+ priority: json["priority"],
19221
+ ruleType: json["rule_type"],
19222
+ updatedAt: new Date(json["updated_at"]),
19223
+ value: json["value"]
19089
19224
  };
19090
19225
  }
19091
- function CountApiRequestsParamsToJSON(value) {
19226
+ function RuleDetailResponseDataToJSON(value) {
19092
19227
  if (value == null) {
19093
19228
  return value;
19094
19229
  }
19095
19230
  return {
19231
+ condition_groups: value["conditionGroups"].map(
19232
+ RuleConditionGroupDetailResponseDataToJSON
19233
+ ),
19234
+ conditions: value["conditions"].map(
19235
+ RuleConditionDetailResponseDataToJSON
19236
+ ),
19237
+ created_at: value["createdAt"].toISOString(),
19096
19238
  environment_id: value["environmentId"],
19097
- limit: value["limit"],
19098
- offset: value["offset"],
19099
- q: value["q"],
19100
- request_type: value["requestType"]
19101
- };
19102
- }
19103
-
19104
- // src/api/models/CountApiRequestsResponse.ts
19105
- function instanceOfCountApiRequestsResponse(value) {
19106
- if (!("data" in value) || value["data"] === void 0)
19239
+ flag_id: value["flagId"],
19240
+ id: value["id"],
19241
+ name: value["name"],
19242
+ plan_id: value["planId"],
19243
+ priority: value["priority"],
19244
+ rule_type: value["ruleType"],
19245
+ updated_at: value["updatedAt"].toISOString(),
19246
+ value: value["value"]
19247
+ };
19248
+ }
19249
+
19250
+ // src/api/models/FlagCheckLogResponseData.ts
19251
+ function instanceOfFlagCheckLogResponseData(value) {
19252
+ if (!("checkStatus" in value) || value["checkStatus"] === void 0)
19107
19253
  return false;
19108
- if (!("params" in value) || value["params"] === void 0)
19254
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
19255
+ return false;
19256
+ if (!("environmentId" in value) || value["environmentId"] === void 0)
19257
+ return false;
19258
+ if (!("flagKey" in value) || value["flagKey"] === void 0)
19259
+ return false;
19260
+ if (!("id" in value) || value["id"] === void 0)
19261
+ return false;
19262
+ if (!("reason" in value) || value["reason"] === void 0)
19263
+ return false;
19264
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
19265
+ return false;
19266
+ if (!("value" in value) || value["value"] === void 0)
19109
19267
  return false;
19110
19268
  return true;
19111
19269
  }
19112
- function CountApiRequestsResponseFromJSON(json) {
19113
- return CountApiRequestsResponseFromJSONTyped(json, false);
19270
+ function FlagCheckLogResponseDataFromJSON(json) {
19271
+ return FlagCheckLogResponseDataFromJSONTyped(json, false);
19114
19272
  }
19115
- function CountApiRequestsResponseFromJSONTyped(json, ignoreDiscriminator) {
19273
+ function FlagCheckLogResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19116
19274
  if (json == null) {
19117
19275
  return json;
19118
19276
  }
19119
19277
  return {
19120
- data: CountResponseFromJSON(json["data"]),
19121
- params: CountApiRequestsParamsFromJSON(json["params"])
19278
+ checkStatus: json["check_status"],
19279
+ companyId: json["company_id"] == null ? void 0 : json["company_id"],
19280
+ createdAt: new Date(json["created_at"]),
19281
+ environmentId: json["environment_id"],
19282
+ error: json["error"] == null ? void 0 : json["error"],
19283
+ flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
19284
+ flagKey: json["flag_key"],
19285
+ id: json["id"],
19286
+ reason: json["reason"],
19287
+ reqCompany: json["req_company"] == null ? void 0 : json["req_company"],
19288
+ reqUser: json["req_user"] == null ? void 0 : json["req_user"],
19289
+ ruleId: json["rule_id"] == null ? void 0 : json["rule_id"],
19290
+ updatedAt: new Date(json["updated_at"]),
19291
+ userId: json["user_id"] == null ? void 0 : json["user_id"],
19292
+ value: json["value"]
19122
19293
  };
19123
19294
  }
19124
- function CountApiRequestsResponseToJSON(value) {
19295
+ function FlagCheckLogResponseDataToJSON(value) {
19125
19296
  if (value == null) {
19126
19297
  return value;
19127
19298
  }
19128
19299
  return {
19129
- data: CountResponseToJSON(value["data"]),
19130
- params: CountApiRequestsParamsToJSON(value["params"])
19300
+ check_status: value["checkStatus"],
19301
+ company_id: value["companyId"],
19302
+ created_at: value["createdAt"].toISOString(),
19303
+ environment_id: value["environmentId"],
19304
+ error: value["error"],
19305
+ flag_id: value["flagId"],
19306
+ flag_key: value["flagKey"],
19307
+ id: value["id"],
19308
+ reason: value["reason"],
19309
+ req_company: value["reqCompany"],
19310
+ req_user: value["reqUser"],
19311
+ rule_id: value["ruleId"],
19312
+ updated_at: value["updatedAt"].toISOString(),
19313
+ user_id: value["userId"],
19314
+ value: value["value"]
19131
19315
  };
19132
19316
  }
19133
19317
 
19134
- // src/api/models/CountAudienceCompaniesResponse.ts
19135
- function instanceOfCountAudienceCompaniesResponse(value) {
19136
- if (!("data" in value) || value["data"] === void 0)
19318
+ // src/api/models/FlagDetailResponseData.ts
19319
+ function instanceOfFlagDetailResponseData(value) {
19320
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
19137
19321
  return false;
19138
- if (!("params" in value) || value["params"] === void 0)
19322
+ if (!("defaultValue" in value) || value["defaultValue"] === void 0)
19323
+ return false;
19324
+ if (!("description" in value) || value["description"] === void 0)
19325
+ return false;
19326
+ if (!("flagType" in value) || value["flagType"] === void 0)
19327
+ return false;
19328
+ if (!("id" in value) || value["id"] === void 0)
19329
+ return false;
19330
+ if (!("key" in value) || value["key"] === void 0)
19331
+ return false;
19332
+ if (!("name" in value) || value["name"] === void 0)
19333
+ return false;
19334
+ if (!("rules" in value) || value["rules"] === void 0)
19335
+ return false;
19336
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
19139
19337
  return false;
19140
19338
  return true;
19141
19339
  }
19142
- function CountAudienceCompaniesResponseFromJSON(json) {
19143
- return CountAudienceCompaniesResponseFromJSONTyped(json, false);
19340
+ function FlagDetailResponseDataFromJSON(json) {
19341
+ return FlagDetailResponseDataFromJSONTyped(json, false);
19144
19342
  }
19145
- function CountAudienceCompaniesResponseFromJSONTyped(json, ignoreDiscriminator) {
19343
+ function FlagDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19146
19344
  if (json == null) {
19147
19345
  return json;
19148
19346
  }
19149
19347
  return {
19150
- data: CountResponseFromJSON(json["data"]),
19151
- params: json["params"]
19348
+ createdAt: new Date(json["created_at"]),
19349
+ defaultValue: json["default_value"],
19350
+ description: json["description"],
19351
+ feature: json["feature"] == null ? void 0 : FeatureResponseDataFromJSON(json["feature"]),
19352
+ featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
19353
+ flagType: json["flag_type"],
19354
+ id: json["id"],
19355
+ key: json["key"],
19356
+ latestCheck: json["latest_check"] == null ? void 0 : FlagCheckLogResponseDataFromJSON(json["latest_check"]),
19357
+ name: json["name"],
19358
+ rules: json["rules"].map(RuleDetailResponseDataFromJSON),
19359
+ updatedAt: new Date(json["updated_at"])
19152
19360
  };
19153
19361
  }
19154
- function CountAudienceCompaniesResponseToJSON(value) {
19362
+ function FlagDetailResponseDataToJSON(value) {
19155
19363
  if (value == null) {
19156
19364
  return value;
19157
19365
  }
19158
19366
  return {
19159
- data: CountResponseToJSON(value["data"]),
19160
- params: value["params"]
19367
+ created_at: value["createdAt"].toISOString(),
19368
+ default_value: value["defaultValue"],
19369
+ description: value["description"],
19370
+ feature: FeatureResponseDataToJSON(value["feature"]),
19371
+ feature_id: value["featureId"],
19372
+ flag_type: value["flagType"],
19373
+ id: value["id"],
19374
+ key: value["key"],
19375
+ latest_check: FlagCheckLogResponseDataToJSON(value["latestCheck"]),
19376
+ name: value["name"],
19377
+ rules: value["rules"].map(RuleDetailResponseDataToJSON),
19378
+ updated_at: value["updatedAt"].toISOString()
19161
19379
  };
19162
19380
  }
19163
19381
 
19164
- // src/api/models/CountAudienceUsersResponse.ts
19165
- function instanceOfCountAudienceUsersResponse(value) {
19166
- if (!("data" in value) || value["data"] === void 0)
19382
+ // src/api/models/FeatureDetailResponseData.ts
19383
+ function instanceOfFeatureDetailResponseData(value) {
19384
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
19167
19385
  return false;
19168
- if (!("params" in value) || value["params"] === void 0)
19386
+ if (!("description" in value) || value["description"] === void 0)
19387
+ return false;
19388
+ if (!("featureType" in value) || value["featureType"] === void 0)
19389
+ return false;
19390
+ if (!("flags" in value) || value["flags"] === void 0)
19391
+ return false;
19392
+ if (!("id" in value) || value["id"] === void 0)
19393
+ return false;
19394
+ if (!("name" in value) || value["name"] === void 0)
19395
+ return false;
19396
+ if (!("plans" in value) || value["plans"] === void 0)
19397
+ return false;
19398
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
19169
19399
  return false;
19170
19400
  return true;
19171
19401
  }
19172
- function CountAudienceUsersResponseFromJSON(json) {
19173
- return CountAudienceUsersResponseFromJSONTyped(json, false);
19402
+ function FeatureDetailResponseDataFromJSON(json) {
19403
+ return FeatureDetailResponseDataFromJSONTyped(json, false);
19174
19404
  }
19175
- function CountAudienceUsersResponseFromJSONTyped(json, ignoreDiscriminator) {
19405
+ function FeatureDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19176
19406
  if (json == null) {
19177
19407
  return json;
19178
19408
  }
19179
19409
  return {
19180
- data: CountResponseFromJSON(json["data"]),
19181
- params: json["params"]
19410
+ createdAt: new Date(json["created_at"]),
19411
+ description: json["description"],
19412
+ eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
19413
+ eventSummary: json["event_summary"] == null ? void 0 : EventSummaryResponseDataFromJSON(json["event_summary"]),
19414
+ featureType: json["feature_type"],
19415
+ flags: json["flags"].map(FlagDetailResponseDataFromJSON),
19416
+ id: json["id"],
19417
+ lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
19418
+ name: json["name"],
19419
+ plans: json["plans"].map(PreviewObjectFromJSON),
19420
+ trait: json["trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["trait"]),
19421
+ traitId: json["trait_id"] == null ? void 0 : json["trait_id"],
19422
+ updatedAt: new Date(json["updated_at"])
19182
19423
  };
19183
19424
  }
19184
- function CountAudienceUsersResponseToJSON(value) {
19425
+ function FeatureDetailResponseDataToJSON(value) {
19185
19426
  if (value == null) {
19186
19427
  return value;
19187
19428
  }
19188
19429
  return {
19189
- data: CountResponseToJSON(value["data"]),
19190
- params: value["params"]
19430
+ created_at: value["createdAt"].toISOString(),
19431
+ description: value["description"],
19432
+ event_subtype: value["eventSubtype"],
19433
+ event_summary: EventSummaryResponseDataToJSON(value["eventSummary"]),
19434
+ feature_type: value["featureType"],
19435
+ flags: value["flags"].map(FlagDetailResponseDataToJSON),
19436
+ id: value["id"],
19437
+ lifecycle_phase: value["lifecyclePhase"],
19438
+ name: value["name"],
19439
+ plans: value["plans"].map(PreviewObjectToJSON),
19440
+ trait: EntityTraitDefinitionResponseDataToJSON(value["trait"]),
19441
+ trait_id: value["traitId"],
19442
+ updated_at: value["updatedAt"].toISOString()
19191
19443
  };
19192
19444
  }
19193
19445
 
19194
- // src/api/models/CountCompaniesParams.ts
19195
- function instanceOfCountCompaniesParams(value) {
19446
+ // src/api/models/PlanResponseData.ts
19447
+ function instanceOfPlanResponseData(value) {
19448
+ if (!("audienceType" in value) || value["audienceType"] === void 0)
19449
+ return false;
19450
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
19451
+ return false;
19452
+ if (!("description" in value) || value["description"] === void 0)
19453
+ return false;
19454
+ if (!("id" in value) || value["id"] === void 0)
19455
+ return false;
19456
+ if (!("name" in value) || value["name"] === void 0)
19457
+ return false;
19458
+ if (!("planType" in value) || value["planType"] === void 0)
19459
+ return false;
19460
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
19461
+ return false;
19196
19462
  return true;
19197
19463
  }
19198
- function CountCompaniesParamsFromJSON(json) {
19199
- return CountCompaniesParamsFromJSONTyped(json, false);
19464
+ function PlanResponseDataFromJSON(json) {
19465
+ return PlanResponseDataFromJSONTyped(json, false);
19200
19466
  }
19201
- function CountCompaniesParamsFromJSONTyped(json, ignoreDiscriminator) {
19467
+ function PlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19202
19468
  if (json == null) {
19203
19469
  return json;
19204
19470
  }
19205
19471
  return {
19206
- ids: json["ids"] == null ? void 0 : json["ids"],
19207
- limit: json["limit"] == null ? void 0 : json["limit"],
19208
- offset: json["offset"] == null ? void 0 : json["offset"],
19209
- planId: json["plan_id"] == null ? void 0 : json["plan_id"],
19210
- q: json["q"] == null ? void 0 : json["q"],
19211
- withoutFeatureOverrideFor: json["without_feature_override_for"] == null ? void 0 : json["without_feature_override_for"]
19472
+ audienceType: json["audience_type"],
19473
+ createdAt: new Date(json["created_at"]),
19474
+ description: json["description"],
19475
+ id: json["id"],
19476
+ name: json["name"],
19477
+ planType: json["plan_type"],
19478
+ updatedAt: new Date(json["updated_at"])
19212
19479
  };
19213
19480
  }
19214
- function CountCompaniesParamsToJSON(value) {
19481
+ function PlanResponseDataToJSON(value) {
19215
19482
  if (value == null) {
19216
19483
  return value;
19217
19484
  }
19218
19485
  return {
19219
- ids: value["ids"],
19220
- limit: value["limit"],
19221
- offset: value["offset"],
19222
- plan_id: value["planId"],
19223
- q: value["q"],
19224
- without_feature_override_for: value["withoutFeatureOverrideFor"]
19486
+ audience_type: value["audienceType"],
19487
+ created_at: value["createdAt"].toISOString(),
19488
+ description: value["description"],
19489
+ id: value["id"],
19490
+ name: value["name"],
19491
+ plan_type: value["planType"],
19492
+ updated_at: value["updatedAt"].toISOString()
19225
19493
  };
19226
19494
  }
19227
19495
 
19228
- // src/api/models/CountCompaniesResponse.ts
19229
- function instanceOfCountCompaniesResponse(value) {
19230
- if (!("data" in value) || value["data"] === void 0)
19496
+ // src/api/models/FeatureUsageResponseData.ts
19497
+ var FeatureUsageResponseDataAllocationTypeEnum = {
19498
+ Boolean: "boolean",
19499
+ Numeric: "numeric",
19500
+ Trait: "trait",
19501
+ Unlimited: "unlimited"
19502
+ };
19503
+ function instanceOfFeatureUsageResponseData(value) {
19504
+ if (!("access" in value) || value["access"] === void 0)
19231
19505
  return false;
19232
- if (!("params" in value) || value["params"] === void 0)
19506
+ if (!("allocationType" in value) || value["allocationType"] === void 0)
19233
19507
  return false;
19234
- return true;
19235
- }
19236
- function CountCompaniesResponseFromJSON(json) {
19237
- return CountCompaniesResponseFromJSONTyped(json, false);
19508
+ if (!("entitlementId" in value) || value["entitlementId"] === void 0)
19509
+ return false;
19510
+ if (!("entitlementType" in value) || value["entitlementType"] === void 0)
19511
+ return false;
19512
+ return true;
19238
19513
  }
19239
- function CountCompaniesResponseFromJSONTyped(json, ignoreDiscriminator) {
19514
+ function FeatureUsageResponseDataFromJSON(json) {
19515
+ return FeatureUsageResponseDataFromJSONTyped(json, false);
19516
+ }
19517
+ function FeatureUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19240
19518
  if (json == null) {
19241
19519
  return json;
19242
19520
  }
19243
19521
  return {
19244
- data: CountResponseFromJSON(json["data"]),
19245
- params: CountCompaniesParamsFromJSON(json["params"])
19522
+ access: json["access"],
19523
+ allocation: json["allocation"] == null ? void 0 : json["allocation"],
19524
+ allocationType: json["allocation_type"],
19525
+ entitlementId: json["entitlement_id"],
19526
+ entitlementType: json["entitlement_type"],
19527
+ feature: json["feature"] == null ? void 0 : FeatureDetailResponseDataFromJSON(json["feature"]),
19528
+ period: json["period"] == null ? void 0 : json["period"],
19529
+ plan: json["plan"] == null ? void 0 : PlanResponseDataFromJSON(json["plan"]),
19530
+ usage: json["usage"] == null ? void 0 : json["usage"]
19246
19531
  };
19247
19532
  }
19248
- function CountCompaniesResponseToJSON(value) {
19533
+ function FeatureUsageResponseDataToJSON(value) {
19249
19534
  if (value == null) {
19250
19535
  return value;
19251
19536
  }
19252
19537
  return {
19253
- data: CountResponseToJSON(value["data"]),
19254
- params: CountCompaniesParamsToJSON(value["params"])
19538
+ access: value["access"],
19539
+ allocation: value["allocation"],
19540
+ allocation_type: value["allocationType"],
19541
+ entitlement_id: value["entitlementId"],
19542
+ entitlement_type: value["entitlementType"],
19543
+ feature: FeatureDetailResponseDataToJSON(value["feature"]),
19544
+ period: value["period"],
19545
+ plan: PlanResponseDataToJSON(value["plan"]),
19546
+ usage: value["usage"]
19255
19547
  };
19256
19548
  }
19257
19549
 
19258
- // src/api/models/CountCompanyOverridesParams.ts
19259
- function instanceOfCountCompanyOverridesParams(value) {
19550
+ // src/api/models/FeatureUsageDetailResponseData.ts
19551
+ function instanceOfFeatureUsageDetailResponseData(value) {
19552
+ if (!("features" in value) || value["features"] === void 0)
19553
+ return false;
19260
19554
  return true;
19261
19555
  }
19262
- function CountCompanyOverridesParamsFromJSON(json) {
19263
- return CountCompanyOverridesParamsFromJSONTyped(json, false);
19556
+ function FeatureUsageDetailResponseDataFromJSON(json) {
19557
+ return FeatureUsageDetailResponseDataFromJSONTyped(json, false);
19264
19558
  }
19265
- function CountCompanyOverridesParamsFromJSONTyped(json, ignoreDiscriminator) {
19559
+ function FeatureUsageDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19266
19560
  if (json == null) {
19267
19561
  return json;
19268
19562
  }
19269
19563
  return {
19270
- companyId: json["company_id"] == null ? void 0 : json["company_id"],
19271
- companyIds: json["company_ids"] == null ? void 0 : json["company_ids"],
19272
- featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
19273
- featureIds: json["feature_ids"] == null ? void 0 : json["feature_ids"],
19274
- ids: json["ids"] == null ? void 0 : json["ids"],
19275
- limit: json["limit"] == null ? void 0 : json["limit"],
19276
- offset: json["offset"] == null ? void 0 : json["offset"],
19277
- q: json["q"] == null ? void 0 : json["q"]
19564
+ features: json["features"].map(
19565
+ FeatureUsageResponseDataFromJSON
19566
+ )
19278
19567
  };
19279
19568
  }
19280
- function CountCompanyOverridesParamsToJSON(value) {
19569
+ function FeatureUsageDetailResponseDataToJSON(value) {
19281
19570
  if (value == null) {
19282
19571
  return value;
19283
19572
  }
19284
19573
  return {
19285
- company_id: value["companyId"],
19286
- company_ids: value["companyIds"],
19287
- feature_id: value["featureId"],
19288
- feature_ids: value["featureIds"],
19289
- ids: value["ids"],
19290
- limit: value["limit"],
19291
- offset: value["offset"],
19292
- q: value["q"]
19574
+ features: value["features"].map(
19575
+ FeatureUsageResponseDataToJSON
19576
+ )
19293
19577
  };
19294
19578
  }
19295
19579
 
19296
- // src/api/models/CountCompanyOverridesResponse.ts
19297
- function instanceOfCountCompanyOverridesResponse(value) {
19298
- if (!("data" in value) || value["data"] === void 0)
19299
- return false;
19300
- if (!("params" in value) || value["params"] === void 0)
19301
- return false;
19580
+ // src/api/models/ComponentHydrateResponseData.ts
19581
+ function instanceOfComponentHydrateResponseData(value) {
19302
19582
  return true;
19303
19583
  }
19304
- function CountCompanyOverridesResponseFromJSON(json) {
19305
- return CountCompanyOverridesResponseFromJSONTyped(json, false);
19584
+ function ComponentHydrateResponseDataFromJSON(json) {
19585
+ return ComponentHydrateResponseDataFromJSONTyped(json, false);
19306
19586
  }
19307
- function CountCompanyOverridesResponseFromJSONTyped(json, ignoreDiscriminator) {
19587
+ function ComponentHydrateResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19308
19588
  if (json == null) {
19309
19589
  return json;
19310
19590
  }
19311
19591
  return {
19312
- data: CountResponseFromJSON(json["data"]),
19313
- params: CountCompanyOverridesParamsFromJSON(json["params"])
19592
+ company: json["company"] == null ? void 0 : CompanyDetailResponseDataFromJSON(json["company"]),
19593
+ component: json["component"] == null ? void 0 : ComponentResponseDataFromJSON(json["component"]),
19594
+ featureUsage: json["feature_usage"] == null ? void 0 : FeatureUsageDetailResponseDataFromJSON(json["feature_usage"])
19314
19595
  };
19315
19596
  }
19316
- function CountCompanyOverridesResponseToJSON(value) {
19597
+ function ComponentHydrateResponseDataToJSON(value) {
19317
19598
  if (value == null) {
19318
19599
  return value;
19319
19600
  }
19320
19601
  return {
19321
- data: CountResponseToJSON(value["data"]),
19322
- params: CountCompanyOverridesParamsToJSON(value["params"])
19602
+ company: CompanyDetailResponseDataToJSON(value["company"]),
19603
+ component: ComponentResponseDataToJSON(value["component"]),
19604
+ feature_usage: FeatureUsageDetailResponseDataToJSON(value["featureUsage"])
19323
19605
  };
19324
19606
  }
19325
19607
 
19326
- // src/api/models/CountComponentsParams.ts
19327
- function instanceOfCountComponentsParams(value) {
19608
+ // src/api/models/CountApiKeysParams.ts
19609
+ function instanceOfCountApiKeysParams(value) {
19328
19610
  return true;
19329
19611
  }
19330
- function CountComponentsParamsFromJSON(json) {
19331
- return CountComponentsParamsFromJSONTyped(json, false);
19612
+ function CountApiKeysParamsFromJSON(json) {
19613
+ return CountApiKeysParamsFromJSONTyped(json, false);
19332
19614
  }
19333
- function CountComponentsParamsFromJSONTyped(json, ignoreDiscriminator) {
19615
+ function CountApiKeysParamsFromJSONTyped(json, ignoreDiscriminator) {
19334
19616
  if (json == null) {
19335
19617
  return json;
19336
19618
  }
19337
19619
  return {
19620
+ environmentId: json["environment_id"] == null ? void 0 : json["environment_id"],
19338
19621
  limit: json["limit"] == null ? void 0 : json["limit"],
19339
19622
  offset: json["offset"] == null ? void 0 : json["offset"],
19340
- q: json["q"] == null ? void 0 : json["q"]
19623
+ requireEnvironment: json["require_environment"] == null ? void 0 : json["require_environment"]
19341
19624
  };
19342
19625
  }
19343
- function CountComponentsParamsToJSON(value) {
19626
+ function CountApiKeysParamsToJSON(value) {
19344
19627
  if (value == null) {
19345
19628
  return value;
19346
19629
  }
19347
19630
  return {
19631
+ environment_id: value["environmentId"],
19348
19632
  limit: value["limit"],
19349
19633
  offset: value["offset"],
19350
- q: value["q"]
19634
+ require_environment: value["requireEnvironment"]
19351
19635
  };
19352
19636
  }
19353
19637
 
19354
- // src/api/models/CountComponentsResponse.ts
19355
- function instanceOfCountComponentsResponse(value) {
19638
+ // src/api/models/CountResponse.ts
19639
+ function instanceOfCountResponse(value) {
19640
+ if (!("count" in value) || value["count"] === void 0)
19641
+ return false;
19642
+ return true;
19643
+ }
19644
+ function CountResponseFromJSON(json) {
19645
+ return CountResponseFromJSONTyped(json, false);
19646
+ }
19647
+ function CountResponseFromJSONTyped(json, ignoreDiscriminator) {
19648
+ if (json == null) {
19649
+ return json;
19650
+ }
19651
+ return {
19652
+ count: json["count"]
19653
+ };
19654
+ }
19655
+ function CountResponseToJSON(value) {
19656
+ if (value == null) {
19657
+ return value;
19658
+ }
19659
+ return {
19660
+ count: value["count"]
19661
+ };
19662
+ }
19663
+
19664
+ // src/api/models/CountApiKeysResponse.ts
19665
+ function instanceOfCountApiKeysResponse(value) {
19356
19666
  if (!("data" in value) || value["data"] === void 0)
19357
19667
  return false;
19358
19668
  if (!("params" in value) || value["params"] === void 0)
19359
19669
  return false;
19360
19670
  return true;
19361
19671
  }
19362
- function CountComponentsResponseFromJSON(json) {
19363
- return CountComponentsResponseFromJSONTyped(json, false);
19672
+ function CountApiKeysResponseFromJSON(json) {
19673
+ return CountApiKeysResponseFromJSONTyped(json, false);
19364
19674
  }
19365
- function CountComponentsResponseFromJSONTyped(json, ignoreDiscriminator) {
19675
+ function CountApiKeysResponseFromJSONTyped(json, ignoreDiscriminator) {
19366
19676
  if (json == null) {
19367
19677
  return json;
19368
19678
  }
19369
19679
  return {
19370
19680
  data: CountResponseFromJSON(json["data"]),
19371
- params: CountComponentsParamsFromJSON(json["params"])
19681
+ params: CountApiKeysParamsFromJSON(json["params"])
19372
19682
  };
19373
19683
  }
19374
- function CountComponentsResponseToJSON(value) {
19684
+ function CountApiKeysResponseToJSON(value) {
19375
19685
  if (value == null) {
19376
19686
  return value;
19377
19687
  }
19378
19688
  return {
19379
19689
  data: CountResponseToJSON(value["data"]),
19380
- params: CountComponentsParamsToJSON(value["params"])
19690
+ params: CountApiKeysParamsToJSON(value["params"])
19381
19691
  };
19382
19692
  }
19383
19693
 
19384
- // src/api/models/CountEntityKeyDefinitionsParams.ts
19385
- var CountEntityKeyDefinitionsParamsEntityTypeEnum = {
19386
- Company: "company",
19387
- User: "user"
19388
- };
19389
- function instanceOfCountEntityKeyDefinitionsParams(value) {
19694
+ // src/api/models/CountApiRequestsParams.ts
19695
+ function instanceOfCountApiRequestsParams(value) {
19390
19696
  return true;
19391
19697
  }
19392
- function CountEntityKeyDefinitionsParamsFromJSON(json) {
19393
- return CountEntityKeyDefinitionsParamsFromJSONTyped(json, false);
19698
+ function CountApiRequestsParamsFromJSON(json) {
19699
+ return CountApiRequestsParamsFromJSONTyped(json, false);
19394
19700
  }
19395
- function CountEntityKeyDefinitionsParamsFromJSONTyped(json, ignoreDiscriminator) {
19701
+ function CountApiRequestsParamsFromJSONTyped(json, ignoreDiscriminator) {
19396
19702
  if (json == null) {
19397
19703
  return json;
19398
19704
  }
19399
19705
  return {
19400
- entityType: json["entity_type"] == null ? void 0 : json["entity_type"],
19401
- ids: json["ids"] == null ? void 0 : json["ids"],
19706
+ environmentId: json["environment_id"] == null ? void 0 : json["environment_id"],
19402
19707
  limit: json["limit"] == null ? void 0 : json["limit"],
19403
19708
  offset: json["offset"] == null ? void 0 : json["offset"],
19404
- q: json["q"] == null ? void 0 : json["q"]
19709
+ q: json["q"] == null ? void 0 : json["q"],
19710
+ requestType: json["request_type"] == null ? void 0 : json["request_type"]
19405
19711
  };
19406
19712
  }
19407
- function CountEntityKeyDefinitionsParamsToJSON(value) {
19713
+ function CountApiRequestsParamsToJSON(value) {
19408
19714
  if (value == null) {
19409
19715
  return value;
19410
19716
  }
19411
19717
  return {
19412
- entity_type: value["entityType"],
19413
- ids: value["ids"],
19718
+ environment_id: value["environmentId"],
19414
19719
  limit: value["limit"],
19415
19720
  offset: value["offset"],
19416
- q: value["q"]
19721
+ q: value["q"],
19722
+ request_type: value["requestType"]
19417
19723
  };
19418
19724
  }
19419
19725
 
19420
- // src/api/models/CountEntityKeyDefinitionsResponse.ts
19421
- function instanceOfCountEntityKeyDefinitionsResponse(value) {
19726
+ // src/api/models/CountApiRequestsResponse.ts
19727
+ function instanceOfCountApiRequestsResponse(value) {
19422
19728
  if (!("data" in value) || value["data"] === void 0)
19423
19729
  return false;
19424
19730
  if (!("params" in value) || value["params"] === void 0)
19425
19731
  return false;
19426
19732
  return true;
19427
19733
  }
19428
- function CountEntityKeyDefinitionsResponseFromJSON(json) {
19429
- return CountEntityKeyDefinitionsResponseFromJSONTyped(json, false);
19734
+ function CountApiRequestsResponseFromJSON(json) {
19735
+ return CountApiRequestsResponseFromJSONTyped(json, false);
19430
19736
  }
19431
- function CountEntityKeyDefinitionsResponseFromJSONTyped(json, ignoreDiscriminator) {
19737
+ function CountApiRequestsResponseFromJSONTyped(json, ignoreDiscriminator) {
19432
19738
  if (json == null) {
19433
19739
  return json;
19434
19740
  }
19435
19741
  return {
19436
19742
  data: CountResponseFromJSON(json["data"]),
19437
- params: CountEntityKeyDefinitionsParamsFromJSON(json["params"])
19743
+ params: CountApiRequestsParamsFromJSON(json["params"])
19438
19744
  };
19439
19745
  }
19440
- function CountEntityKeyDefinitionsResponseToJSON(value) {
19746
+ function CountApiRequestsResponseToJSON(value) {
19441
19747
  if (value == null) {
19442
19748
  return value;
19443
19749
  }
19444
19750
  return {
19445
19751
  data: CountResponseToJSON(value["data"]),
19446
- params: CountEntityKeyDefinitionsParamsToJSON(value["params"])
19752
+ params: CountApiRequestsParamsToJSON(value["params"])
19447
19753
  };
19448
19754
  }
19449
19755
 
19450
- // src/api/models/CountEntityTraitDefinitionsParams.ts
19451
- var CountEntityTraitDefinitionsParamsEntityTypeEnum = {
19452
- Company: "company",
19453
- User: "user"
19454
- };
19455
- var CountEntityTraitDefinitionsParamsTraitTypeEnum = {
19456
- Boolean: "boolean",
19457
- Currency: "currency",
19458
- Date: "date",
19459
- Number: "number",
19460
- String: "string",
19461
- Url: "url"
19462
- };
19463
- function instanceOfCountEntityTraitDefinitionsParams(value) {
19756
+ // src/api/models/CountAudienceCompaniesResponse.ts
19757
+ function instanceOfCountAudienceCompaniesResponse(value) {
19758
+ if (!("data" in value) || value["data"] === void 0)
19759
+ return false;
19760
+ if (!("params" in value) || value["params"] === void 0)
19761
+ return false;
19464
19762
  return true;
19465
19763
  }
19466
- function CountEntityTraitDefinitionsParamsFromJSON(json) {
19467
- return CountEntityTraitDefinitionsParamsFromJSONTyped(json, false);
19764
+ function CountAudienceCompaniesResponseFromJSON(json) {
19765
+ return CountAudienceCompaniesResponseFromJSONTyped(json, false);
19468
19766
  }
19469
- function CountEntityTraitDefinitionsParamsFromJSONTyped(json, ignoreDiscriminator) {
19767
+ function CountAudienceCompaniesResponseFromJSONTyped(json, ignoreDiscriminator) {
19470
19768
  if (json == null) {
19471
19769
  return json;
19472
19770
  }
19473
19771
  return {
19474
- entityType: json["entity_type"] == null ? void 0 : json["entity_type"],
19475
- ids: json["ids"] == null ? void 0 : json["ids"],
19476
- limit: json["limit"] == null ? void 0 : json["limit"],
19477
- offset: json["offset"] == null ? void 0 : json["offset"],
19478
- q: json["q"] == null ? void 0 : json["q"],
19479
- traitType: json["trait_type"] == null ? void 0 : json["trait_type"]
19772
+ data: CountResponseFromJSON(json["data"]),
19773
+ params: json["params"]
19480
19774
  };
19481
19775
  }
19482
- function CountEntityTraitDefinitionsParamsToJSON(value) {
19776
+ function CountAudienceCompaniesResponseToJSON(value) {
19483
19777
  if (value == null) {
19484
19778
  return value;
19485
19779
  }
19486
19780
  return {
19487
- entity_type: value["entityType"],
19488
- ids: value["ids"],
19489
- limit: value["limit"],
19490
- offset: value["offset"],
19491
- q: value["q"],
19492
- trait_type: value["traitType"]
19781
+ data: CountResponseToJSON(value["data"]),
19782
+ params: value["params"]
19493
19783
  };
19494
19784
  }
19495
19785
 
19496
- // src/api/models/CountEntityTraitDefinitionsResponse.ts
19497
- function instanceOfCountEntityTraitDefinitionsResponse(value) {
19786
+ // src/api/models/CountAudienceUsersResponse.ts
19787
+ function instanceOfCountAudienceUsersResponse(value) {
19498
19788
  if (!("data" in value) || value["data"] === void 0)
19499
19789
  return false;
19500
19790
  if (!("params" in value) || value["params"] === void 0)
19501
19791
  return false;
19502
19792
  return true;
19503
19793
  }
19504
- function CountEntityTraitDefinitionsResponseFromJSON(json) {
19505
- return CountEntityTraitDefinitionsResponseFromJSONTyped(json, false);
19794
+ function CountAudienceUsersResponseFromJSON(json) {
19795
+ return CountAudienceUsersResponseFromJSONTyped(json, false);
19506
19796
  }
19507
- function CountEntityTraitDefinitionsResponseFromJSONTyped(json, ignoreDiscriminator) {
19797
+ function CountAudienceUsersResponseFromJSONTyped(json, ignoreDiscriminator) {
19508
19798
  if (json == null) {
19509
19799
  return json;
19510
19800
  }
19511
19801
  return {
19512
19802
  data: CountResponseFromJSON(json["data"]),
19513
- params: CountEntityTraitDefinitionsParamsFromJSON(json["params"])
19803
+ params: json["params"]
19514
19804
  };
19515
19805
  }
19516
- function CountEntityTraitDefinitionsResponseToJSON(value) {
19806
+ function CountAudienceUsersResponseToJSON(value) {
19517
19807
  if (value == null) {
19518
19808
  return value;
19519
19809
  }
19520
19810
  return {
19521
19811
  data: CountResponseToJSON(value["data"]),
19522
- params: CountEntityTraitDefinitionsParamsToJSON(value["params"])
19812
+ params: value["params"]
19523
19813
  };
19524
19814
  }
19525
19815
 
19526
- // src/api/models/CountFeatureCompaniesParams.ts
19527
- function instanceOfCountFeatureCompaniesParams(value) {
19816
+ // src/api/models/CountCompaniesParams.ts
19817
+ function instanceOfCountCompaniesParams(value) {
19528
19818
  return true;
19529
19819
  }
19530
- function CountFeatureCompaniesParamsFromJSON(json) {
19531
- return CountFeatureCompaniesParamsFromJSONTyped(json, false);
19820
+ function CountCompaniesParamsFromJSON(json) {
19821
+ return CountCompaniesParamsFromJSONTyped(json, false);
19532
19822
  }
19533
- function CountFeatureCompaniesParamsFromJSONTyped(json, ignoreDiscriminator) {
19823
+ function CountCompaniesParamsFromJSONTyped(json, ignoreDiscriminator) {
19534
19824
  if (json == null) {
19535
19825
  return json;
19536
19826
  }
19537
19827
  return {
19538
- featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
19828
+ ids: json["ids"] == null ? void 0 : json["ids"],
19539
19829
  limit: json["limit"] == null ? void 0 : json["limit"],
19540
19830
  offset: json["offset"] == null ? void 0 : json["offset"],
19541
- q: json["q"] == null ? void 0 : json["q"]
19831
+ planId: json["plan_id"] == null ? void 0 : json["plan_id"],
19832
+ q: json["q"] == null ? void 0 : json["q"],
19833
+ withoutFeatureOverrideFor: json["without_feature_override_for"] == null ? void 0 : json["without_feature_override_for"]
19542
19834
  };
19543
19835
  }
19544
- function CountFeatureCompaniesParamsToJSON(value) {
19836
+ function CountCompaniesParamsToJSON(value) {
19545
19837
  if (value == null) {
19546
19838
  return value;
19547
19839
  }
19548
19840
  return {
19549
- feature_id: value["featureId"],
19841
+ ids: value["ids"],
19550
19842
  limit: value["limit"],
19551
19843
  offset: value["offset"],
19552
- q: value["q"]
19844
+ plan_id: value["planId"],
19845
+ q: value["q"],
19846
+ without_feature_override_for: value["withoutFeatureOverrideFor"]
19553
19847
  };
19554
19848
  }
19555
19849
 
19556
- // src/api/models/CountFeatureCompaniesResponse.ts
19557
- function instanceOfCountFeatureCompaniesResponse(value) {
19850
+ // src/api/models/CountCompaniesResponse.ts
19851
+ function instanceOfCountCompaniesResponse(value) {
19558
19852
  if (!("data" in value) || value["data"] === void 0)
19559
19853
  return false;
19560
19854
  if (!("params" in value) || value["params"] === void 0)
19561
19855
  return false;
19562
19856
  return true;
19563
19857
  }
19564
- function CountFeatureCompaniesResponseFromJSON(json) {
19565
- return CountFeatureCompaniesResponseFromJSONTyped(json, false);
19858
+ function CountCompaniesResponseFromJSON(json) {
19859
+ return CountCompaniesResponseFromJSONTyped(json, false);
19566
19860
  }
19567
- function CountFeatureCompaniesResponseFromJSONTyped(json, ignoreDiscriminator) {
19861
+ function CountCompaniesResponseFromJSONTyped(json, ignoreDiscriminator) {
19568
19862
  if (json == null) {
19569
19863
  return json;
19570
19864
  }
19571
19865
  return {
19572
19866
  data: CountResponseFromJSON(json["data"]),
19573
- params: CountFeatureCompaniesParamsFromJSON(json["params"])
19867
+ params: CountCompaniesParamsFromJSON(json["params"])
19574
19868
  };
19575
19869
  }
19576
- function CountFeatureCompaniesResponseToJSON(value) {
19870
+ function CountCompaniesResponseToJSON(value) {
19577
19871
  if (value == null) {
19578
19872
  return value;
19579
19873
  }
19580
19874
  return {
19581
19875
  data: CountResponseToJSON(value["data"]),
19582
- params: CountFeatureCompaniesParamsToJSON(value["params"])
19876
+ params: CountCompaniesParamsToJSON(value["params"])
19583
19877
  };
19584
19878
  }
19585
19879
 
19586
- // src/api/models/CountFeatureUsageParams.ts
19587
- function instanceOfCountFeatureUsageParams(value) {
19880
+ // src/api/models/CountCompanyOverridesParams.ts
19881
+ function instanceOfCountCompanyOverridesParams(value) {
19588
19882
  return true;
19589
19883
  }
19590
- function CountFeatureUsageParamsFromJSON(json) {
19591
- return CountFeatureUsageParamsFromJSONTyped(json, false);
19884
+ function CountCompanyOverridesParamsFromJSON(json) {
19885
+ return CountCompanyOverridesParamsFromJSONTyped(json, false);
19592
19886
  }
19593
- function CountFeatureUsageParamsFromJSONTyped(json, ignoreDiscriminator) {
19887
+ function CountCompanyOverridesParamsFromJSONTyped(json, ignoreDiscriminator) {
19594
19888
  if (json == null) {
19595
19889
  return json;
19596
19890
  }
19597
19891
  return {
19598
19892
  companyId: json["company_id"] == null ? void 0 : json["company_id"],
19599
- companyKeys: json["company_keys"] == null ? void 0 : json["company_keys"],
19893
+ companyIds: json["company_ids"] == null ? void 0 : json["company_ids"],
19894
+ featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
19600
19895
  featureIds: json["feature_ids"] == null ? void 0 : json["feature_ids"],
19896
+ ids: json["ids"] == null ? void 0 : json["ids"],
19601
19897
  limit: json["limit"] == null ? void 0 : json["limit"],
19602
19898
  offset: json["offset"] == null ? void 0 : json["offset"],
19603
19899
  q: json["q"] == null ? void 0 : json["q"]
19604
19900
  };
19605
19901
  }
19606
- function CountFeatureUsageParamsToJSON(value) {
19902
+ function CountCompanyOverridesParamsToJSON(value) {
19607
19903
  if (value == null) {
19608
19904
  return value;
19609
19905
  }
19610
19906
  return {
19611
19907
  company_id: value["companyId"],
19612
- company_keys: value["companyKeys"],
19908
+ company_ids: value["companyIds"],
19909
+ feature_id: value["featureId"],
19613
19910
  feature_ids: value["featureIds"],
19911
+ ids: value["ids"],
19614
19912
  limit: value["limit"],
19615
19913
  offset: value["offset"],
19616
19914
  q: value["q"]
19617
19915
  };
19618
19916
  }
19619
19917
 
19620
- // src/api/models/CountFeatureUsageResponse.ts
19621
- function instanceOfCountFeatureUsageResponse(value) {
19918
+ // src/api/models/CountCompanyOverridesResponse.ts
19919
+ function instanceOfCountCompanyOverridesResponse(value) {
19622
19920
  if (!("data" in value) || value["data"] === void 0)
19623
19921
  return false;
19624
19922
  if (!("params" in value) || value["params"] === void 0)
19625
19923
  return false;
19626
19924
  return true;
19627
19925
  }
19628
- function CountFeatureUsageResponseFromJSON(json) {
19629
- return CountFeatureUsageResponseFromJSONTyped(json, false);
19926
+ function CountCompanyOverridesResponseFromJSON(json) {
19927
+ return CountCompanyOverridesResponseFromJSONTyped(json, false);
19630
19928
  }
19631
- function CountFeatureUsageResponseFromJSONTyped(json, ignoreDiscriminator) {
19929
+ function CountCompanyOverridesResponseFromJSONTyped(json, ignoreDiscriminator) {
19632
19930
  if (json == null) {
19633
19931
  return json;
19634
19932
  }
19635
19933
  return {
19636
19934
  data: CountResponseFromJSON(json["data"]),
19637
- params: CountFeatureUsageParamsFromJSON(json["params"])
19935
+ params: CountCompanyOverridesParamsFromJSON(json["params"])
19638
19936
  };
19639
19937
  }
19640
- function CountFeatureUsageResponseToJSON(value) {
19938
+ function CountCompanyOverridesResponseToJSON(value) {
19641
19939
  if (value == null) {
19642
19940
  return value;
19643
19941
  }
19644
19942
  return {
19645
19943
  data: CountResponseToJSON(value["data"]),
19646
- params: CountFeatureUsageParamsToJSON(value["params"])
19944
+ params: CountCompanyOverridesParamsToJSON(value["params"])
19647
19945
  };
19648
19946
  }
19649
19947
 
19650
- // src/api/models/CountFeatureUsersParams.ts
19651
- function instanceOfCountFeatureUsersParams(value) {
19948
+ // src/api/models/CountComponentsParams.ts
19949
+ function instanceOfCountComponentsParams(value) {
19652
19950
  return true;
19653
19951
  }
19654
- function CountFeatureUsersParamsFromJSON(json) {
19655
- return CountFeatureUsersParamsFromJSONTyped(json, false);
19952
+ function CountComponentsParamsFromJSON(json) {
19953
+ return CountComponentsParamsFromJSONTyped(json, false);
19656
19954
  }
19657
- function CountFeatureUsersParamsFromJSONTyped(json, ignoreDiscriminator) {
19955
+ function CountComponentsParamsFromJSONTyped(json, ignoreDiscriminator) {
19658
19956
  if (json == null) {
19659
19957
  return json;
19660
19958
  }
19661
19959
  return {
19662
- featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
19663
19960
  limit: json["limit"] == null ? void 0 : json["limit"],
19664
19961
  offset: json["offset"] == null ? void 0 : json["offset"],
19665
19962
  q: json["q"] == null ? void 0 : json["q"]
19666
19963
  };
19667
19964
  }
19668
- function CountFeatureUsersParamsToJSON(value) {
19965
+ function CountComponentsParamsToJSON(value) {
19669
19966
  if (value == null) {
19670
19967
  return value;
19671
19968
  }
19672
19969
  return {
19673
- feature_id: value["featureId"],
19674
19970
  limit: value["limit"],
19675
19971
  offset: value["offset"],
19676
19972
  q: value["q"]
19677
19973
  };
19678
19974
  }
19679
19975
 
19680
- // src/api/models/CountFeatureUsersResponse.ts
19681
- function instanceOfCountFeatureUsersResponse(value) {
19976
+ // src/api/models/CountComponentsResponse.ts
19977
+ function instanceOfCountComponentsResponse(value) {
19682
19978
  if (!("data" in value) || value["data"] === void 0)
19683
19979
  return false;
19684
19980
  if (!("params" in value) || value["params"] === void 0)
19685
19981
  return false;
19686
19982
  return true;
19687
19983
  }
19688
- function CountFeatureUsersResponseFromJSON(json) {
19689
- return CountFeatureUsersResponseFromJSONTyped(json, false);
19984
+ function CountComponentsResponseFromJSON(json) {
19985
+ return CountComponentsResponseFromJSONTyped(json, false);
19690
19986
  }
19691
- function CountFeatureUsersResponseFromJSONTyped(json, ignoreDiscriminator) {
19987
+ function CountComponentsResponseFromJSONTyped(json, ignoreDiscriminator) {
19692
19988
  if (json == null) {
19693
19989
  return json;
19694
19990
  }
19695
19991
  return {
19696
19992
  data: CountResponseFromJSON(json["data"]),
19697
- params: CountFeatureUsersParamsFromJSON(json["params"])
19993
+ params: CountComponentsParamsFromJSON(json["params"])
19698
19994
  };
19699
19995
  }
19700
- function CountFeatureUsersResponseToJSON(value) {
19996
+ function CountComponentsResponseToJSON(value) {
19701
19997
  if (value == null) {
19702
19998
  return value;
19703
19999
  }
19704
20000
  return {
19705
20001
  data: CountResponseToJSON(value["data"]),
19706
- params: CountFeatureUsersParamsToJSON(value["params"])
20002
+ params: CountComponentsParamsToJSON(value["params"])
19707
20003
  };
19708
20004
  }
19709
20005
 
19710
- // src/api/models/CountFeaturesParams.ts
19711
- function instanceOfCountFeaturesParams(value) {
20006
+ // src/api/models/CountEntityKeyDefinitionsParams.ts
20007
+ var CountEntityKeyDefinitionsParamsEntityTypeEnum = {
20008
+ Company: "company",
20009
+ User: "user"
20010
+ };
20011
+ function instanceOfCountEntityKeyDefinitionsParams(value) {
19712
20012
  return true;
19713
20013
  }
19714
- function CountFeaturesParamsFromJSON(json) {
19715
- return CountFeaturesParamsFromJSONTyped(json, false);
20014
+ function CountEntityKeyDefinitionsParamsFromJSON(json) {
20015
+ return CountEntityKeyDefinitionsParamsFromJSONTyped(json, false);
19716
20016
  }
19717
- function CountFeaturesParamsFromJSONTyped(json, ignoreDiscriminator) {
20017
+ function CountEntityKeyDefinitionsParamsFromJSONTyped(json, ignoreDiscriminator) {
19718
20018
  if (json == null) {
19719
20019
  return json;
19720
20020
  }
19721
20021
  return {
20022
+ entityType: json["entity_type"] == null ? void 0 : json["entity_type"],
19722
20023
  ids: json["ids"] == null ? void 0 : json["ids"],
19723
20024
  limit: json["limit"] == null ? void 0 : json["limit"],
19724
20025
  offset: json["offset"] == null ? void 0 : json["offset"],
19725
- q: json["q"] == null ? void 0 : json["q"],
19726
- withoutCompanyOverrideFor: json["without_company_override_for"] == null ? void 0 : json["without_company_override_for"],
19727
- withoutPlanEntitlementFor: json["without_plan_entitlement_for"] == null ? void 0 : json["without_plan_entitlement_for"]
20026
+ q: json["q"] == null ? void 0 : json["q"]
19728
20027
  };
19729
20028
  }
19730
- function CountFeaturesParamsToJSON(value) {
20029
+ function CountEntityKeyDefinitionsParamsToJSON(value) {
19731
20030
  if (value == null) {
19732
20031
  return value;
19733
20032
  }
19734
20033
  return {
20034
+ entity_type: value["entityType"],
19735
20035
  ids: value["ids"],
19736
20036
  limit: value["limit"],
19737
20037
  offset: value["offset"],
19738
- q: value["q"],
19739
- without_company_override_for: value["withoutCompanyOverrideFor"],
19740
- without_plan_entitlement_for: value["withoutPlanEntitlementFor"]
20038
+ q: value["q"]
19741
20039
  };
19742
20040
  }
19743
20041
 
19744
- // src/api/models/CountFeaturesResponse.ts
19745
- function instanceOfCountFeaturesResponse(value) {
20042
+ // src/api/models/CountEntityKeyDefinitionsResponse.ts
20043
+ function instanceOfCountEntityKeyDefinitionsResponse(value) {
19746
20044
  if (!("data" in value) || value["data"] === void 0)
19747
20045
  return false;
19748
20046
  if (!("params" in value) || value["params"] === void 0)
19749
20047
  return false;
19750
20048
  return true;
19751
20049
  }
19752
- function CountFeaturesResponseFromJSON(json) {
19753
- return CountFeaturesResponseFromJSONTyped(json, false);
20050
+ function CountEntityKeyDefinitionsResponseFromJSON(json) {
20051
+ return CountEntityKeyDefinitionsResponseFromJSONTyped(json, false);
19754
20052
  }
19755
- function CountFeaturesResponseFromJSONTyped(json, ignoreDiscriminator) {
20053
+ function CountEntityKeyDefinitionsResponseFromJSONTyped(json, ignoreDiscriminator) {
19756
20054
  if (json == null) {
19757
20055
  return json;
19758
20056
  }
19759
20057
  return {
19760
20058
  data: CountResponseFromJSON(json["data"]),
19761
- params: CountFeaturesParamsFromJSON(json["params"])
20059
+ params: CountEntityKeyDefinitionsParamsFromJSON(json["params"])
19762
20060
  };
19763
20061
  }
19764
- function CountFeaturesResponseToJSON(value) {
20062
+ function CountEntityKeyDefinitionsResponseToJSON(value) {
19765
20063
  if (value == null) {
19766
20064
  return value;
19767
20065
  }
19768
20066
  return {
19769
20067
  data: CountResponseToJSON(value["data"]),
19770
- params: CountFeaturesParamsToJSON(value["params"])
20068
+ params: CountEntityKeyDefinitionsParamsToJSON(value["params"])
19771
20069
  };
19772
20070
  }
19773
20071
 
19774
- // src/api/models/CountFlagChecksParams.ts
19775
- function instanceOfCountFlagChecksParams(value) {
20072
+ // src/api/models/CountEntityTraitDefinitionsParams.ts
20073
+ var CountEntityTraitDefinitionsParamsEntityTypeEnum = {
20074
+ Company: "company",
20075
+ User: "user"
20076
+ };
20077
+ var CountEntityTraitDefinitionsParamsTraitTypeEnum = {
20078
+ Boolean: "boolean",
20079
+ Currency: "currency",
20080
+ Date: "date",
20081
+ Number: "number",
20082
+ String: "string",
20083
+ Url: "url"
20084
+ };
20085
+ function instanceOfCountEntityTraitDefinitionsParams(value) {
19776
20086
  return true;
19777
20087
  }
19778
- function CountFlagChecksParamsFromJSON(json) {
19779
- return CountFlagChecksParamsFromJSONTyped(json, false);
20088
+ function CountEntityTraitDefinitionsParamsFromJSON(json) {
20089
+ return CountEntityTraitDefinitionsParamsFromJSONTyped(json, false);
19780
20090
  }
19781
- function CountFlagChecksParamsFromJSONTyped(json, ignoreDiscriminator) {
20091
+ function CountEntityTraitDefinitionsParamsFromJSONTyped(json, ignoreDiscriminator) {
19782
20092
  if (json == null) {
19783
20093
  return json;
19784
20094
  }
19785
20095
  return {
19786
- flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
19787
- flagIds: json["flag_ids"] == null ? void 0 : json["flag_ids"],
19788
- id: json["id"] == null ? void 0 : json["id"],
20096
+ entityType: json["entity_type"] == null ? void 0 : json["entity_type"],
20097
+ ids: json["ids"] == null ? void 0 : json["ids"],
19789
20098
  limit: json["limit"] == null ? void 0 : json["limit"],
19790
- offset: json["offset"] == null ? void 0 : json["offset"]
20099
+ offset: json["offset"] == null ? void 0 : json["offset"],
20100
+ q: json["q"] == null ? void 0 : json["q"],
20101
+ traitType: json["trait_type"] == null ? void 0 : json["trait_type"]
19791
20102
  };
19792
20103
  }
19793
- function CountFlagChecksParamsToJSON(value) {
20104
+ function CountEntityTraitDefinitionsParamsToJSON(value) {
19794
20105
  if (value == null) {
19795
20106
  return value;
19796
20107
  }
19797
20108
  return {
19798
- flag_id: value["flagId"],
19799
- flag_ids: value["flagIds"],
19800
- id: value["id"],
20109
+ entity_type: value["entityType"],
20110
+ ids: value["ids"],
19801
20111
  limit: value["limit"],
19802
- offset: value["offset"]
20112
+ offset: value["offset"],
20113
+ q: value["q"],
20114
+ trait_type: value["traitType"]
19803
20115
  };
19804
20116
  }
19805
20117
 
19806
- // src/api/models/CountFlagChecksResponse.ts
19807
- function instanceOfCountFlagChecksResponse(value) {
20118
+ // src/api/models/CountEntityTraitDefinitionsResponse.ts
20119
+ function instanceOfCountEntityTraitDefinitionsResponse(value) {
19808
20120
  if (!("data" in value) || value["data"] === void 0)
19809
20121
  return false;
19810
20122
  if (!("params" in value) || value["params"] === void 0)
19811
20123
  return false;
19812
20124
  return true;
19813
20125
  }
19814
- function CountFlagChecksResponseFromJSON(json) {
19815
- return CountFlagChecksResponseFromJSONTyped(json, false);
20126
+ function CountEntityTraitDefinitionsResponseFromJSON(json) {
20127
+ return CountEntityTraitDefinitionsResponseFromJSONTyped(json, false);
19816
20128
  }
19817
- function CountFlagChecksResponseFromJSONTyped(json, ignoreDiscriminator) {
20129
+ function CountEntityTraitDefinitionsResponseFromJSONTyped(json, ignoreDiscriminator) {
19818
20130
  if (json == null) {
19819
20131
  return json;
19820
20132
  }
19821
20133
  return {
19822
20134
  data: CountResponseFromJSON(json["data"]),
19823
- params: CountFlagChecksParamsFromJSON(json["params"])
20135
+ params: CountEntityTraitDefinitionsParamsFromJSON(json["params"])
19824
20136
  };
19825
20137
  }
19826
- function CountFlagChecksResponseToJSON(value) {
20138
+ function CountEntityTraitDefinitionsResponseToJSON(value) {
19827
20139
  if (value == null) {
19828
20140
  return value;
19829
20141
  }
19830
20142
  return {
19831
20143
  data: CountResponseToJSON(value["data"]),
19832
- params: CountFlagChecksParamsToJSON(value["params"])
20144
+ params: CountEntityTraitDefinitionsParamsToJSON(value["params"])
19833
20145
  };
19834
20146
  }
19835
20147
 
19836
- // src/api/models/CountFlagsParams.ts
19837
- function instanceOfCountFlagsParams(value) {
20148
+ // src/api/models/CountFeatureCompaniesParams.ts
20149
+ function instanceOfCountFeatureCompaniesParams(value) {
19838
20150
  return true;
19839
20151
  }
19840
- function CountFlagsParamsFromJSON(json) {
19841
- return CountFlagsParamsFromJSONTyped(json, false);
20152
+ function CountFeatureCompaniesParamsFromJSON(json) {
20153
+ return CountFeatureCompaniesParamsFromJSONTyped(json, false);
19842
20154
  }
19843
- function CountFlagsParamsFromJSONTyped(json, ignoreDiscriminator) {
20155
+ function CountFeatureCompaniesParamsFromJSONTyped(json, ignoreDiscriminator) {
19844
20156
  if (json == null) {
19845
20157
  return json;
19846
20158
  }
19847
20159
  return {
19848
20160
  featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
19849
- ids: json["ids"] == null ? void 0 : json["ids"],
19850
20161
  limit: json["limit"] == null ? void 0 : json["limit"],
19851
20162
  offset: json["offset"] == null ? void 0 : json["offset"],
19852
20163
  q: json["q"] == null ? void 0 : json["q"]
19853
20164
  };
19854
20165
  }
19855
- function CountFlagsParamsToJSON(value) {
20166
+ function CountFeatureCompaniesParamsToJSON(value) {
19856
20167
  if (value == null) {
19857
20168
  return value;
19858
20169
  }
19859
20170
  return {
19860
20171
  feature_id: value["featureId"],
19861
- ids: value["ids"],
19862
20172
  limit: value["limit"],
19863
20173
  offset: value["offset"],
19864
20174
  q: value["q"]
19865
20175
  };
19866
20176
  }
19867
20177
 
19868
- // src/api/models/CountFlagsResponse.ts
19869
- function instanceOfCountFlagsResponse(value) {
20178
+ // src/api/models/CountFeatureCompaniesResponse.ts
20179
+ function instanceOfCountFeatureCompaniesResponse(value) {
19870
20180
  if (!("data" in value) || value["data"] === void 0)
19871
20181
  return false;
19872
20182
  if (!("params" in value) || value["params"] === void 0)
19873
20183
  return false;
19874
20184
  return true;
19875
20185
  }
19876
- function CountFlagsResponseFromJSON(json) {
19877
- return CountFlagsResponseFromJSONTyped(json, false);
20186
+ function CountFeatureCompaniesResponseFromJSON(json) {
20187
+ return CountFeatureCompaniesResponseFromJSONTyped(json, false);
19878
20188
  }
19879
- function CountFlagsResponseFromJSONTyped(json, ignoreDiscriminator) {
20189
+ function CountFeatureCompaniesResponseFromJSONTyped(json, ignoreDiscriminator) {
19880
20190
  if (json == null) {
19881
20191
  return json;
19882
20192
  }
19883
20193
  return {
19884
20194
  data: CountResponseFromJSON(json["data"]),
19885
- params: CountFlagsParamsFromJSON(json["params"])
20195
+ params: CountFeatureCompaniesParamsFromJSON(json["params"])
19886
20196
  };
19887
20197
  }
19888
- function CountFlagsResponseToJSON(value) {
20198
+ function CountFeatureCompaniesResponseToJSON(value) {
19889
20199
  if (value == null) {
19890
20200
  return value;
19891
20201
  }
19892
20202
  return {
19893
20203
  data: CountResponseToJSON(value["data"]),
19894
- params: CountFlagsParamsToJSON(value["params"])
20204
+ params: CountFeatureCompaniesParamsToJSON(value["params"])
19895
20205
  };
19896
20206
  }
19897
20207
 
19898
- // src/api/models/CountPlanEntitlementsParams.ts
19899
- function instanceOfCountPlanEntitlementsParams(value) {
20208
+ // src/api/models/CountFeatureUsageParams.ts
20209
+ function instanceOfCountFeatureUsageParams(value) {
19900
20210
  return true;
19901
20211
  }
19902
- function CountPlanEntitlementsParamsFromJSON(json) {
19903
- return CountPlanEntitlementsParamsFromJSONTyped(json, false);
20212
+ function CountFeatureUsageParamsFromJSON(json) {
20213
+ return CountFeatureUsageParamsFromJSONTyped(json, false);
19904
20214
  }
19905
- function CountPlanEntitlementsParamsFromJSONTyped(json, ignoreDiscriminator) {
20215
+ function CountFeatureUsageParamsFromJSONTyped(json, ignoreDiscriminator) {
19906
20216
  if (json == null) {
19907
20217
  return json;
19908
20218
  }
19909
20219
  return {
19910
- featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
20220
+ companyId: json["company_id"] == null ? void 0 : json["company_id"],
20221
+ companyKeys: json["company_keys"] == null ? void 0 : json["company_keys"],
19911
20222
  featureIds: json["feature_ids"] == null ? void 0 : json["feature_ids"],
19912
- ids: json["ids"] == null ? void 0 : json["ids"],
19913
20223
  limit: json["limit"] == null ? void 0 : json["limit"],
19914
20224
  offset: json["offset"] == null ? void 0 : json["offset"],
19915
- planId: json["plan_id"] == null ? void 0 : json["plan_id"],
19916
- planIds: json["plan_ids"] == null ? void 0 : json["plan_ids"],
19917
20225
  q: json["q"] == null ? void 0 : json["q"]
19918
20226
  };
19919
20227
  }
19920
- function CountPlanEntitlementsParamsToJSON(value) {
20228
+ function CountFeatureUsageParamsToJSON(value) {
19921
20229
  if (value == null) {
19922
20230
  return value;
19923
20231
  }
19924
20232
  return {
19925
- feature_id: value["featureId"],
20233
+ company_id: value["companyId"],
20234
+ company_keys: value["companyKeys"],
19926
20235
  feature_ids: value["featureIds"],
19927
- ids: value["ids"],
19928
20236
  limit: value["limit"],
19929
20237
  offset: value["offset"],
19930
- plan_id: value["planId"],
19931
- plan_ids: value["planIds"],
19932
20238
  q: value["q"]
19933
20239
  };
19934
20240
  }
19935
20241
 
19936
- // src/api/models/CountPlanEntitlementsResponse.ts
19937
- function instanceOfCountPlanEntitlementsResponse(value) {
20242
+ // src/api/models/CountFeatureUsageResponse.ts
20243
+ function instanceOfCountFeatureUsageResponse(value) {
19938
20244
  if (!("data" in value) || value["data"] === void 0)
19939
20245
  return false;
19940
20246
  if (!("params" in value) || value["params"] === void 0)
19941
20247
  return false;
19942
20248
  return true;
19943
20249
  }
19944
- function CountPlanEntitlementsResponseFromJSON(json) {
19945
- return CountPlanEntitlementsResponseFromJSONTyped(json, false);
20250
+ function CountFeatureUsageResponseFromJSON(json) {
20251
+ return CountFeatureUsageResponseFromJSONTyped(json, false);
19946
20252
  }
19947
- function CountPlanEntitlementsResponseFromJSONTyped(json, ignoreDiscriminator) {
20253
+ function CountFeatureUsageResponseFromJSONTyped(json, ignoreDiscriminator) {
19948
20254
  if (json == null) {
19949
20255
  return json;
19950
20256
  }
19951
20257
  return {
19952
20258
  data: CountResponseFromJSON(json["data"]),
19953
- params: CountPlanEntitlementsParamsFromJSON(json["params"])
20259
+ params: CountFeatureUsageParamsFromJSON(json["params"])
19954
20260
  };
19955
20261
  }
19956
- function CountPlanEntitlementsResponseToJSON(value) {
20262
+ function CountFeatureUsageResponseToJSON(value) {
19957
20263
  if (value == null) {
19958
20264
  return value;
19959
20265
  }
19960
20266
  return {
19961
20267
  data: CountResponseToJSON(value["data"]),
19962
- params: CountPlanEntitlementsParamsToJSON(value["params"])
20268
+ params: CountFeatureUsageParamsToJSON(value["params"])
19963
20269
  };
19964
20270
  }
19965
20271
 
19966
- // src/api/models/CountPlansParams.ts
19967
- function instanceOfCountPlansParams(value) {
20272
+ // src/api/models/CountFeatureUsersParams.ts
20273
+ function instanceOfCountFeatureUsersParams(value) {
19968
20274
  return true;
19969
20275
  }
19970
- function CountPlansParamsFromJSON(json) {
19971
- return CountPlansParamsFromJSONTyped(json, false);
20276
+ function CountFeatureUsersParamsFromJSON(json) {
20277
+ return CountFeatureUsersParamsFromJSONTyped(json, false);
19972
20278
  }
19973
- function CountPlansParamsFromJSONTyped(json, ignoreDiscriminator) {
20279
+ function CountFeatureUsersParamsFromJSONTyped(json, ignoreDiscriminator) {
19974
20280
  if (json == null) {
19975
20281
  return json;
19976
20282
  }
19977
20283
  return {
19978
- companyId: json["company_id"] == null ? void 0 : json["company_id"],
19979
- ids: json["ids"] == null ? void 0 : json["ids"],
20284
+ featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
19980
20285
  limit: json["limit"] == null ? void 0 : json["limit"],
19981
20286
  offset: json["offset"] == null ? void 0 : json["offset"],
19982
- q: json["q"] == null ? void 0 : json["q"],
19983
- withoutEntitlementFor: json["without_entitlement_for"] == null ? void 0 : json["without_entitlement_for"]
20287
+ q: json["q"] == null ? void 0 : json["q"]
19984
20288
  };
19985
20289
  }
19986
- function CountPlansParamsToJSON(value) {
20290
+ function CountFeatureUsersParamsToJSON(value) {
19987
20291
  if (value == null) {
19988
20292
  return value;
19989
20293
  }
19990
20294
  return {
19991
- company_id: value["companyId"],
19992
- ids: value["ids"],
20295
+ feature_id: value["featureId"],
19993
20296
  limit: value["limit"],
19994
20297
  offset: value["offset"],
19995
- q: value["q"],
19996
- without_entitlement_for: value["withoutEntitlementFor"]
20298
+ q: value["q"]
19997
20299
  };
19998
20300
  }
19999
20301
 
20000
- // src/api/models/CountPlansResponse.ts
20001
- function instanceOfCountPlansResponse(value) {
20302
+ // src/api/models/CountFeatureUsersResponse.ts
20303
+ function instanceOfCountFeatureUsersResponse(value) {
20002
20304
  if (!("data" in value) || value["data"] === void 0)
20003
20305
  return false;
20004
20306
  if (!("params" in value) || value["params"] === void 0)
20005
20307
  return false;
20006
20308
  return true;
20007
20309
  }
20008
- function CountPlansResponseFromJSON(json) {
20009
- return CountPlansResponseFromJSONTyped(json, false);
20310
+ function CountFeatureUsersResponseFromJSON(json) {
20311
+ return CountFeatureUsersResponseFromJSONTyped(json, false);
20010
20312
  }
20011
- function CountPlansResponseFromJSONTyped(json, ignoreDiscriminator) {
20313
+ function CountFeatureUsersResponseFromJSONTyped(json, ignoreDiscriminator) {
20012
20314
  if (json == null) {
20013
20315
  return json;
20014
20316
  }
20015
20317
  return {
20016
20318
  data: CountResponseFromJSON(json["data"]),
20017
- params: CountPlansParamsFromJSON(json["params"])
20319
+ params: CountFeatureUsersParamsFromJSON(json["params"])
20018
20320
  };
20019
20321
  }
20020
- function CountPlansResponseToJSON(value) {
20322
+ function CountFeatureUsersResponseToJSON(value) {
20021
20323
  if (value == null) {
20022
20324
  return value;
20023
20325
  }
20024
20326
  return {
20025
20327
  data: CountResponseToJSON(value["data"]),
20026
- params: CountPlansParamsToJSON(value["params"])
20328
+ params: CountFeatureUsersParamsToJSON(value["params"])
20027
20329
  };
20028
20330
  }
20029
20331
 
20030
- // src/api/models/CountUsersParams.ts
20031
- function instanceOfCountUsersParams(value) {
20332
+ // src/api/models/CountFeaturesParams.ts
20333
+ function instanceOfCountFeaturesParams(value) {
20032
20334
  return true;
20033
20335
  }
20034
- function CountUsersParamsFromJSON(json) {
20035
- return CountUsersParamsFromJSONTyped(json, false);
20336
+ function CountFeaturesParamsFromJSON(json) {
20337
+ return CountFeaturesParamsFromJSONTyped(json, false);
20036
20338
  }
20037
- function CountUsersParamsFromJSONTyped(json, ignoreDiscriminator) {
20339
+ function CountFeaturesParamsFromJSONTyped(json, ignoreDiscriminator) {
20038
20340
  if (json == null) {
20039
20341
  return json;
20040
20342
  }
20041
20343
  return {
20042
- companyId: json["company_id"] == null ? void 0 : json["company_id"],
20043
20344
  ids: json["ids"] == null ? void 0 : json["ids"],
20044
20345
  limit: json["limit"] == null ? void 0 : json["limit"],
20045
20346
  offset: json["offset"] == null ? void 0 : json["offset"],
20046
- planId: json["plan_id"] == null ? void 0 : json["plan_id"],
20047
- q: json["q"] == null ? void 0 : json["q"]
20347
+ q: json["q"] == null ? void 0 : json["q"],
20348
+ withoutCompanyOverrideFor: json["without_company_override_for"] == null ? void 0 : json["without_company_override_for"],
20349
+ withoutPlanEntitlementFor: json["without_plan_entitlement_for"] == null ? void 0 : json["without_plan_entitlement_for"]
20048
20350
  };
20049
20351
  }
20050
- function CountUsersParamsToJSON(value) {
20352
+ function CountFeaturesParamsToJSON(value) {
20051
20353
  if (value == null) {
20052
20354
  return value;
20053
20355
  }
20054
20356
  return {
20055
- company_id: value["companyId"],
20056
20357
  ids: value["ids"],
20057
20358
  limit: value["limit"],
20058
20359
  offset: value["offset"],
20059
- plan_id: value["planId"],
20060
- q: value["q"]
20360
+ q: value["q"],
20361
+ without_company_override_for: value["withoutCompanyOverrideFor"],
20362
+ without_plan_entitlement_for: value["withoutPlanEntitlementFor"]
20061
20363
  };
20062
20364
  }
20063
20365
 
20064
- // src/api/models/CountUsersResponse.ts
20065
- function instanceOfCountUsersResponse(value) {
20366
+ // src/api/models/CountFeaturesResponse.ts
20367
+ function instanceOfCountFeaturesResponse(value) {
20066
20368
  if (!("data" in value) || value["data"] === void 0)
20067
20369
  return false;
20068
20370
  if (!("params" in value) || value["params"] === void 0)
20069
20371
  return false;
20070
20372
  return true;
20071
20373
  }
20072
- function CountUsersResponseFromJSON(json) {
20073
- return CountUsersResponseFromJSONTyped(json, false);
20374
+ function CountFeaturesResponseFromJSON(json) {
20375
+ return CountFeaturesResponseFromJSONTyped(json, false);
20074
20376
  }
20075
- function CountUsersResponseFromJSONTyped(json, ignoreDiscriminator) {
20377
+ function CountFeaturesResponseFromJSONTyped(json, ignoreDiscriminator) {
20076
20378
  if (json == null) {
20077
20379
  return json;
20078
20380
  }
20079
20381
  return {
20080
20382
  data: CountResponseFromJSON(json["data"]),
20081
- params: CountUsersParamsFromJSON(json["params"])
20383
+ params: CountFeaturesParamsFromJSON(json["params"])
20082
20384
  };
20083
20385
  }
20084
- function CountUsersResponseToJSON(value) {
20386
+ function CountFeaturesResponseToJSON(value) {
20085
20387
  if (value == null) {
20086
20388
  return value;
20087
20389
  }
20088
20390
  return {
20089
20391
  data: CountResponseToJSON(value["data"]),
20090
- params: CountUsersParamsToJSON(value["params"])
20392
+ params: CountFeaturesParamsToJSON(value["params"])
20091
20393
  };
20092
20394
  }
20093
20395
 
20094
- // src/api/models/CountWebhookEventsParams.ts
20095
- function instanceOfCountWebhookEventsParams(value) {
20396
+ // src/api/models/CountFlagChecksParams.ts
20397
+ function instanceOfCountFlagChecksParams(value) {
20096
20398
  return true;
20097
20399
  }
20098
- function CountWebhookEventsParamsFromJSON(json) {
20099
- return CountWebhookEventsParamsFromJSONTyped(json, false);
20400
+ function CountFlagChecksParamsFromJSON(json) {
20401
+ return CountFlagChecksParamsFromJSONTyped(json, false);
20100
20402
  }
20101
- function CountWebhookEventsParamsFromJSONTyped(json, ignoreDiscriminator) {
20403
+ function CountFlagChecksParamsFromJSONTyped(json, ignoreDiscriminator) {
20102
20404
  if (json == null) {
20103
20405
  return json;
20104
20406
  }
20105
20407
  return {
20106
- ids: json["ids"] == null ? void 0 : json["ids"],
20408
+ flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
20409
+ flagIds: json["flag_ids"] == null ? void 0 : json["flag_ids"],
20410
+ id: json["id"] == null ? void 0 : json["id"],
20107
20411
  limit: json["limit"] == null ? void 0 : json["limit"],
20108
- offset: json["offset"] == null ? void 0 : json["offset"],
20109
- q: json["q"] == null ? void 0 : json["q"],
20110
- webhookId: json["webhook_id"] == null ? void 0 : json["webhook_id"]
20412
+ offset: json["offset"] == null ? void 0 : json["offset"]
20111
20413
  };
20112
20414
  }
20113
- function CountWebhookEventsParamsToJSON(value) {
20415
+ function CountFlagChecksParamsToJSON(value) {
20114
20416
  if (value == null) {
20115
20417
  return value;
20116
20418
  }
20117
20419
  return {
20118
- ids: value["ids"],
20420
+ flag_id: value["flagId"],
20421
+ flag_ids: value["flagIds"],
20422
+ id: value["id"],
20119
20423
  limit: value["limit"],
20120
- offset: value["offset"],
20121
- q: value["q"],
20122
- webhook_id: value["webhookId"]
20424
+ offset: value["offset"]
20123
20425
  };
20124
20426
  }
20125
20427
 
20126
- // src/api/models/CountWebhookEventsResponse.ts
20127
- function instanceOfCountWebhookEventsResponse(value) {
20428
+ // src/api/models/CountFlagChecksResponse.ts
20429
+ function instanceOfCountFlagChecksResponse(value) {
20128
20430
  if (!("data" in value) || value["data"] === void 0)
20129
20431
  return false;
20130
20432
  if (!("params" in value) || value["params"] === void 0)
20131
20433
  return false;
20132
20434
  return true;
20133
20435
  }
20134
- function CountWebhookEventsResponseFromJSON(json) {
20135
- return CountWebhookEventsResponseFromJSONTyped(json, false);
20436
+ function CountFlagChecksResponseFromJSON(json) {
20437
+ return CountFlagChecksResponseFromJSONTyped(json, false);
20136
20438
  }
20137
- function CountWebhookEventsResponseFromJSONTyped(json, ignoreDiscriminator) {
20439
+ function CountFlagChecksResponseFromJSONTyped(json, ignoreDiscriminator) {
20138
20440
  if (json == null) {
20139
20441
  return json;
20140
20442
  }
20141
20443
  return {
20142
20444
  data: CountResponseFromJSON(json["data"]),
20143
- params: CountWebhookEventsParamsFromJSON(json["params"])
20445
+ params: CountFlagChecksParamsFromJSON(json["params"])
20144
20446
  };
20145
20447
  }
20146
- function CountWebhookEventsResponseToJSON(value) {
20448
+ function CountFlagChecksResponseToJSON(value) {
20147
20449
  if (value == null) {
20148
20450
  return value;
20149
20451
  }
20150
20452
  return {
20151
20453
  data: CountResponseToJSON(value["data"]),
20152
- params: CountWebhookEventsParamsToJSON(value["params"])
20454
+ params: CountFlagChecksParamsToJSON(value["params"])
20153
20455
  };
20154
20456
  }
20155
20457
 
20156
- // src/api/models/CountWebhooksParams.ts
20157
- function instanceOfCountWebhooksParams(value) {
20458
+ // src/api/models/CountFlagsParams.ts
20459
+ function instanceOfCountFlagsParams(value) {
20158
20460
  return true;
20159
20461
  }
20160
- function CountWebhooksParamsFromJSON(json) {
20161
- return CountWebhooksParamsFromJSONTyped(json, false);
20462
+ function CountFlagsParamsFromJSON(json) {
20463
+ return CountFlagsParamsFromJSONTyped(json, false);
20162
20464
  }
20163
- function CountWebhooksParamsFromJSONTyped(json, ignoreDiscriminator) {
20465
+ function CountFlagsParamsFromJSONTyped(json, ignoreDiscriminator) {
20164
20466
  if (json == null) {
20165
20467
  return json;
20166
20468
  }
20167
20469
  return {
20470
+ featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
20471
+ ids: json["ids"] == null ? void 0 : json["ids"],
20168
20472
  limit: json["limit"] == null ? void 0 : json["limit"],
20169
20473
  offset: json["offset"] == null ? void 0 : json["offset"],
20170
20474
  q: json["q"] == null ? void 0 : json["q"]
20171
20475
  };
20172
20476
  }
20173
- function CountWebhooksParamsToJSON(value) {
20477
+ function CountFlagsParamsToJSON(value) {
20174
20478
  if (value == null) {
20175
20479
  return value;
20176
20480
  }
20177
20481
  return {
20482
+ feature_id: value["featureId"],
20483
+ ids: value["ids"],
20178
20484
  limit: value["limit"],
20179
20485
  offset: value["offset"],
20180
20486
  q: value["q"]
20181
20487
  };
20182
20488
  }
20183
20489
 
20184
- // src/api/models/CountWebhooksResponse.ts
20185
- function instanceOfCountWebhooksResponse(value) {
20490
+ // src/api/models/CountFlagsResponse.ts
20491
+ function instanceOfCountFlagsResponse(value) {
20186
20492
  if (!("data" in value) || value["data"] === void 0)
20187
20493
  return false;
20188
20494
  if (!("params" in value) || value["params"] === void 0)
20189
20495
  return false;
20190
20496
  return true;
20191
20497
  }
20192
- function CountWebhooksResponseFromJSON(json) {
20193
- return CountWebhooksResponseFromJSONTyped(json, false);
20498
+ function CountFlagsResponseFromJSON(json) {
20499
+ return CountFlagsResponseFromJSONTyped(json, false);
20194
20500
  }
20195
- function CountWebhooksResponseFromJSONTyped(json, ignoreDiscriminator) {
20501
+ function CountFlagsResponseFromJSONTyped(json, ignoreDiscriminator) {
20196
20502
  if (json == null) {
20197
20503
  return json;
20198
20504
  }
20199
20505
  return {
20200
20506
  data: CountResponseFromJSON(json["data"]),
20201
- params: CountWebhooksParamsFromJSON(json["params"])
20507
+ params: CountFlagsParamsFromJSON(json["params"])
20202
20508
  };
20203
20509
  }
20204
- function CountWebhooksResponseToJSON(value) {
20510
+ function CountFlagsResponseToJSON(value) {
20205
20511
  if (value == null) {
20206
20512
  return value;
20207
20513
  }
20208
20514
  return {
20209
20515
  data: CountResponseToJSON(value["data"]),
20210
- params: CountWebhooksParamsToJSON(value["params"])
20516
+ params: CountFlagsParamsToJSON(value["params"])
20211
20517
  };
20212
20518
  }
20213
20519
 
20214
- // src/api/models/CreateApiKeyRequestBody.ts
20215
- function instanceOfCreateApiKeyRequestBody(value) {
20216
- if (!("name" in value) || value["name"] === void 0)
20217
- return false;
20520
+ // src/api/models/CountPlanEntitlementsParams.ts
20521
+ function instanceOfCountPlanEntitlementsParams(value) {
20218
20522
  return true;
20219
20523
  }
20220
- function CreateApiKeyRequestBodyFromJSON(json) {
20221
- return CreateApiKeyRequestBodyFromJSONTyped(json, false);
20524
+ function CountPlanEntitlementsParamsFromJSON(json) {
20525
+ return CountPlanEntitlementsParamsFromJSONTyped(json, false);
20222
20526
  }
20223
- function CreateApiKeyRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20527
+ function CountPlanEntitlementsParamsFromJSONTyped(json, ignoreDiscriminator) {
20224
20528
  if (json == null) {
20225
20529
  return json;
20226
20530
  }
20227
20531
  return {
20228
- description: json["description"] == null ? void 0 : json["description"],
20229
- environmentId: json["environment_id"] == null ? void 0 : json["environment_id"],
20230
- name: json["name"]
20532
+ featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
20533
+ featureIds: json["feature_ids"] == null ? void 0 : json["feature_ids"],
20534
+ ids: json["ids"] == null ? void 0 : json["ids"],
20535
+ limit: json["limit"] == null ? void 0 : json["limit"],
20536
+ offset: json["offset"] == null ? void 0 : json["offset"],
20537
+ planId: json["plan_id"] == null ? void 0 : json["plan_id"],
20538
+ planIds: json["plan_ids"] == null ? void 0 : json["plan_ids"],
20539
+ q: json["q"] == null ? void 0 : json["q"]
20231
20540
  };
20232
20541
  }
20233
- function CreateApiKeyRequestBodyToJSON(value) {
20542
+ function CountPlanEntitlementsParamsToJSON(value) {
20234
20543
  if (value == null) {
20235
20544
  return value;
20236
20545
  }
20237
20546
  return {
20238
- description: value["description"],
20239
- environment_id: value["environmentId"],
20240
- name: value["name"]
20547
+ feature_id: value["featureId"],
20548
+ feature_ids: value["featureIds"],
20549
+ ids: value["ids"],
20550
+ limit: value["limit"],
20551
+ offset: value["offset"],
20552
+ plan_id: value["planId"],
20553
+ plan_ids: value["planIds"],
20554
+ q: value["q"]
20241
20555
  };
20242
20556
  }
20243
20557
 
20244
- // src/api/models/CreateApiKeyResponse.ts
20245
- function instanceOfCreateApiKeyResponse(value) {
20558
+ // src/api/models/CountPlanEntitlementsResponse.ts
20559
+ function instanceOfCountPlanEntitlementsResponse(value) {
20246
20560
  if (!("data" in value) || value["data"] === void 0)
20247
20561
  return false;
20248
20562
  if (!("params" in value) || value["params"] === void 0)
20249
20563
  return false;
20250
20564
  return true;
20251
20565
  }
20252
- function CreateApiKeyResponseFromJSON(json) {
20253
- return CreateApiKeyResponseFromJSONTyped(json, false);
20566
+ function CountPlanEntitlementsResponseFromJSON(json) {
20567
+ return CountPlanEntitlementsResponseFromJSONTyped(json, false);
20254
20568
  }
20255
- function CreateApiKeyResponseFromJSONTyped(json, ignoreDiscriminator) {
20569
+ function CountPlanEntitlementsResponseFromJSONTyped(json, ignoreDiscriminator) {
20256
20570
  if (json == null) {
20257
20571
  return json;
20258
20572
  }
20259
20573
  return {
20260
- data: ApiKeyCreateResponseDataFromJSON(json["data"]),
20261
- params: json["params"]
20574
+ data: CountResponseFromJSON(json["data"]),
20575
+ params: CountPlanEntitlementsParamsFromJSON(json["params"])
20262
20576
  };
20263
20577
  }
20264
- function CreateApiKeyResponseToJSON(value) {
20578
+ function CountPlanEntitlementsResponseToJSON(value) {
20265
20579
  if (value == null) {
20266
20580
  return value;
20267
20581
  }
20268
20582
  return {
20269
- data: ApiKeyCreateResponseDataToJSON(value["data"]),
20270
- params: value["params"]
20583
+ data: CountResponseToJSON(value["data"]),
20584
+ params: CountPlanEntitlementsParamsToJSON(value["params"])
20271
20585
  };
20272
20586
  }
20273
20587
 
20274
- // src/api/models/CreateBillingProductRequestBody.ts
20275
- function instanceOfCreateBillingProductRequestBody(value) {
20276
- if (!("currency" in value) || value["currency"] === void 0)
20277
- return false;
20278
- if (!("externalId" in value) || value["externalId"] === void 0)
20279
- return false;
20280
- if (!("name" in value) || value["name"] === void 0)
20281
- return false;
20282
- if (!("price" in value) || value["price"] === void 0)
20283
- return false;
20284
- if (!("quantity" in value) || value["quantity"] === void 0)
20285
- return false;
20588
+ // src/api/models/CountPlansParams.ts
20589
+ function instanceOfCountPlansParams(value) {
20286
20590
  return true;
20287
20591
  }
20288
- function CreateBillingProductRequestBodyFromJSON(json) {
20289
- return CreateBillingProductRequestBodyFromJSONTyped(json, false);
20592
+ function CountPlansParamsFromJSON(json) {
20593
+ return CountPlansParamsFromJSONTyped(json, false);
20290
20594
  }
20291
- function CreateBillingProductRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20595
+ function CountPlansParamsFromJSONTyped(json, ignoreDiscriminator) {
20292
20596
  if (json == null) {
20293
20597
  return json;
20294
20598
  }
20295
20599
  return {
20296
- currency: json["currency"],
20297
- externalId: json["external_id"],
20298
- name: json["name"],
20299
- price: json["price"],
20300
- quantity: json["quantity"]
20301
- };
20600
+ companyId: json["company_id"] == null ? void 0 : json["company_id"],
20601
+ ids: json["ids"] == null ? void 0 : json["ids"],
20602
+ limit: json["limit"] == null ? void 0 : json["limit"],
20603
+ offset: json["offset"] == null ? void 0 : json["offset"],
20604
+ q: json["q"] == null ? void 0 : json["q"],
20605
+ withoutEntitlementFor: json["without_entitlement_for"] == null ? void 0 : json["without_entitlement_for"]
20606
+ };
20302
20607
  }
20303
- function CreateBillingProductRequestBodyToJSON(value) {
20608
+ function CountPlansParamsToJSON(value) {
20304
20609
  if (value == null) {
20305
20610
  return value;
20306
20611
  }
20307
20612
  return {
20308
- currency: value["currency"],
20309
- external_id: value["externalId"],
20310
- name: value["name"],
20311
- price: value["price"],
20312
- quantity: value["quantity"]
20613
+ company_id: value["companyId"],
20614
+ ids: value["ids"],
20615
+ limit: value["limit"],
20616
+ offset: value["offset"],
20617
+ q: value["q"],
20618
+ without_entitlement_for: value["withoutEntitlementFor"]
20313
20619
  };
20314
20620
  }
20315
20621
 
20316
- // src/api/models/CreateBillingSubscriptionsRequestBody.ts
20317
- function instanceOfCreateBillingSubscriptionsRequestBody(value) {
20318
- if (!("customerExternalId" in value) || value["customerExternalId"] === void 0)
20319
- return false;
20320
- if (!("expiredAt" in value) || value["expiredAt"] === void 0)
20321
- return false;
20322
- if (!("productExternalIds" in value) || value["productExternalIds"] === void 0)
20622
+ // src/api/models/CountPlansResponse.ts
20623
+ function instanceOfCountPlansResponse(value) {
20624
+ if (!("data" in value) || value["data"] === void 0)
20323
20625
  return false;
20324
- if (!("subscriptionExternalId" in value) || value["subscriptionExternalId"] === void 0)
20626
+ if (!("params" in value) || value["params"] === void 0)
20325
20627
  return false;
20326
20628
  return true;
20327
20629
  }
20328
- function CreateBillingSubscriptionsRequestBodyFromJSON(json) {
20329
- return CreateBillingSubscriptionsRequestBodyFromJSONTyped(json, false);
20630
+ function CountPlansResponseFromJSON(json) {
20631
+ return CountPlansResponseFromJSONTyped(json, false);
20330
20632
  }
20331
- function CreateBillingSubscriptionsRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20633
+ function CountPlansResponseFromJSONTyped(json, ignoreDiscriminator) {
20332
20634
  if (json == null) {
20333
20635
  return json;
20334
20636
  }
20335
20637
  return {
20336
- customerExternalId: json["customer_external_id"],
20337
- expiredAt: new Date(json["expired_at"]),
20338
- interval: json["interval"] == null ? void 0 : json["interval"],
20339
- productExternalIds: json["product_external_ids"],
20340
- subscriptionExternalId: json["subscription_external_id"]
20638
+ data: CountResponseFromJSON(json["data"]),
20639
+ params: CountPlansParamsFromJSON(json["params"])
20341
20640
  };
20342
20641
  }
20343
- function CreateBillingSubscriptionsRequestBodyToJSON(value) {
20642
+ function CountPlansResponseToJSON(value) {
20344
20643
  if (value == null) {
20345
20644
  return value;
20346
20645
  }
20347
20646
  return {
20348
- customer_external_id: value["customerExternalId"],
20349
- expired_at: value["expiredAt"].toISOString(),
20350
- interval: value["interval"],
20351
- product_external_ids: value["productExternalIds"],
20352
- subscription_external_id: value["subscriptionExternalId"]
20647
+ data: CountResponseToJSON(value["data"]),
20648
+ params: CountPlansParamsToJSON(value["params"])
20353
20649
  };
20354
20650
  }
20355
20651
 
20356
- // src/api/models/CreateCompanyOverrideRequestBody.ts
20357
- var CreateCompanyOverrideRequestBodyMetricPeriodEnum = {
20358
- Month: "current_month",
20359
- Week: "current_week",
20360
- Day: "current_day"
20361
- };
20362
- var CreateCompanyOverrideRequestBodyValueTypeEnum = {
20363
- Boolean: "boolean",
20364
- Numeric: "numeric",
20365
- Trait: "trait",
20366
- Unlimited: "unlimited"
20367
- };
20368
- function instanceOfCreateCompanyOverrideRequestBody(value) {
20369
- if (!("companyId" in value) || value["companyId"] === void 0)
20370
- return false;
20371
- if (!("featureId" in value) || value["featureId"] === void 0)
20372
- return false;
20373
- if (!("valueType" in value) || value["valueType"] === void 0)
20374
- return false;
20652
+ // src/api/models/CountUsersParams.ts
20653
+ function instanceOfCountUsersParams(value) {
20375
20654
  return true;
20376
20655
  }
20377
- function CreateCompanyOverrideRequestBodyFromJSON(json) {
20378
- return CreateCompanyOverrideRequestBodyFromJSONTyped(json, false);
20656
+ function CountUsersParamsFromJSON(json) {
20657
+ return CountUsersParamsFromJSONTyped(json, false);
20379
20658
  }
20380
- function CreateCompanyOverrideRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20659
+ function CountUsersParamsFromJSONTyped(json, ignoreDiscriminator) {
20381
20660
  if (json == null) {
20382
20661
  return json;
20383
20662
  }
20384
20663
  return {
20385
- companyId: json["company_id"],
20386
- featureId: json["feature_id"],
20387
- metricPeriod: json["metric_period"] == null ? void 0 : json["metric_period"],
20388
- valueBool: json["value_bool"] == null ? void 0 : json["value_bool"],
20389
- valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
20390
- valueTraitId: json["value_trait_id"] == null ? void 0 : json["value_trait_id"],
20391
- valueType: json["value_type"]
20664
+ companyId: json["company_id"] == null ? void 0 : json["company_id"],
20665
+ ids: json["ids"] == null ? void 0 : json["ids"],
20666
+ limit: json["limit"] == null ? void 0 : json["limit"],
20667
+ offset: json["offset"] == null ? void 0 : json["offset"],
20668
+ planId: json["plan_id"] == null ? void 0 : json["plan_id"],
20669
+ q: json["q"] == null ? void 0 : json["q"]
20392
20670
  };
20393
20671
  }
20394
- function CreateCompanyOverrideRequestBodyToJSON(value) {
20672
+ function CountUsersParamsToJSON(value) {
20395
20673
  if (value == null) {
20396
20674
  return value;
20397
20675
  }
20398
20676
  return {
20399
20677
  company_id: value["companyId"],
20400
- feature_id: value["featureId"],
20401
- metric_period: value["metricPeriod"],
20402
- value_bool: value["valueBool"],
20403
- value_numeric: value["valueNumeric"],
20404
- value_trait_id: value["valueTraitId"],
20405
- value_type: value["valueType"]
20678
+ ids: value["ids"],
20679
+ limit: value["limit"],
20680
+ offset: value["offset"],
20681
+ plan_id: value["planId"],
20682
+ q: value["q"]
20406
20683
  };
20407
20684
  }
20408
20685
 
20409
- // src/api/models/CreateCompanyOverrideResponse.ts
20410
- function instanceOfCreateCompanyOverrideResponse(value) {
20686
+ // src/api/models/CountUsersResponse.ts
20687
+ function instanceOfCountUsersResponse(value) {
20411
20688
  if (!("data" in value) || value["data"] === void 0)
20412
20689
  return false;
20413
20690
  if (!("params" in value) || value["params"] === void 0)
20414
20691
  return false;
20415
20692
  return true;
20416
20693
  }
20417
- function CreateCompanyOverrideResponseFromJSON(json) {
20418
- return CreateCompanyOverrideResponseFromJSONTyped(json, false);
20694
+ function CountUsersResponseFromJSON(json) {
20695
+ return CountUsersResponseFromJSONTyped(json, false);
20419
20696
  }
20420
- function CreateCompanyOverrideResponseFromJSONTyped(json, ignoreDiscriminator) {
20697
+ function CountUsersResponseFromJSONTyped(json, ignoreDiscriminator) {
20421
20698
  if (json == null) {
20422
20699
  return json;
20423
20700
  }
20424
20701
  return {
20425
- data: CompanyOverrideResponseDataFromJSON(json["data"]),
20426
- params: json["params"]
20702
+ data: CountResponseFromJSON(json["data"]),
20703
+ params: CountUsersParamsFromJSON(json["params"])
20427
20704
  };
20428
20705
  }
20429
- function CreateCompanyOverrideResponseToJSON(value) {
20706
+ function CountUsersResponseToJSON(value) {
20430
20707
  if (value == null) {
20431
20708
  return value;
20432
20709
  }
20433
20710
  return {
20434
- data: CompanyOverrideResponseDataToJSON(value["data"]),
20435
- params: value["params"]
20711
+ data: CountResponseToJSON(value["data"]),
20712
+ params: CountUsersParamsToJSON(value["params"])
20436
20713
  };
20437
20714
  }
20438
20715
 
20439
- // src/api/models/CreateCompanyResponse.ts
20440
- function instanceOfCreateCompanyResponse(value) {
20441
- if (!("data" in value) || value["data"] === void 0)
20442
- return false;
20443
- if (!("params" in value) || value["params"] === void 0)
20444
- return false;
20716
+ // src/api/models/CountWebhookEventsParams.ts
20717
+ function instanceOfCountWebhookEventsParams(value) {
20445
20718
  return true;
20446
20719
  }
20447
- function CreateCompanyResponseFromJSON(json) {
20448
- return CreateCompanyResponseFromJSONTyped(json, false);
20720
+ function CountWebhookEventsParamsFromJSON(json) {
20721
+ return CountWebhookEventsParamsFromJSONTyped(json, false);
20449
20722
  }
20450
- function CreateCompanyResponseFromJSONTyped(json, ignoreDiscriminator) {
20723
+ function CountWebhookEventsParamsFromJSONTyped(json, ignoreDiscriminator) {
20451
20724
  if (json == null) {
20452
20725
  return json;
20453
20726
  }
20454
20727
  return {
20455
- data: CompanyDetailResponseDataFromJSON(json["data"]),
20456
- params: json["params"]
20728
+ ids: json["ids"] == null ? void 0 : json["ids"],
20729
+ limit: json["limit"] == null ? void 0 : json["limit"],
20730
+ offset: json["offset"] == null ? void 0 : json["offset"],
20731
+ q: json["q"] == null ? void 0 : json["q"],
20732
+ webhookId: json["webhook_id"] == null ? void 0 : json["webhook_id"]
20457
20733
  };
20458
20734
  }
20459
- function CreateCompanyResponseToJSON(value) {
20735
+ function CountWebhookEventsParamsToJSON(value) {
20460
20736
  if (value == null) {
20461
20737
  return value;
20462
20738
  }
20463
20739
  return {
20464
- data: CompanyDetailResponseDataToJSON(value["data"]),
20465
- params: value["params"]
20740
+ ids: value["ids"],
20741
+ limit: value["limit"],
20742
+ offset: value["offset"],
20743
+ q: value["q"],
20744
+ webhook_id: value["webhookId"]
20466
20745
  };
20467
20746
  }
20468
20747
 
20469
- // src/api/models/CreateComponentRequestBody.ts
20470
- var CreateComponentRequestBodyEntityTypeEnum = {
20471
- Entitlement: "entitlement",
20472
- Billing: "billing"
20473
- };
20474
- function instanceOfCreateComponentRequestBody(value) {
20475
- if (!("ast" in value) || value["ast"] === void 0)
20476
- return false;
20477
- if (!("entityType" in value) || value["entityType"] === void 0)
20748
+ // src/api/models/CountWebhookEventsResponse.ts
20749
+ function instanceOfCountWebhookEventsResponse(value) {
20750
+ if (!("data" in value) || value["data"] === void 0)
20478
20751
  return false;
20479
- if (!("name" in value) || value["name"] === void 0)
20752
+ if (!("params" in value) || value["params"] === void 0)
20480
20753
  return false;
20481
20754
  return true;
20482
20755
  }
20483
- function CreateComponentRequestBodyFromJSON(json) {
20484
- return CreateComponentRequestBodyFromJSONTyped(json, false);
20756
+ function CountWebhookEventsResponseFromJSON(json) {
20757
+ return CountWebhookEventsResponseFromJSONTyped(json, false);
20485
20758
  }
20486
- function CreateComponentRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20759
+ function CountWebhookEventsResponseFromJSONTyped(json, ignoreDiscriminator) {
20487
20760
  if (json == null) {
20488
20761
  return json;
20489
20762
  }
20490
20763
  return {
20491
- ast: json["ast"],
20492
- entityType: json["entity_type"],
20493
- name: json["name"]
20764
+ data: CountResponseFromJSON(json["data"]),
20765
+ params: CountWebhookEventsParamsFromJSON(json["params"])
20494
20766
  };
20495
20767
  }
20496
- function CreateComponentRequestBodyToJSON(value) {
20768
+ function CountWebhookEventsResponseToJSON(value) {
20497
20769
  if (value == null) {
20498
20770
  return value;
20499
20771
  }
20500
20772
  return {
20501
- ast: value["ast"],
20502
- entity_type: value["entityType"],
20503
- name: value["name"]
20773
+ data: CountResponseToJSON(value["data"]),
20774
+ params: CountWebhookEventsParamsToJSON(value["params"])
20504
20775
  };
20505
20776
  }
20506
20777
 
20507
- // src/api/models/CreateComponentResponse.ts
20508
- function instanceOfCreateComponentResponse(value) {
20509
- if (!("data" in value) || value["data"] === void 0)
20510
- return false;
20511
- if (!("params" in value) || value["params"] === void 0)
20512
- return false;
20778
+ // src/api/models/CountWebhooksParams.ts
20779
+ function instanceOfCountWebhooksParams(value) {
20513
20780
  return true;
20514
20781
  }
20515
- function CreateComponentResponseFromJSON(json) {
20516
- return CreateComponentResponseFromJSONTyped(json, false);
20782
+ function CountWebhooksParamsFromJSON(json) {
20783
+ return CountWebhooksParamsFromJSONTyped(json, false);
20517
20784
  }
20518
- function CreateComponentResponseFromJSONTyped(json, ignoreDiscriminator) {
20785
+ function CountWebhooksParamsFromJSONTyped(json, ignoreDiscriminator) {
20519
20786
  if (json == null) {
20520
20787
  return json;
20521
20788
  }
20522
20789
  return {
20523
- data: ComponentResponseDataFromJSON(json["data"]),
20524
- params: json["params"]
20790
+ limit: json["limit"] == null ? void 0 : json["limit"],
20791
+ offset: json["offset"] == null ? void 0 : json["offset"],
20792
+ q: json["q"] == null ? void 0 : json["q"]
20525
20793
  };
20526
20794
  }
20527
- function CreateComponentResponseToJSON(value) {
20795
+ function CountWebhooksParamsToJSON(value) {
20528
20796
  if (value == null) {
20529
20797
  return value;
20530
20798
  }
20531
20799
  return {
20532
- data: ComponentResponseDataToJSON(value["data"]),
20533
- params: value["params"]
20800
+ limit: value["limit"],
20801
+ offset: value["offset"],
20802
+ q: value["q"]
20534
20803
  };
20535
20804
  }
20536
20805
 
20537
- // src/api/models/CreateCrmDealLineItemAssociationRequestBody.ts
20538
- function instanceOfCreateCrmDealLineItemAssociationRequestBody(value) {
20539
- if (!("dealExternalId" in value) || value["dealExternalId"] === void 0)
20806
+ // src/api/models/CountWebhooksResponse.ts
20807
+ function instanceOfCountWebhooksResponse(value) {
20808
+ if (!("data" in value) || value["data"] === void 0)
20540
20809
  return false;
20541
- if (!("lineItemExternalId" in value) || value["lineItemExternalId"] === void 0)
20810
+ if (!("params" in value) || value["params"] === void 0)
20542
20811
  return false;
20543
20812
  return true;
20544
20813
  }
20545
- function CreateCrmDealLineItemAssociationRequestBodyFromJSON(json) {
20546
- return CreateCrmDealLineItemAssociationRequestBodyFromJSONTyped(json, false);
20814
+ function CountWebhooksResponseFromJSON(json) {
20815
+ return CountWebhooksResponseFromJSONTyped(json, false);
20547
20816
  }
20548
- function CreateCrmDealLineItemAssociationRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20817
+ function CountWebhooksResponseFromJSONTyped(json, ignoreDiscriminator) {
20549
20818
  if (json == null) {
20550
20819
  return json;
20551
20820
  }
20552
20821
  return {
20553
- dealExternalId: json["deal_external_id"],
20554
- lineItemExternalId: json["line_item_external_id"]
20822
+ data: CountResponseFromJSON(json["data"]),
20823
+ params: CountWebhooksParamsFromJSON(json["params"])
20555
20824
  };
20556
20825
  }
20557
- function CreateCrmDealLineItemAssociationRequestBodyToJSON(value) {
20826
+ function CountWebhooksResponseToJSON(value) {
20558
20827
  if (value == null) {
20559
20828
  return value;
20560
20829
  }
20561
20830
  return {
20562
- deal_external_id: value["dealExternalId"],
20563
- line_item_external_id: value["lineItemExternalId"]
20831
+ data: CountResponseToJSON(value["data"]),
20832
+ params: CountWebhooksParamsToJSON(value["params"])
20564
20833
  };
20565
20834
  }
20566
20835
 
20567
- // src/api/models/CreateCrmDealRequestBody.ts
20568
- function instanceOfCreateCrmDealRequestBody(value) {
20569
- if (!("crmCompanyKey" in value) || value["crmCompanyKey"] === void 0)
20570
- return false;
20571
- if (!("crmType" in value) || value["crmType"] === void 0)
20572
- return false;
20573
- if (!("dealExternalId" in value) || value["dealExternalId"] === void 0)
20836
+ // src/api/models/CreateApiKeyRequestBody.ts
20837
+ function instanceOfCreateApiKeyRequestBody(value) {
20838
+ if (!("name" in value) || value["name"] === void 0)
20574
20839
  return false;
20575
20840
  return true;
20576
20841
  }
20577
- function CreateCrmDealRequestBodyFromJSON(json) {
20578
- return CreateCrmDealRequestBodyFromJSONTyped(json, false);
20842
+ function CreateApiKeyRequestBodyFromJSON(json) {
20843
+ return CreateApiKeyRequestBodyFromJSONTyped(json, false);
20579
20844
  }
20580
- function CreateCrmDealRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20845
+ function CreateApiKeyRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20581
20846
  if (json == null) {
20582
20847
  return json;
20583
20848
  }
20584
20849
  return {
20585
- arr: json["arr"] == null ? void 0 : json["arr"],
20586
- crmCompanyId: json["crm_company_id"] == null ? void 0 : json["crm_company_id"],
20587
- crmCompanyKey: json["crm_company_key"],
20588
- crmProductId: json["crm_product_id"] == null ? void 0 : json["crm_product_id"],
20589
- crmType: json["crm_type"],
20590
- dealExternalId: json["deal_external_id"],
20591
- dealName: json["deal_name"] == null ? void 0 : json["deal_name"],
20592
- dealStage: json["deal_stage"] == null ? void 0 : json["deal_stage"],
20593
- mrr: json["mrr"] == null ? void 0 : json["mrr"]
20850
+ description: json["description"] == null ? void 0 : json["description"],
20851
+ environmentId: json["environment_id"] == null ? void 0 : json["environment_id"],
20852
+ name: json["name"]
20594
20853
  };
20595
20854
  }
20596
- function CreateCrmDealRequestBodyToJSON(value) {
20855
+ function CreateApiKeyRequestBodyToJSON(value) {
20597
20856
  if (value == null) {
20598
20857
  return value;
20599
20858
  }
20600
20859
  return {
20601
- arr: value["arr"],
20602
- crm_company_id: value["crmCompanyId"],
20603
- crm_company_key: value["crmCompanyKey"],
20604
- crm_product_id: value["crmProductId"],
20605
- crm_type: value["crmType"],
20606
- deal_external_id: value["dealExternalId"],
20607
- deal_name: value["dealName"],
20608
- deal_stage: value["dealStage"],
20609
- mrr: value["mrr"]
20860
+ description: value["description"],
20861
+ environment_id: value["environmentId"],
20862
+ name: value["name"]
20610
20863
  };
20611
20864
  }
20612
20865
 
20613
- // src/api/models/CreateCrmLineItemRequestBody.ts
20614
- function instanceOfCreateCrmLineItemRequestBody(value) {
20615
- if (!("amount" in value) || value["amount"] === void 0)
20616
- return false;
20617
- if (!("interval" in value) || value["interval"] === void 0)
20618
- return false;
20619
- if (!("lineItemExternalId" in value) || value["lineItemExternalId"] === void 0)
20620
- return false;
20621
- if (!("productExternalId" in value) || value["productExternalId"] === void 0)
20866
+ // src/api/models/CreateApiKeyResponse.ts
20867
+ function instanceOfCreateApiKeyResponse(value) {
20868
+ if (!("data" in value) || value["data"] === void 0)
20622
20869
  return false;
20623
- if (!("quantity" in value) || value["quantity"] === void 0)
20870
+ if (!("params" in value) || value["params"] === void 0)
20624
20871
  return false;
20625
20872
  return true;
20626
20873
  }
20627
- function CreateCrmLineItemRequestBodyFromJSON(json) {
20628
- return CreateCrmLineItemRequestBodyFromJSONTyped(json, false);
20874
+ function CreateApiKeyResponseFromJSON(json) {
20875
+ return CreateApiKeyResponseFromJSONTyped(json, false);
20629
20876
  }
20630
- function CreateCrmLineItemRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20877
+ function CreateApiKeyResponseFromJSONTyped(json, ignoreDiscriminator) {
20631
20878
  if (json == null) {
20632
20879
  return json;
20633
20880
  }
20634
20881
  return {
20635
- termMonth: json["TermMonth"] == null ? void 0 : json["TermMonth"],
20636
- amount: json["amount"],
20637
- discountPercentage: json["discount_percentage"] == null ? void 0 : json["discount_percentage"],
20638
- interval: json["interval"],
20639
- lineItemExternalId: json["line_item_external_id"],
20640
- productExternalId: json["product_external_id"],
20641
- quantity: json["quantity"],
20642
- totalDiscount: json["total_discount"] == null ? void 0 : json["total_discount"]
20882
+ data: ApiKeyCreateResponseDataFromJSON(json["data"]),
20883
+ params: json["params"]
20643
20884
  };
20644
20885
  }
20645
- function CreateCrmLineItemRequestBodyToJSON(value) {
20886
+ function CreateApiKeyResponseToJSON(value) {
20646
20887
  if (value == null) {
20647
20888
  return value;
20648
20889
  }
20649
20890
  return {
20650
- TermMonth: value["termMonth"],
20651
- amount: value["amount"],
20652
- discount_percentage: value["discountPercentage"],
20653
- interval: value["interval"],
20654
- line_item_external_id: value["lineItemExternalId"],
20655
- product_external_id: value["productExternalId"],
20656
- quantity: value["quantity"],
20657
- total_discount: value["totalDiscount"]
20891
+ data: ApiKeyCreateResponseDataToJSON(value["data"]),
20892
+ params: value["params"]
20658
20893
  };
20659
20894
  }
20660
20895
 
20661
- // src/api/models/CreateCrmProductRequestBody.ts
20662
- function instanceOfCreateCrmProductRequestBody(value) {
20896
+ // src/api/models/CreateBillingProductRequestBody.ts
20897
+ function instanceOfCreateBillingProductRequestBody(value) {
20663
20898
  if (!("currency" in value) || value["currency"] === void 0)
20664
20899
  return false;
20665
- if (!("description" in value) || value["description"] === void 0)
20666
- return false;
20667
20900
  if (!("externalId" in value) || value["externalId"] === void 0)
20668
20901
  return false;
20669
- if (!("interval" in value) || value["interval"] === void 0)
20670
- return false;
20671
20902
  if (!("name" in value) || value["name"] === void 0)
20672
20903
  return false;
20673
20904
  if (!("price" in value) || value["price"] === void 0)
20674
20905
  return false;
20675
20906
  if (!("quantity" in value) || value["quantity"] === void 0)
20676
20907
  return false;
20677
- if (!("sku" in value) || value["sku"] === void 0)
20678
- return false;
20679
20908
  return true;
20680
20909
  }
20681
- function CreateCrmProductRequestBodyFromJSON(json) {
20682
- return CreateCrmProductRequestBodyFromJSONTyped(json, false);
20910
+ function CreateBillingProductRequestBodyFromJSON(json) {
20911
+ return CreateBillingProductRequestBodyFromJSONTyped(json, false);
20683
20912
  }
20684
- function CreateCrmProductRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20913
+ function CreateBillingProductRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20685
20914
  if (json == null) {
20686
20915
  return json;
20687
20916
  }
20688
20917
  return {
20689
20918
  currency: json["currency"],
20690
- description: json["description"],
20691
20919
  externalId: json["external_id"],
20692
- interval: json["interval"],
20693
20920
  name: json["name"],
20694
20921
  price: json["price"],
20695
- quantity: json["quantity"],
20696
- sku: json["sku"]
20922
+ quantity: json["quantity"]
20697
20923
  };
20698
20924
  }
20699
- function CreateCrmProductRequestBodyToJSON(value) {
20925
+ function CreateBillingProductRequestBodyToJSON(value) {
20700
20926
  if (value == null) {
20701
20927
  return value;
20702
20928
  }
20703
20929
  return {
20704
20930
  currency: value["currency"],
20705
- description: value["description"],
20706
20931
  external_id: value["externalId"],
20707
- interval: value["interval"],
20708
20932
  name: value["name"],
20709
20933
  price: value["price"],
20710
- quantity: value["quantity"],
20711
- sku: value["sku"]
20934
+ quantity: value["quantity"]
20712
20935
  };
20713
20936
  }
20714
20937
 
20715
- // src/api/models/CreateEntityTraitDefinitionRequestBody.ts
20716
- var CreateEntityTraitDefinitionRequestBodyEntityTypeEnum = {
20717
- Company: "company",
20718
- User: "user"
20719
- };
20720
- var CreateEntityTraitDefinitionRequestBodyTraitTypeEnum = {
20721
- Boolean: "boolean",
20722
- Currency: "currency",
20723
- Date: "date",
20724
- Number: "number",
20725
- String: "string",
20726
- Url: "url"
20727
- };
20728
- function instanceOfCreateEntityTraitDefinitionRequestBody(value) {
20729
- if (!("entityType" in value) || value["entityType"] === void 0)
20938
+ // src/api/models/CreateBillingSubscriptionsRequestBody.ts
20939
+ function instanceOfCreateBillingSubscriptionsRequestBody(value) {
20940
+ if (!("customerExternalId" in value) || value["customerExternalId"] === void 0)
20730
20941
  return false;
20731
- if (!("hierarchy" in value) || value["hierarchy"] === void 0)
20942
+ if (!("expiredAt" in value) || value["expiredAt"] === void 0)
20732
20943
  return false;
20733
- if (!("traitType" in value) || value["traitType"] === void 0)
20944
+ if (!("productExternalIds" in value) || value["productExternalIds"] === void 0)
20945
+ return false;
20946
+ if (!("subscriptionExternalId" in value) || value["subscriptionExternalId"] === void 0)
20734
20947
  return false;
20735
20948
  return true;
20736
20949
  }
20737
- function CreateEntityTraitDefinitionRequestBodyFromJSON(json) {
20738
- return CreateEntityTraitDefinitionRequestBodyFromJSONTyped(json, false);
20950
+ function CreateBillingSubscriptionsRequestBodyFromJSON(json) {
20951
+ return CreateBillingSubscriptionsRequestBodyFromJSONTyped(json, false);
20739
20952
  }
20740
- function CreateEntityTraitDefinitionRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20953
+ function CreateBillingSubscriptionsRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20741
20954
  if (json == null) {
20742
20955
  return json;
20743
20956
  }
20744
20957
  return {
20745
- displayName: json["display_name"] == null ? void 0 : json["display_name"],
20746
- entityType: json["entity_type"],
20747
- hierarchy: json["hierarchy"],
20748
- traitType: json["trait_type"]
20958
+ customerExternalId: json["customer_external_id"],
20959
+ expiredAt: new Date(json["expired_at"]),
20960
+ interval: json["interval"] == null ? void 0 : json["interval"],
20961
+ productExternalIds: json["product_external_ids"],
20962
+ subscriptionExternalId: json["subscription_external_id"]
20749
20963
  };
20750
20964
  }
20751
- function CreateEntityTraitDefinitionRequestBodyToJSON(value) {
20965
+ function CreateBillingSubscriptionsRequestBodyToJSON(value) {
20752
20966
  if (value == null) {
20753
20967
  return value;
20754
20968
  }
20755
20969
  return {
20756
- display_name: value["displayName"],
20757
- entity_type: value["entityType"],
20758
- hierarchy: value["hierarchy"],
20759
- trait_type: value["traitType"]
20970
+ customer_external_id: value["customerExternalId"],
20971
+ expired_at: value["expiredAt"].toISOString(),
20972
+ interval: value["interval"],
20973
+ product_external_ids: value["productExternalIds"],
20974
+ subscription_external_id: value["subscriptionExternalId"]
20760
20975
  };
20761
20976
  }
20762
20977
 
20763
- // src/api/models/CreateEnvironmentRequestBody.ts
20764
- var CreateEnvironmentRequestBodyEnvironmentTypeEnum = {
20765
- Development: "development",
20766
- Staging: "staging",
20767
- Production: "production"
20978
+ // src/api/models/CreateCompanyOverrideRequestBody.ts
20979
+ var CreateCompanyOverrideRequestBodyMetricPeriodEnum = {
20980
+ Month: "current_month",
20981
+ Week: "current_week",
20982
+ Day: "current_day"
20768
20983
  };
20769
- function instanceOfCreateEnvironmentRequestBody(value) {
20770
- if (!("environmentType" in value) || value["environmentType"] === void 0)
20984
+ var CreateCompanyOverrideRequestBodyValueTypeEnum = {
20985
+ Boolean: "boolean",
20986
+ Numeric: "numeric",
20987
+ Trait: "trait",
20988
+ Unlimited: "unlimited"
20989
+ };
20990
+ function instanceOfCreateCompanyOverrideRequestBody(value) {
20991
+ if (!("companyId" in value) || value["companyId"] === void 0)
20771
20992
  return false;
20772
- if (!("name" in value) || value["name"] === void 0)
20993
+ if (!("featureId" in value) || value["featureId"] === void 0)
20994
+ return false;
20995
+ if (!("valueType" in value) || value["valueType"] === void 0)
20773
20996
  return false;
20774
20997
  return true;
20775
20998
  }
20776
- function CreateEnvironmentRequestBodyFromJSON(json) {
20777
- return CreateEnvironmentRequestBodyFromJSONTyped(json, false);
20999
+ function CreateCompanyOverrideRequestBodyFromJSON(json) {
21000
+ return CreateCompanyOverrideRequestBodyFromJSONTyped(json, false);
20778
21001
  }
20779
- function CreateEnvironmentRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21002
+ function CreateCompanyOverrideRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20780
21003
  if (json == null) {
20781
21004
  return json;
20782
21005
  }
20783
21006
  return {
20784
- environmentType: json["environment_type"],
20785
- name: json["name"]
21007
+ companyId: json["company_id"],
21008
+ featureId: json["feature_id"],
21009
+ metricPeriod: json["metric_period"] == null ? void 0 : json["metric_period"],
21010
+ valueBool: json["value_bool"] == null ? void 0 : json["value_bool"],
21011
+ valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
21012
+ valueTraitId: json["value_trait_id"] == null ? void 0 : json["value_trait_id"],
21013
+ valueType: json["value_type"]
20786
21014
  };
20787
21015
  }
20788
- function CreateEnvironmentRequestBodyToJSON(value) {
21016
+ function CreateCompanyOverrideRequestBodyToJSON(value) {
20789
21017
  if (value == null) {
20790
21018
  return value;
20791
21019
  }
20792
21020
  return {
20793
- environment_type: value["environmentType"],
20794
- name: value["name"]
21021
+ company_id: value["companyId"],
21022
+ feature_id: value["featureId"],
21023
+ metric_period: value["metricPeriod"],
21024
+ value_bool: value["valueBool"],
21025
+ value_numeric: value["valueNumeric"],
21026
+ value_trait_id: value["valueTraitId"],
21027
+ value_type: value["valueType"]
20795
21028
  };
20796
21029
  }
20797
21030
 
20798
- // src/api/models/EnvironmentDetailResponseData.ts
20799
- function instanceOfEnvironmentDetailResponseData(value) {
20800
- if (!("apiKeys" in value) || value["apiKeys"] === void 0)
20801
- return false;
20802
- if (!("createdAt" in value) || value["createdAt"] === void 0)
20803
- return false;
20804
- if (!("environmentType" in value) || value["environmentType"] === void 0)
20805
- return false;
20806
- if (!("id" in value) || value["id"] === void 0)
20807
- return false;
20808
- if (!("name" in value) || value["name"] === void 0)
21031
+ // src/api/models/CreateCompanyOverrideResponse.ts
21032
+ function instanceOfCreateCompanyOverrideResponse(value) {
21033
+ if (!("data" in value) || value["data"] === void 0)
20809
21034
  return false;
20810
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
21035
+ if (!("params" in value) || value["params"] === void 0)
20811
21036
  return false;
20812
21037
  return true;
20813
21038
  }
20814
- function EnvironmentDetailResponseDataFromJSON(json) {
20815
- return EnvironmentDetailResponseDataFromJSONTyped(json, false);
21039
+ function CreateCompanyOverrideResponseFromJSON(json) {
21040
+ return CreateCompanyOverrideResponseFromJSONTyped(json, false);
20816
21041
  }
20817
- function EnvironmentDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21042
+ function CreateCompanyOverrideResponseFromJSONTyped(json, ignoreDiscriminator) {
20818
21043
  if (json == null) {
20819
21044
  return json;
20820
21045
  }
20821
21046
  return {
20822
- apiKeys: json["api_keys"].map(ApiKeyResponseDataFromJSON),
20823
- createdAt: new Date(json["created_at"]),
20824
- environmentType: json["environment_type"],
20825
- id: json["id"],
20826
- name: json["name"],
20827
- updatedAt: new Date(json["updated_at"])
21047
+ data: CompanyOverrideResponseDataFromJSON(json["data"]),
21048
+ params: json["params"]
20828
21049
  };
20829
21050
  }
20830
- function EnvironmentDetailResponseDataToJSON(value) {
21051
+ function CreateCompanyOverrideResponseToJSON(value) {
20831
21052
  if (value == null) {
20832
21053
  return value;
20833
21054
  }
20834
21055
  return {
20835
- api_keys: value["apiKeys"].map(ApiKeyResponseDataToJSON),
20836
- created_at: value["createdAt"].toISOString(),
20837
- environment_type: value["environmentType"],
20838
- id: value["id"],
20839
- name: value["name"],
20840
- updated_at: value["updatedAt"].toISOString()
21056
+ data: CompanyOverrideResponseDataToJSON(value["data"]),
21057
+ params: value["params"]
20841
21058
  };
20842
21059
  }
20843
21060
 
20844
- // src/api/models/CreateEnvironmentResponse.ts
20845
- function instanceOfCreateEnvironmentResponse(value) {
21061
+ // src/api/models/CreateCompanyResponse.ts
21062
+ function instanceOfCreateCompanyResponse(value) {
20846
21063
  if (!("data" in value) || value["data"] === void 0)
20847
21064
  return false;
20848
21065
  if (!("params" in value) || value["params"] === void 0)
20849
21066
  return false;
20850
21067
  return true;
20851
21068
  }
20852
- function CreateEnvironmentResponseFromJSON(json) {
20853
- return CreateEnvironmentResponseFromJSONTyped(json, false);
21069
+ function CreateCompanyResponseFromJSON(json) {
21070
+ return CreateCompanyResponseFromJSONTyped(json, false);
20854
21071
  }
20855
- function CreateEnvironmentResponseFromJSONTyped(json, ignoreDiscriminator) {
21072
+ function CreateCompanyResponseFromJSONTyped(json, ignoreDiscriminator) {
20856
21073
  if (json == null) {
20857
21074
  return json;
20858
21075
  }
20859
21076
  return {
20860
- data: EnvironmentDetailResponseDataFromJSON(json["data"]),
21077
+ data: CompanyDetailResponseDataFromJSON(json["data"]),
20861
21078
  params: json["params"]
20862
21079
  };
20863
21080
  }
20864
- function CreateEnvironmentResponseToJSON(value) {
21081
+ function CreateCompanyResponseToJSON(value) {
20865
21082
  if (value == null) {
20866
21083
  return value;
20867
21084
  }
20868
21085
  return {
20869
- data: EnvironmentDetailResponseDataToJSON(value["data"]),
21086
+ data: CompanyDetailResponseDataToJSON(value["data"]),
20870
21087
  params: value["params"]
20871
21088
  };
20872
21089
  }
20873
21090
 
20874
- // src/api/models/EventBodyIdentifyCompany.ts
20875
- function instanceOfEventBodyIdentifyCompany(value) {
20876
- if (!("keys" in value) || value["keys"] === void 0)
20877
- return false;
20878
- return true;
21091
+ // src/api/models/CreateComponentRequestBody.ts
21092
+ var CreateComponentRequestBodyEntityTypeEnum = {
21093
+ Entitlement: "entitlement",
21094
+ Billing: "billing"
21095
+ };
21096
+ function instanceOfCreateComponentRequestBody(value) {
21097
+ if (!("ast" in value) || value["ast"] === void 0)
21098
+ return false;
21099
+ if (!("entityType" in value) || value["entityType"] === void 0)
21100
+ return false;
21101
+ if (!("name" in value) || value["name"] === void 0)
21102
+ return false;
21103
+ return true;
20879
21104
  }
20880
- function EventBodyIdentifyCompanyFromJSON(json) {
20881
- return EventBodyIdentifyCompanyFromJSONTyped(json, false);
21105
+ function CreateComponentRequestBodyFromJSON(json) {
21106
+ return CreateComponentRequestBodyFromJSONTyped(json, false);
20882
21107
  }
20883
- function EventBodyIdentifyCompanyFromJSONTyped(json, ignoreDiscriminator) {
21108
+ function CreateComponentRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20884
21109
  if (json == null) {
20885
21110
  return json;
20886
21111
  }
20887
21112
  return {
20888
- keys: json["keys"],
20889
- name: json["name"] == null ? void 0 : json["name"],
20890
- traits: json["traits"] == null ? void 0 : json["traits"]
21113
+ ast: json["ast"],
21114
+ entityType: json["entity_type"],
21115
+ name: json["name"]
20891
21116
  };
20892
21117
  }
20893
- function EventBodyIdentifyCompanyToJSON(value) {
21118
+ function CreateComponentRequestBodyToJSON(value) {
20894
21119
  if (value == null) {
20895
21120
  return value;
20896
21121
  }
20897
21122
  return {
20898
- keys: value["keys"],
20899
- name: value["name"],
20900
- traits: value["traits"]
21123
+ ast: value["ast"],
21124
+ entity_type: value["entityType"],
21125
+ name: value["name"]
20901
21126
  };
20902
21127
  }
20903
21128
 
20904
- // src/api/models/EventBodyIdentify.ts
20905
- function instanceOfEventBodyIdentify(value) {
20906
- if (!("keys" in value) || value["keys"] === void 0)
21129
+ // src/api/models/CreateComponentResponse.ts
21130
+ function instanceOfCreateComponentResponse(value) {
21131
+ if (!("data" in value) || value["data"] === void 0)
21132
+ return false;
21133
+ if (!("params" in value) || value["params"] === void 0)
20907
21134
  return false;
20908
21135
  return true;
20909
21136
  }
20910
- function EventBodyIdentifyFromJSON(json) {
20911
- return EventBodyIdentifyFromJSONTyped(json, false);
21137
+ function CreateComponentResponseFromJSON(json) {
21138
+ return CreateComponentResponseFromJSONTyped(json, false);
20912
21139
  }
20913
- function EventBodyIdentifyFromJSONTyped(json, ignoreDiscriminator) {
21140
+ function CreateComponentResponseFromJSONTyped(json, ignoreDiscriminator) {
20914
21141
  if (json == null) {
20915
21142
  return json;
20916
21143
  }
20917
21144
  return {
20918
- company: json["company"] == null ? void 0 : EventBodyIdentifyCompanyFromJSON(json["company"]),
20919
- keys: json["keys"],
20920
- name: json["name"] == null ? void 0 : json["name"],
20921
- traits: json["traits"] == null ? void 0 : json["traits"]
21145
+ data: ComponentResponseDataFromJSON(json["data"]),
21146
+ params: json["params"]
20922
21147
  };
20923
21148
  }
20924
- function EventBodyIdentifyToJSON(value) {
21149
+ function CreateComponentResponseToJSON(value) {
20925
21150
  if (value == null) {
20926
21151
  return value;
20927
21152
  }
20928
21153
  return {
20929
- company: EventBodyIdentifyCompanyToJSON(value["company"]),
20930
- keys: value["keys"],
20931
- name: value["name"],
20932
- traits: value["traits"]
21154
+ data: ComponentResponseDataToJSON(value["data"]),
21155
+ params: value["params"]
20933
21156
  };
20934
21157
  }
20935
21158
 
20936
- // src/api/models/EventBodyTrack.ts
20937
- function instanceOfEventBodyTrack(value) {
20938
- if (!("event" in value) || value["event"] === void 0)
21159
+ // src/api/models/CreateCrmDealLineItemAssociationRequestBody.ts
21160
+ function instanceOfCreateCrmDealLineItemAssociationRequestBody(value) {
21161
+ if (!("dealExternalId" in value) || value["dealExternalId"] === void 0)
21162
+ return false;
21163
+ if (!("lineItemExternalId" in value) || value["lineItemExternalId"] === void 0)
20939
21164
  return false;
20940
21165
  return true;
20941
21166
  }
20942
- function EventBodyTrackFromJSON(json) {
20943
- return EventBodyTrackFromJSONTyped(json, false);
21167
+ function CreateCrmDealLineItemAssociationRequestBodyFromJSON(json) {
21168
+ return CreateCrmDealLineItemAssociationRequestBodyFromJSONTyped(json, false);
20944
21169
  }
20945
- function EventBodyTrackFromJSONTyped(json, ignoreDiscriminator) {
21170
+ function CreateCrmDealLineItemAssociationRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20946
21171
  if (json == null) {
20947
21172
  return json;
20948
21173
  }
20949
21174
  return {
20950
- company: json["company"] == null ? void 0 : json["company"],
20951
- event: json["event"],
20952
- traits: json["traits"] == null ? void 0 : json["traits"],
20953
- user: json["user"] == null ? void 0 : json["user"]
21175
+ dealExternalId: json["deal_external_id"],
21176
+ lineItemExternalId: json["line_item_external_id"]
20954
21177
  };
20955
21178
  }
20956
- function EventBodyTrackToJSON(value) {
21179
+ function CreateCrmDealLineItemAssociationRequestBodyToJSON(value) {
20957
21180
  if (value == null) {
20958
21181
  return value;
20959
21182
  }
20960
21183
  return {
20961
- company: value["company"],
20962
- event: value["event"],
20963
- traits: value["traits"],
20964
- user: value["user"]
21184
+ deal_external_id: value["dealExternalId"],
21185
+ line_item_external_id: value["lineItemExternalId"]
20965
21186
  };
20966
21187
  }
20967
21188
 
20968
- // src/api/models/EventBody.ts
20969
- function EventBodyFromJSON(json) {
20970
- return EventBodyFromJSONTyped(json, false);
20971
- }
20972
- function EventBodyFromJSONTyped(json, ignoreDiscriminator) {
20973
- if (json == null) {
20974
- return json;
20975
- }
20976
- if (instanceOfEventBodyIdentify(json)) {
20977
- return EventBodyIdentifyFromJSONTyped(json, true);
20978
- }
20979
- if (instanceOfEventBodyTrack(json)) {
20980
- return EventBodyTrackFromJSONTyped(json, true);
20981
- }
20982
- throw new Error("Invalid EventBody");
20983
- }
20984
- function EventBodyToJSON(value) {
20985
- if (value == null) {
20986
- return value;
20987
- }
20988
- if (instanceOfEventBodyIdentify(value)) {
20989
- return EventBodyIdentifyToJSON(value);
20990
- }
20991
- if (instanceOfEventBodyTrack(value)) {
20992
- return EventBodyTrackToJSON(value);
20993
- }
20994
- return {};
20995
- }
20996
-
20997
- // src/api/models/CreateEventRequestBody.ts
20998
- var CreateEventRequestBodyEventTypeEnum = {
20999
- Identify: "identify",
21000
- Track: "track"
21001
- };
21002
- function instanceOfCreateEventRequestBody(value) {
21003
- if (!("eventType" in value) || value["eventType"] === void 0)
21189
+ // src/api/models/CreateCrmDealRequestBody.ts
21190
+ function instanceOfCreateCrmDealRequestBody(value) {
21191
+ if (!("crmCompanyKey" in value) || value["crmCompanyKey"] === void 0)
21192
+ return false;
21193
+ if (!("crmType" in value) || value["crmType"] === void 0)
21194
+ return false;
21195
+ if (!("dealExternalId" in value) || value["dealExternalId"] === void 0)
21004
21196
  return false;
21005
21197
  return true;
21006
21198
  }
21007
- function CreateEventRequestBodyFromJSON(json) {
21008
- return CreateEventRequestBodyFromJSONTyped(json, false);
21199
+ function CreateCrmDealRequestBodyFromJSON(json) {
21200
+ return CreateCrmDealRequestBodyFromJSONTyped(json, false);
21009
21201
  }
21010
- function CreateEventRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21202
+ function CreateCrmDealRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21011
21203
  if (json == null) {
21012
21204
  return json;
21013
21205
  }
21014
21206
  return {
21015
- body: json["body"] == null ? void 0 : EventBodyFromJSON(json["body"]),
21016
- eventType: json["event_type"],
21017
- sentAt: json["sent_at"] == null ? void 0 : new Date(json["sent_at"])
21207
+ arr: json["arr"] == null ? void 0 : json["arr"],
21208
+ crmCompanyId: json["crm_company_id"] == null ? void 0 : json["crm_company_id"],
21209
+ crmCompanyKey: json["crm_company_key"],
21210
+ crmProductId: json["crm_product_id"] == null ? void 0 : json["crm_product_id"],
21211
+ crmType: json["crm_type"],
21212
+ dealExternalId: json["deal_external_id"],
21213
+ dealName: json["deal_name"] == null ? void 0 : json["deal_name"],
21214
+ dealStage: json["deal_stage"] == null ? void 0 : json["deal_stage"],
21215
+ mrr: json["mrr"] == null ? void 0 : json["mrr"]
21018
21216
  };
21019
21217
  }
21020
- function CreateEventRequestBodyToJSON(value) {
21218
+ function CreateCrmDealRequestBodyToJSON(value) {
21021
21219
  if (value == null) {
21022
21220
  return value;
21023
21221
  }
21024
21222
  return {
21025
- body: EventBodyToJSON(value["body"]),
21026
- event_type: value["eventType"],
21027
- sent_at: value["sentAt"] == null ? void 0 : value["sentAt"].toISOString()
21223
+ arr: value["arr"],
21224
+ crm_company_id: value["crmCompanyId"],
21225
+ crm_company_key: value["crmCompanyKey"],
21226
+ crm_product_id: value["crmProductId"],
21227
+ crm_type: value["crmType"],
21228
+ deal_external_id: value["dealExternalId"],
21229
+ deal_name: value["dealName"],
21230
+ deal_stage: value["dealStage"],
21231
+ mrr: value["mrr"]
21028
21232
  };
21029
21233
  }
21030
21234
 
21031
- // src/api/models/CreateEventBatchRequestBody.ts
21032
- function instanceOfCreateEventBatchRequestBody(value) {
21033
- if (!("events" in value) || value["events"] === void 0)
21235
+ // src/api/models/CreateCrmLineItemRequestBody.ts
21236
+ function instanceOfCreateCrmLineItemRequestBody(value) {
21237
+ if (!("amount" in value) || value["amount"] === void 0)
21238
+ return false;
21239
+ if (!("interval" in value) || value["interval"] === void 0)
21240
+ return false;
21241
+ if (!("lineItemExternalId" in value) || value["lineItemExternalId"] === void 0)
21242
+ return false;
21243
+ if (!("productExternalId" in value) || value["productExternalId"] === void 0)
21244
+ return false;
21245
+ if (!("quantity" in value) || value["quantity"] === void 0)
21034
21246
  return false;
21035
21247
  return true;
21036
21248
  }
21037
- function CreateEventBatchRequestBodyFromJSON(json) {
21038
- return CreateEventBatchRequestBodyFromJSONTyped(json, false);
21249
+ function CreateCrmLineItemRequestBodyFromJSON(json) {
21250
+ return CreateCrmLineItemRequestBodyFromJSONTyped(json, false);
21039
21251
  }
21040
- function CreateEventBatchRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21252
+ function CreateCrmLineItemRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21041
21253
  if (json == null) {
21042
21254
  return json;
21043
21255
  }
21044
21256
  return {
21045
- events: json["events"].map(CreateEventRequestBodyFromJSON)
21257
+ termMonth: json["TermMonth"] == null ? void 0 : json["TermMonth"],
21258
+ amount: json["amount"],
21259
+ discountPercentage: json["discount_percentage"] == null ? void 0 : json["discount_percentage"],
21260
+ interval: json["interval"],
21261
+ lineItemExternalId: json["line_item_external_id"],
21262
+ productExternalId: json["product_external_id"],
21263
+ quantity: json["quantity"],
21264
+ totalDiscount: json["total_discount"] == null ? void 0 : json["total_discount"]
21046
21265
  };
21047
21266
  }
21048
- function CreateEventBatchRequestBodyToJSON(value) {
21267
+ function CreateCrmLineItemRequestBodyToJSON(value) {
21049
21268
  if (value == null) {
21050
21269
  return value;
21051
21270
  }
21052
21271
  return {
21053
- events: value["events"].map(CreateEventRequestBodyToJSON)
21272
+ TermMonth: value["termMonth"],
21273
+ amount: value["amount"],
21274
+ discount_percentage: value["discountPercentage"],
21275
+ interval: value["interval"],
21276
+ line_item_external_id: value["lineItemExternalId"],
21277
+ product_external_id: value["productExternalId"],
21278
+ quantity: value["quantity"],
21279
+ total_discount: value["totalDiscount"]
21054
21280
  };
21055
21281
  }
21056
21282
 
21057
- // src/api/models/RawEventResponseData.ts
21058
- function instanceOfRawEventResponseData(value) {
21059
- if (!("capturedAt" in value) || value["capturedAt"] === void 0)
21283
+ // src/api/models/CreateCrmProductRequestBody.ts
21284
+ function instanceOfCreateCrmProductRequestBody(value) {
21285
+ if (!("currency" in value) || value["currency"] === void 0)
21060
21286
  return false;
21061
- if (!("remoteAddr" in value) || value["remoteAddr"] === void 0)
21287
+ if (!("description" in value) || value["description"] === void 0)
21062
21288
  return false;
21063
- if (!("remoteIp" in value) || value["remoteIp"] === void 0)
21289
+ if (!("externalId" in value) || value["externalId"] === void 0)
21064
21290
  return false;
21065
- if (!("userAgent" in value) || value["userAgent"] === void 0)
21291
+ if (!("interval" in value) || value["interval"] === void 0)
21292
+ return false;
21293
+ if (!("name" in value) || value["name"] === void 0)
21294
+ return false;
21295
+ if (!("price" in value) || value["price"] === void 0)
21296
+ return false;
21297
+ if (!("quantity" in value) || value["quantity"] === void 0)
21298
+ return false;
21299
+ if (!("sku" in value) || value["sku"] === void 0)
21066
21300
  return false;
21067
21301
  return true;
21068
21302
  }
21069
- function RawEventResponseDataFromJSON(json) {
21070
- return RawEventResponseDataFromJSONTyped(json, false);
21303
+ function CreateCrmProductRequestBodyFromJSON(json) {
21304
+ return CreateCrmProductRequestBodyFromJSONTyped(json, false);
21071
21305
  }
21072
- function RawEventResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21306
+ function CreateCrmProductRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21073
21307
  if (json == null) {
21074
21308
  return json;
21075
21309
  }
21076
21310
  return {
21077
- capturedAt: new Date(json["captured_at"]),
21078
- eventId: json["event_id"] == null ? void 0 : json["event_id"],
21079
- remoteAddr: json["remote_addr"],
21080
- remoteIp: json["remote_ip"],
21081
- userAgent: json["user_agent"]
21311
+ currency: json["currency"],
21312
+ description: json["description"],
21313
+ externalId: json["external_id"],
21314
+ interval: json["interval"],
21315
+ name: json["name"],
21316
+ price: json["price"],
21317
+ quantity: json["quantity"],
21318
+ sku: json["sku"]
21082
21319
  };
21083
21320
  }
21084
- function RawEventResponseDataToJSON(value) {
21321
+ function CreateCrmProductRequestBodyToJSON(value) {
21085
21322
  if (value == null) {
21086
21323
  return value;
21087
21324
  }
21088
21325
  return {
21089
- captured_at: value["capturedAt"].toISOString(),
21090
- event_id: value["eventId"],
21091
- remote_addr: value["remoteAddr"],
21092
- remote_ip: value["remoteIp"],
21093
- user_agent: value["userAgent"]
21094
- };
21095
- }
21096
-
21097
- // src/api/models/RawEventBatchResponseData.ts
21098
- function instanceOfRawEventBatchResponseData(value) {
21099
- if (!("events" in value) || value["events"] === void 0)
21100
- return false;
21101
- return true;
21102
- }
21103
- function RawEventBatchResponseDataFromJSON(json) {
21104
- return RawEventBatchResponseDataFromJSONTyped(json, false);
21105
- }
21106
- function RawEventBatchResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21107
- if (json == null) {
21108
- return json;
21109
- }
21110
- return {
21111
- events: json["events"].map(RawEventResponseDataFromJSON)
21112
- };
21113
- }
21114
- function RawEventBatchResponseDataToJSON(value) {
21115
- if (value == null) {
21116
- return value;
21117
- }
21118
- return {
21119
- events: value["events"].map(RawEventResponseDataToJSON)
21326
+ currency: value["currency"],
21327
+ description: value["description"],
21328
+ external_id: value["externalId"],
21329
+ interval: value["interval"],
21330
+ name: value["name"],
21331
+ price: value["price"],
21332
+ quantity: value["quantity"],
21333
+ sku: value["sku"]
21120
21334
  };
21121
21335
  }
21122
21336
 
21123
- // src/api/models/CreateEventBatchResponse.ts
21124
- function instanceOfCreateEventBatchResponse(value) {
21125
- if (!("data" in value) || value["data"] === void 0)
21337
+ // src/api/models/CreateEntityTraitDefinitionRequestBody.ts
21338
+ var CreateEntityTraitDefinitionRequestBodyEntityTypeEnum = {
21339
+ Company: "company",
21340
+ User: "user"
21341
+ };
21342
+ var CreateEntityTraitDefinitionRequestBodyTraitTypeEnum = {
21343
+ Boolean: "boolean",
21344
+ Currency: "currency",
21345
+ Date: "date",
21346
+ Number: "number",
21347
+ String: "string",
21348
+ Url: "url"
21349
+ };
21350
+ function instanceOfCreateEntityTraitDefinitionRequestBody(value) {
21351
+ if (!("entityType" in value) || value["entityType"] === void 0)
21126
21352
  return false;
21127
- if (!("params" in value) || value["params"] === void 0)
21353
+ if (!("hierarchy" in value) || value["hierarchy"] === void 0)
21354
+ return false;
21355
+ if (!("traitType" in value) || value["traitType"] === void 0)
21128
21356
  return false;
21129
21357
  return true;
21130
21358
  }
21131
- function CreateEventBatchResponseFromJSON(json) {
21132
- return CreateEventBatchResponseFromJSONTyped(json, false);
21359
+ function CreateEntityTraitDefinitionRequestBodyFromJSON(json) {
21360
+ return CreateEntityTraitDefinitionRequestBodyFromJSONTyped(json, false);
21133
21361
  }
21134
- function CreateEventBatchResponseFromJSONTyped(json, ignoreDiscriminator) {
21362
+ function CreateEntityTraitDefinitionRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21135
21363
  if (json == null) {
21136
21364
  return json;
21137
21365
  }
21138
21366
  return {
21139
- data: RawEventBatchResponseDataFromJSON(json["data"]),
21140
- params: json["params"]
21367
+ displayName: json["display_name"] == null ? void 0 : json["display_name"],
21368
+ entityType: json["entity_type"],
21369
+ hierarchy: json["hierarchy"],
21370
+ traitType: json["trait_type"]
21141
21371
  };
21142
21372
  }
21143
- function CreateEventBatchResponseToJSON(value) {
21373
+ function CreateEntityTraitDefinitionRequestBodyToJSON(value) {
21144
21374
  if (value == null) {
21145
21375
  return value;
21146
21376
  }
21147
21377
  return {
21148
- data: RawEventBatchResponseDataToJSON(value["data"]),
21149
- params: value["params"]
21378
+ display_name: value["displayName"],
21379
+ entity_type: value["entityType"],
21380
+ hierarchy: value["hierarchy"],
21381
+ trait_type: value["traitType"]
21150
21382
  };
21151
21383
  }
21152
21384
 
21153
- // src/api/models/CreateEventResponse.ts
21154
- function instanceOfCreateEventResponse(value) {
21155
- if (!("data" in value) || value["data"] === void 0)
21385
+ // src/api/models/CreateEnvironmentRequestBody.ts
21386
+ var CreateEnvironmentRequestBodyEnvironmentTypeEnum = {
21387
+ Development: "development",
21388
+ Staging: "staging",
21389
+ Production: "production"
21390
+ };
21391
+ function instanceOfCreateEnvironmentRequestBody(value) {
21392
+ if (!("environmentType" in value) || value["environmentType"] === void 0)
21156
21393
  return false;
21157
- if (!("params" in value) || value["params"] === void 0)
21394
+ if (!("name" in value) || value["name"] === void 0)
21158
21395
  return false;
21159
21396
  return true;
21160
21397
  }
21161
- function CreateEventResponseFromJSON(json) {
21162
- return CreateEventResponseFromJSONTyped(json, false);
21398
+ function CreateEnvironmentRequestBodyFromJSON(json) {
21399
+ return CreateEnvironmentRequestBodyFromJSONTyped(json, false);
21163
21400
  }
21164
- function CreateEventResponseFromJSONTyped(json, ignoreDiscriminator) {
21401
+ function CreateEnvironmentRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21165
21402
  if (json == null) {
21166
21403
  return json;
21167
21404
  }
21168
21405
  return {
21169
- data: RawEventResponseDataFromJSON(json["data"]),
21170
- params: json["params"]
21406
+ environmentType: json["environment_type"],
21407
+ name: json["name"]
21171
21408
  };
21172
21409
  }
21173
- function CreateEventResponseToJSON(value) {
21410
+ function CreateEnvironmentRequestBodyToJSON(value) {
21174
21411
  if (value == null) {
21175
21412
  return value;
21176
21413
  }
21177
21414
  return {
21178
- data: RawEventResponseDataToJSON(value["data"]),
21179
- params: value["params"]
21415
+ environment_type: value["environmentType"],
21416
+ name: value["name"]
21180
21417
  };
21181
21418
  }
21182
21419
 
21183
- // src/api/models/CreateOrUpdateFlagRequestBody.ts
21184
- function instanceOfCreateOrUpdateFlagRequestBody(value) {
21185
- if (!("defaultValue" in value) || value["defaultValue"] === void 0)
21420
+ // src/api/models/EnvironmentDetailResponseData.ts
21421
+ function instanceOfEnvironmentDetailResponseData(value) {
21422
+ if (!("apiKeys" in value) || value["apiKeys"] === void 0)
21186
21423
  return false;
21187
- if (!("description" in value) || value["description"] === void 0)
21424
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
21188
21425
  return false;
21189
- if (!("flagType" in value) || value["flagType"] === void 0)
21426
+ if (!("environmentType" in value) || value["environmentType"] === void 0)
21190
21427
  return false;
21191
- if (!("key" in value) || value["key"] === void 0)
21428
+ if (!("id" in value) || value["id"] === void 0)
21192
21429
  return false;
21193
21430
  if (!("name" in value) || value["name"] === void 0)
21194
21431
  return false;
21432
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
21433
+ return false;
21195
21434
  return true;
21196
21435
  }
21197
- function CreateOrUpdateFlagRequestBodyFromJSON(json) {
21198
- return CreateOrUpdateFlagRequestBodyFromJSONTyped(json, false);
21436
+ function EnvironmentDetailResponseDataFromJSON(json) {
21437
+ return EnvironmentDetailResponseDataFromJSONTyped(json, false);
21199
21438
  }
21200
- function CreateOrUpdateFlagRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21439
+ function EnvironmentDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21201
21440
  if (json == null) {
21202
21441
  return json;
21203
21442
  }
21204
21443
  return {
21205
- defaultValue: json["default_value"],
21206
- description: json["description"],
21207
- featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
21208
- flagType: json["flag_type"],
21209
- id: json["id"] == null ? void 0 : json["id"],
21210
- key: json["key"],
21211
- name: json["name"]
21444
+ apiKeys: json["api_keys"].map(ApiKeyResponseDataFromJSON),
21445
+ createdAt: new Date(json["created_at"]),
21446
+ environmentType: json["environment_type"],
21447
+ id: json["id"],
21448
+ name: json["name"],
21449
+ updatedAt: new Date(json["updated_at"])
21212
21450
  };
21213
21451
  }
21214
- function CreateOrUpdateFlagRequestBodyToJSON(value) {
21452
+ function EnvironmentDetailResponseDataToJSON(value) {
21215
21453
  if (value == null) {
21216
21454
  return value;
21217
21455
  }
21218
21456
  return {
21219
- default_value: value["defaultValue"],
21220
- description: value["description"],
21221
- feature_id: value["featureId"],
21222
- flag_type: value["flagType"],
21457
+ api_keys: value["apiKeys"].map(ApiKeyResponseDataToJSON),
21458
+ created_at: value["createdAt"].toISOString(),
21459
+ environment_type: value["environmentType"],
21223
21460
  id: value["id"],
21224
- key: value["key"],
21225
- name: value["name"]
21461
+ name: value["name"],
21462
+ updated_at: value["updatedAt"].toISOString()
21226
21463
  };
21227
21464
  }
21228
21465
 
21229
- // src/api/models/CreateFeatureRequestBody.ts
21230
- var CreateFeatureRequestBodyFeatureTypeEnum = {
21231
- Boolean: "boolean",
21232
- Event: "event",
21233
- Trait: "trait"
21234
- };
21235
- function instanceOfCreateFeatureRequestBody(value) {
21236
- if (!("description" in value) || value["description"] === void 0)
21237
- return false;
21238
- if (!("featureType" in value) || value["featureType"] === void 0)
21466
+ // src/api/models/CreateEnvironmentResponse.ts
21467
+ function instanceOfCreateEnvironmentResponse(value) {
21468
+ if (!("data" in value) || value["data"] === void 0)
21239
21469
  return false;
21240
- if (!("name" in value) || value["name"] === void 0)
21470
+ if (!("params" in value) || value["params"] === void 0)
21241
21471
  return false;
21242
21472
  return true;
21243
21473
  }
21244
- function CreateFeatureRequestBodyFromJSON(json) {
21245
- return CreateFeatureRequestBodyFromJSONTyped(json, false);
21474
+ function CreateEnvironmentResponseFromJSON(json) {
21475
+ return CreateEnvironmentResponseFromJSONTyped(json, false);
21246
21476
  }
21247
- function CreateFeatureRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21477
+ function CreateEnvironmentResponseFromJSONTyped(json, ignoreDiscriminator) {
21248
21478
  if (json == null) {
21249
21479
  return json;
21250
21480
  }
21251
21481
  return {
21252
- description: json["description"],
21253
- eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
21254
- featureType: json["feature_type"],
21255
- flag: json["flag"] == null ? void 0 : CreateOrUpdateFlagRequestBodyFromJSON(json["flag"]),
21256
- lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
21257
- name: json["name"],
21258
- traitId: json["trait_id"] == null ? void 0 : json["trait_id"]
21482
+ data: EnvironmentDetailResponseDataFromJSON(json["data"]),
21483
+ params: json["params"]
21259
21484
  };
21260
21485
  }
21261
- function CreateFeatureRequestBodyToJSON(value) {
21486
+ function CreateEnvironmentResponseToJSON(value) {
21262
21487
  if (value == null) {
21263
21488
  return value;
21264
21489
  }
21265
21490
  return {
21266
- description: value["description"],
21267
- event_subtype: value["eventSubtype"],
21268
- feature_type: value["featureType"],
21269
- flag: CreateOrUpdateFlagRequestBodyToJSON(value["flag"]),
21270
- lifecycle_phase: value["lifecyclePhase"],
21271
- name: value["name"],
21272
- trait_id: value["traitId"]
21491
+ data: EnvironmentDetailResponseDataToJSON(value["data"]),
21492
+ params: value["params"]
21273
21493
  };
21274
21494
  }
21275
21495
 
21276
- // src/api/models/EventSummaryResponseData.ts
21277
- function instanceOfEventSummaryResponseData(value) {
21278
- if (!("companyCount" in value) || value["companyCount"] === void 0)
21279
- return false;
21280
- if (!("environmentId" in value) || value["environmentId"] === void 0)
21281
- return false;
21282
- if (!("eventCount" in value) || value["eventCount"] === void 0)
21283
- return false;
21284
- if (!("eventSubtype" in value) || value["eventSubtype"] === void 0)
21285
- return false;
21286
- if (!("userCount" in value) || value["userCount"] === void 0)
21496
+ // src/api/models/EventBodyIdentifyCompany.ts
21497
+ function instanceOfEventBodyIdentifyCompany(value) {
21498
+ if (!("keys" in value) || value["keys"] === void 0)
21287
21499
  return false;
21288
21500
  return true;
21289
21501
  }
21290
- function EventSummaryResponseDataFromJSON(json) {
21291
- return EventSummaryResponseDataFromJSONTyped(json, false);
21502
+ function EventBodyIdentifyCompanyFromJSON(json) {
21503
+ return EventBodyIdentifyCompanyFromJSONTyped(json, false);
21292
21504
  }
21293
- function EventSummaryResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21505
+ function EventBodyIdentifyCompanyFromJSONTyped(json, ignoreDiscriminator) {
21294
21506
  if (json == null) {
21295
21507
  return json;
21296
21508
  }
21297
21509
  return {
21298
- companyCount: json["company_count"],
21299
- environmentId: json["environment_id"],
21300
- eventCount: json["event_count"],
21301
- eventSubtype: json["event_subtype"],
21302
- lastSeenAt: json["last_seen_at"] == null ? void 0 : new Date(json["last_seen_at"]),
21303
- userCount: json["user_count"]
21510
+ keys: json["keys"],
21511
+ name: json["name"] == null ? void 0 : json["name"],
21512
+ traits: json["traits"] == null ? void 0 : json["traits"]
21304
21513
  };
21305
21514
  }
21306
- function EventSummaryResponseDataToJSON(value) {
21515
+ function EventBodyIdentifyCompanyToJSON(value) {
21307
21516
  if (value == null) {
21308
21517
  return value;
21309
21518
  }
21310
21519
  return {
21311
- company_count: value["companyCount"],
21312
- environment_id: value["environmentId"],
21313
- event_count: value["eventCount"],
21314
- event_subtype: value["eventSubtype"],
21315
- last_seen_at: value["lastSeenAt"] == null ? void 0 : value["lastSeenAt"].toISOString(),
21316
- user_count: value["userCount"]
21520
+ keys: value["keys"],
21521
+ name: value["name"],
21522
+ traits: value["traits"]
21317
21523
  };
21318
21524
  }
21319
21525
 
21320
- // src/api/models/RuleConditionResourceResponseData.ts
21321
- function instanceOfRuleConditionResourceResponseData(value) {
21322
- if (!("id" in value) || value["id"] === void 0)
21323
- return false;
21324
- if (!("name" in value) || value["name"] === void 0)
21526
+ // src/api/models/EventBodyIdentify.ts
21527
+ function instanceOfEventBodyIdentify(value) {
21528
+ if (!("keys" in value) || value["keys"] === void 0)
21325
21529
  return false;
21326
21530
  return true;
21327
21531
  }
21328
- function RuleConditionResourceResponseDataFromJSON(json) {
21329
- return RuleConditionResourceResponseDataFromJSONTyped(json, false);
21532
+ function EventBodyIdentifyFromJSON(json) {
21533
+ return EventBodyIdentifyFromJSONTyped(json, false);
21330
21534
  }
21331
- function RuleConditionResourceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21535
+ function EventBodyIdentifyFromJSONTyped(json, ignoreDiscriminator) {
21332
21536
  if (json == null) {
21333
21537
  return json;
21334
21538
  }
21335
21539
  return {
21336
- id: json["id"],
21337
- name: json["name"]
21540
+ company: json["company"] == null ? void 0 : EventBodyIdentifyCompanyFromJSON(json["company"]),
21541
+ keys: json["keys"],
21542
+ name: json["name"] == null ? void 0 : json["name"],
21543
+ traits: json["traits"] == null ? void 0 : json["traits"]
21338
21544
  };
21339
21545
  }
21340
- function RuleConditionResourceResponseDataToJSON(value) {
21546
+ function EventBodyIdentifyToJSON(value) {
21341
21547
  if (value == null) {
21342
21548
  return value;
21343
21549
  }
21344
21550
  return {
21345
- id: value["id"],
21346
- name: value["name"]
21551
+ company: EventBodyIdentifyCompanyToJSON(value["company"]),
21552
+ keys: value["keys"],
21553
+ name: value["name"],
21554
+ traits: value["traits"]
21347
21555
  };
21348
21556
  }
21349
21557
 
21350
- // src/api/models/RuleConditionDetailResponseData.ts
21351
- function instanceOfRuleConditionDetailResponseData(value) {
21352
- if (!("conditionType" in value) || value["conditionType"] === void 0)
21353
- return false;
21354
- if (!("createdAt" in value) || value["createdAt"] === void 0)
21355
- return false;
21356
- if (!("environmentId" in value) || value["environmentId"] === void 0)
21357
- return false;
21358
- if (!("id" in value) || value["id"] === void 0)
21359
- return false;
21360
- if (!("operator" in value) || value["operator"] === void 0)
21361
- return false;
21362
- if (!("resourceIds" in value) || value["resourceIds"] === void 0)
21363
- return false;
21364
- if (!("resources" in value) || value["resources"] === void 0)
21365
- return false;
21366
- if (!("ruleId" in value) || value["ruleId"] === void 0)
21367
- return false;
21368
- if (!("traitValue" in value) || value["traitValue"] === void 0)
21369
- return false;
21370
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
21558
+ // src/api/models/EventBodyTrack.ts
21559
+ function instanceOfEventBodyTrack(value) {
21560
+ if (!("event" in value) || value["event"] === void 0)
21371
21561
  return false;
21372
21562
  return true;
21373
21563
  }
21374
- function RuleConditionDetailResponseDataFromJSON(json) {
21375
- return RuleConditionDetailResponseDataFromJSONTyped(json, false);
21564
+ function EventBodyTrackFromJSON(json) {
21565
+ return EventBodyTrackFromJSONTyped(json, false);
21376
21566
  }
21377
- function RuleConditionDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21567
+ function EventBodyTrackFromJSONTyped(json, ignoreDiscriminator) {
21378
21568
  if (json == null) {
21379
21569
  return json;
21380
21570
  }
21381
21571
  return {
21382
- comparisonTrait: json["comparison_trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["comparison_trait"]),
21383
- comparisonTraitId: json["comparison_trait_id"] == null ? void 0 : json["comparison_trait_id"],
21384
- conditionGroupId: json["condition_group_id"] == null ? void 0 : json["condition_group_id"],
21385
- conditionType: json["condition_type"],
21386
- createdAt: new Date(json["created_at"]),
21387
- environmentId: json["environment_id"],
21388
- eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
21389
- flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
21390
- id: json["id"],
21391
- metricPeriod: json["metric_period"] == null ? void 0 : json["metric_period"],
21392
- metricValue: json["metric_value"] == null ? void 0 : json["metric_value"],
21393
- operator: json["operator"],
21394
- planId: json["plan_id"] == null ? void 0 : json["plan_id"],
21395
- resourceIds: json["resource_ids"],
21396
- resources: json["resources"].map(
21397
- RuleConditionResourceResponseDataFromJSON
21398
- ),
21399
- ruleId: json["rule_id"],
21400
- trait: json["trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["trait"]),
21401
- traitEntityType: json["trait_entity_type"] == null ? void 0 : json["trait_entity_type"],
21402
- traitId: json["trait_id"] == null ? void 0 : json["trait_id"],
21403
- traitValue: json["trait_value"],
21404
- updatedAt: new Date(json["updated_at"])
21572
+ company: json["company"] == null ? void 0 : json["company"],
21573
+ event: json["event"],
21574
+ traits: json["traits"] == null ? void 0 : json["traits"],
21575
+ user: json["user"] == null ? void 0 : json["user"]
21405
21576
  };
21406
21577
  }
21407
- function RuleConditionDetailResponseDataToJSON(value) {
21578
+ function EventBodyTrackToJSON(value) {
21408
21579
  if (value == null) {
21409
21580
  return value;
21410
21581
  }
21411
21582
  return {
21412
- comparison_trait: EntityTraitDefinitionResponseDataToJSON(
21413
- value["comparisonTrait"]
21414
- ),
21415
- comparison_trait_id: value["comparisonTraitId"],
21416
- condition_group_id: value["conditionGroupId"],
21417
- condition_type: value["conditionType"],
21418
- created_at: value["createdAt"].toISOString(),
21419
- environment_id: value["environmentId"],
21420
- event_subtype: value["eventSubtype"],
21421
- flag_id: value["flagId"],
21422
- id: value["id"],
21423
- metric_period: value["metricPeriod"],
21424
- metric_value: value["metricValue"],
21425
- operator: value["operator"],
21426
- plan_id: value["planId"],
21427
- resource_ids: value["resourceIds"],
21428
- resources: value["resources"].map(
21429
- RuleConditionResourceResponseDataToJSON
21430
- ),
21431
- rule_id: value["ruleId"],
21432
- trait: EntityTraitDefinitionResponseDataToJSON(value["trait"]),
21433
- trait_entity_type: value["traitEntityType"],
21434
- trait_id: value["traitId"],
21435
- trait_value: value["traitValue"],
21436
- updated_at: value["updatedAt"].toISOString()
21583
+ company: value["company"],
21584
+ event: value["event"],
21585
+ traits: value["traits"],
21586
+ user: value["user"]
21437
21587
  };
21438
21588
  }
21439
21589
 
21440
- // src/api/models/RuleConditionGroupDetailResponseData.ts
21441
- function instanceOfRuleConditionGroupDetailResponseData(value) {
21442
- if (!("conditions" in value) || value["conditions"] === void 0)
21443
- return false;
21444
- if (!("createdAt" in value) || value["createdAt"] === void 0)
21445
- return false;
21446
- if (!("environmentId" in value) || value["environmentId"] === void 0)
21447
- return false;
21448
- if (!("id" in value) || value["id"] === void 0)
21449
- return false;
21450
- if (!("ruleId" in value) || value["ruleId"] === void 0)
21451
- return false;
21452
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
21590
+ // src/api/models/EventBody.ts
21591
+ function EventBodyFromJSON(json) {
21592
+ return EventBodyFromJSONTyped(json, false);
21593
+ }
21594
+ function EventBodyFromJSONTyped(json, ignoreDiscriminator) {
21595
+ if (json == null) {
21596
+ return json;
21597
+ }
21598
+ if (instanceOfEventBodyIdentify(json)) {
21599
+ return EventBodyIdentifyFromJSONTyped(json, true);
21600
+ }
21601
+ if (instanceOfEventBodyTrack(json)) {
21602
+ return EventBodyTrackFromJSONTyped(json, true);
21603
+ }
21604
+ throw new Error("Invalid EventBody");
21605
+ }
21606
+ function EventBodyToJSON(value) {
21607
+ if (value == null) {
21608
+ return value;
21609
+ }
21610
+ if (instanceOfEventBodyIdentify(value)) {
21611
+ return EventBodyIdentifyToJSON(value);
21612
+ }
21613
+ if (instanceOfEventBodyTrack(value)) {
21614
+ return EventBodyTrackToJSON(value);
21615
+ }
21616
+ return {};
21617
+ }
21618
+
21619
+ // src/api/models/CreateEventRequestBody.ts
21620
+ var CreateEventRequestBodyEventTypeEnum = {
21621
+ Identify: "identify",
21622
+ Track: "track"
21623
+ };
21624
+ function instanceOfCreateEventRequestBody(value) {
21625
+ if (!("eventType" in value) || value["eventType"] === void 0)
21453
21626
  return false;
21454
21627
  return true;
21455
21628
  }
21456
- function RuleConditionGroupDetailResponseDataFromJSON(json) {
21457
- return RuleConditionGroupDetailResponseDataFromJSONTyped(json, false);
21629
+ function CreateEventRequestBodyFromJSON(json) {
21630
+ return CreateEventRequestBodyFromJSONTyped(json, false);
21458
21631
  }
21459
- function RuleConditionGroupDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21632
+ function CreateEventRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21460
21633
  if (json == null) {
21461
21634
  return json;
21462
21635
  }
21463
21636
  return {
21464
- conditions: json["conditions"].map(
21465
- RuleConditionDetailResponseDataFromJSON
21466
- ),
21467
- createdAt: new Date(json["created_at"]),
21468
- environmentId: json["environment_id"],
21469
- flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
21470
- id: json["id"],
21471
- planId: json["plan_id"] == null ? void 0 : json["plan_id"],
21472
- ruleId: json["rule_id"],
21473
- updatedAt: new Date(json["updated_at"])
21637
+ body: json["body"] == null ? void 0 : EventBodyFromJSON(json["body"]),
21638
+ eventType: json["event_type"],
21639
+ sentAt: json["sent_at"] == null ? void 0 : new Date(json["sent_at"])
21474
21640
  };
21475
21641
  }
21476
- function RuleConditionGroupDetailResponseDataToJSON(value) {
21642
+ function CreateEventRequestBodyToJSON(value) {
21477
21643
  if (value == null) {
21478
21644
  return value;
21479
21645
  }
21480
21646
  return {
21481
- conditions: value["conditions"].map(
21482
- RuleConditionDetailResponseDataToJSON
21483
- ),
21484
- created_at: value["createdAt"].toISOString(),
21485
- environment_id: value["environmentId"],
21486
- flag_id: value["flagId"],
21487
- id: value["id"],
21488
- plan_id: value["planId"],
21489
- rule_id: value["ruleId"],
21490
- updated_at: value["updatedAt"].toISOString()
21647
+ body: EventBodyToJSON(value["body"]),
21648
+ event_type: value["eventType"],
21649
+ sent_at: value["sentAt"] == null ? void 0 : value["sentAt"].toISOString()
21491
21650
  };
21492
21651
  }
21493
21652
 
21494
- // src/api/models/RuleDetailResponseData.ts
21495
- function instanceOfRuleDetailResponseData(value) {
21496
- if (!("conditionGroups" in value) || value["conditionGroups"] === void 0)
21497
- return false;
21498
- if (!("conditions" in value) || value["conditions"] === void 0)
21499
- return false;
21500
- if (!("createdAt" in value) || value["createdAt"] === void 0)
21501
- return false;
21502
- if (!("environmentId" in value) || value["environmentId"] === void 0)
21503
- return false;
21504
- if (!("id" in value) || value["id"] === void 0)
21505
- return false;
21506
- if (!("name" in value) || value["name"] === void 0)
21507
- return false;
21508
- if (!("priority" in value) || value["priority"] === void 0)
21509
- return false;
21510
- if (!("ruleType" in value) || value["ruleType"] === void 0)
21511
- return false;
21512
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
21513
- return false;
21514
- if (!("value" in value) || value["value"] === void 0)
21653
+ // src/api/models/CreateEventBatchRequestBody.ts
21654
+ function instanceOfCreateEventBatchRequestBody(value) {
21655
+ if (!("events" in value) || value["events"] === void 0)
21515
21656
  return false;
21516
21657
  return true;
21517
21658
  }
21518
- function RuleDetailResponseDataFromJSON(json) {
21519
- return RuleDetailResponseDataFromJSONTyped(json, false);
21659
+ function CreateEventBatchRequestBodyFromJSON(json) {
21660
+ return CreateEventBatchRequestBodyFromJSONTyped(json, false);
21520
21661
  }
21521
- function RuleDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21662
+ function CreateEventBatchRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21522
21663
  if (json == null) {
21523
21664
  return json;
21524
21665
  }
21525
21666
  return {
21526
- conditionGroups: json["condition_groups"].map(
21527
- RuleConditionGroupDetailResponseDataFromJSON
21528
- ),
21529
- conditions: json["conditions"].map(
21530
- RuleConditionDetailResponseDataFromJSON
21531
- ),
21532
- createdAt: new Date(json["created_at"]),
21533
- environmentId: json["environment_id"],
21534
- flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
21535
- id: json["id"],
21536
- name: json["name"],
21537
- planId: json["plan_id"] == null ? void 0 : json["plan_id"],
21538
- priority: json["priority"],
21539
- ruleType: json["rule_type"],
21540
- updatedAt: new Date(json["updated_at"]),
21541
- value: json["value"]
21667
+ events: json["events"].map(CreateEventRequestBodyFromJSON)
21542
21668
  };
21543
21669
  }
21544
- function RuleDetailResponseDataToJSON(value) {
21670
+ function CreateEventBatchRequestBodyToJSON(value) {
21545
21671
  if (value == null) {
21546
21672
  return value;
21547
21673
  }
21548
21674
  return {
21549
- condition_groups: value["conditionGroups"].map(
21550
- RuleConditionGroupDetailResponseDataToJSON
21551
- ),
21552
- conditions: value["conditions"].map(
21553
- RuleConditionDetailResponseDataToJSON
21554
- ),
21555
- created_at: value["createdAt"].toISOString(),
21556
- environment_id: value["environmentId"],
21557
- flag_id: value["flagId"],
21558
- id: value["id"],
21559
- name: value["name"],
21560
- plan_id: value["planId"],
21561
- priority: value["priority"],
21562
- rule_type: value["ruleType"],
21563
- updated_at: value["updatedAt"].toISOString(),
21564
- value: value["value"]
21675
+ events: value["events"].map(CreateEventRequestBodyToJSON)
21565
21676
  };
21566
21677
  }
21567
21678
 
21568
- // src/api/models/FlagCheckLogResponseData.ts
21569
- function instanceOfFlagCheckLogResponseData(value) {
21570
- if (!("checkStatus" in value) || value["checkStatus"] === void 0)
21571
- return false;
21572
- if (!("createdAt" in value) || value["createdAt"] === void 0)
21679
+ // src/api/models/RawEventResponseData.ts
21680
+ function instanceOfRawEventResponseData(value) {
21681
+ if (!("capturedAt" in value) || value["capturedAt"] === void 0)
21573
21682
  return false;
21574
- if (!("environmentId" in value) || value["environmentId"] === void 0)
21683
+ if (!("remoteAddr" in value) || value["remoteAddr"] === void 0)
21575
21684
  return false;
21576
- if (!("flagKey" in value) || value["flagKey"] === void 0)
21685
+ if (!("remoteIp" in value) || value["remoteIp"] === void 0)
21577
21686
  return false;
21578
- if (!("id" in value) || value["id"] === void 0)
21687
+ if (!("userAgent" in value) || value["userAgent"] === void 0)
21579
21688
  return false;
21580
- if (!("reason" in value) || value["reason"] === void 0)
21689
+ return true;
21690
+ }
21691
+ function RawEventResponseDataFromJSON(json) {
21692
+ return RawEventResponseDataFromJSONTyped(json, false);
21693
+ }
21694
+ function RawEventResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21695
+ if (json == null) {
21696
+ return json;
21697
+ }
21698
+ return {
21699
+ capturedAt: new Date(json["captured_at"]),
21700
+ eventId: json["event_id"] == null ? void 0 : json["event_id"],
21701
+ remoteAddr: json["remote_addr"],
21702
+ remoteIp: json["remote_ip"],
21703
+ userAgent: json["user_agent"]
21704
+ };
21705
+ }
21706
+ function RawEventResponseDataToJSON(value) {
21707
+ if (value == null) {
21708
+ return value;
21709
+ }
21710
+ return {
21711
+ captured_at: value["capturedAt"].toISOString(),
21712
+ event_id: value["eventId"],
21713
+ remote_addr: value["remoteAddr"],
21714
+ remote_ip: value["remoteIp"],
21715
+ user_agent: value["userAgent"]
21716
+ };
21717
+ }
21718
+
21719
+ // src/api/models/RawEventBatchResponseData.ts
21720
+ function instanceOfRawEventBatchResponseData(value) {
21721
+ if (!("events" in value) || value["events"] === void 0)
21581
21722
  return false;
21582
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
21723
+ return true;
21724
+ }
21725
+ function RawEventBatchResponseDataFromJSON(json) {
21726
+ return RawEventBatchResponseDataFromJSONTyped(json, false);
21727
+ }
21728
+ function RawEventBatchResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21729
+ if (json == null) {
21730
+ return json;
21731
+ }
21732
+ return {
21733
+ events: json["events"].map(RawEventResponseDataFromJSON)
21734
+ };
21735
+ }
21736
+ function RawEventBatchResponseDataToJSON(value) {
21737
+ if (value == null) {
21738
+ return value;
21739
+ }
21740
+ return {
21741
+ events: value["events"].map(RawEventResponseDataToJSON)
21742
+ };
21743
+ }
21744
+
21745
+ // src/api/models/CreateEventBatchResponse.ts
21746
+ function instanceOfCreateEventBatchResponse(value) {
21747
+ if (!("data" in value) || value["data"] === void 0)
21583
21748
  return false;
21584
- if (!("value" in value) || value["value"] === void 0)
21749
+ if (!("params" in value) || value["params"] === void 0)
21585
21750
  return false;
21586
21751
  return true;
21587
21752
  }
21588
- function FlagCheckLogResponseDataFromJSON(json) {
21589
- return FlagCheckLogResponseDataFromJSONTyped(json, false);
21753
+ function CreateEventBatchResponseFromJSON(json) {
21754
+ return CreateEventBatchResponseFromJSONTyped(json, false);
21590
21755
  }
21591
- function FlagCheckLogResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21756
+ function CreateEventBatchResponseFromJSONTyped(json, ignoreDiscriminator) {
21592
21757
  if (json == null) {
21593
21758
  return json;
21594
21759
  }
21595
21760
  return {
21596
- checkStatus: json["check_status"],
21597
- companyId: json["company_id"] == null ? void 0 : json["company_id"],
21598
- createdAt: new Date(json["created_at"]),
21599
- environmentId: json["environment_id"],
21600
- error: json["error"] == null ? void 0 : json["error"],
21601
- flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
21602
- flagKey: json["flag_key"],
21603
- id: json["id"],
21604
- reason: json["reason"],
21605
- reqCompany: json["req_company"] == null ? void 0 : json["req_company"],
21606
- reqUser: json["req_user"] == null ? void 0 : json["req_user"],
21607
- ruleId: json["rule_id"] == null ? void 0 : json["rule_id"],
21608
- updatedAt: new Date(json["updated_at"]),
21609
- userId: json["user_id"] == null ? void 0 : json["user_id"],
21610
- value: json["value"]
21761
+ data: RawEventBatchResponseDataFromJSON(json["data"]),
21762
+ params: json["params"]
21763
+ };
21764
+ }
21765
+ function CreateEventBatchResponseToJSON(value) {
21766
+ if (value == null) {
21767
+ return value;
21768
+ }
21769
+ return {
21770
+ data: RawEventBatchResponseDataToJSON(value["data"]),
21771
+ params: value["params"]
21772
+ };
21773
+ }
21774
+
21775
+ // src/api/models/CreateEventResponse.ts
21776
+ function instanceOfCreateEventResponse(value) {
21777
+ if (!("data" in value) || value["data"] === void 0)
21778
+ return false;
21779
+ if (!("params" in value) || value["params"] === void 0)
21780
+ return false;
21781
+ return true;
21782
+ }
21783
+ function CreateEventResponseFromJSON(json) {
21784
+ return CreateEventResponseFromJSONTyped(json, false);
21785
+ }
21786
+ function CreateEventResponseFromJSONTyped(json, ignoreDiscriminator) {
21787
+ if (json == null) {
21788
+ return json;
21789
+ }
21790
+ return {
21791
+ data: RawEventResponseDataFromJSON(json["data"]),
21792
+ params: json["params"]
21611
21793
  };
21612
21794
  }
21613
- function FlagCheckLogResponseDataToJSON(value) {
21795
+ function CreateEventResponseToJSON(value) {
21614
21796
  if (value == null) {
21615
21797
  return value;
21616
21798
  }
21617
21799
  return {
21618
- check_status: value["checkStatus"],
21619
- company_id: value["companyId"],
21620
- created_at: value["createdAt"].toISOString(),
21621
- environment_id: value["environmentId"],
21622
- error: value["error"],
21623
- flag_id: value["flagId"],
21624
- flag_key: value["flagKey"],
21625
- id: value["id"],
21626
- reason: value["reason"],
21627
- req_company: value["reqCompany"],
21628
- req_user: value["reqUser"],
21629
- rule_id: value["ruleId"],
21630
- updated_at: value["updatedAt"].toISOString(),
21631
- user_id: value["userId"],
21632
- value: value["value"]
21800
+ data: RawEventResponseDataToJSON(value["data"]),
21801
+ params: value["params"]
21633
21802
  };
21634
21803
  }
21635
21804
 
21636
- // src/api/models/FlagDetailResponseData.ts
21637
- function instanceOfFlagDetailResponseData(value) {
21638
- if (!("createdAt" in value) || value["createdAt"] === void 0)
21639
- return false;
21805
+ // src/api/models/CreateOrUpdateFlagRequestBody.ts
21806
+ function instanceOfCreateOrUpdateFlagRequestBody(value) {
21640
21807
  if (!("defaultValue" in value) || value["defaultValue"] === void 0)
21641
21808
  return false;
21642
21809
  if (!("description" in value) || value["description"] === void 0)
21643
21810
  return false;
21644
21811
  if (!("flagType" in value) || value["flagType"] === void 0)
21645
21812
  return false;
21646
- if (!("id" in value) || value["id"] === void 0)
21647
- return false;
21648
21813
  if (!("key" in value) || value["key"] === void 0)
21649
21814
  return false;
21650
21815
  if (!("name" in value) || value["name"] === void 0)
21651
21816
  return false;
21652
- if (!("rules" in value) || value["rules"] === void 0)
21653
- return false;
21654
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
21655
- return false;
21656
21817
  return true;
21657
21818
  }
21658
- function FlagDetailResponseDataFromJSON(json) {
21659
- return FlagDetailResponseDataFromJSONTyped(json, false);
21819
+ function CreateOrUpdateFlagRequestBodyFromJSON(json) {
21820
+ return CreateOrUpdateFlagRequestBodyFromJSONTyped(json, false);
21660
21821
  }
21661
- function FlagDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21822
+ function CreateOrUpdateFlagRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21662
21823
  if (json == null) {
21663
21824
  return json;
21664
21825
  }
21665
21826
  return {
21666
- createdAt: new Date(json["created_at"]),
21667
21827
  defaultValue: json["default_value"],
21668
21828
  description: json["description"],
21669
- feature: json["feature"] == null ? void 0 : FeatureResponseDataFromJSON(json["feature"]),
21670
21829
  featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
21671
21830
  flagType: json["flag_type"],
21672
- id: json["id"],
21831
+ id: json["id"] == null ? void 0 : json["id"],
21673
21832
  key: json["key"],
21674
- latestCheck: json["latest_check"] == null ? void 0 : FlagCheckLogResponseDataFromJSON(json["latest_check"]),
21675
- name: json["name"],
21676
- rules: json["rules"].map(RuleDetailResponseDataFromJSON),
21677
- updatedAt: new Date(json["updated_at"])
21833
+ name: json["name"]
21678
21834
  };
21679
21835
  }
21680
- function FlagDetailResponseDataToJSON(value) {
21836
+ function CreateOrUpdateFlagRequestBodyToJSON(value) {
21681
21837
  if (value == null) {
21682
21838
  return value;
21683
21839
  }
21684
21840
  return {
21685
- created_at: value["createdAt"].toISOString(),
21686
21841
  default_value: value["defaultValue"],
21687
21842
  description: value["description"],
21688
- feature: FeatureResponseDataToJSON(value["feature"]),
21689
21843
  feature_id: value["featureId"],
21690
21844
  flag_type: value["flagType"],
21691
21845
  id: value["id"],
21692
21846
  key: value["key"],
21693
- latest_check: FlagCheckLogResponseDataToJSON(value["latestCheck"]),
21694
- name: value["name"],
21695
- rules: value["rules"].map(RuleDetailResponseDataToJSON),
21696
- updated_at: value["updatedAt"].toISOString()
21847
+ name: value["name"]
21697
21848
  };
21698
21849
  }
21699
21850
 
21700
- // src/api/models/FeatureDetailResponseData.ts
21701
- function instanceOfFeatureDetailResponseData(value) {
21702
- if (!("createdAt" in value) || value["createdAt"] === void 0)
21703
- return false;
21851
+ // src/api/models/CreateFeatureRequestBody.ts
21852
+ var CreateFeatureRequestBodyFeatureTypeEnum = {
21853
+ Boolean: "boolean",
21854
+ Event: "event",
21855
+ Trait: "trait"
21856
+ };
21857
+ function instanceOfCreateFeatureRequestBody(value) {
21704
21858
  if (!("description" in value) || value["description"] === void 0)
21705
21859
  return false;
21706
21860
  if (!("featureType" in value) || value["featureType"] === void 0)
21707
21861
  return false;
21708
- if (!("flags" in value) || value["flags"] === void 0)
21709
- return false;
21710
- if (!("id" in value) || value["id"] === void 0)
21711
- return false;
21712
21862
  if (!("name" in value) || value["name"] === void 0)
21713
21863
  return false;
21714
- if (!("plans" in value) || value["plans"] === void 0)
21715
- return false;
21716
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
21717
- return false;
21718
21864
  return true;
21719
21865
  }
21720
- function FeatureDetailResponseDataFromJSON(json) {
21721
- return FeatureDetailResponseDataFromJSONTyped(json, false);
21866
+ function CreateFeatureRequestBodyFromJSON(json) {
21867
+ return CreateFeatureRequestBodyFromJSONTyped(json, false);
21722
21868
  }
21723
- function FeatureDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21869
+ function CreateFeatureRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21724
21870
  if (json == null) {
21725
21871
  return json;
21726
21872
  }
21727
21873
  return {
21728
- createdAt: new Date(json["created_at"]),
21729
21874
  description: json["description"],
21730
21875
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
21731
- eventSummary: json["event_summary"] == null ? void 0 : EventSummaryResponseDataFromJSON(json["event_summary"]),
21732
21876
  featureType: json["feature_type"],
21733
- flags: json["flags"].map(FlagDetailResponseDataFromJSON),
21734
- id: json["id"],
21877
+ flag: json["flag"] == null ? void 0 : CreateOrUpdateFlagRequestBodyFromJSON(json["flag"]),
21735
21878
  lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
21736
21879
  name: json["name"],
21737
- plans: json["plans"].map(PreviewObjectFromJSON),
21738
- trait: json["trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["trait"]),
21739
- traitId: json["trait_id"] == null ? void 0 : json["trait_id"],
21740
- updatedAt: new Date(json["updated_at"])
21880
+ traitId: json["trait_id"] == null ? void 0 : json["trait_id"]
21741
21881
  };
21742
21882
  }
21743
- function FeatureDetailResponseDataToJSON(value) {
21883
+ function CreateFeatureRequestBodyToJSON(value) {
21744
21884
  if (value == null) {
21745
21885
  return value;
21746
21886
  }
21747
21887
  return {
21748
- created_at: value["createdAt"].toISOString(),
21749
21888
  description: value["description"],
21750
21889
  event_subtype: value["eventSubtype"],
21751
- event_summary: EventSummaryResponseDataToJSON(value["eventSummary"]),
21752
21890
  feature_type: value["featureType"],
21753
- flags: value["flags"].map(FlagDetailResponseDataToJSON),
21754
- id: value["id"],
21891
+ flag: CreateOrUpdateFlagRequestBodyToJSON(value["flag"]),
21755
21892
  lifecycle_phase: value["lifecyclePhase"],
21756
21893
  name: value["name"],
21757
- plans: value["plans"].map(PreviewObjectToJSON),
21758
- trait: EntityTraitDefinitionResponseDataToJSON(value["trait"]),
21759
- trait_id: value["traitId"],
21760
- updated_at: value["updatedAt"].toISOString()
21894
+ trait_id: value["traitId"]
21761
21895
  };
21762
21896
  }
21763
21897
 
@@ -21980,56 +22114,6 @@ function CreatePlanEntitlementRequestBodyToJSON(value) {
21980
22114
  };
21981
22115
  }
21982
22116
 
21983
- // src/api/models/PlanResponseData.ts
21984
- function instanceOfPlanResponseData(value) {
21985
- if (!("audienceType" in value) || value["audienceType"] === void 0)
21986
- return false;
21987
- if (!("createdAt" in value) || value["createdAt"] === void 0)
21988
- return false;
21989
- if (!("description" in value) || value["description"] === void 0)
21990
- return false;
21991
- if (!("id" in value) || value["id"] === void 0)
21992
- return false;
21993
- if (!("name" in value) || value["name"] === void 0)
21994
- return false;
21995
- if (!("planType" in value) || value["planType"] === void 0)
21996
- return false;
21997
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
21998
- return false;
21999
- return true;
22000
- }
22001
- function PlanResponseDataFromJSON(json) {
22002
- return PlanResponseDataFromJSONTyped(json, false);
22003
- }
22004
- function PlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
22005
- if (json == null) {
22006
- return json;
22007
- }
22008
- return {
22009
- audienceType: json["audience_type"],
22010
- createdAt: new Date(json["created_at"]),
22011
- description: json["description"],
22012
- id: json["id"],
22013
- name: json["name"],
22014
- planType: json["plan_type"],
22015
- updatedAt: new Date(json["updated_at"])
22016
- };
22017
- }
22018
- function PlanResponseDataToJSON(value) {
22019
- if (value == null) {
22020
- return value;
22021
- }
22022
- return {
22023
- audience_type: value["audienceType"],
22024
- created_at: value["createdAt"].toISOString(),
22025
- description: value["description"],
22026
- id: value["id"],
22027
- name: value["name"],
22028
- plan_type: value["planType"],
22029
- updated_at: value["updatedAt"].toISOString()
22030
- };
22031
- }
22032
-
22033
22117
  // src/api/models/PlanEntitlementResponseData.ts
22034
22118
  function instanceOfPlanEntitlementResponseData(value) {
22035
22119
  if (!("createdAt" in value) || value["createdAt"] === void 0)
@@ -23676,90 +23760,6 @@ function FeatureCompanyUserResponseDataToJSON(value) {
23676
23760
  };
23677
23761
  }
23678
23762
 
23679
- // src/api/models/FeatureUsageResponseData.ts
23680
- var FeatureUsageResponseDataAllocationTypeEnum = {
23681
- Boolean: "boolean",
23682
- Numeric: "numeric",
23683
- Trait: "trait",
23684
- Unlimited: "unlimited"
23685
- };
23686
- function instanceOfFeatureUsageResponseData(value) {
23687
- if (!("access" in value) || value["access"] === void 0)
23688
- return false;
23689
- if (!("allocationType" in value) || value["allocationType"] === void 0)
23690
- return false;
23691
- if (!("entitlementId" in value) || value["entitlementId"] === void 0)
23692
- return false;
23693
- if (!("entitlementType" in value) || value["entitlementType"] === void 0)
23694
- return false;
23695
- return true;
23696
- }
23697
- function FeatureUsageResponseDataFromJSON(json) {
23698
- return FeatureUsageResponseDataFromJSONTyped(json, false);
23699
- }
23700
- function FeatureUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
23701
- if (json == null) {
23702
- return json;
23703
- }
23704
- return {
23705
- access: json["access"],
23706
- allocation: json["allocation"] == null ? void 0 : json["allocation"],
23707
- allocationType: json["allocation_type"],
23708
- entitlementId: json["entitlement_id"],
23709
- entitlementType: json["entitlement_type"],
23710
- feature: json["feature"] == null ? void 0 : FeatureDetailResponseDataFromJSON(json["feature"]),
23711
- period: json["period"] == null ? void 0 : json["period"],
23712
- plan: json["plan"] == null ? void 0 : PlanResponseDataFromJSON(json["plan"]),
23713
- usage: json["usage"] == null ? void 0 : json["usage"]
23714
- };
23715
- }
23716
- function FeatureUsageResponseDataToJSON(value) {
23717
- if (value == null) {
23718
- return value;
23719
- }
23720
- return {
23721
- access: value["access"],
23722
- allocation: value["allocation"],
23723
- allocation_type: value["allocationType"],
23724
- entitlement_id: value["entitlementId"],
23725
- entitlement_type: value["entitlementType"],
23726
- feature: FeatureDetailResponseDataToJSON(value["feature"]),
23727
- period: value["period"],
23728
- plan: PlanResponseDataToJSON(value["plan"]),
23729
- usage: value["usage"]
23730
- };
23731
- }
23732
-
23733
- // src/api/models/FeatureUsageDetailResponseData.ts
23734
- function instanceOfFeatureUsageDetailResponseData(value) {
23735
- if (!("features" in value) || value["features"] === void 0)
23736
- return false;
23737
- return true;
23738
- }
23739
- function FeatureUsageDetailResponseDataFromJSON(json) {
23740
- return FeatureUsageDetailResponseDataFromJSONTyped(json, false);
23741
- }
23742
- function FeatureUsageDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
23743
- if (json == null) {
23744
- return json;
23745
- }
23746
- return {
23747
- features: json["features"].map(
23748
- FeatureUsageResponseDataFromJSON
23749
- )
23750
- };
23751
- }
23752
- function FeatureUsageDetailResponseDataToJSON(value) {
23753
- if (value == null) {
23754
- return value;
23755
- }
23756
- return {
23757
- features: value["features"].map(
23758
- FeatureUsageResponseDataToJSON
23759
- )
23760
- };
23761
- }
23762
-
23763
23763
  // src/api/models/FlagResponseData.ts
23764
23764
  function instanceOfFlagResponseData(value) {
23765
23765
  if (!("createdAt" in value) || value["createdAt"] === void 0)
@@ -25146,7 +25146,7 @@ function HydrateComponentResponseFromJSONTyped(json, ignoreDiscriminator) {
25146
25146
  return json;
25147
25147
  }
25148
25148
  return {
25149
- data: ComponentHydrateViewFromJSON(json["data"]),
25149
+ data: ComponentHydrateResponseDataFromJSON(json["data"]),
25150
25150
  params: json["params"]
25151
25151
  };
25152
25152
  }
@@ -25155,7 +25155,7 @@ function HydrateComponentResponseToJSON(value) {
25155
25155
  return value;
25156
25156
  }
25157
25157
  return {
25158
- data: ComponentHydrateViewToJSON(value["data"]),
25158
+ data: ComponentHydrateResponseDataToJSON(value["data"]),
25159
25159
  params: value["params"]
25160
25160
  };
25161
25161
  }
@@ -25192,8 +25192,6 @@ function IssueTemporaryAccessTokenRequestBodyToJSON(value) {
25192
25192
 
25193
25193
  // src/api/models/IssueTemporaryAccessTokenResponseData.ts
25194
25194
  function instanceOfIssueTemporaryAccessTokenResponseData(value) {
25195
- if (!("accountId" in value) || value["accountId"] === void 0)
25196
- return false;
25197
25195
  if (!("apiKeyId" in value) || value["apiKeyId"] === void 0)
25198
25196
  return false;
25199
25197
  if (!("createdAt" in value) || value["createdAt"] === void 0)
@@ -25220,7 +25218,6 @@ function IssueTemporaryAccessTokenResponseDataFromJSONTyped(json, ignoreDiscrimi
25220
25218
  return json;
25221
25219
  }
25222
25220
  return {
25223
- accountId: json["account_id"],
25224
25221
  apiKeyId: json["api_key_id"],
25225
25222
  createdAt: new Date(json["created_at"]),
25226
25223
  environmentId: json["environment_id"],
@@ -25236,7 +25233,6 @@ function IssueTemporaryAccessTokenResponseDataToJSON(value) {
25236
25233
  return value;
25237
25234
  }
25238
25235
  return {
25239
- account_id: value["accountId"],
25240
25236
  api_key_id: value["apiKeyId"],
25241
25237
  created_at: value["createdAt"].toISOString(),
25242
25238
  environment_id: value["environmentId"],
@@ -27362,8 +27358,6 @@ function RulesDetailResponseDataToJSON(value) {
27362
27358
 
27363
27359
  // src/api/models/TemporaryAccessTokenResponseData.ts
27364
27360
  function instanceOfTemporaryAccessTokenResponseData(value) {
27365
- if (!("accountId" in value) || value["accountId"] === void 0)
27366
- return false;
27367
27361
  if (!("apiKeyId" in value) || value["apiKeyId"] === void 0)
27368
27362
  return false;
27369
27363
  if (!("createdAt" in value) || value["createdAt"] === void 0)
@@ -27388,7 +27382,6 @@ function TemporaryAccessTokenResponseDataFromJSONTyped(json, ignoreDiscriminator
27388
27382
  return json;
27389
27383
  }
27390
27384
  return {
27391
- accountId: json["account_id"],
27392
27385
  apiKeyId: json["api_key_id"],
27393
27386
  createdAt: new Date(json["created_at"]),
27394
27387
  environmentId: json["environment_id"],
@@ -27403,7 +27396,6 @@ function TemporaryAccessTokenResponseDataToJSON(value) {
27403
27396
  return value;
27404
27397
  }
27405
27398
  return {
27406
- account_id: value["accountId"],
27407
27399
  api_key_id: value["apiKeyId"],
27408
27400
  created_at: value["createdAt"].toISOString(),
27409
27401
  environment_id: value["environmentId"],
@@ -35332,7 +35324,7 @@ var Schematic = class {
35332
35324
  constructor(apiKey, opts) {
35333
35325
  const { offline = false } = opts ?? {};
35334
35326
  const { basePath, flagDefaults = {} } = opts ?? {};
35335
- const version = "1.0.18";
35327
+ const version = "1.0.19";
35336
35328
  const headers = {
35337
35329
  "User-Agent": `schematic-typescript-node@v${version}`
35338
35330
  };
@@ -35529,9 +35521,9 @@ function init(apiKey, opts) {
35529
35521
  CompanySubscriptionResponseDataFromJSON,
35530
35522
  CompanySubscriptionResponseDataFromJSONTyped,
35531
35523
  CompanySubscriptionResponseDataToJSON,
35532
- ComponentHydrateViewFromJSON,
35533
- ComponentHydrateViewFromJSONTyped,
35534
- ComponentHydrateViewToJSON,
35524
+ ComponentHydrateResponseDataFromJSON,
35525
+ ComponentHydrateResponseDataFromJSONTyped,
35526
+ ComponentHydrateResponseDataToJSON,
35535
35527
  ComponentResponseDataFromJSON,
35536
35528
  ComponentResponseDataFromJSONTyped,
35537
35529
  ComponentResponseDataToJSON,
@@ -36470,7 +36462,7 @@ function init(apiKey, opts) {
36470
36462
  instanceOfCompanyPlanResponseData,
36471
36463
  instanceOfCompanyResponseData,
36472
36464
  instanceOfCompanySubscriptionResponseData,
36473
- instanceOfComponentHydrateView,
36465
+ instanceOfComponentHydrateResponseData,
36474
36466
  instanceOfComponentResponseData,
36475
36467
  instanceOfCountApiKeysParams,
36476
36468
  instanceOfCountApiKeysResponse,