@jugarhoy/api 1.0.0 → 1.0.2

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.
@@ -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/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
+
@@ -106,6 +106,12 @@ export interface ClubSearchResponseDataInner {
106
106
  * @memberof ClubSearchResponseDataInner
107
107
  */
108
108
  rating?: number;
109
+ /**
110
+ * Internal location ID for direct navigation
111
+ * @type {string}
112
+ * @memberof ClubSearchResponseDataInner
113
+ */
114
+ locationId?: string;
109
115
  }
110
116
 
111
117
  /**
@@ -137,6 +143,7 @@ export function ClubSearchResponseDataInnerFromJSONTyped(json: any, ignoreDiscri
137
143
  'sports': json['sports'] == null ? undefined : ((json['sports'] as Array<any>).map(SportFromJSON)),
138
144
  'features': json['features'] == null ? undefined : json['features'],
139
145
  'rating': json['rating'] == null ? undefined : json['rating'],
146
+ 'locationId': json['locationId'] == null ? undefined : json['locationId'],
140
147
  };
141
148
  }
142
149
 
@@ -163,6 +170,7 @@ export function ClubSearchResponseDataInnerToJSONTyped(value?: ClubSearchRespons
163
170
  'sports': value['sports'] == null ? undefined : ((value['sports'] as Array<any>).map(SportToJSON)),
164
171
  'features': value['features'],
165
172
  'rating': value['rating'],
173
+ 'locationId': value['locationId'],
166
174
  };
167
175
  }
168
176
 
@@ -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
+
@@ -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
 
package/models/UserDto.ts CHANGED
@@ -42,7 +42,7 @@ export interface UserDto {
42
42
  * @type {string}
43
43
  * @memberof UserDto
44
44
  */
45
- phone: string;
45
+ phone?: string;
46
46
  /**
47
47
  * User's date of birth in YYYY-MM-DD format
48
48
  * @type {Date}
@@ -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
  /**
@@ -88,7 +94,6 @@ export function instanceOfUserDto(value: object): value is UserDto {
88
94
  if (!('firstName' in value) || value['firstName'] === undefined) return false;
89
95
  if (!('lastName' in value) || value['lastName'] === undefined) return false;
90
96
  if (!('email' in value) || value['email'] === undefined) return false;
91
- if (!('phone' in value) || value['phone'] === undefined) return false;
92
97
  if (!('birthDate' in value) || value['birthDate'] === undefined) return false;
93
98
  return true;
94
99
  }
@@ -106,13 +111,14 @@ export function UserDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): U
106
111
  'firstName': json['firstName'],
107
112
  'lastName': json['lastName'],
108
113
  'email': json['email'],
109
- 'phone': json['phone'],
114
+ 'phone': json['phone'] == null ? undefined : json['phone'],
110
115
  'birthDate': (new Date(json['birthDate'])),
111
116
  'avatarBase64': json['avatarBase64'] == null ? undefined : json['avatarBase64'],
112
117
  'instagramHandle': json['instagramHandle'] == null ? undefined : json['instagramHandle'],
113
118
  'latitude': json['latitude'] == null ? undefined : json['latitude'],
114
119
  'longitude': json['longitude'] == null ? undefined : json['longitude'],
115
120
  'distanceInKm': json['distanceInKm'] == null ? undefined : json['distanceInKm'],
121
+ 'inviteCode': json['inviteCode'] == null ? undefined : json['inviteCode'],
116
122
  };
117
123
  }
118
124
 
@@ -137,6 +143,7 @@ export function UserDtoToJSONTyped(value?: UserDto | null, ignoreDiscriminator:
137
143
  'latitude': value['latitude'],
138
144
  'longitude': value['longitude'],
139
145
  'distanceInKm': value['distanceInKm'],
146
+ 'inviteCode': value['inviteCode'],
140
147
  };
141
148
  }
142
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';
@@ -133,6 +138,7 @@ export * from './UpdateUserNotificationDto';
133
138
  export * from './User';
134
139
  export * from './UserAuth';
135
140
  export * from './UserDto';
141
+ export * from './UserInvitation';
136
142
  export * from './UserNotification';
137
143
  export * from './UserNotificationDto';
138
144
  export * from './UserRating';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jugarhoy/api",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "TypeScript SDK for Jugar Hoy API",
5
5
  "main": "index.ts",
6
6
  "types": "index.ts",
package/runtime.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  */
14
14
 
15
15
 
16
- export const BASE_PATH = "http://localhost:4000".replace(/\/+$/, "");
16
+ export const BASE_PATH = "http://localhost:7173".replace(/\/+$/, "");
17
17
 
18
18
  export interface ConfigurationParameters {
19
19
  basePath?: string; // override base path