@panomc/client 0.0.0-stage → 1.0.0-dev.61
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/package.json +23 -4
- package/scripts/generate-core.js +33 -0
- package/scripts/generate-core.test.js +43 -0
- package/src/client.js +267 -0
- package/src/client.test.js +348 -0
- package/src/core/index.js +522 -0
- package/src/core/openapi.json +5820 -0
- package/src/core/operations.js +69 -0
- package/src/core/types.js +360 -0
- package/src/errors.js +55 -0
- package/src/index.js +2 -0
- package/src/types.js +61 -0
- package/README.md +0 -3
|
@@ -0,0 +1,522 @@
|
|
|
1
|
+
// Generated by pano-client from openapi.json. Do not edit; run pano-client again.
|
|
2
|
+
import { operations } from './operations.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Starts an e-mail change: stores the new address as pending and mails a confirmation link.
|
|
6
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
7
|
+
* @param {{ body: import('./types.js').ChangeEmailRequest, signal?: AbortSignal }} params
|
|
8
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').ChangeEmailResponse>>}
|
|
9
|
+
*/
|
|
10
|
+
export const changeEmail = (client, params) => client.request(operations.changeEmail, params);
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Turns a verified pending sign-in (social login, magic link) into a session.
|
|
14
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
15
|
+
* @param {{ body: import('./types.js').CompletePendingAuthRequest, signal?: AbortSignal }} params
|
|
16
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').CompletePendingAuthResponse>>}
|
|
17
|
+
*/
|
|
18
|
+
export const completePendingAuth = (client, params) => client.request(operations.completePendingAuth, params);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Opens a ticket with its first message.
|
|
22
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
23
|
+
* @param {{ body: import('./types.js').CreateTicketRequest, signal?: AbortSignal }} params
|
|
24
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').CreateTicketResponse>>}
|
|
25
|
+
*/
|
|
26
|
+
export const createTicket = (client, params) => client.request(operations.createTicket, params);
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* A one-time ticket for opening the website WebSocket.
|
|
30
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
31
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
32
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').CreateWsTicketResponse>>}
|
|
33
|
+
*/
|
|
34
|
+
export const createWsTicket = (client, params) => client.request(operations.createWsTicket, params);
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Deletes every notification of the signed-in user.
|
|
38
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
39
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
40
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').DeleteAllNotificationResponse>>}
|
|
41
|
+
*/
|
|
42
|
+
export const deleteAllNotification = (client, params) => client.request(operations.deleteAllNotification, params);
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Deletes one notification of the signed-in user; an unknown or foreign id is ignored.
|
|
46
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
47
|
+
* @param {{ path: { id: number }, signal?: AbortSignal }} params
|
|
48
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').DeleteNotificationResponse>>}
|
|
49
|
+
*/
|
|
50
|
+
export const deleteNotification = (client, params) => client.request(operations.deleteNotification, params);
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Who the signed-in user is: name, e-mail, panel access and permissions.
|
|
54
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
55
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
56
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetCredentialsResponse>>}
|
|
57
|
+
*/
|
|
58
|
+
export const getCredentials = (client, params) => client.request(operations.getCredentials, params);
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The CSRF token of the current cookie session (null for a Bearer token).
|
|
62
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
63
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
64
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetCsrfTokenResponse>>}
|
|
65
|
+
*/
|
|
66
|
+
export const getCsrfToken = (client, params) => client.request(operations.getCsrfToken, params);
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The site icon; redirects to the URL with its hash first.
|
|
70
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
71
|
+
* @param {{ query?: { hash?: string }, signal?: AbortSignal }} [params]
|
|
72
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetFaviconResponse>>}
|
|
73
|
+
*/
|
|
74
|
+
export const getFavicon = (client, params) => client.request(operations.getFavicon, params);
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The settings of the active front-end, defaults filled in.
|
|
78
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
79
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
80
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetFrontendSettingsResponse>>}
|
|
81
|
+
*/
|
|
82
|
+
export const getFrontendSettings = (client, params) => client.request(operations.getFrontendSettings, params);
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Where each page Pano links to lives on the site; paths keep their {name} placeholders.
|
|
86
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
87
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
88
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetFrontendUrlsResponse>>}
|
|
89
|
+
*/
|
|
90
|
+
export const getFrontendUrls = (client, params) => client.request(operations.getFrontendUrls, params);
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The languages of the site.
|
|
94
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
95
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
96
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetLocalesResponse>>}
|
|
97
|
+
*/
|
|
98
|
+
export const getLocales = (client, params) => client.request(operations.getLocales, params);
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Ten older notifications after a given id; marks them read.
|
|
102
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
103
|
+
* @param {{ path: { id: number }, signal?: AbortSignal }} params
|
|
104
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetMoreNotificationsResponse>>}
|
|
105
|
+
*/
|
|
106
|
+
export const getMoreNotifications = (client, params) => client.request(operations.getMoreNotifications, params);
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The signed-in user's open sessions.
|
|
110
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
111
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
112
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetMySessionsResponse>>}
|
|
113
|
+
*/
|
|
114
|
+
export const getMySessions = (client, params) => client.request(operations.getMySessions, params);
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The signed-in user's notifications, newest first; marks the page read.
|
|
118
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
119
|
+
* @param {{ query?: { page?: number, pageSize?: number }, signal?: AbortSignal }} [params]
|
|
120
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetNotificationsResponse>>}
|
|
121
|
+
*/
|
|
122
|
+
export const getNotifications = (client, params) => client.request(operations.getNotifications, params);
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* The OpenAPI 3.1 document of the public core API
|
|
126
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
127
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
128
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetOpenApiResponse>>}
|
|
129
|
+
*/
|
|
130
|
+
export const getOpenApi = (client, params) => client.request(operations.getOpenApi, params);
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* The public profile of a user.
|
|
134
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
135
|
+
* @param {{ path: { username: string }, signal?: AbortSignal }} params
|
|
136
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetPlayerProfileResponse>>}
|
|
137
|
+
*/
|
|
138
|
+
export const getPlayerProfile = (client, params) => client.request(operations.getPlayerProfile, params);
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The OpenAPI 3.1 document of one plugin's public API
|
|
142
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
143
|
+
* @param {{ path: { pluginId: string }, signal?: AbortSignal }} params
|
|
144
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetPluginOpenApiResponse>>}
|
|
145
|
+
*/
|
|
146
|
+
export const getPluginOpenApi = (client, params) => client.request(operations.getPluginOpenApi, params);
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The pano-plugin.json of every plugin whose site UI Pano serves.
|
|
150
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
151
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
152
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetPluginPackagesResponse>>}
|
|
153
|
+
*/
|
|
154
|
+
export const getPluginPackages = (client, params) => client.request(operations.getPluginPackages, params);
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* One plugin's texts in one locale, with the admin's edits applied.
|
|
158
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
159
|
+
* @param {{ path: { locale: string, pluginId: string }, signal?: AbortSignal }} params
|
|
160
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetPluginTranslationsResponse>>}
|
|
161
|
+
*/
|
|
162
|
+
export const getPluginTranslations = (client, params) => client.request(operations.getPluginTranslations, params);
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* One file of a plugin's built package (pano-plugin.json, contract, controllers, samples, widgets).
|
|
166
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
167
|
+
* @param {{ path: { pluginId: string }, signal?: AbortSignal }} params
|
|
168
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetPluginUiFileResponse>>}
|
|
169
|
+
*/
|
|
170
|
+
export const getPluginUiFile = (client, params) => client.request(operations.getPluginUiFile, params);
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* One published post with the posts before and after it by date.
|
|
174
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
175
|
+
* @param {{ path: { url: string }, signal?: AbortSignal }} params
|
|
176
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetPostDetailResponse>>}
|
|
177
|
+
*/
|
|
178
|
+
export const getPostDetail = (client, params) => client.request(operations.getPostDetail, params);
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* A post by id, draft or not, for a person who may use the panel; same body as a published post.
|
|
182
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
183
|
+
* @param {{ path: { id: number }, signal?: AbortSignal }} params
|
|
184
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetPostPreviewResponse>>}
|
|
185
|
+
*/
|
|
186
|
+
export const getPostPreview = (client, params) => client.request(operations.getPostPreview, params);
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* A post thumbnail file.
|
|
190
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
191
|
+
* @param {{ path: { filename: string }, signal?: AbortSignal }} params
|
|
192
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetPostThumbnailResponse>>}
|
|
193
|
+
*/
|
|
194
|
+
export const getPostThumbnail = (client, params) => client.request(operations.getPostThumbnail, params);
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Published posts, newest first, optionally of one category.
|
|
198
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
199
|
+
* @param {{ query?: { categoryUrl?: string, page?: number, pageSize?: number }, signal?: AbortSignal }} [params]
|
|
200
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetPostsResponse>>}
|
|
201
|
+
*/
|
|
202
|
+
export const getPosts = (client, params) => client.request(operations.getPosts, params);
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* The signed-in user's own profile, with the last login date.
|
|
206
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
207
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
208
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetProfileResponse>>}
|
|
209
|
+
*/
|
|
210
|
+
export const getProfile = (client, params) => client.request(operations.getProfile, params);
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Redirects (302) to the picture of a user.
|
|
214
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
215
|
+
* @param {{ path: { username: string }, signal?: AbortSignal }} params
|
|
216
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetProfilePictureResponse>>}
|
|
217
|
+
*/
|
|
218
|
+
export const getProfilePicture = (client, params) => client.request(operations.getProfilePicture, params);
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* The last five notifications and the number of unread ones, for a dropdown.
|
|
222
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
223
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
224
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetQuickNotificationsResponse>>}
|
|
225
|
+
*/
|
|
226
|
+
export const getQuickNotifications = (client, params) => client.request(operations.getQuickNotifications, params);
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* The text a new user must accept when registering.
|
|
230
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
231
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
232
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetRegisterAgreementResponse>>}
|
|
233
|
+
*/
|
|
234
|
+
export const getRegisterAgreement = (client, params) => client.request(operations.getRegisterAgreement, params);
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* The accepted game servers of the site, the main one first; never a host, port or key.
|
|
238
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
239
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
240
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetServersResponse>>}
|
|
241
|
+
*/
|
|
242
|
+
export const getServers = (client, params) => client.request(operations.getServers, params);
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* What a front-end needs to boot: language, site texts, mode, plugins and theme settings.
|
|
246
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
247
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
248
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetSiteInfoResponse>>}
|
|
249
|
+
*/
|
|
250
|
+
export const getSiteInfo = (client, params) => client.request(operations.getSiteInfo, params);
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Every public page of the site, core and plugins, for building a sitemap.
|
|
254
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
255
|
+
* @param {{ query?: { page?: number, pageSize?: number }, signal?: AbortSignal }} [params]
|
|
256
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetSitemapResponse>>}
|
|
257
|
+
*/
|
|
258
|
+
export const getSitemap = (client, params) => client.request(operations.getSitemap, params);
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* A file the admin uploaded in the theme settings.
|
|
262
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
263
|
+
* @param {{ path: { filename: string }, signal?: AbortSignal }} params
|
|
264
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetThemeSettingResourceResponse>>}
|
|
265
|
+
*/
|
|
266
|
+
export const getThemeSettingResource = (client, params) => client.request(operations.getThemeSettingResource, params);
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* One ticket of the signed-in user with its messages.
|
|
270
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
271
|
+
* @param {{ path: { id: number }, signal?: AbortSignal }} params
|
|
272
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetTicketResponse>>}
|
|
273
|
+
*/
|
|
274
|
+
export const getTicket = (client, params) => client.request(operations.getTicket, params);
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* The ticket categories a new ticket can be filed under.
|
|
278
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
279
|
+
* @param {{ query?: { page?: number, pageSize?: number }, signal?: AbortSignal }} [params]
|
|
280
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetTicketCategoriesResponse>>}
|
|
281
|
+
*/
|
|
282
|
+
export const getTicketCategories = (client, params) => client.request(operations.getTicketCategories, params);
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* The messages of a ticket that came after a given message.
|
|
286
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
287
|
+
* @param {{ path: { id: number }, query: { lastMessageId: number }, signal?: AbortSignal }} params
|
|
288
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetTicketMessagesResponse>>}
|
|
289
|
+
*/
|
|
290
|
+
export const getTicketMessages = (client, params) => client.request(operations.getTicketMessages, params);
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* The signed-in user's tickets, filtered by page type or category.
|
|
294
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
295
|
+
* @param {{ query?: { categoryUrl?: string, page?: number, pageSize?: number, pageType?: ('ALL' | 'WAITING_REPLY' | 'CLOSED')[] }, signal?: AbortSignal }} [params]
|
|
296
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetTicketsResponse>>}
|
|
297
|
+
*/
|
|
298
|
+
export const getTickets = (client, params) => client.request(operations.getTickets, params);
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* The texts of one locale and type, with the admin's edits applied.
|
|
302
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
303
|
+
* @param {{ path: { code: string, type: string }, signal?: AbortSignal }} params
|
|
304
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetTranslationsResponse>>}
|
|
305
|
+
*/
|
|
306
|
+
export const getTranslations = (client, params) => client.request(operations.getTranslations, params);
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* The site logo; redirects to the URL with its hash first.
|
|
310
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
311
|
+
* @param {{ query?: { hash?: string }, signal?: AbortSignal }} [params]
|
|
312
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetWebsiteLogoResponse>>}
|
|
313
|
+
*/
|
|
314
|
+
export const getWebsiteLogo = (client, params) => client.request(operations.getWebsiteLogo, params);
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* GET /api/v1/widgets/index.json
|
|
318
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
319
|
+
* @param {{ query?: Record<string, any>, signal?: AbortSignal }} [params]
|
|
320
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetWidgetIndexResponse>>}
|
|
321
|
+
*/
|
|
322
|
+
export const getWidgetIndex = (client, params) => client.request(operations.getWidgetIndex, params);
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* GET /api/v1/widgets/loader.js
|
|
326
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
327
|
+
* @param {{ query?: Record<string, any>, signal?: AbortSignal }} [params]
|
|
328
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetWidgetLoaderResponse>>}
|
|
329
|
+
*/
|
|
330
|
+
export const getWidgetLoader = (client, params) => client.request(operations.getWidgetLoader, params);
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* GET /api/v1/widgets/runtime/*
|
|
334
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
335
|
+
* @param {{ query?: Record<string, any>, signal?: AbortSignal }} [params]
|
|
336
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').GetWidgetRuntimeFileResponse>>}
|
|
337
|
+
*/
|
|
338
|
+
export const getWidgetRuntimeFile = (client, params) => client.request(operations.getWidgetRuntimeFile, params);
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* GET /api/v1/health
|
|
342
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
343
|
+
* @param {{ query?: Record<string, any>, signal?: AbortSignal }} [params]
|
|
344
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').HealthResponse>>}
|
|
345
|
+
*/
|
|
346
|
+
export const health = (client, params) => client.request(operations.health, params);
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* The home page sidebar: server address, main server status and the newest members.
|
|
350
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
351
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
352
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').HomeSidebarResponse>>}
|
|
353
|
+
*/
|
|
354
|
+
export const homeSidebar = (client, params) => client.request(operations.homeSidebar, params);
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Signs in with a user name or e-mail and a password.
|
|
358
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
359
|
+
* @param {{ body: import('./types.js').LoginRequest, signal?: AbortSignal }} params
|
|
360
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').LoginResponse>>}
|
|
361
|
+
*/
|
|
362
|
+
export const login = (client, params) => client.request(operations.login, params);
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Ends the current session and clears its cookies.
|
|
366
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
367
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
368
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').LogoutResponse>>}
|
|
369
|
+
*/
|
|
370
|
+
export const logout = (client, params) => client.request(operations.logout, params);
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Ends one of the signed-in user's sessions; an id that is not theirs is ignored.
|
|
374
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
375
|
+
* @param {{ path: { id: number }, signal?: AbortSignal }} params
|
|
376
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').LogoutMySessionResponse>>}
|
|
377
|
+
*/
|
|
378
|
+
export const logoutMySession = (client, params) => client.request(operations.logoutMySession, params);
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Marks one notification read; an unknown or foreign id is ignored.
|
|
382
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
383
|
+
* @param {{ path: { id: number }, signal?: AbortSignal }} params
|
|
384
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').MarkNotificationAsReadResponse>>}
|
|
385
|
+
*/
|
|
386
|
+
export const markNotificationAsRead = (client, params) => client.request(operations.markNotificationAsRead, params);
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Marks the last five notifications read and answers the unread count.
|
|
390
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
391
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
392
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').MarkQuickNotificationsAsReadResponse>>}
|
|
393
|
+
*/
|
|
394
|
+
export const markQuickNotificationsAsRead = (client, params) => client.request(operations.markQuickNotificationsAsRead, params);
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* The profile page sidebar of a user.
|
|
398
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
399
|
+
* @param {{ path: { username: string }, signal?: AbortSignal }} params
|
|
400
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').PlayerProfileSidebarResponse>>}
|
|
401
|
+
*/
|
|
402
|
+
export const playerProfileSidebar = (client, params) => client.request(operations.playerProfileSidebar, params);
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* The signed-in user's own profile sidebar.
|
|
406
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
407
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
408
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').ProfileSidebarResponse>>}
|
|
409
|
+
*/
|
|
410
|
+
export const profileSidebar = (client, params) => client.request(operations.profileSidebar, params);
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Creates an account; signs the new user in when e-mail verification is not required.
|
|
414
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
415
|
+
* @param {{ body: import('./types.js').RegisterRequest, signal?: AbortSignal }} params
|
|
416
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').RegisterResponse>>}
|
|
417
|
+
*/
|
|
418
|
+
export const register = (client, params) => client.request(operations.register, params);
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Sets a new password with the token from the reset mail.
|
|
422
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
423
|
+
* @param {{ body: import('./types.js').RenewPasswordRequest, signal?: AbortSignal }} params
|
|
424
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').RenewPasswordResponse>>}
|
|
425
|
+
*/
|
|
426
|
+
export const renewPassword = (client, params) => client.request(operations.renewPassword, params);
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Mails a password reset link to the account of a user name or e-mail.
|
|
430
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
431
|
+
* @param {{ body: import('./types.js').ResetPasswordRequest, signal?: AbortSignal }} params
|
|
432
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').ResetPasswordResponse>>}
|
|
433
|
+
*/
|
|
434
|
+
export const resetPassword = (client, params) => client.request(operations.resetPassword, params);
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Mails the signed-in user a password reset link.
|
|
438
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
439
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
440
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').SendResetPasswordEmailResponse>>}
|
|
441
|
+
*/
|
|
442
|
+
export const sendResetPasswordEmail = (client, params) => client.request(operations.sendResetPasswordEmail, params);
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* Adds a message to an open ticket of the signed-in user.
|
|
446
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
447
|
+
* @param {{ path: { id: number }, body: import('./types.js').SendTicketMessageRequest, signal?: AbortSignal }} params
|
|
448
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').SendTicketMessageResponse>>}
|
|
449
|
+
*/
|
|
450
|
+
export const sendTicketMessage = (client, params) => client.request(operations.sendTicketMessage, params);
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* The support page sidebar: the staff members who are online.
|
|
454
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
455
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
456
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').SupportSidebarResponse>>}
|
|
457
|
+
*/
|
|
458
|
+
export const supportSidebar = (client, params) => client.request(operations.supportSidebar, params);
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Counts one view of a post; a bot or a repeat view inside the window is not counted.
|
|
462
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
463
|
+
* @param {{ path: { url: string }, signal?: AbortSignal }} params
|
|
464
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').TrackPostViewResponse>>}
|
|
465
|
+
*/
|
|
466
|
+
export const trackPostView = (client, params) => client.request(operations.trackPostView, params);
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Changes the signed-in user's language.
|
|
470
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
471
|
+
* @param {{ body: import('./types.js').UpdateProfileRequest, signal?: AbortSignal }} params
|
|
472
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').UpdateProfileResponse>>}
|
|
473
|
+
*/
|
|
474
|
+
export const updateProfile = (client, params) => client.request(operations.updateProfile, params);
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Changes the status of a ticket of the signed-in user (closing it).
|
|
478
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
479
|
+
* @param {{ path: { id: number }, body: import('./types.js').UpdateTicketRequest, signal?: AbortSignal }} params
|
|
480
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').UpdateTicketResponse>>}
|
|
481
|
+
*/
|
|
482
|
+
export const updateTicket = (client, params) => client.request(operations.updateTicket, params);
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Confirms an e-mail address with the token from the activation mail.
|
|
486
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
487
|
+
* @param {{ body: import('./types.js').VerifyEmailRequest, signal?: AbortSignal }} params
|
|
488
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').VerifyEmailResponse>>}
|
|
489
|
+
*/
|
|
490
|
+
export const verifyEmail = (client, params) => client.request(operations.verifyEmail, params);
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Checks the code a player got in the game; answers a token for finishing the registration.
|
|
494
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
495
|
+
* @param {{ body: import('./types.js').VerifyLinkCodeRequest, signal?: AbortSignal }} params
|
|
496
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').VerifyLinkCodeResponse>>}
|
|
497
|
+
*/
|
|
498
|
+
export const verifyLinkCode = (client, params) => client.request(operations.verifyLinkCode, params);
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Confirms a changed e-mail address with the token from the mail.
|
|
502
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
503
|
+
* @param {{ body: import('./types.js').VerifyNewEmailRequest, signal?: AbortSignal }} params
|
|
504
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').VerifyNewEmailResponse>>}
|
|
505
|
+
*/
|
|
506
|
+
export const verifyNewEmail = (client, params) => client.request(operations.verifyNewEmail, params);
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Counts one visit of the caller's IP address for today.
|
|
510
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
511
|
+
* @param {{ signal?: AbortSignal }} [params]
|
|
512
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').VisitorVisitResponse>>}
|
|
513
|
+
*/
|
|
514
|
+
export const visitorVisit = (client, params) => client.request(operations.visitorVisit, params);
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* GET /api/v1/ws
|
|
518
|
+
* @param {import('@panomc/client').PanoClient} client
|
|
519
|
+
* @param {{ query?: Record<string, any>, signal?: AbortSignal }} [params]
|
|
520
|
+
* @returns {Promise<import('@panomc/client').ApiResult<import('./types.js').WebsiteWebSocketResponse>>}
|
|
521
|
+
*/
|
|
522
|
+
export const websiteWebSocket = (client, params) => client.request(operations.websiteWebSocket, params);
|