@schematichq/schematic-typescript-node 1.0.17 → 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.
@@ -14517,6 +14517,7 @@ var require_form_data = __commonJS({
14517
14517
  // src/index.ts
14518
14518
  var src_exports = {};
14519
14519
  __export(src_exports, {
14520
+ AccesstokensApi: () => AccesstokensApi,
14520
14521
  AccountsApi: () => AccountsApi,
14521
14522
  ApiErrorFromJSON: () => ApiErrorFromJSON,
14522
14523
  ApiErrorFromJSONTyped: () => ApiErrorFromJSONTyped,
@@ -14593,9 +14594,9 @@ __export(src_exports, {
14593
14594
  CompanySubscriptionResponseDataFromJSON: () => CompanySubscriptionResponseDataFromJSON,
14594
14595
  CompanySubscriptionResponseDataFromJSONTyped: () => CompanySubscriptionResponseDataFromJSONTyped,
14595
14596
  CompanySubscriptionResponseDataToJSON: () => CompanySubscriptionResponseDataToJSON,
14596
- ComponentHydrateViewFromJSON: () => ComponentHydrateViewFromJSON,
14597
- ComponentHydrateViewFromJSONTyped: () => ComponentHydrateViewFromJSONTyped,
14598
- ComponentHydrateViewToJSON: () => ComponentHydrateViewToJSON,
14597
+ ComponentHydrateResponseDataFromJSON: () => ComponentHydrateResponseDataFromJSON,
14598
+ ComponentHydrateResponseDataFromJSONTyped: () => ComponentHydrateResponseDataFromJSONTyped,
14599
+ ComponentHydrateResponseDataToJSON: () => ComponentHydrateResponseDataToJSON,
14599
14600
  ComponentResponseDataFromJSON: () => ComponentResponseDataFromJSON,
14600
14601
  ComponentResponseDataFromJSONTyped: () => ComponentResponseDataFromJSONTyped,
14601
14602
  ComponentResponseDataToJSON: () => ComponentResponseDataToJSON,
@@ -15102,6 +15103,15 @@ __export(src_exports, {
15102
15103
  HydrateComponentResponseFromJSON: () => HydrateComponentResponseFromJSON,
15103
15104
  HydrateComponentResponseFromJSONTyped: () => HydrateComponentResponseFromJSONTyped,
15104
15105
  HydrateComponentResponseToJSON: () => HydrateComponentResponseToJSON,
15106
+ IssueTemporaryAccessTokenRequestBodyFromJSON: () => IssueTemporaryAccessTokenRequestBodyFromJSON,
15107
+ IssueTemporaryAccessTokenRequestBodyFromJSONTyped: () => IssueTemporaryAccessTokenRequestBodyFromJSONTyped,
15108
+ IssueTemporaryAccessTokenRequestBodyToJSON: () => IssueTemporaryAccessTokenRequestBodyToJSON,
15109
+ IssueTemporaryAccessTokenResponseDataFromJSON: () => IssueTemporaryAccessTokenResponseDataFromJSON,
15110
+ IssueTemporaryAccessTokenResponseDataFromJSONTyped: () => IssueTemporaryAccessTokenResponseDataFromJSONTyped,
15111
+ IssueTemporaryAccessTokenResponseDataToJSON: () => IssueTemporaryAccessTokenResponseDataToJSON,
15112
+ IssueTemporaryAccessTokenResponseFromJSON: () => IssueTemporaryAccessTokenResponseFromJSON,
15113
+ IssueTemporaryAccessTokenResponseFromJSONTyped: () => IssueTemporaryAccessTokenResponseFromJSONTyped,
15114
+ IssueTemporaryAccessTokenResponseToJSON: () => IssueTemporaryAccessTokenResponseToJSON,
15105
15115
  JSONApiResponse: () => JSONApiResponse,
15106
15116
  KeysRequestBodyFromJSON: () => KeysRequestBodyFromJSON,
15107
15117
  KeysRequestBodyFromJSONTyped: () => KeysRequestBodyFromJSONTyped,
@@ -15342,6 +15352,9 @@ __export(src_exports, {
15342
15352
  SegmentStatusRespFromJSON: () => SegmentStatusRespFromJSON,
15343
15353
  SegmentStatusRespFromJSONTyped: () => SegmentStatusRespFromJSONTyped,
15344
15354
  SegmentStatusRespToJSON: () => SegmentStatusRespToJSON,
15355
+ TemporaryAccessTokenResponseDataFromJSON: () => TemporaryAccessTokenResponseDataFromJSON,
15356
+ TemporaryAccessTokenResponseDataFromJSONTyped: () => TemporaryAccessTokenResponseDataFromJSONTyped,
15357
+ TemporaryAccessTokenResponseDataToJSON: () => TemporaryAccessTokenResponseDataToJSON,
15345
15358
  TextApiResponse: () => TextApiResponse,
15346
15359
  UpdateApiKeyRequestBodyFromJSON: () => UpdateApiKeyRequestBodyFromJSON,
15347
15360
  UpdateApiKeyRequestBodyFromJSONTyped: () => UpdateApiKeyRequestBodyFromJSONTyped,
@@ -15522,7 +15535,7 @@ __export(src_exports, {
15522
15535
  instanceOfCompanyPlanResponseData: () => instanceOfCompanyPlanResponseData,
15523
15536
  instanceOfCompanyResponseData: () => instanceOfCompanyResponseData,
15524
15537
  instanceOfCompanySubscriptionResponseData: () => instanceOfCompanySubscriptionResponseData,
15525
- instanceOfComponentHydrateView: () => instanceOfComponentHydrateView,
15538
+ instanceOfComponentHydrateResponseData: () => instanceOfComponentHydrateResponseData,
15526
15539
  instanceOfComponentResponseData: () => instanceOfComponentResponseData,
15527
15540
  instanceOfCountApiKeysParams: () => instanceOfCountApiKeysParams,
15528
15541
  instanceOfCountApiKeysResponse: () => instanceOfCountApiKeysResponse,
@@ -15679,6 +15692,9 @@ __export(src_exports, {
15679
15692
  instanceOfGetWebhookEventResponse: () => instanceOfGetWebhookEventResponse,
15680
15693
  instanceOfGetWebhookResponse: () => instanceOfGetWebhookResponse,
15681
15694
  instanceOfHydrateComponentResponse: () => instanceOfHydrateComponentResponse,
15695
+ instanceOfIssueTemporaryAccessTokenRequestBody: () => instanceOfIssueTemporaryAccessTokenRequestBody,
15696
+ instanceOfIssueTemporaryAccessTokenResponse: () => instanceOfIssueTemporaryAccessTokenResponse,
15697
+ instanceOfIssueTemporaryAccessTokenResponseData: () => instanceOfIssueTemporaryAccessTokenResponseData,
15682
15698
  instanceOfKeysRequestBody: () => instanceOfKeysRequestBody,
15683
15699
  instanceOfListApiKeysParams: () => instanceOfListApiKeysParams,
15684
15700
  instanceOfListApiKeysResponse: () => instanceOfListApiKeysResponse,
@@ -15755,6 +15771,7 @@ __export(src_exports, {
15755
15771
  instanceOfRuleResponseData: () => instanceOfRuleResponseData,
15756
15772
  instanceOfRulesDetailResponseData: () => instanceOfRulesDetailResponseData,
15757
15773
  instanceOfSegmentStatusResp: () => instanceOfSegmentStatusResp,
15774
+ instanceOfTemporaryAccessTokenResponseData: () => instanceOfTemporaryAccessTokenResponseData,
15758
15775
  instanceOfUpdateApiKeyRequestBody: () => instanceOfUpdateApiKeyRequestBody,
15759
15776
  instanceOfUpdateApiKeyResponse: () => instanceOfUpdateApiKeyResponse,
15760
15777
  instanceOfUpdateAudienceRequestBody: () => instanceOfUpdateAudienceRequestBody,
@@ -18938,153 +18955,775 @@ function ComponentResponseDataToJSON(value) {
18938
18955
  };
18939
18956
  }
18940
18957
 
18941
- // src/api/models/ComponentHydrateView.ts
18942
- function instanceOfComponentHydrateView(value) {
18943
- 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)
18944
18969
  return false;
18945
18970
  return true;
18946
18971
  }
18947
- function ComponentHydrateViewFromJSON(json) {
18948
- return ComponentHydrateViewFromJSONTyped(json, false);
18972
+ function EventSummaryResponseDataFromJSON(json) {
18973
+ return EventSummaryResponseDataFromJSONTyped(json, false);
18949
18974
  }
18950
- function ComponentHydrateViewFromJSONTyped(json, ignoreDiscriminator) {
18975
+ function EventSummaryResponseDataFromJSONTyped(json, ignoreDiscriminator) {
18951
18976
  if (json == null) {
18952
18977
  return json;
18953
18978
  }
18954
18979
  return {
18955
- component: json["component"] == null ? void 0 : ComponentResponseDataFromJSON(json["component"]),
18956
- 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"]
18957
18986
  };
18958
18987
  }
18959
- function ComponentHydrateViewToJSON(value) {
18988
+ function EventSummaryResponseDataToJSON(value) {
18960
18989
  if (value == null) {
18961
18990
  return value;
18962
18991
  }
18963
18992
  return {
18964
- component: ComponentResponseDataToJSON(value["component"]),
18965
- 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"]
18966
18999
  };
18967
19000
  }
18968
19001
 
18969
- // src/api/models/CountApiKeysParams.ts
18970
- 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;
18971
19008
  return true;
18972
19009
  }
18973
- function CountApiKeysParamsFromJSON(json) {
18974
- return CountApiKeysParamsFromJSONTyped(json, false);
19010
+ function RuleConditionResourceResponseDataFromJSON(json) {
19011
+ return RuleConditionResourceResponseDataFromJSONTyped(json, false);
18975
19012
  }
18976
- function CountApiKeysParamsFromJSONTyped(json, ignoreDiscriminator) {
19013
+ function RuleConditionResourceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
18977
19014
  if (json == null) {
18978
19015
  return json;
18979
19016
  }
18980
19017
  return {
18981
- environmentId: json["environment_id"] == null ? void 0 : json["environment_id"],
18982
- limit: json["limit"] == null ? void 0 : json["limit"],
18983
- offset: json["offset"] == null ? void 0 : json["offset"],
18984
- requireEnvironment: json["require_environment"] == null ? void 0 : json["require_environment"]
19018
+ id: json["id"],
19019
+ name: json["name"]
18985
19020
  };
18986
19021
  }
18987
- function CountApiKeysParamsToJSON(value) {
19022
+ function RuleConditionResourceResponseDataToJSON(value) {
18988
19023
  if (value == null) {
18989
19024
  return value;
18990
19025
  }
18991
19026
  return {
18992
- environment_id: value["environmentId"],
18993
- limit: value["limit"],
18994
- offset: value["offset"],
18995
- require_environment: value["requireEnvironment"]
19027
+ id: value["id"],
19028
+ name: value["name"]
18996
19029
  };
18997
19030
  }
18998
19031
 
18999
- // src/api/models/CountResponse.ts
19000
- function instanceOfCountResponse(value) {
19001
- 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)
19002
19053
  return false;
19003
19054
  return true;
19004
19055
  }
19005
- function CountResponseFromJSON(json) {
19006
- return CountResponseFromJSONTyped(json, false);
19056
+ function RuleConditionDetailResponseDataFromJSON(json) {
19057
+ return RuleConditionDetailResponseDataFromJSONTyped(json, false);
19007
19058
  }
19008
- function CountResponseFromJSONTyped(json, ignoreDiscriminator) {
19059
+ function RuleConditionDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19009
19060
  if (json == null) {
19010
19061
  return json;
19011
19062
  }
19012
19063
  return {
19013
- 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"])
19014
19087
  };
19015
19088
  }
19016
- function CountResponseToJSON(value) {
19089
+ function RuleConditionDetailResponseDataToJSON(value) {
19017
19090
  if (value == null) {
19018
19091
  return value;
19019
19092
  }
19020
19093
  return {
19021
- 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()
19022
19119
  };
19023
19120
  }
19024
19121
 
19025
- // src/api/models/CountApiKeysResponse.ts
19026
- function instanceOfCountApiKeysResponse(value) {
19027
- 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)
19028
19125
  return false;
19029
- 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)
19030
19135
  return false;
19031
19136
  return true;
19032
19137
  }
19033
- function CountApiKeysResponseFromJSON(json) {
19034
- return CountApiKeysResponseFromJSONTyped(json, false);
19138
+ function RuleConditionGroupDetailResponseDataFromJSON(json) {
19139
+ return RuleConditionGroupDetailResponseDataFromJSONTyped(json, false);
19035
19140
  }
19036
- function CountApiKeysResponseFromJSONTyped(json, ignoreDiscriminator) {
19141
+ function RuleConditionGroupDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19037
19142
  if (json == null) {
19038
19143
  return json;
19039
19144
  }
19040
19145
  return {
19041
- data: CountResponseFromJSON(json["data"]),
19042
- 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"])
19043
19156
  };
19044
19157
  }
19045
- function CountApiKeysResponseToJSON(value) {
19158
+ function RuleConditionGroupDetailResponseDataToJSON(value) {
19046
19159
  if (value == null) {
19047
19160
  return value;
19048
19161
  }
19049
19162
  return {
19050
- data: CountResponseToJSON(value["data"]),
19051
- 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()
19052
19173
  };
19053
19174
  }
19054
19175
 
19055
- // src/api/models/CountApiRequestsParams.ts
19056
- 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;
19057
19198
  return true;
19058
19199
  }
19059
- function CountApiRequestsParamsFromJSON(json) {
19060
- return CountApiRequestsParamsFromJSONTyped(json, false);
19200
+ function RuleDetailResponseDataFromJSON(json) {
19201
+ return RuleDetailResponseDataFromJSONTyped(json, false);
19061
19202
  }
19062
- function CountApiRequestsParamsFromJSONTyped(json, ignoreDiscriminator) {
19203
+ function RuleDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19063
19204
  if (json == null) {
19064
19205
  return json;
19065
19206
  }
19066
19207
  return {
19067
- environmentId: json["environment_id"] == null ? void 0 : json["environment_id"],
19068
- limit: json["limit"] == null ? void 0 : json["limit"],
19069
- offset: json["offset"] == null ? void 0 : json["offset"],
19070
- q: json["q"] == null ? void 0 : json["q"],
19071
- 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"]
19072
19224
  };
19073
19225
  }
19074
- function CountApiRequestsParamsToJSON(value) {
19226
+ function RuleDetailResponseDataToJSON(value) {
19075
19227
  if (value == null) {
19076
19228
  return value;
19077
19229
  }
19078
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(),
19079
19238
  environment_id: value["environmentId"],
19080
- limit: value["limit"],
19081
- offset: value["offset"],
19082
- q: value["q"],
19083
- request_type: value["requestType"]
19084
- };
19085
- }
19086
-
19087
- // src/api/models/CountApiRequestsResponse.ts
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)
19253
+ return false;
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)
19267
+ return false;
19268
+ return true;
19269
+ }
19270
+ function FlagCheckLogResponseDataFromJSON(json) {
19271
+ return FlagCheckLogResponseDataFromJSONTyped(json, false);
19272
+ }
19273
+ function FlagCheckLogResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19274
+ if (json == null) {
19275
+ return json;
19276
+ }
19277
+ return {
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"]
19293
+ };
19294
+ }
19295
+ function FlagCheckLogResponseDataToJSON(value) {
19296
+ if (value == null) {
19297
+ return value;
19298
+ }
19299
+ return {
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"]
19315
+ };
19316
+ }
19317
+
19318
+ // src/api/models/FlagDetailResponseData.ts
19319
+ function instanceOfFlagDetailResponseData(value) {
19320
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
19321
+ return false;
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)
19337
+ return false;
19338
+ return true;
19339
+ }
19340
+ function FlagDetailResponseDataFromJSON(json) {
19341
+ return FlagDetailResponseDataFromJSONTyped(json, false);
19342
+ }
19343
+ function FlagDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19344
+ if (json == null) {
19345
+ return json;
19346
+ }
19347
+ return {
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"])
19360
+ };
19361
+ }
19362
+ function FlagDetailResponseDataToJSON(value) {
19363
+ if (value == null) {
19364
+ return value;
19365
+ }
19366
+ return {
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()
19379
+ };
19380
+ }
19381
+
19382
+ // src/api/models/FeatureDetailResponseData.ts
19383
+ function instanceOfFeatureDetailResponseData(value) {
19384
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
19385
+ return false;
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)
19399
+ return false;
19400
+ return true;
19401
+ }
19402
+ function FeatureDetailResponseDataFromJSON(json) {
19403
+ return FeatureDetailResponseDataFromJSONTyped(json, false);
19404
+ }
19405
+ function FeatureDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19406
+ if (json == null) {
19407
+ return json;
19408
+ }
19409
+ return {
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"])
19423
+ };
19424
+ }
19425
+ function FeatureDetailResponseDataToJSON(value) {
19426
+ if (value == null) {
19427
+ return value;
19428
+ }
19429
+ return {
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()
19443
+ };
19444
+ }
19445
+
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;
19462
+ return true;
19463
+ }
19464
+ function PlanResponseDataFromJSON(json) {
19465
+ return PlanResponseDataFromJSONTyped(json, false);
19466
+ }
19467
+ function PlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19468
+ if (json == null) {
19469
+ return json;
19470
+ }
19471
+ return {
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"])
19479
+ };
19480
+ }
19481
+ function PlanResponseDataToJSON(value) {
19482
+ if (value == null) {
19483
+ return value;
19484
+ }
19485
+ return {
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()
19493
+ };
19494
+ }
19495
+
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)
19505
+ return false;
19506
+ if (!("allocationType" in value) || value["allocationType"] === void 0)
19507
+ return 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;
19513
+ }
19514
+ function FeatureUsageResponseDataFromJSON(json) {
19515
+ return FeatureUsageResponseDataFromJSONTyped(json, false);
19516
+ }
19517
+ function FeatureUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19518
+ if (json == null) {
19519
+ return json;
19520
+ }
19521
+ return {
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"]
19531
+ };
19532
+ }
19533
+ function FeatureUsageResponseDataToJSON(value) {
19534
+ if (value == null) {
19535
+ return value;
19536
+ }
19537
+ return {
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"]
19547
+ };
19548
+ }
19549
+
19550
+ // src/api/models/FeatureUsageDetailResponseData.ts
19551
+ function instanceOfFeatureUsageDetailResponseData(value) {
19552
+ if (!("features" in value) || value["features"] === void 0)
19553
+ return false;
19554
+ return true;
19555
+ }
19556
+ function FeatureUsageDetailResponseDataFromJSON(json) {
19557
+ return FeatureUsageDetailResponseDataFromJSONTyped(json, false);
19558
+ }
19559
+ function FeatureUsageDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19560
+ if (json == null) {
19561
+ return json;
19562
+ }
19563
+ return {
19564
+ features: json["features"].map(
19565
+ FeatureUsageResponseDataFromJSON
19566
+ )
19567
+ };
19568
+ }
19569
+ function FeatureUsageDetailResponseDataToJSON(value) {
19570
+ if (value == null) {
19571
+ return value;
19572
+ }
19573
+ return {
19574
+ features: value["features"].map(
19575
+ FeatureUsageResponseDataToJSON
19576
+ )
19577
+ };
19578
+ }
19579
+
19580
+ // src/api/models/ComponentHydrateResponseData.ts
19581
+ function instanceOfComponentHydrateResponseData(value) {
19582
+ return true;
19583
+ }
19584
+ function ComponentHydrateResponseDataFromJSON(json) {
19585
+ return ComponentHydrateResponseDataFromJSONTyped(json, false);
19586
+ }
19587
+ function ComponentHydrateResponseDataFromJSONTyped(json, ignoreDiscriminator) {
19588
+ if (json == null) {
19589
+ return json;
19590
+ }
19591
+ return {
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"])
19595
+ };
19596
+ }
19597
+ function ComponentHydrateResponseDataToJSON(value) {
19598
+ if (value == null) {
19599
+ return value;
19600
+ }
19601
+ return {
19602
+ company: CompanyDetailResponseDataToJSON(value["company"]),
19603
+ component: ComponentResponseDataToJSON(value["component"]),
19604
+ feature_usage: FeatureUsageDetailResponseDataToJSON(value["featureUsage"])
19605
+ };
19606
+ }
19607
+
19608
+ // src/api/models/CountApiKeysParams.ts
19609
+ function instanceOfCountApiKeysParams(value) {
19610
+ return true;
19611
+ }
19612
+ function CountApiKeysParamsFromJSON(json) {
19613
+ return CountApiKeysParamsFromJSONTyped(json, false);
19614
+ }
19615
+ function CountApiKeysParamsFromJSONTyped(json, ignoreDiscriminator) {
19616
+ if (json == null) {
19617
+ return json;
19618
+ }
19619
+ return {
19620
+ environmentId: json["environment_id"] == null ? void 0 : json["environment_id"],
19621
+ limit: json["limit"] == null ? void 0 : json["limit"],
19622
+ offset: json["offset"] == null ? void 0 : json["offset"],
19623
+ requireEnvironment: json["require_environment"] == null ? void 0 : json["require_environment"]
19624
+ };
19625
+ }
19626
+ function CountApiKeysParamsToJSON(value) {
19627
+ if (value == null) {
19628
+ return value;
19629
+ }
19630
+ return {
19631
+ environment_id: value["environmentId"],
19632
+ limit: value["limit"],
19633
+ offset: value["offset"],
19634
+ require_environment: value["requireEnvironment"]
19635
+ };
19636
+ }
19637
+
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) {
19666
+ if (!("data" in value) || value["data"] === void 0)
19667
+ return false;
19668
+ if (!("params" in value) || value["params"] === void 0)
19669
+ return false;
19670
+ return true;
19671
+ }
19672
+ function CountApiKeysResponseFromJSON(json) {
19673
+ return CountApiKeysResponseFromJSONTyped(json, false);
19674
+ }
19675
+ function CountApiKeysResponseFromJSONTyped(json, ignoreDiscriminator) {
19676
+ if (json == null) {
19677
+ return json;
19678
+ }
19679
+ return {
19680
+ data: CountResponseFromJSON(json["data"]),
19681
+ params: CountApiKeysParamsFromJSON(json["params"])
19682
+ };
19683
+ }
19684
+ function CountApiKeysResponseToJSON(value) {
19685
+ if (value == null) {
19686
+ return value;
19687
+ }
19688
+ return {
19689
+ data: CountResponseToJSON(value["data"]),
19690
+ params: CountApiKeysParamsToJSON(value["params"])
19691
+ };
19692
+ }
19693
+
19694
+ // src/api/models/CountApiRequestsParams.ts
19695
+ function instanceOfCountApiRequestsParams(value) {
19696
+ return true;
19697
+ }
19698
+ function CountApiRequestsParamsFromJSON(json) {
19699
+ return CountApiRequestsParamsFromJSONTyped(json, false);
19700
+ }
19701
+ function CountApiRequestsParamsFromJSONTyped(json, ignoreDiscriminator) {
19702
+ if (json == null) {
19703
+ return json;
19704
+ }
19705
+ return {
19706
+ environmentId: json["environment_id"] == null ? void 0 : json["environment_id"],
19707
+ limit: json["limit"] == null ? void 0 : json["limit"],
19708
+ offset: json["offset"] == null ? void 0 : json["offset"],
19709
+ q: json["q"] == null ? void 0 : json["q"],
19710
+ requestType: json["request_type"] == null ? void 0 : json["request_type"]
19711
+ };
19712
+ }
19713
+ function CountApiRequestsParamsToJSON(value) {
19714
+ if (value == null) {
19715
+ return value;
19716
+ }
19717
+ return {
19718
+ environment_id: value["environmentId"],
19719
+ limit: value["limit"],
19720
+ offset: value["offset"],
19721
+ q: value["q"],
19722
+ request_type: value["requestType"]
19723
+ };
19724
+ }
19725
+
19726
+ // src/api/models/CountApiRequestsResponse.ts
19088
19727
  function instanceOfCountApiRequestsResponse(value) {
19089
19728
  if (!("data" in value) || value["data"] === void 0)
19090
19729
  return false;
@@ -19966,1781 +20605,1293 @@ function CountPlansParamsFromJSONTyped(json, ignoreDiscriminator) {
19966
20605
  withoutEntitlementFor: json["without_entitlement_for"] == null ? void 0 : json["without_entitlement_for"]
19967
20606
  };
19968
20607
  }
19969
- function CountPlansParamsToJSON(value) {
19970
- if (value == null) {
19971
- return value;
19972
- }
19973
- return {
19974
- company_id: value["companyId"],
19975
- ids: value["ids"],
19976
- limit: value["limit"],
19977
- offset: value["offset"],
19978
- q: value["q"],
19979
- without_entitlement_for: value["withoutEntitlementFor"]
19980
- };
19981
- }
19982
-
19983
- // src/api/models/CountPlansResponse.ts
19984
- function instanceOfCountPlansResponse(value) {
19985
- if (!("data" in value) || value["data"] === void 0)
19986
- return false;
19987
- if (!("params" in value) || value["params"] === void 0)
19988
- return false;
19989
- return true;
19990
- }
19991
- function CountPlansResponseFromJSON(json) {
19992
- return CountPlansResponseFromJSONTyped(json, false);
19993
- }
19994
- function CountPlansResponseFromJSONTyped(json, ignoreDiscriminator) {
19995
- if (json == null) {
19996
- return json;
19997
- }
19998
- return {
19999
- data: CountResponseFromJSON(json["data"]),
20000
- params: CountPlansParamsFromJSON(json["params"])
20001
- };
20002
- }
20003
- function CountPlansResponseToJSON(value) {
20004
- if (value == null) {
20005
- return value;
20006
- }
20007
- return {
20008
- data: CountResponseToJSON(value["data"]),
20009
- params: CountPlansParamsToJSON(value["params"])
20010
- };
20011
- }
20012
-
20013
- // src/api/models/CountUsersParams.ts
20014
- function instanceOfCountUsersParams(value) {
20015
- return true;
20016
- }
20017
- function CountUsersParamsFromJSON(json) {
20018
- return CountUsersParamsFromJSONTyped(json, false);
20019
- }
20020
- function CountUsersParamsFromJSONTyped(json, ignoreDiscriminator) {
20021
- if (json == null) {
20022
- return json;
20023
- }
20024
- return {
20025
- companyId: json["company_id"] == null ? void 0 : json["company_id"],
20026
- ids: json["ids"] == null ? void 0 : json["ids"],
20027
- limit: json["limit"] == null ? void 0 : json["limit"],
20028
- offset: json["offset"] == null ? void 0 : json["offset"],
20029
- planId: json["plan_id"] == null ? void 0 : json["plan_id"],
20030
- q: json["q"] == null ? void 0 : json["q"]
20031
- };
20032
- }
20033
- function CountUsersParamsToJSON(value) {
20034
- if (value == null) {
20035
- return value;
20036
- }
20037
- return {
20038
- company_id: value["companyId"],
20039
- ids: value["ids"],
20040
- limit: value["limit"],
20041
- offset: value["offset"],
20042
- plan_id: value["planId"],
20043
- q: value["q"]
20044
- };
20045
- }
20046
-
20047
- // src/api/models/CountUsersResponse.ts
20048
- function instanceOfCountUsersResponse(value) {
20049
- if (!("data" in value) || value["data"] === void 0)
20050
- return false;
20051
- if (!("params" in value) || value["params"] === void 0)
20052
- return false;
20053
- return true;
20054
- }
20055
- function CountUsersResponseFromJSON(json) {
20056
- return CountUsersResponseFromJSONTyped(json, false);
20057
- }
20058
- function CountUsersResponseFromJSONTyped(json, ignoreDiscriminator) {
20059
- if (json == null) {
20060
- return json;
20061
- }
20062
- return {
20063
- data: CountResponseFromJSON(json["data"]),
20064
- params: CountUsersParamsFromJSON(json["params"])
20065
- };
20066
- }
20067
- function CountUsersResponseToJSON(value) {
20068
- if (value == null) {
20069
- return value;
20070
- }
20071
- return {
20072
- data: CountResponseToJSON(value["data"]),
20073
- params: CountUsersParamsToJSON(value["params"])
20074
- };
20075
- }
20076
-
20077
- // src/api/models/CountWebhookEventsParams.ts
20078
- function instanceOfCountWebhookEventsParams(value) {
20079
- return true;
20080
- }
20081
- function CountWebhookEventsParamsFromJSON(json) {
20082
- return CountWebhookEventsParamsFromJSONTyped(json, false);
20083
- }
20084
- function CountWebhookEventsParamsFromJSONTyped(json, ignoreDiscriminator) {
20085
- if (json == null) {
20086
- return json;
20087
- }
20088
- return {
20089
- ids: json["ids"] == null ? void 0 : json["ids"],
20090
- limit: json["limit"] == null ? void 0 : json["limit"],
20091
- offset: json["offset"] == null ? void 0 : json["offset"],
20092
- q: json["q"] == null ? void 0 : json["q"],
20093
- webhookId: json["webhook_id"] == null ? void 0 : json["webhook_id"]
20094
- };
20095
- }
20096
- function CountWebhookEventsParamsToJSON(value) {
20097
- if (value == null) {
20098
- return value;
20099
- }
20100
- return {
20101
- ids: value["ids"],
20102
- limit: value["limit"],
20103
- offset: value["offset"],
20104
- q: value["q"],
20105
- webhook_id: value["webhookId"]
20106
- };
20107
- }
20108
-
20109
- // src/api/models/CountWebhookEventsResponse.ts
20110
- function instanceOfCountWebhookEventsResponse(value) {
20111
- if (!("data" in value) || value["data"] === void 0)
20112
- return false;
20113
- if (!("params" in value) || value["params"] === void 0)
20114
- return false;
20115
- return true;
20116
- }
20117
- function CountWebhookEventsResponseFromJSON(json) {
20118
- return CountWebhookEventsResponseFromJSONTyped(json, false);
20119
- }
20120
- function CountWebhookEventsResponseFromJSONTyped(json, ignoreDiscriminator) {
20121
- if (json == null) {
20122
- return json;
20123
- }
20124
- return {
20125
- data: CountResponseFromJSON(json["data"]),
20126
- params: CountWebhookEventsParamsFromJSON(json["params"])
20127
- };
20128
- }
20129
- function CountWebhookEventsResponseToJSON(value) {
20130
- if (value == null) {
20131
- return value;
20132
- }
20133
- return {
20134
- data: CountResponseToJSON(value["data"]),
20135
- params: CountWebhookEventsParamsToJSON(value["params"])
20136
- };
20137
- }
20138
-
20139
- // src/api/models/CountWebhooksParams.ts
20140
- function instanceOfCountWebhooksParams(value) {
20141
- return true;
20142
- }
20143
- function CountWebhooksParamsFromJSON(json) {
20144
- return CountWebhooksParamsFromJSONTyped(json, false);
20145
- }
20146
- function CountWebhooksParamsFromJSONTyped(json, ignoreDiscriminator) {
20147
- if (json == null) {
20148
- return json;
20149
- }
20150
- return {
20151
- limit: json["limit"] == null ? void 0 : json["limit"],
20152
- offset: json["offset"] == null ? void 0 : json["offset"],
20153
- q: json["q"] == null ? void 0 : json["q"]
20154
- };
20155
- }
20156
- function CountWebhooksParamsToJSON(value) {
20157
- if (value == null) {
20158
- return value;
20159
- }
20160
- return {
20161
- limit: value["limit"],
20162
- offset: value["offset"],
20163
- q: value["q"]
20164
- };
20165
- }
20166
-
20167
- // src/api/models/CountWebhooksResponse.ts
20168
- function instanceOfCountWebhooksResponse(value) {
20169
- if (!("data" in value) || value["data"] === void 0)
20170
- return false;
20171
- if (!("params" in value) || value["params"] === void 0)
20172
- return false;
20173
- return true;
20174
- }
20175
- function CountWebhooksResponseFromJSON(json) {
20176
- return CountWebhooksResponseFromJSONTyped(json, false);
20177
- }
20178
- function CountWebhooksResponseFromJSONTyped(json, ignoreDiscriminator) {
20179
- if (json == null) {
20180
- return json;
20181
- }
20182
- return {
20183
- data: CountResponseFromJSON(json["data"]),
20184
- params: CountWebhooksParamsFromJSON(json["params"])
20185
- };
20186
- }
20187
- function CountWebhooksResponseToJSON(value) {
20188
- if (value == null) {
20189
- return value;
20190
- }
20191
- return {
20192
- data: CountResponseToJSON(value["data"]),
20193
- params: CountWebhooksParamsToJSON(value["params"])
20194
- };
20195
- }
20196
-
20197
- // src/api/models/CreateApiKeyRequestBody.ts
20198
- function instanceOfCreateApiKeyRequestBody(value) {
20199
- if (!("name" in value) || value["name"] === void 0)
20200
- return false;
20201
- return true;
20202
- }
20203
- function CreateApiKeyRequestBodyFromJSON(json) {
20204
- return CreateApiKeyRequestBodyFromJSONTyped(json, false);
20205
- }
20206
- function CreateApiKeyRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20207
- if (json == null) {
20208
- return json;
20209
- }
20210
- return {
20211
- description: json["description"] == null ? void 0 : json["description"],
20212
- environmentId: json["environment_id"] == null ? void 0 : json["environment_id"],
20213
- name: json["name"]
20214
- };
20215
- }
20216
- function CreateApiKeyRequestBodyToJSON(value) {
20608
+ function CountPlansParamsToJSON(value) {
20217
20609
  if (value == null) {
20218
20610
  return value;
20219
20611
  }
20220
20612
  return {
20221
- description: value["description"],
20222
- environment_id: value["environmentId"],
20223
- name: value["name"]
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"]
20224
20619
  };
20225
20620
  }
20226
20621
 
20227
- // src/api/models/CreateApiKeyResponse.ts
20228
- function instanceOfCreateApiKeyResponse(value) {
20622
+ // src/api/models/CountPlansResponse.ts
20623
+ function instanceOfCountPlansResponse(value) {
20229
20624
  if (!("data" in value) || value["data"] === void 0)
20230
20625
  return false;
20231
20626
  if (!("params" in value) || value["params"] === void 0)
20232
20627
  return false;
20233
20628
  return true;
20234
20629
  }
20235
- function CreateApiKeyResponseFromJSON(json) {
20236
- return CreateApiKeyResponseFromJSONTyped(json, false);
20630
+ function CountPlansResponseFromJSON(json) {
20631
+ return CountPlansResponseFromJSONTyped(json, false);
20237
20632
  }
20238
- function CreateApiKeyResponseFromJSONTyped(json, ignoreDiscriminator) {
20633
+ function CountPlansResponseFromJSONTyped(json, ignoreDiscriminator) {
20239
20634
  if (json == null) {
20240
20635
  return json;
20241
20636
  }
20242
20637
  return {
20243
- data: ApiKeyCreateResponseDataFromJSON(json["data"]),
20244
- params: json["params"]
20638
+ data: CountResponseFromJSON(json["data"]),
20639
+ params: CountPlansParamsFromJSON(json["params"])
20245
20640
  };
20246
20641
  }
20247
- function CreateApiKeyResponseToJSON(value) {
20642
+ function CountPlansResponseToJSON(value) {
20248
20643
  if (value == null) {
20249
20644
  return value;
20250
20645
  }
20251
20646
  return {
20252
- data: ApiKeyCreateResponseDataToJSON(value["data"]),
20253
- params: value["params"]
20647
+ data: CountResponseToJSON(value["data"]),
20648
+ params: CountPlansParamsToJSON(value["params"])
20254
20649
  };
20255
20650
  }
20256
20651
 
20257
- // src/api/models/CreateBillingProductRequestBody.ts
20258
- function instanceOfCreateBillingProductRequestBody(value) {
20259
- if (!("currency" in value) || value["currency"] === void 0)
20260
- return false;
20261
- if (!("externalId" in value) || value["externalId"] === void 0)
20262
- return false;
20263
- if (!("name" in value) || value["name"] === void 0)
20264
- return false;
20265
- if (!("price" in value) || value["price"] === void 0)
20266
- return false;
20267
- if (!("quantity" in value) || value["quantity"] === void 0)
20268
- return false;
20652
+ // src/api/models/CountUsersParams.ts
20653
+ function instanceOfCountUsersParams(value) {
20269
20654
  return true;
20270
20655
  }
20271
- function CreateBillingProductRequestBodyFromJSON(json) {
20272
- return CreateBillingProductRequestBodyFromJSONTyped(json, false);
20656
+ function CountUsersParamsFromJSON(json) {
20657
+ return CountUsersParamsFromJSONTyped(json, false);
20273
20658
  }
20274
- function CreateBillingProductRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20659
+ function CountUsersParamsFromJSONTyped(json, ignoreDiscriminator) {
20275
20660
  if (json == null) {
20276
20661
  return json;
20277
20662
  }
20278
20663
  return {
20279
- currency: json["currency"],
20280
- externalId: json["external_id"],
20281
- name: json["name"],
20282
- price: json["price"],
20283
- quantity: json["quantity"]
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"]
20284
20670
  };
20285
20671
  }
20286
- function CreateBillingProductRequestBodyToJSON(value) {
20672
+ function CountUsersParamsToJSON(value) {
20287
20673
  if (value == null) {
20288
20674
  return value;
20289
20675
  }
20290
20676
  return {
20291
- currency: value["currency"],
20292
- external_id: value["externalId"],
20293
- name: value["name"],
20294
- price: value["price"],
20295
- quantity: value["quantity"]
20677
+ company_id: value["companyId"],
20678
+ ids: value["ids"],
20679
+ limit: value["limit"],
20680
+ offset: value["offset"],
20681
+ plan_id: value["planId"],
20682
+ q: value["q"]
20296
20683
  };
20297
20684
  }
20298
20685
 
20299
- // src/api/models/CreateBillingSubscriptionsRequestBody.ts
20300
- function instanceOfCreateBillingSubscriptionsRequestBody(value) {
20301
- if (!("customerExternalId" in value) || value["customerExternalId"] === void 0)
20302
- return false;
20303
- if (!("expiredAt" in value) || value["expiredAt"] === void 0)
20304
- return false;
20305
- if (!("productExternalIds" in value) || value["productExternalIds"] === void 0)
20686
+ // src/api/models/CountUsersResponse.ts
20687
+ function instanceOfCountUsersResponse(value) {
20688
+ if (!("data" in value) || value["data"] === void 0)
20306
20689
  return false;
20307
- if (!("subscriptionExternalId" in value) || value["subscriptionExternalId"] === void 0)
20690
+ if (!("params" in value) || value["params"] === void 0)
20308
20691
  return false;
20309
20692
  return true;
20310
20693
  }
20311
- function CreateBillingSubscriptionsRequestBodyFromJSON(json) {
20312
- return CreateBillingSubscriptionsRequestBodyFromJSONTyped(json, false);
20694
+ function CountUsersResponseFromJSON(json) {
20695
+ return CountUsersResponseFromJSONTyped(json, false);
20313
20696
  }
20314
- function CreateBillingSubscriptionsRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20697
+ function CountUsersResponseFromJSONTyped(json, ignoreDiscriminator) {
20315
20698
  if (json == null) {
20316
20699
  return json;
20317
20700
  }
20318
20701
  return {
20319
- customerExternalId: json["customer_external_id"],
20320
- expiredAt: new Date(json["expired_at"]),
20321
- interval: json["interval"] == null ? void 0 : json["interval"],
20322
- productExternalIds: json["product_external_ids"],
20323
- subscriptionExternalId: json["subscription_external_id"]
20702
+ data: CountResponseFromJSON(json["data"]),
20703
+ params: CountUsersParamsFromJSON(json["params"])
20324
20704
  };
20325
20705
  }
20326
- function CreateBillingSubscriptionsRequestBodyToJSON(value) {
20706
+ function CountUsersResponseToJSON(value) {
20327
20707
  if (value == null) {
20328
20708
  return value;
20329
20709
  }
20330
20710
  return {
20331
- customer_external_id: value["customerExternalId"],
20332
- expired_at: value["expiredAt"].toISOString(),
20333
- interval: value["interval"],
20334
- product_external_ids: value["productExternalIds"],
20335
- subscription_external_id: value["subscriptionExternalId"]
20711
+ data: CountResponseToJSON(value["data"]),
20712
+ params: CountUsersParamsToJSON(value["params"])
20336
20713
  };
20337
20714
  }
20338
20715
 
20339
- // src/api/models/CreateCompanyOverrideRequestBody.ts
20340
- var CreateCompanyOverrideRequestBodyMetricPeriodEnum = {
20341
- Month: "current_month",
20342
- Week: "current_week",
20343
- Day: "current_day"
20344
- };
20345
- var CreateCompanyOverrideRequestBodyValueTypeEnum = {
20346
- Boolean: "boolean",
20347
- Numeric: "numeric",
20348
- Trait: "trait",
20349
- Unlimited: "unlimited"
20350
- };
20351
- function instanceOfCreateCompanyOverrideRequestBody(value) {
20352
- if (!("companyId" in value) || value["companyId"] === void 0)
20353
- return false;
20354
- if (!("featureId" in value) || value["featureId"] === void 0)
20355
- return false;
20356
- if (!("valueType" in value) || value["valueType"] === void 0)
20357
- return false;
20716
+ // src/api/models/CountWebhookEventsParams.ts
20717
+ function instanceOfCountWebhookEventsParams(value) {
20358
20718
  return true;
20359
20719
  }
20360
- function CreateCompanyOverrideRequestBodyFromJSON(json) {
20361
- return CreateCompanyOverrideRequestBodyFromJSONTyped(json, false);
20720
+ function CountWebhookEventsParamsFromJSON(json) {
20721
+ return CountWebhookEventsParamsFromJSONTyped(json, false);
20362
20722
  }
20363
- function CreateCompanyOverrideRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20723
+ function CountWebhookEventsParamsFromJSONTyped(json, ignoreDiscriminator) {
20364
20724
  if (json == null) {
20365
20725
  return json;
20366
20726
  }
20367
20727
  return {
20368
- companyId: json["company_id"],
20369
- featureId: json["feature_id"],
20370
- metricPeriod: json["metric_period"] == null ? void 0 : json["metric_period"],
20371
- valueBool: json["value_bool"] == null ? void 0 : json["value_bool"],
20372
- valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
20373
- valueTraitId: json["value_trait_id"] == null ? void 0 : json["value_trait_id"],
20374
- valueType: json["value_type"]
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"]
20375
20733
  };
20376
20734
  }
20377
- function CreateCompanyOverrideRequestBodyToJSON(value) {
20735
+ function CountWebhookEventsParamsToJSON(value) {
20378
20736
  if (value == null) {
20379
20737
  return value;
20380
20738
  }
20381
20739
  return {
20382
- company_id: value["companyId"],
20383
- feature_id: value["featureId"],
20384
- metric_period: value["metricPeriod"],
20385
- value_bool: value["valueBool"],
20386
- value_numeric: value["valueNumeric"],
20387
- value_trait_id: value["valueTraitId"],
20388
- value_type: value["valueType"]
20740
+ ids: value["ids"],
20741
+ limit: value["limit"],
20742
+ offset: value["offset"],
20743
+ q: value["q"],
20744
+ webhook_id: value["webhookId"]
20389
20745
  };
20390
20746
  }
20391
20747
 
20392
- // src/api/models/CreateCompanyOverrideResponse.ts
20393
- function instanceOfCreateCompanyOverrideResponse(value) {
20748
+ // src/api/models/CountWebhookEventsResponse.ts
20749
+ function instanceOfCountWebhookEventsResponse(value) {
20394
20750
  if (!("data" in value) || value["data"] === void 0)
20395
20751
  return false;
20396
20752
  if (!("params" in value) || value["params"] === void 0)
20397
20753
  return false;
20398
20754
  return true;
20399
20755
  }
20400
- function CreateCompanyOverrideResponseFromJSON(json) {
20401
- return CreateCompanyOverrideResponseFromJSONTyped(json, false);
20756
+ function CountWebhookEventsResponseFromJSON(json) {
20757
+ return CountWebhookEventsResponseFromJSONTyped(json, false);
20402
20758
  }
20403
- function CreateCompanyOverrideResponseFromJSONTyped(json, ignoreDiscriminator) {
20759
+ function CountWebhookEventsResponseFromJSONTyped(json, ignoreDiscriminator) {
20404
20760
  if (json == null) {
20405
20761
  return json;
20406
20762
  }
20407
20763
  return {
20408
- data: CompanyOverrideResponseDataFromJSON(json["data"]),
20409
- params: json["params"]
20764
+ data: CountResponseFromJSON(json["data"]),
20765
+ params: CountWebhookEventsParamsFromJSON(json["params"])
20410
20766
  };
20411
20767
  }
20412
- function CreateCompanyOverrideResponseToJSON(value) {
20768
+ function CountWebhookEventsResponseToJSON(value) {
20413
20769
  if (value == null) {
20414
20770
  return value;
20415
20771
  }
20416
20772
  return {
20417
- data: CompanyOverrideResponseDataToJSON(value["data"]),
20418
- params: value["params"]
20773
+ data: CountResponseToJSON(value["data"]),
20774
+ params: CountWebhookEventsParamsToJSON(value["params"])
20419
20775
  };
20420
20776
  }
20421
20777
 
20422
- // src/api/models/CreateCompanyResponse.ts
20423
- function instanceOfCreateCompanyResponse(value) {
20424
- if (!("data" in value) || value["data"] === void 0)
20425
- return false;
20426
- if (!("params" in value) || value["params"] === void 0)
20427
- return false;
20778
+ // src/api/models/CountWebhooksParams.ts
20779
+ function instanceOfCountWebhooksParams(value) {
20428
20780
  return true;
20429
20781
  }
20430
- function CreateCompanyResponseFromJSON(json) {
20431
- return CreateCompanyResponseFromJSONTyped(json, false);
20782
+ function CountWebhooksParamsFromJSON(json) {
20783
+ return CountWebhooksParamsFromJSONTyped(json, false);
20432
20784
  }
20433
- function CreateCompanyResponseFromJSONTyped(json, ignoreDiscriminator) {
20785
+ function CountWebhooksParamsFromJSONTyped(json, ignoreDiscriminator) {
20434
20786
  if (json == null) {
20435
20787
  return json;
20436
20788
  }
20437
20789
  return {
20438
- data: CompanyDetailResponseDataFromJSON(json["data"]),
20439
- 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"]
20440
20793
  };
20441
20794
  }
20442
- function CreateCompanyResponseToJSON(value) {
20795
+ function CountWebhooksParamsToJSON(value) {
20443
20796
  if (value == null) {
20444
20797
  return value;
20445
20798
  }
20446
20799
  return {
20447
- data: CompanyDetailResponseDataToJSON(value["data"]),
20448
- params: value["params"]
20800
+ limit: value["limit"],
20801
+ offset: value["offset"],
20802
+ q: value["q"]
20449
20803
  };
20450
20804
  }
20451
20805
 
20452
- // src/api/models/CreateComponentRequestBody.ts
20453
- var CreateComponentRequestBodyEntityTypeEnum = {
20454
- Entitlement: "entitlement",
20455
- Billing: "billing"
20456
- };
20457
- function instanceOfCreateComponentRequestBody(value) {
20458
- if (!("ast" in value) || value["ast"] === void 0)
20459
- return false;
20460
- if (!("entityType" in value) || value["entityType"] === void 0)
20806
+ // src/api/models/CountWebhooksResponse.ts
20807
+ function instanceOfCountWebhooksResponse(value) {
20808
+ if (!("data" in value) || value["data"] === void 0)
20461
20809
  return false;
20462
- if (!("name" in value) || value["name"] === void 0)
20810
+ if (!("params" in value) || value["params"] === void 0)
20463
20811
  return false;
20464
20812
  return true;
20465
20813
  }
20466
- function CreateComponentRequestBodyFromJSON(json) {
20467
- return CreateComponentRequestBodyFromJSONTyped(json, false);
20814
+ function CountWebhooksResponseFromJSON(json) {
20815
+ return CountWebhooksResponseFromJSONTyped(json, false);
20468
20816
  }
20469
- function CreateComponentRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20817
+ function CountWebhooksResponseFromJSONTyped(json, ignoreDiscriminator) {
20470
20818
  if (json == null) {
20471
20819
  return json;
20472
20820
  }
20473
20821
  return {
20474
- ast: json["ast"],
20475
- entityType: json["entity_type"],
20476
- name: json["name"]
20822
+ data: CountResponseFromJSON(json["data"]),
20823
+ params: CountWebhooksParamsFromJSON(json["params"])
20477
20824
  };
20478
20825
  }
20479
- function CreateComponentRequestBodyToJSON(value) {
20826
+ function CountWebhooksResponseToJSON(value) {
20480
20827
  if (value == null) {
20481
20828
  return value;
20482
20829
  }
20483
20830
  return {
20484
- ast: value["ast"],
20485
- entity_type: value["entityType"],
20486
- name: value["name"]
20831
+ data: CountResponseToJSON(value["data"]),
20832
+ params: CountWebhooksParamsToJSON(value["params"])
20487
20833
  };
20488
20834
  }
20489
20835
 
20490
- // src/api/models/CreateComponentResponse.ts
20491
- function instanceOfCreateComponentResponse(value) {
20492
- if (!("data" in value) || value["data"] === void 0)
20493
- return false;
20494
- if (!("params" in value) || value["params"] === void 0)
20836
+ // src/api/models/CreateApiKeyRequestBody.ts
20837
+ function instanceOfCreateApiKeyRequestBody(value) {
20838
+ if (!("name" in value) || value["name"] === void 0)
20495
20839
  return false;
20496
20840
  return true;
20497
20841
  }
20498
- function CreateComponentResponseFromJSON(json) {
20499
- return CreateComponentResponseFromJSONTyped(json, false);
20842
+ function CreateApiKeyRequestBodyFromJSON(json) {
20843
+ return CreateApiKeyRequestBodyFromJSONTyped(json, false);
20500
20844
  }
20501
- function CreateComponentResponseFromJSONTyped(json, ignoreDiscriminator) {
20845
+ function CreateApiKeyRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20502
20846
  if (json == null) {
20503
20847
  return json;
20504
20848
  }
20505
20849
  return {
20506
- data: ComponentResponseDataFromJSON(json["data"]),
20507
- params: json["params"]
20850
+ description: json["description"] == null ? void 0 : json["description"],
20851
+ environmentId: json["environment_id"] == null ? void 0 : json["environment_id"],
20852
+ name: json["name"]
20508
20853
  };
20509
20854
  }
20510
- function CreateComponentResponseToJSON(value) {
20855
+ function CreateApiKeyRequestBodyToJSON(value) {
20511
20856
  if (value == null) {
20512
20857
  return value;
20513
20858
  }
20514
20859
  return {
20515
- data: ComponentResponseDataToJSON(value["data"]),
20516
- params: value["params"]
20860
+ description: value["description"],
20861
+ environment_id: value["environmentId"],
20862
+ name: value["name"]
20517
20863
  };
20518
20864
  }
20519
20865
 
20520
- // src/api/models/CreateCrmDealLineItemAssociationRequestBody.ts
20521
- function instanceOfCreateCrmDealLineItemAssociationRequestBody(value) {
20522
- if (!("dealExternalId" in value) || value["dealExternalId"] === void 0)
20866
+ // src/api/models/CreateApiKeyResponse.ts
20867
+ function instanceOfCreateApiKeyResponse(value) {
20868
+ if (!("data" in value) || value["data"] === void 0)
20523
20869
  return false;
20524
- if (!("lineItemExternalId" in value) || value["lineItemExternalId"] === void 0)
20870
+ if (!("params" in value) || value["params"] === void 0)
20525
20871
  return false;
20526
20872
  return true;
20527
20873
  }
20528
- function CreateCrmDealLineItemAssociationRequestBodyFromJSON(json) {
20529
- return CreateCrmDealLineItemAssociationRequestBodyFromJSONTyped(json, false);
20874
+ function CreateApiKeyResponseFromJSON(json) {
20875
+ return CreateApiKeyResponseFromJSONTyped(json, false);
20530
20876
  }
20531
- function CreateCrmDealLineItemAssociationRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20877
+ function CreateApiKeyResponseFromJSONTyped(json, ignoreDiscriminator) {
20532
20878
  if (json == null) {
20533
20879
  return json;
20534
20880
  }
20535
20881
  return {
20536
- dealExternalId: json["deal_external_id"],
20537
- lineItemExternalId: json["line_item_external_id"]
20882
+ data: ApiKeyCreateResponseDataFromJSON(json["data"]),
20883
+ params: json["params"]
20538
20884
  };
20539
20885
  }
20540
- function CreateCrmDealLineItemAssociationRequestBodyToJSON(value) {
20886
+ function CreateApiKeyResponseToJSON(value) {
20541
20887
  if (value == null) {
20542
20888
  return value;
20543
20889
  }
20544
20890
  return {
20545
- deal_external_id: value["dealExternalId"],
20546
- line_item_external_id: value["lineItemExternalId"]
20891
+ data: ApiKeyCreateResponseDataToJSON(value["data"]),
20892
+ params: value["params"]
20547
20893
  };
20548
20894
  }
20549
20895
 
20550
- // src/api/models/CreateCrmDealRequestBody.ts
20551
- function instanceOfCreateCrmDealRequestBody(value) {
20552
- if (!("crmCompanyKey" in value) || value["crmCompanyKey"] === void 0)
20896
+ // src/api/models/CreateBillingProductRequestBody.ts
20897
+ function instanceOfCreateBillingProductRequestBody(value) {
20898
+ if (!("currency" in value) || value["currency"] === void 0)
20553
20899
  return false;
20554
- if (!("crmType" in value) || value["crmType"] === void 0)
20900
+ if (!("externalId" in value) || value["externalId"] === void 0)
20555
20901
  return false;
20556
- if (!("dealExternalId" in value) || value["dealExternalId"] === void 0)
20902
+ if (!("name" in value) || value["name"] === void 0)
20903
+ return false;
20904
+ if (!("price" in value) || value["price"] === void 0)
20905
+ return false;
20906
+ if (!("quantity" in value) || value["quantity"] === void 0)
20557
20907
  return false;
20558
20908
  return true;
20559
20909
  }
20560
- function CreateCrmDealRequestBodyFromJSON(json) {
20561
- return CreateCrmDealRequestBodyFromJSONTyped(json, false);
20910
+ function CreateBillingProductRequestBodyFromJSON(json) {
20911
+ return CreateBillingProductRequestBodyFromJSONTyped(json, false);
20562
20912
  }
20563
- function CreateCrmDealRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20913
+ function CreateBillingProductRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20564
20914
  if (json == null) {
20565
20915
  return json;
20566
20916
  }
20567
20917
  return {
20568
- arr: json["arr"] == null ? void 0 : json["arr"],
20569
- crmCompanyId: json["crm_company_id"] == null ? void 0 : json["crm_company_id"],
20570
- crmCompanyKey: json["crm_company_key"],
20571
- crmProductId: json["crm_product_id"] == null ? void 0 : json["crm_product_id"],
20572
- crmType: json["crm_type"],
20573
- dealExternalId: json["deal_external_id"],
20574
- dealName: json["deal_name"] == null ? void 0 : json["deal_name"],
20575
- dealStage: json["deal_stage"] == null ? void 0 : json["deal_stage"],
20576
- mrr: json["mrr"] == null ? void 0 : json["mrr"]
20918
+ currency: json["currency"],
20919
+ externalId: json["external_id"],
20920
+ name: json["name"],
20921
+ price: json["price"],
20922
+ quantity: json["quantity"]
20577
20923
  };
20578
20924
  }
20579
- function CreateCrmDealRequestBodyToJSON(value) {
20925
+ function CreateBillingProductRequestBodyToJSON(value) {
20580
20926
  if (value == null) {
20581
20927
  return value;
20582
20928
  }
20583
20929
  return {
20584
- arr: value["arr"],
20585
- crm_company_id: value["crmCompanyId"],
20586
- crm_company_key: value["crmCompanyKey"],
20587
- crm_product_id: value["crmProductId"],
20588
- crm_type: value["crmType"],
20589
- deal_external_id: value["dealExternalId"],
20590
- deal_name: value["dealName"],
20591
- deal_stage: value["dealStage"],
20592
- mrr: value["mrr"]
20930
+ currency: value["currency"],
20931
+ external_id: value["externalId"],
20932
+ name: value["name"],
20933
+ price: value["price"],
20934
+ quantity: value["quantity"]
20593
20935
  };
20594
20936
  }
20595
20937
 
20596
- // src/api/models/CreateCrmLineItemRequestBody.ts
20597
- function instanceOfCreateCrmLineItemRequestBody(value) {
20598
- if (!("amount" in value) || value["amount"] === void 0)
20599
- return false;
20600
- if (!("interval" in value) || value["interval"] === void 0)
20938
+ // src/api/models/CreateBillingSubscriptionsRequestBody.ts
20939
+ function instanceOfCreateBillingSubscriptionsRequestBody(value) {
20940
+ if (!("customerExternalId" in value) || value["customerExternalId"] === void 0)
20601
20941
  return false;
20602
- if (!("lineItemExternalId" in value) || value["lineItemExternalId"] === void 0)
20942
+ if (!("expiredAt" in value) || value["expiredAt"] === void 0)
20603
20943
  return false;
20604
- if (!("productExternalId" in value) || value["productExternalId"] === void 0)
20944
+ if (!("productExternalIds" in value) || value["productExternalIds"] === void 0)
20605
20945
  return false;
20606
- if (!("quantity" in value) || value["quantity"] === void 0)
20946
+ if (!("subscriptionExternalId" in value) || value["subscriptionExternalId"] === void 0)
20607
20947
  return false;
20608
20948
  return true;
20609
20949
  }
20610
- function CreateCrmLineItemRequestBodyFromJSON(json) {
20611
- return CreateCrmLineItemRequestBodyFromJSONTyped(json, false);
20950
+ function CreateBillingSubscriptionsRequestBodyFromJSON(json) {
20951
+ return CreateBillingSubscriptionsRequestBodyFromJSONTyped(json, false);
20612
20952
  }
20613
- function CreateCrmLineItemRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20953
+ function CreateBillingSubscriptionsRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20614
20954
  if (json == null) {
20615
20955
  return json;
20616
20956
  }
20617
20957
  return {
20618
- termMonth: json["TermMonth"] == null ? void 0 : json["TermMonth"],
20619
- amount: json["amount"],
20620
- discountPercentage: json["discount_percentage"] == null ? void 0 : json["discount_percentage"],
20621
- interval: json["interval"],
20622
- lineItemExternalId: json["line_item_external_id"],
20623
- productExternalId: json["product_external_id"],
20624
- quantity: json["quantity"],
20625
- totalDiscount: json["total_discount"] == null ? void 0 : json["total_discount"]
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"]
20626
20963
  };
20627
20964
  }
20628
- function CreateCrmLineItemRequestBodyToJSON(value) {
20965
+ function CreateBillingSubscriptionsRequestBodyToJSON(value) {
20629
20966
  if (value == null) {
20630
20967
  return value;
20631
20968
  }
20632
20969
  return {
20633
- TermMonth: value["termMonth"],
20634
- amount: value["amount"],
20635
- discount_percentage: value["discountPercentage"],
20970
+ customer_external_id: value["customerExternalId"],
20971
+ expired_at: value["expiredAt"].toISOString(),
20636
20972
  interval: value["interval"],
20637
- line_item_external_id: value["lineItemExternalId"],
20638
- product_external_id: value["productExternalId"],
20639
- quantity: value["quantity"],
20640
- total_discount: value["totalDiscount"]
20973
+ product_external_ids: value["productExternalIds"],
20974
+ subscription_external_id: value["subscriptionExternalId"]
20641
20975
  };
20642
20976
  }
20643
20977
 
20644
- // src/api/models/CreateCrmProductRequestBody.ts
20645
- function instanceOfCreateCrmProductRequestBody(value) {
20646
- if (!("currency" in value) || value["currency"] === void 0)
20647
- return false;
20648
- if (!("description" in value) || value["description"] === void 0)
20649
- return false;
20650
- if (!("externalId" in value) || value["externalId"] === void 0)
20651
- return false;
20652
- if (!("interval" in value) || value["interval"] === void 0)
20653
- return false;
20654
- if (!("name" in value) || value["name"] === void 0)
20655
- return false;
20656
- if (!("price" in value) || value["price"] === void 0)
20978
+ // src/api/models/CreateCompanyOverrideRequestBody.ts
20979
+ var CreateCompanyOverrideRequestBodyMetricPeriodEnum = {
20980
+ Month: "current_month",
20981
+ Week: "current_week",
20982
+ Day: "current_day"
20983
+ };
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)
20657
20992
  return false;
20658
- if (!("quantity" in value) || value["quantity"] === void 0)
20993
+ if (!("featureId" in value) || value["featureId"] === void 0)
20659
20994
  return false;
20660
- if (!("sku" in value) || value["sku"] === void 0)
20995
+ if (!("valueType" in value) || value["valueType"] === void 0)
20661
20996
  return false;
20662
20997
  return true;
20663
20998
  }
20664
- function CreateCrmProductRequestBodyFromJSON(json) {
20665
- return CreateCrmProductRequestBodyFromJSONTyped(json, false);
20999
+ function CreateCompanyOverrideRequestBodyFromJSON(json) {
21000
+ return CreateCompanyOverrideRequestBodyFromJSONTyped(json, false);
20666
21001
  }
20667
- function CreateCrmProductRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21002
+ function CreateCompanyOverrideRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20668
21003
  if (json == null) {
20669
21004
  return json;
20670
21005
  }
20671
21006
  return {
20672
- currency: json["currency"],
20673
- description: json["description"],
20674
- externalId: json["external_id"],
20675
- interval: json["interval"],
20676
- name: json["name"],
20677
- price: json["price"],
20678
- quantity: json["quantity"],
20679
- sku: json["sku"]
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"]
20680
21014
  };
20681
21015
  }
20682
- function CreateCrmProductRequestBodyToJSON(value) {
21016
+ function CreateCompanyOverrideRequestBodyToJSON(value) {
20683
21017
  if (value == null) {
20684
21018
  return value;
20685
21019
  }
20686
21020
  return {
20687
- currency: value["currency"],
20688
- description: value["description"],
20689
- external_id: value["externalId"],
20690
- interval: value["interval"],
20691
- name: value["name"],
20692
- price: value["price"],
20693
- quantity: value["quantity"],
20694
- sku: value["sku"]
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"]
20695
21028
  };
20696
21029
  }
20697
21030
 
20698
- // src/api/models/CreateEntityTraitDefinitionRequestBody.ts
20699
- var CreateEntityTraitDefinitionRequestBodyEntityTypeEnum = {
20700
- Company: "company",
20701
- User: "user"
20702
- };
20703
- var CreateEntityTraitDefinitionRequestBodyTraitTypeEnum = {
20704
- Boolean: "boolean",
20705
- Currency: "currency",
20706
- Date: "date",
20707
- Number: "number",
20708
- String: "string",
20709
- Url: "url"
20710
- };
20711
- function instanceOfCreateEntityTraitDefinitionRequestBody(value) {
20712
- if (!("entityType" in value) || value["entityType"] === void 0)
20713
- return false;
20714
- if (!("hierarchy" in value) || value["hierarchy"] === void 0)
21031
+ // src/api/models/CreateCompanyOverrideResponse.ts
21032
+ function instanceOfCreateCompanyOverrideResponse(value) {
21033
+ if (!("data" in value) || value["data"] === void 0)
20715
21034
  return false;
20716
- if (!("traitType" in value) || value["traitType"] === void 0)
21035
+ if (!("params" in value) || value["params"] === void 0)
20717
21036
  return false;
20718
21037
  return true;
20719
21038
  }
20720
- function CreateEntityTraitDefinitionRequestBodyFromJSON(json) {
20721
- return CreateEntityTraitDefinitionRequestBodyFromJSONTyped(json, false);
21039
+ function CreateCompanyOverrideResponseFromJSON(json) {
21040
+ return CreateCompanyOverrideResponseFromJSONTyped(json, false);
20722
21041
  }
20723
- function CreateEntityTraitDefinitionRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21042
+ function CreateCompanyOverrideResponseFromJSONTyped(json, ignoreDiscriminator) {
20724
21043
  if (json == null) {
20725
21044
  return json;
20726
21045
  }
20727
21046
  return {
20728
- displayName: json["display_name"] == null ? void 0 : json["display_name"],
20729
- entityType: json["entity_type"],
20730
- hierarchy: json["hierarchy"],
20731
- traitType: json["trait_type"]
21047
+ data: CompanyOverrideResponseDataFromJSON(json["data"]),
21048
+ params: json["params"]
20732
21049
  };
20733
21050
  }
20734
- function CreateEntityTraitDefinitionRequestBodyToJSON(value) {
21051
+ function CreateCompanyOverrideResponseToJSON(value) {
20735
21052
  if (value == null) {
20736
21053
  return value;
20737
21054
  }
20738
21055
  return {
20739
- display_name: value["displayName"],
20740
- entity_type: value["entityType"],
20741
- hierarchy: value["hierarchy"],
20742
- trait_type: value["traitType"]
21056
+ data: CompanyOverrideResponseDataToJSON(value["data"]),
21057
+ params: value["params"]
20743
21058
  };
20744
21059
  }
20745
21060
 
20746
- // src/api/models/CreateEnvironmentRequestBody.ts
20747
- var CreateEnvironmentRequestBodyEnvironmentTypeEnum = {
20748
- Development: "development",
20749
- Staging: "staging",
20750
- Production: "production"
20751
- };
20752
- function instanceOfCreateEnvironmentRequestBody(value) {
20753
- if (!("environmentType" in value) || value["environmentType"] === void 0)
21061
+ // src/api/models/CreateCompanyResponse.ts
21062
+ function instanceOfCreateCompanyResponse(value) {
21063
+ if (!("data" in value) || value["data"] === void 0)
20754
21064
  return false;
20755
- if (!("name" in value) || value["name"] === void 0)
21065
+ if (!("params" in value) || value["params"] === void 0)
20756
21066
  return false;
20757
21067
  return true;
20758
21068
  }
20759
- function CreateEnvironmentRequestBodyFromJSON(json) {
20760
- return CreateEnvironmentRequestBodyFromJSONTyped(json, false);
21069
+ function CreateCompanyResponseFromJSON(json) {
21070
+ return CreateCompanyResponseFromJSONTyped(json, false);
20761
21071
  }
20762
- function CreateEnvironmentRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21072
+ function CreateCompanyResponseFromJSONTyped(json, ignoreDiscriminator) {
20763
21073
  if (json == null) {
20764
21074
  return json;
20765
21075
  }
20766
21076
  return {
20767
- environmentType: json["environment_type"],
20768
- name: json["name"]
21077
+ data: CompanyDetailResponseDataFromJSON(json["data"]),
21078
+ params: json["params"]
20769
21079
  };
20770
21080
  }
20771
- function CreateEnvironmentRequestBodyToJSON(value) {
21081
+ function CreateCompanyResponseToJSON(value) {
20772
21082
  if (value == null) {
20773
21083
  return value;
20774
21084
  }
20775
21085
  return {
20776
- environment_type: value["environmentType"],
20777
- name: value["name"]
21086
+ data: CompanyDetailResponseDataToJSON(value["data"]),
21087
+ params: value["params"]
20778
21088
  };
20779
21089
  }
20780
21090
 
20781
- // src/api/models/EnvironmentDetailResponseData.ts
20782
- function instanceOfEnvironmentDetailResponseData(value) {
20783
- if (!("apiKeys" in value) || value["apiKeys"] === void 0)
20784
- return false;
20785
- if (!("createdAt" in value) || value["createdAt"] === void 0)
20786
- return false;
20787
- if (!("environmentType" in value) || value["environmentType"] === void 0)
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)
20788
21098
  return false;
20789
- if (!("id" in value) || value["id"] === void 0)
21099
+ if (!("entityType" in value) || value["entityType"] === void 0)
20790
21100
  return false;
20791
21101
  if (!("name" in value) || value["name"] === void 0)
20792
21102
  return false;
20793
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
20794
- return false;
20795
21103
  return true;
20796
21104
  }
20797
- function EnvironmentDetailResponseDataFromJSON(json) {
20798
- return EnvironmentDetailResponseDataFromJSONTyped(json, false);
21105
+ function CreateComponentRequestBodyFromJSON(json) {
21106
+ return CreateComponentRequestBodyFromJSONTyped(json, false);
20799
21107
  }
20800
- function EnvironmentDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21108
+ function CreateComponentRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20801
21109
  if (json == null) {
20802
21110
  return json;
20803
21111
  }
20804
21112
  return {
20805
- apiKeys: json["api_keys"].map(ApiKeyResponseDataFromJSON),
20806
- createdAt: new Date(json["created_at"]),
20807
- environmentType: json["environment_type"],
20808
- id: json["id"],
20809
- name: json["name"],
20810
- updatedAt: new Date(json["updated_at"])
21113
+ ast: json["ast"],
21114
+ entityType: json["entity_type"],
21115
+ name: json["name"]
20811
21116
  };
20812
21117
  }
20813
- function EnvironmentDetailResponseDataToJSON(value) {
21118
+ function CreateComponentRequestBodyToJSON(value) {
20814
21119
  if (value == null) {
20815
21120
  return value;
20816
21121
  }
20817
21122
  return {
20818
- api_keys: value["apiKeys"].map(ApiKeyResponseDataToJSON),
20819
- created_at: value["createdAt"].toISOString(),
20820
- environment_type: value["environmentType"],
20821
- id: value["id"],
20822
- name: value["name"],
20823
- updated_at: value["updatedAt"].toISOString()
21123
+ ast: value["ast"],
21124
+ entity_type: value["entityType"],
21125
+ name: value["name"]
20824
21126
  };
20825
21127
  }
20826
21128
 
20827
- // src/api/models/CreateEnvironmentResponse.ts
20828
- function instanceOfCreateEnvironmentResponse(value) {
21129
+ // src/api/models/CreateComponentResponse.ts
21130
+ function instanceOfCreateComponentResponse(value) {
20829
21131
  if (!("data" in value) || value["data"] === void 0)
20830
21132
  return false;
20831
21133
  if (!("params" in value) || value["params"] === void 0)
20832
21134
  return false;
20833
21135
  return true;
20834
21136
  }
20835
- function CreateEnvironmentResponseFromJSON(json) {
20836
- return CreateEnvironmentResponseFromJSONTyped(json, false);
21137
+ function CreateComponentResponseFromJSON(json) {
21138
+ return CreateComponentResponseFromJSONTyped(json, false);
20837
21139
  }
20838
- function CreateEnvironmentResponseFromJSONTyped(json, ignoreDiscriminator) {
21140
+ function CreateComponentResponseFromJSONTyped(json, ignoreDiscriminator) {
20839
21141
  if (json == null) {
20840
21142
  return json;
20841
21143
  }
20842
21144
  return {
20843
- data: EnvironmentDetailResponseDataFromJSON(json["data"]),
21145
+ data: ComponentResponseDataFromJSON(json["data"]),
20844
21146
  params: json["params"]
20845
21147
  };
20846
21148
  }
20847
- function CreateEnvironmentResponseToJSON(value) {
21149
+ function CreateComponentResponseToJSON(value) {
20848
21150
  if (value == null) {
20849
21151
  return value;
20850
21152
  }
20851
21153
  return {
20852
- data: EnvironmentDetailResponseDataToJSON(value["data"]),
21154
+ data: ComponentResponseDataToJSON(value["data"]),
20853
21155
  params: value["params"]
20854
21156
  };
20855
21157
  }
20856
21158
 
20857
- // src/api/models/EventBodyIdentifyCompany.ts
20858
- function instanceOfEventBodyIdentifyCompany(value) {
20859
- if (!("keys" in value) || value["keys"] === 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)
20860
21164
  return false;
20861
21165
  return true;
20862
21166
  }
20863
- function EventBodyIdentifyCompanyFromJSON(json) {
20864
- return EventBodyIdentifyCompanyFromJSONTyped(json, false);
21167
+ function CreateCrmDealLineItemAssociationRequestBodyFromJSON(json) {
21168
+ return CreateCrmDealLineItemAssociationRequestBodyFromJSONTyped(json, false);
20865
21169
  }
20866
- function EventBodyIdentifyCompanyFromJSONTyped(json, ignoreDiscriminator) {
21170
+ function CreateCrmDealLineItemAssociationRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20867
21171
  if (json == null) {
20868
21172
  return json;
20869
21173
  }
20870
21174
  return {
20871
- keys: json["keys"],
20872
- name: json["name"] == null ? void 0 : json["name"],
20873
- traits: json["traits"] == null ? void 0 : json["traits"]
21175
+ dealExternalId: json["deal_external_id"],
21176
+ lineItemExternalId: json["line_item_external_id"]
20874
21177
  };
20875
21178
  }
20876
- function EventBodyIdentifyCompanyToJSON(value) {
21179
+ function CreateCrmDealLineItemAssociationRequestBodyToJSON(value) {
20877
21180
  if (value == null) {
20878
21181
  return value;
20879
21182
  }
20880
21183
  return {
20881
- keys: value["keys"],
20882
- name: value["name"],
20883
- traits: value["traits"]
21184
+ deal_external_id: value["dealExternalId"],
21185
+ line_item_external_id: value["lineItemExternalId"]
20884
21186
  };
20885
21187
  }
20886
21188
 
20887
- // src/api/models/EventBodyIdentify.ts
20888
- function instanceOfEventBodyIdentify(value) {
20889
- if (!("keys" in value) || value["keys"] === 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)
20890
21196
  return false;
20891
21197
  return true;
20892
21198
  }
20893
- function EventBodyIdentifyFromJSON(json) {
20894
- return EventBodyIdentifyFromJSONTyped(json, false);
21199
+ function CreateCrmDealRequestBodyFromJSON(json) {
21200
+ return CreateCrmDealRequestBodyFromJSONTyped(json, false);
20895
21201
  }
20896
- function EventBodyIdentifyFromJSONTyped(json, ignoreDiscriminator) {
21202
+ function CreateCrmDealRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20897
21203
  if (json == null) {
20898
21204
  return json;
20899
21205
  }
20900
21206
  return {
20901
- company: json["company"] == null ? void 0 : EventBodyIdentifyCompanyFromJSON(json["company"]),
20902
- keys: json["keys"],
20903
- name: json["name"] == null ? void 0 : json["name"],
20904
- traits: json["traits"] == null ? void 0 : json["traits"]
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"]
20905
21216
  };
20906
21217
  }
20907
- function EventBodyIdentifyToJSON(value) {
21218
+ function CreateCrmDealRequestBodyToJSON(value) {
20908
21219
  if (value == null) {
20909
21220
  return value;
20910
21221
  }
20911
21222
  return {
20912
- company: EventBodyIdentifyCompanyToJSON(value["company"]),
20913
- keys: value["keys"],
20914
- name: value["name"],
20915
- traits: value["traits"]
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"]
20916
21232
  };
20917
21233
  }
20918
21234
 
20919
- // src/api/models/EventBodyTrack.ts
20920
- function instanceOfEventBodyTrack(value) {
20921
- if (!("event" in value) || value["event"] === 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)
20922
21246
  return false;
20923
21247
  return true;
20924
21248
  }
20925
- function EventBodyTrackFromJSON(json) {
20926
- return EventBodyTrackFromJSONTyped(json, false);
21249
+ function CreateCrmLineItemRequestBodyFromJSON(json) {
21250
+ return CreateCrmLineItemRequestBodyFromJSONTyped(json, false);
20927
21251
  }
20928
- function EventBodyTrackFromJSONTyped(json, ignoreDiscriminator) {
21252
+ function CreateCrmLineItemRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20929
21253
  if (json == null) {
20930
21254
  return json;
20931
21255
  }
20932
21256
  return {
20933
- company: json["company"] == null ? void 0 : json["company"],
20934
- event: json["event"],
20935
- traits: json["traits"] == null ? void 0 : json["traits"],
20936
- user: json["user"] == null ? void 0 : json["user"]
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"]
20937
21265
  };
20938
21266
  }
20939
- function EventBodyTrackToJSON(value) {
21267
+ function CreateCrmLineItemRequestBodyToJSON(value) {
20940
21268
  if (value == null) {
20941
21269
  return value;
20942
21270
  }
20943
21271
  return {
20944
- company: value["company"],
20945
- event: value["event"],
20946
- traits: value["traits"],
20947
- user: value["user"]
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"]
20948
21280
  };
20949
21281
  }
20950
21282
 
20951
- // src/api/models/EventBody.ts
20952
- function EventBodyFromJSON(json) {
20953
- return EventBodyFromJSONTyped(json, false);
21283
+ // src/api/models/CreateCrmProductRequestBody.ts
21284
+ function instanceOfCreateCrmProductRequestBody(value) {
21285
+ if (!("currency" in value) || value["currency"] === void 0)
21286
+ return false;
21287
+ if (!("description" in value) || value["description"] === void 0)
21288
+ return false;
21289
+ if (!("externalId" in value) || value["externalId"] === void 0)
21290
+ return false;
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)
21300
+ return false;
21301
+ return true;
20954
21302
  }
20955
- function EventBodyFromJSONTyped(json, ignoreDiscriminator) {
21303
+ function CreateCrmProductRequestBodyFromJSON(json) {
21304
+ return CreateCrmProductRequestBodyFromJSONTyped(json, false);
21305
+ }
21306
+ function CreateCrmProductRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20956
21307
  if (json == null) {
20957
21308
  return json;
20958
21309
  }
20959
- if (instanceOfEventBodyIdentify(json)) {
20960
- return EventBodyIdentifyFromJSONTyped(json, true);
20961
- }
20962
- if (instanceOfEventBodyTrack(json)) {
20963
- return EventBodyTrackFromJSONTyped(json, true);
20964
- }
20965
- throw new Error("Invalid EventBody");
21310
+ return {
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"]
21319
+ };
20966
21320
  }
20967
- function EventBodyToJSON(value) {
21321
+ function CreateCrmProductRequestBodyToJSON(value) {
20968
21322
  if (value == null) {
20969
21323
  return value;
20970
21324
  }
20971
- if (instanceOfEventBodyIdentify(value)) {
20972
- return EventBodyIdentifyToJSON(value);
20973
- }
20974
- if (instanceOfEventBodyTrack(value)) {
20975
- return EventBodyTrackToJSON(value);
20976
- }
20977
- return {};
21325
+ return {
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"]
21334
+ };
20978
21335
  }
20979
21336
 
20980
- // src/api/models/CreateEventRequestBody.ts
20981
- var CreateEventRequestBodyEventTypeEnum = {
20982
- Identify: "identify",
20983
- Track: "track"
21337
+ // src/api/models/CreateEntityTraitDefinitionRequestBody.ts
21338
+ var CreateEntityTraitDefinitionRequestBodyEntityTypeEnum = {
21339
+ Company: "company",
21340
+ User: "user"
20984
21341
  };
20985
- function instanceOfCreateEventRequestBody(value) {
20986
- if (!("eventType" in value) || value["eventType"] === void 0)
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)
21352
+ return false;
21353
+ if (!("hierarchy" in value) || value["hierarchy"] === void 0)
21354
+ return false;
21355
+ if (!("traitType" in value) || value["traitType"] === void 0)
20987
21356
  return false;
20988
21357
  return true;
20989
21358
  }
20990
- function CreateEventRequestBodyFromJSON(json) {
20991
- return CreateEventRequestBodyFromJSONTyped(json, false);
21359
+ function CreateEntityTraitDefinitionRequestBodyFromJSON(json) {
21360
+ return CreateEntityTraitDefinitionRequestBodyFromJSONTyped(json, false);
20992
21361
  }
20993
- function CreateEventRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21362
+ function CreateEntityTraitDefinitionRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
20994
21363
  if (json == null) {
20995
21364
  return json;
20996
21365
  }
20997
21366
  return {
20998
- body: json["body"] == null ? void 0 : EventBodyFromJSON(json["body"]),
20999
- eventType: json["event_type"],
21000
- sentAt: json["sent_at"] == null ? void 0 : new Date(json["sent_at"])
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"]
21001
21371
  };
21002
21372
  }
21003
- function CreateEventRequestBodyToJSON(value) {
21373
+ function CreateEntityTraitDefinitionRequestBodyToJSON(value) {
21004
21374
  if (value == null) {
21005
21375
  return value;
21006
21376
  }
21007
21377
  return {
21008
- body: EventBodyToJSON(value["body"]),
21009
- event_type: value["eventType"],
21010
- sent_at: value["sentAt"] == null ? void 0 : value["sentAt"].toISOString()
21378
+ display_name: value["displayName"],
21379
+ entity_type: value["entityType"],
21380
+ hierarchy: value["hierarchy"],
21381
+ trait_type: value["traitType"]
21011
21382
  };
21012
21383
  }
21013
21384
 
21014
- // src/api/models/CreateEventBatchRequestBody.ts
21015
- function instanceOfCreateEventBatchRequestBody(value) {
21016
- if (!("events" in value) || value["events"] === 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)
21393
+ return false;
21394
+ if (!("name" in value) || value["name"] === void 0)
21017
21395
  return false;
21018
21396
  return true;
21019
21397
  }
21020
- function CreateEventBatchRequestBodyFromJSON(json) {
21021
- return CreateEventBatchRequestBodyFromJSONTyped(json, false);
21398
+ function CreateEnvironmentRequestBodyFromJSON(json) {
21399
+ return CreateEnvironmentRequestBodyFromJSONTyped(json, false);
21022
21400
  }
21023
- function CreateEventBatchRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21401
+ function CreateEnvironmentRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21024
21402
  if (json == null) {
21025
21403
  return json;
21026
21404
  }
21027
21405
  return {
21028
- events: json["events"].map(CreateEventRequestBodyFromJSON)
21406
+ environmentType: json["environment_type"],
21407
+ name: json["name"]
21029
21408
  };
21030
21409
  }
21031
- function CreateEventBatchRequestBodyToJSON(value) {
21410
+ function CreateEnvironmentRequestBodyToJSON(value) {
21032
21411
  if (value == null) {
21033
21412
  return value;
21034
21413
  }
21035
21414
  return {
21036
- events: value["events"].map(CreateEventRequestBodyToJSON)
21415
+ environment_type: value["environmentType"],
21416
+ name: value["name"]
21037
21417
  };
21038
21418
  }
21039
21419
 
21040
- // src/api/models/RawEventResponseData.ts
21041
- function instanceOfRawEventResponseData(value) {
21042
- if (!("capturedAt" in value) || value["capturedAt"] === void 0)
21420
+ // src/api/models/EnvironmentDetailResponseData.ts
21421
+ function instanceOfEnvironmentDetailResponseData(value) {
21422
+ if (!("apiKeys" in value) || value["apiKeys"] === void 0)
21043
21423
  return false;
21044
- if (!("remoteAddr" in value) || value["remoteAddr"] === void 0)
21424
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
21045
21425
  return false;
21046
- if (!("remoteIp" in value) || value["remoteIp"] === void 0)
21426
+ if (!("environmentType" in value) || value["environmentType"] === void 0)
21047
21427
  return false;
21048
- if (!("userAgent" in value) || value["userAgent"] === void 0)
21428
+ if (!("id" in value) || value["id"] === void 0)
21429
+ return false;
21430
+ if (!("name" in value) || value["name"] === void 0)
21431
+ return false;
21432
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
21049
21433
  return false;
21050
21434
  return true;
21051
21435
  }
21052
- function RawEventResponseDataFromJSON(json) {
21053
- return RawEventResponseDataFromJSONTyped(json, false);
21436
+ function EnvironmentDetailResponseDataFromJSON(json) {
21437
+ return EnvironmentDetailResponseDataFromJSONTyped(json, false);
21054
21438
  }
21055
- function RawEventResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21439
+ function EnvironmentDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21056
21440
  if (json == null) {
21057
21441
  return json;
21058
21442
  }
21059
21443
  return {
21060
- capturedAt: new Date(json["captured_at"]),
21061
- eventId: json["event_id"] == null ? void 0 : json["event_id"],
21062
- remoteAddr: json["remote_addr"],
21063
- remoteIp: json["remote_ip"],
21064
- userAgent: json["user_agent"]
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"])
21065
21450
  };
21066
21451
  }
21067
- function RawEventResponseDataToJSON(value) {
21452
+ function EnvironmentDetailResponseDataToJSON(value) {
21068
21453
  if (value == null) {
21069
21454
  return value;
21070
21455
  }
21071
21456
  return {
21072
- captured_at: value["capturedAt"].toISOString(),
21073
- event_id: value["eventId"],
21074
- remote_addr: value["remoteAddr"],
21075
- remote_ip: value["remoteIp"],
21076
- user_agent: value["userAgent"]
21457
+ api_keys: value["apiKeys"].map(ApiKeyResponseDataToJSON),
21458
+ created_at: value["createdAt"].toISOString(),
21459
+ environment_type: value["environmentType"],
21460
+ id: value["id"],
21461
+ name: value["name"],
21462
+ updated_at: value["updatedAt"].toISOString()
21077
21463
  };
21078
21464
  }
21079
21465
 
21080
- // src/api/models/RawEventBatchResponseData.ts
21081
- function instanceOfRawEventBatchResponseData(value) {
21082
- if (!("events" in value) || value["events"] === void 0)
21466
+ // src/api/models/CreateEnvironmentResponse.ts
21467
+ function instanceOfCreateEnvironmentResponse(value) {
21468
+ if (!("data" in value) || value["data"] === void 0)
21469
+ return false;
21470
+ if (!("params" in value) || value["params"] === void 0)
21083
21471
  return false;
21084
21472
  return true;
21085
21473
  }
21086
- function RawEventBatchResponseDataFromJSON(json) {
21087
- return RawEventBatchResponseDataFromJSONTyped(json, false);
21474
+ function CreateEnvironmentResponseFromJSON(json) {
21475
+ return CreateEnvironmentResponseFromJSONTyped(json, false);
21088
21476
  }
21089
- function RawEventBatchResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21477
+ function CreateEnvironmentResponseFromJSONTyped(json, ignoreDiscriminator) {
21090
21478
  if (json == null) {
21091
21479
  return json;
21092
21480
  }
21093
21481
  return {
21094
- events: json["events"].map(RawEventResponseDataFromJSON)
21482
+ data: EnvironmentDetailResponseDataFromJSON(json["data"]),
21483
+ params: json["params"]
21095
21484
  };
21096
21485
  }
21097
- function RawEventBatchResponseDataToJSON(value) {
21486
+ function CreateEnvironmentResponseToJSON(value) {
21098
21487
  if (value == null) {
21099
21488
  return value;
21100
21489
  }
21101
21490
  return {
21102
- events: value["events"].map(RawEventResponseDataToJSON)
21491
+ data: EnvironmentDetailResponseDataToJSON(value["data"]),
21492
+ params: value["params"]
21103
21493
  };
21104
21494
  }
21105
21495
 
21106
- // src/api/models/CreateEventBatchResponse.ts
21107
- function instanceOfCreateEventBatchResponse(value) {
21108
- if (!("data" in value) || value["data"] === void 0)
21109
- return false;
21110
- if (!("params" in value) || value["params"] === void 0)
21496
+ // src/api/models/EventBodyIdentifyCompany.ts
21497
+ function instanceOfEventBodyIdentifyCompany(value) {
21498
+ if (!("keys" in value) || value["keys"] === void 0)
21111
21499
  return false;
21112
21500
  return true;
21113
21501
  }
21114
- function CreateEventBatchResponseFromJSON(json) {
21115
- return CreateEventBatchResponseFromJSONTyped(json, false);
21502
+ function EventBodyIdentifyCompanyFromJSON(json) {
21503
+ return EventBodyIdentifyCompanyFromJSONTyped(json, false);
21116
21504
  }
21117
- function CreateEventBatchResponseFromJSONTyped(json, ignoreDiscriminator) {
21505
+ function EventBodyIdentifyCompanyFromJSONTyped(json, ignoreDiscriminator) {
21118
21506
  if (json == null) {
21119
21507
  return json;
21120
21508
  }
21121
21509
  return {
21122
- data: RawEventBatchResponseDataFromJSON(json["data"]),
21123
- params: json["params"]
21510
+ keys: json["keys"],
21511
+ name: json["name"] == null ? void 0 : json["name"],
21512
+ traits: json["traits"] == null ? void 0 : json["traits"]
21124
21513
  };
21125
21514
  }
21126
- function CreateEventBatchResponseToJSON(value) {
21515
+ function EventBodyIdentifyCompanyToJSON(value) {
21127
21516
  if (value == null) {
21128
21517
  return value;
21129
21518
  }
21130
21519
  return {
21131
- data: RawEventBatchResponseDataToJSON(value["data"]),
21132
- params: value["params"]
21520
+ keys: value["keys"],
21521
+ name: value["name"],
21522
+ traits: value["traits"]
21133
21523
  };
21134
21524
  }
21135
21525
 
21136
- // src/api/models/CreateEventResponse.ts
21137
- function instanceOfCreateEventResponse(value) {
21138
- if (!("data" in value) || value["data"] === void 0)
21139
- return false;
21140
- if (!("params" in value) || value["params"] === void 0)
21526
+ // src/api/models/EventBodyIdentify.ts
21527
+ function instanceOfEventBodyIdentify(value) {
21528
+ if (!("keys" in value) || value["keys"] === void 0)
21141
21529
  return false;
21142
21530
  return true;
21143
21531
  }
21144
- function CreateEventResponseFromJSON(json) {
21145
- return CreateEventResponseFromJSONTyped(json, false);
21532
+ function EventBodyIdentifyFromJSON(json) {
21533
+ return EventBodyIdentifyFromJSONTyped(json, false);
21146
21534
  }
21147
- function CreateEventResponseFromJSONTyped(json, ignoreDiscriminator) {
21535
+ function EventBodyIdentifyFromJSONTyped(json, ignoreDiscriminator) {
21148
21536
  if (json == null) {
21149
21537
  return json;
21150
21538
  }
21151
21539
  return {
21152
- data: RawEventResponseDataFromJSON(json["data"]),
21153
- params: json["params"]
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"]
21154
21544
  };
21155
21545
  }
21156
- function CreateEventResponseToJSON(value) {
21546
+ function EventBodyIdentifyToJSON(value) {
21157
21547
  if (value == null) {
21158
21548
  return value;
21159
21549
  }
21160
21550
  return {
21161
- data: RawEventResponseDataToJSON(value["data"]),
21162
- params: value["params"]
21551
+ company: EventBodyIdentifyCompanyToJSON(value["company"]),
21552
+ keys: value["keys"],
21553
+ name: value["name"],
21554
+ traits: value["traits"]
21163
21555
  };
21164
21556
  }
21165
21557
 
21166
- // src/api/models/CreateOrUpdateFlagRequestBody.ts
21167
- function instanceOfCreateOrUpdateFlagRequestBody(value) {
21168
- if (!("defaultValue" in value) || value["defaultValue"] === void 0)
21169
- return false;
21170
- if (!("description" in value) || value["description"] === void 0)
21171
- return false;
21172
- if (!("flagType" in value) || value["flagType"] === void 0)
21173
- return false;
21174
- if (!("key" in value) || value["key"] === void 0)
21175
- return false;
21176
- if (!("name" in value) || value["name"] === void 0)
21558
+ // src/api/models/EventBodyTrack.ts
21559
+ function instanceOfEventBodyTrack(value) {
21560
+ if (!("event" in value) || value["event"] === void 0)
21177
21561
  return false;
21178
21562
  return true;
21179
21563
  }
21180
- function CreateOrUpdateFlagRequestBodyFromJSON(json) {
21181
- return CreateOrUpdateFlagRequestBodyFromJSONTyped(json, false);
21564
+ function EventBodyTrackFromJSON(json) {
21565
+ return EventBodyTrackFromJSONTyped(json, false);
21182
21566
  }
21183
- function CreateOrUpdateFlagRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21567
+ function EventBodyTrackFromJSONTyped(json, ignoreDiscriminator) {
21184
21568
  if (json == null) {
21185
21569
  return json;
21186
21570
  }
21187
21571
  return {
21188
- defaultValue: json["default_value"],
21189
- description: json["description"],
21190
- featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
21191
- flagType: json["flag_type"],
21192
- id: json["id"] == null ? void 0 : json["id"],
21193
- key: json["key"],
21194
- name: json["name"]
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"]
21195
21576
  };
21196
21577
  }
21197
- function CreateOrUpdateFlagRequestBodyToJSON(value) {
21578
+ function EventBodyTrackToJSON(value) {
21198
21579
  if (value == null) {
21199
21580
  return value;
21200
21581
  }
21201
21582
  return {
21202
- default_value: value["defaultValue"],
21203
- description: value["description"],
21204
- feature_id: value["featureId"],
21205
- flag_type: value["flagType"],
21206
- id: value["id"],
21207
- key: value["key"],
21208
- name: value["name"]
21583
+ company: value["company"],
21584
+ event: value["event"],
21585
+ traits: value["traits"],
21586
+ user: value["user"]
21209
21587
  };
21210
21588
  }
21211
21589
 
21212
- // src/api/models/CreateFeatureRequestBody.ts
21213
- var CreateFeatureRequestBodyFeatureTypeEnum = {
21214
- Boolean: "boolean",
21215
- Event: "event",
21216
- Trait: "trait"
21217
- };
21218
- function instanceOfCreateFeatureRequestBody(value) {
21219
- if (!("description" in value) || value["description"] === void 0)
21220
- return false;
21221
- if (!("featureType" in value) || value["featureType"] === void 0)
21222
- return false;
21223
- if (!("name" in value) || value["name"] === void 0)
21224
- return false;
21225
- return true;
21226
- }
21227
- function CreateFeatureRequestBodyFromJSON(json) {
21228
- return CreateFeatureRequestBodyFromJSONTyped(json, false);
21590
+ // src/api/models/EventBody.ts
21591
+ function EventBodyFromJSON(json) {
21592
+ return EventBodyFromJSONTyped(json, false);
21229
21593
  }
21230
- function CreateFeatureRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21594
+ function EventBodyFromJSONTyped(json, ignoreDiscriminator) {
21231
21595
  if (json == null) {
21232
21596
  return json;
21233
21597
  }
21234
- return {
21235
- description: json["description"],
21236
- eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
21237
- featureType: json["feature_type"],
21238
- flag: json["flag"] == null ? void 0 : CreateOrUpdateFlagRequestBodyFromJSON(json["flag"]),
21239
- lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
21240
- name: json["name"],
21241
- traitId: json["trait_id"] == null ? void 0 : json["trait_id"]
21242
- };
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");
21243
21605
  }
21244
- function CreateFeatureRequestBodyToJSON(value) {
21606
+ function EventBodyToJSON(value) {
21245
21607
  if (value == null) {
21246
21608
  return value;
21247
21609
  }
21248
- return {
21249
- description: value["description"],
21250
- event_subtype: value["eventSubtype"],
21251
- feature_type: value["featureType"],
21252
- flag: CreateOrUpdateFlagRequestBodyToJSON(value["flag"]),
21253
- lifecycle_phase: value["lifecyclePhase"],
21254
- name: value["name"],
21255
- trait_id: value["traitId"]
21256
- };
21610
+ if (instanceOfEventBodyIdentify(value)) {
21611
+ return EventBodyIdentifyToJSON(value);
21612
+ }
21613
+ if (instanceOfEventBodyTrack(value)) {
21614
+ return EventBodyTrackToJSON(value);
21615
+ }
21616
+ return {};
21257
21617
  }
21258
21618
 
21259
- // src/api/models/EventSummaryResponseData.ts
21260
- function instanceOfEventSummaryResponseData(value) {
21261
- if (!("companyCount" in value) || value["companyCount"] === void 0)
21262
- return false;
21263
- if (!("environmentId" in value) || value["environmentId"] === void 0)
21264
- return false;
21265
- if (!("eventCount" in value) || value["eventCount"] === void 0)
21266
- return false;
21267
- if (!("eventSubtype" in value) || value["eventSubtype"] === void 0)
21268
- return false;
21269
- if (!("userCount" in value) || value["userCount"] === void 0)
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)
21270
21626
  return false;
21271
21627
  return true;
21272
21628
  }
21273
- function EventSummaryResponseDataFromJSON(json) {
21274
- return EventSummaryResponseDataFromJSONTyped(json, false);
21629
+ function CreateEventRequestBodyFromJSON(json) {
21630
+ return CreateEventRequestBodyFromJSONTyped(json, false);
21275
21631
  }
21276
- function EventSummaryResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21632
+ function CreateEventRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21277
21633
  if (json == null) {
21278
21634
  return json;
21279
21635
  }
21280
21636
  return {
21281
- companyCount: json["company_count"],
21282
- environmentId: json["environment_id"],
21283
- eventCount: json["event_count"],
21284
- eventSubtype: json["event_subtype"],
21285
- lastSeenAt: json["last_seen_at"] == null ? void 0 : new Date(json["last_seen_at"]),
21286
- userCount: json["user_count"]
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"])
21287
21640
  };
21288
21641
  }
21289
- function EventSummaryResponseDataToJSON(value) {
21642
+ function CreateEventRequestBodyToJSON(value) {
21290
21643
  if (value == null) {
21291
21644
  return value;
21292
21645
  }
21293
21646
  return {
21294
- company_count: value["companyCount"],
21295
- environment_id: value["environmentId"],
21296
- event_count: value["eventCount"],
21297
- event_subtype: value["eventSubtype"],
21298
- last_seen_at: value["lastSeenAt"] == null ? void 0 : value["lastSeenAt"].toISOString(),
21299
- user_count: value["userCount"]
21647
+ body: EventBodyToJSON(value["body"]),
21648
+ event_type: value["eventType"],
21649
+ sent_at: value["sentAt"] == null ? void 0 : value["sentAt"].toISOString()
21300
21650
  };
21301
21651
  }
21302
21652
 
21303
- // src/api/models/RuleConditionResourceResponseData.ts
21304
- function instanceOfRuleConditionResourceResponseData(value) {
21305
- if (!("id" in value) || value["id"] === void 0)
21306
- return false;
21307
- if (!("name" in value) || value["name"] === void 0)
21653
+ // src/api/models/CreateEventBatchRequestBody.ts
21654
+ function instanceOfCreateEventBatchRequestBody(value) {
21655
+ if (!("events" in value) || value["events"] === void 0)
21308
21656
  return false;
21309
21657
  return true;
21310
21658
  }
21311
- function RuleConditionResourceResponseDataFromJSON(json) {
21312
- return RuleConditionResourceResponseDataFromJSONTyped(json, false);
21659
+ function CreateEventBatchRequestBodyFromJSON(json) {
21660
+ return CreateEventBatchRequestBodyFromJSONTyped(json, false);
21313
21661
  }
21314
- function RuleConditionResourceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21662
+ function CreateEventBatchRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21315
21663
  if (json == null) {
21316
21664
  return json;
21317
21665
  }
21318
21666
  return {
21319
- id: json["id"],
21320
- name: json["name"]
21667
+ events: json["events"].map(CreateEventRequestBodyFromJSON)
21321
21668
  };
21322
21669
  }
21323
- function RuleConditionResourceResponseDataToJSON(value) {
21670
+ function CreateEventBatchRequestBodyToJSON(value) {
21324
21671
  if (value == null) {
21325
21672
  return value;
21326
21673
  }
21327
21674
  return {
21328
- id: value["id"],
21329
- name: value["name"]
21675
+ events: value["events"].map(CreateEventRequestBodyToJSON)
21330
21676
  };
21331
21677
  }
21332
21678
 
21333
- // src/api/models/RuleConditionDetailResponseData.ts
21334
- function instanceOfRuleConditionDetailResponseData(value) {
21335
- if (!("conditionType" in value) || value["conditionType"] === void 0)
21336
- return false;
21337
- if (!("createdAt" in value) || value["createdAt"] === void 0)
21338
- return false;
21339
- if (!("environmentId" in value) || value["environmentId"] === void 0)
21340
- return false;
21341
- if (!("id" in value) || value["id"] === void 0)
21342
- return false;
21343
- if (!("operator" in value) || value["operator"] === void 0)
21344
- return false;
21345
- if (!("resourceIds" in value) || value["resourceIds"] === void 0)
21346
- return false;
21347
- if (!("resources" in value) || value["resources"] === void 0)
21679
+ // src/api/models/RawEventResponseData.ts
21680
+ function instanceOfRawEventResponseData(value) {
21681
+ if (!("capturedAt" in value) || value["capturedAt"] === void 0)
21348
21682
  return false;
21349
- if (!("ruleId" in value) || value["ruleId"] === void 0)
21683
+ if (!("remoteAddr" in value) || value["remoteAddr"] === void 0)
21350
21684
  return false;
21351
- if (!("traitValue" in value) || value["traitValue"] === void 0)
21685
+ if (!("remoteIp" in value) || value["remoteIp"] === void 0)
21352
21686
  return false;
21353
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
21687
+ if (!("userAgent" in value) || value["userAgent"] === void 0)
21354
21688
  return false;
21355
21689
  return true;
21356
21690
  }
21357
- function RuleConditionDetailResponseDataFromJSON(json) {
21358
- return RuleConditionDetailResponseDataFromJSONTyped(json, false);
21691
+ function RawEventResponseDataFromJSON(json) {
21692
+ return RawEventResponseDataFromJSONTyped(json, false);
21359
21693
  }
21360
- function RuleConditionDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21694
+ function RawEventResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21361
21695
  if (json == null) {
21362
21696
  return json;
21363
21697
  }
21364
21698
  return {
21365
- comparisonTrait: json["comparison_trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["comparison_trait"]),
21366
- comparisonTraitId: json["comparison_trait_id"] == null ? void 0 : json["comparison_trait_id"],
21367
- conditionGroupId: json["condition_group_id"] == null ? void 0 : json["condition_group_id"],
21368
- conditionType: json["condition_type"],
21369
- createdAt: new Date(json["created_at"]),
21370
- environmentId: json["environment_id"],
21371
- eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
21372
- flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
21373
- id: json["id"],
21374
- metricPeriod: json["metric_period"] == null ? void 0 : json["metric_period"],
21375
- metricValue: json["metric_value"] == null ? void 0 : json["metric_value"],
21376
- operator: json["operator"],
21377
- planId: json["plan_id"] == null ? void 0 : json["plan_id"],
21378
- resourceIds: json["resource_ids"],
21379
- resources: json["resources"].map(
21380
- RuleConditionResourceResponseDataFromJSON
21381
- ),
21382
- ruleId: json["rule_id"],
21383
- trait: json["trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["trait"]),
21384
- traitEntityType: json["trait_entity_type"] == null ? void 0 : json["trait_entity_type"],
21385
- traitId: json["trait_id"] == null ? void 0 : json["trait_id"],
21386
- traitValue: json["trait_value"],
21387
- updatedAt: new Date(json["updated_at"])
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"]
21388
21704
  };
21389
21705
  }
21390
- function RuleConditionDetailResponseDataToJSON(value) {
21706
+ function RawEventResponseDataToJSON(value) {
21391
21707
  if (value == null) {
21392
21708
  return value;
21393
21709
  }
21394
21710
  return {
21395
- comparison_trait: EntityTraitDefinitionResponseDataToJSON(
21396
- value["comparisonTrait"]
21397
- ),
21398
- comparison_trait_id: value["comparisonTraitId"],
21399
- condition_group_id: value["conditionGroupId"],
21400
- condition_type: value["conditionType"],
21401
- created_at: value["createdAt"].toISOString(),
21402
- environment_id: value["environmentId"],
21403
- event_subtype: value["eventSubtype"],
21404
- flag_id: value["flagId"],
21405
- id: value["id"],
21406
- metric_period: value["metricPeriod"],
21407
- metric_value: value["metricValue"],
21408
- operator: value["operator"],
21409
- plan_id: value["planId"],
21410
- resource_ids: value["resourceIds"],
21411
- resources: value["resources"].map(
21412
- RuleConditionResourceResponseDataToJSON
21413
- ),
21414
- rule_id: value["ruleId"],
21415
- trait: EntityTraitDefinitionResponseDataToJSON(value["trait"]),
21416
- trait_entity_type: value["traitEntityType"],
21417
- trait_id: value["traitId"],
21418
- trait_value: value["traitValue"],
21419
- updated_at: value["updatedAt"].toISOString()
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"]
21420
21716
  };
21421
21717
  }
21422
21718
 
21423
- // src/api/models/RuleConditionGroupDetailResponseData.ts
21424
- function instanceOfRuleConditionGroupDetailResponseData(value) {
21425
- if (!("conditions" in value) || value["conditions"] === void 0)
21426
- return false;
21427
- if (!("createdAt" in value) || value["createdAt"] === void 0)
21428
- return false;
21429
- if (!("environmentId" in value) || value["environmentId"] === void 0)
21430
- return false;
21431
- if (!("id" in value) || value["id"] === void 0)
21432
- return false;
21433
- if (!("ruleId" in value) || value["ruleId"] === void 0)
21434
- return false;
21435
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
21719
+ // src/api/models/RawEventBatchResponseData.ts
21720
+ function instanceOfRawEventBatchResponseData(value) {
21721
+ if (!("events" in value) || value["events"] === void 0)
21436
21722
  return false;
21437
21723
  return true;
21438
21724
  }
21439
- function RuleConditionGroupDetailResponseDataFromJSON(json) {
21440
- return RuleConditionGroupDetailResponseDataFromJSONTyped(json, false);
21725
+ function RawEventBatchResponseDataFromJSON(json) {
21726
+ return RawEventBatchResponseDataFromJSONTyped(json, false);
21441
21727
  }
21442
- function RuleConditionGroupDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21728
+ function RawEventBatchResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21443
21729
  if (json == null) {
21444
21730
  return json;
21445
21731
  }
21446
21732
  return {
21447
- conditions: json["conditions"].map(
21448
- RuleConditionDetailResponseDataFromJSON
21449
- ),
21450
- createdAt: new Date(json["created_at"]),
21451
- environmentId: json["environment_id"],
21452
- flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
21453
- id: json["id"],
21454
- planId: json["plan_id"] == null ? void 0 : json["plan_id"],
21455
- ruleId: json["rule_id"],
21456
- updatedAt: new Date(json["updated_at"])
21733
+ events: json["events"].map(RawEventResponseDataFromJSON)
21457
21734
  };
21458
21735
  }
21459
- function RuleConditionGroupDetailResponseDataToJSON(value) {
21736
+ function RawEventBatchResponseDataToJSON(value) {
21460
21737
  if (value == null) {
21461
21738
  return value;
21462
21739
  }
21463
21740
  return {
21464
- conditions: value["conditions"].map(
21465
- RuleConditionDetailResponseDataToJSON
21466
- ),
21467
- created_at: value["createdAt"].toISOString(),
21468
- environment_id: value["environmentId"],
21469
- flag_id: value["flagId"],
21470
- id: value["id"],
21471
- plan_id: value["planId"],
21472
- rule_id: value["ruleId"],
21473
- updated_at: value["updatedAt"].toISOString()
21741
+ events: value["events"].map(RawEventResponseDataToJSON)
21474
21742
  };
21475
21743
  }
21476
21744
 
21477
- // src/api/models/RuleDetailResponseData.ts
21478
- function instanceOfRuleDetailResponseData(value) {
21479
- if (!("conditionGroups" in value) || value["conditionGroups"] === void 0)
21480
- return false;
21481
- if (!("conditions" in value) || value["conditions"] === void 0)
21482
- return false;
21483
- if (!("createdAt" in value) || value["createdAt"] === void 0)
21484
- return false;
21485
- if (!("environmentId" in value) || value["environmentId"] === void 0)
21486
- return false;
21487
- if (!("id" in value) || value["id"] === void 0)
21488
- return false;
21489
- if (!("name" in value) || value["name"] === void 0)
21490
- return false;
21491
- if (!("priority" in value) || value["priority"] === void 0)
21492
- return false;
21493
- if (!("ruleType" in value) || value["ruleType"] === void 0)
21494
- return false;
21495
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
21745
+ // src/api/models/CreateEventBatchResponse.ts
21746
+ function instanceOfCreateEventBatchResponse(value) {
21747
+ if (!("data" in value) || value["data"] === void 0)
21496
21748
  return false;
21497
- if (!("value" in value) || value["value"] === void 0)
21749
+ if (!("params" in value) || value["params"] === void 0)
21498
21750
  return false;
21499
21751
  return true;
21500
21752
  }
21501
- function RuleDetailResponseDataFromJSON(json) {
21502
- return RuleDetailResponseDataFromJSONTyped(json, false);
21753
+ function CreateEventBatchResponseFromJSON(json) {
21754
+ return CreateEventBatchResponseFromJSONTyped(json, false);
21503
21755
  }
21504
- function RuleDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21756
+ function CreateEventBatchResponseFromJSONTyped(json, ignoreDiscriminator) {
21505
21757
  if (json == null) {
21506
21758
  return json;
21507
21759
  }
21508
21760
  return {
21509
- conditionGroups: json["condition_groups"].map(
21510
- RuleConditionGroupDetailResponseDataFromJSON
21511
- ),
21512
- conditions: json["conditions"].map(
21513
- RuleConditionDetailResponseDataFromJSON
21514
- ),
21515
- createdAt: new Date(json["created_at"]),
21516
- environmentId: json["environment_id"],
21517
- flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
21518
- id: json["id"],
21519
- name: json["name"],
21520
- planId: json["plan_id"] == null ? void 0 : json["plan_id"],
21521
- priority: json["priority"],
21522
- ruleType: json["rule_type"],
21523
- updatedAt: new Date(json["updated_at"]),
21524
- value: json["value"]
21761
+ data: RawEventBatchResponseDataFromJSON(json["data"]),
21762
+ params: json["params"]
21525
21763
  };
21526
21764
  }
21527
- function RuleDetailResponseDataToJSON(value) {
21765
+ function CreateEventBatchResponseToJSON(value) {
21528
21766
  if (value == null) {
21529
21767
  return value;
21530
21768
  }
21531
21769
  return {
21532
- condition_groups: value["conditionGroups"].map(
21533
- RuleConditionGroupDetailResponseDataToJSON
21534
- ),
21535
- conditions: value["conditions"].map(
21536
- RuleConditionDetailResponseDataToJSON
21537
- ),
21538
- created_at: value["createdAt"].toISOString(),
21539
- environment_id: value["environmentId"],
21540
- flag_id: value["flagId"],
21541
- id: value["id"],
21542
- name: value["name"],
21543
- plan_id: value["planId"],
21544
- priority: value["priority"],
21545
- rule_type: value["ruleType"],
21546
- updated_at: value["updatedAt"].toISOString(),
21547
- value: value["value"]
21770
+ data: RawEventBatchResponseDataToJSON(value["data"]),
21771
+ params: value["params"]
21548
21772
  };
21549
21773
  }
21550
21774
 
21551
- // src/api/models/FlagCheckLogResponseData.ts
21552
- function instanceOfFlagCheckLogResponseData(value) {
21553
- if (!("checkStatus" in value) || value["checkStatus"] === void 0)
21554
- return false;
21555
- if (!("createdAt" in value) || value["createdAt"] === void 0)
21556
- return false;
21557
- if (!("environmentId" in value) || value["environmentId"] === void 0)
21558
- return false;
21559
- if (!("flagKey" in value) || value["flagKey"] === void 0)
21560
- return false;
21561
- if (!("id" in value) || value["id"] === void 0)
21562
- return false;
21563
- if (!("reason" in value) || value["reason"] === void 0)
21564
- return false;
21565
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
21775
+ // src/api/models/CreateEventResponse.ts
21776
+ function instanceOfCreateEventResponse(value) {
21777
+ if (!("data" in value) || value["data"] === void 0)
21566
21778
  return false;
21567
- if (!("value" in value) || value["value"] === void 0)
21779
+ if (!("params" in value) || value["params"] === void 0)
21568
21780
  return false;
21569
21781
  return true;
21570
21782
  }
21571
- function FlagCheckLogResponseDataFromJSON(json) {
21572
- return FlagCheckLogResponseDataFromJSONTyped(json, false);
21783
+ function CreateEventResponseFromJSON(json) {
21784
+ return CreateEventResponseFromJSONTyped(json, false);
21573
21785
  }
21574
- function FlagCheckLogResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21786
+ function CreateEventResponseFromJSONTyped(json, ignoreDiscriminator) {
21575
21787
  if (json == null) {
21576
21788
  return json;
21577
21789
  }
21578
21790
  return {
21579
- checkStatus: json["check_status"],
21580
- companyId: json["company_id"] == null ? void 0 : json["company_id"],
21581
- createdAt: new Date(json["created_at"]),
21582
- environmentId: json["environment_id"],
21583
- error: json["error"] == null ? void 0 : json["error"],
21584
- flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
21585
- flagKey: json["flag_key"],
21586
- id: json["id"],
21587
- reason: json["reason"],
21588
- reqCompany: json["req_company"] == null ? void 0 : json["req_company"],
21589
- reqUser: json["req_user"] == null ? void 0 : json["req_user"],
21590
- ruleId: json["rule_id"] == null ? void 0 : json["rule_id"],
21591
- updatedAt: new Date(json["updated_at"]),
21592
- userId: json["user_id"] == null ? void 0 : json["user_id"],
21593
- value: json["value"]
21791
+ data: RawEventResponseDataFromJSON(json["data"]),
21792
+ params: json["params"]
21594
21793
  };
21595
21794
  }
21596
- function FlagCheckLogResponseDataToJSON(value) {
21795
+ function CreateEventResponseToJSON(value) {
21597
21796
  if (value == null) {
21598
21797
  return value;
21599
21798
  }
21600
21799
  return {
21601
- check_status: value["checkStatus"],
21602
- company_id: value["companyId"],
21603
- created_at: value["createdAt"].toISOString(),
21604
- environment_id: value["environmentId"],
21605
- error: value["error"],
21606
- flag_id: value["flagId"],
21607
- flag_key: value["flagKey"],
21608
- id: value["id"],
21609
- reason: value["reason"],
21610
- req_company: value["reqCompany"],
21611
- req_user: value["reqUser"],
21612
- rule_id: value["ruleId"],
21613
- updated_at: value["updatedAt"].toISOString(),
21614
- user_id: value["userId"],
21615
- value: value["value"]
21800
+ data: RawEventResponseDataToJSON(value["data"]),
21801
+ params: value["params"]
21616
21802
  };
21617
21803
  }
21618
21804
 
21619
- // src/api/models/FlagDetailResponseData.ts
21620
- function instanceOfFlagDetailResponseData(value) {
21621
- if (!("createdAt" in value) || value["createdAt"] === void 0)
21622
- return false;
21805
+ // src/api/models/CreateOrUpdateFlagRequestBody.ts
21806
+ function instanceOfCreateOrUpdateFlagRequestBody(value) {
21623
21807
  if (!("defaultValue" in value) || value["defaultValue"] === void 0)
21624
21808
  return false;
21625
21809
  if (!("description" in value) || value["description"] === void 0)
21626
21810
  return false;
21627
21811
  if (!("flagType" in value) || value["flagType"] === void 0)
21628
21812
  return false;
21629
- if (!("id" in value) || value["id"] === void 0)
21630
- return false;
21631
21813
  if (!("key" in value) || value["key"] === void 0)
21632
21814
  return false;
21633
21815
  if (!("name" in value) || value["name"] === void 0)
21634
21816
  return false;
21635
- if (!("rules" in value) || value["rules"] === void 0)
21636
- return false;
21637
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
21638
- return false;
21639
21817
  return true;
21640
21818
  }
21641
- function FlagDetailResponseDataFromJSON(json) {
21642
- return FlagDetailResponseDataFromJSONTyped(json, false);
21819
+ function CreateOrUpdateFlagRequestBodyFromJSON(json) {
21820
+ return CreateOrUpdateFlagRequestBodyFromJSONTyped(json, false);
21643
21821
  }
21644
- function FlagDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21822
+ function CreateOrUpdateFlagRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21645
21823
  if (json == null) {
21646
21824
  return json;
21647
21825
  }
21648
21826
  return {
21649
- createdAt: new Date(json["created_at"]),
21650
21827
  defaultValue: json["default_value"],
21651
21828
  description: json["description"],
21652
- feature: json["feature"] == null ? void 0 : FeatureResponseDataFromJSON(json["feature"]),
21653
21829
  featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
21654
21830
  flagType: json["flag_type"],
21655
- id: json["id"],
21831
+ id: json["id"] == null ? void 0 : json["id"],
21656
21832
  key: json["key"],
21657
- latestCheck: json["latest_check"] == null ? void 0 : FlagCheckLogResponseDataFromJSON(json["latest_check"]),
21658
- name: json["name"],
21659
- rules: json["rules"].map(RuleDetailResponseDataFromJSON),
21660
- updatedAt: new Date(json["updated_at"])
21833
+ name: json["name"]
21661
21834
  };
21662
21835
  }
21663
- function FlagDetailResponseDataToJSON(value) {
21836
+ function CreateOrUpdateFlagRequestBodyToJSON(value) {
21664
21837
  if (value == null) {
21665
21838
  return value;
21666
21839
  }
21667
21840
  return {
21668
- created_at: value["createdAt"].toISOString(),
21669
21841
  default_value: value["defaultValue"],
21670
21842
  description: value["description"],
21671
- feature: FeatureResponseDataToJSON(value["feature"]),
21672
21843
  feature_id: value["featureId"],
21673
21844
  flag_type: value["flagType"],
21674
21845
  id: value["id"],
21675
21846
  key: value["key"],
21676
- latest_check: FlagCheckLogResponseDataToJSON(value["latestCheck"]),
21677
- name: value["name"],
21678
- rules: value["rules"].map(RuleDetailResponseDataToJSON),
21679
- updated_at: value["updatedAt"].toISOString()
21847
+ name: value["name"]
21680
21848
  };
21681
21849
  }
21682
21850
 
21683
- // src/api/models/FeatureDetailResponseData.ts
21684
- function instanceOfFeatureDetailResponseData(value) {
21685
- if (!("createdAt" in value) || value["createdAt"] === void 0)
21686
- 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) {
21687
21858
  if (!("description" in value) || value["description"] === void 0)
21688
21859
  return false;
21689
21860
  if (!("featureType" in value) || value["featureType"] === void 0)
21690
21861
  return false;
21691
- if (!("flags" in value) || value["flags"] === void 0)
21692
- return false;
21693
- if (!("id" in value) || value["id"] === void 0)
21694
- return false;
21695
21862
  if (!("name" in value) || value["name"] === void 0)
21696
21863
  return false;
21697
- if (!("plans" in value) || value["plans"] === void 0)
21698
- return false;
21699
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
21700
- return false;
21701
21864
  return true;
21702
21865
  }
21703
- function FeatureDetailResponseDataFromJSON(json) {
21704
- return FeatureDetailResponseDataFromJSONTyped(json, false);
21866
+ function CreateFeatureRequestBodyFromJSON(json) {
21867
+ return CreateFeatureRequestBodyFromJSONTyped(json, false);
21705
21868
  }
21706
- function FeatureDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21869
+ function CreateFeatureRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21707
21870
  if (json == null) {
21708
21871
  return json;
21709
21872
  }
21710
21873
  return {
21711
- createdAt: new Date(json["created_at"]),
21712
21874
  description: json["description"],
21713
21875
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
21714
- eventSummary: json["event_summary"] == null ? void 0 : EventSummaryResponseDataFromJSON(json["event_summary"]),
21715
21876
  featureType: json["feature_type"],
21716
- flags: json["flags"].map(FlagDetailResponseDataFromJSON),
21717
- id: json["id"],
21877
+ flag: json["flag"] == null ? void 0 : CreateOrUpdateFlagRequestBodyFromJSON(json["flag"]),
21718
21878
  lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
21719
21879
  name: json["name"],
21720
- plans: json["plans"].map(PreviewObjectFromJSON),
21721
- trait: json["trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["trait"]),
21722
- traitId: json["trait_id"] == null ? void 0 : json["trait_id"],
21723
- updatedAt: new Date(json["updated_at"])
21880
+ traitId: json["trait_id"] == null ? void 0 : json["trait_id"]
21724
21881
  };
21725
21882
  }
21726
- function FeatureDetailResponseDataToJSON(value) {
21883
+ function CreateFeatureRequestBodyToJSON(value) {
21727
21884
  if (value == null) {
21728
21885
  return value;
21729
21886
  }
21730
21887
  return {
21731
- created_at: value["createdAt"].toISOString(),
21732
21888
  description: value["description"],
21733
21889
  event_subtype: value["eventSubtype"],
21734
- event_summary: EventSummaryResponseDataToJSON(value["eventSummary"]),
21735
21890
  feature_type: value["featureType"],
21736
- flags: value["flags"].map(FlagDetailResponseDataToJSON),
21737
- id: value["id"],
21891
+ flag: CreateOrUpdateFlagRequestBodyToJSON(value["flag"]),
21738
21892
  lifecycle_phase: value["lifecyclePhase"],
21739
21893
  name: value["name"],
21740
- plans: value["plans"].map(PreviewObjectToJSON),
21741
- trait: EntityTraitDefinitionResponseDataToJSON(value["trait"]),
21742
- trait_id: value["traitId"],
21743
- updated_at: value["updatedAt"].toISOString()
21894
+ trait_id: value["traitId"]
21744
21895
  };
21745
21896
  }
21746
21897
 
@@ -21948,68 +22099,18 @@ function CreatePlanEntitlementRequestBodyFromJSONTyped(json, ignoreDiscriminator
21948
22099
  valueType: json["value_type"]
21949
22100
  };
21950
22101
  }
21951
- function CreatePlanEntitlementRequestBodyToJSON(value) {
21952
- if (value == null) {
21953
- return value;
21954
- }
21955
- return {
21956
- feature_id: value["featureId"],
21957
- metric_period: value["metricPeriod"],
21958
- plan_id: value["planId"],
21959
- value_bool: value["valueBool"],
21960
- value_numeric: value["valueNumeric"],
21961
- value_trait_id: value["valueTraitId"],
21962
- value_type: value["valueType"]
21963
- };
21964
- }
21965
-
21966
- // src/api/models/PlanResponseData.ts
21967
- function instanceOfPlanResponseData(value) {
21968
- if (!("audienceType" in value) || value["audienceType"] === void 0)
21969
- return false;
21970
- if (!("createdAt" in value) || value["createdAt"] === void 0)
21971
- return false;
21972
- if (!("description" in value) || value["description"] === void 0)
21973
- return false;
21974
- if (!("id" in value) || value["id"] === void 0)
21975
- return false;
21976
- if (!("name" in value) || value["name"] === void 0)
21977
- return false;
21978
- if (!("planType" in value) || value["planType"] === void 0)
21979
- return false;
21980
- if (!("updatedAt" in value) || value["updatedAt"] === void 0)
21981
- return false;
21982
- return true;
21983
- }
21984
- function PlanResponseDataFromJSON(json) {
21985
- return PlanResponseDataFromJSONTyped(json, false);
21986
- }
21987
- function PlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
21988
- if (json == null) {
21989
- return json;
21990
- }
21991
- return {
21992
- audienceType: json["audience_type"],
21993
- createdAt: new Date(json["created_at"]),
21994
- description: json["description"],
21995
- id: json["id"],
21996
- name: json["name"],
21997
- planType: json["plan_type"],
21998
- updatedAt: new Date(json["updated_at"])
21999
- };
22000
- }
22001
- function PlanResponseDataToJSON(value) {
22002
- if (value == null) {
22003
- return value;
22004
- }
22005
- return {
22006
- audience_type: value["audienceType"],
22007
- created_at: value["createdAt"].toISOString(),
22008
- description: value["description"],
22009
- id: value["id"],
22010
- name: value["name"],
22011
- plan_type: value["planType"],
22012
- updated_at: value["updatedAt"].toISOString()
22102
+ function CreatePlanEntitlementRequestBodyToJSON(value) {
22103
+ if (value == null) {
22104
+ return value;
22105
+ }
22106
+ return {
22107
+ feature_id: value["featureId"],
22108
+ metric_period: value["metricPeriod"],
22109
+ plan_id: value["planId"],
22110
+ value_bool: value["valueBool"],
22111
+ value_numeric: value["valueNumeric"],
22112
+ value_trait_id: value["valueTraitId"],
22113
+ value_type: value["valueType"]
22013
22114
  };
22014
22115
  }
22015
22116
 
@@ -23659,90 +23760,6 @@ function FeatureCompanyUserResponseDataToJSON(value) {
23659
23760
  };
23660
23761
  }
23661
23762
 
23662
- // src/api/models/FeatureUsageResponseData.ts
23663
- var FeatureUsageResponseDataAllocationTypeEnum = {
23664
- Boolean: "boolean",
23665
- Numeric: "numeric",
23666
- Trait: "trait",
23667
- Unlimited: "unlimited"
23668
- };
23669
- function instanceOfFeatureUsageResponseData(value) {
23670
- if (!("access" in value) || value["access"] === void 0)
23671
- return false;
23672
- if (!("allocationType" in value) || value["allocationType"] === void 0)
23673
- return false;
23674
- if (!("entitlementId" in value) || value["entitlementId"] === void 0)
23675
- return false;
23676
- if (!("entitlementType" in value) || value["entitlementType"] === void 0)
23677
- return false;
23678
- return true;
23679
- }
23680
- function FeatureUsageResponseDataFromJSON(json) {
23681
- return FeatureUsageResponseDataFromJSONTyped(json, false);
23682
- }
23683
- function FeatureUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
23684
- if (json == null) {
23685
- return json;
23686
- }
23687
- return {
23688
- access: json["access"],
23689
- allocation: json["allocation"] == null ? void 0 : json["allocation"],
23690
- allocationType: json["allocation_type"],
23691
- entitlementId: json["entitlement_id"],
23692
- entitlementType: json["entitlement_type"],
23693
- feature: json["feature"] == null ? void 0 : FeatureDetailResponseDataFromJSON(json["feature"]),
23694
- period: json["period"] == null ? void 0 : json["period"],
23695
- plan: json["plan"] == null ? void 0 : PlanResponseDataFromJSON(json["plan"]),
23696
- usage: json["usage"] == null ? void 0 : json["usage"]
23697
- };
23698
- }
23699
- function FeatureUsageResponseDataToJSON(value) {
23700
- if (value == null) {
23701
- return value;
23702
- }
23703
- return {
23704
- access: value["access"],
23705
- allocation: value["allocation"],
23706
- allocation_type: value["allocationType"],
23707
- entitlement_id: value["entitlementId"],
23708
- entitlement_type: value["entitlementType"],
23709
- feature: FeatureDetailResponseDataToJSON(value["feature"]),
23710
- period: value["period"],
23711
- plan: PlanResponseDataToJSON(value["plan"]),
23712
- usage: value["usage"]
23713
- };
23714
- }
23715
-
23716
- // src/api/models/FeatureUsageDetailResponseData.ts
23717
- function instanceOfFeatureUsageDetailResponseData(value) {
23718
- if (!("features" in value) || value["features"] === void 0)
23719
- return false;
23720
- return true;
23721
- }
23722
- function FeatureUsageDetailResponseDataFromJSON(json) {
23723
- return FeatureUsageDetailResponseDataFromJSONTyped(json, false);
23724
- }
23725
- function FeatureUsageDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
23726
- if (json == null) {
23727
- return json;
23728
- }
23729
- return {
23730
- features: json["features"].map(
23731
- FeatureUsageResponseDataFromJSON
23732
- )
23733
- };
23734
- }
23735
- function FeatureUsageDetailResponseDataToJSON(value) {
23736
- if (value == null) {
23737
- return value;
23738
- }
23739
- return {
23740
- features: value["features"].map(
23741
- FeatureUsageResponseDataToJSON
23742
- )
23743
- };
23744
- }
23745
-
23746
23763
  // src/api/models/FlagResponseData.ts
23747
23764
  function instanceOfFlagResponseData(value) {
23748
23765
  if (!("createdAt" in value) || value["createdAt"] === void 0)
@@ -25129,7 +25146,7 @@ function HydrateComponentResponseFromJSONTyped(json, ignoreDiscriminator) {
25129
25146
  return json;
25130
25147
  }
25131
25148
  return {
25132
- data: ComponentHydrateViewFromJSON(json["data"]),
25149
+ data: ComponentHydrateResponseDataFromJSON(json["data"]),
25133
25150
  params: json["params"]
25134
25151
  };
25135
25152
  }
@@ -25138,7 +25155,121 @@ function HydrateComponentResponseToJSON(value) {
25138
25155
  return value;
25139
25156
  }
25140
25157
  return {
25141
- data: ComponentHydrateViewToJSON(value["data"]),
25158
+ data: ComponentHydrateResponseDataToJSON(value["data"]),
25159
+ params: value["params"]
25160
+ };
25161
+ }
25162
+
25163
+ // src/api/models/IssueTemporaryAccessTokenRequestBody.ts
25164
+ function instanceOfIssueTemporaryAccessTokenRequestBody(value) {
25165
+ if (!("lookup" in value) || value["lookup"] === void 0)
25166
+ return false;
25167
+ if (!("resourceType" in value) || value["resourceType"] === void 0)
25168
+ return false;
25169
+ return true;
25170
+ }
25171
+ function IssueTemporaryAccessTokenRequestBodyFromJSON(json) {
25172
+ return IssueTemporaryAccessTokenRequestBodyFromJSONTyped(json, false);
25173
+ }
25174
+ function IssueTemporaryAccessTokenRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
25175
+ if (json == null) {
25176
+ return json;
25177
+ }
25178
+ return {
25179
+ lookup: json["lookup"],
25180
+ resourceType: json["resource_type"]
25181
+ };
25182
+ }
25183
+ function IssueTemporaryAccessTokenRequestBodyToJSON(value) {
25184
+ if (value == null) {
25185
+ return value;
25186
+ }
25187
+ return {
25188
+ lookup: value["lookup"],
25189
+ resource_type: value["resourceType"]
25190
+ };
25191
+ }
25192
+
25193
+ // src/api/models/IssueTemporaryAccessTokenResponseData.ts
25194
+ function instanceOfIssueTemporaryAccessTokenResponseData(value) {
25195
+ if (!("apiKeyId" in value) || value["apiKeyId"] === void 0)
25196
+ return false;
25197
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
25198
+ return false;
25199
+ if (!("environmentId" in value) || value["environmentId"] === void 0)
25200
+ return false;
25201
+ if (!("expiredAt" in value) || value["expiredAt"] === void 0)
25202
+ return false;
25203
+ if (!("id" in value) || value["id"] === void 0)
25204
+ return false;
25205
+ if (!("resourceType" in value) || value["resourceType"] === void 0)
25206
+ return false;
25207
+ if (!("token" in value) || value["token"] === void 0)
25208
+ return false;
25209
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
25210
+ return false;
25211
+ return true;
25212
+ }
25213
+ function IssueTemporaryAccessTokenResponseDataFromJSON(json) {
25214
+ return IssueTemporaryAccessTokenResponseDataFromJSONTyped(json, false);
25215
+ }
25216
+ function IssueTemporaryAccessTokenResponseDataFromJSONTyped(json, ignoreDiscriminator) {
25217
+ if (json == null) {
25218
+ return json;
25219
+ }
25220
+ return {
25221
+ apiKeyId: json["api_key_id"],
25222
+ createdAt: new Date(json["created_at"]),
25223
+ environmentId: json["environment_id"],
25224
+ expiredAt: new Date(json["expired_at"]),
25225
+ id: json["id"],
25226
+ resourceType: json["resource_type"],
25227
+ token: json["token"],
25228
+ updatedAt: new Date(json["updated_at"])
25229
+ };
25230
+ }
25231
+ function IssueTemporaryAccessTokenResponseDataToJSON(value) {
25232
+ if (value == null) {
25233
+ return value;
25234
+ }
25235
+ return {
25236
+ api_key_id: value["apiKeyId"],
25237
+ created_at: value["createdAt"].toISOString(),
25238
+ environment_id: value["environmentId"],
25239
+ expired_at: value["expiredAt"].toISOString(),
25240
+ id: value["id"],
25241
+ resource_type: value["resourceType"],
25242
+ token: value["token"],
25243
+ updated_at: value["updatedAt"].toISOString()
25244
+ };
25245
+ }
25246
+
25247
+ // src/api/models/IssueTemporaryAccessTokenResponse.ts
25248
+ function instanceOfIssueTemporaryAccessTokenResponse(value) {
25249
+ if (!("data" in value) || value["data"] === void 0)
25250
+ return false;
25251
+ if (!("params" in value) || value["params"] === void 0)
25252
+ return false;
25253
+ return true;
25254
+ }
25255
+ function IssueTemporaryAccessTokenResponseFromJSON(json) {
25256
+ return IssueTemporaryAccessTokenResponseFromJSONTyped(json, false);
25257
+ }
25258
+ function IssueTemporaryAccessTokenResponseFromJSONTyped(json, ignoreDiscriminator) {
25259
+ if (json == null) {
25260
+ return json;
25261
+ }
25262
+ return {
25263
+ data: IssueTemporaryAccessTokenResponseDataFromJSON(json["data"]),
25264
+ params: json["params"]
25265
+ };
25266
+ }
25267
+ function IssueTemporaryAccessTokenResponseToJSON(value) {
25268
+ if (value == null) {
25269
+ return value;
25270
+ }
25271
+ return {
25272
+ data: IssueTemporaryAccessTokenResponseDataToJSON(value["data"]),
25142
25273
  params: value["params"]
25143
25274
  };
25144
25275
  }
@@ -27225,6 +27356,56 @@ function RulesDetailResponseDataToJSON(value) {
27225
27356
  };
27226
27357
  }
27227
27358
 
27359
+ // src/api/models/TemporaryAccessTokenResponseData.ts
27360
+ function instanceOfTemporaryAccessTokenResponseData(value) {
27361
+ if (!("apiKeyId" in value) || value["apiKeyId"] === void 0)
27362
+ return false;
27363
+ if (!("createdAt" in value) || value["createdAt"] === void 0)
27364
+ return false;
27365
+ if (!("environmentId" in value) || value["environmentId"] === void 0)
27366
+ return false;
27367
+ if (!("expiredAt" in value) || value["expiredAt"] === void 0)
27368
+ return false;
27369
+ if (!("id" in value) || value["id"] === void 0)
27370
+ return false;
27371
+ if (!("resourceType" in value) || value["resourceType"] === void 0)
27372
+ return false;
27373
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
27374
+ return false;
27375
+ return true;
27376
+ }
27377
+ function TemporaryAccessTokenResponseDataFromJSON(json) {
27378
+ return TemporaryAccessTokenResponseDataFromJSONTyped(json, false);
27379
+ }
27380
+ function TemporaryAccessTokenResponseDataFromJSONTyped(json, ignoreDiscriminator) {
27381
+ if (json == null) {
27382
+ return json;
27383
+ }
27384
+ return {
27385
+ apiKeyId: json["api_key_id"],
27386
+ createdAt: new Date(json["created_at"]),
27387
+ environmentId: json["environment_id"],
27388
+ expiredAt: new Date(json["expired_at"]),
27389
+ id: json["id"],
27390
+ resourceType: json["resource_type"],
27391
+ updatedAt: new Date(json["updated_at"])
27392
+ };
27393
+ }
27394
+ function TemporaryAccessTokenResponseDataToJSON(value) {
27395
+ if (value == null) {
27396
+ return value;
27397
+ }
27398
+ return {
27399
+ api_key_id: value["apiKeyId"],
27400
+ created_at: value["createdAt"].toISOString(),
27401
+ environment_id: value["environmentId"],
27402
+ expired_at: value["expiredAt"].toISOString(),
27403
+ id: value["id"],
27404
+ resource_type: value["resourceType"],
27405
+ updated_at: value["updatedAt"].toISOString()
27406
+ };
27407
+ }
27408
+
27228
27409
  // src/api/models/UpdateApiKeyRequestBody.ts
27229
27410
  function instanceOfUpdateApiKeyRequestBody(value) {
27230
27411
  return true;
@@ -28671,6 +28852,55 @@ function WebhookEventResponseDataToJSON(value) {
28671
28852
  };
28672
28853
  }
28673
28854
 
28855
+ // src/api/apis/AccesstokensApi.ts
28856
+ var AccesstokensApi = class extends BaseAPI {
28857
+ /**
28858
+ * Issue temporary access token
28859
+ */
28860
+ async issueTemporaryAccessTokenRaw(requestParameters, initOverrides) {
28861
+ if (requestParameters["issueTemporaryAccessTokenRequestBody"] == null) {
28862
+ throw new RequiredError(
28863
+ "issueTemporaryAccessTokenRequestBody",
28864
+ 'Required parameter "issueTemporaryAccessTokenRequestBody" was null or undefined when calling issueTemporaryAccessToken().'
28865
+ );
28866
+ }
28867
+ const queryParameters = {};
28868
+ const headerParameters = {};
28869
+ headerParameters["Content-Type"] = "application/json";
28870
+ if (this.configuration && this.configuration.apiKey) {
28871
+ headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
28872
+ "X-Schematic-Api-Key"
28873
+ );
28874
+ }
28875
+ const response = await this.request(
28876
+ {
28877
+ path: `/temporary-access-tokens`,
28878
+ method: "POST",
28879
+ headers: headerParameters,
28880
+ query: queryParameters,
28881
+ body: IssueTemporaryAccessTokenRequestBodyToJSON(
28882
+ requestParameters["issueTemporaryAccessTokenRequestBody"]
28883
+ )
28884
+ },
28885
+ initOverrides
28886
+ );
28887
+ return new JSONApiResponse(
28888
+ response,
28889
+ (jsonValue) => IssueTemporaryAccessTokenResponseFromJSON(jsonValue)
28890
+ );
28891
+ }
28892
+ /**
28893
+ * Issue temporary access token
28894
+ */
28895
+ async issueTemporaryAccessToken(requestParameters, initOverrides) {
28896
+ const response = await this.issueTemporaryAccessTokenRaw(
28897
+ requestParameters,
28898
+ initOverrides
28899
+ );
28900
+ return await response.value();
28901
+ }
28902
+ };
28903
+
28674
28904
  // src/api/apis/AccountsApi.ts
28675
28905
  var AccountsApi = class extends BaseAPI {
28676
28906
  /**
@@ -35075,6 +35305,7 @@ var offlineFetchApi = async (input, init2) => {
35075
35305
 
35076
35306
  // src/index.ts
35077
35307
  var Schematic = class {
35308
+ AccessTokens;
35078
35309
  Accounts;
35079
35310
  Billing;
35080
35311
  Companies;
@@ -35093,7 +35324,7 @@ var Schematic = class {
35093
35324
  constructor(apiKey, opts) {
35094
35325
  const { offline = false } = opts ?? {};
35095
35326
  const { basePath, flagDefaults = {} } = opts ?? {};
35096
- const version = "1.0.17";
35327
+ const version = "1.0.19";
35097
35328
  const headers = {
35098
35329
  "User-Agent": `schematic-typescript-node@v${version}`
35099
35330
  };
@@ -35126,6 +35357,7 @@ var Schematic = class {
35126
35357
  }
35127
35358
  this.offline = offline;
35128
35359
  this.flagDefaults = flagDefaults;
35360
+ this.AccessTokens = new AccesstokensApi(config);
35129
35361
  this.Accounts = new AccountsApi(config);
35130
35362
  this.Billing = new BillingApi(config);
35131
35363
  this.Companies = new CompaniesApi(config);
@@ -35212,6 +35444,7 @@ function init(apiKey, opts) {
35212
35444
  }
35213
35445
  // Annotate the CommonJS export names for ESM import in node:
35214
35446
  0 && (module.exports = {
35447
+ AccesstokensApi,
35215
35448
  AccountsApi,
35216
35449
  ApiErrorFromJSON,
35217
35450
  ApiErrorFromJSONTyped,
@@ -35288,9 +35521,9 @@ function init(apiKey, opts) {
35288
35521
  CompanySubscriptionResponseDataFromJSON,
35289
35522
  CompanySubscriptionResponseDataFromJSONTyped,
35290
35523
  CompanySubscriptionResponseDataToJSON,
35291
- ComponentHydrateViewFromJSON,
35292
- ComponentHydrateViewFromJSONTyped,
35293
- ComponentHydrateViewToJSON,
35524
+ ComponentHydrateResponseDataFromJSON,
35525
+ ComponentHydrateResponseDataFromJSONTyped,
35526
+ ComponentHydrateResponseDataToJSON,
35294
35527
  ComponentResponseDataFromJSON,
35295
35528
  ComponentResponseDataFromJSONTyped,
35296
35529
  ComponentResponseDataToJSON,
@@ -35797,6 +36030,15 @@ function init(apiKey, opts) {
35797
36030
  HydrateComponentResponseFromJSON,
35798
36031
  HydrateComponentResponseFromJSONTyped,
35799
36032
  HydrateComponentResponseToJSON,
36033
+ IssueTemporaryAccessTokenRequestBodyFromJSON,
36034
+ IssueTemporaryAccessTokenRequestBodyFromJSONTyped,
36035
+ IssueTemporaryAccessTokenRequestBodyToJSON,
36036
+ IssueTemporaryAccessTokenResponseDataFromJSON,
36037
+ IssueTemporaryAccessTokenResponseDataFromJSONTyped,
36038
+ IssueTemporaryAccessTokenResponseDataToJSON,
36039
+ IssueTemporaryAccessTokenResponseFromJSON,
36040
+ IssueTemporaryAccessTokenResponseFromJSONTyped,
36041
+ IssueTemporaryAccessTokenResponseToJSON,
35800
36042
  JSONApiResponse,
35801
36043
  KeysRequestBodyFromJSON,
35802
36044
  KeysRequestBodyFromJSONTyped,
@@ -36037,6 +36279,9 @@ function init(apiKey, opts) {
36037
36279
  SegmentStatusRespFromJSON,
36038
36280
  SegmentStatusRespFromJSONTyped,
36039
36281
  SegmentStatusRespToJSON,
36282
+ TemporaryAccessTokenResponseDataFromJSON,
36283
+ TemporaryAccessTokenResponseDataFromJSONTyped,
36284
+ TemporaryAccessTokenResponseDataToJSON,
36040
36285
  TextApiResponse,
36041
36286
  UpdateApiKeyRequestBodyFromJSON,
36042
36287
  UpdateApiKeyRequestBodyFromJSONTyped,
@@ -36217,7 +36462,7 @@ function init(apiKey, opts) {
36217
36462
  instanceOfCompanyPlanResponseData,
36218
36463
  instanceOfCompanyResponseData,
36219
36464
  instanceOfCompanySubscriptionResponseData,
36220
- instanceOfComponentHydrateView,
36465
+ instanceOfComponentHydrateResponseData,
36221
36466
  instanceOfComponentResponseData,
36222
36467
  instanceOfCountApiKeysParams,
36223
36468
  instanceOfCountApiKeysResponse,
@@ -36374,6 +36619,9 @@ function init(apiKey, opts) {
36374
36619
  instanceOfGetWebhookEventResponse,
36375
36620
  instanceOfGetWebhookResponse,
36376
36621
  instanceOfHydrateComponentResponse,
36622
+ instanceOfIssueTemporaryAccessTokenRequestBody,
36623
+ instanceOfIssueTemporaryAccessTokenResponse,
36624
+ instanceOfIssueTemporaryAccessTokenResponseData,
36377
36625
  instanceOfKeysRequestBody,
36378
36626
  instanceOfListApiKeysParams,
36379
36627
  instanceOfListApiKeysResponse,
@@ -36450,6 +36698,7 @@ function init(apiKey, opts) {
36450
36698
  instanceOfRuleResponseData,
36451
36699
  instanceOfRulesDetailResponseData,
36452
36700
  instanceOfSegmentStatusResp,
36701
+ instanceOfTemporaryAccessTokenResponseData,
36453
36702
  instanceOfUpdateApiKeyRequestBody,
36454
36703
  instanceOfUpdateApiKeyResponse,
36455
36704
  instanceOfUpdateAudienceRequestBody,