@digital8/lighting-illusions-ts-sdk 0.0.1451 → 0.0.1452
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 +8 -0
- package/README.md +9 -2
- package/dist/apis/ProductRegistrationApi.d.ts +79 -0
- package/dist/apis/ProductRegistrationApi.js +316 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/AddressResource.d.ts +1 -1
- package/dist/models/AddressResource.js +1 -3
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +1 -3
- package/dist/models/GetAllProductRegistrationRequest.d.ts +81 -0
- package/dist/models/GetAllProductRegistrationRequest.js +77 -0
- package/dist/models/IndexProductChildRequest.d.ts +1 -0
- package/dist/models/IndexProductChildRequest.js +1 -0
- package/dist/models/IndexProductRegistrationRequest.d.ts +124 -0
- package/dist/models/IndexProductRegistrationRequest.js +95 -0
- package/dist/models/ListAssetsProductRegistrationRequest.d.ts +103 -0
- package/dist/models/ListAssetsProductRegistrationRequest.js +83 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/docs/GetAllProductRegistrationRequest.md +44 -0
- package/docs/IndexProductRegistrationRequest.md +56 -0
- package/docs/ListAssetsProductRegistrationRequest.md +52 -0
- package/docs/ProductRegistrationApi.md +275 -0
- package/package.json +1 -1
- package/src/apis/ProductRegistrationApi.ts +238 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AddressResource.ts +2 -3
- package/src/models/ExternalApiLogResource.ts +2 -3
- package/src/models/GetAllProductRegistrationRequest.ts +128 -0
- package/src/models/IndexProductChildRequest.ts +1 -0
- package/src/models/IndexProductRegistrationRequest.ts +184 -0
- package/src/models/ListAssetsProductRegistrationRequest.ts +158 -0
- package/src/models/index.ts +3 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
|
|
2
|
+
# ListAssetsProductRegistrationRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`search` | string
|
|
10
|
+
`sortBy` | string
|
|
11
|
+
`sortDirection` | string
|
|
12
|
+
`perPage` | number
|
|
13
|
+
`page` | number
|
|
14
|
+
`productRegistrationId` | Array<string>
|
|
15
|
+
`type` | Array<string>
|
|
16
|
+
`relatedId` | number
|
|
17
|
+
`relatedType` | string
|
|
18
|
+
`includesRelations` | boolean
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import type { ListAssetsProductRegistrationRequest } from '@digital8/lighting-illusions-ts-sdk'
|
|
24
|
+
|
|
25
|
+
// TODO: Update the object below with actual values
|
|
26
|
+
const example = {
|
|
27
|
+
"search": null,
|
|
28
|
+
"sortBy": null,
|
|
29
|
+
"sortDirection": null,
|
|
30
|
+
"perPage": null,
|
|
31
|
+
"page": null,
|
|
32
|
+
"productRegistrationId": null,
|
|
33
|
+
"type": null,
|
|
34
|
+
"relatedId": null,
|
|
35
|
+
"relatedType": null,
|
|
36
|
+
"includesRelations": null,
|
|
37
|
+
} satisfies ListAssetsProductRegistrationRequest
|
|
38
|
+
|
|
39
|
+
console.log(example)
|
|
40
|
+
|
|
41
|
+
// Convert the instance to a JSON string
|
|
42
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
43
|
+
console.log(exampleJSON)
|
|
44
|
+
|
|
45
|
+
// Parse the JSON string back to an object
|
|
46
|
+
const exampleParsed = JSON.parse(exampleJSON) as ListAssetsProductRegistrationRequest
|
|
47
|
+
console.log(exampleParsed)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
51
|
+
|
|
52
|
+
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
# ProductRegistrationApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost/api*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**getAllProductRegistration**](ProductRegistrationApi.md#getallproductregistrationoperation) | **POST** /admin-api/product-registration/all | Auto-generated: getAllProductRegistration |
|
|
8
|
+
| [**indexProductRegistration**](ProductRegistrationApi.md#indexproductregistrationoperation) | **POST** /admin-api/product-registration/list | Auto-generated: indexProductRegistration |
|
|
9
|
+
| [**listAssetsProductRegistration**](ProductRegistrationApi.md#listassetsproductregistrationoperation) | **POST** /admin-api/product-registration/{productRegistration}/assets | Auto-generated: listAssetsProductRegistration |
|
|
10
|
+
| [**showProductRegistration**](ProductRegistrationApi.md#showproductregistration) | **GET** /admin-api/product-registration/{productRegistration} | Auto-generated: showProductRegistration |
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## getAllProductRegistration
|
|
15
|
+
|
|
16
|
+
> ProductRegistrationLiteResourceArrayResponse getAllProductRegistration(getAllProductRegistrationRequest)
|
|
17
|
+
|
|
18
|
+
Auto-generated: getAllProductRegistration
|
|
19
|
+
|
|
20
|
+
### Example
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import {
|
|
24
|
+
Configuration,
|
|
25
|
+
ProductRegistrationApi,
|
|
26
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
27
|
+
import type { GetAllProductRegistrationOperationRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
28
|
+
|
|
29
|
+
async function example() {
|
|
30
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
31
|
+
const api = new ProductRegistrationApi();
|
|
32
|
+
|
|
33
|
+
const body = {
|
|
34
|
+
// GetAllProductRegistrationRequest (optional)
|
|
35
|
+
getAllProductRegistrationRequest: ...,
|
|
36
|
+
} satisfies GetAllProductRegistrationOperationRequest;
|
|
37
|
+
|
|
38
|
+
try {
|
|
39
|
+
const data = await api.getAllProductRegistration(body);
|
|
40
|
+
console.log(data);
|
|
41
|
+
} catch (error) {
|
|
42
|
+
console.error(error);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Run the test
|
|
47
|
+
example().catch(console.error);
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Parameters
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
| Name | Type | Description | Notes |
|
|
54
|
+
|------------- | ------------- | ------------- | -------------|
|
|
55
|
+
| **getAllProductRegistrationRequest** | [GetAllProductRegistrationRequest](GetAllProductRegistrationRequest.md) | | [Optional] |
|
|
56
|
+
|
|
57
|
+
### Return type
|
|
58
|
+
|
|
59
|
+
[**ProductRegistrationLiteResourceArrayResponse**](ProductRegistrationLiteResourceArrayResponse.md)
|
|
60
|
+
|
|
61
|
+
### Authorization
|
|
62
|
+
|
|
63
|
+
No authorization required
|
|
64
|
+
|
|
65
|
+
### HTTP request headers
|
|
66
|
+
|
|
67
|
+
- **Content-Type**: `application/json`
|
|
68
|
+
- **Accept**: `application/json`
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
### HTTP response details
|
|
72
|
+
| Status code | Description | Response headers |
|
|
73
|
+
|-------------|-------------|------------------|
|
|
74
|
+
| **200** | Successful resource response | - |
|
|
75
|
+
|
|
76
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
## indexProductRegistration
|
|
80
|
+
|
|
81
|
+
> PaginatedProductRegistrationListResourceResponse indexProductRegistration(indexProductRegistrationRequest)
|
|
82
|
+
|
|
83
|
+
Auto-generated: indexProductRegistration
|
|
84
|
+
|
|
85
|
+
### Example
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
import {
|
|
89
|
+
Configuration,
|
|
90
|
+
ProductRegistrationApi,
|
|
91
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
92
|
+
import type { IndexProductRegistrationOperationRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
93
|
+
|
|
94
|
+
async function example() {
|
|
95
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
96
|
+
const api = new ProductRegistrationApi();
|
|
97
|
+
|
|
98
|
+
const body = {
|
|
99
|
+
// IndexProductRegistrationRequest (optional)
|
|
100
|
+
indexProductRegistrationRequest: ...,
|
|
101
|
+
} satisfies IndexProductRegistrationOperationRequest;
|
|
102
|
+
|
|
103
|
+
try {
|
|
104
|
+
const data = await api.indexProductRegistration(body);
|
|
105
|
+
console.log(data);
|
|
106
|
+
} catch (error) {
|
|
107
|
+
console.error(error);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Run the test
|
|
112
|
+
example().catch(console.error);
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Parameters
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
| Name | Type | Description | Notes |
|
|
119
|
+
|------------- | ------------- | ------------- | -------------|
|
|
120
|
+
| **indexProductRegistrationRequest** | [IndexProductRegistrationRequest](IndexProductRegistrationRequest.md) | | [Optional] |
|
|
121
|
+
|
|
122
|
+
### Return type
|
|
123
|
+
|
|
124
|
+
[**PaginatedProductRegistrationListResourceResponse**](PaginatedProductRegistrationListResourceResponse.md)
|
|
125
|
+
|
|
126
|
+
### Authorization
|
|
127
|
+
|
|
128
|
+
No authorization required
|
|
129
|
+
|
|
130
|
+
### HTTP request headers
|
|
131
|
+
|
|
132
|
+
- **Content-Type**: `application/json`
|
|
133
|
+
- **Accept**: `application/json`
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
### HTTP response details
|
|
137
|
+
| Status code | Description | Response headers |
|
|
138
|
+
|-------------|-------------|------------------|
|
|
139
|
+
| **200** | Paginated response \\JsonResponse<\\ResourcePaginator<\\ProductRegistrationListResource[]>> | - |
|
|
140
|
+
|
|
141
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
## listAssetsProductRegistration
|
|
145
|
+
|
|
146
|
+
> PaginatedProductRegistrationAssetResourceResponse listAssetsProductRegistration(productRegistration, listAssetsProductRegistrationRequest)
|
|
147
|
+
|
|
148
|
+
Auto-generated: listAssetsProductRegistration
|
|
149
|
+
|
|
150
|
+
### Example
|
|
151
|
+
|
|
152
|
+
```ts
|
|
153
|
+
import {
|
|
154
|
+
Configuration,
|
|
155
|
+
ProductRegistrationApi,
|
|
156
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
157
|
+
import type { ListAssetsProductRegistrationOperationRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
158
|
+
|
|
159
|
+
async function example() {
|
|
160
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
161
|
+
const api = new ProductRegistrationApi();
|
|
162
|
+
|
|
163
|
+
const body = {
|
|
164
|
+
// number | The id of the productRegistration
|
|
165
|
+
productRegistration: 56,
|
|
166
|
+
// ListAssetsProductRegistrationRequest (optional)
|
|
167
|
+
listAssetsProductRegistrationRequest: ...,
|
|
168
|
+
} satisfies ListAssetsProductRegistrationOperationRequest;
|
|
169
|
+
|
|
170
|
+
try {
|
|
171
|
+
const data = await api.listAssetsProductRegistration(body);
|
|
172
|
+
console.log(data);
|
|
173
|
+
} catch (error) {
|
|
174
|
+
console.error(error);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Run the test
|
|
179
|
+
example().catch(console.error);
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Parameters
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
| Name | Type | Description | Notes |
|
|
186
|
+
|------------- | ------------- | ------------- | -------------|
|
|
187
|
+
| **productRegistration** | `number` | The id of the productRegistration | [Defaults to `undefined`] |
|
|
188
|
+
| **listAssetsProductRegistrationRequest** | [ListAssetsProductRegistrationRequest](ListAssetsProductRegistrationRequest.md) | | [Optional] |
|
|
189
|
+
|
|
190
|
+
### Return type
|
|
191
|
+
|
|
192
|
+
[**PaginatedProductRegistrationAssetResourceResponse**](PaginatedProductRegistrationAssetResourceResponse.md)
|
|
193
|
+
|
|
194
|
+
### Authorization
|
|
195
|
+
|
|
196
|
+
No authorization required
|
|
197
|
+
|
|
198
|
+
### HTTP request headers
|
|
199
|
+
|
|
200
|
+
- **Content-Type**: `application/json`
|
|
201
|
+
- **Accept**: `application/json`
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
### HTTP response details
|
|
205
|
+
| Status code | Description | Response headers |
|
|
206
|
+
|-------------|-------------|------------------|
|
|
207
|
+
| **200** | Paginated response \\JsonResponse<\\ResourcePaginator<\\ProductRegistrationAssetResource[]>> | - |
|
|
208
|
+
|
|
209
|
+
[[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
|
+
|
|
212
|
+
## showProductRegistration
|
|
213
|
+
|
|
214
|
+
> ProductRegistrationResource showProductRegistration(productRegistration)
|
|
215
|
+
|
|
216
|
+
Auto-generated: showProductRegistration
|
|
217
|
+
|
|
218
|
+
### Example
|
|
219
|
+
|
|
220
|
+
```ts
|
|
221
|
+
import {
|
|
222
|
+
Configuration,
|
|
223
|
+
ProductRegistrationApi,
|
|
224
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
225
|
+
import type { ShowProductRegistrationRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
226
|
+
|
|
227
|
+
async function example() {
|
|
228
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
229
|
+
const api = new ProductRegistrationApi();
|
|
230
|
+
|
|
231
|
+
const body = {
|
|
232
|
+
// number | The id of the productRegistration
|
|
233
|
+
productRegistration: 56,
|
|
234
|
+
} satisfies ShowProductRegistrationRequest;
|
|
235
|
+
|
|
236
|
+
try {
|
|
237
|
+
const data = await api.showProductRegistration(body);
|
|
238
|
+
console.log(data);
|
|
239
|
+
} catch (error) {
|
|
240
|
+
console.error(error);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// Run the test
|
|
245
|
+
example().catch(console.error);
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Parameters
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
| Name | Type | Description | Notes |
|
|
252
|
+
|------------- | ------------- | ------------- | -------------|
|
|
253
|
+
| **productRegistration** | `number` | The id of the productRegistration | [Defaults to `undefined`] |
|
|
254
|
+
|
|
255
|
+
### Return type
|
|
256
|
+
|
|
257
|
+
[**ProductRegistrationResource**](ProductRegistrationResource.md)
|
|
258
|
+
|
|
259
|
+
### Authorization
|
|
260
|
+
|
|
261
|
+
No authorization required
|
|
262
|
+
|
|
263
|
+
### HTTP request headers
|
|
264
|
+
|
|
265
|
+
- **Content-Type**: Not defined
|
|
266
|
+
- **Accept**: `application/json`
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
### HTTP response details
|
|
270
|
+
| Status code | Description | Response headers |
|
|
271
|
+
|-------------|-------------|------------------|
|
|
272
|
+
| **200** | Successful resource response | - |
|
|
273
|
+
|
|
274
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
275
|
+
|
package/package.json
CHANGED
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
GetAllProductRegistrationRequest,
|
|
19
|
+
IndexProductRegistrationRequest,
|
|
20
|
+
ListAssetsProductRegistrationRequest,
|
|
21
|
+
PaginatedProductRegistrationAssetResourceResponse,
|
|
22
|
+
PaginatedProductRegistrationListResourceResponse,
|
|
23
|
+
ProductRegistrationLiteResourceArrayResponse,
|
|
24
|
+
ProductRegistrationResource,
|
|
25
|
+
} from '../models/index';
|
|
26
|
+
import {
|
|
27
|
+
GetAllProductRegistrationRequestFromJSON,
|
|
28
|
+
GetAllProductRegistrationRequestToJSON,
|
|
29
|
+
IndexProductRegistrationRequestFromJSON,
|
|
30
|
+
IndexProductRegistrationRequestToJSON,
|
|
31
|
+
ListAssetsProductRegistrationRequestFromJSON,
|
|
32
|
+
ListAssetsProductRegistrationRequestToJSON,
|
|
33
|
+
PaginatedProductRegistrationAssetResourceResponseFromJSON,
|
|
34
|
+
PaginatedProductRegistrationAssetResourceResponseToJSON,
|
|
35
|
+
PaginatedProductRegistrationListResourceResponseFromJSON,
|
|
36
|
+
PaginatedProductRegistrationListResourceResponseToJSON,
|
|
37
|
+
ProductRegistrationLiteResourceArrayResponseFromJSON,
|
|
38
|
+
ProductRegistrationLiteResourceArrayResponseToJSON,
|
|
39
|
+
ProductRegistrationResourceFromJSON,
|
|
40
|
+
ProductRegistrationResourceToJSON,
|
|
41
|
+
} from '../models/index';
|
|
42
|
+
|
|
43
|
+
export interface GetAllProductRegistrationOperationRequest {
|
|
44
|
+
getAllProductRegistrationRequest?: GetAllProductRegistrationRequest;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface IndexProductRegistrationOperationRequest {
|
|
48
|
+
indexProductRegistrationRequest?: IndexProductRegistrationRequest;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface ListAssetsProductRegistrationOperationRequest {
|
|
52
|
+
productRegistration: number;
|
|
53
|
+
listAssetsProductRegistrationRequest?: ListAssetsProductRegistrationRequest;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface ShowProductRegistrationRequest {
|
|
57
|
+
productRegistration: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
*/
|
|
63
|
+
export class ProductRegistrationApi extends runtime.BaseAPI {
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Creates request options for getAllProductRegistration without sending the request
|
|
67
|
+
*/
|
|
68
|
+
async getAllProductRegistrationRequestOpts(requestParameters: GetAllProductRegistrationOperationRequest): Promise<runtime.RequestOpts> {
|
|
69
|
+
const queryParameters: any = {};
|
|
70
|
+
|
|
71
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
72
|
+
|
|
73
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
let urlPath = `/admin-api/product-registration/all`;
|
|
77
|
+
|
|
78
|
+
return {
|
|
79
|
+
path: urlPath,
|
|
80
|
+
method: 'POST',
|
|
81
|
+
headers: headerParameters,
|
|
82
|
+
query: queryParameters,
|
|
83
|
+
body: GetAllProductRegistrationRequestToJSON(requestParameters['getAllProductRegistrationRequest']),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Auto-generated: getAllProductRegistration
|
|
89
|
+
*/
|
|
90
|
+
async getAllProductRegistrationRaw(requestParameters: GetAllProductRegistrationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductRegistrationLiteResourceArrayResponse>> {
|
|
91
|
+
const requestOptions = await this.getAllProductRegistrationRequestOpts(requestParameters);
|
|
92
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
93
|
+
|
|
94
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProductRegistrationLiteResourceArrayResponseFromJSON(jsonValue));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Auto-generated: getAllProductRegistration
|
|
99
|
+
*/
|
|
100
|
+
async getAllProductRegistration(requestParameters: GetAllProductRegistrationOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductRegistrationLiteResourceArrayResponse> {
|
|
101
|
+
const response = await this.getAllProductRegistrationRaw(requestParameters, initOverrides);
|
|
102
|
+
return await response.value();
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Creates request options for indexProductRegistration without sending the request
|
|
107
|
+
*/
|
|
108
|
+
async indexProductRegistrationRequestOpts(requestParameters: IndexProductRegistrationOperationRequest): Promise<runtime.RequestOpts> {
|
|
109
|
+
const queryParameters: any = {};
|
|
110
|
+
|
|
111
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
112
|
+
|
|
113
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
let urlPath = `/admin-api/product-registration/list`;
|
|
117
|
+
|
|
118
|
+
return {
|
|
119
|
+
path: urlPath,
|
|
120
|
+
method: 'POST',
|
|
121
|
+
headers: headerParameters,
|
|
122
|
+
query: queryParameters,
|
|
123
|
+
body: IndexProductRegistrationRequestToJSON(requestParameters['indexProductRegistrationRequest']),
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Auto-generated: indexProductRegistration
|
|
129
|
+
*/
|
|
130
|
+
async indexProductRegistrationRaw(requestParameters: IndexProductRegistrationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedProductRegistrationListResourceResponse>> {
|
|
131
|
+
const requestOptions = await this.indexProductRegistrationRequestOpts(requestParameters);
|
|
132
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
133
|
+
|
|
134
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedProductRegistrationListResourceResponseFromJSON(jsonValue));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Auto-generated: indexProductRegistration
|
|
139
|
+
*/
|
|
140
|
+
async indexProductRegistration(requestParameters: IndexProductRegistrationOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedProductRegistrationListResourceResponse> {
|
|
141
|
+
const response = await this.indexProductRegistrationRaw(requestParameters, initOverrides);
|
|
142
|
+
return await response.value();
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Creates request options for listAssetsProductRegistration without sending the request
|
|
147
|
+
*/
|
|
148
|
+
async listAssetsProductRegistrationRequestOpts(requestParameters: ListAssetsProductRegistrationOperationRequest): Promise<runtime.RequestOpts> {
|
|
149
|
+
if (requestParameters['productRegistration'] == null) {
|
|
150
|
+
throw new runtime.RequiredError(
|
|
151
|
+
'productRegistration',
|
|
152
|
+
'Required parameter "productRegistration" was null or undefined when calling listAssetsProductRegistration().'
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const queryParameters: any = {};
|
|
157
|
+
|
|
158
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
159
|
+
|
|
160
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
let urlPath = `/admin-api/product-registration/{productRegistration}/assets`;
|
|
164
|
+
urlPath = urlPath.replace(`{${"productRegistration"}}`, encodeURIComponent(String(requestParameters['productRegistration'])));
|
|
165
|
+
|
|
166
|
+
return {
|
|
167
|
+
path: urlPath,
|
|
168
|
+
method: 'POST',
|
|
169
|
+
headers: headerParameters,
|
|
170
|
+
query: queryParameters,
|
|
171
|
+
body: ListAssetsProductRegistrationRequestToJSON(requestParameters['listAssetsProductRegistrationRequest']),
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Auto-generated: listAssetsProductRegistration
|
|
177
|
+
*/
|
|
178
|
+
async listAssetsProductRegistrationRaw(requestParameters: ListAssetsProductRegistrationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedProductRegistrationAssetResourceResponse>> {
|
|
179
|
+
const requestOptions = await this.listAssetsProductRegistrationRequestOpts(requestParameters);
|
|
180
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
181
|
+
|
|
182
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedProductRegistrationAssetResourceResponseFromJSON(jsonValue));
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Auto-generated: listAssetsProductRegistration
|
|
187
|
+
*/
|
|
188
|
+
async listAssetsProductRegistration(requestParameters: ListAssetsProductRegistrationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedProductRegistrationAssetResourceResponse> {
|
|
189
|
+
const response = await this.listAssetsProductRegistrationRaw(requestParameters, initOverrides);
|
|
190
|
+
return await response.value();
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Creates request options for showProductRegistration without sending the request
|
|
195
|
+
*/
|
|
196
|
+
async showProductRegistrationRequestOpts(requestParameters: ShowProductRegistrationRequest): Promise<runtime.RequestOpts> {
|
|
197
|
+
if (requestParameters['productRegistration'] == null) {
|
|
198
|
+
throw new runtime.RequiredError(
|
|
199
|
+
'productRegistration',
|
|
200
|
+
'Required parameter "productRegistration" was null or undefined when calling showProductRegistration().'
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
const queryParameters: any = {};
|
|
205
|
+
|
|
206
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
let urlPath = `/admin-api/product-registration/{productRegistration}`;
|
|
210
|
+
urlPath = urlPath.replace(`{${"productRegistration"}}`, encodeURIComponent(String(requestParameters['productRegistration'])));
|
|
211
|
+
|
|
212
|
+
return {
|
|
213
|
+
path: urlPath,
|
|
214
|
+
method: 'GET',
|
|
215
|
+
headers: headerParameters,
|
|
216
|
+
query: queryParameters,
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Auto-generated: showProductRegistration
|
|
222
|
+
*/
|
|
223
|
+
async showProductRegistrationRaw(requestParameters: ShowProductRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductRegistrationResource>> {
|
|
224
|
+
const requestOptions = await this.showProductRegistrationRequestOpts(requestParameters);
|
|
225
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
226
|
+
|
|
227
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProductRegistrationResourceFromJSON(jsonValue));
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Auto-generated: showProductRegistration
|
|
232
|
+
*/
|
|
233
|
+
async showProductRegistration(requestParameters: ShowProductRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductRegistrationResource> {
|
|
234
|
+
const response = await this.showProductRegistrationRaw(requestParameters, initOverrides);
|
|
235
|
+
return await response.value();
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
}
|
package/src/apis/index.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from './OverlayTemplateApi';
|
|
|
11
11
|
export * from './ProductApi';
|
|
12
12
|
export * from './ProductCategoryApi';
|
|
13
13
|
export * from './ProductRangeApi';
|
|
14
|
+
export * from './ProductRegistrationApi';
|
|
14
15
|
export * from './ProductTypeApi';
|
|
15
16
|
export * from './SiteApi';
|
|
16
17
|
export * from './SupplierApi';
|
|
@@ -30,7 +30,7 @@ export interface AddressResource {
|
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof AddressResource
|
|
32
32
|
*/
|
|
33
|
-
company
|
|
33
|
+
company?: string | null;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {string}
|
|
@@ -79,7 +79,6 @@ export interface AddressResource {
|
|
|
79
79
|
* Check if a given object implements the AddressResource interface.
|
|
80
80
|
*/
|
|
81
81
|
export function instanceOfAddressResource(value: object): value is AddressResource {
|
|
82
|
-
if (!('company' in value) || value['company'] === undefined) return false;
|
|
83
82
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
84
83
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
85
84
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
@@ -100,7 +99,7 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
100
99
|
return {
|
|
101
100
|
|
|
102
101
|
'id': json['id'] == null ? undefined : json['id'],
|
|
103
|
-
'company': json['company'],
|
|
102
|
+
'company': json['company'] == null ? undefined : json['company'],
|
|
104
103
|
'line1': json['line1'],
|
|
105
104
|
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
106
105
|
'postcode': json['postcode'],
|
|
@@ -74,7 +74,7 @@ export interface ExternalApiLogResource {
|
|
|
74
74
|
* @type {string}
|
|
75
75
|
* @memberof ExternalApiLogResource
|
|
76
76
|
*/
|
|
77
|
-
requestPayload
|
|
77
|
+
requestPayload?: string | null;
|
|
78
78
|
/**
|
|
79
79
|
*
|
|
80
80
|
* @type {string}
|
|
@@ -106,7 +106,6 @@ export function instanceOfExternalApiLogResource(value: object): value is Extern
|
|
|
106
106
|
if (!('exteranlApiLoggableId' in value) || value['exteranlApiLoggableId'] === undefined) return false;
|
|
107
107
|
if (!('endpoint' in value) || value['endpoint'] === undefined) return false;
|
|
108
108
|
if (!('responseCode' in value) || value['responseCode'] === undefined) return false;
|
|
109
|
-
if (!('requestPayload' in value) || value['requestPayload'] === undefined) return false;
|
|
110
109
|
if (!('responsePayload' in value) || value['responsePayload'] === undefined) return false;
|
|
111
110
|
if (!('site' in value) || value['site'] === undefined) return false;
|
|
112
111
|
return true;
|
|
@@ -129,7 +128,7 @@ export function ExternalApiLogResourceFromJSONTyped(json: any, ignoreDiscriminat
|
|
|
129
128
|
'exteranlApiLoggableId': json['exteranlApiLoggableId'],
|
|
130
129
|
'endpoint': json['endpoint'],
|
|
131
130
|
'responseCode': json['responseCode'],
|
|
132
|
-
'requestPayload': json['requestPayload'],
|
|
131
|
+
'requestPayload': json['requestPayload'] == null ? undefined : json['requestPayload'],
|
|
133
132
|
'responsePayload': json['responsePayload'],
|
|
134
133
|
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
|
135
134
|
'site': SiteLiteResourceFromJSON(json['site']),
|