ultracart_rest_api_v2_typescript 4.1.157 → 4.1.158
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/.openapi-generator/FILES +4 -0
- package/README.md +3 -2
- package/dist/apis/SfvbApi.d.ts +57 -1
- package/dist/apis/SfvbApi.js +123 -0
- package/dist/models/SfvbSiteAttribute.d.ts +87 -0
- package/dist/models/SfvbSiteAttribute.js +81 -0
- package/dist/models/SfvbSiteAttributeUpdate.d.ts +56 -0
- package/dist/models/SfvbSiteAttributeUpdate.js +66 -0
- package/dist/models/SfvbSiteAttributeUpdateRequest.d.ts +32 -0
- package/dist/models/SfvbSiteAttributeUpdateRequest.js +51 -0
- package/dist/models/SfvbSiteAttributesResponse.d.ts +38 -0
- package/dist/models/SfvbSiteAttributesResponse.js +53 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/package.json +1 -1
- package/src/apis/SfvbApi.ts +137 -0
- package/src/models/SfvbSiteAttribute.ts +137 -0
- package/src/models/SfvbSiteAttributeUpdate.ts +98 -0
- package/src/models/SfvbSiteAttributeUpdateRequest.ts +74 -0
- package/src/models/SfvbSiteAttributesResponse.ts +82 -0
- package/src/models/index.ts +4 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -1032,6 +1032,10 @@ src/models/SfvbPreviewSessionResponse.ts
|
|
|
1032
1032
|
src/models/SfvbPreviewUrlResponse.ts
|
|
1033
1033
|
src/models/SfvbRenderRequest.ts
|
|
1034
1034
|
src/models/SfvbRenderResponse.ts
|
|
1035
|
+
src/models/SfvbSiteAttribute.ts
|
|
1036
|
+
src/models/SfvbSiteAttributeUpdate.ts
|
|
1037
|
+
src/models/SfvbSiteAttributeUpdateRequest.ts
|
|
1038
|
+
src/models/SfvbSiteAttributesResponse.ts
|
|
1035
1039
|
src/models/SfvbStorefront.ts
|
|
1036
1040
|
src/models/SfvbStorefrontsResponse.ts
|
|
1037
1041
|
src/models/SfvbTheme.ts
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# UltraCart Typescript SDK
|
|
2
|
-
## ultracart_rest_api_v2_typescript@4.1.
|
|
2
|
+
## ultracart_rest_api_v2_typescript@4.1.158
|
|
3
3
|
|
|
4
4
|
Every API method call has a sample for every language SDK. See https://github.com/UltraCart/sdk_samples
|
|
5
5
|
|
|
6
6
|
Installation
|
|
7
7
|
|
|
8
8
|
```
|
|
9
|
-
npm install ultracart_rest_api_v2_typescript@4.1.
|
|
9
|
+
npm install ultracart_rest_api_v2_typescript@4.1.158 --save
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
@@ -85,6 +85,7 @@ Not every change is committed to every SDK.
|
|
|
85
85
|
|
|
86
86
|
| Version | Date | Comments |
|
|
87
87
|
| --: | :-: | --- |
|
|
88
|
+
| 4.1.158 | 09/18/2026 | sfvb internal testing |
|
|
88
89
|
| 4.1.157 | 09/18/2026 | sfvb internal testing |
|
|
89
90
|
| 4.1.156 | 09/16/2026 | sfvb internal testing |
|
|
90
91
|
| 4.1.155 | 09/15/2026 | sfvb internal testing |
|
package/dist/apis/SfvbApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import { SfvbCompileRequest, SfvbCompileResponse, SfvbContainerResponse, SfvbContainerRevertRequest, SfvbContainerVersion, SfvbContainerVersionsResponse, SfvbContainerWriteRequest, SfvbElementSchemaResponse, SfvbElementsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbLibraryEntry, SfvbLibraryResponse, SfvbMenu, SfvbMenuWriteRequest, SfvbMenusResponse, SfvbPageAttributeUpdateRequest, SfvbPageMultimediaRequest, SfvbPageResponse, SfvbPreviewAccessRequest, SfvbPreviewAccessResponse, SfvbPreviewSessionRequest, SfvbPreviewSessionResponse, SfvbPreviewUrlResponse, SfvbRenderRequest, SfvbRenderResponse, SfvbStorefrontsResponse, SfvbTheme, SfvbThemeAttributeUpdateRequest, SfvbThemeAttributesResponse, SfvbThemeDuplicateRequest, SfvbThemeJobResponse, SfvbThemesResponse, SfvbUpsellOffersResponse, SfvbValidateRequest, SfvbValidationResponse, SfvbVelocityValidateRequest, SfvbVersionResponse, SfvbWhoamiResponse, SfvbWidgetIdsResponse } from '../models';
|
|
13
|
+
import { SfvbCompileRequest, SfvbCompileResponse, SfvbContainerResponse, SfvbContainerRevertRequest, SfvbContainerVersion, SfvbContainerVersionsResponse, SfvbContainerWriteRequest, SfvbElementSchemaResponse, SfvbElementsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbLibraryEntry, SfvbLibraryResponse, SfvbMenu, SfvbMenuWriteRequest, SfvbMenusResponse, SfvbPageAttributeUpdateRequest, SfvbPageMultimediaRequest, SfvbPageResponse, SfvbPreviewAccessRequest, SfvbPreviewAccessResponse, SfvbPreviewSessionRequest, SfvbPreviewSessionResponse, SfvbPreviewUrlResponse, SfvbRenderRequest, SfvbRenderResponse, SfvbSiteAttributeUpdateRequest, SfvbSiteAttributesResponse, SfvbStorefrontsResponse, SfvbTheme, SfvbThemeAttributeUpdateRequest, SfvbThemeAttributesResponse, SfvbThemeDuplicateRequest, SfvbThemeJobResponse, SfvbThemesResponse, SfvbUpsellOffersResponse, SfvbValidateRequest, SfvbValidationResponse, SfvbVelocityValidateRequest, SfvbVersionResponse, SfvbWhoamiResponse, SfvbWidgetIdsResponse } from '../models';
|
|
14
14
|
export interface CompileSfvbCjsonRequest {
|
|
15
15
|
compileRequest: SfvbCompileRequest;
|
|
16
16
|
}
|
|
@@ -93,6 +93,9 @@ export interface GetSfvbPreviewUrlRequest {
|
|
|
93
93
|
previewSessionId: string;
|
|
94
94
|
path?: string;
|
|
95
95
|
}
|
|
96
|
+
export interface GetSfvbSiteAttributesRequest {
|
|
97
|
+
storefrontOid: number;
|
|
98
|
+
}
|
|
96
99
|
export interface GetSfvbThemeRequest {
|
|
97
100
|
storefrontOid: number;
|
|
98
101
|
themeOid: number;
|
|
@@ -168,6 +171,10 @@ export interface PutSfvbPreviewSessionRequest {
|
|
|
168
171
|
previewSession: SfvbPreviewSessionRequest;
|
|
169
172
|
themeOid?: number;
|
|
170
173
|
}
|
|
174
|
+
export interface PutSfvbSiteAttributesRequest {
|
|
175
|
+
storefrontOid: number;
|
|
176
|
+
siteAttributeUpdateRequest: SfvbSiteAttributeUpdateRequest;
|
|
177
|
+
}
|
|
171
178
|
export interface PutSfvbThemeAttributesRequest {
|
|
172
179
|
storefrontOid: number;
|
|
173
180
|
themeOid: number;
|
|
@@ -516,6 +523,20 @@ export interface SfvbApiInterface {
|
|
|
516
523
|
* URL that renders a preview session
|
|
517
524
|
*/
|
|
518
525
|
getSfvbPreviewUrl(requestParameters: GetSfvbPreviewUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPreviewUrlResponse>;
|
|
526
|
+
/**
|
|
527
|
+
* The values the siteattribute element and $site.attr render. These are not in any file or theme. Attributes a template declares but nothing has set are included with the template\'s default, so the response describes what the templates can render rather than only what has been saved. Credentials stored as site attributes are never included.
|
|
528
|
+
* @summary Read a storefront\'s site attributes
|
|
529
|
+
* @param {number} storefrontOid
|
|
530
|
+
* @param {*} [options] Override http request option.
|
|
531
|
+
* @throws {RequiredError}
|
|
532
|
+
* @memberof SfvbApiInterface
|
|
533
|
+
*/
|
|
534
|
+
getSfvbSiteAttributesRaw(requestParameters: GetSfvbSiteAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbSiteAttributesResponse>>;
|
|
535
|
+
/**
|
|
536
|
+
* The values the siteattribute element and $site.attr render. These are not in any file or theme. Attributes a template declares but nothing has set are included with the template\'s default, so the response describes what the templates can render rather than only what has been saved. Credentials stored as site attributes are never included.
|
|
537
|
+
* Read a storefront\'s site attributes
|
|
538
|
+
*/
|
|
539
|
+
getSfvbSiteAttributes(requestParameters: GetSfvbSiteAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbSiteAttributesResponse>;
|
|
519
540
|
/**
|
|
520
541
|
*
|
|
521
542
|
* @summary Get a theme
|
|
@@ -806,6 +827,21 @@ export interface SfvbApiInterface {
|
|
|
806
827
|
* Push containers into a preview session
|
|
807
828
|
*/
|
|
808
829
|
putSfvbPreviewSession(requestParameters: PutSfvbPreviewSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPreviewSessionResponse>;
|
|
830
|
+
/**
|
|
831
|
+
* A partial update. Only the attributes you name are changed. Every entry is checked before any is written. List, video list, mailing list and item set attributes are refused, and so are the General screen settings other than the title, the SEO description and keywords and the social account names. Credentials are refused. Always needs sfvb_publish, because every theme reads the same attributes and there is no dormant copy to change instead. The admin General screen saves the whole storefront, so a merchant with it open can still overwrite a change made here.
|
|
832
|
+
* @summary Change a storefront\'s site attributes
|
|
833
|
+
* @param {number} storefrontOid
|
|
834
|
+
* @param {SfvbSiteAttributeUpdateRequest} siteAttributeUpdateRequest Attributes to change
|
|
835
|
+
* @param {*} [options] Override http request option.
|
|
836
|
+
* @throws {RequiredError}
|
|
837
|
+
* @memberof SfvbApiInterface
|
|
838
|
+
*/
|
|
839
|
+
putSfvbSiteAttributesRaw(requestParameters: PutSfvbSiteAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbSiteAttributesResponse>>;
|
|
840
|
+
/**
|
|
841
|
+
* A partial update. Only the attributes you name are changed. Every entry is checked before any is written. List, video list, mailing list and item set attributes are refused, and so are the General screen settings other than the title, the SEO description and keywords and the social account names. Credentials are refused. Always needs sfvb_publish, because every theme reads the same attributes and there is no dormant copy to change instead. The admin General screen saves the whole storefront, so a merchant with it open can still overwrite a change made here.
|
|
842
|
+
* Change a storefront\'s site attributes
|
|
843
|
+
*/
|
|
844
|
+
putSfvbSiteAttributes(requestParameters: PutSfvbSiteAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbSiteAttributesResponse>;
|
|
809
845
|
/**
|
|
810
846
|
* A partial update. Only the slots you name are changed and every other slot on the theme keeps its value, so there is no need to send the whole set back to change one color. Send a whole palette in one call rather than one call per color - they are applied together, so the storefront never renders half of a change. Needs sfvb_publish when the theme is the one serving live traffic, because a color is referenced by name from every template that uses it and one write repaints the whole storefront at once. On a dormant theme sfvb_write is enough, which is what makes duplicate-then-restyle work.
|
|
811
847
|
* @summary Change a theme\'s colors, fonts and settings
|
|
@@ -1160,6 +1196,16 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
1160
1196
|
* URL that renders a preview session
|
|
1161
1197
|
*/
|
|
1162
1198
|
getSfvbPreviewUrl(requestParameters: GetSfvbPreviewUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPreviewUrlResponse>;
|
|
1199
|
+
/**
|
|
1200
|
+
* The values the siteattribute element and $site.attr render. These are not in any file or theme. Attributes a template declares but nothing has set are included with the template\'s default, so the response describes what the templates can render rather than only what has been saved. Credentials stored as site attributes are never included.
|
|
1201
|
+
* Read a storefront\'s site attributes
|
|
1202
|
+
*/
|
|
1203
|
+
getSfvbSiteAttributesRaw(requestParameters: GetSfvbSiteAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbSiteAttributesResponse>>;
|
|
1204
|
+
/**
|
|
1205
|
+
* The values the siteattribute element and $site.attr render. These are not in any file or theme. Attributes a template declares but nothing has set are included with the template\'s default, so the response describes what the templates can render rather than only what has been saved. Credentials stored as site attributes are never included.
|
|
1206
|
+
* Read a storefront\'s site attributes
|
|
1207
|
+
*/
|
|
1208
|
+
getSfvbSiteAttributes(requestParameters: GetSfvbSiteAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbSiteAttributesResponse>;
|
|
1163
1209
|
/**
|
|
1164
1210
|
* Get a theme
|
|
1165
1211
|
*/
|
|
@@ -1346,6 +1392,16 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
1346
1392
|
* Push containers into a preview session
|
|
1347
1393
|
*/
|
|
1348
1394
|
putSfvbPreviewSession(requestParameters: PutSfvbPreviewSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPreviewSessionResponse>;
|
|
1395
|
+
/**
|
|
1396
|
+
* A partial update. Only the attributes you name are changed. Every entry is checked before any is written. List, video list, mailing list and item set attributes are refused, and so are the General screen settings other than the title, the SEO description and keywords and the social account names. Credentials are refused. Always needs sfvb_publish, because every theme reads the same attributes and there is no dormant copy to change instead. The admin General screen saves the whole storefront, so a merchant with it open can still overwrite a change made here.
|
|
1397
|
+
* Change a storefront\'s site attributes
|
|
1398
|
+
*/
|
|
1399
|
+
putSfvbSiteAttributesRaw(requestParameters: PutSfvbSiteAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbSiteAttributesResponse>>;
|
|
1400
|
+
/**
|
|
1401
|
+
* A partial update. Only the attributes you name are changed. Every entry is checked before any is written. List, video list, mailing list and item set attributes are refused, and so are the General screen settings other than the title, the SEO description and keywords and the social account names. Credentials are refused. Always needs sfvb_publish, because every theme reads the same attributes and there is no dormant copy to change instead. The admin General screen saves the whole storefront, so a merchant with it open can still overwrite a change made here.
|
|
1402
|
+
* Change a storefront\'s site attributes
|
|
1403
|
+
*/
|
|
1404
|
+
putSfvbSiteAttributes(requestParameters: PutSfvbSiteAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbSiteAttributesResponse>;
|
|
1349
1405
|
/**
|
|
1350
1406
|
* A partial update. Only the slots you name are changed and every other slot on the theme keeps its value, so there is no need to send the whole set back to change one color. Send a whole palette in one call rather than one call per color - they are applied together, so the storefront never renders half of a change. Needs sfvb_publish when the theme is the one serving live traffic, because a color is referenced by name from every template that uses it and one write repaints the whole storefront at once. On a dormant theme sfvb_write is enough, which is what makes duplicate-then-restyle work.
|
|
1351
1407
|
* Change a theme\'s colors, fonts and settings
|
package/dist/apis/SfvbApi.js
CHANGED
|
@@ -1277,6 +1277,65 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
1277
1277
|
});
|
|
1278
1278
|
});
|
|
1279
1279
|
};
|
|
1280
|
+
/**
|
|
1281
|
+
* The values the siteattribute element and $site.attr render. These are not in any file or theme. Attributes a template declares but nothing has set are included with the template\'s default, so the response describes what the templates can render rather than only what has been saved. Credentials stored as site attributes are never included.
|
|
1282
|
+
* Read a storefront\'s site attributes
|
|
1283
|
+
*/
|
|
1284
|
+
SfvbApi.prototype.getSfvbSiteAttributesRaw = function (requestParameters, initOverrides) {
|
|
1285
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1286
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
1287
|
+
return __generator(this, function (_c) {
|
|
1288
|
+
switch (_c.label) {
|
|
1289
|
+
case 0:
|
|
1290
|
+
if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
|
|
1291
|
+
throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling getSfvbSiteAttributes.');
|
|
1292
|
+
}
|
|
1293
|
+
queryParameters = {};
|
|
1294
|
+
headerParameters = {};
|
|
1295
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
1296
|
+
// oauth required
|
|
1297
|
+
_a = headerParameters;
|
|
1298
|
+
_b = "Authorization";
|
|
1299
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
|
|
1300
|
+
case 1:
|
|
1301
|
+
// oauth required
|
|
1302
|
+
_a[_b] = _c.sent();
|
|
1303
|
+
_c.label = 2;
|
|
1304
|
+
case 2:
|
|
1305
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1306
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
1307
|
+
}
|
|
1308
|
+
return [4 /*yield*/, this.request({
|
|
1309
|
+
path: "/sfvb/storefronts/{storefront_oid}/attributes".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))),
|
|
1310
|
+
method: 'GET',
|
|
1311
|
+
headers: headerParameters,
|
|
1312
|
+
query: queryParameters,
|
|
1313
|
+
}, initOverrides)];
|
|
1314
|
+
case 3:
|
|
1315
|
+
response = _c.sent();
|
|
1316
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbSiteAttributesResponseFromJSON)(jsonValue); })];
|
|
1317
|
+
}
|
|
1318
|
+
});
|
|
1319
|
+
});
|
|
1320
|
+
};
|
|
1321
|
+
/**
|
|
1322
|
+
* The values the siteattribute element and $site.attr render. These are not in any file or theme. Attributes a template declares but nothing has set are included with the template\'s default, so the response describes what the templates can render rather than only what has been saved. Credentials stored as site attributes are never included.
|
|
1323
|
+
* Read a storefront\'s site attributes
|
|
1324
|
+
*/
|
|
1325
|
+
SfvbApi.prototype.getSfvbSiteAttributes = function (requestParameters, initOverrides) {
|
|
1326
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1327
|
+
var response;
|
|
1328
|
+
return __generator(this, function (_a) {
|
|
1329
|
+
switch (_a.label) {
|
|
1330
|
+
case 0: return [4 /*yield*/, this.getSfvbSiteAttributesRaw(requestParameters, initOverrides)];
|
|
1331
|
+
case 1:
|
|
1332
|
+
response = _a.sent();
|
|
1333
|
+
return [4 /*yield*/, response.value()];
|
|
1334
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
1335
|
+
}
|
|
1336
|
+
});
|
|
1337
|
+
});
|
|
1338
|
+
};
|
|
1280
1339
|
/**
|
|
1281
1340
|
* Get a theme
|
|
1282
1341
|
*/
|
|
@@ -2496,6 +2555,70 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
2496
2555
|
});
|
|
2497
2556
|
});
|
|
2498
2557
|
};
|
|
2558
|
+
/**
|
|
2559
|
+
* A partial update. Only the attributes you name are changed. Every entry is checked before any is written. List, video list, mailing list and item set attributes are refused, and so are the General screen settings other than the title, the SEO description and keywords and the social account names. Credentials are refused. Always needs sfvb_publish, because every theme reads the same attributes and there is no dormant copy to change instead. The admin General screen saves the whole storefront, so a merchant with it open can still overwrite a change made here.
|
|
2560
|
+
* Change a storefront\'s site attributes
|
|
2561
|
+
*/
|
|
2562
|
+
SfvbApi.prototype.putSfvbSiteAttributesRaw = function (requestParameters, initOverrides) {
|
|
2563
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2564
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
2565
|
+
return __generator(this, function (_c) {
|
|
2566
|
+
switch (_c.label) {
|
|
2567
|
+
case 0:
|
|
2568
|
+
if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
|
|
2569
|
+
throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling putSfvbSiteAttributes.');
|
|
2570
|
+
}
|
|
2571
|
+
if (requestParameters.siteAttributeUpdateRequest === null || requestParameters.siteAttributeUpdateRequest === undefined) {
|
|
2572
|
+
throw new runtime.RequiredError('siteAttributeUpdateRequest', 'Required parameter requestParameters.siteAttributeUpdateRequest was null or undefined when calling putSfvbSiteAttributes.');
|
|
2573
|
+
}
|
|
2574
|
+
queryParameters = {};
|
|
2575
|
+
headerParameters = {};
|
|
2576
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
2577
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
2578
|
+
// oauth required
|
|
2579
|
+
_a = headerParameters;
|
|
2580
|
+
_b = "Authorization";
|
|
2581
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
|
|
2582
|
+
case 1:
|
|
2583
|
+
// oauth required
|
|
2584
|
+
_a[_b] = _c.sent();
|
|
2585
|
+
_c.label = 2;
|
|
2586
|
+
case 2:
|
|
2587
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2588
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
2589
|
+
}
|
|
2590
|
+
return [4 /*yield*/, this.request({
|
|
2591
|
+
path: "/sfvb/storefronts/{storefront_oid}/attributes".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))),
|
|
2592
|
+
method: 'PUT',
|
|
2593
|
+
headers: headerParameters,
|
|
2594
|
+
query: queryParameters,
|
|
2595
|
+
body: (0, models_1.SfvbSiteAttributeUpdateRequestToJSON)(requestParameters.siteAttributeUpdateRequest),
|
|
2596
|
+
}, initOverrides)];
|
|
2597
|
+
case 3:
|
|
2598
|
+
response = _c.sent();
|
|
2599
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbSiteAttributesResponseFromJSON)(jsonValue); })];
|
|
2600
|
+
}
|
|
2601
|
+
});
|
|
2602
|
+
});
|
|
2603
|
+
};
|
|
2604
|
+
/**
|
|
2605
|
+
* A partial update. Only the attributes you name are changed. Every entry is checked before any is written. List, video list, mailing list and item set attributes are refused, and so are the General screen settings other than the title, the SEO description and keywords and the social account names. Credentials are refused. Always needs sfvb_publish, because every theme reads the same attributes and there is no dormant copy to change instead. The admin General screen saves the whole storefront, so a merchant with it open can still overwrite a change made here.
|
|
2606
|
+
* Change a storefront\'s site attributes
|
|
2607
|
+
*/
|
|
2608
|
+
SfvbApi.prototype.putSfvbSiteAttributes = function (requestParameters, initOverrides) {
|
|
2609
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2610
|
+
var response;
|
|
2611
|
+
return __generator(this, function (_a) {
|
|
2612
|
+
switch (_a.label) {
|
|
2613
|
+
case 0: return [4 /*yield*/, this.putSfvbSiteAttributesRaw(requestParameters, initOverrides)];
|
|
2614
|
+
case 1:
|
|
2615
|
+
response = _a.sent();
|
|
2616
|
+
return [4 /*yield*/, response.value()];
|
|
2617
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
2618
|
+
}
|
|
2619
|
+
});
|
|
2620
|
+
});
|
|
2621
|
+
};
|
|
2499
2622
|
/**
|
|
2500
2623
|
* A partial update. Only the slots you name are changed and every other slot on the theme keeps its value, so there is no need to send the whole set back to change one color. Send a whole palette in one call rather than one call per color - they are applied together, so the storefront never renders half of a change. Needs sfvb_publish when the theme is the one serving live traffic, because a color is referenced by name from every template that uses it and one write repaints the whole storefront at once. On a dormant theme sfvb_write is enough, which is what makes duplicate-then-restyle work.
|
|
2501
2624
|
* Change a theme\'s colors, fonts and settings
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UltraCart Rest API V2
|
|
3
|
+
* UltraCart REST API Version 2
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
* Contact: support@ultracart.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface SfvbSiteAttribute
|
|
16
|
+
*/
|
|
17
|
+
export interface SfvbSiteAttribute {
|
|
18
|
+
/**
|
|
19
|
+
* Attribute name, as a template's site attribute declaration spells it. Compare case insensitively. This is the value siteAttributeName refers to and the name $site.attr takes.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof SfvbSiteAttribute
|
|
22
|
+
*/
|
|
23
|
+
name?: string;
|
|
24
|
+
/**
|
|
25
|
+
* What kind of attribute this is, taken from the template that declares it rather than from the stored row. orphan means no template declares it. reserved covers the settings the StoreFronts General screen owns.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof SfvbSiteAttribute
|
|
28
|
+
*/
|
|
29
|
+
type?: SfvbSiteAttributeTypeEnum;
|
|
30
|
+
/**
|
|
31
|
+
* True when no template declares this name and it is not a reserved setting. A template can still read it with $site.attr, so this is not proof it is unused, but a name you did not mean to create is most likely a misspelling.
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof SfvbSiteAttribute
|
|
34
|
+
*/
|
|
35
|
+
undeclared?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The other themes that declare this attribute, when the active theme does not.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof SfvbSiteAttribute
|
|
40
|
+
*/
|
|
41
|
+
used_by?: string;
|
|
42
|
+
/**
|
|
43
|
+
* True when a template in the active theme declares this attribute.
|
|
44
|
+
* @type {boolean}
|
|
45
|
+
* @memberof SfvbSiteAttribute
|
|
46
|
+
*/
|
|
47
|
+
used_by_current_theme?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* The stored value, or the template default when nothing has set it.
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof SfvbSiteAttribute
|
|
52
|
+
*/
|
|
53
|
+
value?: string;
|
|
54
|
+
/**
|
|
55
|
+
* True when this API will change the value. List, video list, mailing list and item set values are structured documents and must be edited in the store admin. Of the reserved settings only the title, the SEO description and keywords and the social account names are writable here.
|
|
56
|
+
* @type {boolean}
|
|
57
|
+
* @memberof SfvbSiteAttribute
|
|
58
|
+
*/
|
|
59
|
+
writable?: boolean;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @export
|
|
63
|
+
*/
|
|
64
|
+
export declare const SfvbSiteAttributeTypeEnum: {
|
|
65
|
+
readonly String: "string";
|
|
66
|
+
readonly Multiline: "multiline";
|
|
67
|
+
readonly Html: "html";
|
|
68
|
+
readonly Color: "color";
|
|
69
|
+
readonly Rgba: "rgba";
|
|
70
|
+
readonly Boolean: "boolean";
|
|
71
|
+
readonly Integer: "integer";
|
|
72
|
+
readonly Orphan: "orphan";
|
|
73
|
+
readonly Reserved: "reserved";
|
|
74
|
+
readonly Simplelist: "simplelist";
|
|
75
|
+
readonly Definitionlist: "definitionlist";
|
|
76
|
+
readonly Videolist: "videolist";
|
|
77
|
+
readonly Mailinglist: "mailinglist";
|
|
78
|
+
readonly Itemset: "itemset";
|
|
79
|
+
};
|
|
80
|
+
export type SfvbSiteAttributeTypeEnum = typeof SfvbSiteAttributeTypeEnum[keyof typeof SfvbSiteAttributeTypeEnum];
|
|
81
|
+
/**
|
|
82
|
+
* Check if a given object implements the SfvbSiteAttribute interface.
|
|
83
|
+
*/
|
|
84
|
+
export declare function instanceOfSfvbSiteAttribute(value: object): boolean;
|
|
85
|
+
export declare function SfvbSiteAttributeFromJSON(json: any): SfvbSiteAttribute;
|
|
86
|
+
export declare function SfvbSiteAttributeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbSiteAttribute;
|
|
87
|
+
export declare function SfvbSiteAttributeToJSON(value?: SfvbSiteAttribute | null): any;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* UltraCart Rest API V2
|
|
6
|
+
* UltraCart REST API Version 2
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2.0.0
|
|
9
|
+
* Contact: support@ultracart.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.SfvbSiteAttributeToJSON = exports.SfvbSiteAttributeFromJSONTyped = exports.SfvbSiteAttributeFromJSON = exports.instanceOfSfvbSiteAttribute = exports.SfvbSiteAttributeTypeEnum = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* @export
|
|
20
|
+
*/
|
|
21
|
+
exports.SfvbSiteAttributeTypeEnum = {
|
|
22
|
+
String: 'string',
|
|
23
|
+
Multiline: 'multiline',
|
|
24
|
+
Html: 'html',
|
|
25
|
+
Color: 'color',
|
|
26
|
+
Rgba: 'rgba',
|
|
27
|
+
Boolean: 'boolean',
|
|
28
|
+
Integer: 'integer',
|
|
29
|
+
Orphan: 'orphan',
|
|
30
|
+
Reserved: 'reserved',
|
|
31
|
+
Simplelist: 'simplelist',
|
|
32
|
+
Definitionlist: 'definitionlist',
|
|
33
|
+
Videolist: 'videolist',
|
|
34
|
+
Mailinglist: 'mailinglist',
|
|
35
|
+
Itemset: 'itemset'
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the SfvbSiteAttribute interface.
|
|
39
|
+
*/
|
|
40
|
+
function instanceOfSfvbSiteAttribute(value) {
|
|
41
|
+
var isInstance = true;
|
|
42
|
+
return isInstance;
|
|
43
|
+
}
|
|
44
|
+
exports.instanceOfSfvbSiteAttribute = instanceOfSfvbSiteAttribute;
|
|
45
|
+
function SfvbSiteAttributeFromJSON(json) {
|
|
46
|
+
return SfvbSiteAttributeFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
exports.SfvbSiteAttributeFromJSON = SfvbSiteAttributeFromJSON;
|
|
49
|
+
function SfvbSiteAttributeFromJSONTyped(json, ignoreDiscriminator) {
|
|
50
|
+
if ((json === undefined) || (json === null)) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
|
|
55
|
+
'type': !(0, runtime_1.exists)(json, 'type') ? undefined : json['type'],
|
|
56
|
+
'undeclared': !(0, runtime_1.exists)(json, 'undeclared') ? undefined : json['undeclared'],
|
|
57
|
+
'used_by': !(0, runtime_1.exists)(json, 'used_by') ? undefined : json['used_by'],
|
|
58
|
+
'used_by_current_theme': !(0, runtime_1.exists)(json, 'used_by_current_theme') ? undefined : json['used_by_current_theme'],
|
|
59
|
+
'value': !(0, runtime_1.exists)(json, 'value') ? undefined : json['value'],
|
|
60
|
+
'writable': !(0, runtime_1.exists)(json, 'writable') ? undefined : json['writable'],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
exports.SfvbSiteAttributeFromJSONTyped = SfvbSiteAttributeFromJSONTyped;
|
|
64
|
+
function SfvbSiteAttributeToJSON(value) {
|
|
65
|
+
if (value === undefined) {
|
|
66
|
+
return undefined;
|
|
67
|
+
}
|
|
68
|
+
if (value === null) {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
'name': value.name,
|
|
73
|
+
'type': value.type,
|
|
74
|
+
'undeclared': value.undeclared,
|
|
75
|
+
'used_by': value.used_by,
|
|
76
|
+
'used_by_current_theme': value.used_by_current_theme,
|
|
77
|
+
'value': value.value,
|
|
78
|
+
'writable': value.writable,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
exports.SfvbSiteAttributeToJSON = SfvbSiteAttributeToJSON;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UltraCart Rest API V2
|
|
3
|
+
* UltraCart REST API Version 2
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
* Contact: support@ultracart.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface SfvbSiteAttributeUpdate
|
|
16
|
+
*/
|
|
17
|
+
export interface SfvbSiteAttributeUpdate {
|
|
18
|
+
/**
|
|
19
|
+
* Attribute name. Matched without regard to case against what the storefront already has, so you do not have to reproduce the exact casing. A name nothing matches creates a new attribute.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof SfvbSiteAttributeUpdate
|
|
22
|
+
*/
|
|
23
|
+
name?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Only consulted when creating an attribute no template declares. For a declared attribute the template's type always wins, because the templates decide it and not the caller.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof SfvbSiteAttributeUpdate
|
|
28
|
+
*/
|
|
29
|
+
type?: SfvbSiteAttributeUpdateTypeEnum;
|
|
30
|
+
/**
|
|
31
|
+
* The value to store. An empty string clears it. For html the markup is stored as given and rendered as given. For boolean send the text true or false.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof SfvbSiteAttributeUpdate
|
|
34
|
+
*/
|
|
35
|
+
value?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export declare const SfvbSiteAttributeUpdateTypeEnum: {
|
|
41
|
+
readonly String: "string";
|
|
42
|
+
readonly Multiline: "multiline";
|
|
43
|
+
readonly Html: "html";
|
|
44
|
+
readonly Boolean: "boolean";
|
|
45
|
+
readonly Integer: "integer";
|
|
46
|
+
readonly Color: "color";
|
|
47
|
+
readonly Rgba: "rgba";
|
|
48
|
+
};
|
|
49
|
+
export type SfvbSiteAttributeUpdateTypeEnum = typeof SfvbSiteAttributeUpdateTypeEnum[keyof typeof SfvbSiteAttributeUpdateTypeEnum];
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the SfvbSiteAttributeUpdate interface.
|
|
52
|
+
*/
|
|
53
|
+
export declare function instanceOfSfvbSiteAttributeUpdate(value: object): boolean;
|
|
54
|
+
export declare function SfvbSiteAttributeUpdateFromJSON(json: any): SfvbSiteAttributeUpdate;
|
|
55
|
+
export declare function SfvbSiteAttributeUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbSiteAttributeUpdate;
|
|
56
|
+
export declare function SfvbSiteAttributeUpdateToJSON(value?: SfvbSiteAttributeUpdate | null): any;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* UltraCart Rest API V2
|
|
6
|
+
* UltraCart REST API Version 2
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2.0.0
|
|
9
|
+
* Contact: support@ultracart.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.SfvbSiteAttributeUpdateToJSON = exports.SfvbSiteAttributeUpdateFromJSONTyped = exports.SfvbSiteAttributeUpdateFromJSON = exports.instanceOfSfvbSiteAttributeUpdate = exports.SfvbSiteAttributeUpdateTypeEnum = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* @export
|
|
20
|
+
*/
|
|
21
|
+
exports.SfvbSiteAttributeUpdateTypeEnum = {
|
|
22
|
+
String: 'string',
|
|
23
|
+
Multiline: 'multiline',
|
|
24
|
+
Html: 'html',
|
|
25
|
+
Boolean: 'boolean',
|
|
26
|
+
Integer: 'integer',
|
|
27
|
+
Color: 'color',
|
|
28
|
+
Rgba: 'rgba'
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the SfvbSiteAttributeUpdate interface.
|
|
32
|
+
*/
|
|
33
|
+
function instanceOfSfvbSiteAttributeUpdate(value) {
|
|
34
|
+
var isInstance = true;
|
|
35
|
+
return isInstance;
|
|
36
|
+
}
|
|
37
|
+
exports.instanceOfSfvbSiteAttributeUpdate = instanceOfSfvbSiteAttributeUpdate;
|
|
38
|
+
function SfvbSiteAttributeUpdateFromJSON(json) {
|
|
39
|
+
return SfvbSiteAttributeUpdateFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
exports.SfvbSiteAttributeUpdateFromJSON = SfvbSiteAttributeUpdateFromJSON;
|
|
42
|
+
function SfvbSiteAttributeUpdateFromJSONTyped(json, ignoreDiscriminator) {
|
|
43
|
+
if ((json === undefined) || (json === null)) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
|
|
48
|
+
'type': !(0, runtime_1.exists)(json, 'type') ? undefined : json['type'],
|
|
49
|
+
'value': !(0, runtime_1.exists)(json, 'value') ? undefined : json['value'],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
exports.SfvbSiteAttributeUpdateFromJSONTyped = SfvbSiteAttributeUpdateFromJSONTyped;
|
|
53
|
+
function SfvbSiteAttributeUpdateToJSON(value) {
|
|
54
|
+
if (value === undefined) {
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
if (value === null) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
'name': value.name,
|
|
62
|
+
'type': value.type,
|
|
63
|
+
'value': value.value,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
exports.SfvbSiteAttributeUpdateToJSON = SfvbSiteAttributeUpdateToJSON;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UltraCart Rest API V2
|
|
3
|
+
* UltraCart REST API Version 2
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
* Contact: support@ultracart.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { SfvbSiteAttributeUpdate } from './SfvbSiteAttributeUpdate';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface SfvbSiteAttributeUpdateRequest
|
|
17
|
+
*/
|
|
18
|
+
export interface SfvbSiteAttributeUpdateRequest {
|
|
19
|
+
/**
|
|
20
|
+
* The attributes to change. Every entry is checked before any is written, so a request naming one attribute this API will not change writes nothing rather than part of what it asked for.
|
|
21
|
+
* @type {Array<SfvbSiteAttributeUpdate>}
|
|
22
|
+
* @memberof SfvbSiteAttributeUpdateRequest
|
|
23
|
+
*/
|
|
24
|
+
attributes?: Array<SfvbSiteAttributeUpdate>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the SfvbSiteAttributeUpdateRequest interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfSfvbSiteAttributeUpdateRequest(value: object): boolean;
|
|
30
|
+
export declare function SfvbSiteAttributeUpdateRequestFromJSON(json: any): SfvbSiteAttributeUpdateRequest;
|
|
31
|
+
export declare function SfvbSiteAttributeUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbSiteAttributeUpdateRequest;
|
|
32
|
+
export declare function SfvbSiteAttributeUpdateRequestToJSON(value?: SfvbSiteAttributeUpdateRequest | null): any;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* UltraCart Rest API V2
|
|
6
|
+
* UltraCart REST API Version 2
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2.0.0
|
|
9
|
+
* Contact: support@ultracart.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.SfvbSiteAttributeUpdateRequestToJSON = exports.SfvbSiteAttributeUpdateRequestFromJSONTyped = exports.SfvbSiteAttributeUpdateRequestFromJSON = exports.instanceOfSfvbSiteAttributeUpdateRequest = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
var SfvbSiteAttributeUpdate_1 = require("./SfvbSiteAttributeUpdate");
|
|
19
|
+
/**
|
|
20
|
+
* Check if a given object implements the SfvbSiteAttributeUpdateRequest interface.
|
|
21
|
+
*/
|
|
22
|
+
function instanceOfSfvbSiteAttributeUpdateRequest(value) {
|
|
23
|
+
var isInstance = true;
|
|
24
|
+
return isInstance;
|
|
25
|
+
}
|
|
26
|
+
exports.instanceOfSfvbSiteAttributeUpdateRequest = instanceOfSfvbSiteAttributeUpdateRequest;
|
|
27
|
+
function SfvbSiteAttributeUpdateRequestFromJSON(json) {
|
|
28
|
+
return SfvbSiteAttributeUpdateRequestFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
exports.SfvbSiteAttributeUpdateRequestFromJSON = SfvbSiteAttributeUpdateRequestFromJSON;
|
|
31
|
+
function SfvbSiteAttributeUpdateRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if ((json === undefined) || (json === null)) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'attributes': !(0, runtime_1.exists)(json, 'attributes') ? undefined : (json['attributes'].map(SfvbSiteAttributeUpdate_1.SfvbSiteAttributeUpdateFromJSON)),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
exports.SfvbSiteAttributeUpdateRequestFromJSONTyped = SfvbSiteAttributeUpdateRequestFromJSONTyped;
|
|
40
|
+
function SfvbSiteAttributeUpdateRequestToJSON(value) {
|
|
41
|
+
if (value === undefined) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
if (value === null) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'attributes': value.attributes === undefined ? undefined : (value.attributes.map(SfvbSiteAttributeUpdate_1.SfvbSiteAttributeUpdateToJSON)),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
exports.SfvbSiteAttributeUpdateRequestToJSON = SfvbSiteAttributeUpdateRequestToJSON;
|