@schematichq/schematic-typescript-node 1.0.14 → 1.0.16

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.
@@ -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
  /**
@@ -32898,6 +33529,7 @@ var Schematic = class {
32898
33529
  Accounts;
32899
33530
  Billing;
32900
33531
  Companies;
33532
+ Components;
32901
33533
  Crm;
32902
33534
  Entitlements;
32903
33535
  Events;
@@ -32912,7 +33544,7 @@ var Schematic = class {
32912
33544
  constructor(apiKey, opts) {
32913
33545
  const { offline = false } = opts ?? {};
32914
33546
  const { basePath, flagDefaults = {} } = opts ?? {};
32915
- const version = "1.0.14";
33547
+ const version = "1.0.16";
32916
33548
  const headers = {
32917
33549
  "User-Agent": `schematic-typescript-node@v${version}`
32918
33550
  };
@@ -32948,6 +33580,7 @@ var Schematic = class {
32948
33580
  this.Accounts = new AccountsApi(config);
32949
33581
  this.Billing = new BillingApi(config);
32950
33582
  this.Companies = new CompaniesApi(config);
33583
+ this.Components = new ComponentsApi(config);
32951
33584
  this.Crm = new CrmApi(config);
32952
33585
  this.Entitlements = new EntitlementsApi(config);
32953
33586
  this.Events = new EventsApi(config);
@@ -33102,6 +33735,10 @@ export {
33102
33735
  CompanySubscriptionResponseDataFromJSON,
33103
33736
  CompanySubscriptionResponseDataFromJSONTyped,
33104
33737
  CompanySubscriptionResponseDataToJSON,
33738
+ ComponentResponseDataFromJSON,
33739
+ ComponentResponseDataFromJSONTyped,
33740
+ ComponentResponseDataToJSON,
33741
+ ComponentsApi,
33105
33742
  Configuration,
33106
33743
  CountApiKeysParamsFromJSON,
33107
33744
  CountApiKeysParamsFromJSONTyped,
@@ -33133,6 +33770,12 @@ export {
33133
33770
  CountCompanyOverridesResponseFromJSON,
33134
33771
  CountCompanyOverridesResponseFromJSONTyped,
33135
33772
  CountCompanyOverridesResponseToJSON,
33773
+ CountComponentsParamsFromJSON,
33774
+ CountComponentsParamsFromJSONTyped,
33775
+ CountComponentsParamsToJSON,
33776
+ CountComponentsResponseFromJSON,
33777
+ CountComponentsResponseFromJSONTyped,
33778
+ CountComponentsResponseToJSON,
33136
33779
  CountEntityKeyDefinitionsEntityTypeEnum,
33137
33780
  CountEntityKeyDefinitionsParamsEntityTypeEnum,
33138
33781
  CountEntityKeyDefinitionsParamsFromJSON,
@@ -33243,6 +33886,13 @@ export {
33243
33886
  CreateCompanyResponseFromJSON,
33244
33887
  CreateCompanyResponseFromJSONTyped,
33245
33888
  CreateCompanyResponseToJSON,
33889
+ CreateComponentRequestBodyEntityTypeEnum,
33890
+ CreateComponentRequestBodyFromJSON,
33891
+ CreateComponentRequestBodyFromJSONTyped,
33892
+ CreateComponentRequestBodyToJSON,
33893
+ CreateComponentResponseFromJSON,
33894
+ CreateComponentResponseFromJSONTyped,
33895
+ CreateComponentResponseToJSON,
33246
33896
  CreateCrmDealLineItemAssociationRequestBodyFromJSON,
33247
33897
  CreateCrmDealLineItemAssociationRequestBodyFromJSONTyped,
33248
33898
  CreateCrmDealLineItemAssociationRequestBodyToJSON,
@@ -33371,6 +34021,9 @@ export {
33371
34021
  DeleteCompanyResponseFromJSON,
33372
34022
  DeleteCompanyResponseFromJSONTyped,
33373
34023
  DeleteCompanyResponseToJSON,
34024
+ DeleteComponentResponseFromJSON,
34025
+ DeleteComponentResponseFromJSONTyped,
34026
+ DeleteComponentResponseToJSON,
33374
34027
  DeleteEnvironmentResponseFromJSON,
33375
34028
  DeleteEnvironmentResponseFromJSONTyped,
33376
34029
  DeleteEnvironmentResponseToJSON,
@@ -33510,6 +34163,9 @@ export {
33510
34163
  GetCompanyResponseFromJSON,
33511
34164
  GetCompanyResponseFromJSONTyped,
33512
34165
  GetCompanyResponseToJSON,
34166
+ GetComponentResponseFromJSON,
34167
+ GetComponentResponseFromJSONTyped,
34168
+ GetComponentResponseToJSON,
33513
34169
  GetEntityTraitDefinitionResponseFromJSON,
33514
34170
  GetEntityTraitDefinitionResponseFromJSONTyped,
33515
34171
  GetEntityTraitDefinitionResponseToJSON,
@@ -33628,6 +34284,12 @@ export {
33628
34284
  ListCompanyPlansResponseFromJSON,
33629
34285
  ListCompanyPlansResponseFromJSONTyped,
33630
34286
  ListCompanyPlansResponseToJSON,
34287
+ ListComponentsParamsFromJSON,
34288
+ ListComponentsParamsFromJSONTyped,
34289
+ ListComponentsParamsToJSON,
34290
+ ListComponentsResponseFromJSON,
34291
+ ListComponentsResponseFromJSONTyped,
34292
+ ListComponentsResponseToJSON,
33631
34293
  ListCrmProductsParamsFromJSON,
33632
34294
  ListCrmProductsParamsFromJSONTyped,
33633
34295
  ListCrmProductsParamsToJSON,
@@ -33837,6 +34499,13 @@ export {
33837
34499
  UpdateCompanyOverrideResponseFromJSON,
33838
34500
  UpdateCompanyOverrideResponseFromJSONTyped,
33839
34501
  UpdateCompanyOverrideResponseToJSON,
34502
+ UpdateComponentRequestBodyEntityTypeEnum,
34503
+ UpdateComponentRequestBodyFromJSON,
34504
+ UpdateComponentRequestBodyFromJSONTyped,
34505
+ UpdateComponentRequestBodyToJSON,
34506
+ UpdateComponentResponseFromJSON,
34507
+ UpdateComponentResponseFromJSONTyped,
34508
+ UpdateComponentResponseToJSON,
33840
34509
  UpdateEntityTraitDefinitionRequestBodyFromJSON,
33841
34510
  UpdateEntityTraitDefinitionRequestBodyFromJSONTyped,
33842
34511
  UpdateEntityTraitDefinitionRequestBodyToJSON,
@@ -33981,6 +34650,7 @@ export {
33981
34650
  instanceOfCompanyPlanResponseData,
33982
34651
  instanceOfCompanyResponseData,
33983
34652
  instanceOfCompanySubscriptionResponseData,
34653
+ instanceOfComponentResponseData,
33984
34654
  instanceOfCountApiKeysParams,
33985
34655
  instanceOfCountApiKeysResponse,
33986
34656
  instanceOfCountApiRequestsParams,
@@ -33991,6 +34661,8 @@ export {
33991
34661
  instanceOfCountCompaniesResponse,
33992
34662
  instanceOfCountCompanyOverridesParams,
33993
34663
  instanceOfCountCompanyOverridesResponse,
34664
+ instanceOfCountComponentsParams,
34665
+ instanceOfCountComponentsResponse,
33994
34666
  instanceOfCountEntityKeyDefinitionsParams,
33995
34667
  instanceOfCountEntityKeyDefinitionsResponse,
33996
34668
  instanceOfCountEntityTraitDefinitionsParams,
@@ -34025,6 +34697,8 @@ export {
34025
34697
  instanceOfCreateCompanyOverrideRequestBody,
34026
34698
  instanceOfCreateCompanyOverrideResponse,
34027
34699
  instanceOfCreateCompanyResponse,
34700
+ instanceOfCreateComponentRequestBody,
34701
+ instanceOfCreateComponentResponse,
34028
34702
  instanceOfCreateCrmDealLineItemAssociationRequestBody,
34029
34703
  instanceOfCreateCrmDealRequestBody,
34030
34704
  instanceOfCreateCrmLineItemRequestBody,
@@ -34062,6 +34736,7 @@ export {
34062
34736
  instanceOfDeleteCompanyMembershipResponse,
34063
34737
  instanceOfDeleteCompanyOverrideResponse,
34064
34738
  instanceOfDeleteCompanyResponse,
34739
+ instanceOfDeleteComponentResponse,
34065
34740
  instanceOfDeleteEnvironmentResponse,
34066
34741
  instanceOfDeleteFeatureResponse,
34067
34742
  instanceOfDeleteFlagResponse,
@@ -34105,6 +34780,7 @@ export {
34105
34780
  instanceOfGetAudienceResponse,
34106
34781
  instanceOfGetCompanyOverrideResponse,
34107
34782
  instanceOfGetCompanyResponse,
34783
+ instanceOfGetComponentResponse,
34108
34784
  instanceOfGetEntityTraitDefinitionResponse,
34109
34785
  instanceOfGetEntityTraitValuesParams,
34110
34786
  instanceOfGetEntityTraitValuesResponse,
@@ -34144,6 +34820,8 @@ export {
34144
34820
  instanceOfListCompanyOverridesResponse,
34145
34821
  instanceOfListCompanyPlansParams,
34146
34822
  instanceOfListCompanyPlansResponse,
34823
+ instanceOfListComponentsParams,
34824
+ instanceOfListComponentsResponse,
34147
34825
  instanceOfListCrmProductsParams,
34148
34826
  instanceOfListCrmProductsResponse,
34149
34827
  instanceOfListEntityKeyDefinitionsParams,
@@ -34209,6 +34887,8 @@ export {
34209
34887
  instanceOfUpdateAudienceResponse,
34210
34888
  instanceOfUpdateCompanyOverrideRequestBody,
34211
34889
  instanceOfUpdateCompanyOverrideResponse,
34890
+ instanceOfUpdateComponentRequestBody,
34891
+ instanceOfUpdateComponentResponse,
34212
34892
  instanceOfUpdateEntityTraitDefinitionRequestBody,
34213
34893
  instanceOfUpdateEntityTraitDefinitionResponse,
34214
34894
  instanceOfUpdateEnvironmentRequestBody,