@jugarhoy/api 1.1.44 → 1.1.45

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.
@@ -15,18 +15,9 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
- ExpireUnpaidReservationResult,
19
- ExpireUnpaidReservations401Response,
20
- ExpireUnpaidReservations500Response,
21
18
  GenerateRecurringGames200Response,
22
19
  } from '../models/index';
23
20
  import {
24
- ExpireUnpaidReservationResultFromJSON,
25
- ExpireUnpaidReservationResultToJSON,
26
- ExpireUnpaidReservations401ResponseFromJSON,
27
- ExpireUnpaidReservations401ResponseToJSON,
28
- ExpireUnpaidReservations500ResponseFromJSON,
29
- ExpireUnpaidReservations500ResponseToJSON,
30
21
  GenerateRecurringGames200ResponseFromJSON,
31
22
  GenerateRecurringGames200ResponseToJSON,
32
23
  } from '../models/index';
@@ -36,36 +27,6 @@ import {
36
27
  */
37
28
  export class BackgroundApi extends runtime.BaseAPI {
38
29
 
39
- /**
40
- * Expire all unpaid reservations older than the configured timeout
41
- */
42
- async expireUnpaidReservationsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExpireUnpaidReservationResult>> {
43
- const queryParameters: any = {};
44
-
45
- const headerParameters: runtime.HTTPHeaders = {};
46
-
47
- if (this.configuration && this.configuration.apiKey) {
48
- headerParameters["x-jugarhoy-secret"] = await this.configuration.apiKey("x-jugarhoy-secret"); // jugarhoySecret authentication
49
- }
50
-
51
- const response = await this.request({
52
- path: `/api/background/expire-unpaid-reservations`,
53
- method: 'POST',
54
- headers: headerParameters,
55
- query: queryParameters,
56
- }, initOverrides);
57
-
58
- return new runtime.JSONApiResponse(response, (jsonValue) => ExpireUnpaidReservationResultFromJSON(jsonValue));
59
- }
60
-
61
- /**
62
- * Expire all unpaid reservations older than the configured timeout
63
- */
64
- async expireUnpaidReservations(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExpireUnpaidReservationResult> {
65
- const response = await this.expireUnpaidReservationsRaw(initOverrides);
66
- return await response.value();
67
- }
68
-
69
30
  /**
70
31
  * For each active recurring game, tops up future PlaySearch events to maintain a rolling window of 4 upcoming matches. Run weekly.
71
32
  * Ensure all active recurring games have 4 upcoming PlaySearch events
@@ -46,11 +46,17 @@ export interface ReservationParams {
46
46
  */
47
47
  playPriceId: string;
48
48
  /**
49
- * The start date and time of the reservation.
50
- * @type {Date}
49
+ * Reservation date in YYYY-MM-DD format (location's local timezone).
50
+ * @type {string}
51
+ * @memberof ReservationParams
52
+ */
53
+ rentDate: string;
54
+ /**
55
+ * Reservation start hour in HH:MM format (location's local timezone).
56
+ * @type {string}
51
57
  * @memberof ReservationParams
52
58
  */
53
- rentedFrom: Date;
59
+ rentHour: string;
54
60
  /**
55
61
  * The duration of the reservation in minutes.
56
62
  * @type {number}
@@ -86,7 +92,8 @@ export function instanceOfReservationParams(value: object): value is Reservation
86
92
  if (!('locationId' in value) || value['locationId'] === undefined) return false;
87
93
  if (!('playSpotId' in value) || value['playSpotId'] === undefined) return false;
88
94
  if (!('playPriceId' in value) || value['playPriceId'] === undefined) return false;
89
- if (!('rentedFrom' in value) || value['rentedFrom'] === undefined) return false;
95
+ if (!('rentDate' in value) || value['rentDate'] === undefined) return false;
96
+ if (!('rentHour' in value) || value['rentHour'] === undefined) return false;
90
97
  if (!('duration' in value) || value['duration'] === undefined) return false;
91
98
  if (!('paymentMethod' in value) || value['paymentMethod'] === undefined) return false;
92
99
  return true;
@@ -105,7 +112,8 @@ export function ReservationParamsFromJSONTyped(json: any, ignoreDiscriminator: b
105
112
  'locationId': json['locationId'],
106
113
  'playSpotId': json['playSpotId'],
107
114
  'playPriceId': json['playPriceId'],
108
- 'rentedFrom': (new Date(json['rentedFrom'])),
115
+ 'rentDate': json['rentDate'],
116
+ 'rentHour': json['rentHour'],
109
117
  'duration': json['duration'],
110
118
  'paymentMethod': PaymentMethodFromJSON(json['paymentMethod']),
111
119
  'mobile': json['mobile'] == null ? undefined : json['mobile'],
@@ -127,7 +135,8 @@ export function ReservationParamsToJSONTyped(value?: ReservationParams | null, i
127
135
  'locationId': value['locationId'],
128
136
  'playSpotId': value['playSpotId'],
129
137
  'playPriceId': value['playPriceId'],
130
- 'rentedFrom': ((value['rentedFrom']).toISOString()),
138
+ 'rentDate': value['rentDate'],
139
+ 'rentHour': value['rentHour'],
131
140
  'duration': value['duration'],
132
141
  'paymentMethod': PaymentMethodToJSON(value['paymentMethod']),
133
142
  'mobile': value['mobile'],
package/models/index.ts CHANGED
@@ -129,9 +129,6 @@ export * from './DominantPlaySide';
129
129
  export * from './DominantSide';
130
130
  export * from './EditTeamFeedPostRequest';
131
131
  export * from './ErrorResponse';
132
- export * from './ExpireUnpaidReservationResult';
133
- export * from './ExpireUnpaidReservations401Response';
134
- export * from './ExpireUnpaidReservations500Response';
135
132
  export * from './ExtendSubscriptions200Response';
136
133
  export * from './ExtendSubscriptions200ResponseDetailsInner';
137
134
  export * from './Feature';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jugarhoy/api",
3
- "version": "1.1.44",
3
+ "version": "1.1.45",
4
4
  "description": "TypeScript SDK for Jugar Hoy API",
5
5
  "main": "index.ts",
6
6
  "types": "index.ts",
@@ -1,81 +0,0 @@
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 { Reserve } from './Reserve';
17
- import {
18
- ReserveFromJSON,
19
- ReserveFromJSONTyped,
20
- ReserveToJSON,
21
- ReserveToJSONTyped,
22
- } from './Reserve';
23
-
24
- /**
25
- *
26
- * @export
27
- * @interface ExpireUnpaidReservationResult
28
- */
29
- export interface ExpireUnpaidReservationResult {
30
- /**
31
- * Number of reservations that were expired
32
- * @type {number}
33
- * @memberof ExpireUnpaidReservationResult
34
- */
35
- expiredCount?: number;
36
- /**
37
- * Array of expired reservations
38
- * @type {Array<Reserve>}
39
- * @memberof ExpireUnpaidReservationResult
40
- */
41
- expiredReservations?: Array<Reserve>;
42
- }
43
-
44
- /**
45
- * Check if a given object implements the ExpireUnpaidReservationResult interface.
46
- */
47
- export function instanceOfExpireUnpaidReservationResult(value: object): value is ExpireUnpaidReservationResult {
48
- return true;
49
- }
50
-
51
- export function ExpireUnpaidReservationResultFromJSON(json: any): ExpireUnpaidReservationResult {
52
- return ExpireUnpaidReservationResultFromJSONTyped(json, false);
53
- }
54
-
55
- export function ExpireUnpaidReservationResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExpireUnpaidReservationResult {
56
- if (json == null) {
57
- return json;
58
- }
59
- return {
60
-
61
- 'expiredCount': json['expiredCount'] == null ? undefined : json['expiredCount'],
62
- 'expiredReservations': json['expiredReservations'] == null ? undefined : ((json['expiredReservations'] as Array<any>).map(ReserveFromJSON)),
63
- };
64
- }
65
-
66
- export function ExpireUnpaidReservationResultToJSON(json: any): ExpireUnpaidReservationResult {
67
- return ExpireUnpaidReservationResultToJSONTyped(json, false);
68
- }
69
-
70
- export function ExpireUnpaidReservationResultToJSONTyped(value?: ExpireUnpaidReservationResult | null, ignoreDiscriminator: boolean = false): any {
71
- if (value == null) {
72
- return value;
73
- }
74
-
75
- return {
76
-
77
- 'expiredCount': value['expiredCount'],
78
- 'expiredReservations': value['expiredReservations'] == null ? undefined : ((value['expiredReservations'] as Array<any>).map(ReserveToJSON)),
79
- };
80
- }
81
-
@@ -1,65 +0,0 @@
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 ExpireUnpaidReservations401Response
20
- */
21
- export interface ExpireUnpaidReservations401Response {
22
- /**
23
- *
24
- * @type {string}
25
- * @memberof ExpireUnpaidReservations401Response
26
- */
27
- error?: string;
28
- }
29
-
30
- /**
31
- * Check if a given object implements the ExpireUnpaidReservations401Response interface.
32
- */
33
- export function instanceOfExpireUnpaidReservations401Response(value: object): value is ExpireUnpaidReservations401Response {
34
- return true;
35
- }
36
-
37
- export function ExpireUnpaidReservations401ResponseFromJSON(json: any): ExpireUnpaidReservations401Response {
38
- return ExpireUnpaidReservations401ResponseFromJSONTyped(json, false);
39
- }
40
-
41
- export function ExpireUnpaidReservations401ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExpireUnpaidReservations401Response {
42
- if (json == null) {
43
- return json;
44
- }
45
- return {
46
-
47
- 'error': json['error'] == null ? undefined : json['error'],
48
- };
49
- }
50
-
51
- export function ExpireUnpaidReservations401ResponseToJSON(json: any): ExpireUnpaidReservations401Response {
52
- return ExpireUnpaidReservations401ResponseToJSONTyped(json, false);
53
- }
54
-
55
- export function ExpireUnpaidReservations401ResponseToJSONTyped(value?: ExpireUnpaidReservations401Response | null, ignoreDiscriminator: boolean = false): any {
56
- if (value == null) {
57
- return value;
58
- }
59
-
60
- return {
61
-
62
- 'error': value['error'],
63
- };
64
- }
65
-
@@ -1,65 +0,0 @@
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 ExpireUnpaidReservations500Response
20
- */
21
- export interface ExpireUnpaidReservations500Response {
22
- /**
23
- *
24
- * @type {string}
25
- * @memberof ExpireUnpaidReservations500Response
26
- */
27
- error?: string;
28
- }
29
-
30
- /**
31
- * Check if a given object implements the ExpireUnpaidReservations500Response interface.
32
- */
33
- export function instanceOfExpireUnpaidReservations500Response(value: object): value is ExpireUnpaidReservations500Response {
34
- return true;
35
- }
36
-
37
- export function ExpireUnpaidReservations500ResponseFromJSON(json: any): ExpireUnpaidReservations500Response {
38
- return ExpireUnpaidReservations500ResponseFromJSONTyped(json, false);
39
- }
40
-
41
- export function ExpireUnpaidReservations500ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExpireUnpaidReservations500Response {
42
- if (json == null) {
43
- return json;
44
- }
45
- return {
46
-
47
- 'error': json['error'] == null ? undefined : json['error'],
48
- };
49
- }
50
-
51
- export function ExpireUnpaidReservations500ResponseToJSON(json: any): ExpireUnpaidReservations500Response {
52
- return ExpireUnpaidReservations500ResponseToJSONTyped(json, false);
53
- }
54
-
55
- export function ExpireUnpaidReservations500ResponseToJSONTyped(value?: ExpireUnpaidReservations500Response | null, ignoreDiscriminator: boolean = false): any {
56
- if (value == null) {
57
- return value;
58
- }
59
-
60
- return {
61
-
62
- 'error': value['error'],
63
- };
64
- }
65
-