@digital8/lighting-illusions-ts-sdk 0.0.1886 → 0.0.1888
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 +20 -0
- package/README.md +20 -2
- package/dist/apis/DocumentApi.d.ts +156 -0
- package/dist/apis/DocumentApi.js +613 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +1 -3
- package/dist/models/AddressResource.d.ts +1 -1
- package/dist/models/AddressResource.js +3 -1
- package/dist/models/AttachDocumentablesToDocumentRequest.d.ts +33 -0
- package/dist/models/AttachDocumentablesToDocumentRequest.js +52 -0
- package/dist/models/AttachDocumentablesToDocumentRequestDocumentablesInner.d.ts +53 -0
- package/dist/models/AttachDocumentablesToDocumentRequestDocumentablesInner.js +66 -0
- package/dist/models/CreateDocumentFileRequest.d.ts +38 -0
- package/dist/models/CreateDocumentFileRequest.js +55 -0
- package/dist/models/CreateDocumentRequest.d.ts +44 -0
- package/dist/models/CreateDocumentRequest.js +57 -0
- package/dist/models/DetachDocumentablesFromDocumentRequest.d.ts +33 -0
- package/dist/models/DetachDocumentablesFromDocumentRequest.js +52 -0
- package/dist/models/DetachDocumentablesFromDocumentRequestDocumentablesInner.d.ts +47 -0
- package/dist/models/DetachDocumentablesFromDocumentRequestDocumentablesInner.js +64 -0
- package/dist/models/SearchAllDocumentsRequest.d.ts +95 -0
- package/dist/models/SearchAllDocumentsRequest.js +86 -0
- package/dist/models/SearchDocumentsRequest.d.ts +107 -0
- package/dist/models/SearchDocumentsRequest.js +90 -0
- package/dist/models/StoreFrontendResource.d.ts +1 -1
- package/dist/models/StoreFrontendResource.js +3 -1
- package/dist/models/StoreResource.d.ts +2 -2
- package/dist/models/StoreResource.js +6 -2
- package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateFrontendResource.js +1 -3
- package/dist/models/UpdateDocumentRequest.d.ts +44 -0
- package/dist/models/UpdateDocumentRequest.js +57 -0
- package/dist/models/index.d.ts +9 -0
- package/dist/models/index.js +9 -0
- package/docs/AttachDocumentablesToDocumentRequest.md +34 -0
- package/docs/AttachDocumentablesToDocumentRequestDocumentablesInner.md +38 -0
- package/docs/CreateDocumentFileRequest.md +36 -0
- package/docs/CreateDocumentRequest.md +38 -0
- package/docs/DetachDocumentablesFromDocumentRequest.md +34 -0
- package/docs/DetachDocumentablesFromDocumentRequestDocumentablesInner.md +36 -0
- package/docs/DocumentApi.md +611 -0
- package/docs/SearchAllDocumentsRequest.md +46 -0
- package/docs/SearchDocumentsRequest.md +50 -0
- package/docs/StoreSpecialDateFrontendResource.md +1 -1
- package/docs/UpdateDocumentRequest.md +38 -0
- package/package.json +1 -1
- package/src/apis/DocumentApi.ts +496 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AddressFrontendResource.ts +2 -3
- package/src/models/AddressResource.ts +3 -2
- package/src/models/AttachDocumentablesToDocumentRequest.ts +74 -0
- package/src/models/AttachDocumentablesToDocumentRequestDocumentablesInner.ts +95 -0
- package/src/models/CreateDocumentFileRequest.ts +75 -0
- package/src/models/CreateDocumentRequest.ts +83 -0
- package/src/models/DetachDocumentablesFromDocumentRequest.ts +74 -0
- package/src/models/DetachDocumentablesFromDocumentRequestDocumentablesInner.ts +87 -0
- package/src/models/SearchAllDocumentsRequest.ts +145 -0
- package/src/models/SearchDocumentsRequest.ts +161 -0
- package/src/models/StoreFrontendResource.ts +3 -2
- package/src/models/StoreResource.ts +6 -4
- package/src/models/StoreSpecialDateFrontendResource.ts +3 -4
- package/src/models/UpdateDocumentRequest.ts +83 -0
- package/src/models/index.ts +9 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# UpdateDocumentRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`name` | string
|
|
10
|
+
`fileId` | string
|
|
11
|
+
`siteIds` | Array<string>
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { UpdateDocumentRequest } from '@digital8/lighting-illusions-ts-sdk'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"name": null,
|
|
21
|
+
"fileId": null,
|
|
22
|
+
"siteIds": null,
|
|
23
|
+
} satisfies UpdateDocumentRequest
|
|
24
|
+
|
|
25
|
+
console.log(example)
|
|
26
|
+
|
|
27
|
+
// Convert the instance to a JSON string
|
|
28
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
+
console.log(exampleJSON)
|
|
30
|
+
|
|
31
|
+
// Parse the JSON string back to an object
|
|
32
|
+
const exampleParsed = JSON.parse(exampleJSON) as UpdateDocumentRequest
|
|
33
|
+
console.log(exampleParsed)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
37
|
+
|
|
38
|
+
|
package/package.json
CHANGED
|
@@ -0,0 +1,496 @@
|
|
|
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
|
+
AttachDocumentablesToDocumentRequest,
|
|
19
|
+
CreateDocumentFileRequest,
|
|
20
|
+
CreateDocumentRequest,
|
|
21
|
+
DetachDocumentablesFromDocumentRequest,
|
|
22
|
+
DocumentFileForUploadResource,
|
|
23
|
+
DocumentResource,
|
|
24
|
+
DocumentResourceArrayResponse,
|
|
25
|
+
GenericResponse,
|
|
26
|
+
PaginatedDocumentResourceResponse,
|
|
27
|
+
SearchAllDocumentsRequest,
|
|
28
|
+
SearchDocumentsRequest,
|
|
29
|
+
UpdateDocumentRequest,
|
|
30
|
+
} from '../models/index';
|
|
31
|
+
import {
|
|
32
|
+
AttachDocumentablesToDocumentRequestFromJSON,
|
|
33
|
+
AttachDocumentablesToDocumentRequestToJSON,
|
|
34
|
+
CreateDocumentFileRequestFromJSON,
|
|
35
|
+
CreateDocumentFileRequestToJSON,
|
|
36
|
+
CreateDocumentRequestFromJSON,
|
|
37
|
+
CreateDocumentRequestToJSON,
|
|
38
|
+
DetachDocumentablesFromDocumentRequestFromJSON,
|
|
39
|
+
DetachDocumentablesFromDocumentRequestToJSON,
|
|
40
|
+
DocumentFileForUploadResourceFromJSON,
|
|
41
|
+
DocumentFileForUploadResourceToJSON,
|
|
42
|
+
DocumentResourceFromJSON,
|
|
43
|
+
DocumentResourceToJSON,
|
|
44
|
+
DocumentResourceArrayResponseFromJSON,
|
|
45
|
+
DocumentResourceArrayResponseToJSON,
|
|
46
|
+
GenericResponseFromJSON,
|
|
47
|
+
GenericResponseToJSON,
|
|
48
|
+
PaginatedDocumentResourceResponseFromJSON,
|
|
49
|
+
PaginatedDocumentResourceResponseToJSON,
|
|
50
|
+
SearchAllDocumentsRequestFromJSON,
|
|
51
|
+
SearchAllDocumentsRequestToJSON,
|
|
52
|
+
SearchDocumentsRequestFromJSON,
|
|
53
|
+
SearchDocumentsRequestToJSON,
|
|
54
|
+
UpdateDocumentRequestFromJSON,
|
|
55
|
+
UpdateDocumentRequestToJSON,
|
|
56
|
+
} from '../models/index';
|
|
57
|
+
|
|
58
|
+
export interface AttachDocumentablesDocumentRequest {
|
|
59
|
+
document: number;
|
|
60
|
+
attachDocumentablesToDocumentRequest?: AttachDocumentablesToDocumentRequest;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface DestroyDocumentRequest {
|
|
64
|
+
document: number;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface DetachDocumentablesDocumentRequest {
|
|
68
|
+
document: number;
|
|
69
|
+
detachDocumentablesFromDocumentRequest?: DetachDocumentablesFromDocumentRequest;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface GetAllDocumentRequest {
|
|
73
|
+
searchAllDocumentsRequest?: SearchAllDocumentsRequest;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface IndexDocumentRequest {
|
|
77
|
+
searchDocumentsRequest?: SearchDocumentsRequest;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface ShowDocumentRequest {
|
|
81
|
+
document: number;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface StoreDocumentRequest {
|
|
85
|
+
createDocumentRequest?: CreateDocumentRequest;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface StoreDocumentFileRequest {
|
|
89
|
+
createDocumentFileRequest?: CreateDocumentFileRequest;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface UpdateDocumentOperationRequest {
|
|
93
|
+
document: number;
|
|
94
|
+
updateDocumentRequest?: UpdateDocumentRequest;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
*/
|
|
100
|
+
export class DocumentApi extends runtime.BaseAPI {
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Creates request options for attachDocumentablesDocument without sending the request
|
|
104
|
+
*/
|
|
105
|
+
async attachDocumentablesDocumentRequestOpts(requestParameters: AttachDocumentablesDocumentRequest): Promise<runtime.RequestOpts> {
|
|
106
|
+
if (requestParameters['document'] == null) {
|
|
107
|
+
throw new runtime.RequiredError(
|
|
108
|
+
'document',
|
|
109
|
+
'Required parameter "document" was null or undefined when calling attachDocumentablesDocument().'
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const queryParameters: any = {};
|
|
114
|
+
|
|
115
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
116
|
+
|
|
117
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
let urlPath = `/admin-api/document/{document}/attach-documentables`;
|
|
121
|
+
urlPath = urlPath.replace(`{${"document"}}`, encodeURIComponent(String(requestParameters['document'])));
|
|
122
|
+
|
|
123
|
+
return {
|
|
124
|
+
path: urlPath,
|
|
125
|
+
method: 'POST',
|
|
126
|
+
headers: headerParameters,
|
|
127
|
+
query: queryParameters,
|
|
128
|
+
body: AttachDocumentablesToDocumentRequestToJSON(requestParameters['attachDocumentablesToDocumentRequest']),
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Auto-generated: attachDocumentablesDocument
|
|
134
|
+
*/
|
|
135
|
+
async attachDocumentablesDocumentRaw(requestParameters: AttachDocumentablesDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentResource>> {
|
|
136
|
+
const requestOptions = await this.attachDocumentablesDocumentRequestOpts(requestParameters);
|
|
137
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
138
|
+
|
|
139
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DocumentResourceFromJSON(jsonValue));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Auto-generated: attachDocumentablesDocument
|
|
144
|
+
*/
|
|
145
|
+
async attachDocumentablesDocument(requestParameters: AttachDocumentablesDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResource> {
|
|
146
|
+
const response = await this.attachDocumentablesDocumentRaw(requestParameters, initOverrides);
|
|
147
|
+
return await response.value();
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Creates request options for destroyDocument without sending the request
|
|
152
|
+
*/
|
|
153
|
+
async destroyDocumentRequestOpts(requestParameters: DestroyDocumentRequest): Promise<runtime.RequestOpts> {
|
|
154
|
+
if (requestParameters['document'] == null) {
|
|
155
|
+
throw new runtime.RequiredError(
|
|
156
|
+
'document',
|
|
157
|
+
'Required parameter "document" was null or undefined when calling destroyDocument().'
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const queryParameters: any = {};
|
|
162
|
+
|
|
163
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
let urlPath = `/admin-api/document/{document}/delete`;
|
|
167
|
+
urlPath = urlPath.replace(`{${"document"}}`, encodeURIComponent(String(requestParameters['document'])));
|
|
168
|
+
|
|
169
|
+
return {
|
|
170
|
+
path: urlPath,
|
|
171
|
+
method: 'DELETE',
|
|
172
|
+
headers: headerParameters,
|
|
173
|
+
query: queryParameters,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Auto-generated: destroyDocument
|
|
179
|
+
*/
|
|
180
|
+
async destroyDocumentRaw(requestParameters: DestroyDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
|
|
181
|
+
const requestOptions = await this.destroyDocumentRequestOpts(requestParameters);
|
|
182
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
183
|
+
|
|
184
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Auto-generated: destroyDocument
|
|
189
|
+
*/
|
|
190
|
+
async destroyDocument(requestParameters: DestroyDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
|
|
191
|
+
const response = await this.destroyDocumentRaw(requestParameters, initOverrides);
|
|
192
|
+
return await response.value();
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Creates request options for detachDocumentablesDocument without sending the request
|
|
197
|
+
*/
|
|
198
|
+
async detachDocumentablesDocumentRequestOpts(requestParameters: DetachDocumentablesDocumentRequest): Promise<runtime.RequestOpts> {
|
|
199
|
+
if (requestParameters['document'] == null) {
|
|
200
|
+
throw new runtime.RequiredError(
|
|
201
|
+
'document',
|
|
202
|
+
'Required parameter "document" was null or undefined when calling detachDocumentablesDocument().'
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
const queryParameters: any = {};
|
|
207
|
+
|
|
208
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
209
|
+
|
|
210
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
let urlPath = `/admin-api/document/{document}/detach-documentables`;
|
|
214
|
+
urlPath = urlPath.replace(`{${"document"}}`, encodeURIComponent(String(requestParameters['document'])));
|
|
215
|
+
|
|
216
|
+
return {
|
|
217
|
+
path: urlPath,
|
|
218
|
+
method: 'POST',
|
|
219
|
+
headers: headerParameters,
|
|
220
|
+
query: queryParameters,
|
|
221
|
+
body: DetachDocumentablesFromDocumentRequestToJSON(requestParameters['detachDocumentablesFromDocumentRequest']),
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Auto-generated: detachDocumentablesDocument
|
|
227
|
+
*/
|
|
228
|
+
async detachDocumentablesDocumentRaw(requestParameters: DetachDocumentablesDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentResource>> {
|
|
229
|
+
const requestOptions = await this.detachDocumentablesDocumentRequestOpts(requestParameters);
|
|
230
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
231
|
+
|
|
232
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DocumentResourceFromJSON(jsonValue));
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Auto-generated: detachDocumentablesDocument
|
|
237
|
+
*/
|
|
238
|
+
async detachDocumentablesDocument(requestParameters: DetachDocumentablesDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResource> {
|
|
239
|
+
const response = await this.detachDocumentablesDocumentRaw(requestParameters, initOverrides);
|
|
240
|
+
return await response.value();
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Creates request options for getAllDocument without sending the request
|
|
245
|
+
*/
|
|
246
|
+
async getAllDocumentRequestOpts(requestParameters: GetAllDocumentRequest): Promise<runtime.RequestOpts> {
|
|
247
|
+
const queryParameters: any = {};
|
|
248
|
+
|
|
249
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
250
|
+
|
|
251
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
let urlPath = `/admin-api/document/all`;
|
|
255
|
+
|
|
256
|
+
return {
|
|
257
|
+
path: urlPath,
|
|
258
|
+
method: 'POST',
|
|
259
|
+
headers: headerParameters,
|
|
260
|
+
query: queryParameters,
|
|
261
|
+
body: SearchAllDocumentsRequestToJSON(requestParameters['searchAllDocumentsRequest']),
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Auto-generated: getAllDocument
|
|
267
|
+
*/
|
|
268
|
+
async getAllDocumentRaw(requestParameters: GetAllDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentResourceArrayResponse>> {
|
|
269
|
+
const requestOptions = await this.getAllDocumentRequestOpts(requestParameters);
|
|
270
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
271
|
+
|
|
272
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DocumentResourceArrayResponseFromJSON(jsonValue));
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Auto-generated: getAllDocument
|
|
277
|
+
*/
|
|
278
|
+
async getAllDocument(requestParameters: GetAllDocumentRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResourceArrayResponse> {
|
|
279
|
+
const response = await this.getAllDocumentRaw(requestParameters, initOverrides);
|
|
280
|
+
return await response.value();
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Creates request options for indexDocument without sending the request
|
|
285
|
+
*/
|
|
286
|
+
async indexDocumentRequestOpts(requestParameters: IndexDocumentRequest): Promise<runtime.RequestOpts> {
|
|
287
|
+
const queryParameters: any = {};
|
|
288
|
+
|
|
289
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
290
|
+
|
|
291
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
let urlPath = `/admin-api/document/list`;
|
|
295
|
+
|
|
296
|
+
return {
|
|
297
|
+
path: urlPath,
|
|
298
|
+
method: 'POST',
|
|
299
|
+
headers: headerParameters,
|
|
300
|
+
query: queryParameters,
|
|
301
|
+
body: SearchDocumentsRequestToJSON(requestParameters['searchDocumentsRequest']),
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Auto-generated: indexDocument
|
|
307
|
+
*/
|
|
308
|
+
async indexDocumentRaw(requestParameters: IndexDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedDocumentResourceResponse>> {
|
|
309
|
+
const requestOptions = await this.indexDocumentRequestOpts(requestParameters);
|
|
310
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
311
|
+
|
|
312
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedDocumentResourceResponseFromJSON(jsonValue));
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Auto-generated: indexDocument
|
|
317
|
+
*/
|
|
318
|
+
async indexDocument(requestParameters: IndexDocumentRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedDocumentResourceResponse> {
|
|
319
|
+
const response = await this.indexDocumentRaw(requestParameters, initOverrides);
|
|
320
|
+
return await response.value();
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Creates request options for showDocument without sending the request
|
|
325
|
+
*/
|
|
326
|
+
async showDocumentRequestOpts(requestParameters: ShowDocumentRequest): Promise<runtime.RequestOpts> {
|
|
327
|
+
if (requestParameters['document'] == null) {
|
|
328
|
+
throw new runtime.RequiredError(
|
|
329
|
+
'document',
|
|
330
|
+
'Required parameter "document" was null or undefined when calling showDocument().'
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
const queryParameters: any = {};
|
|
335
|
+
|
|
336
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
let urlPath = `/admin-api/document/{document}`;
|
|
340
|
+
urlPath = urlPath.replace(`{${"document"}}`, encodeURIComponent(String(requestParameters['document'])));
|
|
341
|
+
|
|
342
|
+
return {
|
|
343
|
+
path: urlPath,
|
|
344
|
+
method: 'GET',
|
|
345
|
+
headers: headerParameters,
|
|
346
|
+
query: queryParameters,
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Auto-generated: showDocument
|
|
352
|
+
*/
|
|
353
|
+
async showDocumentRaw(requestParameters: ShowDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentResource>> {
|
|
354
|
+
const requestOptions = await this.showDocumentRequestOpts(requestParameters);
|
|
355
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
356
|
+
|
|
357
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DocumentResourceFromJSON(jsonValue));
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Auto-generated: showDocument
|
|
362
|
+
*/
|
|
363
|
+
async showDocument(requestParameters: ShowDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResource> {
|
|
364
|
+
const response = await this.showDocumentRaw(requestParameters, initOverrides);
|
|
365
|
+
return await response.value();
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Creates request options for storeDocument without sending the request
|
|
370
|
+
*/
|
|
371
|
+
async storeDocumentRequestOpts(requestParameters: StoreDocumentRequest): Promise<runtime.RequestOpts> {
|
|
372
|
+
const queryParameters: any = {};
|
|
373
|
+
|
|
374
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
375
|
+
|
|
376
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
let urlPath = `/admin-api/document/create`;
|
|
380
|
+
|
|
381
|
+
return {
|
|
382
|
+
path: urlPath,
|
|
383
|
+
method: 'POST',
|
|
384
|
+
headers: headerParameters,
|
|
385
|
+
query: queryParameters,
|
|
386
|
+
body: CreateDocumentRequestToJSON(requestParameters['createDocumentRequest']),
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Auto-generated: storeDocument
|
|
392
|
+
*/
|
|
393
|
+
async storeDocumentRaw(requestParameters: StoreDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentResource>> {
|
|
394
|
+
const requestOptions = await this.storeDocumentRequestOpts(requestParameters);
|
|
395
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
396
|
+
|
|
397
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DocumentResourceFromJSON(jsonValue));
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Auto-generated: storeDocument
|
|
402
|
+
*/
|
|
403
|
+
async storeDocument(requestParameters: StoreDocumentRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResource> {
|
|
404
|
+
const response = await this.storeDocumentRaw(requestParameters, initOverrides);
|
|
405
|
+
return await response.value();
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Creates request options for storeDocumentFile without sending the request
|
|
410
|
+
*/
|
|
411
|
+
async storeDocumentFileRequestOpts(requestParameters: StoreDocumentFileRequest): Promise<runtime.RequestOpts> {
|
|
412
|
+
const queryParameters: any = {};
|
|
413
|
+
|
|
414
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
415
|
+
|
|
416
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
let urlPath = `/admin-api/document/files`;
|
|
420
|
+
|
|
421
|
+
return {
|
|
422
|
+
path: urlPath,
|
|
423
|
+
method: 'POST',
|
|
424
|
+
headers: headerParameters,
|
|
425
|
+
query: queryParameters,
|
|
426
|
+
body: CreateDocumentFileRequestToJSON(requestParameters['createDocumentFileRequest']),
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Auto-generated: storeDocumentFile
|
|
432
|
+
*/
|
|
433
|
+
async storeDocumentFileRaw(requestParameters: StoreDocumentFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentFileForUploadResource>> {
|
|
434
|
+
const requestOptions = await this.storeDocumentFileRequestOpts(requestParameters);
|
|
435
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
436
|
+
|
|
437
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DocumentFileForUploadResourceFromJSON(jsonValue));
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Auto-generated: storeDocumentFile
|
|
442
|
+
*/
|
|
443
|
+
async storeDocumentFile(requestParameters: StoreDocumentFileRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentFileForUploadResource> {
|
|
444
|
+
const response = await this.storeDocumentFileRaw(requestParameters, initOverrides);
|
|
445
|
+
return await response.value();
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Creates request options for updateDocument without sending the request
|
|
450
|
+
*/
|
|
451
|
+
async updateDocumentRequestOpts(requestParameters: UpdateDocumentOperationRequest): Promise<runtime.RequestOpts> {
|
|
452
|
+
if (requestParameters['document'] == null) {
|
|
453
|
+
throw new runtime.RequiredError(
|
|
454
|
+
'document',
|
|
455
|
+
'Required parameter "document" was null or undefined when calling updateDocument().'
|
|
456
|
+
);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
const queryParameters: any = {};
|
|
460
|
+
|
|
461
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
462
|
+
|
|
463
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
let urlPath = `/admin-api/document/{document}/update`;
|
|
467
|
+
urlPath = urlPath.replace(`{${"document"}}`, encodeURIComponent(String(requestParameters['document'])));
|
|
468
|
+
|
|
469
|
+
return {
|
|
470
|
+
path: urlPath,
|
|
471
|
+
method: 'PUT',
|
|
472
|
+
headers: headerParameters,
|
|
473
|
+
query: queryParameters,
|
|
474
|
+
body: UpdateDocumentRequestToJSON(requestParameters['updateDocumentRequest']),
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Auto-generated: updateDocument
|
|
480
|
+
*/
|
|
481
|
+
async updateDocumentRaw(requestParameters: UpdateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentResource>> {
|
|
482
|
+
const requestOptions = await this.updateDocumentRequestOpts(requestParameters);
|
|
483
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
484
|
+
|
|
485
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DocumentResourceFromJSON(jsonValue));
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Auto-generated: updateDocument
|
|
490
|
+
*/
|
|
491
|
+
async updateDocument(requestParameters: UpdateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResource> {
|
|
492
|
+
const response = await this.updateDocumentRaw(requestParameters, initOverrides);
|
|
493
|
+
return await response.value();
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
}
|
package/src/apis/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './AssetApi';
|
|
|
5
5
|
export * from './AttributeApi';
|
|
6
6
|
export * from './BlogCategoryApi';
|
|
7
7
|
export * from './DefinitionApi';
|
|
8
|
+
export * from './DocumentApi';
|
|
8
9
|
export * from './ExternalApiLogApi';
|
|
9
10
|
export * from './FrontendComponentApi';
|
|
10
11
|
export * from './GoogleCategoryApi';
|
|
@@ -36,7 +36,7 @@ export interface AddressFrontendResource {
|
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof AddressFrontendResource
|
|
38
38
|
*/
|
|
39
|
-
line2
|
|
39
|
+
line2?: string | null;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
@@ -74,7 +74,6 @@ export interface AddressFrontendResource {
|
|
|
74
74
|
*/
|
|
75
75
|
export function instanceOfAddressFrontendResource(value: object): value is AddressFrontendResource {
|
|
76
76
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
77
|
-
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
78
77
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
79
78
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
80
79
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -95,7 +94,7 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
95
94
|
|
|
96
95
|
'company': json['company'] == null ? undefined : json['company'],
|
|
97
96
|
'line1': json['line1'],
|
|
98
|
-
'line2': json['line2'],
|
|
97
|
+
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
99
98
|
'postcode': json['postcode'],
|
|
100
99
|
'suburb': json['suburb'],
|
|
101
100
|
'country': json['country'],
|
|
@@ -42,7 +42,7 @@ export interface AddressResource {
|
|
|
42
42
|
* @type {string}
|
|
43
43
|
* @memberof AddressResource
|
|
44
44
|
*/
|
|
45
|
-
line2
|
|
45
|
+
line2: string;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {string}
|
|
@@ -81,6 +81,7 @@ export interface AddressResource {
|
|
|
81
81
|
export function instanceOfAddressResource(value: object): value is AddressResource {
|
|
82
82
|
if (!('company' in value) || value['company'] === undefined) return false;
|
|
83
83
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
84
|
+
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
84
85
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
85
86
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
86
87
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -102,7 +103,7 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
102
103
|
'id': json['id'] == null ? undefined : json['id'],
|
|
103
104
|
'company': json['company'],
|
|
104
105
|
'line1': json['line_1'],
|
|
105
|
-
'line2': json['line_2']
|
|
106
|
+
'line2': json['line_2'],
|
|
106
107
|
'postcode': json['postcode'],
|
|
107
108
|
'suburb': json['suburb'],
|
|
108
109
|
'country': json['country'],
|
|
@@ -0,0 +1,74 @@
|
|
|
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 { AttachDocumentablesToDocumentRequestDocumentablesInner } from './AttachDocumentablesToDocumentRequestDocumentablesInner';
|
|
17
|
+
import {
|
|
18
|
+
AttachDocumentablesToDocumentRequestDocumentablesInnerFromJSON,
|
|
19
|
+
AttachDocumentablesToDocumentRequestDocumentablesInnerFromJSONTyped,
|
|
20
|
+
AttachDocumentablesToDocumentRequestDocumentablesInnerToJSON,
|
|
21
|
+
AttachDocumentablesToDocumentRequestDocumentablesInnerToJSONTyped,
|
|
22
|
+
} from './AttachDocumentablesToDocumentRequestDocumentablesInner';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface AttachDocumentablesToDocumentRequest
|
|
28
|
+
*/
|
|
29
|
+
export interface AttachDocumentablesToDocumentRequest {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<AttachDocumentablesToDocumentRequestDocumentablesInner>}
|
|
33
|
+
* @memberof AttachDocumentablesToDocumentRequest
|
|
34
|
+
*/
|
|
35
|
+
documentables: Array<AttachDocumentablesToDocumentRequestDocumentablesInner>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the AttachDocumentablesToDocumentRequest interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfAttachDocumentablesToDocumentRequest(value: object): value is AttachDocumentablesToDocumentRequest {
|
|
42
|
+
if (!('documentables' in value) || value['documentables'] === undefined) return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function AttachDocumentablesToDocumentRequestFromJSON(json: any): AttachDocumentablesToDocumentRequest {
|
|
47
|
+
return AttachDocumentablesToDocumentRequestFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function AttachDocumentablesToDocumentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttachDocumentablesToDocumentRequest {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
|
|
56
|
+
'documentables': ((json['documentables'] as Array<any>).map(AttachDocumentablesToDocumentRequestDocumentablesInnerFromJSON)),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function AttachDocumentablesToDocumentRequestToJSON(json: any): AttachDocumentablesToDocumentRequest {
|
|
61
|
+
return AttachDocumentablesToDocumentRequestToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function AttachDocumentablesToDocumentRequestToJSONTyped(value?: AttachDocumentablesToDocumentRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'documentables': ((value['documentables'] as Array<any>).map(AttachDocumentablesToDocumentRequestDocumentablesInnerToJSON)),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|