@schematichq/schematic-typescript-node 1.0.14 → 1.0.15
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 +726 -1
- package/dist/schematic.d.ts +611 -0
- package/dist/schematic.esm.js +679 -1
- package/package.json +1 -1
package/dist/schematic.esm.js
CHANGED
|
@@ -17569,6 +17569,52 @@ function CompanySubscriptionResponseDataToJSON(value) {
|
|
|
17569
17569
|
};
|
|
17570
17570
|
}
|
|
17571
17571
|
|
|
17572
|
+
// src/api/models/ComponentResponseData.ts
|
|
17573
|
+
function instanceOfComponentResponseData(value) {
|
|
17574
|
+
if (!("ast" in value) || value["ast"] === void 0)
|
|
17575
|
+
return false;
|
|
17576
|
+
if (!("createdAt" in value) || value["createdAt"] === void 0)
|
|
17577
|
+
return false;
|
|
17578
|
+
if (!("id" in value) || value["id"] === void 0)
|
|
17579
|
+
return false;
|
|
17580
|
+
if (!("name" in value) || value["name"] === void 0)
|
|
17581
|
+
return false;
|
|
17582
|
+
if (!("type" in value) || value["type"] === void 0)
|
|
17583
|
+
return false;
|
|
17584
|
+
if (!("updatedAt" in value) || value["updatedAt"] === void 0)
|
|
17585
|
+
return false;
|
|
17586
|
+
return true;
|
|
17587
|
+
}
|
|
17588
|
+
function ComponentResponseDataFromJSON(json) {
|
|
17589
|
+
return ComponentResponseDataFromJSONTyped(json, false);
|
|
17590
|
+
}
|
|
17591
|
+
function ComponentResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
17592
|
+
if (json == null) {
|
|
17593
|
+
return json;
|
|
17594
|
+
}
|
|
17595
|
+
return {
|
|
17596
|
+
ast: json["ast"],
|
|
17597
|
+
createdAt: new Date(json["created_at"]),
|
|
17598
|
+
id: json["id"],
|
|
17599
|
+
name: json["name"],
|
|
17600
|
+
type: json["type"],
|
|
17601
|
+
updatedAt: new Date(json["updated_at"])
|
|
17602
|
+
};
|
|
17603
|
+
}
|
|
17604
|
+
function ComponentResponseDataToJSON(value) {
|
|
17605
|
+
if (value == null) {
|
|
17606
|
+
return value;
|
|
17607
|
+
}
|
|
17608
|
+
return {
|
|
17609
|
+
ast: value["ast"],
|
|
17610
|
+
created_at: value["createdAt"].toISOString(),
|
|
17611
|
+
id: value["id"],
|
|
17612
|
+
name: value["name"],
|
|
17613
|
+
type: value["type"],
|
|
17614
|
+
updated_at: value["updatedAt"].toISOString()
|
|
17615
|
+
};
|
|
17616
|
+
}
|
|
17617
|
+
|
|
17572
17618
|
// src/api/models/CountApiKeysParams.ts
|
|
17573
17619
|
function instanceOfCountApiKeysParams(value) {
|
|
17574
17620
|
return true;
|
|
@@ -17909,6 +17955,64 @@ function CountCompanyOverridesResponseToJSON(value) {
|
|
|
17909
17955
|
};
|
|
17910
17956
|
}
|
|
17911
17957
|
|
|
17958
|
+
// src/api/models/CountComponentsParams.ts
|
|
17959
|
+
function instanceOfCountComponentsParams(value) {
|
|
17960
|
+
return true;
|
|
17961
|
+
}
|
|
17962
|
+
function CountComponentsParamsFromJSON(json) {
|
|
17963
|
+
return CountComponentsParamsFromJSONTyped(json, false);
|
|
17964
|
+
}
|
|
17965
|
+
function CountComponentsParamsFromJSONTyped(json, ignoreDiscriminator) {
|
|
17966
|
+
if (json == null) {
|
|
17967
|
+
return json;
|
|
17968
|
+
}
|
|
17969
|
+
return {
|
|
17970
|
+
limit: json["limit"] == null ? void 0 : json["limit"],
|
|
17971
|
+
offset: json["offset"] == null ? void 0 : json["offset"],
|
|
17972
|
+
q: json["q"] == null ? void 0 : json["q"]
|
|
17973
|
+
};
|
|
17974
|
+
}
|
|
17975
|
+
function CountComponentsParamsToJSON(value) {
|
|
17976
|
+
if (value == null) {
|
|
17977
|
+
return value;
|
|
17978
|
+
}
|
|
17979
|
+
return {
|
|
17980
|
+
limit: value["limit"],
|
|
17981
|
+
offset: value["offset"],
|
|
17982
|
+
q: value["q"]
|
|
17983
|
+
};
|
|
17984
|
+
}
|
|
17985
|
+
|
|
17986
|
+
// src/api/models/CountComponentsResponse.ts
|
|
17987
|
+
function instanceOfCountComponentsResponse(value) {
|
|
17988
|
+
if (!("data" in value) || value["data"] === void 0)
|
|
17989
|
+
return false;
|
|
17990
|
+
if (!("params" in value) || value["params"] === void 0)
|
|
17991
|
+
return false;
|
|
17992
|
+
return true;
|
|
17993
|
+
}
|
|
17994
|
+
function CountComponentsResponseFromJSON(json) {
|
|
17995
|
+
return CountComponentsResponseFromJSONTyped(json, false);
|
|
17996
|
+
}
|
|
17997
|
+
function CountComponentsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
17998
|
+
if (json == null) {
|
|
17999
|
+
return json;
|
|
18000
|
+
}
|
|
18001
|
+
return {
|
|
18002
|
+
data: CountResponseFromJSON(json["data"]),
|
|
18003
|
+
params: CountComponentsParamsFromJSON(json["params"])
|
|
18004
|
+
};
|
|
18005
|
+
}
|
|
18006
|
+
function CountComponentsResponseToJSON(value) {
|
|
18007
|
+
if (value == null) {
|
|
18008
|
+
return value;
|
|
18009
|
+
}
|
|
18010
|
+
return {
|
|
18011
|
+
data: CountResponseToJSON(value["data"]),
|
|
18012
|
+
params: CountComponentsParamsToJSON(value["params"])
|
|
18013
|
+
};
|
|
18014
|
+
}
|
|
18015
|
+
|
|
17912
18016
|
// src/api/models/CountEntityKeyDefinitionsParams.ts
|
|
17913
18017
|
var CountEntityKeyDefinitionsParamsEntityTypeEnum = {
|
|
17914
18018
|
Company: "company",
|
|
@@ -18994,6 +19098,74 @@ function CreateCompanyResponseToJSON(value) {
|
|
|
18994
19098
|
};
|
|
18995
19099
|
}
|
|
18996
19100
|
|
|
19101
|
+
// src/api/models/CreateComponentRequestBody.ts
|
|
19102
|
+
var CreateComponentRequestBodyEntityTypeEnum = {
|
|
19103
|
+
Entitlement: "entitlement",
|
|
19104
|
+
Billing: "billing"
|
|
19105
|
+
};
|
|
19106
|
+
function instanceOfCreateComponentRequestBody(value) {
|
|
19107
|
+
if (!("ast" in value) || value["ast"] === void 0)
|
|
19108
|
+
return false;
|
|
19109
|
+
if (!("entityType" in value) || value["entityType"] === void 0)
|
|
19110
|
+
return false;
|
|
19111
|
+
if (!("name" in value) || value["name"] === void 0)
|
|
19112
|
+
return false;
|
|
19113
|
+
return true;
|
|
19114
|
+
}
|
|
19115
|
+
function CreateComponentRequestBodyFromJSON(json) {
|
|
19116
|
+
return CreateComponentRequestBodyFromJSONTyped(json, false);
|
|
19117
|
+
}
|
|
19118
|
+
function CreateComponentRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
19119
|
+
if (json == null) {
|
|
19120
|
+
return json;
|
|
19121
|
+
}
|
|
19122
|
+
return {
|
|
19123
|
+
ast: json["ast"],
|
|
19124
|
+
entityType: json["entity_type"],
|
|
19125
|
+
name: json["name"]
|
|
19126
|
+
};
|
|
19127
|
+
}
|
|
19128
|
+
function CreateComponentRequestBodyToJSON(value) {
|
|
19129
|
+
if (value == null) {
|
|
19130
|
+
return value;
|
|
19131
|
+
}
|
|
19132
|
+
return {
|
|
19133
|
+
ast: value["ast"],
|
|
19134
|
+
entity_type: value["entityType"],
|
|
19135
|
+
name: value["name"]
|
|
19136
|
+
};
|
|
19137
|
+
}
|
|
19138
|
+
|
|
19139
|
+
// src/api/models/CreateComponentResponse.ts
|
|
19140
|
+
function instanceOfCreateComponentResponse(value) {
|
|
19141
|
+
if (!("data" in value) || value["data"] === void 0)
|
|
19142
|
+
return false;
|
|
19143
|
+
if (!("params" in value) || value["params"] === void 0)
|
|
19144
|
+
return false;
|
|
19145
|
+
return true;
|
|
19146
|
+
}
|
|
19147
|
+
function CreateComponentResponseFromJSON(json) {
|
|
19148
|
+
return CreateComponentResponseFromJSONTyped(json, false);
|
|
19149
|
+
}
|
|
19150
|
+
function CreateComponentResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
19151
|
+
if (json == null) {
|
|
19152
|
+
return json;
|
|
19153
|
+
}
|
|
19154
|
+
return {
|
|
19155
|
+
data: ComponentResponseDataFromJSON(json["data"]),
|
|
19156
|
+
params: json["params"]
|
|
19157
|
+
};
|
|
19158
|
+
}
|
|
19159
|
+
function CreateComponentResponseToJSON(value) {
|
|
19160
|
+
if (value == null) {
|
|
19161
|
+
return value;
|
|
19162
|
+
}
|
|
19163
|
+
return {
|
|
19164
|
+
data: ComponentResponseDataToJSON(value["data"]),
|
|
19165
|
+
params: value["params"]
|
|
19166
|
+
};
|
|
19167
|
+
}
|
|
19168
|
+
|
|
18997
19169
|
// src/api/models/CreateCrmDealLineItemAssociationRequestBody.ts
|
|
18998
19170
|
function instanceOfCreateCrmDealLineItemAssociationRequestBody(value) {
|
|
18999
19171
|
if (!("dealExternalId" in value) || value["dealExternalId"] === void 0)
|
|
@@ -21372,6 +21544,36 @@ function DeleteCompanyResponseToJSON(value) {
|
|
|
21372
21544
|
};
|
|
21373
21545
|
}
|
|
21374
21546
|
|
|
21547
|
+
// src/api/models/DeleteComponentResponse.ts
|
|
21548
|
+
function instanceOfDeleteComponentResponse(value) {
|
|
21549
|
+
if (!("data" in value) || value["data"] === void 0)
|
|
21550
|
+
return false;
|
|
21551
|
+
if (!("params" in value) || value["params"] === void 0)
|
|
21552
|
+
return false;
|
|
21553
|
+
return true;
|
|
21554
|
+
}
|
|
21555
|
+
function DeleteComponentResponseFromJSON(json) {
|
|
21556
|
+
return DeleteComponentResponseFromJSONTyped(json, false);
|
|
21557
|
+
}
|
|
21558
|
+
function DeleteComponentResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
21559
|
+
if (json == null) {
|
|
21560
|
+
return json;
|
|
21561
|
+
}
|
|
21562
|
+
return {
|
|
21563
|
+
data: DeleteResponseFromJSON(json["data"]),
|
|
21564
|
+
params: json["params"]
|
|
21565
|
+
};
|
|
21566
|
+
}
|
|
21567
|
+
function DeleteComponentResponseToJSON(value) {
|
|
21568
|
+
if (value == null) {
|
|
21569
|
+
return value;
|
|
21570
|
+
}
|
|
21571
|
+
return {
|
|
21572
|
+
data: DeleteResponseToJSON(value["data"]),
|
|
21573
|
+
params: value["params"]
|
|
21574
|
+
};
|
|
21575
|
+
}
|
|
21576
|
+
|
|
21375
21577
|
// src/api/models/DeleteEnvironmentResponse.ts
|
|
21376
21578
|
function instanceOfDeleteEnvironmentResponse(value) {
|
|
21377
21579
|
if (!("data" in value) || value["data"] === void 0)
|
|
@@ -22724,6 +22926,36 @@ function GetCompanyResponseToJSON(value) {
|
|
|
22724
22926
|
};
|
|
22725
22927
|
}
|
|
22726
22928
|
|
|
22929
|
+
// src/api/models/GetComponentResponse.ts
|
|
22930
|
+
function instanceOfGetComponentResponse(value) {
|
|
22931
|
+
if (!("data" in value) || value["data"] === void 0)
|
|
22932
|
+
return false;
|
|
22933
|
+
if (!("params" in value) || value["params"] === void 0)
|
|
22934
|
+
return false;
|
|
22935
|
+
return true;
|
|
22936
|
+
}
|
|
22937
|
+
function GetComponentResponseFromJSON(json) {
|
|
22938
|
+
return GetComponentResponseFromJSONTyped(json, false);
|
|
22939
|
+
}
|
|
22940
|
+
function GetComponentResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
22941
|
+
if (json == null) {
|
|
22942
|
+
return json;
|
|
22943
|
+
}
|
|
22944
|
+
return {
|
|
22945
|
+
data: ComponentResponseDataFromJSON(json["data"]),
|
|
22946
|
+
params: json["params"]
|
|
22947
|
+
};
|
|
22948
|
+
}
|
|
22949
|
+
function GetComponentResponseToJSON(value) {
|
|
22950
|
+
if (value == null) {
|
|
22951
|
+
return value;
|
|
22952
|
+
}
|
|
22953
|
+
return {
|
|
22954
|
+
data: ComponentResponseDataToJSON(value["data"]),
|
|
22955
|
+
params: value["params"]
|
|
22956
|
+
};
|
|
22957
|
+
}
|
|
22958
|
+
|
|
22727
22959
|
// src/api/models/GetEntityTraitDefinitionResponse.ts
|
|
22728
22960
|
function instanceOfGetEntityTraitDefinitionResponse(value) {
|
|
22729
22961
|
if (!("data" in value) || value["data"] === void 0)
|
|
@@ -23994,6 +24226,64 @@ function ListCompanyPlansResponseToJSON(value) {
|
|
|
23994
24226
|
};
|
|
23995
24227
|
}
|
|
23996
24228
|
|
|
24229
|
+
// src/api/models/ListComponentsParams.ts
|
|
24230
|
+
function instanceOfListComponentsParams(value) {
|
|
24231
|
+
return true;
|
|
24232
|
+
}
|
|
24233
|
+
function ListComponentsParamsFromJSON(json) {
|
|
24234
|
+
return ListComponentsParamsFromJSONTyped(json, false);
|
|
24235
|
+
}
|
|
24236
|
+
function ListComponentsParamsFromJSONTyped(json, ignoreDiscriminator) {
|
|
24237
|
+
if (json == null) {
|
|
24238
|
+
return json;
|
|
24239
|
+
}
|
|
24240
|
+
return {
|
|
24241
|
+
limit: json["limit"] == null ? void 0 : json["limit"],
|
|
24242
|
+
offset: json["offset"] == null ? void 0 : json["offset"],
|
|
24243
|
+
q: json["q"] == null ? void 0 : json["q"]
|
|
24244
|
+
};
|
|
24245
|
+
}
|
|
24246
|
+
function ListComponentsParamsToJSON(value) {
|
|
24247
|
+
if (value == null) {
|
|
24248
|
+
return value;
|
|
24249
|
+
}
|
|
24250
|
+
return {
|
|
24251
|
+
limit: value["limit"],
|
|
24252
|
+
offset: value["offset"],
|
|
24253
|
+
q: value["q"]
|
|
24254
|
+
};
|
|
24255
|
+
}
|
|
24256
|
+
|
|
24257
|
+
// src/api/models/ListComponentsResponse.ts
|
|
24258
|
+
function instanceOfListComponentsResponse(value) {
|
|
24259
|
+
if (!("data" in value) || value["data"] === void 0)
|
|
24260
|
+
return false;
|
|
24261
|
+
if (!("params" in value) || value["params"] === void 0)
|
|
24262
|
+
return false;
|
|
24263
|
+
return true;
|
|
24264
|
+
}
|
|
24265
|
+
function ListComponentsResponseFromJSON(json) {
|
|
24266
|
+
return ListComponentsResponseFromJSONTyped(json, false);
|
|
24267
|
+
}
|
|
24268
|
+
function ListComponentsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
24269
|
+
if (json == null) {
|
|
24270
|
+
return json;
|
|
24271
|
+
}
|
|
24272
|
+
return {
|
|
24273
|
+
data: json["data"].map(ComponentResponseDataFromJSON),
|
|
24274
|
+
params: ListComponentsParamsFromJSON(json["params"])
|
|
24275
|
+
};
|
|
24276
|
+
}
|
|
24277
|
+
function ListComponentsResponseToJSON(value) {
|
|
24278
|
+
if (value == null) {
|
|
24279
|
+
return value;
|
|
24280
|
+
}
|
|
24281
|
+
return {
|
|
24282
|
+
data: value["data"].map(ComponentResponseDataToJSON),
|
|
24283
|
+
params: ListComponentsParamsToJSON(value["params"])
|
|
24284
|
+
};
|
|
24285
|
+
}
|
|
24286
|
+
|
|
23997
24287
|
// src/api/models/ListCrmProductsParams.ts
|
|
23998
24288
|
function instanceOfListCrmProductsParams(value) {
|
|
23999
24289
|
return true;
|
|
@@ -25749,6 +26039,68 @@ function UpdateCompanyOverrideResponseToJSON(value) {
|
|
|
25749
26039
|
};
|
|
25750
26040
|
}
|
|
25751
26041
|
|
|
26042
|
+
// src/api/models/UpdateComponentRequestBody.ts
|
|
26043
|
+
var UpdateComponentRequestBodyEntityTypeEnum = {
|
|
26044
|
+
Entitlement: "entitlement",
|
|
26045
|
+
Billing: "billing"
|
|
26046
|
+
};
|
|
26047
|
+
function instanceOfUpdateComponentRequestBody(value) {
|
|
26048
|
+
return true;
|
|
26049
|
+
}
|
|
26050
|
+
function UpdateComponentRequestBodyFromJSON(json) {
|
|
26051
|
+
return UpdateComponentRequestBodyFromJSONTyped(json, false);
|
|
26052
|
+
}
|
|
26053
|
+
function UpdateComponentRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
26054
|
+
if (json == null) {
|
|
26055
|
+
return json;
|
|
26056
|
+
}
|
|
26057
|
+
return {
|
|
26058
|
+
ast: json["ast"] == null ? void 0 : json["ast"],
|
|
26059
|
+
entityType: json["entity_type"] == null ? void 0 : json["entity_type"],
|
|
26060
|
+
name: json["name"] == null ? void 0 : json["name"]
|
|
26061
|
+
};
|
|
26062
|
+
}
|
|
26063
|
+
function UpdateComponentRequestBodyToJSON(value) {
|
|
26064
|
+
if (value == null) {
|
|
26065
|
+
return value;
|
|
26066
|
+
}
|
|
26067
|
+
return {
|
|
26068
|
+
ast: value["ast"],
|
|
26069
|
+
entity_type: value["entityType"],
|
|
26070
|
+
name: value["name"]
|
|
26071
|
+
};
|
|
26072
|
+
}
|
|
26073
|
+
|
|
26074
|
+
// src/api/models/UpdateComponentResponse.ts
|
|
26075
|
+
function instanceOfUpdateComponentResponse(value) {
|
|
26076
|
+
if (!("data" in value) || value["data"] === void 0)
|
|
26077
|
+
return false;
|
|
26078
|
+
if (!("params" in value) || value["params"] === void 0)
|
|
26079
|
+
return false;
|
|
26080
|
+
return true;
|
|
26081
|
+
}
|
|
26082
|
+
function UpdateComponentResponseFromJSON(json) {
|
|
26083
|
+
return UpdateComponentResponseFromJSONTyped(json, false);
|
|
26084
|
+
}
|
|
26085
|
+
function UpdateComponentResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
26086
|
+
if (json == null) {
|
|
26087
|
+
return json;
|
|
26088
|
+
}
|
|
26089
|
+
return {
|
|
26090
|
+
data: ComponentResponseDataFromJSON(json["data"]),
|
|
26091
|
+
params: json["params"]
|
|
26092
|
+
};
|
|
26093
|
+
}
|
|
26094
|
+
function UpdateComponentResponseToJSON(value) {
|
|
26095
|
+
if (value == null) {
|
|
26096
|
+
return value;
|
|
26097
|
+
}
|
|
26098
|
+
return {
|
|
26099
|
+
data: ComponentResponseDataToJSON(value["data"]),
|
|
26100
|
+
params: value["params"]
|
|
26101
|
+
};
|
|
26102
|
+
}
|
|
26103
|
+
|
|
25752
26104
|
// src/api/models/UpdateEntityTraitDefinitionRequestBody.ts
|
|
25753
26105
|
var UpdateEntityTraitDefinitionRequestBodyTraitTypeEnum = {
|
|
25754
26106
|
Boolean: "boolean",
|
|
@@ -29223,6 +29575,285 @@ var ListEntityTraitDefinitionsTraitTypeEnum = {
|
|
|
29223
29575
|
Url: "url"
|
|
29224
29576
|
};
|
|
29225
29577
|
|
|
29578
|
+
// src/api/apis/ComponentsApi.ts
|
|
29579
|
+
var ComponentsApi = class extends BaseAPI {
|
|
29580
|
+
/**
|
|
29581
|
+
* Count components
|
|
29582
|
+
*/
|
|
29583
|
+
async countComponentsRaw(requestParameters, initOverrides) {
|
|
29584
|
+
const queryParameters = {};
|
|
29585
|
+
if (requestParameters["q"] != null) {
|
|
29586
|
+
queryParameters["q"] = requestParameters["q"];
|
|
29587
|
+
}
|
|
29588
|
+
if (requestParameters["limit"] != null) {
|
|
29589
|
+
queryParameters["limit"] = requestParameters["limit"];
|
|
29590
|
+
}
|
|
29591
|
+
if (requestParameters["offset"] != null) {
|
|
29592
|
+
queryParameters["offset"] = requestParameters["offset"];
|
|
29593
|
+
}
|
|
29594
|
+
const headerParameters = {};
|
|
29595
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
29596
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
29597
|
+
"X-Schematic-Api-Key"
|
|
29598
|
+
);
|
|
29599
|
+
}
|
|
29600
|
+
const response = await this.request(
|
|
29601
|
+
{
|
|
29602
|
+
path: `/components/count`,
|
|
29603
|
+
method: "GET",
|
|
29604
|
+
headers: headerParameters,
|
|
29605
|
+
query: queryParameters
|
|
29606
|
+
},
|
|
29607
|
+
initOverrides
|
|
29608
|
+
);
|
|
29609
|
+
return new JSONApiResponse(
|
|
29610
|
+
response,
|
|
29611
|
+
(jsonValue) => CountComponentsResponseFromJSON(jsonValue)
|
|
29612
|
+
);
|
|
29613
|
+
}
|
|
29614
|
+
/**
|
|
29615
|
+
* Count components
|
|
29616
|
+
*/
|
|
29617
|
+
async countComponents(requestParameters = {}, initOverrides) {
|
|
29618
|
+
const response = await this.countComponentsRaw(
|
|
29619
|
+
requestParameters,
|
|
29620
|
+
initOverrides
|
|
29621
|
+
);
|
|
29622
|
+
return await response.value();
|
|
29623
|
+
}
|
|
29624
|
+
/**
|
|
29625
|
+
* Create component
|
|
29626
|
+
*/
|
|
29627
|
+
async createComponentRaw(requestParameters, initOverrides) {
|
|
29628
|
+
if (requestParameters["createComponentRequestBody"] == null) {
|
|
29629
|
+
throw new RequiredError(
|
|
29630
|
+
"createComponentRequestBody",
|
|
29631
|
+
'Required parameter "createComponentRequestBody" was null or undefined when calling createComponent().'
|
|
29632
|
+
);
|
|
29633
|
+
}
|
|
29634
|
+
const queryParameters = {};
|
|
29635
|
+
const headerParameters = {};
|
|
29636
|
+
headerParameters["Content-Type"] = "application/json";
|
|
29637
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
29638
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
29639
|
+
"X-Schematic-Api-Key"
|
|
29640
|
+
);
|
|
29641
|
+
}
|
|
29642
|
+
const response = await this.request(
|
|
29643
|
+
{
|
|
29644
|
+
path: `/components`,
|
|
29645
|
+
method: "POST",
|
|
29646
|
+
headers: headerParameters,
|
|
29647
|
+
query: queryParameters,
|
|
29648
|
+
body: CreateComponentRequestBodyToJSON(
|
|
29649
|
+
requestParameters["createComponentRequestBody"]
|
|
29650
|
+
)
|
|
29651
|
+
},
|
|
29652
|
+
initOverrides
|
|
29653
|
+
);
|
|
29654
|
+
return new JSONApiResponse(
|
|
29655
|
+
response,
|
|
29656
|
+
(jsonValue) => CreateComponentResponseFromJSON(jsonValue)
|
|
29657
|
+
);
|
|
29658
|
+
}
|
|
29659
|
+
/**
|
|
29660
|
+
* Create component
|
|
29661
|
+
*/
|
|
29662
|
+
async createComponent(requestParameters, initOverrides) {
|
|
29663
|
+
const response = await this.createComponentRaw(
|
|
29664
|
+
requestParameters,
|
|
29665
|
+
initOverrides
|
|
29666
|
+
);
|
|
29667
|
+
return await response.value();
|
|
29668
|
+
}
|
|
29669
|
+
/**
|
|
29670
|
+
* Delete component
|
|
29671
|
+
*/
|
|
29672
|
+
async deleteComponentRaw(requestParameters, initOverrides) {
|
|
29673
|
+
if (requestParameters["componentId"] == null) {
|
|
29674
|
+
throw new RequiredError(
|
|
29675
|
+
"componentId",
|
|
29676
|
+
'Required parameter "componentId" was null or undefined when calling deleteComponent().'
|
|
29677
|
+
);
|
|
29678
|
+
}
|
|
29679
|
+
const queryParameters = {};
|
|
29680
|
+
const headerParameters = {};
|
|
29681
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
29682
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
29683
|
+
"X-Schematic-Api-Key"
|
|
29684
|
+
);
|
|
29685
|
+
}
|
|
29686
|
+
const response = await this.request(
|
|
29687
|
+
{
|
|
29688
|
+
path: `/components/{component_id}`.replace(
|
|
29689
|
+
`{${"component_id"}}`,
|
|
29690
|
+
encodeURIComponent(String(requestParameters["componentId"]))
|
|
29691
|
+
),
|
|
29692
|
+
method: "DELETE",
|
|
29693
|
+
headers: headerParameters,
|
|
29694
|
+
query: queryParameters
|
|
29695
|
+
},
|
|
29696
|
+
initOverrides
|
|
29697
|
+
);
|
|
29698
|
+
return new JSONApiResponse(
|
|
29699
|
+
response,
|
|
29700
|
+
(jsonValue) => DeleteComponentResponseFromJSON(jsonValue)
|
|
29701
|
+
);
|
|
29702
|
+
}
|
|
29703
|
+
/**
|
|
29704
|
+
* Delete component
|
|
29705
|
+
*/
|
|
29706
|
+
async deleteComponent(requestParameters, initOverrides) {
|
|
29707
|
+
const response = await this.deleteComponentRaw(
|
|
29708
|
+
requestParameters,
|
|
29709
|
+
initOverrides
|
|
29710
|
+
);
|
|
29711
|
+
return await response.value();
|
|
29712
|
+
}
|
|
29713
|
+
/**
|
|
29714
|
+
* Get component
|
|
29715
|
+
*/
|
|
29716
|
+
async getComponentRaw(requestParameters, initOverrides) {
|
|
29717
|
+
if (requestParameters["componentId"] == null) {
|
|
29718
|
+
throw new RequiredError(
|
|
29719
|
+
"componentId",
|
|
29720
|
+
'Required parameter "componentId" was null or undefined when calling getComponent().'
|
|
29721
|
+
);
|
|
29722
|
+
}
|
|
29723
|
+
const queryParameters = {};
|
|
29724
|
+
const headerParameters = {};
|
|
29725
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
29726
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
29727
|
+
"X-Schematic-Api-Key"
|
|
29728
|
+
);
|
|
29729
|
+
}
|
|
29730
|
+
const response = await this.request(
|
|
29731
|
+
{
|
|
29732
|
+
path: `/components/{component_id}`.replace(
|
|
29733
|
+
`{${"component_id"}}`,
|
|
29734
|
+
encodeURIComponent(String(requestParameters["componentId"]))
|
|
29735
|
+
),
|
|
29736
|
+
method: "GET",
|
|
29737
|
+
headers: headerParameters,
|
|
29738
|
+
query: queryParameters
|
|
29739
|
+
},
|
|
29740
|
+
initOverrides
|
|
29741
|
+
);
|
|
29742
|
+
return new JSONApiResponse(
|
|
29743
|
+
response,
|
|
29744
|
+
(jsonValue) => GetComponentResponseFromJSON(jsonValue)
|
|
29745
|
+
);
|
|
29746
|
+
}
|
|
29747
|
+
/**
|
|
29748
|
+
* Get component
|
|
29749
|
+
*/
|
|
29750
|
+
async getComponent(requestParameters, initOverrides) {
|
|
29751
|
+
const response = await this.getComponentRaw(
|
|
29752
|
+
requestParameters,
|
|
29753
|
+
initOverrides
|
|
29754
|
+
);
|
|
29755
|
+
return await response.value();
|
|
29756
|
+
}
|
|
29757
|
+
/**
|
|
29758
|
+
* List components
|
|
29759
|
+
*/
|
|
29760
|
+
async listComponentsRaw(requestParameters, initOverrides) {
|
|
29761
|
+
const queryParameters = {};
|
|
29762
|
+
if (requestParameters["q"] != null) {
|
|
29763
|
+
queryParameters["q"] = requestParameters["q"];
|
|
29764
|
+
}
|
|
29765
|
+
if (requestParameters["limit"] != null) {
|
|
29766
|
+
queryParameters["limit"] = requestParameters["limit"];
|
|
29767
|
+
}
|
|
29768
|
+
if (requestParameters["offset"] != null) {
|
|
29769
|
+
queryParameters["offset"] = requestParameters["offset"];
|
|
29770
|
+
}
|
|
29771
|
+
const headerParameters = {};
|
|
29772
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
29773
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
29774
|
+
"X-Schematic-Api-Key"
|
|
29775
|
+
);
|
|
29776
|
+
}
|
|
29777
|
+
const response = await this.request(
|
|
29778
|
+
{
|
|
29779
|
+
path: `/components`,
|
|
29780
|
+
method: "GET",
|
|
29781
|
+
headers: headerParameters,
|
|
29782
|
+
query: queryParameters
|
|
29783
|
+
},
|
|
29784
|
+
initOverrides
|
|
29785
|
+
);
|
|
29786
|
+
return new JSONApiResponse(
|
|
29787
|
+
response,
|
|
29788
|
+
(jsonValue) => ListComponentsResponseFromJSON(jsonValue)
|
|
29789
|
+
);
|
|
29790
|
+
}
|
|
29791
|
+
/**
|
|
29792
|
+
* List components
|
|
29793
|
+
*/
|
|
29794
|
+
async listComponents(requestParameters = {}, initOverrides) {
|
|
29795
|
+
const response = await this.listComponentsRaw(
|
|
29796
|
+
requestParameters,
|
|
29797
|
+
initOverrides
|
|
29798
|
+
);
|
|
29799
|
+
return await response.value();
|
|
29800
|
+
}
|
|
29801
|
+
/**
|
|
29802
|
+
* Update component
|
|
29803
|
+
*/
|
|
29804
|
+
async updateComponentRaw(requestParameters, initOverrides) {
|
|
29805
|
+
if (requestParameters["updateComponentRequestBody"] == null) {
|
|
29806
|
+
throw new RequiredError(
|
|
29807
|
+
"updateComponentRequestBody",
|
|
29808
|
+
'Required parameter "updateComponentRequestBody" was null or undefined when calling updateComponent().'
|
|
29809
|
+
);
|
|
29810
|
+
}
|
|
29811
|
+
if (requestParameters["componentId"] == null) {
|
|
29812
|
+
throw new RequiredError(
|
|
29813
|
+
"componentId",
|
|
29814
|
+
'Required parameter "componentId" was null or undefined when calling updateComponent().'
|
|
29815
|
+
);
|
|
29816
|
+
}
|
|
29817
|
+
const queryParameters = {};
|
|
29818
|
+
const headerParameters = {};
|
|
29819
|
+
headerParameters["Content-Type"] = "application/json";
|
|
29820
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
29821
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
29822
|
+
"X-Schematic-Api-Key"
|
|
29823
|
+
);
|
|
29824
|
+
}
|
|
29825
|
+
const response = await this.request(
|
|
29826
|
+
{
|
|
29827
|
+
path: `/components/{component_id}`.replace(
|
|
29828
|
+
`{${"component_id"}}`,
|
|
29829
|
+
encodeURIComponent(String(requestParameters["componentId"]))
|
|
29830
|
+
),
|
|
29831
|
+
method: "PUT",
|
|
29832
|
+
headers: headerParameters,
|
|
29833
|
+
query: queryParameters,
|
|
29834
|
+
body: UpdateComponentRequestBodyToJSON(
|
|
29835
|
+
requestParameters["updateComponentRequestBody"]
|
|
29836
|
+
)
|
|
29837
|
+
},
|
|
29838
|
+
initOverrides
|
|
29839
|
+
);
|
|
29840
|
+
return new JSONApiResponse(
|
|
29841
|
+
response,
|
|
29842
|
+
(jsonValue) => UpdateComponentResponseFromJSON(jsonValue)
|
|
29843
|
+
);
|
|
29844
|
+
}
|
|
29845
|
+
/**
|
|
29846
|
+
* Update component
|
|
29847
|
+
*/
|
|
29848
|
+
async updateComponent(requestParameters, initOverrides) {
|
|
29849
|
+
const response = await this.updateComponentRaw(
|
|
29850
|
+
requestParameters,
|
|
29851
|
+
initOverrides
|
|
29852
|
+
);
|
|
29853
|
+
return await response.value();
|
|
29854
|
+
}
|
|
29855
|
+
};
|
|
29856
|
+
|
|
29226
29857
|
// src/api/apis/CrmApi.ts
|
|
29227
29858
|
var CrmApi = class extends BaseAPI {
|
|
29228
29859
|
/**
|
|
@@ -32912,7 +33543,7 @@ var Schematic = class {
|
|
|
32912
33543
|
constructor(apiKey, opts) {
|
|
32913
33544
|
const { offline = false } = opts ?? {};
|
|
32914
33545
|
const { basePath, flagDefaults = {} } = opts ?? {};
|
|
32915
|
-
const version = "1.0.
|
|
33546
|
+
const version = "1.0.15";
|
|
32916
33547
|
const headers = {
|
|
32917
33548
|
"User-Agent": `schematic-typescript-node@v${version}`
|
|
32918
33549
|
};
|
|
@@ -33102,6 +33733,10 @@ export {
|
|
|
33102
33733
|
CompanySubscriptionResponseDataFromJSON,
|
|
33103
33734
|
CompanySubscriptionResponseDataFromJSONTyped,
|
|
33104
33735
|
CompanySubscriptionResponseDataToJSON,
|
|
33736
|
+
ComponentResponseDataFromJSON,
|
|
33737
|
+
ComponentResponseDataFromJSONTyped,
|
|
33738
|
+
ComponentResponseDataToJSON,
|
|
33739
|
+
ComponentsApi,
|
|
33105
33740
|
Configuration,
|
|
33106
33741
|
CountApiKeysParamsFromJSON,
|
|
33107
33742
|
CountApiKeysParamsFromJSONTyped,
|
|
@@ -33133,6 +33768,12 @@ export {
|
|
|
33133
33768
|
CountCompanyOverridesResponseFromJSON,
|
|
33134
33769
|
CountCompanyOverridesResponseFromJSONTyped,
|
|
33135
33770
|
CountCompanyOverridesResponseToJSON,
|
|
33771
|
+
CountComponentsParamsFromJSON,
|
|
33772
|
+
CountComponentsParamsFromJSONTyped,
|
|
33773
|
+
CountComponentsParamsToJSON,
|
|
33774
|
+
CountComponentsResponseFromJSON,
|
|
33775
|
+
CountComponentsResponseFromJSONTyped,
|
|
33776
|
+
CountComponentsResponseToJSON,
|
|
33136
33777
|
CountEntityKeyDefinitionsEntityTypeEnum,
|
|
33137
33778
|
CountEntityKeyDefinitionsParamsEntityTypeEnum,
|
|
33138
33779
|
CountEntityKeyDefinitionsParamsFromJSON,
|
|
@@ -33243,6 +33884,13 @@ export {
|
|
|
33243
33884
|
CreateCompanyResponseFromJSON,
|
|
33244
33885
|
CreateCompanyResponseFromJSONTyped,
|
|
33245
33886
|
CreateCompanyResponseToJSON,
|
|
33887
|
+
CreateComponentRequestBodyEntityTypeEnum,
|
|
33888
|
+
CreateComponentRequestBodyFromJSON,
|
|
33889
|
+
CreateComponentRequestBodyFromJSONTyped,
|
|
33890
|
+
CreateComponentRequestBodyToJSON,
|
|
33891
|
+
CreateComponentResponseFromJSON,
|
|
33892
|
+
CreateComponentResponseFromJSONTyped,
|
|
33893
|
+
CreateComponentResponseToJSON,
|
|
33246
33894
|
CreateCrmDealLineItemAssociationRequestBodyFromJSON,
|
|
33247
33895
|
CreateCrmDealLineItemAssociationRequestBodyFromJSONTyped,
|
|
33248
33896
|
CreateCrmDealLineItemAssociationRequestBodyToJSON,
|
|
@@ -33371,6 +34019,9 @@ export {
|
|
|
33371
34019
|
DeleteCompanyResponseFromJSON,
|
|
33372
34020
|
DeleteCompanyResponseFromJSONTyped,
|
|
33373
34021
|
DeleteCompanyResponseToJSON,
|
|
34022
|
+
DeleteComponentResponseFromJSON,
|
|
34023
|
+
DeleteComponentResponseFromJSONTyped,
|
|
34024
|
+
DeleteComponentResponseToJSON,
|
|
33374
34025
|
DeleteEnvironmentResponseFromJSON,
|
|
33375
34026
|
DeleteEnvironmentResponseFromJSONTyped,
|
|
33376
34027
|
DeleteEnvironmentResponseToJSON,
|
|
@@ -33510,6 +34161,9 @@ export {
|
|
|
33510
34161
|
GetCompanyResponseFromJSON,
|
|
33511
34162
|
GetCompanyResponseFromJSONTyped,
|
|
33512
34163
|
GetCompanyResponseToJSON,
|
|
34164
|
+
GetComponentResponseFromJSON,
|
|
34165
|
+
GetComponentResponseFromJSONTyped,
|
|
34166
|
+
GetComponentResponseToJSON,
|
|
33513
34167
|
GetEntityTraitDefinitionResponseFromJSON,
|
|
33514
34168
|
GetEntityTraitDefinitionResponseFromJSONTyped,
|
|
33515
34169
|
GetEntityTraitDefinitionResponseToJSON,
|
|
@@ -33628,6 +34282,12 @@ export {
|
|
|
33628
34282
|
ListCompanyPlansResponseFromJSON,
|
|
33629
34283
|
ListCompanyPlansResponseFromJSONTyped,
|
|
33630
34284
|
ListCompanyPlansResponseToJSON,
|
|
34285
|
+
ListComponentsParamsFromJSON,
|
|
34286
|
+
ListComponentsParamsFromJSONTyped,
|
|
34287
|
+
ListComponentsParamsToJSON,
|
|
34288
|
+
ListComponentsResponseFromJSON,
|
|
34289
|
+
ListComponentsResponseFromJSONTyped,
|
|
34290
|
+
ListComponentsResponseToJSON,
|
|
33631
34291
|
ListCrmProductsParamsFromJSON,
|
|
33632
34292
|
ListCrmProductsParamsFromJSONTyped,
|
|
33633
34293
|
ListCrmProductsParamsToJSON,
|
|
@@ -33837,6 +34497,13 @@ export {
|
|
|
33837
34497
|
UpdateCompanyOverrideResponseFromJSON,
|
|
33838
34498
|
UpdateCompanyOverrideResponseFromJSONTyped,
|
|
33839
34499
|
UpdateCompanyOverrideResponseToJSON,
|
|
34500
|
+
UpdateComponentRequestBodyEntityTypeEnum,
|
|
34501
|
+
UpdateComponentRequestBodyFromJSON,
|
|
34502
|
+
UpdateComponentRequestBodyFromJSONTyped,
|
|
34503
|
+
UpdateComponentRequestBodyToJSON,
|
|
34504
|
+
UpdateComponentResponseFromJSON,
|
|
34505
|
+
UpdateComponentResponseFromJSONTyped,
|
|
34506
|
+
UpdateComponentResponseToJSON,
|
|
33840
34507
|
UpdateEntityTraitDefinitionRequestBodyFromJSON,
|
|
33841
34508
|
UpdateEntityTraitDefinitionRequestBodyFromJSONTyped,
|
|
33842
34509
|
UpdateEntityTraitDefinitionRequestBodyToJSON,
|
|
@@ -33981,6 +34648,7 @@ export {
|
|
|
33981
34648
|
instanceOfCompanyPlanResponseData,
|
|
33982
34649
|
instanceOfCompanyResponseData,
|
|
33983
34650
|
instanceOfCompanySubscriptionResponseData,
|
|
34651
|
+
instanceOfComponentResponseData,
|
|
33984
34652
|
instanceOfCountApiKeysParams,
|
|
33985
34653
|
instanceOfCountApiKeysResponse,
|
|
33986
34654
|
instanceOfCountApiRequestsParams,
|
|
@@ -33991,6 +34659,8 @@ export {
|
|
|
33991
34659
|
instanceOfCountCompaniesResponse,
|
|
33992
34660
|
instanceOfCountCompanyOverridesParams,
|
|
33993
34661
|
instanceOfCountCompanyOverridesResponse,
|
|
34662
|
+
instanceOfCountComponentsParams,
|
|
34663
|
+
instanceOfCountComponentsResponse,
|
|
33994
34664
|
instanceOfCountEntityKeyDefinitionsParams,
|
|
33995
34665
|
instanceOfCountEntityKeyDefinitionsResponse,
|
|
33996
34666
|
instanceOfCountEntityTraitDefinitionsParams,
|
|
@@ -34025,6 +34695,8 @@ export {
|
|
|
34025
34695
|
instanceOfCreateCompanyOverrideRequestBody,
|
|
34026
34696
|
instanceOfCreateCompanyOverrideResponse,
|
|
34027
34697
|
instanceOfCreateCompanyResponse,
|
|
34698
|
+
instanceOfCreateComponentRequestBody,
|
|
34699
|
+
instanceOfCreateComponentResponse,
|
|
34028
34700
|
instanceOfCreateCrmDealLineItemAssociationRequestBody,
|
|
34029
34701
|
instanceOfCreateCrmDealRequestBody,
|
|
34030
34702
|
instanceOfCreateCrmLineItemRequestBody,
|
|
@@ -34062,6 +34734,7 @@ export {
|
|
|
34062
34734
|
instanceOfDeleteCompanyMembershipResponse,
|
|
34063
34735
|
instanceOfDeleteCompanyOverrideResponse,
|
|
34064
34736
|
instanceOfDeleteCompanyResponse,
|
|
34737
|
+
instanceOfDeleteComponentResponse,
|
|
34065
34738
|
instanceOfDeleteEnvironmentResponse,
|
|
34066
34739
|
instanceOfDeleteFeatureResponse,
|
|
34067
34740
|
instanceOfDeleteFlagResponse,
|
|
@@ -34105,6 +34778,7 @@ export {
|
|
|
34105
34778
|
instanceOfGetAudienceResponse,
|
|
34106
34779
|
instanceOfGetCompanyOverrideResponse,
|
|
34107
34780
|
instanceOfGetCompanyResponse,
|
|
34781
|
+
instanceOfGetComponentResponse,
|
|
34108
34782
|
instanceOfGetEntityTraitDefinitionResponse,
|
|
34109
34783
|
instanceOfGetEntityTraitValuesParams,
|
|
34110
34784
|
instanceOfGetEntityTraitValuesResponse,
|
|
@@ -34144,6 +34818,8 @@ export {
|
|
|
34144
34818
|
instanceOfListCompanyOverridesResponse,
|
|
34145
34819
|
instanceOfListCompanyPlansParams,
|
|
34146
34820
|
instanceOfListCompanyPlansResponse,
|
|
34821
|
+
instanceOfListComponentsParams,
|
|
34822
|
+
instanceOfListComponentsResponse,
|
|
34147
34823
|
instanceOfListCrmProductsParams,
|
|
34148
34824
|
instanceOfListCrmProductsResponse,
|
|
34149
34825
|
instanceOfListEntityKeyDefinitionsParams,
|
|
@@ -34209,6 +34885,8 @@ export {
|
|
|
34209
34885
|
instanceOfUpdateAudienceResponse,
|
|
34210
34886
|
instanceOfUpdateCompanyOverrideRequestBody,
|
|
34211
34887
|
instanceOfUpdateCompanyOverrideResponse,
|
|
34888
|
+
instanceOfUpdateComponentRequestBody,
|
|
34889
|
+
instanceOfUpdateComponentResponse,
|
|
34212
34890
|
instanceOfUpdateEntityTraitDefinitionRequestBody,
|
|
34213
34891
|
instanceOfUpdateEntityTraitDefinitionResponse,
|
|
34214
34892
|
instanceOfUpdateEnvironmentRequestBody,
|