@jugarhoy/api 1.0.9 → 1.1.1
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/AppPlayRegistrationApi.ts +177 -0
- package/apis/AppPlaySearchApi.ts +323 -0
- package/apis/UsersApi.ts +99 -0
- package/apis/index.ts +2 -0
- package/models/ClubPlace.ts +184 -0
- package/models/CreateClubPlaceRequest.ts +161 -0
- package/models/CreatePlayRegistrationRequest.ts +92 -0
- package/models/CreatePlaySearchRequest.ts +197 -0
- package/models/DominantSide.ts +53 -0
- package/models/GetNotificationByType200Response.ts +73 -0
- package/models/NotificationChannelType.ts +2 -1
- package/models/PlayRegistration.ts +159 -0
- package/models/PlayRegistrationDTO.ts +151 -0
- package/models/PlayRegistrationDTOUser.ts +97 -0
- package/models/PlayRegistrationListResponse.ts +97 -0
- package/models/PlayRegistrationType.ts +55 -0
- package/models/PlaySearch.ts +252 -0
- package/models/PlaySearchDTO.ts +266 -0
- package/models/PlaySearchDTOClubPlace.ts +121 -0
- package/models/PlaySearchDetailDTO.ts +296 -0
- package/models/PlaySearchDetailDTOAllOfCounts.ts +73 -0
- package/models/PlaySearchDetailDTOAllOfRegistrations.ts +124 -0
- package/models/PlaySearchDetailDTOAllOfUser.ts +105 -0
- package/models/PlaySearchListResponse.ts +97 -0
- package/models/PlaySearchStatus.ts +56 -0
- package/models/RegistrationStatus.ts +55 -0
- package/models/SubscriptionStatus.ts +58 -0
- package/models/ToggleNotificationByType200Response.ts +65 -0
- package/models/index.ts +23 -0
- package/package.json +2 -2
|
@@ -0,0 +1,177 @@
|
|
|
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
|
+
PlayRegistrationDTO,
|
|
19
|
+
PlayRegistrationListResponse,
|
|
20
|
+
RegistrationStatus,
|
|
21
|
+
} from '../models/index';
|
|
22
|
+
import {
|
|
23
|
+
PlayRegistrationDTOFromJSON,
|
|
24
|
+
PlayRegistrationDTOToJSON,
|
|
25
|
+
PlayRegistrationListResponseFromJSON,
|
|
26
|
+
PlayRegistrationListResponseToJSON,
|
|
27
|
+
RegistrationStatusFromJSON,
|
|
28
|
+
RegistrationStatusToJSON,
|
|
29
|
+
} from '../models/index';
|
|
30
|
+
|
|
31
|
+
export interface ApiAppPlayRegistrationsIdDeleteRequest {
|
|
32
|
+
id: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface ApiAppPlayRegistrationsMyRegistrationsGetRequest {
|
|
36
|
+
status?: RegistrationStatus;
|
|
37
|
+
page?: number;
|
|
38
|
+
size?: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface ApiAppPlayRegistrationsPlaySearchIdPostRequest {
|
|
42
|
+
playSearchId: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
48
|
+
export class AppPlayRegistrationApi extends runtime.BaseAPI {
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Cancel registration
|
|
52
|
+
*/
|
|
53
|
+
async apiAppPlayRegistrationsIdDeleteRaw(requestParameters: ApiAppPlayRegistrationsIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
54
|
+
if (requestParameters['id'] == null) {
|
|
55
|
+
throw new runtime.RequiredError(
|
|
56
|
+
'id',
|
|
57
|
+
'Required parameter "id" was null or undefined when calling apiAppPlayRegistrationsIdDelete().'
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const queryParameters: any = {};
|
|
62
|
+
|
|
63
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
64
|
+
|
|
65
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
66
|
+
const token = this.configuration.accessToken;
|
|
67
|
+
const tokenString = await token("bearerAuth", []);
|
|
68
|
+
|
|
69
|
+
if (tokenString) {
|
|
70
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const response = await this.request({
|
|
74
|
+
path: `/api/app/play-registrations/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
75
|
+
method: 'DELETE',
|
|
76
|
+
headers: headerParameters,
|
|
77
|
+
query: queryParameters,
|
|
78
|
+
}, initOverrides);
|
|
79
|
+
|
|
80
|
+
return new runtime.VoidApiResponse(response);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Cancel registration
|
|
85
|
+
*/
|
|
86
|
+
async apiAppPlayRegistrationsIdDelete(requestParameters: ApiAppPlayRegistrationsIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
87
|
+
await this.apiAppPlayRegistrationsIdDeleteRaw(requestParameters, initOverrides);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Get user\'s registrations
|
|
92
|
+
*/
|
|
93
|
+
async apiAppPlayRegistrationsMyRegistrationsGetRaw(requestParameters: ApiAppPlayRegistrationsMyRegistrationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlayRegistrationListResponse>> {
|
|
94
|
+
const queryParameters: any = {};
|
|
95
|
+
|
|
96
|
+
if (requestParameters['status'] != null) {
|
|
97
|
+
queryParameters['status'] = requestParameters['status'];
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (requestParameters['page'] != null) {
|
|
101
|
+
queryParameters['page'] = requestParameters['page'];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (requestParameters['size'] != null) {
|
|
105
|
+
queryParameters['size'] = requestParameters['size'];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
109
|
+
|
|
110
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
111
|
+
const token = this.configuration.accessToken;
|
|
112
|
+
const tokenString = await token("bearerAuth", []);
|
|
113
|
+
|
|
114
|
+
if (tokenString) {
|
|
115
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
const response = await this.request({
|
|
119
|
+
path: `/api/app/play-registrations/my-registrations`,
|
|
120
|
+
method: 'GET',
|
|
121
|
+
headers: headerParameters,
|
|
122
|
+
query: queryParameters,
|
|
123
|
+
}, initOverrides);
|
|
124
|
+
|
|
125
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PlayRegistrationListResponseFromJSON(jsonValue));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Get user\'s registrations
|
|
130
|
+
*/
|
|
131
|
+
async apiAppPlayRegistrationsMyRegistrationsGet(requestParameters: ApiAppPlayRegistrationsMyRegistrationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlayRegistrationListResponse> {
|
|
132
|
+
const response = await this.apiAppPlayRegistrationsMyRegistrationsGetRaw(requestParameters, initOverrides);
|
|
133
|
+
return await response.value();
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Register for a play search
|
|
138
|
+
*/
|
|
139
|
+
async apiAppPlayRegistrationsPlaySearchIdPostRaw(requestParameters: ApiAppPlayRegistrationsPlaySearchIdPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlayRegistrationDTO>> {
|
|
140
|
+
if (requestParameters['playSearchId'] == null) {
|
|
141
|
+
throw new runtime.RequiredError(
|
|
142
|
+
'playSearchId',
|
|
143
|
+
'Required parameter "playSearchId" was null or undefined when calling apiAppPlayRegistrationsPlaySearchIdPost().'
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const queryParameters: any = {};
|
|
148
|
+
|
|
149
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
150
|
+
|
|
151
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
152
|
+
const token = this.configuration.accessToken;
|
|
153
|
+
const tokenString = await token("bearerAuth", []);
|
|
154
|
+
|
|
155
|
+
if (tokenString) {
|
|
156
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
const response = await this.request({
|
|
160
|
+
path: `/api/app/play-registrations/{playSearchId}`.replace(`{${"playSearchId"}}`, encodeURIComponent(String(requestParameters['playSearchId']))),
|
|
161
|
+
method: 'POST',
|
|
162
|
+
headers: headerParameters,
|
|
163
|
+
query: queryParameters,
|
|
164
|
+
}, initOverrides);
|
|
165
|
+
|
|
166
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PlayRegistrationDTOFromJSON(jsonValue));
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Register for a play search
|
|
171
|
+
*/
|
|
172
|
+
async apiAppPlayRegistrationsPlaySearchIdPost(requestParameters: ApiAppPlayRegistrationsPlaySearchIdPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlayRegistrationDTO> {
|
|
173
|
+
const response = await this.apiAppPlayRegistrationsPlaySearchIdPostRaw(requestParameters, initOverrides);
|
|
174
|
+
return await response.value();
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
}
|
|
@@ -0,0 +1,323 @@
|
|
|
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
|
+
CreatePlaySearchRequest,
|
|
19
|
+
PlaySearchDTO,
|
|
20
|
+
PlaySearchDetailDTO,
|
|
21
|
+
PlaySearchListResponse,
|
|
22
|
+
PlaySearchStatus,
|
|
23
|
+
Sport,
|
|
24
|
+
} from '../models/index';
|
|
25
|
+
import {
|
|
26
|
+
CreatePlaySearchRequestFromJSON,
|
|
27
|
+
CreatePlaySearchRequestToJSON,
|
|
28
|
+
PlaySearchDTOFromJSON,
|
|
29
|
+
PlaySearchDTOToJSON,
|
|
30
|
+
PlaySearchDetailDTOFromJSON,
|
|
31
|
+
PlaySearchDetailDTOToJSON,
|
|
32
|
+
PlaySearchListResponseFromJSON,
|
|
33
|
+
PlaySearchListResponseToJSON,
|
|
34
|
+
PlaySearchStatusFromJSON,
|
|
35
|
+
PlaySearchStatusToJSON,
|
|
36
|
+
SportFromJSON,
|
|
37
|
+
SportToJSON,
|
|
38
|
+
} from '../models/index';
|
|
39
|
+
|
|
40
|
+
export interface ApiAppPlaySearchesGetRequest {
|
|
41
|
+
sport: Sport;
|
|
42
|
+
latitude?: number;
|
|
43
|
+
longitude?: number;
|
|
44
|
+
radiusMeters?: number;
|
|
45
|
+
gender?: string;
|
|
46
|
+
category?: string;
|
|
47
|
+
status?: string;
|
|
48
|
+
page?: number;
|
|
49
|
+
size?: number;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface ApiAppPlaySearchesIdCancelDeleteRequest {
|
|
53
|
+
id: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface ApiAppPlaySearchesIdGetRequest {
|
|
57
|
+
id: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface ApiAppPlaySearchesMySearchesGetRequest {
|
|
61
|
+
status?: PlaySearchStatus;
|
|
62
|
+
page?: number;
|
|
63
|
+
size?: number;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface ApiAppPlaySearchesPostRequest {
|
|
67
|
+
createPlaySearchRequest: CreatePlaySearchRequest;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
export class AppPlaySearchApi extends runtime.BaseAPI {
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* List play searches with filters (supports location-based search)
|
|
77
|
+
*/
|
|
78
|
+
async apiAppPlaySearchesGetRaw(requestParameters: ApiAppPlaySearchesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySearchListResponse>> {
|
|
79
|
+
if (requestParameters['sport'] == null) {
|
|
80
|
+
throw new runtime.RequiredError(
|
|
81
|
+
'sport',
|
|
82
|
+
'Required parameter "sport" was null or undefined when calling apiAppPlaySearchesGet().'
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const queryParameters: any = {};
|
|
87
|
+
|
|
88
|
+
if (requestParameters['sport'] != null) {
|
|
89
|
+
queryParameters['sport'] = requestParameters['sport'];
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (requestParameters['latitude'] != null) {
|
|
93
|
+
queryParameters['latitude'] = requestParameters['latitude'];
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (requestParameters['longitude'] != null) {
|
|
97
|
+
queryParameters['longitude'] = requestParameters['longitude'];
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (requestParameters['radiusMeters'] != null) {
|
|
101
|
+
queryParameters['radiusMeters'] = requestParameters['radiusMeters'];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (requestParameters['gender'] != null) {
|
|
105
|
+
queryParameters['gender'] = requestParameters['gender'];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (requestParameters['category'] != null) {
|
|
109
|
+
queryParameters['category'] = requestParameters['category'];
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (requestParameters['status'] != null) {
|
|
113
|
+
queryParameters['status'] = requestParameters['status'];
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (requestParameters['page'] != null) {
|
|
117
|
+
queryParameters['page'] = requestParameters['page'];
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (requestParameters['size'] != null) {
|
|
121
|
+
queryParameters['size'] = requestParameters['size'];
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
125
|
+
|
|
126
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
127
|
+
const token = this.configuration.accessToken;
|
|
128
|
+
const tokenString = await token("bearerAuth", []);
|
|
129
|
+
|
|
130
|
+
if (tokenString) {
|
|
131
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
const response = await this.request({
|
|
135
|
+
path: `/api/app/play-searches`,
|
|
136
|
+
method: 'GET',
|
|
137
|
+
headers: headerParameters,
|
|
138
|
+
query: queryParameters,
|
|
139
|
+
}, initOverrides);
|
|
140
|
+
|
|
141
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PlaySearchListResponseFromJSON(jsonValue));
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* List play searches with filters (supports location-based search)
|
|
146
|
+
*/
|
|
147
|
+
async apiAppPlaySearchesGet(requestParameters: ApiAppPlaySearchesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySearchListResponse> {
|
|
148
|
+
const response = await this.apiAppPlaySearchesGetRaw(requestParameters, initOverrides);
|
|
149
|
+
return await response.value();
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Cancel own play search
|
|
154
|
+
*/
|
|
155
|
+
async apiAppPlaySearchesIdCancelDeleteRaw(requestParameters: ApiAppPlaySearchesIdCancelDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
156
|
+
if (requestParameters['id'] == null) {
|
|
157
|
+
throw new runtime.RequiredError(
|
|
158
|
+
'id',
|
|
159
|
+
'Required parameter "id" was null or undefined when calling apiAppPlaySearchesIdCancelDelete().'
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const queryParameters: any = {};
|
|
164
|
+
|
|
165
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
166
|
+
|
|
167
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
168
|
+
const token = this.configuration.accessToken;
|
|
169
|
+
const tokenString = await token("bearerAuth", []);
|
|
170
|
+
|
|
171
|
+
if (tokenString) {
|
|
172
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
const response = await this.request({
|
|
176
|
+
path: `/api/app/play-searches/{id}/cancel`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
177
|
+
method: 'DELETE',
|
|
178
|
+
headers: headerParameters,
|
|
179
|
+
query: queryParameters,
|
|
180
|
+
}, initOverrides);
|
|
181
|
+
|
|
182
|
+
return new runtime.VoidApiResponse(response);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Cancel own play search
|
|
187
|
+
*/
|
|
188
|
+
async apiAppPlaySearchesIdCancelDelete(requestParameters: ApiAppPlaySearchesIdCancelDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
189
|
+
await this.apiAppPlaySearchesIdCancelDeleteRaw(requestParameters, initOverrides);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Get play search details with registrations
|
|
194
|
+
*/
|
|
195
|
+
async apiAppPlaySearchesIdGetRaw(requestParameters: ApiAppPlaySearchesIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySearchDetailDTO>> {
|
|
196
|
+
if (requestParameters['id'] == null) {
|
|
197
|
+
throw new runtime.RequiredError(
|
|
198
|
+
'id',
|
|
199
|
+
'Required parameter "id" was null or undefined when calling apiAppPlaySearchesIdGet().'
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
const queryParameters: any = {};
|
|
204
|
+
|
|
205
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
206
|
+
|
|
207
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
208
|
+
const token = this.configuration.accessToken;
|
|
209
|
+
const tokenString = await token("bearerAuth", []);
|
|
210
|
+
|
|
211
|
+
if (tokenString) {
|
|
212
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
const response = await this.request({
|
|
216
|
+
path: `/api/app/play-searches/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
217
|
+
method: 'GET',
|
|
218
|
+
headers: headerParameters,
|
|
219
|
+
query: queryParameters,
|
|
220
|
+
}, initOverrides);
|
|
221
|
+
|
|
222
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PlaySearchDetailDTOFromJSON(jsonValue));
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Get play search details with registrations
|
|
227
|
+
*/
|
|
228
|
+
async apiAppPlaySearchesIdGet(requestParameters: ApiAppPlaySearchesIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySearchDetailDTO> {
|
|
229
|
+
const response = await this.apiAppPlaySearchesIdGetRaw(requestParameters, initOverrides);
|
|
230
|
+
return await response.value();
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Get user\'s own play searches
|
|
235
|
+
*/
|
|
236
|
+
async apiAppPlaySearchesMySearchesGetRaw(requestParameters: ApiAppPlaySearchesMySearchesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySearchListResponse>> {
|
|
237
|
+
const queryParameters: any = {};
|
|
238
|
+
|
|
239
|
+
if (requestParameters['status'] != null) {
|
|
240
|
+
queryParameters['status'] = requestParameters['status'];
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
if (requestParameters['page'] != null) {
|
|
244
|
+
queryParameters['page'] = requestParameters['page'];
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
if (requestParameters['size'] != null) {
|
|
248
|
+
queryParameters['size'] = requestParameters['size'];
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
252
|
+
|
|
253
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
254
|
+
const token = this.configuration.accessToken;
|
|
255
|
+
const tokenString = await token("bearerAuth", []);
|
|
256
|
+
|
|
257
|
+
if (tokenString) {
|
|
258
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
const response = await this.request({
|
|
262
|
+
path: `/api/app/play-searches/my-searches`,
|
|
263
|
+
method: 'GET',
|
|
264
|
+
headers: headerParameters,
|
|
265
|
+
query: queryParameters,
|
|
266
|
+
}, initOverrides);
|
|
267
|
+
|
|
268
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PlaySearchListResponseFromJSON(jsonValue));
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Get user\'s own play searches
|
|
273
|
+
*/
|
|
274
|
+
async apiAppPlaySearchesMySearchesGet(requestParameters: ApiAppPlaySearchesMySearchesGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySearchListResponse> {
|
|
275
|
+
const response = await this.apiAppPlaySearchesMySearchesGetRaw(requestParameters, initOverrides);
|
|
276
|
+
return await response.value();
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Create a new play search
|
|
281
|
+
*/
|
|
282
|
+
async apiAppPlaySearchesPostRaw(requestParameters: ApiAppPlaySearchesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySearchDTO>> {
|
|
283
|
+
if (requestParameters['createPlaySearchRequest'] == null) {
|
|
284
|
+
throw new runtime.RequiredError(
|
|
285
|
+
'createPlaySearchRequest',
|
|
286
|
+
'Required parameter "createPlaySearchRequest" was null or undefined when calling apiAppPlaySearchesPost().'
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
const queryParameters: any = {};
|
|
291
|
+
|
|
292
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
293
|
+
|
|
294
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
295
|
+
|
|
296
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
297
|
+
const token = this.configuration.accessToken;
|
|
298
|
+
const tokenString = await token("bearerAuth", []);
|
|
299
|
+
|
|
300
|
+
if (tokenString) {
|
|
301
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
const response = await this.request({
|
|
305
|
+
path: `/api/app/play-searches`,
|
|
306
|
+
method: 'POST',
|
|
307
|
+
headers: headerParameters,
|
|
308
|
+
query: queryParameters,
|
|
309
|
+
body: CreatePlaySearchRequestToJSON(requestParameters['createPlaySearchRequest']),
|
|
310
|
+
}, initOverrides);
|
|
311
|
+
|
|
312
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PlaySearchDTOFromJSON(jsonValue));
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Create a new play search
|
|
317
|
+
*/
|
|
318
|
+
async apiAppPlaySearchesPost(requestParameters: ApiAppPlaySearchesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySearchDTO> {
|
|
319
|
+
const response = await this.apiAppPlaySearchesPostRaw(requestParameters, initOverrides);
|
|
320
|
+
return await response.value();
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
}
|
package/apis/UsersApi.ts
CHANGED
|
@@ -16,8 +16,11 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
CreateUserNotificationDto,
|
|
19
|
+
GetNotificationByType200Response,
|
|
20
|
+
NotificationChannelType,
|
|
19
21
|
SavePushTokenRequest,
|
|
20
22
|
Sport,
|
|
23
|
+
ToggleNotificationByType200Response,
|
|
21
24
|
UpdateUserNotificationDto,
|
|
22
25
|
User,
|
|
23
26
|
UserDto,
|
|
@@ -29,10 +32,16 @@ import type {
|
|
|
29
32
|
import {
|
|
30
33
|
CreateUserNotificationDtoFromJSON,
|
|
31
34
|
CreateUserNotificationDtoToJSON,
|
|
35
|
+
GetNotificationByType200ResponseFromJSON,
|
|
36
|
+
GetNotificationByType200ResponseToJSON,
|
|
37
|
+
NotificationChannelTypeFromJSON,
|
|
38
|
+
NotificationChannelTypeToJSON,
|
|
32
39
|
SavePushTokenRequestFromJSON,
|
|
33
40
|
SavePushTokenRequestToJSON,
|
|
34
41
|
SportFromJSON,
|
|
35
42
|
SportToJSON,
|
|
43
|
+
ToggleNotificationByType200ResponseFromJSON,
|
|
44
|
+
ToggleNotificationByType200ResponseToJSON,
|
|
36
45
|
UpdateUserNotificationDtoFromJSON,
|
|
37
46
|
UpdateUserNotificationDtoToJSON,
|
|
38
47
|
UserFromJSON,
|
|
@@ -61,6 +70,10 @@ export interface DeleteUserNotificationRequest {
|
|
|
61
70
|
notificationId: string;
|
|
62
71
|
}
|
|
63
72
|
|
|
73
|
+
export interface GetNotificationByTypeRequest {
|
|
74
|
+
type: NotificationChannelType;
|
|
75
|
+
}
|
|
76
|
+
|
|
64
77
|
export interface GetUserByEmailRequest {
|
|
65
78
|
email: string;
|
|
66
79
|
}
|
|
@@ -78,6 +91,10 @@ export interface SavePushTokenOperationRequest {
|
|
|
78
91
|
savePushTokenRequest: SavePushTokenRequest;
|
|
79
92
|
}
|
|
80
93
|
|
|
94
|
+
export interface ToggleNotificationByTypeRequest {
|
|
95
|
+
type: NotificationChannelType;
|
|
96
|
+
}
|
|
97
|
+
|
|
81
98
|
export interface ToggleUserNotificationRequest {
|
|
82
99
|
notificationId: string;
|
|
83
100
|
}
|
|
@@ -236,6 +253,47 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
236
253
|
await this.deleteUserNotificationRaw(requestParameters, initOverrides);
|
|
237
254
|
}
|
|
238
255
|
|
|
256
|
+
/**
|
|
257
|
+
* Get notification status for a specific type
|
|
258
|
+
*/
|
|
259
|
+
async getNotificationByTypeRaw(requestParameters: GetNotificationByTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetNotificationByType200Response>> {
|
|
260
|
+
if (requestParameters['type'] == null) {
|
|
261
|
+
throw new runtime.RequiredError(
|
|
262
|
+
'type',
|
|
263
|
+
'Required parameter "type" was null or undefined when calling getNotificationByType().'
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
const queryParameters: any = {};
|
|
268
|
+
|
|
269
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
270
|
+
|
|
271
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
272
|
+
const token = this.configuration.accessToken;
|
|
273
|
+
const tokenString = await token("bearerAuth", []);
|
|
274
|
+
|
|
275
|
+
if (tokenString) {
|
|
276
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
const response = await this.request({
|
|
280
|
+
path: `/api/users/notifications/type/{type}`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters['type']))),
|
|
281
|
+
method: 'GET',
|
|
282
|
+
headers: headerParameters,
|
|
283
|
+
query: queryParameters,
|
|
284
|
+
}, initOverrides);
|
|
285
|
+
|
|
286
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetNotificationByType200ResponseFromJSON(jsonValue));
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Get notification status for a specific type
|
|
291
|
+
*/
|
|
292
|
+
async getNotificationByType(requestParameters: GetNotificationByTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetNotificationByType200Response> {
|
|
293
|
+
const response = await this.getNotificationByTypeRaw(requestParameters, initOverrides);
|
|
294
|
+
return await response.value();
|
|
295
|
+
}
|
|
296
|
+
|
|
239
297
|
/**
|
|
240
298
|
* Retrieve a user by email
|
|
241
299
|
*/
|
|
@@ -444,6 +502,47 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
444
502
|
return await response.value();
|
|
445
503
|
}
|
|
446
504
|
|
|
505
|
+
/**
|
|
506
|
+
* Toggle a notification type (creates if doesn\'t exist, toggles if exists)
|
|
507
|
+
*/
|
|
508
|
+
async toggleNotificationByTypeRaw(requestParameters: ToggleNotificationByTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ToggleNotificationByType200Response>> {
|
|
509
|
+
if (requestParameters['type'] == null) {
|
|
510
|
+
throw new runtime.RequiredError(
|
|
511
|
+
'type',
|
|
512
|
+
'Required parameter "type" was null or undefined when calling toggleNotificationByType().'
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
const queryParameters: any = {};
|
|
517
|
+
|
|
518
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
519
|
+
|
|
520
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
521
|
+
const token = this.configuration.accessToken;
|
|
522
|
+
const tokenString = await token("bearerAuth", []);
|
|
523
|
+
|
|
524
|
+
if (tokenString) {
|
|
525
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
const response = await this.request({
|
|
529
|
+
path: `/api/users/notifications/type/{type}/toggle`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters['type']))),
|
|
530
|
+
method: 'PUT',
|
|
531
|
+
headers: headerParameters,
|
|
532
|
+
query: queryParameters,
|
|
533
|
+
}, initOverrides);
|
|
534
|
+
|
|
535
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ToggleNotificationByType200ResponseFromJSON(jsonValue));
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* Toggle a notification type (creates if doesn\'t exist, toggles if exists)
|
|
540
|
+
*/
|
|
541
|
+
async toggleNotificationByType(requestParameters: ToggleNotificationByTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ToggleNotificationByType200Response> {
|
|
542
|
+
const response = await this.toggleNotificationByTypeRaw(requestParameters, initOverrides);
|
|
543
|
+
return await response.value();
|
|
544
|
+
}
|
|
545
|
+
|
|
447
546
|
/**
|
|
448
547
|
* Toggle the enabled state of a notification preference
|
|
449
548
|
*/
|
package/apis/index.ts
CHANGED
|
@@ -17,6 +17,8 @@ export * from './AdminSubscriptionBillingApi';
|
|
|
17
17
|
export * from './AdminSubscriptionsApi';
|
|
18
18
|
export * from './AdminUsersApi';
|
|
19
19
|
export * from './AdminWhatsAppTemplatesApi';
|
|
20
|
+
export * from './AppPlayRegistrationApi';
|
|
21
|
+
export * from './AppPlaySearchApi';
|
|
20
22
|
export * from './AuthApi';
|
|
21
23
|
export * from './BackgroundApi';
|
|
22
24
|
export * from './ClubApi';
|