@jugarhoy/api 1.0.1 → 1.0.3
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/apis/AdminInvitationsApi.ts +162 -0
- package/apis/UsersApi.ts +51 -0
- package/apis/index.ts +1 -0
- package/models/ApiAdminInvitationsPost200Response.ts +73 -0
- package/models/CreateInvitationDto.ts +88 -0
- package/models/InvitationListItem.ts +113 -0
- package/models/InvitationStatus.ts +55 -0
- package/models/Message.ts +133 -0
- package/models/PaymentDetail.ts +8 -0
- package/models/ReservationParams.ts +8 -0
- package/models/SavePushTokenRequest.ts +66 -0
- package/models/UserDto.ts +8 -0
- package/models/UserInvitation.ts +158 -0
- package/models/index.ts +7 -0
- package/package.json +1 -1
- package/runtime.ts +1 -1
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Jugar Hoy - API
|
|
5
|
+
* API documentation for Jugar Hoy application
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.5.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
|
+
ApiAdminInvitationsPost200Response,
|
|
19
|
+
CreateInvitationDto,
|
|
20
|
+
InvitationListItem,
|
|
21
|
+
} from '../models/index';
|
|
22
|
+
import {
|
|
23
|
+
ApiAdminInvitationsPost200ResponseFromJSON,
|
|
24
|
+
ApiAdminInvitationsPost200ResponseToJSON,
|
|
25
|
+
CreateInvitationDtoFromJSON,
|
|
26
|
+
CreateInvitationDtoToJSON,
|
|
27
|
+
InvitationListItemFromJSON,
|
|
28
|
+
InvitationListItemToJSON,
|
|
29
|
+
} from '../models/index';
|
|
30
|
+
|
|
31
|
+
export interface ApiAdminInvitationsIdDeleteRequest {
|
|
32
|
+
id: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface ApiAdminInvitationsPostRequest {
|
|
36
|
+
createInvitationDto: CreateInvitationDto;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
export class AdminInvitationsApi extends runtime.BaseAPI {
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* List invitations for customer
|
|
46
|
+
*/
|
|
47
|
+
async apiAdminInvitationsGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<InvitationListItem>>> {
|
|
48
|
+
const queryParameters: any = {};
|
|
49
|
+
|
|
50
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
51
|
+
|
|
52
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
53
|
+
const token = this.configuration.accessToken;
|
|
54
|
+
const tokenString = await token("bearerAuth", []);
|
|
55
|
+
|
|
56
|
+
if (tokenString) {
|
|
57
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const response = await this.request({
|
|
61
|
+
path: `/api/admin/invitations`,
|
|
62
|
+
method: 'GET',
|
|
63
|
+
headers: headerParameters,
|
|
64
|
+
query: queryParameters,
|
|
65
|
+
}, initOverrides);
|
|
66
|
+
|
|
67
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(InvitationListItemFromJSON));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* List invitations for customer
|
|
72
|
+
*/
|
|
73
|
+
async apiAdminInvitationsGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<InvitationListItem>> {
|
|
74
|
+
const response = await this.apiAdminInvitationsGetRaw(initOverrides);
|
|
75
|
+
return await response.value();
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Cancel invitation
|
|
80
|
+
*/
|
|
81
|
+
async apiAdminInvitationsIdDeleteRaw(requestParameters: ApiAdminInvitationsIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
82
|
+
if (requestParameters['id'] == null) {
|
|
83
|
+
throw new runtime.RequiredError(
|
|
84
|
+
'id',
|
|
85
|
+
'Required parameter "id" was null or undefined when calling apiAdminInvitationsIdDelete().'
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const queryParameters: any = {};
|
|
90
|
+
|
|
91
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
92
|
+
|
|
93
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
94
|
+
const token = this.configuration.accessToken;
|
|
95
|
+
const tokenString = await token("bearerAuth", []);
|
|
96
|
+
|
|
97
|
+
if (tokenString) {
|
|
98
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
const response = await this.request({
|
|
102
|
+
path: `/api/admin/invitations/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
103
|
+
method: 'DELETE',
|
|
104
|
+
headers: headerParameters,
|
|
105
|
+
query: queryParameters,
|
|
106
|
+
}, initOverrides);
|
|
107
|
+
|
|
108
|
+
return new runtime.VoidApiResponse(response);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Cancel invitation
|
|
113
|
+
*/
|
|
114
|
+
async apiAdminInvitationsIdDelete(requestParameters: ApiAdminInvitationsIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
115
|
+
await this.apiAdminInvitationsIdDeleteRaw(requestParameters, initOverrides);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Send user invitation
|
|
120
|
+
*/
|
|
121
|
+
async apiAdminInvitationsPostRaw(requestParameters: ApiAdminInvitationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiAdminInvitationsPost200Response>> {
|
|
122
|
+
if (requestParameters['createInvitationDto'] == null) {
|
|
123
|
+
throw new runtime.RequiredError(
|
|
124
|
+
'createInvitationDto',
|
|
125
|
+
'Required parameter "createInvitationDto" was null or undefined when calling apiAdminInvitationsPost().'
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const queryParameters: any = {};
|
|
130
|
+
|
|
131
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
132
|
+
|
|
133
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
134
|
+
|
|
135
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
136
|
+
const token = this.configuration.accessToken;
|
|
137
|
+
const tokenString = await token("bearerAuth", []);
|
|
138
|
+
|
|
139
|
+
if (tokenString) {
|
|
140
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
const response = await this.request({
|
|
144
|
+
path: `/api/admin/invitations`,
|
|
145
|
+
method: 'POST',
|
|
146
|
+
headers: headerParameters,
|
|
147
|
+
query: queryParameters,
|
|
148
|
+
body: CreateInvitationDtoToJSON(requestParameters['createInvitationDto']),
|
|
149
|
+
}, initOverrides);
|
|
150
|
+
|
|
151
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApiAdminInvitationsPost200ResponseFromJSON(jsonValue));
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Send user invitation
|
|
156
|
+
*/
|
|
157
|
+
async apiAdminInvitationsPost(requestParameters: ApiAdminInvitationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiAdminInvitationsPost200Response> {
|
|
158
|
+
const response = await this.apiAdminInvitationsPostRaw(requestParameters, initOverrides);
|
|
159
|
+
return await response.value();
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
}
|
package/apis/UsersApi.ts
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
CreateUserNotificationDto,
|
|
19
|
+
SavePushTokenRequest,
|
|
19
20
|
Sport,
|
|
20
21
|
UpdateUserNotificationDto,
|
|
21
22
|
User,
|
|
@@ -28,6 +29,8 @@ import type {
|
|
|
28
29
|
import {
|
|
29
30
|
CreateUserNotificationDtoFromJSON,
|
|
30
31
|
CreateUserNotificationDtoToJSON,
|
|
32
|
+
SavePushTokenRequestFromJSON,
|
|
33
|
+
SavePushTokenRequestToJSON,
|
|
31
34
|
SportFromJSON,
|
|
32
35
|
SportToJSON,
|
|
33
36
|
UpdateUserNotificationDtoFromJSON,
|
|
@@ -71,6 +74,10 @@ export interface RemoveUserSportProfileRequest {
|
|
|
71
74
|
sport: Sport;
|
|
72
75
|
}
|
|
73
76
|
|
|
77
|
+
export interface SavePushTokenOperationRequest {
|
|
78
|
+
savePushTokenRequest: SavePushTokenRequest;
|
|
79
|
+
}
|
|
80
|
+
|
|
74
81
|
export interface ToggleUserNotificationRequest {
|
|
75
82
|
notificationId: string;
|
|
76
83
|
}
|
|
@@ -393,6 +400,50 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
393
400
|
return await response.value();
|
|
394
401
|
}
|
|
395
402
|
|
|
403
|
+
/**
|
|
404
|
+
* Save or update push notification token for the current user
|
|
405
|
+
*/
|
|
406
|
+
async savePushTokenRaw(requestParameters: SavePushTokenOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserNotificationDto>> {
|
|
407
|
+
if (requestParameters['savePushTokenRequest'] == null) {
|
|
408
|
+
throw new runtime.RequiredError(
|
|
409
|
+
'savePushTokenRequest',
|
|
410
|
+
'Required parameter "savePushTokenRequest" was null or undefined when calling savePushToken().'
|
|
411
|
+
);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
const queryParameters: any = {};
|
|
415
|
+
|
|
416
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
417
|
+
|
|
418
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
419
|
+
|
|
420
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
421
|
+
const token = this.configuration.accessToken;
|
|
422
|
+
const tokenString = await token("bearerAuth", []);
|
|
423
|
+
|
|
424
|
+
if (tokenString) {
|
|
425
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
const response = await this.request({
|
|
429
|
+
path: `/api/users/push-token`,
|
|
430
|
+
method: 'POST',
|
|
431
|
+
headers: headerParameters,
|
|
432
|
+
query: queryParameters,
|
|
433
|
+
body: SavePushTokenRequestToJSON(requestParameters['savePushTokenRequest']),
|
|
434
|
+
}, initOverrides);
|
|
435
|
+
|
|
436
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UserNotificationDtoFromJSON(jsonValue));
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Save or update push notification token for the current user
|
|
441
|
+
*/
|
|
442
|
+
async savePushToken(requestParameters: SavePushTokenOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserNotificationDto> {
|
|
443
|
+
const response = await this.savePushTokenRaw(requestParameters, initOverrides);
|
|
444
|
+
return await response.value();
|
|
445
|
+
}
|
|
446
|
+
|
|
396
447
|
/**
|
|
397
448
|
* Toggle the enabled state of a notification preference
|
|
398
449
|
*/
|
package/apis/index.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export * from './AdminCoachesApi';
|
|
4
4
|
export * from './AdminCustomersApi';
|
|
5
5
|
export * from './AdminDevicesApi';
|
|
6
|
+
export * from './AdminInvitationsApi';
|
|
6
7
|
export * from './AdminLocationsApi';
|
|
7
8
|
export * from './AdminPaymentConfigsApi';
|
|
8
9
|
export * from './AdminPlayPricesApi';
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Jugar Hoy - API
|
|
5
|
+
* API documentation for Jugar Hoy application
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.5.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 ApiAdminInvitationsPost200Response
|
|
20
|
+
*/
|
|
21
|
+
export interface ApiAdminInvitationsPost200Response {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
* @memberof ApiAdminInvitationsPost200Response
|
|
26
|
+
*/
|
|
27
|
+
success?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ApiAdminInvitationsPost200Response
|
|
32
|
+
*/
|
|
33
|
+
invitationId?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the ApiAdminInvitationsPost200Response interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfApiAdminInvitationsPost200Response(value: object): value is ApiAdminInvitationsPost200Response {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function ApiAdminInvitationsPost200ResponseFromJSON(json: any): ApiAdminInvitationsPost200Response {
|
|
44
|
+
return ApiAdminInvitationsPost200ResponseFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function ApiAdminInvitationsPost200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiAdminInvitationsPost200Response {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
|
|
53
|
+
'success': json['success'] == null ? undefined : json['success'],
|
|
54
|
+
'invitationId': json['invitationId'] == null ? undefined : json['invitationId'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function ApiAdminInvitationsPost200ResponseToJSON(json: any): ApiAdminInvitationsPost200Response {
|
|
59
|
+
return ApiAdminInvitationsPost200ResponseToJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function ApiAdminInvitationsPost200ResponseToJSONTyped(value?: ApiAdminInvitationsPost200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
63
|
+
if (value == null) {
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'success': value['success'],
|
|
70
|
+
'invitationId': value['invitationId'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Jugar Hoy - API
|
|
5
|
+
* API documentation for Jugar Hoy application
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.5.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 CreateInvitationDto
|
|
20
|
+
*/
|
|
21
|
+
export interface CreateInvitationDto {
|
|
22
|
+
/**
|
|
23
|
+
* Email address to send invitation to
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CreateInvitationDto
|
|
26
|
+
*/
|
|
27
|
+
email: string;
|
|
28
|
+
/**
|
|
29
|
+
* Role to assign to the invited user
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CreateInvitationDto
|
|
32
|
+
*/
|
|
33
|
+
role: CreateInvitationDtoRoleEnum;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export const CreateInvitationDtoRoleEnum = {
|
|
41
|
+
Admin: 'ADMIN',
|
|
42
|
+
CustomerAdmin: 'CUSTOMER_ADMIN',
|
|
43
|
+
Coach: 'COACH',
|
|
44
|
+
User: 'USER'
|
|
45
|
+
} as const;
|
|
46
|
+
export type CreateInvitationDtoRoleEnum = typeof CreateInvitationDtoRoleEnum[keyof typeof CreateInvitationDtoRoleEnum];
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the CreateInvitationDto interface.
|
|
51
|
+
*/
|
|
52
|
+
export function instanceOfCreateInvitationDto(value: object): value is CreateInvitationDto {
|
|
53
|
+
if (!('email' in value) || value['email'] === undefined) return false;
|
|
54
|
+
if (!('role' in value) || value['role'] === undefined) return false;
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function CreateInvitationDtoFromJSON(json: any): CreateInvitationDto {
|
|
59
|
+
return CreateInvitationDtoFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function CreateInvitationDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateInvitationDto {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'email': json['email'],
|
|
69
|
+
'role': json['role'],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function CreateInvitationDtoToJSON(json: any): CreateInvitationDto {
|
|
74
|
+
return CreateInvitationDtoToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function CreateInvitationDtoToJSONTyped(value?: CreateInvitationDto | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'email': value['email'],
|
|
85
|
+
'role': value['role'],
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Jugar Hoy - API
|
|
5
|
+
* API documentation for Jugar Hoy application
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.5.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 InvitationListItem
|
|
20
|
+
*/
|
|
21
|
+
export interface InvitationListItem {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof InvitationListItem
|
|
26
|
+
*/
|
|
27
|
+
id?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof InvitationListItem
|
|
32
|
+
*/
|
|
33
|
+
email?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof InvitationListItem
|
|
38
|
+
*/
|
|
39
|
+
role?: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof InvitationListItem
|
|
44
|
+
*/
|
|
45
|
+
status?: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof InvitationListItem
|
|
50
|
+
*/
|
|
51
|
+
invitedBy?: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {Date}
|
|
55
|
+
* @memberof InvitationListItem
|
|
56
|
+
*/
|
|
57
|
+
expiresAt?: Date;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Date}
|
|
61
|
+
* @memberof InvitationListItem
|
|
62
|
+
*/
|
|
63
|
+
createdAt?: Date;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if a given object implements the InvitationListItem interface.
|
|
68
|
+
*/
|
|
69
|
+
export function instanceOfInvitationListItem(value: object): value is InvitationListItem {
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function InvitationListItemFromJSON(json: any): InvitationListItem {
|
|
74
|
+
return InvitationListItemFromJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function InvitationListItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvitationListItem {
|
|
78
|
+
if (json == null) {
|
|
79
|
+
return json;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
84
|
+
'email': json['email'] == null ? undefined : json['email'],
|
|
85
|
+
'role': json['role'] == null ? undefined : json['role'],
|
|
86
|
+
'status': json['status'] == null ? undefined : json['status'],
|
|
87
|
+
'invitedBy': json['invitedBy'] == null ? undefined : json['invitedBy'],
|
|
88
|
+
'expiresAt': json['expiresAt'] == null ? undefined : (new Date(json['expiresAt'])),
|
|
89
|
+
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function InvitationListItemToJSON(json: any): InvitationListItem {
|
|
94
|
+
return InvitationListItemToJSONTyped(json, false);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function InvitationListItemToJSONTyped(value?: InvitationListItem | null, ignoreDiscriminator: boolean = false): any {
|
|
98
|
+
if (value == null) {
|
|
99
|
+
return value;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
|
|
104
|
+
'id': value['id'],
|
|
105
|
+
'email': value['email'],
|
|
106
|
+
'role': value['role'],
|
|
107
|
+
'status': value['status'],
|
|
108
|
+
'invitedBy': value['invitedBy'],
|
|
109
|
+
'expiresAt': value['expiresAt'] == null ? undefined : ((value['expiresAt']).toISOString()),
|
|
110
|
+
'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Jugar Hoy - API
|
|
5
|
+
* API documentation for Jugar Hoy application
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.5.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
|
+
/**
|
|
17
|
+
* Status of the invitation
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const InvitationStatus = {
|
|
21
|
+
Pending: 'pending',
|
|
22
|
+
Accepted: 'accepted',
|
|
23
|
+
Expired: 'expired',
|
|
24
|
+
Cancelled: 'cancelled'
|
|
25
|
+
} as const;
|
|
26
|
+
export type InvitationStatus = typeof InvitationStatus[keyof typeof InvitationStatus];
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export function instanceOfInvitationStatus(value: any): boolean {
|
|
30
|
+
for (const key in InvitationStatus) {
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(InvitationStatus, key)) {
|
|
32
|
+
if (InvitationStatus[key as keyof typeof InvitationStatus] === value) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function InvitationStatusFromJSON(json: any): InvitationStatus {
|
|
41
|
+
return InvitationStatusFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function InvitationStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvitationStatus {
|
|
45
|
+
return json as InvitationStatus;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function InvitationStatusToJSON(value?: InvitationStatus | null): any {
|
|
49
|
+
return value as any;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function InvitationStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): InvitationStatus {
|
|
53
|
+
return value as InvitationStatus;
|
|
54
|
+
}
|
|
55
|
+
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Jugar Hoy - API
|
|
5
|
+
* API documentation for Jugar Hoy application
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.5.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 Message
|
|
20
|
+
*/
|
|
21
|
+
export interface Message {
|
|
22
|
+
/**
|
|
23
|
+
* Unique identifier for the message
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof Message
|
|
26
|
+
*/
|
|
27
|
+
id?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Recipient phone number
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof Message
|
|
32
|
+
*/
|
|
33
|
+
phoneNumber?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Message body content
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof Message
|
|
38
|
+
*/
|
|
39
|
+
body?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Message delivery status
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof Message
|
|
44
|
+
*/
|
|
45
|
+
status?: MessageStatusEnum;
|
|
46
|
+
/**
|
|
47
|
+
* Message provider (twilio, whatsapp, etc.)
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof Message
|
|
50
|
+
*/
|
|
51
|
+
provider?: string;
|
|
52
|
+
/**
|
|
53
|
+
* When the message was sent
|
|
54
|
+
* @type {Date}
|
|
55
|
+
* @memberof Message
|
|
56
|
+
*/
|
|
57
|
+
sentAt?: Date;
|
|
58
|
+
/**
|
|
59
|
+
* Error message if sending failed
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof Message
|
|
62
|
+
*/
|
|
63
|
+
error?: string;
|
|
64
|
+
/**
|
|
65
|
+
* When this message record was created
|
|
66
|
+
* @type {Date}
|
|
67
|
+
* @memberof Message
|
|
68
|
+
*/
|
|
69
|
+
createdAt?: Date;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @export
|
|
75
|
+
*/
|
|
76
|
+
export const MessageStatusEnum = {
|
|
77
|
+
Sent: 'sent',
|
|
78
|
+
Failed: 'failed',
|
|
79
|
+
Pending: 'pending'
|
|
80
|
+
} as const;
|
|
81
|
+
export type MessageStatusEnum = typeof MessageStatusEnum[keyof typeof MessageStatusEnum];
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Check if a given object implements the Message interface.
|
|
86
|
+
*/
|
|
87
|
+
export function instanceOfMessage(value: object): value is Message {
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function MessageFromJSON(json: any): Message {
|
|
92
|
+
return MessageFromJSONTyped(json, false);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function MessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): Message {
|
|
96
|
+
if (json == null) {
|
|
97
|
+
return json;
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
|
|
101
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
102
|
+
'phoneNumber': json['phoneNumber'] == null ? undefined : json['phoneNumber'],
|
|
103
|
+
'body': json['body'] == null ? undefined : json['body'],
|
|
104
|
+
'status': json['status'] == null ? undefined : json['status'],
|
|
105
|
+
'provider': json['provider'] == null ? undefined : json['provider'],
|
|
106
|
+
'sentAt': json['sentAt'] == null ? undefined : (new Date(json['sentAt'])),
|
|
107
|
+
'error': json['error'] == null ? undefined : json['error'],
|
|
108
|
+
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function MessageToJSON(json: any): Message {
|
|
113
|
+
return MessageToJSONTyped(json, false);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function MessageToJSONTyped(value?: Message | null, ignoreDiscriminator: boolean = false): any {
|
|
117
|
+
if (value == null) {
|
|
118
|
+
return value;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return {
|
|
122
|
+
|
|
123
|
+
'id': value['id'],
|
|
124
|
+
'phoneNumber': value['phoneNumber'],
|
|
125
|
+
'body': value['body'],
|
|
126
|
+
'status': value['status'],
|
|
127
|
+
'provider': value['provider'],
|
|
128
|
+
'sentAt': value['sentAt'] == null ? undefined : ((value['sentAt']).toISOString()),
|
|
129
|
+
'error': value['error'],
|
|
130
|
+
'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
|
package/models/PaymentDetail.ts
CHANGED
|
@@ -113,6 +113,12 @@ export interface PaymentDetail {
|
|
|
113
113
|
* @memberof PaymentDetail
|
|
114
114
|
*/
|
|
115
115
|
currency: string;
|
|
116
|
+
/**
|
|
117
|
+
* Whether the reservation was made from mobile app
|
|
118
|
+
* @type {boolean}
|
|
119
|
+
* @memberof PaymentDetail
|
|
120
|
+
*/
|
|
121
|
+
mobile?: boolean;
|
|
116
122
|
}
|
|
117
123
|
|
|
118
124
|
|
|
@@ -154,6 +160,7 @@ export function PaymentDetailFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
154
160
|
'discount': json['discount'],
|
|
155
161
|
'total': json['total'],
|
|
156
162
|
'currency': json['currency'],
|
|
163
|
+
'mobile': json['mobile'] == null ? undefined : json['mobile'],
|
|
157
164
|
};
|
|
158
165
|
}
|
|
159
166
|
|
|
@@ -180,6 +187,7 @@ export function PaymentDetailToJSONTyped(value?: PaymentDetail | null, ignoreDis
|
|
|
180
187
|
'discount': value['discount'],
|
|
181
188
|
'total': value['total'],
|
|
182
189
|
'currency': value['currency'],
|
|
190
|
+
'mobile': value['mobile'],
|
|
183
191
|
};
|
|
184
192
|
}
|
|
185
193
|
|
|
@@ -63,6 +63,12 @@ export interface ReservationParams {
|
|
|
63
63
|
* @memberof ReservationParams
|
|
64
64
|
*/
|
|
65
65
|
paymentMethod: PaymentMethod;
|
|
66
|
+
/**
|
|
67
|
+
* Whether the reservation is being made from a mobile app (for deep linking)
|
|
68
|
+
* @type {boolean}
|
|
69
|
+
* @memberof ReservationParams
|
|
70
|
+
*/
|
|
71
|
+
mobile?: boolean;
|
|
66
72
|
}
|
|
67
73
|
|
|
68
74
|
|
|
@@ -96,6 +102,7 @@ export function ReservationParamsFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
96
102
|
'rentedFrom': (new Date(json['rentedFrom'])),
|
|
97
103
|
'duration': json['duration'],
|
|
98
104
|
'paymentMethod': PaymentMethodFromJSON(json['paymentMethod']),
|
|
105
|
+
'mobile': json['mobile'] == null ? undefined : json['mobile'],
|
|
99
106
|
};
|
|
100
107
|
}
|
|
101
108
|
|
|
@@ -116,6 +123,7 @@ export function ReservationParamsToJSONTyped(value?: ReservationParams | null, i
|
|
|
116
123
|
'rentedFrom': ((value['rentedFrom']).toISOString()),
|
|
117
124
|
'duration': value['duration'],
|
|
118
125
|
'paymentMethod': PaymentMethodToJSON(value['paymentMethod']),
|
|
126
|
+
'mobile': value['mobile'],
|
|
119
127
|
};
|
|
120
128
|
}
|
|
121
129
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Jugar Hoy - API
|
|
5
|
+
* API documentation for Jugar Hoy application
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.5.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 SavePushTokenRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface SavePushTokenRequest {
|
|
22
|
+
/**
|
|
23
|
+
* The Expo push token to save
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SavePushTokenRequest
|
|
26
|
+
*/
|
|
27
|
+
token: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the SavePushTokenRequest interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfSavePushTokenRequest(value: object): value is SavePushTokenRequest {
|
|
34
|
+
if (!('token' in value) || value['token'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function SavePushTokenRequestFromJSON(json: any): SavePushTokenRequest {
|
|
39
|
+
return SavePushTokenRequestFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function SavePushTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SavePushTokenRequest {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'token': json['token'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function SavePushTokenRequestToJSON(json: any): SavePushTokenRequest {
|
|
53
|
+
return SavePushTokenRequestToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function SavePushTokenRequestToJSONTyped(value?: SavePushTokenRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'token': value['token'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
package/models/UserDto.ts
CHANGED
|
@@ -79,6 +79,12 @@ export interface UserDto {
|
|
|
79
79
|
* @memberof UserDto
|
|
80
80
|
*/
|
|
81
81
|
distanceInKm?: number;
|
|
82
|
+
/**
|
|
83
|
+
* Optional invite code for admin/coach registration
|
|
84
|
+
* @type {string}
|
|
85
|
+
* @memberof UserDto
|
|
86
|
+
*/
|
|
87
|
+
inviteCode?: string;
|
|
82
88
|
}
|
|
83
89
|
|
|
84
90
|
/**
|
|
@@ -112,6 +118,7 @@ export function UserDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): U
|
|
|
112
118
|
'latitude': json['latitude'] == null ? undefined : json['latitude'],
|
|
113
119
|
'longitude': json['longitude'] == null ? undefined : json['longitude'],
|
|
114
120
|
'distanceInKm': json['distanceInKm'] == null ? undefined : json['distanceInKm'],
|
|
121
|
+
'inviteCode': json['inviteCode'] == null ? undefined : json['inviteCode'],
|
|
115
122
|
};
|
|
116
123
|
}
|
|
117
124
|
|
|
@@ -136,6 +143,7 @@ export function UserDtoToJSONTyped(value?: UserDto | null, ignoreDiscriminator:
|
|
|
136
143
|
'latitude': value['latitude'],
|
|
137
144
|
'longitude': value['longitude'],
|
|
138
145
|
'distanceInKm': value['distanceInKm'],
|
|
146
|
+
'inviteCode': value['inviteCode'],
|
|
139
147
|
};
|
|
140
148
|
}
|
|
141
149
|
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Jugar Hoy - API
|
|
5
|
+
* API documentation for Jugar Hoy application
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.5.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 { InvitationStatus } from './InvitationStatus';
|
|
17
|
+
import {
|
|
18
|
+
InvitationStatusFromJSON,
|
|
19
|
+
InvitationStatusFromJSONTyped,
|
|
20
|
+
InvitationStatusToJSON,
|
|
21
|
+
InvitationStatusToJSONTyped,
|
|
22
|
+
} from './InvitationStatus';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface UserInvitation
|
|
28
|
+
*/
|
|
29
|
+
export interface UserInvitation {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof UserInvitation
|
|
34
|
+
*/
|
|
35
|
+
id?: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof UserInvitation
|
|
40
|
+
*/
|
|
41
|
+
email?: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof UserInvitation
|
|
46
|
+
*/
|
|
47
|
+
customerId?: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof UserInvitation
|
|
52
|
+
*/
|
|
53
|
+
inviteCode?: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof UserInvitation
|
|
58
|
+
*/
|
|
59
|
+
role?: UserInvitationRoleEnum;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof UserInvitation
|
|
64
|
+
*/
|
|
65
|
+
invitedBy?: string;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {InvitationStatus}
|
|
69
|
+
* @memberof UserInvitation
|
|
70
|
+
*/
|
|
71
|
+
status?: InvitationStatus;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {Date}
|
|
75
|
+
* @memberof UserInvitation
|
|
76
|
+
*/
|
|
77
|
+
expiresAt?: Date;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {Date}
|
|
81
|
+
* @memberof UserInvitation
|
|
82
|
+
*/
|
|
83
|
+
createdAt?: Date;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @type {Date}
|
|
87
|
+
* @memberof UserInvitation
|
|
88
|
+
*/
|
|
89
|
+
updatedAt?: Date;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
export const UserInvitationRoleEnum = {
|
|
97
|
+
Admin: 'ADMIN',
|
|
98
|
+
CustomerAdmin: 'CUSTOMER_ADMIN',
|
|
99
|
+
Coach: 'COACH',
|
|
100
|
+
User: 'USER'
|
|
101
|
+
} as const;
|
|
102
|
+
export type UserInvitationRoleEnum = typeof UserInvitationRoleEnum[keyof typeof UserInvitationRoleEnum];
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Check if a given object implements the UserInvitation interface.
|
|
107
|
+
*/
|
|
108
|
+
export function instanceOfUserInvitation(value: object): value is UserInvitation {
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function UserInvitationFromJSON(json: any): UserInvitation {
|
|
113
|
+
return UserInvitationFromJSONTyped(json, false);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function UserInvitationFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserInvitation {
|
|
117
|
+
if (json == null) {
|
|
118
|
+
return json;
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
|
|
122
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
123
|
+
'email': json['email'] == null ? undefined : json['email'],
|
|
124
|
+
'customerId': json['customerId'] == null ? undefined : json['customerId'],
|
|
125
|
+
'inviteCode': json['inviteCode'] == null ? undefined : json['inviteCode'],
|
|
126
|
+
'role': json['role'] == null ? undefined : json['role'],
|
|
127
|
+
'invitedBy': json['invitedBy'] == null ? undefined : json['invitedBy'],
|
|
128
|
+
'status': json['status'] == null ? undefined : InvitationStatusFromJSON(json['status']),
|
|
129
|
+
'expiresAt': json['expiresAt'] == null ? undefined : (new Date(json['expiresAt'])),
|
|
130
|
+
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
131
|
+
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function UserInvitationToJSON(json: any): UserInvitation {
|
|
136
|
+
return UserInvitationToJSONTyped(json, false);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function UserInvitationToJSONTyped(value?: UserInvitation | null, ignoreDiscriminator: boolean = false): any {
|
|
140
|
+
if (value == null) {
|
|
141
|
+
return value;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return {
|
|
145
|
+
|
|
146
|
+
'id': value['id'],
|
|
147
|
+
'email': value['email'],
|
|
148
|
+
'customerId': value['customerId'],
|
|
149
|
+
'inviteCode': value['inviteCode'],
|
|
150
|
+
'role': value['role'],
|
|
151
|
+
'invitedBy': value['invitedBy'],
|
|
152
|
+
'status': InvitationStatusToJSON(value['status']),
|
|
153
|
+
'expiresAt': value['expiresAt'] == null ? undefined : ((value['expiresAt']).toISOString()),
|
|
154
|
+
'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
|
155
|
+
'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
package/models/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export * from './AddMemberToSubscriptionRequest';
|
|
4
|
+
export * from './ApiAdminInvitationsPost200Response';
|
|
4
5
|
export * from './ApiAdminPlayPricesIdPutRequest';
|
|
5
6
|
export * from './ApiAdminPlayPricesPostRequest';
|
|
6
7
|
export * from './AvailabilityShift';
|
|
@@ -32,6 +33,7 @@ export * from './CreateCheckoutPreferenceRequestItemsInner';
|
|
|
32
33
|
export * from './CreateCustomerPaymentConfigDto';
|
|
33
34
|
export * from './CreateDefault500Response';
|
|
34
35
|
export * from './CreateFromInvite400Response';
|
|
36
|
+
export * from './CreateInvitationDto';
|
|
35
37
|
export * from './CreateShiftRequest';
|
|
36
38
|
export * from './CreateUserNotificationDto';
|
|
37
39
|
export * from './Customer';
|
|
@@ -68,6 +70,8 @@ export * from './GetSession401Response';
|
|
|
68
70
|
export * from './GetSession500Response';
|
|
69
71
|
export * from './HourShiftDetail';
|
|
70
72
|
export * from './InitiateReservationParams';
|
|
73
|
+
export * from './InvitationListItem';
|
|
74
|
+
export * from './InvitationStatus';
|
|
71
75
|
export * from './Level';
|
|
72
76
|
export * from './LightControlResponse';
|
|
73
77
|
export * from './Location';
|
|
@@ -76,6 +80,7 @@ export * from './ManageLightSwitch200Response';
|
|
|
76
80
|
export * from './ManageLightSwitch500Response';
|
|
77
81
|
export * from './MatchRequirements';
|
|
78
82
|
export * from './MercadoPagoIPN';
|
|
83
|
+
export * from './Message';
|
|
79
84
|
export * from './NotificationType';
|
|
80
85
|
export * from './Occurrence';
|
|
81
86
|
export * from './PaymentDetail';
|
|
@@ -118,6 +123,7 @@ export * from './ReserveDto';
|
|
|
118
123
|
export * from './ReserveSlotDto';
|
|
119
124
|
export * from './ReserveStatus';
|
|
120
125
|
export * from './ReserveType';
|
|
126
|
+
export * from './SavePushTokenRequest';
|
|
121
127
|
export * from './SearchClubs400Response';
|
|
122
128
|
export * from './SearchClubs500Response';
|
|
123
129
|
export * from './SetAuthCodeDto';
|
|
@@ -133,6 +139,7 @@ export * from './UpdateUserNotificationDto';
|
|
|
133
139
|
export * from './User';
|
|
134
140
|
export * from './UserAuth';
|
|
135
141
|
export * from './UserDto';
|
|
142
|
+
export * from './UserInvitation';
|
|
136
143
|
export * from './UserNotification';
|
|
137
144
|
export * from './UserNotificationDto';
|
|
138
145
|
export * from './UserRating';
|
package/package.json
CHANGED
package/runtime.ts
CHANGED