@swipegames/public-api 1.2.5

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,118 @@
1
+ /**
2
+ * Generated by orval v8.5.2 🍺
3
+ * Do not edit manually.
4
+ * Swipe Games Core Public API
5
+ * This is the Core API for Swipe Games Public API. It provides endpoints to create new games, manage free rounds campaigns, and more.
6
+
7
+ * OpenAPI spec version: 1.2.5
8
+ */
9
+ import * as zod from 'zod';
10
+ /**
11
+ * Use this request to create a new game. It registers new `demo` or `real` game on the server and returns the Launcher URL
12
+ for the game. You can redirect the user to this URL to start playing the game or open it in iFrame.
13
+
14
+ * @summary Create new game
15
+ */
16
+ export const PostCreateNewGameHeader = zod.object({
17
+ "X-REQUEST-SIGN": zod.string().describe('Request signature (see Authentication section for more details)')
18
+ });
19
+ export const PostCreateNewGameBody = zod.object({
20
+ "cID": zod.string().uuid().describe('Client\'s ID. It\'s provided by Swipe Games and is used as your identifier.\n'),
21
+ "extCID": zod.string().describe('External Client\'s ID (client\/platform\/game aggregator\/integrator or casino on your side). This is provided from your side, and this is\nhow you identify your clients. We use it in all callbacks to you.\n'),
22
+ "gameID": zod.string().describe('Game\'s ID. This is Swipe Games\'s game identifier. See the list of supported games in `Game IDs` section.\n'),
23
+ "sessionID": zod.string().optional().describe('Session ID (external).This is your Session ID. We use it in all callbacks to you.\nNot required for demo games, since we don\'t use callbacks for demo games.\n'),
24
+ "returnURL": zod.string().optional().describe('Return URL which we could use to redirect the user after the game is finished\/exited. If you don\'t provide this URL, return button in the game will be disabled. Please make sure you provide this URL when using redirect to open the game, otherwise player cannot go back to your site.'),
25
+ "depositURL": zod.string().optional().describe('Deposit URL which we could use to open a deposit page for the user. If you don\'t provide this URL, deposit flow in the game will be disabled.'),
26
+ "currency": zod.string().describe('Currency code in ISO4217.'),
27
+ "locale": zod.string().describe('Locale code in IETF BCP 47 format (ISO 639-1 language code with optional ISO 3166-1 country code), using underscore as separator.'),
28
+ "platform": zod.enum(['desktop', 'mobile']).describe('Platform type where the game can be launched').describe('Platform code. This is used to identify the platform where the game is launched.'),
29
+ "demo": zod.boolean().describe('Demo mode. If true, the game will be launched in demo mode (means no callbacks will be fired on your side,\nand we use our demo balance for the game). If false, the game will be launched in real mode.\n'),
30
+ "initDemoBalance": zod.string().optional().describe('Initial demo balance for the user (in currency units). Only used in demo mode, ignored in real mode.\nMust be greater than the minimum bet. Default is 10 000 USD equivalent.\n'),
31
+ "user": zod.object({
32
+ "id": zod.string().describe('User\'s ID (external). This is User\'s ID on your side.'),
33
+ "firstName": zod.string().optional(),
34
+ "lastName": zod.string().optional(),
35
+ "nickName": zod.string().optional(),
36
+ "country": zod.string().optional().describe('Country code ISO 3166-1 alpha-2.')
37
+ }).optional()
38
+ });
39
+ export const PostCreateNewGameResponse = zod.object({
40
+ "gameURL": zod.string(),
41
+ "gsID": zod.string().uuid()
42
+ });
43
+ /**
44
+ * Create new free rounds campaign
45
+ * @summary Create new free rounds campaign
46
+ */
47
+ export const PostFreeRoundsHeader = zod.object({
48
+ "X-REQUEST-SIGN": zod.string().describe('Request signature (see Authentication section for more details)')
49
+ });
50
+ export const postFreeRoundsBodyQuantityMax = 99;
51
+ export const postFreeRoundsBodyBetLineMax = 99;
52
+ export const PostFreeRoundsBody = zod.object({
53
+ "extID": zod.string().describe('Free rounds ID (external). Used as idempotency key. Same ID can be used to create free rounds only once.\n'),
54
+ "cID": zod.string().uuid().describe('Client\'s ID (internal)'),
55
+ "extCID": zod.string().describe('External Client\'s ID (game aggregator or casino)'),
56
+ "gameIDs": zod.array(zod.string()).optional().describe('List of game IDs. If not provided, free rounds will be available for all games.'),
57
+ "userIDs": zod.array(zod.string()).optional().describe('List of player IDs (external). If not provided, free rounds will be available for all players.'),
58
+ "currency": zod.string().describe('Currency code in ISO4217'),
59
+ "quantity": zod.number().min(1).max(postFreeRoundsBodyQuantityMax).describe('Number of free rounds.'),
60
+ "betLine": zod.number().min(1).max(postFreeRoundsBodyBetLineMax).describe('Number of bet line configured for this game\/provider. You can find more information in related section\n[Free Rounds Bet Lines](\/public-api\/free-rounds-bet-lines).\n'),
61
+ "validFrom": zod.string().datetime({}).describe('Start date when free rounds become available.'),
62
+ "validUntil": zod.string().datetime({}).optional().describe('End date when free rounds become unavailable. If not provided then this campaign never ends.\nIf you provide finite validity duration, it should not exceed 30 days.\n')
63
+ });
64
+ export const PostFreeRoundsResponse = zod.object({
65
+ "id": zod.string().uuid().describe('Free rounds ID (internal).'),
66
+ "extID": zod.string().describe('Free rounds ID (external). This is provided in the request.')
67
+ });
68
+ /**
69
+ * Cancel/Delete existing free rounds campaign. You can cancel free rounds campaing during the campaign period, in this case
70
+ all `in-progress` free rounds will be continued, but no new free rounds will be started.
71
+
72
+ * @summary Cancel/Delete free rounds campaign
73
+ */
74
+ export const DeleteFreeRoundsHeader = zod.object({
75
+ "X-REQUEST-SIGN": zod.string().describe('Request signature (see Authentication section for more details)')
76
+ });
77
+ export const DeleteFreeRoundsBody = zod.object({
78
+ "id": zod.string().uuid().optional().describe('Free rounds ID (internal). Used as idempotency key. One of id or extID must be provided.\n'),
79
+ "extID": zod.string().optional().describe('Free rounds ID (external). Used as idempotency key. One of id or extID must be provided.\n'),
80
+ "cID": zod.string().uuid().describe('Client\'s ID (internal)'),
81
+ "extCID": zod.string().describe('External Client\'s ID (external)')
82
+ });
83
+ /**
84
+ * Get information about supported games
85
+ * @summary Get Games' Information
86
+ */
87
+ export const GetGamesQueryParams = zod.object({
88
+ "cID": zod.string().uuid().describe('Client\'s ID'),
89
+ "extCID": zod.string().describe('External Client\'s ID')
90
+ });
91
+ export const GetGamesHeader = zod.object({
92
+ "X-REQUEST-SIGN": zod.string().describe('Request signature (see Authentication section for more details)')
93
+ });
94
+ export const GetGamesResponseItem = zod.object({
95
+ "title": zod.string().describe('Game\'s title in English'),
96
+ "id": zod.string().describe('Game\'s ID (internal)'),
97
+ "locales": zod.array(zod.string()).describe('List of supported locales in IETF BCP 47 format (ISO 639-1 language code with optional ISO 3166-1 country code), using underscore as separator.'),
98
+ "currencies": zod.array(zod.string()).describe('List of supported currency codes in ISO 4217 format'),
99
+ "platforms": zod.array(zod.enum(['desktop', 'mobile']).describe('Platform type where the game can be launched')).describe('List of supported platform types'),
100
+ "images": zod.object({
101
+ "baseURL": zod.string().describe('Image\'s base URL'),
102
+ "square": zod.string().describe('Path to square image. 1:1 aspect.'),
103
+ "horizontal": zod.string().describe('Path to horizontal image. 4:3 aspect.'),
104
+ "widescreen": zod.string().describe('Path to widescreen image. 16:9 aspect.'),
105
+ "vertical": zod.string().describe('Path to vertical image. 3:4 aspect.')
106
+ }).describe('Image URLs for the game'),
107
+ "hasFreeSpins": zod.boolean().describe('If game supports free spins'),
108
+ "rtp": zod.number().describe('Game\'s RTP'),
109
+ "betLines": zod.array(zod.object({
110
+ "currency": zod.string().describe('Currency code in ISO4217'),
111
+ "values": zod.array(zod.object({
112
+ "maxBet": zod.string().describe('Maximum bet amount for this line (in currency units)'),
113
+ "maxCoeff": zod.string().describe('Maximum multiplier applied to the bet')
114
+ })).describe('List of bet line values (0-indexed array maps to 1-based bet lines).\n')
115
+ })).optional().describe('List of bet lines supported for this game per currency. Available\nonly if game has free spins. See more info in related section [Free Rounds Bet Lines](\/public-api\/free-rounds-bet-lines).\n')
116
+ });
117
+ export const GetGamesResponse = zod.array(GetGamesResponseItem);
118
+ //# sourceMappingURL=api.gen.zod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.gen.zod.js","sourceRoot":"","sources":["../../../../../../api/v1.0/core/api.gen.zod.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC,MAAM,CAAC;IAChD,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iEAAiE,CAAC;CAC3G,CAAC,CAAA;A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AQ,CAAC,kMAAkM,CAAC;CAC1N,CAAC,CAAA;AACF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAA"}
@@ -0,0 +1,410 @@
1
+ /**
2
+ * Generated by orval v8.5.2 🍺
3
+ * Do not edit manually.
4
+ * Swipe Games Integration Adapter Public API
5
+ * This is the Integration Adapter API for Swipe Games Public API.
6
+ It is used to make reverse calls to integrations working through Public API.
7
+ Please implement this API on your side to support Swipe Games Public API.
8
+
9
+ * OpenAPI spec version: 1.2.5
10
+ */
11
+ /**
12
+ * Error code. Could be handled by client accordingly (with localized message and related action).
13
+ */
14
+ export type ErrorResponseWithCodeAndActionCode = typeof ErrorResponseWithCodeAndActionCode[keyof typeof ErrorResponseWithCodeAndActionCode];
15
+ export declare const ErrorResponseWithCodeAndActionCode: {
16
+ readonly game_not_found: "game_not_found";
17
+ readonly currency_not_supported: "currency_not_supported";
18
+ readonly locale_not_supported: "locale_not_supported";
19
+ readonly account_blocked: "account_blocked";
20
+ readonly bet_limit: "bet_limit";
21
+ readonly loss_limit: "loss_limit";
22
+ readonly time_limit: "time_limit";
23
+ readonly insufficient_funds: "insufficient_funds";
24
+ readonly session_expired: "session_expired";
25
+ readonly session_not_found: "session_not_found";
26
+ readonly client_connection_error: "client_connection_error";
27
+ };
28
+ /**
29
+ * Required client action.
30
+ - `refresh` - shows a refresh button to the player. Player cannot continue without refreshing the game page.
31
+ It's useful when the game session expires or the game is not available anymore. Once page is refreshed,
32
+ the game will be reloaded and the player can continue playing. This might not work when games aren't embedded
33
+ in the casino, but are opened in a new tab or window, since it will reopen the game again.
34
+
35
+ */
36
+ export type ErrorResponseWithCodeAndActionAction = typeof ErrorResponseWithCodeAndActionAction[keyof typeof ErrorResponseWithCodeAndActionAction];
37
+ export declare const ErrorResponseWithCodeAndActionAction: {
38
+ readonly refresh: "refresh";
39
+ };
40
+ /**
41
+ * Error code.
42
+ */
43
+ export type ErrorResponseCode = typeof ErrorResponseCode[keyof typeof ErrorResponseCode];
44
+ export declare const ErrorResponseCode: {
45
+ readonly game_not_found: "game_not_found";
46
+ readonly currency_not_supported: "currency_not_supported";
47
+ readonly locale_not_supported: "locale_not_supported";
48
+ readonly account_blocked: "account_blocked";
49
+ readonly bet_limit: "bet_limit";
50
+ readonly loss_limit: "loss_limit";
51
+ readonly time_limit: "time_limit";
52
+ readonly insufficient_funds: "insufficient_funds";
53
+ readonly session_expired: "session_expired";
54
+ readonly session_not_found: "session_not_found";
55
+ readonly client_connection_error: "client_connection_error";
56
+ };
57
+ /**
58
+ * General error response for Swipe Games Public API. Usually used for Public API responses.
59
+
60
+ */
61
+ export interface ErrorResponse {
62
+ /** A brief description of the error in English. Could be shown to the player. */
63
+ message: string;
64
+ /** Technical details for the error. Could be used for debugging, should not be shown to the player. */
65
+ details?: string;
66
+ /** Error code. */
67
+ code?: ErrorResponseCode;
68
+ }
69
+ /**
70
+ * Error response for Swipe Games Integration Adapter Public API. In additional to the common error response,
71
+ it contains an action field that describes the required client action (could be omit). If error code is provided in additional
72
+ client will handle it accordingly and with priority over action.
73
+ You can provide either message or message and code. Code always has
74
+ priority over message when both are provided. It means if you provide code, the client will handle it accordingly with some localized messaage,
75
+ related to the code. If you provide only message, the client will show it to the player as is.
76
+
77
+ */
78
+ export type ErrorResponseWithCodeAndAction = ErrorResponse & {
79
+ /** Error code. Could be handled by client accordingly (with localized message and related action). */
80
+ code?: ErrorResponseWithCodeAndActionCode;
81
+ /** Required client action.
82
+ - `refresh` - shows a refresh button to the player. Player cannot continue without refreshing the game page.
83
+ It's useful when the game session expires or the game is not available anymore. Once page is refreshed,
84
+ the game will be reloaded and the player can continue playing. This might not work when games aren't embedded
85
+ in the casino, but are opened in a new tab or window, since it will reopen the game again.
86
+ */
87
+ action?: ErrorResponseWithCodeAndActionAction;
88
+ /** Client action related data.
89
+ You can pass additional data to the client action. Not all actions require this field.
90
+ */
91
+ actionData?: string;
92
+ };
93
+ export interface BalanceResponse {
94
+ /**
95
+ * The player's balance in selected currency **main** units (**not cents**).
96
+ Currency selected by the client during the `Create New Game` call.
97
+ We support 2 decimal places for all fiat currencies.
98
+
99
+ * @pattern ^(0|[1-9]\d*)(\.\d+)?$
100
+ */
101
+ balance: string;
102
+ }
103
+ /**
104
+ * The type of the bet.
105
+ - `regular` type means regular bet,
106
+ - `free` type means free bet (see Free Rounds section).
107
+
108
+ */
109
+ export type BetRequestType = typeof BetRequestType[keyof typeof BetRequestType];
110
+ export declare const BetRequestType: {
111
+ readonly regular: "regular";
112
+ readonly free: "free";
113
+ };
114
+ export interface BetRequest {
115
+ /** The type of the bet.
116
+ - `regular` type means regular bet,
117
+ - `free` type means free bet (see Free Rounds section).
118
+ */
119
+ type: BetRequestType;
120
+ /** The Game Session's ID (external). Provided by client via `Create New Game` call.
121
+ */
122
+ sessionID: string;
123
+ /**
124
+ * The amount of the bet in currency **main** units (**not cents**).
125
+ Currency selected by the client during the `Create New Game` call.
126
+ We support 2 decimal places for all fiat currencies.
127
+
128
+ * @pattern ^([1-9]\d*)(\.\d+)?$
129
+ */
130
+ amount: string;
131
+ /** Unique ID for the bet (internal) on Swipe Games' side.
132
+ Could be used as idempotency key.
133
+ */
134
+ txID: string;
135
+ /** Non unique ID for the round (internal) on Swipe Games' side.
136
+ Could be the same for different games.
137
+ */
138
+ roundID: string;
139
+ /** Free Rounds ID (external).
140
+ This field is provided only for free rounds bets (where `type` is `free`).
141
+ */
142
+ frID?: string;
143
+ }
144
+ export interface BetResponse {
145
+ /**
146
+ * The player's balance in selected currency **main** units (note: not cents) after the bet is applied.
147
+ Currency selected by the client during the `Create New Game` call.
148
+ We support 2 decimal places for all fiat currencies.
149
+
150
+ * @pattern ^(0|[1-9]\d*)(\.\d+)?$
151
+ */
152
+ balance: string;
153
+ /** Unique ID for the bet on your side. This is required for further tracking/debugging purposes. */
154
+ txID: string;
155
+ }
156
+ /**
157
+ * The type of the win.
158
+ - `regular` type means regular bet,
159
+ - `free` type means free bet (see Free Rounds section).
160
+
161
+ */
162
+ export type WinRequestType = typeof WinRequestType[keyof typeof WinRequestType];
163
+ export declare const WinRequestType: {
164
+ readonly regular: "regular";
165
+ readonly free: "free";
166
+ };
167
+ export interface WinRequest {
168
+ /** The type of the win.
169
+ - `regular` type means regular bet,
170
+ - `free` type means free bet (see Free Rounds section).
171
+ */
172
+ type: WinRequestType;
173
+ /** The Game Session's ID (external). Provided by client via `Create New Game` call.
174
+ */
175
+ sessionID: string;
176
+ /**
177
+ * The amount of the bet in currency **main** units (note: not cents). Currency selected by the client during the
178
+ `Create New Game` call. We support 2 decimal places for all fiat currencies.
179
+
180
+ * @pattern ^(0|[1-9]\d*)(\.\d+)?$
181
+ */
182
+ amount: string;
183
+ /** Unique ID for the win (internal) on Swipe Games' side.
184
+ Could be used as idempotency key.
185
+ */
186
+ txID: string;
187
+ /** Non unique ID for the round (internal) on Swipe Games' side.
188
+ Could be the same for different games.
189
+ */
190
+ roundID: string;
191
+ /** Free Rounds ID (external).
192
+ This field is provided only for free rounds wins (where `type` is `free`),
193
+ during bonus balance withdrawal process (type is `regular`).
194
+ */
195
+ frID?: string;
196
+ }
197
+ export interface WinResponse {
198
+ /**
199
+ * The player's balance in selected currency **main** units (note: not cents) after the win is applied.
200
+ Currency selected by the client during the `Create New Game` call.
201
+ We support 2 decimal places for all fiat currencies.
202
+
203
+ * @pattern ^(0|[1-9]\d*)(\.\d+)?$
204
+ */
205
+ balance: string;
206
+ /** Unique ID for the win on your side. This is required for further tracking/debugging purposes. */
207
+ txID: string;
208
+ }
209
+ export interface RefundRequest {
210
+ /** The Game Session's ID (external). Provided by client via `Create New Game` call.
211
+ */
212
+ sessionID: string;
213
+ /** Unique ID for the refund (internal) on Swipe Games' side.
214
+ Could be used as idempotency key.
215
+ */
216
+ txID: string;
217
+ /** Original transaction ID (internal) on Swipe Games' side.
218
+ This is the ID of the transaction that should be refunded.
219
+ In some cases this original transaction ID might be not recorded on your side (timeout, server side error, etc).
220
+ */
221
+ origTxID: string;
222
+ /**
223
+ * The amount of the refund in currency **main** units (note: not cents).
224
+ Currency selected by the client during the `Create New Game` call.
225
+ We support 2 decimal places for all fiat currencies.
226
+ Refunds are always done for the whole bet amount.
227
+
228
+ * @pattern ^(0|[1-9]\d*)(\.\d+)?$
229
+ */
230
+ amount: string;
231
+ }
232
+ export interface RefundResponse {
233
+ /**
234
+ * The user's balance in selected currency **main** units (note: not cents) after the refund is applied.
235
+ Currency selected by the client during the `Create New Game` call.
236
+ We support 2 decimal places for all fiat currencies.
237
+
238
+ * @pattern ^(0|[1-9]\d*)(\.\d+)?$
239
+ */
240
+ balance: string;
241
+ /** Unique ID for the refund on your side. This is required for further tracking/debugging purposes. */
242
+ txID: string;
243
+ }
244
+ export interface User {
245
+ /** User's ID (external). This is User's ID on your side. */
246
+ id: string;
247
+ firstName?: string;
248
+ lastName?: string;
249
+ nickName?: string;
250
+ /** Country code ISO 3166-1 alpha-2. */
251
+ country?: string;
252
+ }
253
+ export type GetBalanceParams = {
254
+ /**
255
+ * Session ID (external). Provided by client via `Create New Game` call.
256
+ This is your Session ID. We use it in all reverse calls to you.
257
+
258
+ */
259
+ sessionID: string;
260
+ };
261
+ /**
262
+ * This endpoint is used to get the player's balance.
263
+ Please make sure that this endpoint responds as quickly as possible,
264
+ so player's experience is not affected.
265
+
266
+ * @summary Get balance
267
+ */
268
+ export type getBalanceResponse200 = {
269
+ data: BalanceResponse;
270
+ status: 200;
271
+ };
272
+ export type getBalanceResponse401 = {
273
+ data: ErrorResponseWithCodeAndAction;
274
+ status: 401;
275
+ };
276
+ export type getBalanceResponse404 = {
277
+ data: ErrorResponseWithCodeAndAction;
278
+ status: 404;
279
+ };
280
+ export type getBalanceResponse500 = {
281
+ data: ErrorResponseWithCodeAndAction;
282
+ status: 500;
283
+ };
284
+ export type getBalanceResponseSuccess = (getBalanceResponse200) & {
285
+ headers: Headers;
286
+ };
287
+ export type getBalanceResponseError = (getBalanceResponse401 | getBalanceResponse404 | getBalanceResponse500) & {
288
+ headers: Headers;
289
+ };
290
+ export type getBalanceResponse = (getBalanceResponseSuccess | getBalanceResponseError);
291
+ export declare const getGetBalanceUrl: (params: GetBalanceParams) => string;
292
+ export declare const getBalance: (params: GetBalanceParams, options?: RequestInit) => Promise<getBalanceResponse>;
293
+ /**
294
+ * This endpoint is used to place a bet in the game.
295
+ Every time player places a bet, we send a request to this endpoint and wait for the answer (**sync request**).
296
+
297
+ Please make sure that this endpoint responds as quickly as possible,
298
+ so player's experience is not affected.
299
+
300
+ In case we receive not 200 (OK) response or 5 seconds timeout we will send following `refund request.
301
+
302
+ * @summary Bet
303
+ */
304
+ export type postBetResponse200 = {
305
+ data: BetResponse;
306
+ status: 200;
307
+ };
308
+ export type postBetResponse400 = {
309
+ data: ErrorResponseWithCodeAndAction;
310
+ status: 400;
311
+ };
312
+ export type postBetResponse401 = {
313
+ data: ErrorResponseWithCodeAndAction;
314
+ status: 401;
315
+ };
316
+ export type postBetResponse404 = {
317
+ data: ErrorResponseWithCodeAndAction;
318
+ status: 404;
319
+ };
320
+ export type postBetResponse500 = {
321
+ data: ErrorResponseWithCodeAndAction;
322
+ status: 500;
323
+ };
324
+ export type postBetResponseSuccess = (postBetResponse200) & {
325
+ headers: Headers;
326
+ };
327
+ export type postBetResponseError = (postBetResponse400 | postBetResponse401 | postBetResponse404 | postBetResponse500) & {
328
+ headers: Headers;
329
+ };
330
+ export type postBetResponse = (postBetResponseSuccess | postBetResponseError);
331
+ export declare const getPostBetUrl: () => string;
332
+ export declare const postBet: (betRequest: BetRequest, options?: RequestInit) => Promise<postBetResponse>;
333
+ /**
334
+ * This endpoint is used to place a win in the game.
335
+
336
+ Every time player wins, or round ended without a win (in this case amount is 0),
337
+ we send a request to this endpoint and wait for the answer. Wait time is 5 seconds.
338
+
339
+ After timeout or any error this request will be retrying in the background until we receive 200(OK) response.
340
+
341
+ * @summary Win
342
+ */
343
+ export type postWinResponse200 = {
344
+ data: WinResponse;
345
+ status: 200;
346
+ };
347
+ export type postWinResponse400 = {
348
+ data: ErrorResponseWithCodeAndAction;
349
+ status: 400;
350
+ };
351
+ export type postWinResponse401 = {
352
+ data: ErrorResponseWithCodeAndAction;
353
+ status: 401;
354
+ };
355
+ export type postWinResponse404 = {
356
+ data: ErrorResponseWithCodeAndAction;
357
+ status: 404;
358
+ };
359
+ export type postWinResponse500 = {
360
+ data: ErrorResponseWithCodeAndAction;
361
+ status: 500;
362
+ };
363
+ export type postWinResponseSuccess = (postWinResponse200) & {
364
+ headers: Headers;
365
+ };
366
+ export type postWinResponseError = (postWinResponse400 | postWinResponse401 | postWinResponse404 | postWinResponse500) & {
367
+ headers: Headers;
368
+ };
369
+ export type postWinResponse = (postWinResponseSuccess | postWinResponseError);
370
+ export declare const getPostWinUrl: () => string;
371
+ export declare const postWin: (winRequest: WinRequest, options?: RequestInit) => Promise<postWinResponse>;
372
+ /**
373
+ * This endpoint is used to place a refund for bet or win action.
374
+ We send refund to the client side in case of Bet 500 error or timeout, also
375
+ in case when player cancels the game.
376
+
377
+ After timeout or any error this request will be retrying until we receive 200(OK) response.
378
+
379
+ * @summary Refund
380
+ */
381
+ export type postRefundResponse200 = {
382
+ data: RefundResponse;
383
+ status: 200;
384
+ };
385
+ export type postRefundResponse400 = {
386
+ data: ErrorResponseWithCodeAndAction;
387
+ status: 400;
388
+ };
389
+ export type postRefundResponse401 = {
390
+ data: ErrorResponseWithCodeAndAction;
391
+ status: 401;
392
+ };
393
+ export type postRefundResponse404 = {
394
+ data: ErrorResponseWithCodeAndAction;
395
+ status: 404;
396
+ };
397
+ export type postRefundResponse500 = {
398
+ data: ErrorResponseWithCodeAndAction;
399
+ status: 500;
400
+ };
401
+ export type postRefundResponseSuccess = (postRefundResponse200) & {
402
+ headers: Headers;
403
+ };
404
+ export type postRefundResponseError = (postRefundResponse400 | postRefundResponse401 | postRefundResponse404 | postRefundResponse500) & {
405
+ headers: Headers;
406
+ };
407
+ export type postRefundResponse = (postRefundResponseSuccess | postRefundResponseError);
408
+ export declare const getPostRefundUrl: () => string;
409
+ export declare const postRefund: (refundRequest: RefundRequest, options?: RequestInit) => Promise<postRefundResponse>;
410
+ //# sourceMappingURL=api.gen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.gen.d.ts","sourceRoot":"","sources":["../../../../../../api/v1.0/swipegames-integration/api.gen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,OAAO,kCAAkC,CAAC,MAAM,OAAO,kCAAkC,CAAC,CAAC;AAG5I,eAAO,MAAM,kCAAkC;;;;;;;;;;;;CAYrC,CAAC;AAEX;;;;;;;GAOG;AACH,MAAM,MAAM,oCAAoC,GAAG,OAAO,oCAAoC,CAAC,MAAM,OAAO,oCAAoC,CAAC,CAAC;AAGlJ,eAAO,MAAM,oCAAoC;;CAEvC,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAGzF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;CAYpB,CAAC;AAEX;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,iFAAiF;IACjF,OAAO,EAAE,MAAM,CAAC;IAChB,uGAAuG;IACvG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB;IAClB,IAAI,CAAC,EAAE,iBAAiB,CAAC;CAC1B;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,8BAA8B,GAAG,aAAa,GAAG;IAC3D,sGAAsG;IACtG,IAAI,CAAC,EAAE,kCAAkC,CAAC;IAC1C;;;;;KAKC;IACD,MAAM,CAAC,EAAE,oCAAoC,CAAC;IAC9C;;KAEC;IACD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,MAAM,MAAM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GAAG,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,8BAA8B,CAAA;IACpC,MAAM,EAAE,GAAG,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,8BAA8B,CAAA;IACpC,MAAM,EAAE,GAAG,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG,CAAC,qBAAqB,CAAC,GAAG;IAChE,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,qBAAqB,GAAG,qBAAqB,GAAG,qBAAqB,GAAG,qBAAqB,CAAC,GAAG;IACtI,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,yBAAyB,GAAG,uBAAuB,CAAC,CAAA;AAEtF,eAAO,MAAM,gBAAgB,cAM5B,CAAA;AAED,eAAO,MAAM,UAAU,GAAU,eAAe,aAAa,EAAE,UAAU,WAAW,KAAG,OAAO,CAAC,kBAAkB,CAgBhH,CAAA"}
@@ -0,0 +1,99 @@
1
+ export const ErrorResponseWithCodeAndActionCode = {
2
+ game_not_found: 'game_not_found',
3
+ currency_not_supported: 'currency_not_supported',
4
+ locale_not_supported: 'locale_not_supported',
5
+ account_blocked: 'account_blocked',
6
+ bet_limit: 'bet_limit',
7
+ loss_limit: 'loss_limit',
8
+ time_limit: 'time_limit',
9
+ insufficient_funds: 'insufficient_funds',
10
+ session_expired: 'session_expired',
11
+ session_not_found: 'session_not_found',
12
+ client_connection_error: 'client_connection_error',
13
+ };
14
+ export const ErrorResponseWithCodeAndActionAction = {
15
+ refresh: 'refresh',
16
+ };
17
+ export const ErrorResponseCode = {
18
+ game_not_found: 'game_not_found',
19
+ currency_not_supported: 'currency_not_supported',
20
+ locale_not_supported: 'locale_not_supported',
21
+ account_blocked: 'account_blocked',
22
+ bet_limit: 'bet_limit',
23
+ loss_limit: 'loss_limit',
24
+ time_limit: 'time_limit',
25
+ insufficient_funds: 'insufficient_funds',
26
+ session_expired: 'session_expired',
27
+ session_not_found: 'session_not_found',
28
+ client_connection_error: 'client_connection_error',
29
+ };
30
+ export const BetRequestType = {
31
+ regular: 'regular',
32
+ free: 'free',
33
+ };
34
+ export const WinRequestType = {
35
+ regular: 'regular',
36
+ free: 'free',
37
+ };
38
+ export const getGetBalanceUrl = (params) => {
39
+ const normalizedParams = new URLSearchParams();
40
+ Object.entries(params || {}).forEach(([key, value]) => {
41
+ if (value !== undefined) {
42
+ normalizedParams.append(key, value === null ? 'null' : value.toString());
43
+ }
44
+ });
45
+ const stringifiedParams = normalizedParams.toString();
46
+ return stringifiedParams.length > 0 ? `/balance?${stringifiedParams}` : `/balance`;
47
+ };
48
+ export const getBalance = async (params, options) => {
49
+ const res = await fetch(getGetBalanceUrl(params), {
50
+ ...options,
51
+ method: 'GET'
52
+ });
53
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
54
+ const data = body ? JSON.parse(body) : {};
55
+ return { data, status: res.status, headers: res.headers };
56
+ };
57
+ export const getPostBetUrl = () => {
58
+ return `/bet`;
59
+ };
60
+ export const postBet = async (betRequest, options) => {
61
+ const res = await fetch(getPostBetUrl(), {
62
+ ...options,
63
+ method: 'POST',
64
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
65
+ body: JSON.stringify(betRequest)
66
+ });
67
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
68
+ const data = body ? JSON.parse(body) : {};
69
+ return { data, status: res.status, headers: res.headers };
70
+ };
71
+ export const getPostWinUrl = () => {
72
+ return `/win`;
73
+ };
74
+ export const postWin = async (winRequest, options) => {
75
+ const res = await fetch(getPostWinUrl(), {
76
+ ...options,
77
+ method: 'POST',
78
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
79
+ body: JSON.stringify(winRequest)
80
+ });
81
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
82
+ const data = body ? JSON.parse(body) : {};
83
+ return { data, status: res.status, headers: res.headers };
84
+ };
85
+ export const getPostRefundUrl = () => {
86
+ return `/refund`;
87
+ };
88
+ export const postRefund = async (refundRequest, options) => {
89
+ const res = await fetch(getPostRefundUrl(), {
90
+ ...options,
91
+ method: 'POST',
92
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
93
+ body: JSON.stringify(refundRequest)
94
+ });
95
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
96
+ const data = body ? JSON.parse(body) : {};
97
+ return { data, status: res.status, headers: res.headers };
98
+ };
99
+ //# sourceMappingURL=api.gen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.gen.js","sourceRoot":"","sources":["../../../../../../api/v1.0/swipegames-integration/api.gen.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,cAAc,EAAE,gBAAgB;IAChC,sBAAsB,EAAE,wBAAwB;IAChD,oBAAoB,EAAE,sBAAsB;IAC5C,eAAe,EAAE,iBAAiB;IAClC,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,YAAY;IACxB,kBAAkB,EAAE,oBAAoB;IACxC,eAAe,EAAE,iBAAiB;IAClC,iBAAiB,EAAE,mBAAmB;IACtC,uBAAuB,EAAE,yBAAyB;CAC1C,CAAC;AAaX,MAAM,CAAC,MAAM,oCAAoC,GAAG;IAClD,OAAO,EAAE,SAAS;CACV,CAAC;AAQX,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,cAAc,EAAE,gBAAgB;IAChC,sBAAsB,EAAE,wBAAwB;IAChD,oBAAoB,EAAE,sBAAsB;IAC5C,eAAe,EAAE,iBAAiB;IAClC,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,YAAY;IACxB,kBAAkB,EAAE,oBAAoB;IACxC,eAAe,EAAE,iBAAiB;IAClC,iBAAiB,EAAE,mBAAmB;IACtC,uBAAuB,EAAE,yB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