@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.
- package/README.md +35 -0
- package/dist/api/v1.0/core/api.gen.d.ts +321 -0
- package/dist/api/v1.0/core/api.gen.d.ts.map +1 -0
- package/dist/api/v1.0/core/api.gen.js +79 -0
- package/dist/api/v1.0/core/api.gen.js.map +1 -0
- package/dist/api/v1.0/core/api.gen.zod.d.ts +149 -0
- package/dist/api/v1.0/core/api.gen.zod.d.ts.map +1 -0
- package/dist/api/v1.0/core/api.gen.zod.js +118 -0
- package/dist/api/v1.0/core/api.gen.zod.js.map +1 -0
- package/dist/api/v1.0/swipegames-integration/api.gen.d.ts +410 -0
- package/dist/api/v1.0/swipegames-integration/api.gen.d.ts.map +1 -0
- package/dist/api/v1.0/swipegames-integration/api.gen.js +99 -0
- package/dist/api/v1.0/swipegames-integration/api.gen.js.map +1 -0
- package/dist/api/v1.0/swipegames-integration/api.gen.zod.d.ts +114 -0
- package/dist/api/v1.0/swipegames-integration/api.gen.zod.d.ts.map +1 -0
- package/dist/api/v1.0/swipegames-integration/api.gen.zod.js +108 -0
- package/dist/api/v1.0/swipegames-integration/api.gen.zod.js.map +1 -0
- package/dist/packages/types/index.d.ts +5 -0
- package/dist/packages/types/index.d.ts.map +1 -0
- package/dist/packages/types/index.js +7 -0
- package/dist/packages/types/index.js.map +1 -0
- package/package.json +31 -0
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# @swipegames/public-api
|
|
2
|
+
|
|
3
|
+
TypeScript types and Zod schemas for the Swipe Games Public API.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @swipegames/public-api
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
> **Note:** This package is published to GitHub Packages. You need to configure your `.npmrc` to use the GitHub registry for the `@swipegames` scope:
|
|
12
|
+
>
|
|
13
|
+
> ```
|
|
14
|
+
> @swipegames:registry=https://npm.pkg.github.com
|
|
15
|
+
> ```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { CoreTypes, CoreSchemas, IntegrationTypes, IntegrationSchemas } from "@swipegames/public-api";
|
|
21
|
+
|
|
22
|
+
// Use TypeScript types
|
|
23
|
+
const request: CoreTypes.CreateNewGameRequest = {
|
|
24
|
+
cID: "...",
|
|
25
|
+
extCID: "...",
|
|
26
|
+
gameID: "...",
|
|
27
|
+
currency: "USD",
|
|
28
|
+
locale: "en",
|
|
29
|
+
platform: "desktop",
|
|
30
|
+
demo: false,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// Validate with Zod schemas
|
|
34
|
+
const parsed = CoreSchemas.PostCreateNewGameBody.parse(request);
|
|
35
|
+
```
|
|
@@ -0,0 +1,321 @@
|
|
|
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
|
+
/**
|
|
10
|
+
* Platform type where the game can be launched
|
|
11
|
+
*/
|
|
12
|
+
export type PlatformType = typeof PlatformType[keyof typeof PlatformType];
|
|
13
|
+
export declare const PlatformType: {
|
|
14
|
+
readonly desktop: "desktop";
|
|
15
|
+
readonly mobile: "mobile";
|
|
16
|
+
};
|
|
17
|
+
export interface User {
|
|
18
|
+
/** User's ID (external). This is User's ID on your side. */
|
|
19
|
+
id: string;
|
|
20
|
+
firstName?: string;
|
|
21
|
+
lastName?: string;
|
|
22
|
+
nickName?: string;
|
|
23
|
+
/** Country code ISO 3166-1 alpha-2. */
|
|
24
|
+
country?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface CreateNewGameRequest {
|
|
27
|
+
/** Client's ID. It's provided by Swipe Games and is used as your identifier.
|
|
28
|
+
*/
|
|
29
|
+
cID: string;
|
|
30
|
+
/** External Client's ID (client/platform/game aggregator/integrator or casino on your side). This is provided from your side, and this is
|
|
31
|
+
how you identify your clients. We use it in all callbacks to you.
|
|
32
|
+
*/
|
|
33
|
+
extCID: string;
|
|
34
|
+
/** Game's ID. This is Swipe Games's game identifier. See the list of supported games in `Game IDs` section.
|
|
35
|
+
*/
|
|
36
|
+
gameID: string;
|
|
37
|
+
/** Session ID (external).This is your Session ID. We use it in all callbacks to you.
|
|
38
|
+
Not required for demo games, since we don't use callbacks for demo games.
|
|
39
|
+
*/
|
|
40
|
+
sessionID?: string;
|
|
41
|
+
/** 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. */
|
|
42
|
+
returnURL?: string;
|
|
43
|
+
/** 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. */
|
|
44
|
+
depositURL?: string;
|
|
45
|
+
/** Currency code in ISO4217. */
|
|
46
|
+
currency: string;
|
|
47
|
+
/** Locale code in IETF BCP 47 format (ISO 639-1 language code with optional ISO 3166-1 country code), using underscore as separator. */
|
|
48
|
+
locale: string;
|
|
49
|
+
/** Platform code. This is used to identify the platform where the game is launched. */
|
|
50
|
+
platform: PlatformType;
|
|
51
|
+
/** Demo mode. If true, the game will be launched in demo mode (means no callbacks will be fired on your side,
|
|
52
|
+
and we use our demo balance for the game). If false, the game will be launched in real mode.
|
|
53
|
+
*/
|
|
54
|
+
demo: boolean;
|
|
55
|
+
/** Initial demo balance for the user (in currency units). Only used in demo mode, ignored in real mode.
|
|
56
|
+
Must be greater than the minimum bet. Default is 10 000 USD equivalent.
|
|
57
|
+
*/
|
|
58
|
+
initDemoBalance?: string;
|
|
59
|
+
user?: User;
|
|
60
|
+
}
|
|
61
|
+
export interface CreateNewGameResponse {
|
|
62
|
+
gameURL: string;
|
|
63
|
+
gsID: string;
|
|
64
|
+
}
|
|
65
|
+
export interface CreateFreeRoundsRequest {
|
|
66
|
+
/** Free rounds ID (external). Used as idempotency key. Same ID can be used to create free rounds only once.
|
|
67
|
+
*/
|
|
68
|
+
extID: string;
|
|
69
|
+
/** Client's ID (internal) */
|
|
70
|
+
cID: string;
|
|
71
|
+
/** External Client's ID (game aggregator or casino) */
|
|
72
|
+
extCID: string;
|
|
73
|
+
/** List of game IDs. If not provided, free rounds will be available for all games. */
|
|
74
|
+
gameIDs?: string[];
|
|
75
|
+
/** List of player IDs (external). If not provided, free rounds will be available for all players. */
|
|
76
|
+
userIDs?: string[];
|
|
77
|
+
/** Currency code in ISO4217 */
|
|
78
|
+
currency: string;
|
|
79
|
+
/**
|
|
80
|
+
* Number of free rounds.
|
|
81
|
+
* @minimum 1
|
|
82
|
+
* @maximum 99
|
|
83
|
+
*/
|
|
84
|
+
quantity: number;
|
|
85
|
+
/**
|
|
86
|
+
* Number of bet line configured for this game/provider. You can find more information in related section
|
|
87
|
+
[Free Rounds Bet Lines](/public-api/free-rounds-bet-lines).
|
|
88
|
+
|
|
89
|
+
* @minimum 1
|
|
90
|
+
* @maximum 99
|
|
91
|
+
*/
|
|
92
|
+
betLine: number;
|
|
93
|
+
/** Start date when free rounds become available. */
|
|
94
|
+
validFrom: string;
|
|
95
|
+
/** End date when free rounds become unavailable. If not provided then this campaign never ends.
|
|
96
|
+
If you provide finite validity duration, it should not exceed 30 days.
|
|
97
|
+
*/
|
|
98
|
+
validUntil?: string;
|
|
99
|
+
}
|
|
100
|
+
export interface CreateFreeRoundsResponse {
|
|
101
|
+
/** Free rounds ID (internal). */
|
|
102
|
+
id: string;
|
|
103
|
+
/** Free rounds ID (external). This is provided in the request. */
|
|
104
|
+
extID: string;
|
|
105
|
+
}
|
|
106
|
+
export interface DeleteFreeRoundsRequest {
|
|
107
|
+
/** Free rounds ID (internal). Used as idempotency key. One of id or extID must be provided.
|
|
108
|
+
*/
|
|
109
|
+
id?: string;
|
|
110
|
+
/** Free rounds ID (external). Used as idempotency key. One of id or extID must be provided.
|
|
111
|
+
*/
|
|
112
|
+
extID?: string;
|
|
113
|
+
/** Client's ID (internal) */
|
|
114
|
+
cID: string;
|
|
115
|
+
/** External Client's ID (external) */
|
|
116
|
+
extCID: string;
|
|
117
|
+
}
|
|
118
|
+
export interface GameInfoImages {
|
|
119
|
+
/** Image's base URL */
|
|
120
|
+
baseURL: string;
|
|
121
|
+
/** Path to square image. 1:1 aspect. */
|
|
122
|
+
square: string;
|
|
123
|
+
/** Path to horizontal image. 4:3 aspect. */
|
|
124
|
+
horizontal: string;
|
|
125
|
+
/** Path to widescreen image. 16:9 aspect. */
|
|
126
|
+
widescreen: string;
|
|
127
|
+
/** Path to vertical image. 3:4 aspect. */
|
|
128
|
+
vertical: string;
|
|
129
|
+
}
|
|
130
|
+
export interface BetLineValue {
|
|
131
|
+
/** Maximum bet amount for this line (in currency units) */
|
|
132
|
+
maxBet: string;
|
|
133
|
+
/** Maximum multiplier applied to the bet */
|
|
134
|
+
maxCoeff: string;
|
|
135
|
+
}
|
|
136
|
+
export interface BetLineInfo {
|
|
137
|
+
/** Currency code in ISO4217 */
|
|
138
|
+
currency: string;
|
|
139
|
+
/** List of bet line values (0-indexed array maps to 1-based bet lines).
|
|
140
|
+
*/
|
|
141
|
+
values: BetLineValue[];
|
|
142
|
+
}
|
|
143
|
+
export interface GameInfo {
|
|
144
|
+
/** Game's title in English */
|
|
145
|
+
title: string;
|
|
146
|
+
/** Game's ID (internal) */
|
|
147
|
+
id: string;
|
|
148
|
+
/** 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. */
|
|
149
|
+
locales: string[];
|
|
150
|
+
/** List of supported currency codes in ISO 4217 format */
|
|
151
|
+
currencies: string[];
|
|
152
|
+
/** List of supported platform types */
|
|
153
|
+
platforms: PlatformType[];
|
|
154
|
+
/** Image URLs for the game */
|
|
155
|
+
images: GameInfoImages;
|
|
156
|
+
/** If game supports free spins */
|
|
157
|
+
hasFreeSpins: boolean;
|
|
158
|
+
/** Game's RTP */
|
|
159
|
+
rtp: number;
|
|
160
|
+
/** List of bet lines supported for this game per currency. Available
|
|
161
|
+
only if game has free spins. See more info in related section [Free Rounds Bet Lines](/public-api/free-rounds-bet-lines).
|
|
162
|
+
*/
|
|
163
|
+
betLines?: BetLineInfo[];
|
|
164
|
+
}
|
|
165
|
+
export type GamesResponse = GameInfo[];
|
|
166
|
+
/**
|
|
167
|
+
* Error code.
|
|
168
|
+
*/
|
|
169
|
+
export type ErrorResponseCode = typeof ErrorResponseCode[keyof typeof ErrorResponseCode];
|
|
170
|
+
export declare const ErrorResponseCode: {
|
|
171
|
+
readonly game_not_found: "game_not_found";
|
|
172
|
+
readonly currency_not_supported: "currency_not_supported";
|
|
173
|
+
readonly locale_not_supported: "locale_not_supported";
|
|
174
|
+
readonly account_blocked: "account_blocked";
|
|
175
|
+
readonly bet_limit: "bet_limit";
|
|
176
|
+
readonly loss_limit: "loss_limit";
|
|
177
|
+
readonly time_limit: "time_limit";
|
|
178
|
+
readonly insufficient_funds: "insufficient_funds";
|
|
179
|
+
readonly session_expired: "session_expired";
|
|
180
|
+
readonly session_not_found: "session_not_found";
|
|
181
|
+
readonly client_connection_error: "client_connection_error";
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* General error response for Swipe Games Public API. Usually used for Public API responses.
|
|
185
|
+
|
|
186
|
+
*/
|
|
187
|
+
export interface ErrorResponse {
|
|
188
|
+
/** A brief description of the error in English. Could be shown to the player. */
|
|
189
|
+
message: string;
|
|
190
|
+
/** Technical details for the error. Could be used for debugging, should not be shown to the player. */
|
|
191
|
+
details?: string;
|
|
192
|
+
/** Error code. */
|
|
193
|
+
code?: ErrorResponseCode;
|
|
194
|
+
}
|
|
195
|
+
export type GetGamesParams = {
|
|
196
|
+
/**
|
|
197
|
+
* Client's ID
|
|
198
|
+
*/
|
|
199
|
+
cID: string;
|
|
200
|
+
/**
|
|
201
|
+
* External Client's ID
|
|
202
|
+
*/
|
|
203
|
+
extCID: string;
|
|
204
|
+
};
|
|
205
|
+
/**
|
|
206
|
+
* Use this request to create a new game. It registers new `demo` or `real` game on the server and returns the Launcher URL
|
|
207
|
+
for the game. You can redirect the user to this URL to start playing the game or open it in iFrame.
|
|
208
|
+
|
|
209
|
+
* @summary Create new game
|
|
210
|
+
*/
|
|
211
|
+
export type postCreateNewGameResponse200 = {
|
|
212
|
+
data: CreateNewGameResponse;
|
|
213
|
+
status: 200;
|
|
214
|
+
};
|
|
215
|
+
export type postCreateNewGameResponse401 = {
|
|
216
|
+
data: ErrorResponse;
|
|
217
|
+
status: 401;
|
|
218
|
+
};
|
|
219
|
+
export type postCreateNewGameResponse500 = {
|
|
220
|
+
data: ErrorResponse;
|
|
221
|
+
status: 500;
|
|
222
|
+
};
|
|
223
|
+
export type postCreateNewGameResponseSuccess = (postCreateNewGameResponse200) & {
|
|
224
|
+
headers: Headers;
|
|
225
|
+
};
|
|
226
|
+
export type postCreateNewGameResponseError = (postCreateNewGameResponse401 | postCreateNewGameResponse500) & {
|
|
227
|
+
headers: Headers;
|
|
228
|
+
};
|
|
229
|
+
export type postCreateNewGameResponse = (postCreateNewGameResponseSuccess | postCreateNewGameResponseError);
|
|
230
|
+
export declare const getPostCreateNewGameUrl: () => string;
|
|
231
|
+
export declare const postCreateNewGame: (createNewGameRequest: CreateNewGameRequest, options?: RequestInit) => Promise<postCreateNewGameResponse>;
|
|
232
|
+
/**
|
|
233
|
+
* Create new free rounds campaign
|
|
234
|
+
* @summary Create new free rounds campaign
|
|
235
|
+
*/
|
|
236
|
+
export type postFreeRoundsResponse200 = {
|
|
237
|
+
data: CreateFreeRoundsResponse;
|
|
238
|
+
status: 200;
|
|
239
|
+
};
|
|
240
|
+
export type postFreeRoundsResponse401 = {
|
|
241
|
+
data: ErrorResponse;
|
|
242
|
+
status: 401;
|
|
243
|
+
};
|
|
244
|
+
export type postFreeRoundsResponse409 = {
|
|
245
|
+
data: ErrorResponse;
|
|
246
|
+
status: 409;
|
|
247
|
+
};
|
|
248
|
+
export type postFreeRoundsResponse500 = {
|
|
249
|
+
data: ErrorResponse;
|
|
250
|
+
status: 500;
|
|
251
|
+
};
|
|
252
|
+
export type postFreeRoundsResponseSuccess = (postFreeRoundsResponse200) & {
|
|
253
|
+
headers: Headers;
|
|
254
|
+
};
|
|
255
|
+
export type postFreeRoundsResponseError = (postFreeRoundsResponse401 | postFreeRoundsResponse409 | postFreeRoundsResponse500) & {
|
|
256
|
+
headers: Headers;
|
|
257
|
+
};
|
|
258
|
+
export type postFreeRoundsResponse = (postFreeRoundsResponseSuccess | postFreeRoundsResponseError);
|
|
259
|
+
export declare const getPostFreeRoundsUrl: () => string;
|
|
260
|
+
export declare const postFreeRounds: (createFreeRoundsRequest: CreateFreeRoundsRequest, options?: RequestInit) => Promise<postFreeRoundsResponse>;
|
|
261
|
+
/**
|
|
262
|
+
* Cancel/Delete existing free rounds campaign. You can cancel free rounds campaing during the campaign period, in this case
|
|
263
|
+
all `in-progress` free rounds will be continued, but no new free rounds will be started.
|
|
264
|
+
|
|
265
|
+
* @summary Cancel/Delete free rounds campaign
|
|
266
|
+
*/
|
|
267
|
+
export type deleteFreeRoundsResponse200 = {
|
|
268
|
+
data: void;
|
|
269
|
+
status: 200;
|
|
270
|
+
};
|
|
271
|
+
export type deleteFreeRoundsResponse401 = {
|
|
272
|
+
data: ErrorResponse;
|
|
273
|
+
status: 401;
|
|
274
|
+
};
|
|
275
|
+
export type deleteFreeRoundsResponse404 = {
|
|
276
|
+
data: ErrorResponse;
|
|
277
|
+
status: 404;
|
|
278
|
+
};
|
|
279
|
+
export type deleteFreeRoundsResponse500 = {
|
|
280
|
+
data: ErrorResponse;
|
|
281
|
+
status: 500;
|
|
282
|
+
};
|
|
283
|
+
export type deleteFreeRoundsResponseSuccess = (deleteFreeRoundsResponse200) & {
|
|
284
|
+
headers: Headers;
|
|
285
|
+
};
|
|
286
|
+
export type deleteFreeRoundsResponseError = (deleteFreeRoundsResponse401 | deleteFreeRoundsResponse404 | deleteFreeRoundsResponse500) & {
|
|
287
|
+
headers: Headers;
|
|
288
|
+
};
|
|
289
|
+
export type deleteFreeRoundsResponse = (deleteFreeRoundsResponseSuccess | deleteFreeRoundsResponseError);
|
|
290
|
+
export declare const getDeleteFreeRoundsUrl: () => string;
|
|
291
|
+
export declare const deleteFreeRounds: (deleteFreeRoundsRequest: DeleteFreeRoundsRequest, options?: RequestInit) => Promise<deleteFreeRoundsResponse>;
|
|
292
|
+
/**
|
|
293
|
+
* Get information about supported games
|
|
294
|
+
* @summary Get Games' Information
|
|
295
|
+
*/
|
|
296
|
+
export type getGamesResponse200 = {
|
|
297
|
+
data: GamesResponse;
|
|
298
|
+
status: 200;
|
|
299
|
+
};
|
|
300
|
+
export type getGamesResponse401 = {
|
|
301
|
+
data: ErrorResponse;
|
|
302
|
+
status: 401;
|
|
303
|
+
};
|
|
304
|
+
export type getGamesResponse404 = {
|
|
305
|
+
data: ErrorResponse;
|
|
306
|
+
status: 404;
|
|
307
|
+
};
|
|
308
|
+
export type getGamesResponse500 = {
|
|
309
|
+
data: ErrorResponse;
|
|
310
|
+
status: 500;
|
|
311
|
+
};
|
|
312
|
+
export type getGamesResponseSuccess = (getGamesResponse200) & {
|
|
313
|
+
headers: Headers;
|
|
314
|
+
};
|
|
315
|
+
export type getGamesResponseError = (getGamesResponse401 | getGamesResponse404 | getGamesResponse500) & {
|
|
316
|
+
headers: Headers;
|
|
317
|
+
};
|
|
318
|
+
export type getGamesResponse = (getGamesResponseSuccess | getGamesResponseError);
|
|
319
|
+
export declare const getGetGamesUrl: (params: GetGamesParams) => string;
|
|
320
|
+
export declare const getGames: (params: GetGamesParams, options?: RequestInit) => Promise<getGamesResponse>;
|
|
321
|
+
//# sourceMappingURL=api.gen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.gen.d.ts","sourceRoot":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M,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,aAAa,CAAA;IACnB,MAAM,EAAE,GAAG,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,aAAa,CAAA;IACnB,MAAM,EAAE,GAAG,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,CAAC,mBAAmB,CAAC,GAAG;IAC5D,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,mBAAmB,GAAG,mBAAmB,GAAG,mBAAmB,CAAC,GAAG;IACtG,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,CAAC,uBAAuB,GAAG,qBAAqB,CAAC,CAAA;AAEhF,eAAO,MAAM,cAAc,GAAI,QAAQ,cAAc,WAapD,CAAA;AAED,eAAO,MAAM,QAAQ,GAAU,QAAQ,cAAc,EAAE,UAAU,WAAW,KAAG,OAAO,CAAC,gBAAgB,CAetG,CAAA"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export const PlatformType = {
|
|
2
|
+
desktop: 'desktop',
|
|
3
|
+
mobile: 'mobile',
|
|
4
|
+
};
|
|
5
|
+
export const ErrorResponseCode = {
|
|
6
|
+
game_not_found: 'game_not_found',
|
|
7
|
+
currency_not_supported: 'currency_not_supported',
|
|
8
|
+
locale_not_supported: 'locale_not_supported',
|
|
9
|
+
account_blocked: 'account_blocked',
|
|
10
|
+
bet_limit: 'bet_limit',
|
|
11
|
+
loss_limit: 'loss_limit',
|
|
12
|
+
time_limit: 'time_limit',
|
|
13
|
+
insufficient_funds: 'insufficient_funds',
|
|
14
|
+
session_expired: 'session_expired',
|
|
15
|
+
session_not_found: 'session_not_found',
|
|
16
|
+
client_connection_error: 'client_connection_error',
|
|
17
|
+
};
|
|
18
|
+
export const getPostCreateNewGameUrl = () => {
|
|
19
|
+
return `/create-new-game`;
|
|
20
|
+
};
|
|
21
|
+
export const postCreateNewGame = async (createNewGameRequest, options) => {
|
|
22
|
+
const res = await fetch(getPostCreateNewGameUrl(), {
|
|
23
|
+
...options,
|
|
24
|
+
method: 'POST',
|
|
25
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
26
|
+
body: JSON.stringify(createNewGameRequest)
|
|
27
|
+
});
|
|
28
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
29
|
+
const data = body ? JSON.parse(body) : {};
|
|
30
|
+
return { data, status: res.status, headers: res.headers };
|
|
31
|
+
};
|
|
32
|
+
export const getPostFreeRoundsUrl = () => {
|
|
33
|
+
return `/free-rounds`;
|
|
34
|
+
};
|
|
35
|
+
export const postFreeRounds = async (createFreeRoundsRequest, options) => {
|
|
36
|
+
const res = await fetch(getPostFreeRoundsUrl(), {
|
|
37
|
+
...options,
|
|
38
|
+
method: 'POST',
|
|
39
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
40
|
+
body: JSON.stringify(createFreeRoundsRequest)
|
|
41
|
+
});
|
|
42
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
43
|
+
const data = body ? JSON.parse(body) : {};
|
|
44
|
+
return { data, status: res.status, headers: res.headers };
|
|
45
|
+
};
|
|
46
|
+
export const getDeleteFreeRoundsUrl = () => {
|
|
47
|
+
return `/free-rounds`;
|
|
48
|
+
};
|
|
49
|
+
export const deleteFreeRounds = async (deleteFreeRoundsRequest, options) => {
|
|
50
|
+
const res = await fetch(getDeleteFreeRoundsUrl(), {
|
|
51
|
+
...options,
|
|
52
|
+
method: 'DELETE',
|
|
53
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
54
|
+
body: JSON.stringify(deleteFreeRoundsRequest)
|
|
55
|
+
});
|
|
56
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
57
|
+
const data = body ? JSON.parse(body) : {};
|
|
58
|
+
return { data, status: res.status, headers: res.headers };
|
|
59
|
+
};
|
|
60
|
+
export const getGetGamesUrl = (params) => {
|
|
61
|
+
const normalizedParams = new URLSearchParams();
|
|
62
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
63
|
+
if (value !== undefined) {
|
|
64
|
+
normalizedParams.append(key, value === null ? 'null' : value.toString());
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
const stringifiedParams = normalizedParams.toString();
|
|
68
|
+
return stringifiedParams.length > 0 ? `/games?${stringifiedParams}` : `/games`;
|
|
69
|
+
};
|
|
70
|
+
export const getGames = async (params, options) => {
|
|
71
|
+
const res = await fetch(getGetGamesUrl(params), {
|
|
72
|
+
...options,
|
|
73
|
+
method: 'GET'
|
|
74
|
+
});
|
|
75
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
76
|
+
const data = body ? JSON.parse(body) : {};
|
|
77
|
+
return { data, status: res.status, headers: res.headers };
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=api.gen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.gen.js","sourceRoot":"","sources":["../../../../../../api/v1.0/core/api.gen.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACR,CAAC;AAwKX,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,yBAAyB;CAC1C,CAAC;AAwDX,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,EAAE;IAK1C,O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CAAC,CAAC,EAAE,CAAA;IACnE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAsB,CAAA;AAC/E,CAAC,CAAA"}
|
|
@@ -0,0 +1,149 @@
|
|
|
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 declare const PostCreateNewGameHeader: zod.ZodObject<{
|
|
17
|
+
"X-REQUEST-SIGN": zod.ZodString;
|
|
18
|
+
}, zod.z.core.$strip>;
|
|
19
|
+
export declare const PostCreateNewGameBody: zod.ZodObject<{
|
|
20
|
+
cID: zod.ZodString;
|
|
21
|
+
extCID: zod.ZodString;
|
|
22
|
+
gameID: zod.ZodString;
|
|
23
|
+
sessionID: zod.ZodOptional<zod.ZodString>;
|
|
24
|
+
returnURL: zod.ZodOptional<zod.ZodString>;
|
|
25
|
+
depositURL: zod.ZodOptional<zod.ZodString>;
|
|
26
|
+
currency: zod.ZodString;
|
|
27
|
+
locale: zod.ZodString;
|
|
28
|
+
platform: zod.ZodEnum<{
|
|
29
|
+
desktop: "desktop";
|
|
30
|
+
mobile: "mobile";
|
|
31
|
+
}>;
|
|
32
|
+
demo: zod.ZodBoolean;
|
|
33
|
+
initDemoBalance: zod.ZodOptional<zod.ZodString>;
|
|
34
|
+
user: zod.ZodOptional<zod.ZodObject<{
|
|
35
|
+
id: zod.ZodString;
|
|
36
|
+
firstName: zod.ZodOptional<zod.ZodString>;
|
|
37
|
+
lastName: zod.ZodOptional<zod.ZodString>;
|
|
38
|
+
nickName: zod.ZodOptional<zod.ZodString>;
|
|
39
|
+
country: zod.ZodOptional<zod.ZodString>;
|
|
40
|
+
}, zod.z.core.$strip>>;
|
|
41
|
+
}, zod.z.core.$strip>;
|
|
42
|
+
export declare const PostCreateNewGameResponse: zod.ZodObject<{
|
|
43
|
+
gameURL: zod.ZodString;
|
|
44
|
+
gsID: zod.ZodString;
|
|
45
|
+
}, zod.z.core.$strip>;
|
|
46
|
+
/**
|
|
47
|
+
* Create new free rounds campaign
|
|
48
|
+
* @summary Create new free rounds campaign
|
|
49
|
+
*/
|
|
50
|
+
export declare const PostFreeRoundsHeader: zod.ZodObject<{
|
|
51
|
+
"X-REQUEST-SIGN": zod.ZodString;
|
|
52
|
+
}, zod.z.core.$strip>;
|
|
53
|
+
export declare const postFreeRoundsBodyQuantityMax = 99;
|
|
54
|
+
export declare const postFreeRoundsBodyBetLineMax = 99;
|
|
55
|
+
export declare const PostFreeRoundsBody: zod.ZodObject<{
|
|
56
|
+
extID: zod.ZodString;
|
|
57
|
+
cID: zod.ZodString;
|
|
58
|
+
extCID: zod.ZodString;
|
|
59
|
+
gameIDs: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
|
|
60
|
+
userIDs: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
|
|
61
|
+
currency: zod.ZodString;
|
|
62
|
+
quantity: zod.ZodNumber;
|
|
63
|
+
betLine: zod.ZodNumber;
|
|
64
|
+
validFrom: zod.ZodString;
|
|
65
|
+
validUntil: zod.ZodOptional<zod.ZodString>;
|
|
66
|
+
}, zod.z.core.$strip>;
|
|
67
|
+
export declare const PostFreeRoundsResponse: zod.ZodObject<{
|
|
68
|
+
id: zod.ZodString;
|
|
69
|
+
extID: zod.ZodString;
|
|
70
|
+
}, zod.z.core.$strip>;
|
|
71
|
+
/**
|
|
72
|
+
* Cancel/Delete existing free rounds campaign. You can cancel free rounds campaing during the campaign period, in this case
|
|
73
|
+
all `in-progress` free rounds will be continued, but no new free rounds will be started.
|
|
74
|
+
|
|
75
|
+
* @summary Cancel/Delete free rounds campaign
|
|
76
|
+
*/
|
|
77
|
+
export declare const DeleteFreeRoundsHeader: zod.ZodObject<{
|
|
78
|
+
"X-REQUEST-SIGN": zod.ZodString;
|
|
79
|
+
}, zod.z.core.$strip>;
|
|
80
|
+
export declare const DeleteFreeRoundsBody: zod.ZodObject<{
|
|
81
|
+
id: zod.ZodOptional<zod.ZodString>;
|
|
82
|
+
extID: zod.ZodOptional<zod.ZodString>;
|
|
83
|
+
cID: zod.ZodString;
|
|
84
|
+
extCID: zod.ZodString;
|
|
85
|
+
}, zod.z.core.$strip>;
|
|
86
|
+
/**
|
|
87
|
+
* Get information about supported games
|
|
88
|
+
* @summary Get Games' Information
|
|
89
|
+
*/
|
|
90
|
+
export declare const GetGamesQueryParams: zod.ZodObject<{
|
|
91
|
+
cID: zod.ZodString;
|
|
92
|
+
extCID: zod.ZodString;
|
|
93
|
+
}, zod.z.core.$strip>;
|
|
94
|
+
export declare const GetGamesHeader: zod.ZodObject<{
|
|
95
|
+
"X-REQUEST-SIGN": zod.ZodString;
|
|
96
|
+
}, zod.z.core.$strip>;
|
|
97
|
+
export declare const GetGamesResponseItem: zod.ZodObject<{
|
|
98
|
+
title: zod.ZodString;
|
|
99
|
+
id: zod.ZodString;
|
|
100
|
+
locales: zod.ZodArray<zod.ZodString>;
|
|
101
|
+
currencies: zod.ZodArray<zod.ZodString>;
|
|
102
|
+
platforms: zod.ZodArray<zod.ZodEnum<{
|
|
103
|
+
desktop: "desktop";
|
|
104
|
+
mobile: "mobile";
|
|
105
|
+
}>>;
|
|
106
|
+
images: zod.ZodObject<{
|
|
107
|
+
baseURL: zod.ZodString;
|
|
108
|
+
square: zod.ZodString;
|
|
109
|
+
horizontal: zod.ZodString;
|
|
110
|
+
widescreen: zod.ZodString;
|
|
111
|
+
vertical: zod.ZodString;
|
|
112
|
+
}, zod.z.core.$strip>;
|
|
113
|
+
hasFreeSpins: zod.ZodBoolean;
|
|
114
|
+
rtp: zod.ZodNumber;
|
|
115
|
+
betLines: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
116
|
+
currency: zod.ZodString;
|
|
117
|
+
values: zod.ZodArray<zod.ZodObject<{
|
|
118
|
+
maxBet: zod.ZodString;
|
|
119
|
+
maxCoeff: zod.ZodString;
|
|
120
|
+
}, zod.z.core.$strip>>;
|
|
121
|
+
}, zod.z.core.$strip>>>;
|
|
122
|
+
}, zod.z.core.$strip>;
|
|
123
|
+
export declare const GetGamesResponse: zod.ZodArray<zod.ZodObject<{
|
|
124
|
+
title: zod.ZodString;
|
|
125
|
+
id: zod.ZodString;
|
|
126
|
+
locales: zod.ZodArray<zod.ZodString>;
|
|
127
|
+
currencies: zod.ZodArray<zod.ZodString>;
|
|
128
|
+
platforms: zod.ZodArray<zod.ZodEnum<{
|
|
129
|
+
desktop: "desktop";
|
|
130
|
+
mobile: "mobile";
|
|
131
|
+
}>>;
|
|
132
|
+
images: zod.ZodObject<{
|
|
133
|
+
baseURL: zod.ZodString;
|
|
134
|
+
square: zod.ZodString;
|
|
135
|
+
horizontal: zod.ZodString;
|
|
136
|
+
widescreen: zod.ZodString;
|
|
137
|
+
vertical: zod.ZodString;
|
|
138
|
+
}, zod.z.core.$strip>;
|
|
139
|
+
hasFreeSpins: zod.ZodBoolean;
|
|
140
|
+
rtp: zod.ZodNumber;
|
|
141
|
+
betLines: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
142
|
+
currency: zod.ZodString;
|
|
143
|
+
values: zod.ZodArray<zod.ZodObject<{
|
|
144
|
+
maxBet: zod.ZodString;
|
|
145
|
+
maxCoeff: zod.ZodString;
|
|
146
|
+
}, zod.z.core.$strip>>;
|
|
147
|
+
}, zod.z.core.$strip>>>;
|
|
148
|
+
}, zod.z.core.$strip>>;
|
|
149
|
+
//# sourceMappingURL=api.gen.zod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.gen.zod.d.ts","sourceRoot":"","sources":["../../../../../../api/v1.0/core/api.gen.zod.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB;;qBAElC,CAAA;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;qBAmBhC,CAAA;AAEF,eAAO,MAAM,yBAAyB;;;qBAGpC,CAAA;AAGF;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;qBAE/B,CAAA;AAEF,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAEhD,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAI/C,eAAO,MAAM,kBAAkB;;;;;;;;;;;qBAW7B,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;qBAGjC,CAAA;AAGF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;qBAEjC,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;;;qBAK/B,CAAA;AAGF;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;qBAG9B,CAAA;AAEF,eAAO,MAAM,cAAc;;qBAEzB,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;qBAsB/B,CAAA;AACF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;sBAAkC,CAAA"}
|