@digital8/laravel-auth-template-ts-sdk 0.0.6 → 0.0.8
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 +31 -1
- package/.openapi-generator/VERSION +1 -1
- package/README.md +121 -28
- package/dist/apis/{DefaultApi.d.ts → GeneralApi.d.ts} +13 -2
- package/dist/apis/{DefaultApi.js → GeneralApi.js} +67 -22
- package/dist/apis/index.d.ts +1 -1
- package/dist/apis/index.js +1 -1
- package/dist/models/AssetFileForUploadResource.d.ts +50 -0
- package/dist/models/AssetFileForUploadResource.js +63 -0
- package/dist/models/AssetFileForUploadResourceArrayResponse.d.ts +33 -0
- package/dist/models/AssetFileForUploadResourceArrayResponse.js +50 -0
- package/dist/models/AssetLiteResource.d.ts +38 -0
- package/dist/models/AssetLiteResource.js +55 -0
- package/dist/models/AssetLiteResourceArrayResponse.d.ts +33 -0
- package/dist/models/AssetLiteResourceArrayResponse.js +50 -0
- package/dist/models/AssetResource.d.ts +68 -0
- package/dist/models/AssetResource.js +75 -0
- package/dist/models/AssetResourceArrayResponse.d.ts +33 -0
- package/dist/models/AssetResourceArrayResponse.js +50 -0
- package/dist/models/IndexUserRequest.d.ts +28 -4
- package/dist/models/IndexUserRequest.js +25 -6
- package/dist/models/StoreAssetFileRequest.d.ts +38 -0
- package/dist/models/StoreAssetFileRequest.js +55 -0
- package/dist/models/UpdateUserRequest.d.ts +13 -1
- package/dist/models/UpdateUserRequest.js +12 -0
- package/dist/models/UserAuthTokenResourceArrayResponse.d.ts +33 -0
- package/dist/models/UserAuthTokenResourceArrayResponse.js +50 -0
- package/dist/models/UserResource.d.ts +7 -0
- package/dist/models/UserResource.js +7 -3
- package/dist/models/UserResourceArrayResponse.d.ts +33 -0
- package/dist/models/UserResourceArrayResponse.js +50 -0
- package/dist/models/index.d.ts +9 -0
- package/dist/models/index.js +9 -0
- package/docs/AssetFileForUploadResource.md +40 -0
- package/docs/AssetFileForUploadResourceArrayResponse.md +34 -0
- package/docs/AssetLiteResource.md +36 -0
- package/docs/AssetLiteResourceArrayResponse.md +34 -0
- package/docs/AssetResource.md +46 -0
- package/docs/AssetResourceArrayResponse.md +34 -0
- package/docs/GeneralApi.md +597 -0
- package/docs/GenericResponse.md +34 -0
- package/docs/IndexUserRequest.md +42 -0
- package/docs/LoginAuthRequest.md +36 -0
- package/docs/PaginatedUserResourceResponse.md +36 -0
- package/docs/PagingMetadata.md +46 -0
- package/docs/ResetPasswordAuthRequest.md +38 -0
- package/docs/SendForgotPasswordLinkAuthRequest.md +34 -0
- package/docs/StoreAssetFileRequest.md +36 -0
- package/docs/StoreUserRequest.md +40 -0
- package/docs/UpdateUserRequest.md +50 -0
- package/docs/UserAuthTokenResource.md +36 -0
- package/docs/UserAuthTokenResourceArrayResponse.md +34 -0
- package/docs/UserResource.md +50 -0
- package/docs/UserResourceArrayResponse.md +34 -0
- package/package.json +2 -2
- package/src/apis/{DefaultApi.ts → GeneralApi.ts} +43 -1
- package/src/apis/index.ts +1 -1
- package/src/models/AssetFileForUploadResource.ts +93 -0
- package/src/models/AssetFileForUploadResourceArrayResponse.ts +73 -0
- package/src/models/AssetLiteResource.ts +75 -0
- package/src/models/AssetLiteResourceArrayResponse.ts +73 -0
- package/src/models/AssetResource.ts +120 -0
- package/src/models/AssetResourceArrayResponse.ts +73 -0
- package/src/models/IndexUserRequest.ts +40 -10
- package/src/models/StoreAssetFileRequest.ts +75 -0
- package/src/models/UpdateUserRequest.ts +16 -1
- package/src/models/UserAuthTokenResourceArrayResponse.ts +73 -0
- package/src/models/UserResource.ts +19 -2
- package/src/models/UserResourceArrayResponse.ts +73 -0
- package/src/models/index.ts +9 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# PaginatedUserResourceResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<UserResource>](UserResource.md)
|
|
10
|
+
`meta` | [PagingMetadata](PagingMetadata.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { PaginatedUserResourceResponse } from '@digital8/laravel-auth-template-ts-sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"data": null,
|
|
20
|
+
"meta": null,
|
|
21
|
+
} satisfies PaginatedUserResourceResponse
|
|
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 PaginatedUserResourceResponse
|
|
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,46 @@
|
|
|
1
|
+
|
|
2
|
+
# PagingMetadata
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`currentPage` | number
|
|
10
|
+
`from` | number
|
|
11
|
+
`lastPage` | number
|
|
12
|
+
`path` | number
|
|
13
|
+
`perPage` | number
|
|
14
|
+
`to` | number
|
|
15
|
+
`total` | number
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import type { PagingMetadata } from '@digital8/laravel-auth-template-ts-sdk'
|
|
21
|
+
|
|
22
|
+
// TODO: Update the object below with actual values
|
|
23
|
+
const example = {
|
|
24
|
+
"currentPage": null,
|
|
25
|
+
"from": null,
|
|
26
|
+
"lastPage": null,
|
|
27
|
+
"path": null,
|
|
28
|
+
"perPage": null,
|
|
29
|
+
"to": null,
|
|
30
|
+
"total": null,
|
|
31
|
+
} satisfies PagingMetadata
|
|
32
|
+
|
|
33
|
+
console.log(example)
|
|
34
|
+
|
|
35
|
+
// Convert the instance to a JSON string
|
|
36
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
37
|
+
console.log(exampleJSON)
|
|
38
|
+
|
|
39
|
+
// Parse the JSON string back to an object
|
|
40
|
+
const exampleParsed = JSON.parse(exampleJSON) as PagingMetadata
|
|
41
|
+
console.log(exampleParsed)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
45
|
+
|
|
46
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# ResetPasswordAuthRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`email` | string
|
|
10
|
+
`password` | string
|
|
11
|
+
`token` | string
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { ResetPasswordAuthRequest } from '@digital8/laravel-auth-template-ts-sdk'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"email": null,
|
|
21
|
+
"password": null,
|
|
22
|
+
"token": null,
|
|
23
|
+
} satisfies ResetPasswordAuthRequest
|
|
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 ResetPasswordAuthRequest
|
|
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
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# SendForgotPasswordLinkAuthRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`email` | string
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { SendForgotPasswordLinkAuthRequest } from '@digital8/laravel-auth-template-ts-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"email": null,
|
|
19
|
+
} satisfies SendForgotPasswordLinkAuthRequest
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as SendForgotPasswordLinkAuthRequest
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# StoreAssetFileRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`fileName` | string
|
|
10
|
+
`fileType` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { StoreAssetFileRequest } from '@digital8/laravel-auth-template-ts-sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"fileName": null,
|
|
20
|
+
"fileType": null,
|
|
21
|
+
} satisfies StoreAssetFileRequest
|
|
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 StoreAssetFileRequest
|
|
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,40 @@
|
|
|
1
|
+
|
|
2
|
+
# StoreUserRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`firstName` | string
|
|
10
|
+
`lastName` | string
|
|
11
|
+
`email` | string
|
|
12
|
+
`mobile` | number
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { StoreUserRequest } from '@digital8/laravel-auth-template-ts-sdk'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"firstName": null,
|
|
22
|
+
"lastName": null,
|
|
23
|
+
"email": null,
|
|
24
|
+
"mobile": null,
|
|
25
|
+
} satisfies StoreUserRequest
|
|
26
|
+
|
|
27
|
+
console.log(example)
|
|
28
|
+
|
|
29
|
+
// Convert the instance to a JSON string
|
|
30
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
31
|
+
console.log(exampleJSON)
|
|
32
|
+
|
|
33
|
+
// Parse the JSON string back to an object
|
|
34
|
+
const exampleParsed = JSON.parse(exampleJSON) as StoreUserRequest
|
|
35
|
+
console.log(exampleParsed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
39
|
+
|
|
40
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
|
|
2
|
+
# UpdateUserRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`firstName` | string
|
|
10
|
+
`lastName` | string
|
|
11
|
+
`email` | string
|
|
12
|
+
`mobile` | number
|
|
13
|
+
`password` | string
|
|
14
|
+
`role` | string
|
|
15
|
+
`teamIds` | Array<number>
|
|
16
|
+
`businessUnitIds` | Array<number>
|
|
17
|
+
`type` | string
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import type { UpdateUserRequest } from '@digital8/laravel-auth-template-ts-sdk'
|
|
23
|
+
|
|
24
|
+
// TODO: Update the object below with actual values
|
|
25
|
+
const example = {
|
|
26
|
+
"firstName": null,
|
|
27
|
+
"lastName": null,
|
|
28
|
+
"email": null,
|
|
29
|
+
"mobile": null,
|
|
30
|
+
"password": null,
|
|
31
|
+
"role": null,
|
|
32
|
+
"teamIds": null,
|
|
33
|
+
"businessUnitIds": null,
|
|
34
|
+
"type": null,
|
|
35
|
+
} satisfies UpdateUserRequest
|
|
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 UpdateUserRequest
|
|
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
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# UserAuthTokenResource
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`user` | [UserResource](UserResource.md)
|
|
10
|
+
`token` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { UserAuthTokenResource } from '@digital8/laravel-auth-template-ts-sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"user": null,
|
|
20
|
+
"token": null,
|
|
21
|
+
} satisfies UserAuthTokenResource
|
|
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 UserAuthTokenResource
|
|
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,34 @@
|
|
|
1
|
+
|
|
2
|
+
# UserAuthTokenResourceArrayResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<UserAuthTokenResource>](UserAuthTokenResource.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { UserAuthTokenResourceArrayResponse } from '@digital8/laravel-auth-template-ts-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"data": null,
|
|
19
|
+
} satisfies UserAuthTokenResourceArrayResponse
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as UserAuthTokenResourceArrayResponse
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
|
|
2
|
+
# UserResource
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | number
|
|
10
|
+
`firstName` | string
|
|
11
|
+
`lastName` | string
|
|
12
|
+
`fullName` | string
|
|
13
|
+
`email` | string
|
|
14
|
+
`mobile` | string
|
|
15
|
+
`assets` | [Array<AssetLiteResource>](AssetLiteResource.md)
|
|
16
|
+
`createdAt` | Date
|
|
17
|
+
`updatedAt` | Date
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import type { UserResource } from '@digital8/laravel-auth-template-ts-sdk'
|
|
23
|
+
|
|
24
|
+
// TODO: Update the object below with actual values
|
|
25
|
+
const example = {
|
|
26
|
+
"id": null,
|
|
27
|
+
"firstName": null,
|
|
28
|
+
"lastName": null,
|
|
29
|
+
"fullName": null,
|
|
30
|
+
"email": null,
|
|
31
|
+
"mobile": null,
|
|
32
|
+
"assets": null,
|
|
33
|
+
"createdAt": null,
|
|
34
|
+
"updatedAt": null,
|
|
35
|
+
} satisfies UserResource
|
|
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 UserResource
|
|
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
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# UserResourceArrayResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<UserResource>](UserResource.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { UserResourceArrayResponse } from '@digital8/laravel-auth-template-ts-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"data": null,
|
|
19
|
+
} satisfies UserResourceArrayResponse
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as UserResourceArrayResponse
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digital8/laravel-auth-template-ts-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "OpenAPI client for @digital8/laravel-auth-template-ts-sdk",
|
|
5
5
|
"author": "OpenAPI-Generator",
|
|
6
6
|
"repository": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
|
|
9
9
|
},
|
|
10
10
|
"main": "./dist/index.js",
|
|
11
|
-
"
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "tsc",
|
|
14
14
|
"prepare": "npm run build"
|
|
@@ -15,18 +15,22 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
AssetFileForUploadResource,
|
|
18
19
|
GenericResponse,
|
|
19
20
|
IndexUserRequest,
|
|
20
21
|
LoginAuthRequest,
|
|
21
22
|
PaginatedUserResourceResponse,
|
|
22
23
|
ResetPasswordAuthRequest,
|
|
23
24
|
SendForgotPasswordLinkAuthRequest,
|
|
25
|
+
StoreAssetFileRequest,
|
|
24
26
|
StoreUserRequest,
|
|
25
27
|
UpdateUserRequest,
|
|
26
28
|
UserAuthTokenResource,
|
|
27
29
|
UserResource,
|
|
28
30
|
} from '../models/index';
|
|
29
31
|
import {
|
|
32
|
+
AssetFileForUploadResourceFromJSON,
|
|
33
|
+
AssetFileForUploadResourceToJSON,
|
|
30
34
|
GenericResponseFromJSON,
|
|
31
35
|
GenericResponseToJSON,
|
|
32
36
|
IndexUserRequestFromJSON,
|
|
@@ -39,6 +43,8 @@ import {
|
|
|
39
43
|
ResetPasswordAuthRequestToJSON,
|
|
40
44
|
SendForgotPasswordLinkAuthRequestFromJSON,
|
|
41
45
|
SendForgotPasswordLinkAuthRequestToJSON,
|
|
46
|
+
StoreAssetFileRequestFromJSON,
|
|
47
|
+
StoreAssetFileRequestToJSON,
|
|
42
48
|
StoreUserRequestFromJSON,
|
|
43
49
|
StoreUserRequestToJSON,
|
|
44
50
|
UpdateUserRequestFromJSON,
|
|
@@ -69,6 +75,10 @@ export interface SendForgotPasswordLinkAuthOperationRequest {
|
|
|
69
75
|
sendForgotPasswordLinkAuthRequest?: SendForgotPasswordLinkAuthRequest;
|
|
70
76
|
}
|
|
71
77
|
|
|
78
|
+
export interface StoreAssetFileOperationRequest {
|
|
79
|
+
storeAssetFileRequest?: StoreAssetFileRequest;
|
|
80
|
+
}
|
|
81
|
+
|
|
72
82
|
export interface StoreUserOperationRequest {
|
|
73
83
|
storeUserRequest?: StoreUserRequest;
|
|
74
84
|
}
|
|
@@ -81,7 +91,7 @@ export interface UpdateUserOperationRequest {
|
|
|
81
91
|
/**
|
|
82
92
|
*
|
|
83
93
|
*/
|
|
84
|
-
export class
|
|
94
|
+
export class GeneralApi extends runtime.BaseAPI {
|
|
85
95
|
|
|
86
96
|
/**
|
|
87
97
|
* Auto-generated: destroyUser
|
|
@@ -277,6 +287,38 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
277
287
|
return await response.value();
|
|
278
288
|
}
|
|
279
289
|
|
|
290
|
+
/**
|
|
291
|
+
* Auto-generated: storeAssetFile
|
|
292
|
+
*/
|
|
293
|
+
async storeAssetFileRaw(requestParameters: StoreAssetFileOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssetFileForUploadResource>> {
|
|
294
|
+
const queryParameters: any = {};
|
|
295
|
+
|
|
296
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
297
|
+
|
|
298
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
let urlPath = `/api/assets/file`;
|
|
302
|
+
|
|
303
|
+
const response = await this.request({
|
|
304
|
+
path: urlPath,
|
|
305
|
+
method: 'POST',
|
|
306
|
+
headers: headerParameters,
|
|
307
|
+
query: queryParameters,
|
|
308
|
+
body: StoreAssetFileRequestToJSON(requestParameters['storeAssetFileRequest']),
|
|
309
|
+
}, initOverrides);
|
|
310
|
+
|
|
311
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AssetFileForUploadResourceFromJSON(jsonValue));
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Auto-generated: storeAssetFile
|
|
316
|
+
*/
|
|
317
|
+
async storeAssetFile(requestParameters: StoreAssetFileOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssetFileForUploadResource> {
|
|
318
|
+
const response = await this.storeAssetFileRaw(requestParameters, initOverrides);
|
|
319
|
+
return await response.value();
|
|
320
|
+
}
|
|
321
|
+
|
|
280
322
|
/**
|
|
281
323
|
* Auto-generated: storeUser
|
|
282
324
|
*/
|
package/src/apis/index.ts
CHANGED
|
@@ -0,0 +1,93 @@
|
|
|
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 AssetFileForUploadResource
|
|
20
|
+
*/
|
|
21
|
+
export interface AssetFileForUploadResource {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof AssetFileForUploadResource
|
|
26
|
+
*/
|
|
27
|
+
id: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof AssetFileForUploadResource
|
|
32
|
+
*/
|
|
33
|
+
url: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {Array<string>}
|
|
37
|
+
* @memberof AssetFileForUploadResource
|
|
38
|
+
*/
|
|
39
|
+
headers: Array<string>;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof AssetFileForUploadResource
|
|
44
|
+
*/
|
|
45
|
+
fileName: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the AssetFileForUploadResource interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfAssetFileForUploadResource(value: object): value is AssetFileForUploadResource {
|
|
52
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
53
|
+
if (!('url' in value) || value['url'] === undefined) return false;
|
|
54
|
+
if (!('headers' in value) || value['headers'] === undefined) return false;
|
|
55
|
+
if (!('fileName' in value) || value['fileName'] === undefined) return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function AssetFileForUploadResourceFromJSON(json: any): AssetFileForUploadResource {
|
|
60
|
+
return AssetFileForUploadResourceFromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function AssetFileForUploadResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetFileForUploadResource {
|
|
64
|
+
if (json == null) {
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'id': json['id'],
|
|
70
|
+
'url': json['url'],
|
|
71
|
+
'headers': json['headers'],
|
|
72
|
+
'fileName': json['fileName'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function AssetFileForUploadResourceToJSON(json: any): AssetFileForUploadResource {
|
|
77
|
+
return AssetFileForUploadResourceToJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function AssetFileForUploadResourceToJSONTyped(value?: AssetFileForUploadResource | null, ignoreDiscriminator: boolean = false): any {
|
|
81
|
+
if (value == null) {
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
|
|
87
|
+
'id': value['id'],
|
|
88
|
+
'url': value['url'],
|
|
89
|
+
'headers': value['headers'],
|
|
90
|
+
'fileName': value['fileName'],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|