@digital8/lighting-illusions-ts-sdk 0.0.621 → 0.0.623
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 +22 -16
- package/README.md +18 -10
- package/dist/apis/DefinitionApi.d.ts +85 -0
- package/dist/apis/DefinitionApi.js +355 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/DefinitionListResource.d.ts +38 -0
- package/dist/models/DefinitionListResource.js +55 -0
- package/dist/models/DefinitionListResourceArrayResponse.d.ts +33 -0
- package/dist/models/DefinitionListResourceArrayResponse.js +50 -0
- package/dist/models/DefinitionResource.d.ts +44 -0
- package/dist/models/DefinitionResource.js +59 -0
- package/dist/models/DefinitionResourceArrayResponse.d.ts +33 -0
- package/dist/models/DefinitionResourceArrayResponse.js +50 -0
- package/dist/models/GetAllDefinitionRequest.d.ts +80 -0
- package/dist/models/GetAllDefinitionRequest.js +76 -0
- package/dist/models/IndexDefinitionRequest.d.ts +92 -0
- package/dist/models/IndexDefinitionRequest.js +80 -0
- package/dist/models/PaginatedDefinitionListResourceResponse.d.ts +40 -0
- package/dist/models/PaginatedDefinitionListResourceResponse.js +57 -0
- package/dist/models/PaginatedDefinitionResourceResponse.d.ts +40 -0
- package/dist/models/PaginatedDefinitionResourceResponse.js +57 -0
- package/dist/models/StoreDefinitionRequest.d.ts +38 -0
- package/dist/models/StoreDefinitionRequest.js +55 -0
- package/dist/models/StoreProductCategoryRequest.d.ts +2 -2
- package/dist/models/UpdateDefinitionRequest.d.ts +38 -0
- package/dist/models/UpdateDefinitionRequest.js +55 -0
- package/dist/models/index.d.ts +10 -8
- package/dist/models/index.js +10 -8
- package/docs/DefinitionApi.md +407 -0
- package/docs/{DocumentFrontendResource.md → DefinitionListResource.md} +4 -6
- package/docs/{ProductCompareResourceArrayResponse.md → DefinitionListResourceArrayResponse.md} +5 -5
- package/docs/{DocumentFrontendResourceArrayResponse.md → DefinitionResource.md} +10 -6
- package/docs/{AssetFrontendResourceArrayResponse.md → DefinitionResourceArrayResponse.md} +5 -5
- package/docs/GetAllDefinitionRequest.md +44 -0
- package/docs/IndexDefinitionRequest.md +48 -0
- package/docs/{OverlayTemplateAssetFrontendResourceArrayResponse.md → PaginatedDefinitionListResourceResponse.md} +7 -5
- package/docs/PaginatedDefinitionResourceResponse.md +36 -0
- package/docs/StoreDefinitionRequest.md +36 -0
- package/docs/StoreProductCategoryRequest.md +1 -1
- package/docs/UpdateDefinitionRequest.md +36 -0
- package/package.json +1 -1
- package/src/apis/DefinitionApi.ts +286 -0
- package/src/apis/index.ts +1 -0
- package/src/models/DefinitionListResource.ts +75 -0
- package/src/models/DefinitionListResourceArrayResponse.ts +73 -0
- package/src/models/DefinitionResource.ts +84 -0
- package/src/models/DefinitionResourceArrayResponse.ts +73 -0
- package/src/models/GetAllDefinitionRequest.ts +127 -0
- package/src/models/IndexDefinitionRequest.ts +143 -0
- package/src/models/PaginatedDefinitionListResourceResponse.ts +90 -0
- package/src/models/PaginatedDefinitionResourceResponse.ts +90 -0
- package/src/models/StoreDefinitionRequest.ts +75 -0
- package/src/models/StoreProductCategoryRequest.ts +2 -2
- package/src/models/UpdateDefinitionRequest.ts +75 -0
- package/src/models/index.ts +10 -8
- package/dist/models/AssetFrontendResource.d.ts +0 -74
- package/dist/models/AssetFrontendResource.js +0 -79
- package/dist/models/AssetFrontendResourceArrayResponse.d.ts +0 -33
- package/dist/models/AssetFrontendResourceArrayResponse.js +0 -50
- package/dist/models/DocumentFrontendResource.d.ts +0 -44
- package/dist/models/DocumentFrontendResource.js +0 -57
- package/dist/models/DocumentFrontendResourceArrayResponse.d.ts +0 -33
- package/dist/models/DocumentFrontendResourceArrayResponse.js +0 -50
- package/dist/models/OverlayTemplateAssetFrontendResource.d.ts +0 -62
- package/dist/models/OverlayTemplateAssetFrontendResource.js +0 -71
- package/dist/models/OverlayTemplateAssetFrontendResourceArrayResponse.d.ts +0 -33
- package/dist/models/OverlayTemplateAssetFrontendResourceArrayResponse.js +0 -50
- package/dist/models/ProductCompareResource.d.ts +0 -141
- package/dist/models/ProductCompareResource.js +0 -124
- package/dist/models/ProductCompareResourceArrayResponse.d.ts +0 -33
- package/dist/models/ProductCompareResourceArrayResponse.js +0 -50
- package/docs/AssetFrontendResource.md +0 -48
- package/docs/OverlayTemplateAssetFrontendResource.md +0 -44
- package/docs/ProductCompareResource.md +0 -70
- package/src/models/AssetFrontendResource.ts +0 -129
- package/src/models/AssetFrontendResourceArrayResponse.ts +0 -73
- package/src/models/DocumentFrontendResource.ts +0 -83
- package/src/models/DocumentFrontendResourceArrayResponse.ts +0 -73
- package/src/models/OverlayTemplateAssetFrontendResource.ts +0 -111
- package/src/models/OverlayTemplateAssetFrontendResourceArrayResponse.ts +0 -73
- package/src/models/ProductCompareResource.ts +0 -236
- package/src/models/ProductCompareResourceArrayResponse.ts +0 -73
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# PaginatedDefinitionResourceResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<DefinitionResource>](DefinitionResource.md)
|
|
10
|
+
`meta` | [PagingMetadata](PagingMetadata.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { PaginatedDefinitionResourceResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"data": null,
|
|
20
|
+
"meta": null,
|
|
21
|
+
} satisfies PaginatedDefinitionResourceResponse
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as PaginatedDefinitionResourceResponse
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# StoreDefinitionRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`name` | string
|
|
10
|
+
`content` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { StoreDefinitionRequest } from '@digital8/lighting-illusions-ts-sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"name": null,
|
|
20
|
+
"content": null,
|
|
21
|
+
} satisfies StoreDefinitionRequest
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as StoreDefinitionRequest
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# UpdateDefinitionRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`name` | string
|
|
10
|
+
`content` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { UpdateDefinitionRequest } from '@digital8/lighting-illusions-ts-sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"name": null,
|
|
20
|
+
"content": null,
|
|
21
|
+
} satisfies UpdateDefinitionRequest
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as UpdateDefinitionRequest
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
package/package.json
CHANGED
|
@@ -0,0 +1,286 @@
|
|
|
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
|
+
DefinitionListResourceArrayResponse,
|
|
19
|
+
DefinitionResource,
|
|
20
|
+
GenericResponse,
|
|
21
|
+
GetAllDefinitionRequest,
|
|
22
|
+
IndexDefinitionRequest,
|
|
23
|
+
PaginatedDefinitionListResourceResponse,
|
|
24
|
+
StoreDefinitionRequest,
|
|
25
|
+
UpdateDefinitionRequest,
|
|
26
|
+
} from '../models/index';
|
|
27
|
+
import {
|
|
28
|
+
DefinitionListResourceArrayResponseFromJSON,
|
|
29
|
+
DefinitionListResourceArrayResponseToJSON,
|
|
30
|
+
DefinitionResourceFromJSON,
|
|
31
|
+
DefinitionResourceToJSON,
|
|
32
|
+
GenericResponseFromJSON,
|
|
33
|
+
GenericResponseToJSON,
|
|
34
|
+
GetAllDefinitionRequestFromJSON,
|
|
35
|
+
GetAllDefinitionRequestToJSON,
|
|
36
|
+
IndexDefinitionRequestFromJSON,
|
|
37
|
+
IndexDefinitionRequestToJSON,
|
|
38
|
+
PaginatedDefinitionListResourceResponseFromJSON,
|
|
39
|
+
PaginatedDefinitionListResourceResponseToJSON,
|
|
40
|
+
StoreDefinitionRequestFromJSON,
|
|
41
|
+
StoreDefinitionRequestToJSON,
|
|
42
|
+
UpdateDefinitionRequestFromJSON,
|
|
43
|
+
UpdateDefinitionRequestToJSON,
|
|
44
|
+
} from '../models/index';
|
|
45
|
+
|
|
46
|
+
export interface DestroyDefinitionRequest {
|
|
47
|
+
definition: number;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface GetAllDefinitionOperationRequest {
|
|
51
|
+
getAllDefinitionRequest?: GetAllDefinitionRequest;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface IndexDefinitionOperationRequest {
|
|
55
|
+
indexDefinitionRequest?: IndexDefinitionRequest;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface ShowDefinitionRequest {
|
|
59
|
+
definition: number;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface StoreDefinitionOperationRequest {
|
|
63
|
+
storeDefinitionRequest?: StoreDefinitionRequest;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface UpdateDefinitionOperationRequest {
|
|
67
|
+
definition: number;
|
|
68
|
+
updateDefinitionRequest?: UpdateDefinitionRequest;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
*/
|
|
74
|
+
export class DefinitionApi extends runtime.BaseAPI {
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Auto-generated: destroyDefinition
|
|
78
|
+
*/
|
|
79
|
+
async destroyDefinitionRaw(requestParameters: DestroyDefinitionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
|
|
80
|
+
if (requestParameters['definition'] == null) {
|
|
81
|
+
throw new runtime.RequiredError(
|
|
82
|
+
'definition',
|
|
83
|
+
'Required parameter "definition" was null or undefined when calling destroyDefinition().'
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const queryParameters: any = {};
|
|
88
|
+
|
|
89
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
let urlPath = `/admin-api/definition/{definition}/delete`;
|
|
93
|
+
urlPath = urlPath.replace(`{${"definition"}}`, encodeURIComponent(String(requestParameters['definition'])));
|
|
94
|
+
|
|
95
|
+
const response = await this.request({
|
|
96
|
+
path: urlPath,
|
|
97
|
+
method: 'DELETE',
|
|
98
|
+
headers: headerParameters,
|
|
99
|
+
query: queryParameters,
|
|
100
|
+
}, initOverrides);
|
|
101
|
+
|
|
102
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Auto-generated: destroyDefinition
|
|
107
|
+
*/
|
|
108
|
+
async destroyDefinition(requestParameters: DestroyDefinitionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
|
|
109
|
+
const response = await this.destroyDefinitionRaw(requestParameters, initOverrides);
|
|
110
|
+
return await response.value();
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Auto-generated: getAllDefinition
|
|
115
|
+
*/
|
|
116
|
+
async getAllDefinitionRaw(requestParameters: GetAllDefinitionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DefinitionListResourceArrayResponse>> {
|
|
117
|
+
const queryParameters: any = {};
|
|
118
|
+
|
|
119
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
120
|
+
|
|
121
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
let urlPath = `/admin-api/definition/all`;
|
|
125
|
+
|
|
126
|
+
const response = await this.request({
|
|
127
|
+
path: urlPath,
|
|
128
|
+
method: 'POST',
|
|
129
|
+
headers: headerParameters,
|
|
130
|
+
query: queryParameters,
|
|
131
|
+
body: GetAllDefinitionRequestToJSON(requestParameters['getAllDefinitionRequest']),
|
|
132
|
+
}, initOverrides);
|
|
133
|
+
|
|
134
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DefinitionListResourceArrayResponseFromJSON(jsonValue));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Auto-generated: getAllDefinition
|
|
139
|
+
*/
|
|
140
|
+
async getAllDefinition(requestParameters: GetAllDefinitionOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DefinitionListResourceArrayResponse> {
|
|
141
|
+
const response = await this.getAllDefinitionRaw(requestParameters, initOverrides);
|
|
142
|
+
return await response.value();
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Auto-generated: indexDefinition
|
|
147
|
+
*/
|
|
148
|
+
async indexDefinitionRaw(requestParameters: IndexDefinitionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedDefinitionListResourceResponse>> {
|
|
149
|
+
const queryParameters: any = {};
|
|
150
|
+
|
|
151
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
152
|
+
|
|
153
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
let urlPath = `/admin-api/definition/list`;
|
|
157
|
+
|
|
158
|
+
const response = await this.request({
|
|
159
|
+
path: urlPath,
|
|
160
|
+
method: 'POST',
|
|
161
|
+
headers: headerParameters,
|
|
162
|
+
query: queryParameters,
|
|
163
|
+
body: IndexDefinitionRequestToJSON(requestParameters['indexDefinitionRequest']),
|
|
164
|
+
}, initOverrides);
|
|
165
|
+
|
|
166
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedDefinitionListResourceResponseFromJSON(jsonValue));
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Auto-generated: indexDefinition
|
|
171
|
+
*/
|
|
172
|
+
async indexDefinition(requestParameters: IndexDefinitionOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedDefinitionListResourceResponse> {
|
|
173
|
+
const response = await this.indexDefinitionRaw(requestParameters, initOverrides);
|
|
174
|
+
return await response.value();
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Auto-generated: showDefinition
|
|
179
|
+
*/
|
|
180
|
+
async showDefinitionRaw(requestParameters: ShowDefinitionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DefinitionResource>> {
|
|
181
|
+
if (requestParameters['definition'] == null) {
|
|
182
|
+
throw new runtime.RequiredError(
|
|
183
|
+
'definition',
|
|
184
|
+
'Required parameter "definition" was null or undefined when calling showDefinition().'
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const queryParameters: any = {};
|
|
189
|
+
|
|
190
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
let urlPath = `/admin-api/definition/{definition}`;
|
|
194
|
+
urlPath = urlPath.replace(`{${"definition"}}`, encodeURIComponent(String(requestParameters['definition'])));
|
|
195
|
+
|
|
196
|
+
const response = await this.request({
|
|
197
|
+
path: urlPath,
|
|
198
|
+
method: 'GET',
|
|
199
|
+
headers: headerParameters,
|
|
200
|
+
query: queryParameters,
|
|
201
|
+
}, initOverrides);
|
|
202
|
+
|
|
203
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DefinitionResourceFromJSON(jsonValue));
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Auto-generated: showDefinition
|
|
208
|
+
*/
|
|
209
|
+
async showDefinition(requestParameters: ShowDefinitionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DefinitionResource> {
|
|
210
|
+
const response = await this.showDefinitionRaw(requestParameters, initOverrides);
|
|
211
|
+
return await response.value();
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Auto-generated: storeDefinition
|
|
216
|
+
*/
|
|
217
|
+
async storeDefinitionRaw(requestParameters: StoreDefinitionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DefinitionResource>> {
|
|
218
|
+
const queryParameters: any = {};
|
|
219
|
+
|
|
220
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
221
|
+
|
|
222
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
let urlPath = `/admin-api/definition/create`;
|
|
226
|
+
|
|
227
|
+
const response = await this.request({
|
|
228
|
+
path: urlPath,
|
|
229
|
+
method: 'POST',
|
|
230
|
+
headers: headerParameters,
|
|
231
|
+
query: queryParameters,
|
|
232
|
+
body: StoreDefinitionRequestToJSON(requestParameters['storeDefinitionRequest']),
|
|
233
|
+
}, initOverrides);
|
|
234
|
+
|
|
235
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DefinitionResourceFromJSON(jsonValue));
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Auto-generated: storeDefinition
|
|
240
|
+
*/
|
|
241
|
+
async storeDefinition(requestParameters: StoreDefinitionOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DefinitionResource> {
|
|
242
|
+
const response = await this.storeDefinitionRaw(requestParameters, initOverrides);
|
|
243
|
+
return await response.value();
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Auto-generated: updateDefinition
|
|
248
|
+
*/
|
|
249
|
+
async updateDefinitionRaw(requestParameters: UpdateDefinitionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DefinitionResource>> {
|
|
250
|
+
if (requestParameters['definition'] == null) {
|
|
251
|
+
throw new runtime.RequiredError(
|
|
252
|
+
'definition',
|
|
253
|
+
'Required parameter "definition" was null or undefined when calling updateDefinition().'
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
const queryParameters: any = {};
|
|
258
|
+
|
|
259
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
260
|
+
|
|
261
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
let urlPath = `/admin-api/definition/{definition}/update`;
|
|
265
|
+
urlPath = urlPath.replace(`{${"definition"}}`, encodeURIComponent(String(requestParameters['definition'])));
|
|
266
|
+
|
|
267
|
+
const response = await this.request({
|
|
268
|
+
path: urlPath,
|
|
269
|
+
method: 'PUT',
|
|
270
|
+
headers: headerParameters,
|
|
271
|
+
query: queryParameters,
|
|
272
|
+
body: UpdateDefinitionRequestToJSON(requestParameters['updateDefinitionRequest']),
|
|
273
|
+
}, initOverrides);
|
|
274
|
+
|
|
275
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DefinitionResourceFromJSON(jsonValue));
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Auto-generated: updateDefinition
|
|
280
|
+
*/
|
|
281
|
+
async updateDefinition(requestParameters: UpdateDefinitionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DefinitionResource> {
|
|
282
|
+
const response = await this.updateDefinitionRaw(requestParameters, initOverrides);
|
|
283
|
+
return await response.value();
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
}
|
package/src/apis/index.ts
CHANGED
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface DefinitionListResource
|
|
20
|
+
*/
|
|
21
|
+
export interface DefinitionListResource {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof DefinitionListResource
|
|
26
|
+
*/
|
|
27
|
+
id: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof DefinitionListResource
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the DefinitionListResource interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfDefinitionListResource(value: object): value is DefinitionListResource {
|
|
40
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
41
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function DefinitionListResourceFromJSON(json: any): DefinitionListResource {
|
|
46
|
+
return DefinitionListResourceFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function DefinitionListResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): DefinitionListResource {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'id': json['id'],
|
|
56
|
+
'name': json['name'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function DefinitionListResourceToJSON(json: any): DefinitionListResource {
|
|
61
|
+
return DefinitionListResourceToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function DefinitionListResourceToJSONTyped(value?: DefinitionListResource | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'id': value['id'],
|
|
72
|
+
'name': value['name'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { DefinitionListResource } from './DefinitionListResource';
|
|
17
|
+
import {
|
|
18
|
+
DefinitionListResourceFromJSON,
|
|
19
|
+
DefinitionListResourceFromJSONTyped,
|
|
20
|
+
DefinitionListResourceToJSON,
|
|
21
|
+
DefinitionListResourceToJSONTyped,
|
|
22
|
+
} from './DefinitionListResource';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface DefinitionListResourceArrayResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface DefinitionListResourceArrayResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<DefinitionListResource>}
|
|
33
|
+
* @memberof DefinitionListResourceArrayResponse
|
|
34
|
+
*/
|
|
35
|
+
data?: Array<DefinitionListResource>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the DefinitionListResourceArrayResponse interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfDefinitionListResourceArrayResponse(value: object): value is DefinitionListResourceArrayResponse {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function DefinitionListResourceArrayResponseFromJSON(json: any): DefinitionListResourceArrayResponse {
|
|
46
|
+
return DefinitionListResourceArrayResponseFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function DefinitionListResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DefinitionListResourceArrayResponse {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(DefinitionListResourceFromJSON)),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function DefinitionListResourceArrayResponseToJSON(json: any): DefinitionListResourceArrayResponse {
|
|
60
|
+
return DefinitionListResourceArrayResponseToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function DefinitionListResourceArrayResponseToJSONTyped(value?: DefinitionListResourceArrayResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(DefinitionListResourceToJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface DefinitionResource
|
|
20
|
+
*/
|
|
21
|
+
export interface DefinitionResource {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof DefinitionResource
|
|
26
|
+
*/
|
|
27
|
+
id: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof DefinitionResource
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof DefinitionResource
|
|
38
|
+
*/
|
|
39
|
+
content: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the DefinitionResource interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfDefinitionResource(value: object): value is DefinitionResource {
|
|
46
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
47
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
48
|
+
if (!('content' in value) || value['content'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function DefinitionResourceFromJSON(json: any): DefinitionResource {
|
|
53
|
+
return DefinitionResourceFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function DefinitionResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): DefinitionResource {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'id': json['id'],
|
|
63
|
+
'name': json['name'],
|
|
64
|
+
'content': json['content'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function DefinitionResourceToJSON(json: any): DefinitionResource {
|
|
69
|
+
return DefinitionResourceToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function DefinitionResourceToJSONTyped(value?: DefinitionResource | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'id': value['id'],
|
|
80
|
+
'name': value['name'],
|
|
81
|
+
'content': value['content'],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|