@schematichq/schematic-typescript-node 1.0.16 → 1.0.17
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.
- package/dist/schematic.cjs.js +319 -15
- package/dist/schematic.d.ts +283 -37
- package/dist/schematic.esm.js +298 -15
- package/package.json +1 -1
package/dist/schematic.esm.js
CHANGED
|
@@ -16525,6 +16525,44 @@ function AudienceRequestBodyToJSON(value) {
|
|
|
16525
16525
|
};
|
|
16526
16526
|
}
|
|
16527
16527
|
|
|
16528
|
+
// src/api/models/BillingProductPlanResponseData.ts
|
|
16529
|
+
function instanceOfBillingProductPlanResponseData(value) {
|
|
16530
|
+
if (!("accountId" in value) || value["accountId"] === void 0)
|
|
16531
|
+
return false;
|
|
16532
|
+
if (!("billingProductId" in value) || value["billingProductId"] === void 0)
|
|
16533
|
+
return false;
|
|
16534
|
+
if (!("environmentId" in value) || value["environmentId"] === void 0)
|
|
16535
|
+
return false;
|
|
16536
|
+
if (!("planId" in value) || value["planId"] === void 0)
|
|
16537
|
+
return false;
|
|
16538
|
+
return true;
|
|
16539
|
+
}
|
|
16540
|
+
function BillingProductPlanResponseDataFromJSON(json) {
|
|
16541
|
+
return BillingProductPlanResponseDataFromJSONTyped(json, false);
|
|
16542
|
+
}
|
|
16543
|
+
function BillingProductPlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
16544
|
+
if (json == null) {
|
|
16545
|
+
return json;
|
|
16546
|
+
}
|
|
16547
|
+
return {
|
|
16548
|
+
accountId: json["account_id"],
|
|
16549
|
+
billingProductId: json["billing_product_id"],
|
|
16550
|
+
environmentId: json["environment_id"],
|
|
16551
|
+
planId: json["plan_id"]
|
|
16552
|
+
};
|
|
16553
|
+
}
|
|
16554
|
+
function BillingProductPlanResponseDataToJSON(value) {
|
|
16555
|
+
if (value == null) {
|
|
16556
|
+
return value;
|
|
16557
|
+
}
|
|
16558
|
+
return {
|
|
16559
|
+
account_id: value["accountId"],
|
|
16560
|
+
billing_product_id: value["billingProductId"],
|
|
16561
|
+
environment_id: value["environmentId"],
|
|
16562
|
+
plan_id: value["planId"]
|
|
16563
|
+
};
|
|
16564
|
+
}
|
|
16565
|
+
|
|
16528
16566
|
// src/api/models/BillingProductResponseData.ts
|
|
16529
16567
|
function instanceOfBillingProductResponseData(value) {
|
|
16530
16568
|
if (!("accountId" in value) || value["accountId"] === void 0)
|
|
@@ -16560,7 +16598,6 @@ function BillingProductResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
16560
16598
|
accountId: json["account_id"],
|
|
16561
16599
|
createdAt: new Date(json["created_at"]),
|
|
16562
16600
|
currency: json["currency"],
|
|
16563
|
-
deletedAt: json["deleted_at"] == null ? void 0 : new Date(json["deleted_at"]),
|
|
16564
16601
|
environmentId: json["environment_id"],
|
|
16565
16602
|
externalId: json["external_id"],
|
|
16566
16603
|
name: json["name"],
|
|
@@ -16578,7 +16615,6 @@ function BillingProductResponseDataToJSON(value) {
|
|
|
16578
16615
|
account_id: value["accountId"],
|
|
16579
16616
|
created_at: value["createdAt"].toISOString(),
|
|
16580
16617
|
currency: value["currency"],
|
|
16581
|
-
deleted_at: value["deletedAt"] == null ? void 0 : value["deletedAt"].toISOString(),
|
|
16582
16618
|
environment_id: value["environmentId"],
|
|
16583
16619
|
external_id: value["externalId"],
|
|
16584
16620
|
name: value["name"],
|
|
@@ -16607,7 +16643,6 @@ function BillingSubscriptionResponseDataFromJSONTyped(json, ignoreDiscriminator)
|
|
|
16607
16643
|
return json;
|
|
16608
16644
|
}
|
|
16609
16645
|
return {
|
|
16610
|
-
deletedAt: json["deleted_at"] == null ? void 0 : new Date(json["deleted_at"]),
|
|
16611
16646
|
expiredAt: json["expired_at"] == null ? void 0 : new Date(json["expired_at"]),
|
|
16612
16647
|
externalId: json["external_id"],
|
|
16613
16648
|
id: json["id"],
|
|
@@ -16619,7 +16654,6 @@ function BillingSubscriptionResponseDataToJSON(value) {
|
|
|
16619
16654
|
return value;
|
|
16620
16655
|
}
|
|
16621
16656
|
return {
|
|
16622
|
-
deleted_at: value["deletedAt"] == null ? void 0 : value["deletedAt"].toISOString(),
|
|
16623
16657
|
expired_at: value["expiredAt"] == null ? void 0 : value["expiredAt"].toISOString(),
|
|
16624
16658
|
external_id: value["externalId"],
|
|
16625
16659
|
id: value["id"],
|
|
@@ -16854,7 +16888,6 @@ function CrmDealLineItemFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
16854
16888
|
billingFrequency: json["billing_frequency"],
|
|
16855
16889
|
createdAt: new Date(json["created_at"]),
|
|
16856
16890
|
currency: json["currency"],
|
|
16857
|
-
deletedAt: json["deleted_at"] == null ? void 0 : new Date(json["deleted_at"]),
|
|
16858
16891
|
description: json["description"],
|
|
16859
16892
|
discountPercentage: json["discount_percentage"] == null ? void 0 : json["discount_percentage"],
|
|
16860
16893
|
id: json["id"],
|
|
@@ -16874,7 +16907,6 @@ function CrmDealLineItemToJSON(value) {
|
|
|
16874
16907
|
billing_frequency: value["billingFrequency"],
|
|
16875
16908
|
created_at: value["createdAt"].toISOString(),
|
|
16876
16909
|
currency: value["currency"],
|
|
16877
|
-
deleted_at: value["deletedAt"] == null ? void 0 : value["deletedAt"].toISOString(),
|
|
16878
16910
|
description: value["description"],
|
|
16879
16911
|
discount_percentage: value["discountPercentage"],
|
|
16880
16912
|
id: value["id"],
|
|
@@ -17579,6 +17611,8 @@ function instanceOfComponentResponseData(value) {
|
|
|
17579
17611
|
return false;
|
|
17580
17612
|
if (!("name" in value) || value["name"] === void 0)
|
|
17581
17613
|
return false;
|
|
17614
|
+
if (!("state" in value) || value["state"] === void 0)
|
|
17615
|
+
return false;
|
|
17582
17616
|
if (!("type" in value) || value["type"] === void 0)
|
|
17583
17617
|
return false;
|
|
17584
17618
|
if (!("updatedAt" in value) || value["updatedAt"] === void 0)
|
|
@@ -17597,6 +17631,7 @@ function ComponentResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
17597
17631
|
createdAt: new Date(json["created_at"]),
|
|
17598
17632
|
id: json["id"],
|
|
17599
17633
|
name: json["name"],
|
|
17634
|
+
state: json["state"],
|
|
17600
17635
|
type: json["type"],
|
|
17601
17636
|
updatedAt: new Date(json["updated_at"])
|
|
17602
17637
|
};
|
|
@@ -17610,11 +17645,40 @@ function ComponentResponseDataToJSON(value) {
|
|
|
17610
17645
|
created_at: value["createdAt"].toISOString(),
|
|
17611
17646
|
id: value["id"],
|
|
17612
17647
|
name: value["name"],
|
|
17648
|
+
state: value["state"],
|
|
17613
17649
|
type: value["type"],
|
|
17614
17650
|
updated_at: value["updatedAt"].toISOString()
|
|
17615
17651
|
};
|
|
17616
17652
|
}
|
|
17617
17653
|
|
|
17654
|
+
// src/api/models/ComponentHydrateView.ts
|
|
17655
|
+
function instanceOfComponentHydrateView(value) {
|
|
17656
|
+
if (!("data" in value) || value["data"] === void 0)
|
|
17657
|
+
return false;
|
|
17658
|
+
return true;
|
|
17659
|
+
}
|
|
17660
|
+
function ComponentHydrateViewFromJSON(json) {
|
|
17661
|
+
return ComponentHydrateViewFromJSONTyped(json, false);
|
|
17662
|
+
}
|
|
17663
|
+
function ComponentHydrateViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
17664
|
+
if (json == null) {
|
|
17665
|
+
return json;
|
|
17666
|
+
}
|
|
17667
|
+
return {
|
|
17668
|
+
component: json["component"] == null ? void 0 : ComponentResponseDataFromJSON(json["component"]),
|
|
17669
|
+
data: json["data"]
|
|
17670
|
+
};
|
|
17671
|
+
}
|
|
17672
|
+
function ComponentHydrateViewToJSON(value) {
|
|
17673
|
+
if (value == null) {
|
|
17674
|
+
return value;
|
|
17675
|
+
}
|
|
17676
|
+
return {
|
|
17677
|
+
component: ComponentResponseDataToJSON(value["component"]),
|
|
17678
|
+
data: value["data"]
|
|
17679
|
+
};
|
|
17680
|
+
}
|
|
17681
|
+
|
|
17618
17682
|
// src/api/models/CountApiKeysParams.ts
|
|
17619
17683
|
function instanceOfCountApiKeysParams(value) {
|
|
17620
17684
|
return true;
|
|
@@ -20614,6 +20678,8 @@ function CreatePlanEntitlementRequestBodyToJSON(value) {
|
|
|
20614
20678
|
|
|
20615
20679
|
// src/api/models/PlanResponseData.ts
|
|
20616
20680
|
function instanceOfPlanResponseData(value) {
|
|
20681
|
+
if (!("audienceType" in value) || value["audienceType"] === void 0)
|
|
20682
|
+
return false;
|
|
20617
20683
|
if (!("createdAt" in value) || value["createdAt"] === void 0)
|
|
20618
20684
|
return false;
|
|
20619
20685
|
if (!("description" in value) || value["description"] === void 0)
|
|
@@ -20636,6 +20702,7 @@ function PlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
20636
20702
|
return json;
|
|
20637
20703
|
}
|
|
20638
20704
|
return {
|
|
20705
|
+
audienceType: json["audience_type"],
|
|
20639
20706
|
createdAt: new Date(json["created_at"]),
|
|
20640
20707
|
description: json["description"],
|
|
20641
20708
|
id: json["id"],
|
|
@@ -20649,6 +20716,7 @@ function PlanResponseDataToJSON(value) {
|
|
|
20649
20716
|
return value;
|
|
20650
20717
|
}
|
|
20651
20718
|
return {
|
|
20719
|
+
audience_type: value["audienceType"],
|
|
20652
20720
|
created_at: value["createdAt"].toISOString(),
|
|
20653
20721
|
description: value["description"],
|
|
20654
20722
|
id: value["id"],
|
|
@@ -20782,6 +20850,7 @@ function CreatePlanRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
20782
20850
|
return json;
|
|
20783
20851
|
}
|
|
20784
20852
|
return {
|
|
20853
|
+
audienceType: json["audience_type"] == null ? void 0 : json["audience_type"],
|
|
20785
20854
|
description: json["description"],
|
|
20786
20855
|
name: json["name"],
|
|
20787
20856
|
planType: json["plan_type"]
|
|
@@ -20792,6 +20861,7 @@ function CreatePlanRequestBodyToJSON(value) {
|
|
|
20792
20861
|
return value;
|
|
20793
20862
|
}
|
|
20794
20863
|
return {
|
|
20864
|
+
audience_type: value["audienceType"],
|
|
20795
20865
|
description: value["description"],
|
|
20796
20866
|
name: value["name"],
|
|
20797
20867
|
plan_type: value["planType"]
|
|
@@ -20800,6 +20870,8 @@ function CreatePlanRequestBodyToJSON(value) {
|
|
|
20800
20870
|
|
|
20801
20871
|
// src/api/models/PlanDetailResponseData.ts
|
|
20802
20872
|
function instanceOfPlanDetailResponseData(value) {
|
|
20873
|
+
if (!("audienceType" in value) || value["audienceType"] === void 0)
|
|
20874
|
+
return false;
|
|
20803
20875
|
if (!("companyCount" in value) || value["companyCount"] === void 0)
|
|
20804
20876
|
return false;
|
|
20805
20877
|
if (!("createdAt" in value) || value["createdAt"] === void 0)
|
|
@@ -20826,6 +20898,7 @@ function PlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
20826
20898
|
return json;
|
|
20827
20899
|
}
|
|
20828
20900
|
return {
|
|
20901
|
+
audienceType: json["audience_type"],
|
|
20829
20902
|
companyCount: json["company_count"],
|
|
20830
20903
|
createdAt: new Date(json["created_at"]),
|
|
20831
20904
|
description: json["description"],
|
|
@@ -20843,6 +20916,7 @@ function PlanDetailResponseDataToJSON(value) {
|
|
|
20843
20916
|
return value;
|
|
20844
20917
|
}
|
|
20845
20918
|
return {
|
|
20919
|
+
audience_type: value["audienceType"],
|
|
20846
20920
|
company_count: value["companyCount"],
|
|
20847
20921
|
created_at: value["createdAt"].toISOString(),
|
|
20848
20922
|
description: value["description"],
|
|
@@ -21204,7 +21278,6 @@ function CrmDealResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
21204
21278
|
createdAt: new Date(json["created_at"]),
|
|
21205
21279
|
dealExternalId: json["deal_external_id"],
|
|
21206
21280
|
dealId: json["deal_id"],
|
|
21207
|
-
deletedAt: json["deleted_at"] == null ? void 0 : new Date(json["deleted_at"]),
|
|
21208
21281
|
environmentId: json["environment_id"],
|
|
21209
21282
|
mrr: json["mrr"],
|
|
21210
21283
|
name: json["name"] == null ? void 0 : json["name"],
|
|
@@ -21223,7 +21296,6 @@ function CrmDealResponseDataToJSON(value) {
|
|
|
21223
21296
|
created_at: value["createdAt"].toISOString(),
|
|
21224
21297
|
deal_external_id: value["dealExternalId"],
|
|
21225
21298
|
deal_id: value["dealId"],
|
|
21226
|
-
deleted_at: value["deletedAt"] == null ? void 0 : value["deletedAt"].toISOString(),
|
|
21227
21299
|
environment_id: value["environmentId"],
|
|
21228
21300
|
mrr: value["mrr"],
|
|
21229
21301
|
name: value["name"],
|
|
@@ -21255,7 +21327,6 @@ function CrmLineItemResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
21255
21327
|
accountId: json["account_id"],
|
|
21256
21328
|
createdAt: new Date(json["created_at"]),
|
|
21257
21329
|
dealId: json["deal_id"] == null ? void 0 : json["deal_id"],
|
|
21258
|
-
deletedAt: json["deleted_at"] == null ? void 0 : new Date(json["deleted_at"]),
|
|
21259
21330
|
environmentId: json["environment_id"],
|
|
21260
21331
|
productExternalId: json["product_external_id"] == null ? void 0 : json["product_external_id"],
|
|
21261
21332
|
updatedAt: new Date(json["updated_at"])
|
|
@@ -21269,7 +21340,6 @@ function CrmLineItemResponseDataToJSON(value) {
|
|
|
21269
21340
|
account_id: value["accountId"],
|
|
21270
21341
|
created_at: value["createdAt"].toISOString(),
|
|
21271
21342
|
deal_id: value["dealId"],
|
|
21272
|
-
deleted_at: value["deletedAt"] == null ? void 0 : value["deletedAt"].toISOString(),
|
|
21273
21343
|
environment_id: value["environmentId"],
|
|
21274
21344
|
product_external_id: value["productExternalId"],
|
|
21275
21345
|
updated_at: value["updatedAt"].toISOString()
|
|
@@ -21311,7 +21381,6 @@ function CrmProductResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
21311
21381
|
accountId: json["account_id"],
|
|
21312
21382
|
createdAt: new Date(json["created_at"]),
|
|
21313
21383
|
currency: json["currency"],
|
|
21314
|
-
deletedAt: json["deleted_at"] == null ? void 0 : new Date(json["deleted_at"]),
|
|
21315
21384
|
environmentId: json["environment_id"],
|
|
21316
21385
|
externalId: json["external_id"],
|
|
21317
21386
|
name: json["name"],
|
|
@@ -21329,7 +21398,6 @@ function CrmProductResponseDataToJSON(value) {
|
|
|
21329
21398
|
account_id: value["accountId"],
|
|
21330
21399
|
created_at: value["createdAt"].toISOString(),
|
|
21331
21400
|
currency: value["currency"],
|
|
21332
|
-
deleted_at: value["deletedAt"] == null ? void 0 : value["deletedAt"].toISOString(),
|
|
21333
21401
|
environment_id: value["environmentId"],
|
|
21334
21402
|
external_id: value["externalId"],
|
|
21335
21403
|
name: value["name"],
|
|
@@ -23758,6 +23826,36 @@ function GetWebhookResponseToJSON(value) {
|
|
|
23758
23826
|
};
|
|
23759
23827
|
}
|
|
23760
23828
|
|
|
23829
|
+
// src/api/models/HydrateComponentResponse.ts
|
|
23830
|
+
function instanceOfHydrateComponentResponse(value) {
|
|
23831
|
+
if (!("data" in value) || value["data"] === void 0)
|
|
23832
|
+
return false;
|
|
23833
|
+
if (!("params" in value) || value["params"] === void 0)
|
|
23834
|
+
return false;
|
|
23835
|
+
return true;
|
|
23836
|
+
}
|
|
23837
|
+
function HydrateComponentResponseFromJSON(json) {
|
|
23838
|
+
return HydrateComponentResponseFromJSONTyped(json, false);
|
|
23839
|
+
}
|
|
23840
|
+
function HydrateComponentResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
23841
|
+
if (json == null) {
|
|
23842
|
+
return json;
|
|
23843
|
+
}
|
|
23844
|
+
return {
|
|
23845
|
+
data: ComponentHydrateViewFromJSON(json["data"]),
|
|
23846
|
+
params: json["params"]
|
|
23847
|
+
};
|
|
23848
|
+
}
|
|
23849
|
+
function HydrateComponentResponseToJSON(value) {
|
|
23850
|
+
if (value == null) {
|
|
23851
|
+
return value;
|
|
23852
|
+
}
|
|
23853
|
+
return {
|
|
23854
|
+
data: ComponentHydrateViewToJSON(value["data"]),
|
|
23855
|
+
params: value["params"]
|
|
23856
|
+
};
|
|
23857
|
+
}
|
|
23858
|
+
|
|
23761
23859
|
// src/api/models/KeysRequestBody.ts
|
|
23762
23860
|
function instanceOfKeysRequestBody(value) {
|
|
23763
23861
|
if (!("keys" in value) || value["keys"] === void 0)
|
|
@@ -26044,6 +26142,10 @@ var UpdateComponentRequestBodyEntityTypeEnum = {
|
|
|
26044
26142
|
Entitlement: "entitlement",
|
|
26045
26143
|
Billing: "billing"
|
|
26046
26144
|
};
|
|
26145
|
+
var UpdateComponentRequestBodyStateEnum = {
|
|
26146
|
+
Draft: "draft",
|
|
26147
|
+
Live: "live"
|
|
26148
|
+
};
|
|
26047
26149
|
function instanceOfUpdateComponentRequestBody(value) {
|
|
26048
26150
|
return true;
|
|
26049
26151
|
}
|
|
@@ -26057,7 +26159,8 @@ function UpdateComponentRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
26057
26159
|
return {
|
|
26058
26160
|
ast: json["ast"] == null ? void 0 : json["ast"],
|
|
26059
26161
|
entityType: json["entity_type"] == null ? void 0 : json["entity_type"],
|
|
26060
|
-
name: json["name"] == null ? void 0 : json["name"]
|
|
26162
|
+
name: json["name"] == null ? void 0 : json["name"],
|
|
26163
|
+
state: json["state"] == null ? void 0 : json["state"]
|
|
26061
26164
|
};
|
|
26062
26165
|
}
|
|
26063
26166
|
function UpdateComponentRequestBodyToJSON(value) {
|
|
@@ -26067,7 +26170,8 @@ function UpdateComponentRequestBodyToJSON(value) {
|
|
|
26067
26170
|
return {
|
|
26068
26171
|
ast: value["ast"],
|
|
26069
26172
|
entity_type: value["entityType"],
|
|
26070
|
-
name: value["name"]
|
|
26173
|
+
name: value["name"],
|
|
26174
|
+
state: value["state"]
|
|
26071
26175
|
};
|
|
26072
26176
|
}
|
|
26073
26177
|
|
|
@@ -26474,6 +26578,8 @@ var UpdatePlanRequestBodyPlanTypeEnum = {
|
|
|
26474
26578
|
Other: "other"
|
|
26475
26579
|
};
|
|
26476
26580
|
function instanceOfUpdatePlanRequestBody(value) {
|
|
26581
|
+
if (!("audienceType" in value) || value["audienceType"] === void 0)
|
|
26582
|
+
return false;
|
|
26477
26583
|
if (!("name" in value) || value["name"] === void 0)
|
|
26478
26584
|
return false;
|
|
26479
26585
|
return true;
|
|
@@ -26486,6 +26592,7 @@ function UpdatePlanRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
26486
26592
|
return json;
|
|
26487
26593
|
}
|
|
26488
26594
|
return {
|
|
26595
|
+
audienceType: json["audience_type"],
|
|
26489
26596
|
description: json["description"] == null ? void 0 : json["description"],
|
|
26490
26597
|
name: json["name"],
|
|
26491
26598
|
planType: json["plan_type"] == null ? void 0 : json["plan_type"]
|
|
@@ -26496,6 +26603,7 @@ function UpdatePlanRequestBodyToJSON(value) {
|
|
|
26496
26603
|
return value;
|
|
26497
26604
|
}
|
|
26498
26605
|
return {
|
|
26606
|
+
audience_type: value["audienceType"],
|
|
26499
26607
|
description: value["description"],
|
|
26500
26608
|
name: value["name"],
|
|
26501
26609
|
plan_type: value["planType"]
|
|
@@ -26716,6 +26824,62 @@ function UpdateWebhookResponseToJSON(value) {
|
|
|
26716
26824
|
};
|
|
26717
26825
|
}
|
|
26718
26826
|
|
|
26827
|
+
// src/api/models/UpsertBillingProductPlanResponse.ts
|
|
26828
|
+
function instanceOfUpsertBillingProductPlanResponse(value) {
|
|
26829
|
+
if (!("data" in value) || value["data"] === void 0)
|
|
26830
|
+
return false;
|
|
26831
|
+
if (!("params" in value) || value["params"] === void 0)
|
|
26832
|
+
return false;
|
|
26833
|
+
return true;
|
|
26834
|
+
}
|
|
26835
|
+
function UpsertBillingProductPlanResponseFromJSON(json) {
|
|
26836
|
+
return UpsertBillingProductPlanResponseFromJSONTyped(json, false);
|
|
26837
|
+
}
|
|
26838
|
+
function UpsertBillingProductPlanResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
26839
|
+
if (json == null) {
|
|
26840
|
+
return json;
|
|
26841
|
+
}
|
|
26842
|
+
return {
|
|
26843
|
+
data: BillingProductPlanResponseDataFromJSON(json["data"]),
|
|
26844
|
+
params: json["params"]
|
|
26845
|
+
};
|
|
26846
|
+
}
|
|
26847
|
+
function UpsertBillingProductPlanResponseToJSON(value) {
|
|
26848
|
+
if (value == null) {
|
|
26849
|
+
return value;
|
|
26850
|
+
}
|
|
26851
|
+
return {
|
|
26852
|
+
data: BillingProductPlanResponseDataToJSON(value["data"]),
|
|
26853
|
+
params: value["params"]
|
|
26854
|
+
};
|
|
26855
|
+
}
|
|
26856
|
+
|
|
26857
|
+
// src/api/models/UpsertBillingProductRequestBody.ts
|
|
26858
|
+
function instanceOfUpsertBillingProductRequestBody(value) {
|
|
26859
|
+
if (!("billingProductID" in value) || value["billingProductID"] === void 0)
|
|
26860
|
+
return false;
|
|
26861
|
+
return true;
|
|
26862
|
+
}
|
|
26863
|
+
function UpsertBillingProductRequestBodyFromJSON(json) {
|
|
26864
|
+
return UpsertBillingProductRequestBodyFromJSONTyped(json, false);
|
|
26865
|
+
}
|
|
26866
|
+
function UpsertBillingProductRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
26867
|
+
if (json == null) {
|
|
26868
|
+
return json;
|
|
26869
|
+
}
|
|
26870
|
+
return {
|
|
26871
|
+
billingProductID: json["BillingProductID"]
|
|
26872
|
+
};
|
|
26873
|
+
}
|
|
26874
|
+
function UpsertBillingProductRequestBodyToJSON(value) {
|
|
26875
|
+
if (value == null) {
|
|
26876
|
+
return value;
|
|
26877
|
+
}
|
|
26878
|
+
return {
|
|
26879
|
+
BillingProductID: value["billingProductID"]
|
|
26880
|
+
};
|
|
26881
|
+
}
|
|
26882
|
+
|
|
26719
26883
|
// src/api/models/UpsertBillingProductResponse.ts
|
|
26720
26884
|
function instanceOfUpsertBillingProductResponse(value) {
|
|
26721
26885
|
if (!("data" in value) || value["data"] === void 0)
|
|
@@ -29754,6 +29918,50 @@ var ComponentsApi = class extends BaseAPI {
|
|
|
29754
29918
|
);
|
|
29755
29919
|
return await response.value();
|
|
29756
29920
|
}
|
|
29921
|
+
/**
|
|
29922
|
+
* Hydrate component
|
|
29923
|
+
*/
|
|
29924
|
+
async hydrateComponentRaw(requestParameters, initOverrides) {
|
|
29925
|
+
if (requestParameters["componentId"] == null) {
|
|
29926
|
+
throw new RequiredError(
|
|
29927
|
+
"componentId",
|
|
29928
|
+
'Required parameter "componentId" was null or undefined when calling hydrateComponent().'
|
|
29929
|
+
);
|
|
29930
|
+
}
|
|
29931
|
+
const queryParameters = {};
|
|
29932
|
+
const headerParameters = {};
|
|
29933
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
29934
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
29935
|
+
"X-Schematic-Api-Key"
|
|
29936
|
+
);
|
|
29937
|
+
}
|
|
29938
|
+
const response = await this.request(
|
|
29939
|
+
{
|
|
29940
|
+
path: `/components/{component_id}/hydrate`.replace(
|
|
29941
|
+
`{${"component_id"}}`,
|
|
29942
|
+
encodeURIComponent(String(requestParameters["componentId"]))
|
|
29943
|
+
),
|
|
29944
|
+
method: "GET",
|
|
29945
|
+
headers: headerParameters,
|
|
29946
|
+
query: queryParameters
|
|
29947
|
+
},
|
|
29948
|
+
initOverrides
|
|
29949
|
+
);
|
|
29950
|
+
return new JSONApiResponse(
|
|
29951
|
+
response,
|
|
29952
|
+
(jsonValue) => HydrateComponentResponseFromJSON(jsonValue)
|
|
29953
|
+
);
|
|
29954
|
+
}
|
|
29955
|
+
/**
|
|
29956
|
+
* Hydrate component
|
|
29957
|
+
*/
|
|
29958
|
+
async hydrateComponent(requestParameters, initOverrides) {
|
|
29959
|
+
const response = await this.hydrateComponentRaw(
|
|
29960
|
+
requestParameters,
|
|
29961
|
+
initOverrides
|
|
29962
|
+
);
|
|
29963
|
+
return await response.value();
|
|
29964
|
+
}
|
|
29757
29965
|
/**
|
|
29758
29966
|
* List components
|
|
29759
29967
|
*/
|
|
@@ -32934,6 +33142,60 @@ var PlansApi = class extends BaseAPI {
|
|
|
32934
33142
|
const response = await this.updatePlanRaw(requestParameters, initOverrides);
|
|
32935
33143
|
return await response.value();
|
|
32936
33144
|
}
|
|
33145
|
+
/**
|
|
33146
|
+
* Upsert billing product plan
|
|
33147
|
+
*/
|
|
33148
|
+
async upsertBillingProductPlanRaw(requestParameters, initOverrides) {
|
|
33149
|
+
if (requestParameters["upsertBillingProductRequestBody"] == null) {
|
|
33150
|
+
throw new RequiredError(
|
|
33151
|
+
"upsertBillingProductRequestBody",
|
|
33152
|
+
'Required parameter "upsertBillingProductRequestBody" was null or undefined when calling upsertBillingProductPlan().'
|
|
33153
|
+
);
|
|
33154
|
+
}
|
|
33155
|
+
if (requestParameters["planId"] == null) {
|
|
33156
|
+
throw new RequiredError(
|
|
33157
|
+
"planId",
|
|
33158
|
+
'Required parameter "planId" was null or undefined when calling upsertBillingProductPlan().'
|
|
33159
|
+
);
|
|
33160
|
+
}
|
|
33161
|
+
const queryParameters = {};
|
|
33162
|
+
const headerParameters = {};
|
|
33163
|
+
headerParameters["Content-Type"] = "application/json";
|
|
33164
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
33165
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
33166
|
+
"X-Schematic-Api-Key"
|
|
33167
|
+
);
|
|
33168
|
+
}
|
|
33169
|
+
const response = await this.request(
|
|
33170
|
+
{
|
|
33171
|
+
path: `/plans/{plan_id}/billing_products`.replace(
|
|
33172
|
+
`{${"plan_id"}}`,
|
|
33173
|
+
encodeURIComponent(String(requestParameters["planId"]))
|
|
33174
|
+
),
|
|
33175
|
+
method: "PUT",
|
|
33176
|
+
headers: headerParameters,
|
|
33177
|
+
query: queryParameters,
|
|
33178
|
+
body: UpsertBillingProductRequestBodyToJSON(
|
|
33179
|
+
requestParameters["upsertBillingProductRequestBody"]
|
|
33180
|
+
)
|
|
33181
|
+
},
|
|
33182
|
+
initOverrides
|
|
33183
|
+
);
|
|
33184
|
+
return new JSONApiResponse(
|
|
33185
|
+
response,
|
|
33186
|
+
(jsonValue) => UpsertBillingProductPlanResponseFromJSON(jsonValue)
|
|
33187
|
+
);
|
|
33188
|
+
}
|
|
33189
|
+
/**
|
|
33190
|
+
* Upsert billing product plan
|
|
33191
|
+
*/
|
|
33192
|
+
async upsertBillingProductPlan(requestParameters, initOverrides) {
|
|
33193
|
+
const response = await this.upsertBillingProductPlanRaw(
|
|
33194
|
+
requestParameters,
|
|
33195
|
+
initOverrides
|
|
33196
|
+
);
|
|
33197
|
+
return await response.value();
|
|
33198
|
+
}
|
|
32937
33199
|
};
|
|
32938
33200
|
|
|
32939
33201
|
// src/api/apis/WebhooksApi.ts
|
|
@@ -33544,7 +33806,7 @@ var Schematic = class {
|
|
|
33544
33806
|
constructor(apiKey, opts) {
|
|
33545
33807
|
const { offline = false } = opts ?? {};
|
|
33546
33808
|
const { basePath, flagDefaults = {} } = opts ?? {};
|
|
33547
|
-
const version = "1.0.
|
|
33809
|
+
const version = "1.0.17";
|
|
33548
33810
|
const headers = {
|
|
33549
33811
|
"User-Agent": `schematic-typescript-node@v${version}`
|
|
33550
33812
|
};
|
|
@@ -33684,6 +33946,9 @@ export {
|
|
|
33684
33946
|
BASE_PATH,
|
|
33685
33947
|
BaseAPI,
|
|
33686
33948
|
BillingApi,
|
|
33949
|
+
BillingProductPlanResponseDataFromJSON,
|
|
33950
|
+
BillingProductPlanResponseDataFromJSONTyped,
|
|
33951
|
+
BillingProductPlanResponseDataToJSON,
|
|
33687
33952
|
BillingProductResponseDataFromJSON,
|
|
33688
33953
|
BillingProductResponseDataFromJSONTyped,
|
|
33689
33954
|
BillingProductResponseDataToJSON,
|
|
@@ -33735,6 +34000,9 @@ export {
|
|
|
33735
34000
|
CompanySubscriptionResponseDataFromJSON,
|
|
33736
34001
|
CompanySubscriptionResponseDataFromJSONTyped,
|
|
33737
34002
|
CompanySubscriptionResponseDataToJSON,
|
|
34003
|
+
ComponentHydrateViewFromJSON,
|
|
34004
|
+
ComponentHydrateViewFromJSONTyped,
|
|
34005
|
+
ComponentHydrateViewToJSON,
|
|
33738
34006
|
ComponentResponseDataFromJSON,
|
|
33739
34007
|
ComponentResponseDataFromJSONTyped,
|
|
33740
34008
|
ComponentResponseDataToJSON,
|
|
@@ -34238,6 +34506,9 @@ export {
|
|
|
34238
34506
|
GetWebhookResponseFromJSON,
|
|
34239
34507
|
GetWebhookResponseFromJSONTyped,
|
|
34240
34508
|
GetWebhookResponseToJSON,
|
|
34509
|
+
HydrateComponentResponseFromJSON,
|
|
34510
|
+
HydrateComponentResponseFromJSONTyped,
|
|
34511
|
+
HydrateComponentResponseToJSON,
|
|
34241
34512
|
JSONApiResponse,
|
|
34242
34513
|
KeysRequestBodyFromJSON,
|
|
34243
34514
|
KeysRequestBodyFromJSONTyped,
|
|
@@ -34502,6 +34773,7 @@ export {
|
|
|
34502
34773
|
UpdateComponentRequestBodyEntityTypeEnum,
|
|
34503
34774
|
UpdateComponentRequestBodyFromJSON,
|
|
34504
34775
|
UpdateComponentRequestBodyFromJSONTyped,
|
|
34776
|
+
UpdateComponentRequestBodyStateEnum,
|
|
34505
34777
|
UpdateComponentRequestBodyToJSON,
|
|
34506
34778
|
UpdateComponentResponseFromJSON,
|
|
34507
34779
|
UpdateComponentResponseFromJSONTyped,
|
|
@@ -34567,6 +34839,12 @@ export {
|
|
|
34567
34839
|
UpdateWebhookResponseFromJSON,
|
|
34568
34840
|
UpdateWebhookResponseFromJSONTyped,
|
|
34569
34841
|
UpdateWebhookResponseToJSON,
|
|
34842
|
+
UpsertBillingProductPlanResponseFromJSON,
|
|
34843
|
+
UpsertBillingProductPlanResponseFromJSONTyped,
|
|
34844
|
+
UpsertBillingProductPlanResponseToJSON,
|
|
34845
|
+
UpsertBillingProductRequestBodyFromJSON,
|
|
34846
|
+
UpsertBillingProductRequestBodyFromJSONTyped,
|
|
34847
|
+
UpsertBillingProductRequestBodyToJSON,
|
|
34570
34848
|
UpsertBillingProductResponseFromJSON,
|
|
34571
34849
|
UpsertBillingProductResponseFromJSONTyped,
|
|
34572
34850
|
UpsertBillingProductResponseToJSON,
|
|
@@ -34634,6 +34912,7 @@ export {
|
|
|
34634
34912
|
instanceOfApiKeyRequestResponseData,
|
|
34635
34913
|
instanceOfApiKeyResponseData,
|
|
34636
34914
|
instanceOfAudienceRequestBody,
|
|
34915
|
+
instanceOfBillingProductPlanResponseData,
|
|
34637
34916
|
instanceOfBillingProductResponseData,
|
|
34638
34917
|
instanceOfBillingSubscriptionResponseData,
|
|
34639
34918
|
instanceOfCheckFlagOutputWithFlagKey,
|
|
@@ -34650,6 +34929,7 @@ export {
|
|
|
34650
34929
|
instanceOfCompanyPlanResponseData,
|
|
34651
34930
|
instanceOfCompanyResponseData,
|
|
34652
34931
|
instanceOfCompanySubscriptionResponseData,
|
|
34932
|
+
instanceOfComponentHydrateView,
|
|
34653
34933
|
instanceOfComponentResponseData,
|
|
34654
34934
|
instanceOfCountApiKeysParams,
|
|
34655
34935
|
instanceOfCountApiKeysResponse,
|
|
@@ -34805,6 +35085,7 @@ export {
|
|
|
34805
35085
|
instanceOfGetUserResponse,
|
|
34806
35086
|
instanceOfGetWebhookEventResponse,
|
|
34807
35087
|
instanceOfGetWebhookResponse,
|
|
35088
|
+
instanceOfHydrateComponentResponse,
|
|
34808
35089
|
instanceOfKeysRequestBody,
|
|
34809
35090
|
instanceOfListApiKeysParams,
|
|
34810
35091
|
instanceOfListApiKeysResponse,
|
|
@@ -34906,6 +35187,8 @@ export {
|
|
|
34906
35187
|
instanceOfUpdateRuleRequestBody,
|
|
34907
35188
|
instanceOfUpdateWebhookRequestBody,
|
|
34908
35189
|
instanceOfUpdateWebhookResponse,
|
|
35190
|
+
instanceOfUpsertBillingProductPlanResponse,
|
|
35191
|
+
instanceOfUpsertBillingProductRequestBody,
|
|
34909
35192
|
instanceOfUpsertBillingProductResponse,
|
|
34910
35193
|
instanceOfUpsertBillingSubscriptionResponse,
|
|
34911
35194
|
instanceOfUpsertCompanyRequestBody,
|
package/package.json
CHANGED