@digital8/lighting-illusions-ts-sdk 0.0.2307 → 0.0.2308
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 +14 -0
- package/README.md +18 -2
- package/dist/apis/AdminsApi.d.ts +33 -0
- package/dist/apis/AdminsApi.js +125 -0
- package/dist/apis/CustomersApi.d.ts +52 -0
- package/dist/apis/CustomersApi.js +192 -0
- package/dist/apis/RolesApi.d.ts +66 -0
- package/dist/apis/RolesApi.js +250 -0
- package/dist/models/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +1 -3
- package/dist/models/AdminResource.d.ts +2 -2
- package/dist/models/AttachAdminsToRoleRequest.d.ts +32 -0
- package/dist/models/AttachAdminsToRoleRequest.js +51 -0
- package/dist/models/AttachPermissionsToRoleRequest.d.ts +32 -0
- package/dist/models/AttachPermissionsToRoleRequest.js +51 -0
- package/dist/models/AttachRolesToAdminRequest.d.ts +32 -0
- package/dist/models/AttachRolesToAdminRequest.js +51 -0
- package/dist/models/CreateCustomerAddressRequest.d.ts +90 -0
- package/dist/models/CreateCustomerAddressRequest.js +83 -0
- package/dist/models/CreateCustomerRequest.d.ts +7 -1
- package/dist/models/CreateCustomerRequest.js +3 -3
- package/dist/models/CustomerListResource.d.ts +6 -0
- package/dist/models/CustomerListResource.js +4 -0
- package/dist/models/CustomerResource.d.ts +10 -2
- package/dist/models/CustomerResource.js +9 -3
- package/dist/models/NetsuiteSyncLiteResource.d.ts +44 -0
- package/dist/models/NetsuiteSyncLiteResource.js +59 -0
- package/dist/models/NetsuiteSyncLiteResourceArrayResponse.d.ts +33 -0
- package/dist/models/NetsuiteSyncLiteResourceArrayResponse.js +50 -0
- package/dist/models/OrderFulfillmentResource.d.ts +1 -1
- package/dist/models/OrderFulfillmentResource.js +3 -1
- package/dist/models/RoleListResource.d.ts +6 -0
- package/dist/models/RoleListResource.js +4 -0
- package/dist/models/RoleResource.d.ts +9 -2
- package/dist/models/RoleResource.js +5 -0
- package/dist/models/StoreFrontendResource.d.ts +1 -1
- package/dist/models/StoreFrontendResource.js +1 -3
- package/dist/models/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +3 -1
- package/dist/models/StoreResource.d.ts +1 -1
- package/dist/models/StoreResource.js +3 -1
- package/dist/models/UpdateCustomerAddressRequest.d.ts +90 -0
- package/dist/models/UpdateCustomerAddressRequest.js +83 -0
- package/dist/models/UpdateCustomerRequest.d.ts +6 -0
- package/dist/models/UpdateCustomerRequest.js +2 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +7 -0
- package/docs/AdminResource.md +1 -1
- package/docs/AdminsApi.md +138 -0
- package/docs/AttachAdminsToRoleRequest.md +34 -0
- package/docs/AttachPermissionsToRoleRequest.md +34 -0
- package/docs/AttachRolesToAdminRequest.md +34 -0
- package/docs/CreateCustomerAddressRequest.md +50 -0
- package/docs/CreateCustomerRequest.md +2 -0
- package/docs/CustomerListResource.md +2 -0
- package/docs/CustomerResource.md +4 -2
- package/docs/CustomersApi.md +210 -0
- package/docs/NetsuiteSyncLiteResource.md +38 -0
- package/docs/NetsuiteSyncLiteResourceArrayResponse.md +34 -0
- package/docs/RoleListResource.md +2 -0
- package/docs/RoleResource.md +3 -1
- package/docs/RolesApi.md +276 -0
- package/docs/UpdateCustomerAddressRequest.md +50 -0
- package/docs/UpdateCustomerRequest.md +2 -0
- package/package.json +1 -1
- package/src/apis/AdminsApi.ts +116 -0
- package/src/apis/CustomersApi.ts +188 -0
- package/src/apis/RolesApi.ts +232 -0
- package/src/models/AddressFrontendResource.ts +2 -3
- package/src/models/AdminResource.ts +2 -2
- package/src/models/AttachAdminsToRoleRequest.ts +66 -0
- package/src/models/AttachPermissionsToRoleRequest.ts +66 -0
- package/src/models/AttachRolesToAdminRequest.ts +66 -0
- package/src/models/CreateCustomerAddressRequest.ts +146 -0
- package/src/models/CreateCustomerRequest.ts +10 -3
- package/src/models/CustomerListResource.ts +9 -0
- package/src/models/CustomerResource.ts +28 -5
- package/src/models/NetsuiteSyncLiteResource.ts +84 -0
- package/src/models/NetsuiteSyncLiteResourceArrayResponse.ts +73 -0
- package/src/models/OrderFulfillmentResource.ts +3 -2
- package/src/models/RoleListResource.ts +9 -0
- package/src/models/RoleResource.ts +18 -2
- package/src/models/StoreFrontendResource.ts +2 -3
- package/src/models/StoreListResource.ts +3 -2
- package/src/models/StoreResource.ts +3 -2
- package/src/models/UpdateCustomerAddressRequest.ts +146 -0
- package/src/models/UpdateCustomerRequest.ts +8 -0
- package/src/models/index.ts +7 -0
package/docs/RoleResource.md
CHANGED
|
@@ -10,8 +10,9 @@ Name | Type
|
|
|
10
10
|
`name` | string
|
|
11
11
|
`isLocked` | boolean
|
|
12
12
|
`guardName` | string
|
|
13
|
-
`permissionCount` |
|
|
13
|
+
`permissionCount` | number
|
|
14
14
|
`permissions` | [Array<PermissionLiteResource>](PermissionLiteResource.md)
|
|
15
|
+
`admins` | [Array<AdminLiteResource>](AdminLiteResource.md)
|
|
15
16
|
`createdAt` | Date
|
|
16
17
|
`updatedAt` | Date
|
|
17
18
|
|
|
@@ -28,6 +29,7 @@ const example = {
|
|
|
28
29
|
"guardName": null,
|
|
29
30
|
"permissionCount": null,
|
|
30
31
|
"permissions": null,
|
|
32
|
+
"admins": null,
|
|
31
33
|
"createdAt": null,
|
|
32
34
|
"updatedAt": null,
|
|
33
35
|
} satisfies RoleResource
|
package/docs/RolesApi.md
CHANGED
|
@@ -4,7 +4,11 @@ All URIs are relative to *http://localhost/api*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
| [**attachAdminsRole**](RolesApi.md#attachadminsrole) | **POST** /admin-api/roles/{role}/admins/attach | Auto-generated: attachAdminsRole |
|
|
8
|
+
| [**attachPermissionsRole**](RolesApi.md#attachpermissionsrole) | **POST** /admin-api/roles/{role}/permissions/attach | Auto-generated: attachPermissionsRole |
|
|
7
9
|
| [**destroyRole**](RolesApi.md#destroyrole) | **DELETE** /admin-api/roles/{role}/delete | Auto-generated: destroyRole |
|
|
10
|
+
| [**detachAdminRole**](RolesApi.md#detachadminrole) | **DELETE** /admin-api/roles/{role}/admins/{admin} | Auto-generated: detachAdminRole |
|
|
11
|
+
| [**detachPermissionRole**](RolesApi.md#detachpermissionrole) | **DELETE** /admin-api/roles/{role}/permissions/{permission} | Auto-generated: detachPermissionRole |
|
|
8
12
|
| [**getAllRole**](RolesApi.md#getallrole) | **POST** /admin-api/roles/all | Auto-generated: getAllRole |
|
|
9
13
|
| [**indexRole**](RolesApi.md#indexrole) | **POST** /admin-api/roles/list | Auto-generated: indexRole |
|
|
10
14
|
| [**showRole**](RolesApi.md#showrole) | **GET** /admin-api/roles/{role} | Auto-generated: showRole |
|
|
@@ -13,6 +17,142 @@ All URIs are relative to *http://localhost/api*
|
|
|
13
17
|
|
|
14
18
|
|
|
15
19
|
|
|
20
|
+
## attachAdminsRole
|
|
21
|
+
|
|
22
|
+
> RoleResource attachAdminsRole(role, attachAdminsToRoleRequest)
|
|
23
|
+
|
|
24
|
+
Auto-generated: attachAdminsRole
|
|
25
|
+
|
|
26
|
+
### Example
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import {
|
|
30
|
+
Configuration,
|
|
31
|
+
RolesApi,
|
|
32
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
33
|
+
import type { AttachAdminsRoleRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
34
|
+
|
|
35
|
+
async function example() {
|
|
36
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
37
|
+
const api = new RolesApi();
|
|
38
|
+
|
|
39
|
+
const body = {
|
|
40
|
+
// number | The id of the role
|
|
41
|
+
role: 56,
|
|
42
|
+
// AttachAdminsToRoleRequest (optional)
|
|
43
|
+
attachAdminsToRoleRequest: ...,
|
|
44
|
+
} satisfies AttachAdminsRoleRequest;
|
|
45
|
+
|
|
46
|
+
try {
|
|
47
|
+
const data = await api.attachAdminsRole(body);
|
|
48
|
+
console.log(data);
|
|
49
|
+
} catch (error) {
|
|
50
|
+
console.error(error);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Run the test
|
|
55
|
+
example().catch(console.error);
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Parameters
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
| Name | Type | Description | Notes |
|
|
62
|
+
|------------- | ------------- | ------------- | -------------|
|
|
63
|
+
| **role** | `number` | The id of the role | [Defaults to `undefined`] |
|
|
64
|
+
| **attachAdminsToRoleRequest** | [AttachAdminsToRoleRequest](AttachAdminsToRoleRequest.md) | | [Optional] |
|
|
65
|
+
|
|
66
|
+
### Return type
|
|
67
|
+
|
|
68
|
+
[**RoleResource**](RoleResource.md)
|
|
69
|
+
|
|
70
|
+
### Authorization
|
|
71
|
+
|
|
72
|
+
No authorization required
|
|
73
|
+
|
|
74
|
+
### HTTP request headers
|
|
75
|
+
|
|
76
|
+
- **Content-Type**: `application/json`
|
|
77
|
+
- **Accept**: `application/json`
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
### HTTP response details
|
|
81
|
+
| Status code | Description | Response headers |
|
|
82
|
+
|-------------|-------------|------------------|
|
|
83
|
+
| **200** | Successful resource response | - |
|
|
84
|
+
|
|
85
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## attachPermissionsRole
|
|
89
|
+
|
|
90
|
+
> RoleResource attachPermissionsRole(role, attachPermissionsToRoleRequest)
|
|
91
|
+
|
|
92
|
+
Auto-generated: attachPermissionsRole
|
|
93
|
+
|
|
94
|
+
### Example
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
import {
|
|
98
|
+
Configuration,
|
|
99
|
+
RolesApi,
|
|
100
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
101
|
+
import type { AttachPermissionsRoleRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
102
|
+
|
|
103
|
+
async function example() {
|
|
104
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
105
|
+
const api = new RolesApi();
|
|
106
|
+
|
|
107
|
+
const body = {
|
|
108
|
+
// number | The id of the role
|
|
109
|
+
role: 56,
|
|
110
|
+
// AttachPermissionsToRoleRequest (optional)
|
|
111
|
+
attachPermissionsToRoleRequest: ...,
|
|
112
|
+
} satisfies AttachPermissionsRoleRequest;
|
|
113
|
+
|
|
114
|
+
try {
|
|
115
|
+
const data = await api.attachPermissionsRole(body);
|
|
116
|
+
console.log(data);
|
|
117
|
+
} catch (error) {
|
|
118
|
+
console.error(error);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Run the test
|
|
123
|
+
example().catch(console.error);
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Parameters
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
| Name | Type | Description | Notes |
|
|
130
|
+
|------------- | ------------- | ------------- | -------------|
|
|
131
|
+
| **role** | `number` | The id of the role | [Defaults to `undefined`] |
|
|
132
|
+
| **attachPermissionsToRoleRequest** | [AttachPermissionsToRoleRequest](AttachPermissionsToRoleRequest.md) | | [Optional] |
|
|
133
|
+
|
|
134
|
+
### Return type
|
|
135
|
+
|
|
136
|
+
[**RoleResource**](RoleResource.md)
|
|
137
|
+
|
|
138
|
+
### Authorization
|
|
139
|
+
|
|
140
|
+
No authorization required
|
|
141
|
+
|
|
142
|
+
### HTTP request headers
|
|
143
|
+
|
|
144
|
+
- **Content-Type**: `application/json`
|
|
145
|
+
- **Accept**: `application/json`
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
### HTTP response details
|
|
149
|
+
| Status code | Description | Response headers |
|
|
150
|
+
|-------------|-------------|------------------|
|
|
151
|
+
| **200** | Successful resource response | - |
|
|
152
|
+
|
|
153
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
154
|
+
|
|
155
|
+
|
|
16
156
|
## destroyRole
|
|
17
157
|
|
|
18
158
|
> GenericResponse destroyRole(role)
|
|
@@ -78,6 +218,142 @@ No authorization required
|
|
|
78
218
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
79
219
|
|
|
80
220
|
|
|
221
|
+
## detachAdminRole
|
|
222
|
+
|
|
223
|
+
> RoleResource detachAdminRole(role, admin)
|
|
224
|
+
|
|
225
|
+
Auto-generated: detachAdminRole
|
|
226
|
+
|
|
227
|
+
### Example
|
|
228
|
+
|
|
229
|
+
```ts
|
|
230
|
+
import {
|
|
231
|
+
Configuration,
|
|
232
|
+
RolesApi,
|
|
233
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
234
|
+
import type { DetachAdminRoleRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
235
|
+
|
|
236
|
+
async function example() {
|
|
237
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
238
|
+
const api = new RolesApi();
|
|
239
|
+
|
|
240
|
+
const body = {
|
|
241
|
+
// number | The id of the role
|
|
242
|
+
role: 56,
|
|
243
|
+
// number | The id of the admin
|
|
244
|
+
admin: 56,
|
|
245
|
+
} satisfies DetachAdminRoleRequest;
|
|
246
|
+
|
|
247
|
+
try {
|
|
248
|
+
const data = await api.detachAdminRole(body);
|
|
249
|
+
console.log(data);
|
|
250
|
+
} catch (error) {
|
|
251
|
+
console.error(error);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// Run the test
|
|
256
|
+
example().catch(console.error);
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Parameters
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
| Name | Type | Description | Notes |
|
|
263
|
+
|------------- | ------------- | ------------- | -------------|
|
|
264
|
+
| **role** | `number` | The id of the role | [Defaults to `undefined`] |
|
|
265
|
+
| **admin** | `number` | The id of the admin | [Defaults to `undefined`] |
|
|
266
|
+
|
|
267
|
+
### Return type
|
|
268
|
+
|
|
269
|
+
[**RoleResource**](RoleResource.md)
|
|
270
|
+
|
|
271
|
+
### Authorization
|
|
272
|
+
|
|
273
|
+
No authorization required
|
|
274
|
+
|
|
275
|
+
### HTTP request headers
|
|
276
|
+
|
|
277
|
+
- **Content-Type**: Not defined
|
|
278
|
+
- **Accept**: `application/json`
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
### HTTP response details
|
|
282
|
+
| Status code | Description | Response headers |
|
|
283
|
+
|-------------|-------------|------------------|
|
|
284
|
+
| **200** | Successful resource response | - |
|
|
285
|
+
|
|
286
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
## detachPermissionRole
|
|
290
|
+
|
|
291
|
+
> RoleResource detachPermissionRole(role, permission)
|
|
292
|
+
|
|
293
|
+
Auto-generated: detachPermissionRole
|
|
294
|
+
|
|
295
|
+
### Example
|
|
296
|
+
|
|
297
|
+
```ts
|
|
298
|
+
import {
|
|
299
|
+
Configuration,
|
|
300
|
+
RolesApi,
|
|
301
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
302
|
+
import type { DetachPermissionRoleRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
303
|
+
|
|
304
|
+
async function example() {
|
|
305
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
306
|
+
const api = new RolesApi();
|
|
307
|
+
|
|
308
|
+
const body = {
|
|
309
|
+
// number | The id of the role
|
|
310
|
+
role: 56,
|
|
311
|
+
// number | The id of the permission
|
|
312
|
+
permission: 56,
|
|
313
|
+
} satisfies DetachPermissionRoleRequest;
|
|
314
|
+
|
|
315
|
+
try {
|
|
316
|
+
const data = await api.detachPermissionRole(body);
|
|
317
|
+
console.log(data);
|
|
318
|
+
} catch (error) {
|
|
319
|
+
console.error(error);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// Run the test
|
|
324
|
+
example().catch(console.error);
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### Parameters
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
| Name | Type | Description | Notes |
|
|
331
|
+
|------------- | ------------- | ------------- | -------------|
|
|
332
|
+
| **role** | `number` | The id of the role | [Defaults to `undefined`] |
|
|
333
|
+
| **permission** | `number` | The id of the permission | [Defaults to `undefined`] |
|
|
334
|
+
|
|
335
|
+
### Return type
|
|
336
|
+
|
|
337
|
+
[**RoleResource**](RoleResource.md)
|
|
338
|
+
|
|
339
|
+
### Authorization
|
|
340
|
+
|
|
341
|
+
No authorization required
|
|
342
|
+
|
|
343
|
+
### HTTP request headers
|
|
344
|
+
|
|
345
|
+
- **Content-Type**: Not defined
|
|
346
|
+
- **Accept**: `application/json`
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
### HTTP response details
|
|
350
|
+
| Status code | Description | Response headers |
|
|
351
|
+
|-------------|-------------|------------------|
|
|
352
|
+
| **200** | Successful resource response | - |
|
|
353
|
+
|
|
354
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
355
|
+
|
|
356
|
+
|
|
81
357
|
## getAllRole
|
|
82
358
|
|
|
83
359
|
> RoleLiteResourceArrayResponse getAllRole(searchAllRolesRequest)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
|
|
2
|
+
# UpdateCustomerAddressRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`addresseeName` | string
|
|
10
|
+
`company` | string
|
|
11
|
+
`line1` | string
|
|
12
|
+
`line2` | string
|
|
13
|
+
`suburb` | string
|
|
14
|
+
`state` | string
|
|
15
|
+
`postcode` | string
|
|
16
|
+
`country` | string
|
|
17
|
+
`type` | string
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import type { UpdateCustomerAddressRequest } from '@digital8/lighting-illusions-ts-sdk'
|
|
23
|
+
|
|
24
|
+
// TODO: Update the object below with actual values
|
|
25
|
+
const example = {
|
|
26
|
+
"addresseeName": null,
|
|
27
|
+
"company": null,
|
|
28
|
+
"line1": null,
|
|
29
|
+
"line2": null,
|
|
30
|
+
"suburb": null,
|
|
31
|
+
"state": null,
|
|
32
|
+
"postcode": null,
|
|
33
|
+
"country": null,
|
|
34
|
+
"type": null,
|
|
35
|
+
} satisfies UpdateCustomerAddressRequest
|
|
36
|
+
|
|
37
|
+
console.log(example)
|
|
38
|
+
|
|
39
|
+
// Convert the instance to a JSON string
|
|
40
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
41
|
+
console.log(exampleJSON)
|
|
42
|
+
|
|
43
|
+
// Parse the JSON string back to an object
|
|
44
|
+
const exampleParsed = JSON.parse(exampleJSON) as UpdateCustomerAddressRequest
|
|
45
|
+
console.log(exampleParsed)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
49
|
+
|
|
50
|
+
|
|
@@ -12,6 +12,7 @@ Name | Type
|
|
|
12
12
|
`password` | string
|
|
13
13
|
`email` | string
|
|
14
14
|
`subscribedToNewsletter` | boolean
|
|
15
|
+
`netsuiteId` | number
|
|
15
16
|
|
|
16
17
|
## Example
|
|
17
18
|
|
|
@@ -26,6 +27,7 @@ const example = {
|
|
|
26
27
|
"password": null,
|
|
27
28
|
"email": null,
|
|
28
29
|
"subscribedToNewsletter": null,
|
|
30
|
+
"netsuiteId": null,
|
|
29
31
|
} satisfies UpdateCustomerRequest
|
|
30
32
|
|
|
31
33
|
console.log(example)
|
package/package.json
CHANGED
package/src/apis/AdminsApi.ts
CHANGED
|
@@ -23,6 +23,11 @@ import {
|
|
|
23
23
|
AdminResourceFromJSON,
|
|
24
24
|
AdminResourceToJSON,
|
|
25
25
|
} from '../models/AdminResource';
|
|
26
|
+
import {
|
|
27
|
+
type AttachRolesToAdminRequest,
|
|
28
|
+
AttachRolesToAdminRequestFromJSON,
|
|
29
|
+
AttachRolesToAdminRequestToJSON,
|
|
30
|
+
} from '../models/AttachRolesToAdminRequest';
|
|
26
31
|
import {
|
|
27
32
|
type CreateAdminUserRequest,
|
|
28
33
|
CreateAdminUserRequestFromJSON,
|
|
@@ -54,10 +59,20 @@ import {
|
|
|
54
59
|
UpdateAdminUserRequestToJSON,
|
|
55
60
|
} from '../models/UpdateAdminUserRequest';
|
|
56
61
|
|
|
62
|
+
export interface AttachRolesAdminUserRequest {
|
|
63
|
+
admin: number;
|
|
64
|
+
attachRolesToAdminRequest?: AttachRolesToAdminRequest;
|
|
65
|
+
}
|
|
66
|
+
|
|
57
67
|
export interface DestroyAdminUserRequest {
|
|
58
68
|
admin: number;
|
|
59
69
|
}
|
|
60
70
|
|
|
71
|
+
export interface DetachRoleAdminUserRequest {
|
|
72
|
+
admin: number;
|
|
73
|
+
role: number;
|
|
74
|
+
}
|
|
75
|
+
|
|
61
76
|
export interface GetAllAdminUserRequest {
|
|
62
77
|
searchAllAdminUsersRequest?: SearchAllAdminUsersRequest;
|
|
63
78
|
}
|
|
@@ -84,6 +99,54 @@ export interface UpdateAdminUserOperationRequest {
|
|
|
84
99
|
*/
|
|
85
100
|
export class AdminsApi extends runtime.BaseAPI {
|
|
86
101
|
|
|
102
|
+
/**
|
|
103
|
+
* Creates request options for attachRolesAdminUser without sending the request
|
|
104
|
+
*/
|
|
105
|
+
async attachRolesAdminUserRequestOpts(requestParameters: AttachRolesAdminUserRequest): Promise<runtime.RequestOpts> {
|
|
106
|
+
if (requestParameters['admin'] == null) {
|
|
107
|
+
throw new runtime.RequiredError(
|
|
108
|
+
'admin',
|
|
109
|
+
'Required parameter "admin" was null or undefined when calling attachRolesAdminUser().'
|
|
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/admins/{admin}/roles/attach`;
|
|
121
|
+
urlPath = urlPath.replace('{admin}', encodeURIComponent(String(requestParameters['admin'])));
|
|
122
|
+
|
|
123
|
+
return {
|
|
124
|
+
path: urlPath,
|
|
125
|
+
method: 'POST',
|
|
126
|
+
headers: headerParameters,
|
|
127
|
+
query: queryParameters,
|
|
128
|
+
body: AttachRolesToAdminRequestToJSON(requestParameters['attachRolesToAdminRequest']),
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Auto-generated: attachRolesAdminUser
|
|
134
|
+
*/
|
|
135
|
+
async attachRolesAdminUserRaw(requestParameters: AttachRolesAdminUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminResource>> {
|
|
136
|
+
const requestOptions = await this.attachRolesAdminUserRequestOpts(requestParameters);
|
|
137
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
138
|
+
|
|
139
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminResourceFromJSON(jsonValue));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Auto-generated: attachRolesAdminUser
|
|
144
|
+
*/
|
|
145
|
+
async attachRolesAdminUser(requestParameters: AttachRolesAdminUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminResource> {
|
|
146
|
+
const response = await this.attachRolesAdminUserRaw(requestParameters, initOverrides);
|
|
147
|
+
return await response.value();
|
|
148
|
+
}
|
|
149
|
+
|
|
87
150
|
/**
|
|
88
151
|
* Creates request options for destroyAdminUser without sending the request
|
|
89
152
|
*/
|
|
@@ -129,6 +192,59 @@ export class AdminsApi extends runtime.BaseAPI {
|
|
|
129
192
|
return await response.value();
|
|
130
193
|
}
|
|
131
194
|
|
|
195
|
+
/**
|
|
196
|
+
* Creates request options for detachRoleAdminUser without sending the request
|
|
197
|
+
*/
|
|
198
|
+
async detachRoleAdminUserRequestOpts(requestParameters: DetachRoleAdminUserRequest): Promise<runtime.RequestOpts> {
|
|
199
|
+
if (requestParameters['admin'] == null) {
|
|
200
|
+
throw new runtime.RequiredError(
|
|
201
|
+
'admin',
|
|
202
|
+
'Required parameter "admin" was null or undefined when calling detachRoleAdminUser().'
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if (requestParameters['role'] == null) {
|
|
207
|
+
throw new runtime.RequiredError(
|
|
208
|
+
'role',
|
|
209
|
+
'Required parameter "role" was null or undefined when calling detachRoleAdminUser().'
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
const queryParameters: any = {};
|
|
214
|
+
|
|
215
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
let urlPath = `/admin-api/admins/{admin}/roles/{role}`;
|
|
219
|
+
urlPath = urlPath.replace('{admin}', encodeURIComponent(String(requestParameters['admin'])));
|
|
220
|
+
urlPath = urlPath.replace('{role}', encodeURIComponent(String(requestParameters['role'])));
|
|
221
|
+
|
|
222
|
+
return {
|
|
223
|
+
path: urlPath,
|
|
224
|
+
method: 'DELETE',
|
|
225
|
+
headers: headerParameters,
|
|
226
|
+
query: queryParameters,
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Auto-generated: detachRoleAdminUser
|
|
232
|
+
*/
|
|
233
|
+
async detachRoleAdminUserRaw(requestParameters: DetachRoleAdminUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminResource>> {
|
|
234
|
+
const requestOptions = await this.detachRoleAdminUserRequestOpts(requestParameters);
|
|
235
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
236
|
+
|
|
237
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminResourceFromJSON(jsonValue));
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Auto-generated: detachRoleAdminUser
|
|
242
|
+
*/
|
|
243
|
+
async detachRoleAdminUser(requestParameters: DetachRoleAdminUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminResource> {
|
|
244
|
+
const response = await this.detachRoleAdminUserRaw(requestParameters, initOverrides);
|
|
245
|
+
return await response.value();
|
|
246
|
+
}
|
|
247
|
+
|
|
132
248
|
/**
|
|
133
249
|
* Creates request options for getAllAdminUser without sending the request
|
|
134
250
|
*/
|