@digital8/lighting-illusions-ts-sdk 0.0.1635 → 0.0.1637
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/README.md +3 -2
- package/dist/apis/ProductRegistrationApi.d.ts +17 -1
- package/dist/apis/ProductRegistrationApi.js +61 -0
- package/dist/models/GlobalSearchProductResource.d.ts +6 -0
- package/dist/models/GlobalSearchProductResource.js +4 -0
- package/dist/models/ProductChildListResource.d.ts +6 -0
- package/dist/models/ProductChildListResource.js +2 -0
- package/dist/models/ProductSearchResultResource.d.ts +6 -0
- package/dist/models/ProductSearchResultResource.js +4 -0
- package/dist/models/StoreResource.d.ts +2 -2
- package/dist/models/StoreResource.js +6 -2
- package/docs/GlobalSearchProductResource.md +2 -0
- package/docs/ProductChildListResource.md +2 -0
- package/docs/ProductRegistrationApi.md +69 -0
- package/docs/ProductSearchResultResource.md +2 -0
- package/package.json +1 -1
- package/src/apis/ProductRegistrationApi.ts +59 -0
- package/src/models/GlobalSearchProductResource.ts +9 -0
- package/src/models/ProductChildListResource.ts +8 -0
- package/src/models/ProductSearchResultResource.ts +9 -0
- package/src/models/StoreResource.ts +6 -4
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @digital8/lighting-illusions-ts-sdk@0.0.
|
|
1
|
+
# @digital8/lighting-illusions-ts-sdk@0.0.1637
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the localhost API.
|
|
4
4
|
|
|
@@ -165,6 +165,7 @@ All URIs are relative to *http://localhost/api*
|
|
|
165
165
|
*ProductRegistrationApi* | [**getAllProductRegistration**](docs/ProductRegistrationApi.md#getallproductregistrationoperation) | **POST** /admin-api/product-registration/all | Auto-generated: getAllProductRegistration
|
|
166
166
|
*ProductRegistrationApi* | [**indexProductRegistration**](docs/ProductRegistrationApi.md#indexproductregistrationoperation) | **POST** /admin-api/product-registration/list | Auto-generated: indexProductRegistration
|
|
167
167
|
*ProductRegistrationApi* | [**listAssetsProductRegistration**](docs/ProductRegistrationApi.md#listassetsproductregistrationoperation) | **POST** /admin-api/product-registration/{productRegistration}/assets | Auto-generated: listAssetsProductRegistration
|
|
168
|
+
*ProductRegistrationApi* | [**listProductsProductRegistration**](docs/ProductRegistrationApi.md#listproductsproductregistration) | **POST** /admin-api/product-registration/{productRegistration}/product/list | Auto-generated: listProductsProductRegistration
|
|
168
169
|
*ProductRegistrationApi* | [**showProductRegistration**](docs/ProductRegistrationApi.md#showproductregistration) | **GET** /admin-api/product-registration/{productRegistration} | Auto-generated: showProductRegistration
|
|
169
170
|
*ProductTypeApi* | [**attachAttributeProductType**](docs/ProductTypeApi.md#attachattributeproducttypeoperation) | **POST** /admin-api/product-type/{productType}/attach-attribute | Auto-generated: attachAttributeProductType
|
|
170
171
|
*ProductTypeApi* | [**destroyProductType**](docs/ProductTypeApi.md#destroyproducttype) | **DELETE** /admin-api/product-type/{productType}/delete | Auto-generated: destroyProductType
|
|
@@ -637,7 +638,7 @@ and is automatically generated by the
|
|
|
637
638
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
638
639
|
|
|
639
640
|
- API version: `1.0.0`
|
|
640
|
-
- Package version: `0.0.
|
|
641
|
+
- Package version: `0.0.1637`
|
|
641
642
|
- Generator version: `7.21.0`
|
|
642
643
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
643
644
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { GetAllProductRegistrationRequest, IndexProductRegistrationRequest, ListAssetsProductRegistrationRequest, PaginatedProductRegistrationAssetResourceResponse, PaginatedProductRegistrationListResourceResponse, ProductRegistrationLiteResourceArrayResponse, ProductRegistrationResource } from '../models/index';
|
|
13
|
+
import type { GetAllProductRegistrationRequest, IndexProductChildRequest, IndexProductRegistrationRequest, ListAssetsProductRegistrationRequest, PaginatedProductChildListResourceResponse, PaginatedProductRegistrationAssetResourceResponse, PaginatedProductRegistrationListResourceResponse, ProductRegistrationLiteResourceArrayResponse, ProductRegistrationResource } from '../models/index';
|
|
14
14
|
export interface GetAllProductRegistrationOperationRequest {
|
|
15
15
|
getAllProductRegistrationRequest?: GetAllProductRegistrationRequest;
|
|
16
16
|
}
|
|
@@ -21,6 +21,10 @@ export interface ListAssetsProductRegistrationOperationRequest {
|
|
|
21
21
|
productRegistration: number;
|
|
22
22
|
listAssetsProductRegistrationRequest?: ListAssetsProductRegistrationRequest;
|
|
23
23
|
}
|
|
24
|
+
export interface ListProductsProductRegistrationRequest {
|
|
25
|
+
productRegistration: number;
|
|
26
|
+
indexProductChildRequest?: IndexProductChildRequest;
|
|
27
|
+
}
|
|
24
28
|
export interface ShowProductRegistrationRequest {
|
|
25
29
|
productRegistration: number;
|
|
26
30
|
}
|
|
@@ -64,6 +68,18 @@ export declare class ProductRegistrationApi extends runtime.BaseAPI {
|
|
|
64
68
|
* Auto-generated: listAssetsProductRegistration
|
|
65
69
|
*/
|
|
66
70
|
listAssetsProductRegistration(requestParameters: ListAssetsProductRegistrationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedProductRegistrationAssetResourceResponse>;
|
|
71
|
+
/**
|
|
72
|
+
* Creates request options for listProductsProductRegistration without sending the request
|
|
73
|
+
*/
|
|
74
|
+
listProductsProductRegistrationRequestOpts(requestParameters: ListProductsProductRegistrationRequest): Promise<runtime.RequestOpts>;
|
|
75
|
+
/**
|
|
76
|
+
* Auto-generated: listProductsProductRegistration
|
|
77
|
+
*/
|
|
78
|
+
listProductsProductRegistrationRaw(requestParameters: ListProductsProductRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedProductChildListResourceResponse>>;
|
|
79
|
+
/**
|
|
80
|
+
* Auto-generated: listProductsProductRegistration
|
|
81
|
+
*/
|
|
82
|
+
listProductsProductRegistration(requestParameters: ListProductsProductRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedProductChildListResourceResponse>;
|
|
67
83
|
/**
|
|
68
84
|
* Creates request options for showProductRegistration without sending the request
|
|
69
85
|
*/
|
|
@@ -252,6 +252,67 @@ var ProductRegistrationApi = /** @class */ (function (_super) {
|
|
|
252
252
|
});
|
|
253
253
|
});
|
|
254
254
|
};
|
|
255
|
+
/**
|
|
256
|
+
* Creates request options for listProductsProductRegistration without sending the request
|
|
257
|
+
*/
|
|
258
|
+
ProductRegistrationApi.prototype.listProductsProductRegistrationRequestOpts = function (requestParameters) {
|
|
259
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
260
|
+
var queryParameters, headerParameters, urlPath;
|
|
261
|
+
return __generator(this, function (_a) {
|
|
262
|
+
if (requestParameters['productRegistration'] == null) {
|
|
263
|
+
throw new runtime.RequiredError('productRegistration', 'Required parameter "productRegistration" was null or undefined when calling listProductsProductRegistration().');
|
|
264
|
+
}
|
|
265
|
+
queryParameters = {};
|
|
266
|
+
headerParameters = {};
|
|
267
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
268
|
+
urlPath = "/admin-api/product-registration/{productRegistration}/product/list";
|
|
269
|
+
urlPath = urlPath.replace("{".concat("productRegistration", "}"), encodeURIComponent(String(requestParameters['productRegistration'])));
|
|
270
|
+
return [2 /*return*/, {
|
|
271
|
+
path: urlPath,
|
|
272
|
+
method: 'POST',
|
|
273
|
+
headers: headerParameters,
|
|
274
|
+
query: queryParameters,
|
|
275
|
+
body: (0, index_1.IndexProductChildRequestToJSON)(requestParameters['indexProductChildRequest']),
|
|
276
|
+
}];
|
|
277
|
+
});
|
|
278
|
+
});
|
|
279
|
+
};
|
|
280
|
+
/**
|
|
281
|
+
* Auto-generated: listProductsProductRegistration
|
|
282
|
+
*/
|
|
283
|
+
ProductRegistrationApi.prototype.listProductsProductRegistrationRaw = function (requestParameters, initOverrides) {
|
|
284
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
285
|
+
var requestOptions, response;
|
|
286
|
+
return __generator(this, function (_a) {
|
|
287
|
+
switch (_a.label) {
|
|
288
|
+
case 0: return [4 /*yield*/, this.listProductsProductRegistrationRequestOpts(requestParameters)];
|
|
289
|
+
case 1:
|
|
290
|
+
requestOptions = _a.sent();
|
|
291
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
292
|
+
case 2:
|
|
293
|
+
response = _a.sent();
|
|
294
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedProductChildListResourceResponseFromJSON)(jsonValue); })];
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
});
|
|
298
|
+
};
|
|
299
|
+
/**
|
|
300
|
+
* Auto-generated: listProductsProductRegistration
|
|
301
|
+
*/
|
|
302
|
+
ProductRegistrationApi.prototype.listProductsProductRegistration = function (requestParameters, initOverrides) {
|
|
303
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
304
|
+
var response;
|
|
305
|
+
return __generator(this, function (_a) {
|
|
306
|
+
switch (_a.label) {
|
|
307
|
+
case 0: return [4 /*yield*/, this.listProductsProductRegistrationRaw(requestParameters, initOverrides)];
|
|
308
|
+
case 1:
|
|
309
|
+
response = _a.sent();
|
|
310
|
+
return [4 /*yield*/, response.value()];
|
|
311
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
};
|
|
255
316
|
/**
|
|
256
317
|
* Creates request options for showProductRegistration without sending the request
|
|
257
318
|
*/
|
|
@@ -28,6 +28,8 @@ function instanceOfGlobalSearchProductResource(value) {
|
|
|
28
28
|
return false;
|
|
29
29
|
if (!('model' in value) || value['model'] === undefined)
|
|
30
30
|
return false;
|
|
31
|
+
if (!('modelRaw' in value) || value['modelRaw'] === undefined)
|
|
32
|
+
return false;
|
|
31
33
|
if (!('slug' in value) || value['slug'] === undefined)
|
|
32
34
|
return false;
|
|
33
35
|
if (!('sku' in value) || value['sku'] === undefined)
|
|
@@ -57,6 +59,7 @@ function GlobalSearchProductResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
57
59
|
'id': json['id'],
|
|
58
60
|
'name': json['name'],
|
|
59
61
|
'model': json['model'],
|
|
62
|
+
'modelRaw': json['modelRaw'],
|
|
60
63
|
'slug': json['slug'],
|
|
61
64
|
'sku': json['sku'],
|
|
62
65
|
'thumbnail': json['thumbnail'],
|
|
@@ -79,6 +82,7 @@ function GlobalSearchProductResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
79
82
|
'id': value['id'],
|
|
80
83
|
'name': value['name'],
|
|
81
84
|
'model': value['model'],
|
|
85
|
+
'modelRaw': value['modelRaw'],
|
|
82
86
|
'slug': value['slug'],
|
|
83
87
|
'sku': value['sku'],
|
|
84
88
|
'thumbnail': value['thumbnail'],
|
|
@@ -65,6 +65,12 @@ export interface ProductChildListResource {
|
|
|
65
65
|
* @memberof ProductChildListResource
|
|
66
66
|
*/
|
|
67
67
|
displayInSocialFeed: boolean;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @type {string}
|
|
71
|
+
* @memberof ProductChildListResource
|
|
72
|
+
*/
|
|
73
|
+
quantity?: string | null;
|
|
68
74
|
/**
|
|
69
75
|
*
|
|
70
76
|
* @type {number}
|
|
@@ -60,6 +60,7 @@ function ProductChildListResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
60
60
|
'stock': json['stock'],
|
|
61
61
|
'isDisabled': json['isDisabled'] == null ? undefined : json['isDisabled'],
|
|
62
62
|
'displayInSocialFeed': json['displayInSocialFeed'],
|
|
63
|
+
'quantity': json['quantity'] == null ? undefined : json['quantity'],
|
|
63
64
|
'netsuiteId': json['netsuiteId'],
|
|
64
65
|
'thumbnail': (0, AssetLiteResource_1.AssetLiteResourceFromJSON)(json['thumbnail']),
|
|
65
66
|
'siteDetails': (json['siteDetails'] == null ? null : json['siteDetails'].map(ProductChildSiteDetailLiteResource_1.ProductChildSiteDetailLiteResourceFromJSON)),
|
|
@@ -82,6 +83,7 @@ function ProductChildListResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
82
83
|
'stock': value['stock'],
|
|
83
84
|
'isDisabled': value['isDisabled'],
|
|
84
85
|
'displayInSocialFeed': value['displayInSocialFeed'],
|
|
86
|
+
'quantity': value['quantity'],
|
|
85
87
|
'netsuiteId': value['netsuiteId'],
|
|
86
88
|
'thumbnail': (0, AssetLiteResource_1.AssetLiteResourceToJSON)(value['thumbnail']),
|
|
87
89
|
'siteDetails': (value['siteDetails'] == null ? null : value['siteDetails'].map(ProductChildSiteDetailLiteResource_1.ProductChildSiteDetailLiteResourceToJSON)),
|
|
@@ -28,6 +28,8 @@ function instanceOfProductSearchResultResource(value) {
|
|
|
28
28
|
return false;
|
|
29
29
|
if (!('model' in value) || value['model'] === undefined)
|
|
30
30
|
return false;
|
|
31
|
+
if (!('modelRaw' in value) || value['modelRaw'] === undefined)
|
|
32
|
+
return false;
|
|
31
33
|
if (!('barcode' in value) || value['barcode'] === undefined)
|
|
32
34
|
return false;
|
|
33
35
|
if (!('name' in value) || value['name'] === undefined)
|
|
@@ -69,6 +71,7 @@ function ProductSearchResultResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
69
71
|
'id': json['id'],
|
|
70
72
|
'sku': json['sku'],
|
|
71
73
|
'model': json['model'],
|
|
74
|
+
'modelRaw': json['modelRaw'],
|
|
72
75
|
'barcode': json['barcode'],
|
|
73
76
|
'name': json['name'],
|
|
74
77
|
'slug': json['slug'],
|
|
@@ -98,6 +101,7 @@ function ProductSearchResultResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
98
101
|
'id': value['id'],
|
|
99
102
|
'sku': value['sku'],
|
|
100
103
|
'model': value['model'],
|
|
104
|
+
'modelRaw': value['modelRaw'],
|
|
101
105
|
'barcode': value['barcode'],
|
|
102
106
|
'name': value['name'],
|
|
103
107
|
'slug': value['slug'],
|
|
@@ -60,7 +60,7 @@ export interface StoreResource {
|
|
|
60
60
|
* @type {string}
|
|
61
61
|
* @memberof StoreResource
|
|
62
62
|
*/
|
|
63
|
-
tagLine
|
|
63
|
+
tagLine: string;
|
|
64
64
|
/**
|
|
65
65
|
*
|
|
66
66
|
* @type {string}
|
|
@@ -72,7 +72,7 @@ export interface StoreResource {
|
|
|
72
72
|
* @type {string}
|
|
73
73
|
* @memberof StoreResource
|
|
74
74
|
*/
|
|
75
|
-
website
|
|
75
|
+
website: string;
|
|
76
76
|
/**
|
|
77
77
|
*
|
|
78
78
|
* @type {string}
|
|
@@ -36,8 +36,12 @@ function instanceOfStoreResource(value) {
|
|
|
36
36
|
return false;
|
|
37
37
|
if (!('latitude' in value) || value['latitude'] === undefined)
|
|
38
38
|
return false;
|
|
39
|
+
if (!('tagLine' in value) || value['tagLine'] === undefined)
|
|
40
|
+
return false;
|
|
39
41
|
if (!('email' in value) || value['email'] === undefined)
|
|
40
42
|
return false;
|
|
43
|
+
if (!('website' in value) || value['website'] === undefined)
|
|
44
|
+
return false;
|
|
41
45
|
if (!('suppliers' in value) || value['suppliers'] === undefined)
|
|
42
46
|
return false;
|
|
43
47
|
if (!('address' in value) || value['address'] === undefined)
|
|
@@ -60,9 +64,9 @@ function StoreResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
60
64
|
'phone': json['phone'],
|
|
61
65
|
'longitude': json['longitude'],
|
|
62
66
|
'latitude': json['latitude'],
|
|
63
|
-
'tagLine': json['tag_line']
|
|
67
|
+
'tagLine': json['tag_line'],
|
|
64
68
|
'email': json['email'],
|
|
65
|
-
'website': json['website']
|
|
69
|
+
'website': json['website'],
|
|
66
70
|
'openingHours': json['opening_hours'] == null ? undefined : json['opening_hours'],
|
|
67
71
|
'suppliers': (json['suppliers'] == null ? null : json['suppliers'].map(SupplierLiteResource_1.SupplierLiteResourceFromJSON)),
|
|
68
72
|
'address': (0, AddressResource_1.AddressResourceFromJSON)(json['address']),
|
|
@@ -9,6 +9,7 @@ Name | Type
|
|
|
9
9
|
`id` | number
|
|
10
10
|
`name` | string
|
|
11
11
|
`model` | string
|
|
12
|
+
`modelRaw` | string
|
|
12
13
|
`slug` | string
|
|
13
14
|
`sku` | string
|
|
14
15
|
`thumbnail` | string
|
|
@@ -28,6 +29,7 @@ const example = {
|
|
|
28
29
|
"id": null,
|
|
29
30
|
"name": null,
|
|
30
31
|
"model": null,
|
|
32
|
+
"modelRaw": null,
|
|
31
33
|
"slug": null,
|
|
32
34
|
"sku": null,
|
|
33
35
|
"thumbnail": null,
|
|
@@ -14,6 +14,7 @@ Name | Type
|
|
|
14
14
|
`stock` | number
|
|
15
15
|
`isDisabled` | string
|
|
16
16
|
`displayInSocialFeed` | boolean
|
|
17
|
+
`quantity` | string
|
|
17
18
|
`netsuiteId` | number
|
|
18
19
|
`thumbnail` | [AssetLiteResource](AssetLiteResource.md)
|
|
19
20
|
`siteDetails` | [Array<ProductChildSiteDetailLiteResource>](ProductChildSiteDetailLiteResource.md)
|
|
@@ -33,6 +34,7 @@ const example = {
|
|
|
33
34
|
"stock": null,
|
|
34
35
|
"isDisabled": null,
|
|
35
36
|
"displayInSocialFeed": null,
|
|
37
|
+
"quantity": null,
|
|
36
38
|
"netsuiteId": null,
|
|
37
39
|
"thumbnail": null,
|
|
38
40
|
"siteDetails": null,
|
|
@@ -7,6 +7,7 @@ All URIs are relative to *http://localhost/api*
|
|
|
7
7
|
| [**getAllProductRegistration**](ProductRegistrationApi.md#getallproductregistrationoperation) | **POST** /admin-api/product-registration/all | Auto-generated: getAllProductRegistration |
|
|
8
8
|
| [**indexProductRegistration**](ProductRegistrationApi.md#indexproductregistrationoperation) | **POST** /admin-api/product-registration/list | Auto-generated: indexProductRegistration |
|
|
9
9
|
| [**listAssetsProductRegistration**](ProductRegistrationApi.md#listassetsproductregistrationoperation) | **POST** /admin-api/product-registration/{productRegistration}/assets | Auto-generated: listAssetsProductRegistration |
|
|
10
|
+
| [**listProductsProductRegistration**](ProductRegistrationApi.md#listproductsproductregistration) | **POST** /admin-api/product-registration/{productRegistration}/product/list | Auto-generated: listProductsProductRegistration |
|
|
10
11
|
| [**showProductRegistration**](ProductRegistrationApi.md#showproductregistration) | **GET** /admin-api/product-registration/{productRegistration} | Auto-generated: showProductRegistration |
|
|
11
12
|
|
|
12
13
|
|
|
@@ -209,6 +210,74 @@ No authorization required
|
|
|
209
210
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
210
211
|
|
|
211
212
|
|
|
213
|
+
## listProductsProductRegistration
|
|
214
|
+
|
|
215
|
+
> PaginatedProductChildListResourceResponse listProductsProductRegistration(productRegistration, indexProductChildRequest)
|
|
216
|
+
|
|
217
|
+
Auto-generated: listProductsProductRegistration
|
|
218
|
+
|
|
219
|
+
### Example
|
|
220
|
+
|
|
221
|
+
```ts
|
|
222
|
+
import {
|
|
223
|
+
Configuration,
|
|
224
|
+
ProductRegistrationApi,
|
|
225
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
226
|
+
import type { ListProductsProductRegistrationRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
227
|
+
|
|
228
|
+
async function example() {
|
|
229
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
230
|
+
const api = new ProductRegistrationApi();
|
|
231
|
+
|
|
232
|
+
const body = {
|
|
233
|
+
// number | The id of the productRegistration
|
|
234
|
+
productRegistration: 56,
|
|
235
|
+
// IndexProductChildRequest (optional)
|
|
236
|
+
indexProductChildRequest: ...,
|
|
237
|
+
} satisfies ListProductsProductRegistrationRequest;
|
|
238
|
+
|
|
239
|
+
try {
|
|
240
|
+
const data = await api.listProductsProductRegistration(body);
|
|
241
|
+
console.log(data);
|
|
242
|
+
} catch (error) {
|
|
243
|
+
console.error(error);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// Run the test
|
|
248
|
+
example().catch(console.error);
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Parameters
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
| Name | Type | Description | Notes |
|
|
255
|
+
|------------- | ------------- | ------------- | -------------|
|
|
256
|
+
| **productRegistration** | `number` | The id of the productRegistration | [Defaults to `undefined`] |
|
|
257
|
+
| **indexProductChildRequest** | [IndexProductChildRequest](IndexProductChildRequest.md) | | [Optional] |
|
|
258
|
+
|
|
259
|
+
### Return type
|
|
260
|
+
|
|
261
|
+
[**PaginatedProductChildListResourceResponse**](PaginatedProductChildListResourceResponse.md)
|
|
262
|
+
|
|
263
|
+
### Authorization
|
|
264
|
+
|
|
265
|
+
No authorization required
|
|
266
|
+
|
|
267
|
+
### HTTP request headers
|
|
268
|
+
|
|
269
|
+
- **Content-Type**: `application/json`
|
|
270
|
+
- **Accept**: `application/json`
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
### HTTP response details
|
|
274
|
+
| Status code | Description | Response headers |
|
|
275
|
+
|-------------|-------------|------------------|
|
|
276
|
+
| **200** | Paginated response \\JsonResponse<\\ResourcePaginator<\\ProductChildListResource[]>> | - |
|
|
277
|
+
|
|
278
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
279
|
+
|
|
280
|
+
|
|
212
281
|
## showProductRegistration
|
|
213
282
|
|
|
214
283
|
> ProductRegistrationResource showProductRegistration(productRegistration)
|
|
@@ -9,6 +9,7 @@ Name | Type
|
|
|
9
9
|
`id` | number
|
|
10
10
|
`sku` | string
|
|
11
11
|
`model` | string
|
|
12
|
+
`modelRaw` | string
|
|
12
13
|
`barcode` | string
|
|
13
14
|
`name` | string
|
|
14
15
|
`slug` | string
|
|
@@ -35,6 +36,7 @@ const example = {
|
|
|
35
36
|
"id": null,
|
|
36
37
|
"sku": null,
|
|
37
38
|
"model": null,
|
|
39
|
+
"modelRaw": null,
|
|
38
40
|
"barcode": null,
|
|
39
41
|
"name": null,
|
|
40
42
|
"slug": null,
|
package/package.json
CHANGED
|
@@ -16,8 +16,10 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
GetAllProductRegistrationRequest,
|
|
19
|
+
IndexProductChildRequest,
|
|
19
20
|
IndexProductRegistrationRequest,
|
|
20
21
|
ListAssetsProductRegistrationRequest,
|
|
22
|
+
PaginatedProductChildListResourceResponse,
|
|
21
23
|
PaginatedProductRegistrationAssetResourceResponse,
|
|
22
24
|
PaginatedProductRegistrationListResourceResponse,
|
|
23
25
|
ProductRegistrationLiteResourceArrayResponse,
|
|
@@ -26,10 +28,14 @@ import type {
|
|
|
26
28
|
import {
|
|
27
29
|
GetAllProductRegistrationRequestFromJSON,
|
|
28
30
|
GetAllProductRegistrationRequestToJSON,
|
|
31
|
+
IndexProductChildRequestFromJSON,
|
|
32
|
+
IndexProductChildRequestToJSON,
|
|
29
33
|
IndexProductRegistrationRequestFromJSON,
|
|
30
34
|
IndexProductRegistrationRequestToJSON,
|
|
31
35
|
ListAssetsProductRegistrationRequestFromJSON,
|
|
32
36
|
ListAssetsProductRegistrationRequestToJSON,
|
|
37
|
+
PaginatedProductChildListResourceResponseFromJSON,
|
|
38
|
+
PaginatedProductChildListResourceResponseToJSON,
|
|
33
39
|
PaginatedProductRegistrationAssetResourceResponseFromJSON,
|
|
34
40
|
PaginatedProductRegistrationAssetResourceResponseToJSON,
|
|
35
41
|
PaginatedProductRegistrationListResourceResponseFromJSON,
|
|
@@ -53,6 +59,11 @@ export interface ListAssetsProductRegistrationOperationRequest {
|
|
|
53
59
|
listAssetsProductRegistrationRequest?: ListAssetsProductRegistrationRequest;
|
|
54
60
|
}
|
|
55
61
|
|
|
62
|
+
export interface ListProductsProductRegistrationRequest {
|
|
63
|
+
productRegistration: number;
|
|
64
|
+
indexProductChildRequest?: IndexProductChildRequest;
|
|
65
|
+
}
|
|
66
|
+
|
|
56
67
|
export interface ShowProductRegistrationRequest {
|
|
57
68
|
productRegistration: number;
|
|
58
69
|
}
|
|
@@ -190,6 +201,54 @@ export class ProductRegistrationApi extends runtime.BaseAPI {
|
|
|
190
201
|
return await response.value();
|
|
191
202
|
}
|
|
192
203
|
|
|
204
|
+
/**
|
|
205
|
+
* Creates request options for listProductsProductRegistration without sending the request
|
|
206
|
+
*/
|
|
207
|
+
async listProductsProductRegistrationRequestOpts(requestParameters: ListProductsProductRegistrationRequest): Promise<runtime.RequestOpts> {
|
|
208
|
+
if (requestParameters['productRegistration'] == null) {
|
|
209
|
+
throw new runtime.RequiredError(
|
|
210
|
+
'productRegistration',
|
|
211
|
+
'Required parameter "productRegistration" was null or undefined when calling listProductsProductRegistration().'
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const queryParameters: any = {};
|
|
216
|
+
|
|
217
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
218
|
+
|
|
219
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
let urlPath = `/admin-api/product-registration/{productRegistration}/product/list`;
|
|
223
|
+
urlPath = urlPath.replace(`{${"productRegistration"}}`, encodeURIComponent(String(requestParameters['productRegistration'])));
|
|
224
|
+
|
|
225
|
+
return {
|
|
226
|
+
path: urlPath,
|
|
227
|
+
method: 'POST',
|
|
228
|
+
headers: headerParameters,
|
|
229
|
+
query: queryParameters,
|
|
230
|
+
body: IndexProductChildRequestToJSON(requestParameters['indexProductChildRequest']),
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Auto-generated: listProductsProductRegistration
|
|
236
|
+
*/
|
|
237
|
+
async listProductsProductRegistrationRaw(requestParameters: ListProductsProductRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedProductChildListResourceResponse>> {
|
|
238
|
+
const requestOptions = await this.listProductsProductRegistrationRequestOpts(requestParameters);
|
|
239
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
240
|
+
|
|
241
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedProductChildListResourceResponseFromJSON(jsonValue));
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Auto-generated: listProductsProductRegistration
|
|
246
|
+
*/
|
|
247
|
+
async listProductsProductRegistration(requestParameters: ListProductsProductRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedProductChildListResourceResponse> {
|
|
248
|
+
const response = await this.listProductsProductRegistrationRaw(requestParameters, initOverrides);
|
|
249
|
+
return await response.value();
|
|
250
|
+
}
|
|
251
|
+
|
|
193
252
|
/**
|
|
194
253
|
* Creates request options for showProductRegistration without sending the request
|
|
195
254
|
*/
|
|
@@ -37,6 +37,12 @@ export interface GlobalSearchProductResource {
|
|
|
37
37
|
* @memberof GlobalSearchProductResource
|
|
38
38
|
*/
|
|
39
39
|
model: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof GlobalSearchProductResource
|
|
44
|
+
*/
|
|
45
|
+
modelRaw: string;
|
|
40
46
|
/**
|
|
41
47
|
*
|
|
42
48
|
* @type {string}
|
|
@@ -94,6 +100,7 @@ export function instanceOfGlobalSearchProductResource(value: object): value is G
|
|
|
94
100
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
95
101
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
96
102
|
if (!('model' in value) || value['model'] === undefined) return false;
|
|
103
|
+
if (!('modelRaw' in value) || value['modelRaw'] === undefined) return false;
|
|
97
104
|
if (!('slug' in value) || value['slug'] === undefined) return false;
|
|
98
105
|
if (!('sku' in value) || value['sku'] === undefined) return false;
|
|
99
106
|
if (!('thumbnail' in value) || value['thumbnail'] === undefined) return false;
|
|
@@ -118,6 +125,7 @@ export function GlobalSearchProductResourceFromJSONTyped(json: any, ignoreDiscri
|
|
|
118
125
|
'id': json['id'],
|
|
119
126
|
'name': json['name'],
|
|
120
127
|
'model': json['model'],
|
|
128
|
+
'modelRaw': json['modelRaw'],
|
|
121
129
|
'slug': json['slug'],
|
|
122
130
|
'sku': json['sku'],
|
|
123
131
|
'thumbnail': json['thumbnail'],
|
|
@@ -143,6 +151,7 @@ export function GlobalSearchProductResourceToJSONTyped(value?: GlobalSearchProdu
|
|
|
143
151
|
'id': value['id'],
|
|
144
152
|
'name': value['name'],
|
|
145
153
|
'model': value['model'],
|
|
154
|
+
'modelRaw': value['modelRaw'],
|
|
146
155
|
'slug': value['slug'],
|
|
147
156
|
'sku': value['sku'],
|
|
148
157
|
'thumbnail': value['thumbnail'],
|
|
@@ -82,6 +82,12 @@ export interface ProductChildListResource {
|
|
|
82
82
|
* @memberof ProductChildListResource
|
|
83
83
|
*/
|
|
84
84
|
displayInSocialFeed: boolean;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {string}
|
|
88
|
+
* @memberof ProductChildListResource
|
|
89
|
+
*/
|
|
90
|
+
quantity?: string | null;
|
|
85
91
|
/**
|
|
86
92
|
*
|
|
87
93
|
* @type {number}
|
|
@@ -136,6 +142,7 @@ export function ProductChildListResourceFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
136
142
|
'stock': json['stock'],
|
|
137
143
|
'isDisabled': json['isDisabled'] == null ? undefined : json['isDisabled'],
|
|
138
144
|
'displayInSocialFeed': json['displayInSocialFeed'],
|
|
145
|
+
'quantity': json['quantity'] == null ? undefined : json['quantity'],
|
|
139
146
|
'netsuiteId': json['netsuiteId'],
|
|
140
147
|
'thumbnail': AssetLiteResourceFromJSON(json['thumbnail']),
|
|
141
148
|
'siteDetails': (json['siteDetails'] == null ? null : (json['siteDetails'] as Array<any>).map(ProductChildSiteDetailLiteResourceFromJSON)),
|
|
@@ -161,6 +168,7 @@ export function ProductChildListResourceToJSONTyped(value?: ProductChildListReso
|
|
|
161
168
|
'stock': value['stock'],
|
|
162
169
|
'isDisabled': value['isDisabled'],
|
|
163
170
|
'displayInSocialFeed': value['displayInSocialFeed'],
|
|
171
|
+
'quantity': value['quantity'],
|
|
164
172
|
'netsuiteId': value['netsuiteId'],
|
|
165
173
|
'thumbnail': AssetLiteResourceToJSON(value['thumbnail']),
|
|
166
174
|
'siteDetails': (value['siteDetails'] == null ? null : (value['siteDetails'] as Array<any>).map(ProductChildSiteDetailLiteResourceToJSON)),
|
|
@@ -37,6 +37,12 @@ export interface ProductSearchResultResource {
|
|
|
37
37
|
* @memberof ProductSearchResultResource
|
|
38
38
|
*/
|
|
39
39
|
model: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof ProductSearchResultResource
|
|
44
|
+
*/
|
|
45
|
+
modelRaw: string;
|
|
40
46
|
/**
|
|
41
47
|
*
|
|
42
48
|
* @type {string}
|
|
@@ -136,6 +142,7 @@ export function instanceOfProductSearchResultResource(value: object): value is P
|
|
|
136
142
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
137
143
|
if (!('sku' in value) || value['sku'] === undefined) return false;
|
|
138
144
|
if (!('model' in value) || value['model'] === undefined) return false;
|
|
145
|
+
if (!('modelRaw' in value) || value['modelRaw'] === undefined) return false;
|
|
139
146
|
if (!('barcode' in value) || value['barcode'] === undefined) return false;
|
|
140
147
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
141
148
|
if (!('slug' in value) || value['slug'] === undefined) return false;
|
|
@@ -166,6 +173,7 @@ export function ProductSearchResultResourceFromJSONTyped(json: any, ignoreDiscri
|
|
|
166
173
|
'id': json['id'],
|
|
167
174
|
'sku': json['sku'],
|
|
168
175
|
'model': json['model'],
|
|
176
|
+
'modelRaw': json['modelRaw'],
|
|
169
177
|
'barcode': json['barcode'],
|
|
170
178
|
'name': json['name'],
|
|
171
179
|
'slug': json['slug'],
|
|
@@ -198,6 +206,7 @@ export function ProductSearchResultResourceToJSONTyped(value?: ProductSearchResu
|
|
|
198
206
|
'id': value['id'],
|
|
199
207
|
'sku': value['sku'],
|
|
200
208
|
'model': value['model'],
|
|
209
|
+
'modelRaw': value['modelRaw'],
|
|
201
210
|
'barcode': value['barcode'],
|
|
202
211
|
'name': value['name'],
|
|
203
212
|
'slug': value['slug'],
|
|
@@ -89,7 +89,7 @@ export interface StoreResource {
|
|
|
89
89
|
* @type {string}
|
|
90
90
|
* @memberof StoreResource
|
|
91
91
|
*/
|
|
92
|
-
tagLine
|
|
92
|
+
tagLine: string;
|
|
93
93
|
/**
|
|
94
94
|
*
|
|
95
95
|
* @type {string}
|
|
@@ -101,7 +101,7 @@ export interface StoreResource {
|
|
|
101
101
|
* @type {string}
|
|
102
102
|
* @memberof StoreResource
|
|
103
103
|
*/
|
|
104
|
-
website
|
|
104
|
+
website: string;
|
|
105
105
|
/**
|
|
106
106
|
*
|
|
107
107
|
* @type {string}
|
|
@@ -137,7 +137,9 @@ export function instanceOfStoreResource(value: object): value is StoreResource {
|
|
|
137
137
|
if (!('phone' in value) || value['phone'] === undefined) return false;
|
|
138
138
|
if (!('longitude' in value) || value['longitude'] === undefined) return false;
|
|
139
139
|
if (!('latitude' in value) || value['latitude'] === undefined) return false;
|
|
140
|
+
if (!('tagLine' in value) || value['tagLine'] === undefined) return false;
|
|
140
141
|
if (!('email' in value) || value['email'] === undefined) return false;
|
|
142
|
+
if (!('website' in value) || value['website'] === undefined) return false;
|
|
141
143
|
if (!('suppliers' in value) || value['suppliers'] === undefined) return false;
|
|
142
144
|
if (!('address' in value) || value['address'] === undefined) return false;
|
|
143
145
|
if (!('specialDates' in value) || value['specialDates'] === undefined) return false;
|
|
@@ -160,9 +162,9 @@ export function StoreResourceFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
160
162
|
'phone': json['phone'],
|
|
161
163
|
'longitude': json['longitude'],
|
|
162
164
|
'latitude': json['latitude'],
|
|
163
|
-
'tagLine': json['tag_line']
|
|
165
|
+
'tagLine': json['tag_line'],
|
|
164
166
|
'email': json['email'],
|
|
165
|
-
'website': json['website']
|
|
167
|
+
'website': json['website'],
|
|
166
168
|
'openingHours': json['opening_hours'] == null ? undefined : json['opening_hours'],
|
|
167
169
|
'suppliers': (json['suppliers'] == null ? null : (json['suppliers'] as Array<any>).map(SupplierLiteResourceFromJSON)),
|
|
168
170
|
'address': AddressResourceFromJSON(json['address']),
|