@schematichq/schematic-typescript-node 1.0.19 → 1.0.20

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.
@@ -14540,9 +14540,21 @@ __export(src_exports, {
14540
14540
  BASE_PATH: () => BASE_PATH,
14541
14541
  BaseAPI: () => BaseAPI,
14542
14542
  BillingApi: () => BillingApi,
14543
+ BillingCustomerResponseDataFromJSON: () => BillingCustomerResponseDataFromJSON,
14544
+ BillingCustomerResponseDataFromJSONTyped: () => BillingCustomerResponseDataFromJSONTyped,
14545
+ BillingCustomerResponseDataToJSON: () => BillingCustomerResponseDataToJSON,
14546
+ BillingCustomerSubscriptionFromJSON: () => BillingCustomerSubscriptionFromJSON,
14547
+ BillingCustomerSubscriptionFromJSONTyped: () => BillingCustomerSubscriptionFromJSONTyped,
14548
+ BillingCustomerSubscriptionToJSON: () => BillingCustomerSubscriptionToJSON,
14549
+ BillingCustomerWithSubscriptionsResponseDataFromJSON: () => BillingCustomerWithSubscriptionsResponseDataFromJSON,
14550
+ BillingCustomerWithSubscriptionsResponseDataFromJSONTyped: () => BillingCustomerWithSubscriptionsResponseDataFromJSONTyped,
14551
+ BillingCustomerWithSubscriptionsResponseDataToJSON: () => BillingCustomerWithSubscriptionsResponseDataToJSON,
14543
14552
  BillingProductPlanResponseDataFromJSON: () => BillingProductPlanResponseDataFromJSON,
14544
14553
  BillingProductPlanResponseDataFromJSONTyped: () => BillingProductPlanResponseDataFromJSONTyped,
14545
14554
  BillingProductPlanResponseDataToJSON: () => BillingProductPlanResponseDataToJSON,
14555
+ BillingProductPricingFromJSON: () => BillingProductPricingFromJSON,
14556
+ BillingProductPricingFromJSONTyped: () => BillingProductPricingFromJSONTyped,
14557
+ BillingProductPricingToJSON: () => BillingProductPricingToJSON,
14546
14558
  BillingProductResponseDataFromJSON: () => BillingProductResponseDataFromJSON,
14547
14559
  BillingProductResponseDataFromJSONTyped: () => BillingProductResponseDataFromJSONTyped,
14548
14560
  BillingProductResponseDataToJSON: () => BillingProductResponseDataToJSON,
@@ -14638,6 +14650,12 @@ __export(src_exports, {
14638
14650
  CountComponentsResponseFromJSON: () => CountComponentsResponseFromJSON,
14639
14651
  CountComponentsResponseFromJSONTyped: () => CountComponentsResponseFromJSONTyped,
14640
14652
  CountComponentsResponseToJSON: () => CountComponentsResponseToJSON,
14653
+ CountCustomersParamsFromJSON: () => CountCustomersParamsFromJSON,
14654
+ CountCustomersParamsFromJSONTyped: () => CountCustomersParamsFromJSONTyped,
14655
+ CountCustomersParamsToJSON: () => CountCustomersParamsToJSON,
14656
+ CountCustomersResponseFromJSON: () => CountCustomersResponseFromJSON,
14657
+ CountCustomersResponseFromJSONTyped: () => CountCustomersResponseFromJSONTyped,
14658
+ CountCustomersResponseToJSON: () => CountCustomersResponseToJSON,
14641
14659
  CountEntityKeyDefinitionsEntityTypeEnum: () => CountEntityKeyDefinitionsEntityTypeEnum,
14642
14660
  CountEntityKeyDefinitionsParamsEntityTypeEnum: () => CountEntityKeyDefinitionsParamsEntityTypeEnum,
14643
14661
  CountEntityKeyDefinitionsParamsFromJSON: () => CountEntityKeyDefinitionsParamsFromJSON,
@@ -14731,6 +14749,9 @@ __export(src_exports, {
14731
14749
  CreateApiKeyResponseFromJSON: () => CreateApiKeyResponseFromJSON,
14732
14750
  CreateApiKeyResponseFromJSONTyped: () => CreateApiKeyResponseFromJSONTyped,
14733
14751
  CreateApiKeyResponseToJSON: () => CreateApiKeyResponseToJSON,
14752
+ CreateBillingCustomerRequestBodyFromJSON: () => CreateBillingCustomerRequestBodyFromJSON,
14753
+ CreateBillingCustomerRequestBodyFromJSONTyped: () => CreateBillingCustomerRequestBodyFromJSONTyped,
14754
+ CreateBillingCustomerRequestBodyToJSON: () => CreateBillingCustomerRequestBodyToJSON,
14734
14755
  CreateBillingProductRequestBodyFromJSON: () => CreateBillingProductRequestBodyFromJSON,
14735
14756
  CreateBillingProductRequestBodyFromJSONTyped: () => CreateBillingProductRequestBodyFromJSONTyped,
14736
14757
  CreateBillingProductRequestBodyToJSON: () => CreateBillingProductRequestBodyToJSON,
@@ -15170,6 +15191,12 @@ __export(src_exports, {
15170
15191
  ListCrmProductsResponseFromJSON: () => ListCrmProductsResponseFromJSON,
15171
15192
  ListCrmProductsResponseFromJSONTyped: () => ListCrmProductsResponseFromJSONTyped,
15172
15193
  ListCrmProductsResponseToJSON: () => ListCrmProductsResponseToJSON,
15194
+ ListCustomersParamsFromJSON: () => ListCustomersParamsFromJSON,
15195
+ ListCustomersParamsFromJSONTyped: () => ListCustomersParamsFromJSONTyped,
15196
+ ListCustomersParamsToJSON: () => ListCustomersParamsToJSON,
15197
+ ListCustomersResponseFromJSON: () => ListCustomersResponseFromJSON,
15198
+ ListCustomersResponseFromJSONTyped: () => ListCustomersResponseFromJSONTyped,
15199
+ ListCustomersResponseToJSON: () => ListCustomersResponseToJSON,
15173
15200
  ListEntityKeyDefinitionsEntityTypeEnum: () => ListEntityKeyDefinitionsEntityTypeEnum,
15174
15201
  ListEntityKeyDefinitionsParamsEntityTypeEnum: () => ListEntityKeyDefinitionsParamsEntityTypeEnum,
15175
15202
  ListEntityKeyDefinitionsParamsFromJSON: () => ListEntityKeyDefinitionsParamsFromJSON,
@@ -15445,6 +15472,9 @@ __export(src_exports, {
15445
15472
  UpdateWebhookResponseFromJSON: () => UpdateWebhookResponseFromJSON,
15446
15473
  UpdateWebhookResponseFromJSONTyped: () => UpdateWebhookResponseFromJSONTyped,
15447
15474
  UpdateWebhookResponseToJSON: () => UpdateWebhookResponseToJSON,
15475
+ UpsertBillingCustomerResponseFromJSON: () => UpsertBillingCustomerResponseFromJSON,
15476
+ UpsertBillingCustomerResponseFromJSONTyped: () => UpsertBillingCustomerResponseFromJSONTyped,
15477
+ UpsertBillingCustomerResponseToJSON: () => UpsertBillingCustomerResponseToJSON,
15448
15478
  UpsertBillingProductPlanResponseFromJSON: () => UpsertBillingProductPlanResponseFromJSON,
15449
15479
  UpsertBillingProductPlanResponseFromJSONTyped: () => UpsertBillingProductPlanResponseFromJSONTyped,
15450
15480
  UpsertBillingProductPlanResponseToJSON: () => UpsertBillingProductPlanResponseToJSON,
@@ -15518,7 +15548,11 @@ __export(src_exports, {
15518
15548
  instanceOfApiKeyRequestResponseData: () => instanceOfApiKeyRequestResponseData,
15519
15549
  instanceOfApiKeyResponseData: () => instanceOfApiKeyResponseData,
15520
15550
  instanceOfAudienceRequestBody: () => instanceOfAudienceRequestBody,
15551
+ instanceOfBillingCustomerResponseData: () => instanceOfBillingCustomerResponseData,
15552
+ instanceOfBillingCustomerSubscription: () => instanceOfBillingCustomerSubscription,
15553
+ instanceOfBillingCustomerWithSubscriptionsResponseData: () => instanceOfBillingCustomerWithSubscriptionsResponseData,
15521
15554
  instanceOfBillingProductPlanResponseData: () => instanceOfBillingProductPlanResponseData,
15555
+ instanceOfBillingProductPricing: () => instanceOfBillingProductPricing,
15522
15556
  instanceOfBillingProductResponseData: () => instanceOfBillingProductResponseData,
15523
15557
  instanceOfBillingSubscriptionResponseData: () => instanceOfBillingSubscriptionResponseData,
15524
15558
  instanceOfCheckFlagOutputWithFlagKey: () => instanceOfCheckFlagOutputWithFlagKey,
@@ -15549,6 +15583,8 @@ __export(src_exports, {
15549
15583
  instanceOfCountCompanyOverridesResponse: () => instanceOfCountCompanyOverridesResponse,
15550
15584
  instanceOfCountComponentsParams: () => instanceOfCountComponentsParams,
15551
15585
  instanceOfCountComponentsResponse: () => instanceOfCountComponentsResponse,
15586
+ instanceOfCountCustomersParams: () => instanceOfCountCustomersParams,
15587
+ instanceOfCountCustomersResponse: () => instanceOfCountCustomersResponse,
15552
15588
  instanceOfCountEntityKeyDefinitionsParams: () => instanceOfCountEntityKeyDefinitionsParams,
15553
15589
  instanceOfCountEntityKeyDefinitionsResponse: () => instanceOfCountEntityKeyDefinitionsResponse,
15554
15590
  instanceOfCountEntityTraitDefinitionsParams: () => instanceOfCountEntityTraitDefinitionsParams,
@@ -15578,6 +15614,7 @@ __export(src_exports, {
15578
15614
  instanceOfCountWebhooksResponse: () => instanceOfCountWebhooksResponse,
15579
15615
  instanceOfCreateApiKeyRequestBody: () => instanceOfCreateApiKeyRequestBody,
15580
15616
  instanceOfCreateApiKeyResponse: () => instanceOfCreateApiKeyResponse,
15617
+ instanceOfCreateBillingCustomerRequestBody: () => instanceOfCreateBillingCustomerRequestBody,
15581
15618
  instanceOfCreateBillingProductRequestBody: () => instanceOfCreateBillingProductRequestBody,
15582
15619
  instanceOfCreateBillingSubscriptionsRequestBody: () => instanceOfCreateBillingSubscriptionsRequestBody,
15583
15620
  instanceOfCreateCompanyOverrideRequestBody: () => instanceOfCreateCompanyOverrideRequestBody,
@@ -15714,6 +15751,8 @@ __export(src_exports, {
15714
15751
  instanceOfListComponentsResponse: () => instanceOfListComponentsResponse,
15715
15752
  instanceOfListCrmProductsParams: () => instanceOfListCrmProductsParams,
15716
15753
  instanceOfListCrmProductsResponse: () => instanceOfListCrmProductsResponse,
15754
+ instanceOfListCustomersParams: () => instanceOfListCustomersParams,
15755
+ instanceOfListCustomersResponse: () => instanceOfListCustomersResponse,
15717
15756
  instanceOfListEntityKeyDefinitionsParams: () => instanceOfListEntityKeyDefinitionsParams,
15718
15757
  instanceOfListEntityKeyDefinitionsResponse: () => instanceOfListEntityKeyDefinitionsResponse,
15719
15758
  instanceOfListEntityTraitDefinitionsParams: () => instanceOfListEntityTraitDefinitionsParams,
@@ -15797,6 +15836,7 @@ __export(src_exports, {
15797
15836
  instanceOfUpdateRuleRequestBody: () => instanceOfUpdateRuleRequestBody,
15798
15837
  instanceOfUpdateWebhookRequestBody: () => instanceOfUpdateWebhookRequestBody,
15799
15838
  instanceOfUpdateWebhookResponse: () => instanceOfUpdateWebhookResponse,
15839
+ instanceOfUpsertBillingCustomerResponse: () => instanceOfUpsertBillingCustomerResponse,
15800
15840
  instanceOfUpsertBillingProductPlanResponse: () => instanceOfUpsertBillingProductPlanResponse,
15801
15841
  instanceOfUpsertBillingProductRequestBody: () => instanceOfUpsertBillingProductRequestBody,
15802
15842
  instanceOfUpsertBillingProductResponse: () => instanceOfUpsertBillingProductResponse,
@@ -17829,6 +17869,142 @@ function AudienceRequestBodyToJSON(value) {
17829
17869
  };
17830
17870
  }
17831
17871
 
17872
+ // src/api/models/BillingCustomerResponseData.ts
17873
+ function instanceOfBillingCustomerResponseData(value) {
17874
+ if (!("email" in value) || value["email"] === void 0)
17875
+ return false;
17876
+ if (!("externalId" in value) || value["externalId"] === void 0)
17877
+ return false;
17878
+ if (!("failedToImport" in value) || value["failedToImport"] === void 0)
17879
+ return false;
17880
+ if (!("id" in value) || value["id"] === void 0)
17881
+ return false;
17882
+ if (!("name" in value) || value["name"] === void 0)
17883
+ return false;
17884
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
17885
+ return false;
17886
+ return true;
17887
+ }
17888
+ function BillingCustomerResponseDataFromJSON(json) {
17889
+ return BillingCustomerResponseDataFromJSONTyped(json, false);
17890
+ }
17891
+ function BillingCustomerResponseDataFromJSONTyped(json, ignoreDiscriminator) {
17892
+ if (json == null) {
17893
+ return json;
17894
+ }
17895
+ return {
17896
+ companyId: json["company_id"] == null ? void 0 : json["company_id"],
17897
+ deletedAt: json["deleted_at"] == null ? void 0 : new Date(json["deleted_at"]),
17898
+ email: json["email"],
17899
+ externalId: json["external_id"],
17900
+ failedToImport: json["failed_to_import"],
17901
+ id: json["id"],
17902
+ name: json["name"],
17903
+ updatedAt: new Date(json["updated_at"])
17904
+ };
17905
+ }
17906
+ function BillingCustomerResponseDataToJSON(value) {
17907
+ if (value == null) {
17908
+ return value;
17909
+ }
17910
+ return {
17911
+ company_id: value["companyId"],
17912
+ deleted_at: value["deletedAt"] == null ? void 0 : value["deletedAt"].toISOString(),
17913
+ email: value["email"],
17914
+ external_id: value["externalId"],
17915
+ failed_to_import: value["failedToImport"],
17916
+ id: value["id"],
17917
+ name: value["name"],
17918
+ updated_at: value["updatedAt"].toISOString()
17919
+ };
17920
+ }
17921
+
17922
+ // src/api/models/BillingCustomerSubscription.ts
17923
+ function instanceOfBillingCustomerSubscription(value) {
17924
+ if (!("totalPrice" in value) || value["totalPrice"] === void 0)
17925
+ return false;
17926
+ return true;
17927
+ }
17928
+ function BillingCustomerSubscriptionFromJSON(json) {
17929
+ return BillingCustomerSubscriptionFromJSONTyped(json, false);
17930
+ }
17931
+ function BillingCustomerSubscriptionFromJSONTyped(json, ignoreDiscriminator) {
17932
+ if (json == null) {
17933
+ return json;
17934
+ }
17935
+ return {
17936
+ expiredAt: json["expired_at"] == null ? void 0 : new Date(json["expired_at"]),
17937
+ totalPrice: json["total_price"]
17938
+ };
17939
+ }
17940
+ function BillingCustomerSubscriptionToJSON(value) {
17941
+ if (value == null) {
17942
+ return value;
17943
+ }
17944
+ return {
17945
+ expired_at: value["expiredAt"] == null ? void 0 : value["expiredAt"].toISOString(),
17946
+ total_price: value["totalPrice"]
17947
+ };
17948
+ }
17949
+
17950
+ // src/api/models/BillingCustomerWithSubscriptionsResponseData.ts
17951
+ function instanceOfBillingCustomerWithSubscriptionsResponseData(value) {
17952
+ if (!("email" in value) || value["email"] === void 0)
17953
+ return false;
17954
+ if (!("externalId" in value) || value["externalId"] === void 0)
17955
+ return false;
17956
+ if (!("failedToImport" in value) || value["failedToImport"] === void 0)
17957
+ return false;
17958
+ if (!("id" in value) || value["id"] === void 0)
17959
+ return false;
17960
+ if (!("name" in value) || value["name"] === void 0)
17961
+ return false;
17962
+ if (!("subscriptions" in value) || value["subscriptions"] === void 0)
17963
+ return false;
17964
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0)
17965
+ return false;
17966
+ return true;
17967
+ }
17968
+ function BillingCustomerWithSubscriptionsResponseDataFromJSON(json) {
17969
+ return BillingCustomerWithSubscriptionsResponseDataFromJSONTyped(json, false);
17970
+ }
17971
+ function BillingCustomerWithSubscriptionsResponseDataFromJSONTyped(json, ignoreDiscriminator) {
17972
+ if (json == null) {
17973
+ return json;
17974
+ }
17975
+ return {
17976
+ companyId: json["company_id"] == null ? void 0 : json["company_id"],
17977
+ deletedAt: json["deleted_at"] == null ? void 0 : new Date(json["deleted_at"]),
17978
+ email: json["email"],
17979
+ externalId: json["external_id"],
17980
+ failedToImport: json["failed_to_import"],
17981
+ id: json["id"],
17982
+ name: json["name"],
17983
+ subscriptions: json["subscriptions"].map(
17984
+ BillingCustomerSubscriptionFromJSON
17985
+ ),
17986
+ updatedAt: new Date(json["updated_at"])
17987
+ };
17988
+ }
17989
+ function BillingCustomerWithSubscriptionsResponseDataToJSON(value) {
17990
+ if (value == null) {
17991
+ return value;
17992
+ }
17993
+ return {
17994
+ company_id: value["companyId"],
17995
+ deleted_at: value["deletedAt"] == null ? void 0 : value["deletedAt"].toISOString(),
17996
+ email: value["email"],
17997
+ external_id: value["externalId"],
17998
+ failed_to_import: value["failedToImport"],
17999
+ id: value["id"],
18000
+ name: value["name"],
18001
+ subscriptions: value["subscriptions"].map(
18002
+ BillingCustomerSubscriptionToJSON
18003
+ ),
18004
+ updated_at: value["updatedAt"].toISOString()
18005
+ };
18006
+ }
18007
+
17832
18008
  // src/api/models/BillingProductPlanResponseData.ts
17833
18009
  function instanceOfBillingProductPlanResponseData(value) {
17834
18010
  if (!("accountId" in value) || value["accountId"] === void 0)
@@ -17867,6 +18043,36 @@ function BillingProductPlanResponseDataToJSON(value) {
17867
18043
  };
17868
18044
  }
17869
18045
 
18046
+ // src/api/models/BillingProductPricing.ts
18047
+ function instanceOfBillingProductPricing(value) {
18048
+ if (!("price" in value) || value["price"] === void 0)
18049
+ return false;
18050
+ if (!("productExternalId" in value) || value["productExternalId"] === void 0)
18051
+ return false;
18052
+ return true;
18053
+ }
18054
+ function BillingProductPricingFromJSON(json) {
18055
+ return BillingProductPricingFromJSONTyped(json, false);
18056
+ }
18057
+ function BillingProductPricingFromJSONTyped(json, ignoreDiscriminator) {
18058
+ if (json == null) {
18059
+ return json;
18060
+ }
18061
+ return {
18062
+ price: json["price"],
18063
+ productExternalId: json["product_external_id"]
18064
+ };
18065
+ }
18066
+ function BillingProductPricingToJSON(value) {
18067
+ if (value == null) {
18068
+ return value;
18069
+ }
18070
+ return {
18071
+ price: value["price"],
18072
+ product_external_id: value["productExternalId"]
18073
+ };
18074
+ }
18075
+
17870
18076
  // src/api/models/BillingProductResponseData.ts
17871
18077
  function instanceOfBillingProductResponseData(value) {
17872
18078
  if (!("accountId" in value) || value["accountId"] === void 0)
@@ -20003,6 +20209,68 @@ function CountComponentsResponseToJSON(value) {
20003
20209
  };
20004
20210
  }
20005
20211
 
20212
+ // src/api/models/CountCustomersParams.ts
20213
+ function instanceOfCountCustomersParams(value) {
20214
+ return true;
20215
+ }
20216
+ function CountCustomersParamsFromJSON(json) {
20217
+ return CountCustomersParamsFromJSONTyped(json, false);
20218
+ }
20219
+ function CountCustomersParamsFromJSONTyped(json, ignoreDiscriminator) {
20220
+ if (json == null) {
20221
+ return json;
20222
+ }
20223
+ return {
20224
+ failedToImport: json["failed_to_import"] == null ? void 0 : json["failed_to_import"],
20225
+ limit: json["limit"] == null ? void 0 : json["limit"],
20226
+ name: json["name"] == null ? void 0 : json["name"],
20227
+ offset: json["offset"] == null ? void 0 : json["offset"],
20228
+ q: json["q"] == null ? void 0 : json["q"]
20229
+ };
20230
+ }
20231
+ function CountCustomersParamsToJSON(value) {
20232
+ if (value == null) {
20233
+ return value;
20234
+ }
20235
+ return {
20236
+ failed_to_import: value["failedToImport"],
20237
+ limit: value["limit"],
20238
+ name: value["name"],
20239
+ offset: value["offset"],
20240
+ q: value["q"]
20241
+ };
20242
+ }
20243
+
20244
+ // src/api/models/CountCustomersResponse.ts
20245
+ function instanceOfCountCustomersResponse(value) {
20246
+ if (!("data" in value) || value["data"] === void 0)
20247
+ return false;
20248
+ if (!("params" in value) || value["params"] === void 0)
20249
+ return false;
20250
+ return true;
20251
+ }
20252
+ function CountCustomersResponseFromJSON(json) {
20253
+ return CountCustomersResponseFromJSONTyped(json, false);
20254
+ }
20255
+ function CountCustomersResponseFromJSONTyped(json, ignoreDiscriminator) {
20256
+ if (json == null) {
20257
+ return json;
20258
+ }
20259
+ return {
20260
+ data: CountResponseFromJSON(json["data"]),
20261
+ params: CountCustomersParamsFromJSON(json["params"])
20262
+ };
20263
+ }
20264
+ function CountCustomersResponseToJSON(value) {
20265
+ if (value == null) {
20266
+ return value;
20267
+ }
20268
+ return {
20269
+ data: CountResponseToJSON(value["data"]),
20270
+ params: CountCustomersParamsToJSON(value["params"])
20271
+ };
20272
+ }
20273
+
20006
20274
  // src/api/models/CountEntityKeyDefinitionsParams.ts
20007
20275
  var CountEntityKeyDefinitionsParamsEntityTypeEnum = {
20008
20276
  Company: "company",
@@ -20893,6 +21161,50 @@ function CreateApiKeyResponseToJSON(value) {
20893
21161
  };
20894
21162
  }
20895
21163
 
21164
+ // src/api/models/CreateBillingCustomerRequestBody.ts
21165
+ function instanceOfCreateBillingCustomerRequestBody(value) {
21166
+ if (!("email" in value) || value["email"] === void 0)
21167
+ return false;
21168
+ if (!("externalId" in value) || value["externalId"] === void 0)
21169
+ return false;
21170
+ if (!("failedToImport" in value) || value["failedToImport"] === void 0)
21171
+ return false;
21172
+ if (!("meta" in value) || value["meta"] === void 0)
21173
+ return false;
21174
+ if (!("name" in value) || value["name"] === void 0)
21175
+ return false;
21176
+ return true;
21177
+ }
21178
+ function CreateBillingCustomerRequestBodyFromJSON(json) {
21179
+ return CreateBillingCustomerRequestBodyFromJSONTyped(json, false);
21180
+ }
21181
+ function CreateBillingCustomerRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
21182
+ if (json == null) {
21183
+ return json;
21184
+ }
21185
+ return {
21186
+ companyId: json["company_id"] == null ? void 0 : json["company_id"],
21187
+ email: json["email"],
21188
+ externalId: json["external_id"],
21189
+ failedToImport: json["failed_to_import"],
21190
+ meta: json["meta"],
21191
+ name: json["name"]
21192
+ };
21193
+ }
21194
+ function CreateBillingCustomerRequestBodyToJSON(value) {
21195
+ if (value == null) {
21196
+ return value;
21197
+ }
21198
+ return {
21199
+ company_id: value["companyId"],
21200
+ email: value["email"],
21201
+ external_id: value["externalId"],
21202
+ failed_to_import: value["failedToImport"],
21203
+ meta: value["meta"],
21204
+ name: value["name"]
21205
+ };
21206
+ }
21207
+
20896
21208
  // src/api/models/CreateBillingProductRequestBody.ts
20897
21209
  function instanceOfCreateBillingProductRequestBody(value) {
20898
21210
  if (!("currency" in value) || value["currency"] === void 0)
@@ -20945,6 +21257,8 @@ function instanceOfCreateBillingSubscriptionsRequestBody(value) {
20945
21257
  return false;
20946
21258
  if (!("subscriptionExternalId" in value) || value["subscriptionExternalId"] === void 0)
20947
21259
  return false;
21260
+ if (!("totalPrice" in value) || value["totalPrice"] === void 0)
21261
+ return false;
20948
21262
  return true;
20949
21263
  }
20950
21264
  function CreateBillingSubscriptionsRequestBodyFromJSON(json) {
@@ -20958,8 +21272,11 @@ function CreateBillingSubscriptionsRequestBodyFromJSONTyped(json, ignoreDiscrimi
20958
21272
  customerExternalId: json["customer_external_id"],
20959
21273
  expiredAt: new Date(json["expired_at"]),
20960
21274
  interval: json["interval"] == null ? void 0 : json["interval"],
20961
- productExternalIds: json["product_external_ids"],
20962
- subscriptionExternalId: json["subscription_external_id"]
21275
+ productExternalIds: json["product_external_ids"].map(
21276
+ BillingProductPricingFromJSON
21277
+ ),
21278
+ subscriptionExternalId: json["subscription_external_id"],
21279
+ totalPrice: json["total_price"]
20963
21280
  };
20964
21281
  }
20965
21282
  function CreateBillingSubscriptionsRequestBodyToJSON(value) {
@@ -20970,8 +21287,11 @@ function CreateBillingSubscriptionsRequestBodyToJSON(value) {
20970
21287
  customer_external_id: value["customerExternalId"],
20971
21288
  expired_at: value["expiredAt"].toISOString(),
20972
21289
  interval: value["interval"],
20973
- product_external_ids: value["productExternalIds"],
20974
- subscription_external_id: value["subscriptionExternalId"]
21290
+ product_external_ids: value["productExternalIds"].map(
21291
+ BillingProductPricingToJSON
21292
+ ),
21293
+ subscription_external_id: value["subscriptionExternalId"],
21294
+ total_price: value["totalPrice"]
20975
21295
  };
20976
21296
  }
20977
21297
 
@@ -25860,6 +26180,72 @@ function ListCrmProductsResponseToJSON(value) {
25860
26180
  };
25861
26181
  }
25862
26182
 
26183
+ // src/api/models/ListCustomersParams.ts
26184
+ function instanceOfListCustomersParams(value) {
26185
+ return true;
26186
+ }
26187
+ function ListCustomersParamsFromJSON(json) {
26188
+ return ListCustomersParamsFromJSONTyped(json, false);
26189
+ }
26190
+ function ListCustomersParamsFromJSONTyped(json, ignoreDiscriminator) {
26191
+ if (json == null) {
26192
+ return json;
26193
+ }
26194
+ return {
26195
+ failedToImport: json["failed_to_import"] == null ? void 0 : json["failed_to_import"],
26196
+ limit: json["limit"] == null ? void 0 : json["limit"],
26197
+ name: json["name"] == null ? void 0 : json["name"],
26198
+ offset: json["offset"] == null ? void 0 : json["offset"],
26199
+ q: json["q"] == null ? void 0 : json["q"]
26200
+ };
26201
+ }
26202
+ function ListCustomersParamsToJSON(value) {
26203
+ if (value == null) {
26204
+ return value;
26205
+ }
26206
+ return {
26207
+ failed_to_import: value["failedToImport"],
26208
+ limit: value["limit"],
26209
+ name: value["name"],
26210
+ offset: value["offset"],
26211
+ q: value["q"]
26212
+ };
26213
+ }
26214
+
26215
+ // src/api/models/ListCustomersResponse.ts
26216
+ function instanceOfListCustomersResponse(value) {
26217
+ if (!("data" in value) || value["data"] === void 0)
26218
+ return false;
26219
+ if (!("params" in value) || value["params"] === void 0)
26220
+ return false;
26221
+ return true;
26222
+ }
26223
+ function ListCustomersResponseFromJSON(json) {
26224
+ return ListCustomersResponseFromJSONTyped(json, false);
26225
+ }
26226
+ function ListCustomersResponseFromJSONTyped(json, ignoreDiscriminator) {
26227
+ if (json == null) {
26228
+ return json;
26229
+ }
26230
+ return {
26231
+ data: json["data"].map(
26232
+ BillingCustomerWithSubscriptionsResponseDataFromJSON
26233
+ ),
26234
+ params: ListCustomersParamsFromJSON(json["params"])
26235
+ };
26236
+ }
26237
+ function ListCustomersResponseToJSON(value) {
26238
+ if (value == null) {
26239
+ return value;
26240
+ }
26241
+ return {
26242
+ data: value["data"].map(
26243
+ BillingCustomerWithSubscriptionsResponseDataToJSON
26244
+ ),
26245
+ params: ListCustomersParamsToJSON(value["params"])
26246
+ };
26247
+ }
26248
+
25863
26249
  // src/api/models/ListEntityKeyDefinitionsParams.ts
25864
26250
  var ListEntityKeyDefinitionsParamsEntityTypeEnum = {
25865
26251
  Company: "company",
@@ -28292,6 +28678,36 @@ function UpdateWebhookResponseToJSON(value) {
28292
28678
  };
28293
28679
  }
28294
28680
 
28681
+ // src/api/models/UpsertBillingCustomerResponse.ts
28682
+ function instanceOfUpsertBillingCustomerResponse(value) {
28683
+ if (!("data" in value) || value["data"] === void 0)
28684
+ return false;
28685
+ if (!("params" in value) || value["params"] === void 0)
28686
+ return false;
28687
+ return true;
28688
+ }
28689
+ function UpsertBillingCustomerResponseFromJSON(json) {
28690
+ return UpsertBillingCustomerResponseFromJSONTyped(json, false);
28691
+ }
28692
+ function UpsertBillingCustomerResponseFromJSONTyped(json, ignoreDiscriminator) {
28693
+ if (json == null) {
28694
+ return json;
28695
+ }
28696
+ return {
28697
+ data: BillingCustomerResponseDataFromJSON(json["data"]),
28698
+ params: json["params"]
28699
+ };
28700
+ }
28701
+ function UpsertBillingCustomerResponseToJSON(value) {
28702
+ if (value == null) {
28703
+ return value;
28704
+ }
28705
+ return {
28706
+ data: BillingCustomerResponseDataToJSON(value["data"]),
28707
+ params: value["params"]
28708
+ };
28709
+ }
28710
+
28295
28711
  // src/api/models/UpsertBillingProductPlanResponse.ts
28296
28712
  function instanceOfUpsertBillingProductPlanResponse(value) {
28297
28713
  if (!("data" in value) || value["data"] === void 0)
@@ -29572,6 +29988,106 @@ var AccountsApi = class extends BaseAPI {
29572
29988
 
29573
29989
  // src/api/apis/BillingApi.ts
29574
29990
  var BillingApi = class extends BaseAPI {
29991
+ /**
29992
+ * Count customers
29993
+ */
29994
+ async countCustomersRaw(requestParameters, initOverrides) {
29995
+ const queryParameters = {};
29996
+ if (requestParameters["name"] != null) {
29997
+ queryParameters["name"] = requestParameters["name"];
29998
+ }
29999
+ if (requestParameters["failedToImport"] != null) {
30000
+ queryParameters["failed_to_import"] = requestParameters["failedToImport"];
30001
+ }
30002
+ if (requestParameters["q"] != null) {
30003
+ queryParameters["q"] = requestParameters["q"];
30004
+ }
30005
+ if (requestParameters["limit"] != null) {
30006
+ queryParameters["limit"] = requestParameters["limit"];
30007
+ }
30008
+ if (requestParameters["offset"] != null) {
30009
+ queryParameters["offset"] = requestParameters["offset"];
30010
+ }
30011
+ const headerParameters = {};
30012
+ if (this.configuration && this.configuration.apiKey) {
30013
+ headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
30014
+ "X-Schematic-Api-Key"
30015
+ );
30016
+ }
30017
+ const response = await this.request(
30018
+ {
30019
+ path: `/billing/customers/count`,
30020
+ method: "GET",
30021
+ headers: headerParameters,
30022
+ query: queryParameters
30023
+ },
30024
+ initOverrides
30025
+ );
30026
+ return new JSONApiResponse(
30027
+ response,
30028
+ (jsonValue) => CountCustomersResponseFromJSON(jsonValue)
30029
+ );
30030
+ }
30031
+ /**
30032
+ * Count customers
30033
+ */
30034
+ async countCustomers(requestParameters = {}, initOverrides) {
30035
+ const response = await this.countCustomersRaw(
30036
+ requestParameters,
30037
+ initOverrides
30038
+ );
30039
+ return await response.value();
30040
+ }
30041
+ /**
30042
+ * List customers
30043
+ */
30044
+ async listCustomersRaw(requestParameters, initOverrides) {
30045
+ const queryParameters = {};
30046
+ if (requestParameters["name"] != null) {
30047
+ queryParameters["name"] = requestParameters["name"];
30048
+ }
30049
+ if (requestParameters["failedToImport"] != null) {
30050
+ queryParameters["failed_to_import"] = requestParameters["failedToImport"];
30051
+ }
30052
+ if (requestParameters["q"] != null) {
30053
+ queryParameters["q"] = requestParameters["q"];
30054
+ }
30055
+ if (requestParameters["limit"] != null) {
30056
+ queryParameters["limit"] = requestParameters["limit"];
30057
+ }
30058
+ if (requestParameters["offset"] != null) {
30059
+ queryParameters["offset"] = requestParameters["offset"];
30060
+ }
30061
+ const headerParameters = {};
30062
+ if (this.configuration && this.configuration.apiKey) {
30063
+ headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
30064
+ "X-Schematic-Api-Key"
30065
+ );
30066
+ }
30067
+ const response = await this.request(
30068
+ {
30069
+ path: `/billing/customers`,
30070
+ method: "GET",
30071
+ headers: headerParameters,
30072
+ query: queryParameters
30073
+ },
30074
+ initOverrides
30075
+ );
30076
+ return new JSONApiResponse(
30077
+ response,
30078
+ (jsonValue) => ListCustomersResponseFromJSON(jsonValue)
30079
+ );
30080
+ }
30081
+ /**
30082
+ * List customers
30083
+ */
30084
+ async listCustomers(requestParameters = {}, initOverrides) {
30085
+ const response = await this.listCustomersRaw(
30086
+ requestParameters,
30087
+ initOverrides
30088
+ );
30089
+ return await response.value();
30090
+ }
29575
30091
  /**
29576
30092
  * List products
29577
30093
  */
@@ -29622,6 +30138,51 @@ var BillingApi = class extends BaseAPI {
29622
30138
  );
29623
30139
  return await response.value();
29624
30140
  }
30141
+ /**
30142
+ * Upsert billing customer
30143
+ */
30144
+ async upsertBillingCustomerRaw(requestParameters, initOverrides) {
30145
+ if (requestParameters["createBillingCustomerRequestBody"] == null) {
30146
+ throw new RequiredError(
30147
+ "createBillingCustomerRequestBody",
30148
+ 'Required parameter "createBillingCustomerRequestBody" was null or undefined when calling upsertBillingCustomer().'
30149
+ );
30150
+ }
30151
+ const queryParameters = {};
30152
+ const headerParameters = {};
30153
+ headerParameters["Content-Type"] = "application/json";
30154
+ if (this.configuration && this.configuration.apiKey) {
30155
+ headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
30156
+ "X-Schematic-Api-Key"
30157
+ );
30158
+ }
30159
+ const response = await this.request(
30160
+ {
30161
+ path: `/billing/customer/upsert`,
30162
+ method: "POST",
30163
+ headers: headerParameters,
30164
+ query: queryParameters,
30165
+ body: CreateBillingCustomerRequestBodyToJSON(
30166
+ requestParameters["createBillingCustomerRequestBody"]
30167
+ )
30168
+ },
30169
+ initOverrides
30170
+ );
30171
+ return new JSONApiResponse(
30172
+ response,
30173
+ (jsonValue) => UpsertBillingCustomerResponseFromJSON(jsonValue)
30174
+ );
30175
+ }
30176
+ /**
30177
+ * Upsert billing customer
30178
+ */
30179
+ async upsertBillingCustomer(requestParameters, initOverrides) {
30180
+ const response = await this.upsertBillingCustomerRaw(
30181
+ requestParameters,
30182
+ initOverrides
30183
+ );
30184
+ return await response.value();
30185
+ }
29625
30186
  /**
29626
30187
  * Upsert billing product
29627
30188
  */
@@ -35324,7 +35885,7 @@ var Schematic = class {
35324
35885
  constructor(apiKey, opts) {
35325
35886
  const { offline = false } = opts ?? {};
35326
35887
  const { basePath, flagDefaults = {} } = opts ?? {};
35327
- const version = "1.0.19";
35888
+ const version = "1.0.20";
35328
35889
  const headers = {
35329
35890
  "User-Agent": `schematic-typescript-node@v${version}`
35330
35891
  };
@@ -35467,9 +36028,21 @@ function init(apiKey, opts) {
35467
36028
  BASE_PATH,
35468
36029
  BaseAPI,
35469
36030
  BillingApi,
36031
+ BillingCustomerResponseDataFromJSON,
36032
+ BillingCustomerResponseDataFromJSONTyped,
36033
+ BillingCustomerResponseDataToJSON,
36034
+ BillingCustomerSubscriptionFromJSON,
36035
+ BillingCustomerSubscriptionFromJSONTyped,
36036
+ BillingCustomerSubscriptionToJSON,
36037
+ BillingCustomerWithSubscriptionsResponseDataFromJSON,
36038
+ BillingCustomerWithSubscriptionsResponseDataFromJSONTyped,
36039
+ BillingCustomerWithSubscriptionsResponseDataToJSON,
35470
36040
  BillingProductPlanResponseDataFromJSON,
35471
36041
  BillingProductPlanResponseDataFromJSONTyped,
35472
36042
  BillingProductPlanResponseDataToJSON,
36043
+ BillingProductPricingFromJSON,
36044
+ BillingProductPricingFromJSONTyped,
36045
+ BillingProductPricingToJSON,
35473
36046
  BillingProductResponseDataFromJSON,
35474
36047
  BillingProductResponseDataFromJSONTyped,
35475
36048
  BillingProductResponseDataToJSON,
@@ -35565,6 +36138,12 @@ function init(apiKey, opts) {
35565
36138
  CountComponentsResponseFromJSON,
35566
36139
  CountComponentsResponseFromJSONTyped,
35567
36140
  CountComponentsResponseToJSON,
36141
+ CountCustomersParamsFromJSON,
36142
+ CountCustomersParamsFromJSONTyped,
36143
+ CountCustomersParamsToJSON,
36144
+ CountCustomersResponseFromJSON,
36145
+ CountCustomersResponseFromJSONTyped,
36146
+ CountCustomersResponseToJSON,
35568
36147
  CountEntityKeyDefinitionsEntityTypeEnum,
35569
36148
  CountEntityKeyDefinitionsParamsEntityTypeEnum,
35570
36149
  CountEntityKeyDefinitionsParamsFromJSON,
@@ -35658,6 +36237,9 @@ function init(apiKey, opts) {
35658
36237
  CreateApiKeyResponseFromJSON,
35659
36238
  CreateApiKeyResponseFromJSONTyped,
35660
36239
  CreateApiKeyResponseToJSON,
36240
+ CreateBillingCustomerRequestBodyFromJSON,
36241
+ CreateBillingCustomerRequestBodyFromJSONTyped,
36242
+ CreateBillingCustomerRequestBodyToJSON,
35661
36243
  CreateBillingProductRequestBodyFromJSON,
35662
36244
  CreateBillingProductRequestBodyFromJSONTyped,
35663
36245
  CreateBillingProductRequestBodyToJSON,
@@ -36097,6 +36679,12 @@ function init(apiKey, opts) {
36097
36679
  ListCrmProductsResponseFromJSON,
36098
36680
  ListCrmProductsResponseFromJSONTyped,
36099
36681
  ListCrmProductsResponseToJSON,
36682
+ ListCustomersParamsFromJSON,
36683
+ ListCustomersParamsFromJSONTyped,
36684
+ ListCustomersParamsToJSON,
36685
+ ListCustomersResponseFromJSON,
36686
+ ListCustomersResponseFromJSONTyped,
36687
+ ListCustomersResponseToJSON,
36100
36688
  ListEntityKeyDefinitionsEntityTypeEnum,
36101
36689
  ListEntityKeyDefinitionsParamsEntityTypeEnum,
36102
36690
  ListEntityKeyDefinitionsParamsFromJSON,
@@ -36372,6 +36960,9 @@ function init(apiKey, opts) {
36372
36960
  UpdateWebhookResponseFromJSON,
36373
36961
  UpdateWebhookResponseFromJSONTyped,
36374
36962
  UpdateWebhookResponseToJSON,
36963
+ UpsertBillingCustomerResponseFromJSON,
36964
+ UpsertBillingCustomerResponseFromJSONTyped,
36965
+ UpsertBillingCustomerResponseToJSON,
36375
36966
  UpsertBillingProductPlanResponseFromJSON,
36376
36967
  UpsertBillingProductPlanResponseFromJSONTyped,
36377
36968
  UpsertBillingProductPlanResponseToJSON,
@@ -36445,7 +37036,11 @@ function init(apiKey, opts) {
36445
37036
  instanceOfApiKeyRequestResponseData,
36446
37037
  instanceOfApiKeyResponseData,
36447
37038
  instanceOfAudienceRequestBody,
37039
+ instanceOfBillingCustomerResponseData,
37040
+ instanceOfBillingCustomerSubscription,
37041
+ instanceOfBillingCustomerWithSubscriptionsResponseData,
36448
37042
  instanceOfBillingProductPlanResponseData,
37043
+ instanceOfBillingProductPricing,
36449
37044
  instanceOfBillingProductResponseData,
36450
37045
  instanceOfBillingSubscriptionResponseData,
36451
37046
  instanceOfCheckFlagOutputWithFlagKey,
@@ -36476,6 +37071,8 @@ function init(apiKey, opts) {
36476
37071
  instanceOfCountCompanyOverridesResponse,
36477
37072
  instanceOfCountComponentsParams,
36478
37073
  instanceOfCountComponentsResponse,
37074
+ instanceOfCountCustomersParams,
37075
+ instanceOfCountCustomersResponse,
36479
37076
  instanceOfCountEntityKeyDefinitionsParams,
36480
37077
  instanceOfCountEntityKeyDefinitionsResponse,
36481
37078
  instanceOfCountEntityTraitDefinitionsParams,
@@ -36505,6 +37102,7 @@ function init(apiKey, opts) {
36505
37102
  instanceOfCountWebhooksResponse,
36506
37103
  instanceOfCreateApiKeyRequestBody,
36507
37104
  instanceOfCreateApiKeyResponse,
37105
+ instanceOfCreateBillingCustomerRequestBody,
36508
37106
  instanceOfCreateBillingProductRequestBody,
36509
37107
  instanceOfCreateBillingSubscriptionsRequestBody,
36510
37108
  instanceOfCreateCompanyOverrideRequestBody,
@@ -36641,6 +37239,8 @@ function init(apiKey, opts) {
36641
37239
  instanceOfListComponentsResponse,
36642
37240
  instanceOfListCrmProductsParams,
36643
37241
  instanceOfListCrmProductsResponse,
37242
+ instanceOfListCustomersParams,
37243
+ instanceOfListCustomersResponse,
36644
37244
  instanceOfListEntityKeyDefinitionsParams,
36645
37245
  instanceOfListEntityKeyDefinitionsResponse,
36646
37246
  instanceOfListEntityTraitDefinitionsParams,
@@ -36724,6 +37324,7 @@ function init(apiKey, opts) {
36724
37324
  instanceOfUpdateRuleRequestBody,
36725
37325
  instanceOfUpdateWebhookRequestBody,
36726
37326
  instanceOfUpdateWebhookResponse,
37327
+ instanceOfUpsertBillingCustomerResponse,
36727
37328
  instanceOfUpsertBillingProductPlanResponse,
36728
37329
  instanceOfUpsertBillingProductRequestBody,
36729
37330
  instanceOfUpsertBillingProductResponse,