@webzaytsev/support-sdk 0.1.1 → 0.1.3
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 +44 -0
- package/dist/client.gen.d.mts +2 -1
- package/dist/client.gen.d.ts +2 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/plugins.d.mts +50 -0
- package/dist/plugins.d.ts +50 -0
- package/dist/plugins.js +4 -0
- package/dist/plugins.js.map +1 -0
- package/dist/plugins.mjs +3 -0
- package/dist/plugins.mjs.map +1 -0
- package/dist/types.gen-Bkafu1bx.d.mts +356 -0
- package/dist/types.gen-Bkafu1bx.d.ts +356 -0
- package/dist/{types.gen-DHi9F3K-.d.mts → types.gen-D6uwMaOo.d.mts} +3 -358
- package/dist/{types.gen-DHi9F3K-.d.ts → types.gen-D6uwMaOo.d.ts} +3 -358
- package/package.json +9 -2
package/README.md
CHANGED
|
@@ -213,6 +213,49 @@ setInterval(async () => {
|
|
|
213
213
|
|
|
214
214
|
---
|
|
215
215
|
|
|
216
|
+
## Plugin Types
|
|
217
|
+
|
|
218
|
+
The `extra` field in `WebProfileDto` is a general-purpose string key-value bag — you can put any data your backend needs to store alongside the user profile. The support bot plugins read specific keys from it.
|
|
219
|
+
|
|
220
|
+
Import typed helpers from `@webzaytsev/support-sdk/plugins`:
|
|
221
|
+
|
|
222
|
+
### Remnawave
|
|
223
|
+
|
|
224
|
+
The Remnawave plugin (`/sub` command, ticket info card) looks for a user identifier in `extra` using this priority order: `userId` → `remnawave_user_id` → `user_id`.
|
|
225
|
+
|
|
226
|
+
```typescript
|
|
227
|
+
import type { RemnawaveWebProfile } from '@webzaytsev/support-sdk/plugins';
|
|
228
|
+
|
|
229
|
+
// Typed profile — extra.userId is required, any other keys are allowed
|
|
230
|
+
const profile: RemnawaveWebProfile = {
|
|
231
|
+
name: 'Ivan Petrov',
|
|
232
|
+
email: 'ivan@example.com',
|
|
233
|
+
extra: {
|
|
234
|
+
userId: 'ddc9c1c9-973c-46d9-acd7-8db629e7bc98', // Remnawave user UUID
|
|
235
|
+
plan: 'pro', // arbitrary extra data — allowed
|
|
236
|
+
region: 'eu-west', // also fine
|
|
237
|
+
},
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
// Pass to POST /web/auth/token
|
|
241
|
+
await webAuthControllerIssueToken({
|
|
242
|
+
headers: { 'X-Internal-Api-Key': process.env.WEB_API_KEY },
|
|
243
|
+
body: { userId: 'user_42', userProfile: profile },
|
|
244
|
+
});
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
You can also use `RemnawaveExtra` if you only need the extra shape:
|
|
248
|
+
|
|
249
|
+
```typescript
|
|
250
|
+
import type { RemnawaveExtra } from '@webzaytsev/support-sdk/plugins';
|
|
251
|
+
|
|
252
|
+
const extra: RemnawaveExtra & Record<string, string> = {
|
|
253
|
+
userId: 'ddc9c1c9-973c-46d9-acd7-8db629e7bc98',
|
|
254
|
+
};
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
216
259
|
## Exports
|
|
217
260
|
|
|
218
261
|
| Import path | Contents |
|
|
@@ -220,6 +263,7 @@ setInterval(async () => {
|
|
|
220
263
|
| `@webzaytsev/support-sdk` | SDK functions + TypeScript types |
|
|
221
264
|
| `@webzaytsev/support-sdk/client` | `client` singleton, `createClient` |
|
|
222
265
|
| `@webzaytsev/support-sdk/zod` | Zod schemas for all DTOs |
|
|
266
|
+
| `@webzaytsev/support-sdk/plugins` | Plugin-specific `extra` types (`RemnawaveExtra`, `RemnawaveWebProfile`) |
|
|
223
267
|
|
|
224
268
|
Both CJS (`require`) and ESM (`import`) are supported.
|
|
225
269
|
|
package/dist/client.gen.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as ClientOptions, b as Config, C as Client } from './types.gen-D6uwMaOo.mjs';
|
|
2
|
+
import { C as ClientOptions$1 } from './types.gen-Bkafu1bx.mjs';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* The `createClientConfig()` function will be called on client initialization
|
package/dist/client.gen.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as ClientOptions, b as Config, C as Client } from './types.gen-D6uwMaOo.js';
|
|
2
|
+
import { C as ClientOptions$1 } from './types.gen-Bkafu1bx.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* The `createClientConfig()` function will be called on client initialization
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { T as TDataShape, O as Options$1, C as Client,
|
|
2
|
-
|
|
1
|
+
import { T as TDataShape, O as Options$1, C as Client, R as RequestResult, S as ServerSentEventsResult } from './types.gen-D6uwMaOo.mjs';
|
|
2
|
+
import { W as WebAuthControllerIssueTokenData, f as WebAuthControllerIssueTokenResponses, j as WebTicketsControllerEscalateData, l as WebTicketsControllerEscalateResponses, m as WebTicketsControllerGetCurrentTicketData, o as WebTicketsControllerGetCurrentTicketResponses, p as WebTicketsControllerGetMessagesData, r as WebTicketsControllerGetMessagesResponses, s as WebTicketsControllerResolveByUserData, u as WebTicketsControllerResolveByUserResponses, v as WebTicketsControllerSendMessageData, x as WebTicketsControllerSendMessageResponses, y as WebTicketsControllerSseStreamData, z as WebTicketsControllerSseStreamResponse, A as WebTicketsControllerSseStreamResponses, B as WebUploadsControllerGetUploadData, E as WebUploadsControllerGetUploadResponses, F as WebUploadsControllerUploadData, H as WebUploadsControllerUploadResponses } from './types.gen-Bkafu1bx.mjs';
|
|
3
|
+
export { C as ClientOptions, a as CurrentTicketResponseDto, I as IssueTokenDto, b as IssueTokenResponseDto, M as MessageDto, c as MessagesResponseDto, S as SendMessageDto, d as SendMessageResponseDto, T as TicketInfoDto, U as UploadResponseDto, e as WebAuthControllerIssueTokenResponse, g as WebProfileDto, h as WebSseEventDataDto, i as WebSseEventDto, k as WebTicketsControllerEscalateResponse, n as WebTicketsControllerGetCurrentTicketResponse, q as WebTicketsControllerGetMessagesResponse, t as WebTicketsControllerResolveByUserResponse, w as WebTicketsControllerSendMessageResponse, D as WebUploadsControllerGetUploadResponse, G as WebUploadsControllerUploadResponse } from './types.gen-Bkafu1bx.mjs';
|
|
3
4
|
|
|
4
5
|
type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options$1<TData, ThrowOnError, TResponse> & {
|
|
5
6
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { T as TDataShape, O as Options$1, C as Client,
|
|
2
|
-
|
|
1
|
+
import { T as TDataShape, O as Options$1, C as Client, R as RequestResult, S as ServerSentEventsResult } from './types.gen-D6uwMaOo.js';
|
|
2
|
+
import { W as WebAuthControllerIssueTokenData, f as WebAuthControllerIssueTokenResponses, j as WebTicketsControllerEscalateData, l as WebTicketsControllerEscalateResponses, m as WebTicketsControllerGetCurrentTicketData, o as WebTicketsControllerGetCurrentTicketResponses, p as WebTicketsControllerGetMessagesData, r as WebTicketsControllerGetMessagesResponses, s as WebTicketsControllerResolveByUserData, u as WebTicketsControllerResolveByUserResponses, v as WebTicketsControllerSendMessageData, x as WebTicketsControllerSendMessageResponses, y as WebTicketsControllerSseStreamData, z as WebTicketsControllerSseStreamResponse, A as WebTicketsControllerSseStreamResponses, B as WebUploadsControllerGetUploadData, E as WebUploadsControllerGetUploadResponses, F as WebUploadsControllerUploadData, H as WebUploadsControllerUploadResponses } from './types.gen-Bkafu1bx.js';
|
|
3
|
+
export { C as ClientOptions, a as CurrentTicketResponseDto, I as IssueTokenDto, b as IssueTokenResponseDto, M as MessageDto, c as MessagesResponseDto, S as SendMessageDto, d as SendMessageResponseDto, T as TicketInfoDto, U as UploadResponseDto, e as WebAuthControllerIssueTokenResponse, g as WebProfileDto, h as WebSseEventDataDto, i as WebSseEventDto, k as WebTicketsControllerEscalateResponse, n as WebTicketsControllerGetCurrentTicketResponse, q as WebTicketsControllerGetMessagesResponse, t as WebTicketsControllerResolveByUserResponse, w as WebTicketsControllerSendMessageResponse, D as WebUploadsControllerGetUploadResponse, G as WebUploadsControllerUploadResponse } from './types.gen-Bkafu1bx.js';
|
|
3
4
|
|
|
4
5
|
type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options$1<TData, ThrowOnError, TResponse> & {
|
|
5
6
|
/**
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { g as WebProfileDto } from './types.gen-Bkafu1bx.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Plugin-specific type helpers for WebProfileDto.extra.
|
|
5
|
+
*
|
|
6
|
+
* The extra field is a general-purpose string key-value bag — you can put
|
|
7
|
+
* any arbitrary data there. These interfaces document the specific keys that
|
|
8
|
+
* each support-bot plugin reads, so frontend projects get compile-time
|
|
9
|
+
* guidance instead of guessing.
|
|
10
|
+
*
|
|
11
|
+
* Usage: pass via IssueTokenDto.userProfile.extra when calling POST /web/auth/token.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Extra fields consumed by the Remnawave plugin (/sub command, ticket info card).
|
|
16
|
+
*
|
|
17
|
+
* The plugin looks for a Remnawave user identifier in this priority order:
|
|
18
|
+
* 1. extra.userId
|
|
19
|
+
* 2. extra.remnawave_user_id
|
|
20
|
+
* 3. extra.user_id
|
|
21
|
+
*
|
|
22
|
+
* Recommended: use `userId` (primary key).
|
|
23
|
+
*/
|
|
24
|
+
interface RemnawaveExtra {
|
|
25
|
+
/**
|
|
26
|
+
* Remnawave user identifier.
|
|
27
|
+
* This value is passed directly to the Remnawave API to look up the user's
|
|
28
|
+
* subscription, traffic stats, and HWID devices.
|
|
29
|
+
*/
|
|
30
|
+
userId: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Convenience type: WebProfileDto with Remnawave plugin fields typed in extra.
|
|
34
|
+
* Additional arbitrary keys are allowed — extra is still an open bag.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* const profile: RemnawaveWebProfile = {
|
|
38
|
+
* name: 'Ivan Petrov',
|
|
39
|
+
* email: 'ivan@example.com',
|
|
40
|
+
* extra: {
|
|
41
|
+
* userId: 'ddc9c1c9-973c-46d9-acd7-8db629e7bc98', // Remnawave UUID
|
|
42
|
+
* plan: 'pro', // arbitrary extra — allowed
|
|
43
|
+
* },
|
|
44
|
+
* };
|
|
45
|
+
*/
|
|
46
|
+
type RemnawaveWebProfile = Omit<WebProfileDto, "extra"> & {
|
|
47
|
+
extra: RemnawaveExtra & Record<string, string>;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type { RemnawaveExtra, RemnawaveWebProfile };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { g as WebProfileDto } from './types.gen-Bkafu1bx.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Plugin-specific type helpers for WebProfileDto.extra.
|
|
5
|
+
*
|
|
6
|
+
* The extra field is a general-purpose string key-value bag — you can put
|
|
7
|
+
* any arbitrary data there. These interfaces document the specific keys that
|
|
8
|
+
* each support-bot plugin reads, so frontend projects get compile-time
|
|
9
|
+
* guidance instead of guessing.
|
|
10
|
+
*
|
|
11
|
+
* Usage: pass via IssueTokenDto.userProfile.extra when calling POST /web/auth/token.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Extra fields consumed by the Remnawave plugin (/sub command, ticket info card).
|
|
16
|
+
*
|
|
17
|
+
* The plugin looks for a Remnawave user identifier in this priority order:
|
|
18
|
+
* 1. extra.userId
|
|
19
|
+
* 2. extra.remnawave_user_id
|
|
20
|
+
* 3. extra.user_id
|
|
21
|
+
*
|
|
22
|
+
* Recommended: use `userId` (primary key).
|
|
23
|
+
*/
|
|
24
|
+
interface RemnawaveExtra {
|
|
25
|
+
/**
|
|
26
|
+
* Remnawave user identifier.
|
|
27
|
+
* This value is passed directly to the Remnawave API to look up the user's
|
|
28
|
+
* subscription, traffic stats, and HWID devices.
|
|
29
|
+
*/
|
|
30
|
+
userId: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Convenience type: WebProfileDto with Remnawave plugin fields typed in extra.
|
|
34
|
+
* Additional arbitrary keys are allowed — extra is still an open bag.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* const profile: RemnawaveWebProfile = {
|
|
38
|
+
* name: 'Ivan Petrov',
|
|
39
|
+
* email: 'ivan@example.com',
|
|
40
|
+
* extra: {
|
|
41
|
+
* userId: 'ddc9c1c9-973c-46d9-acd7-8db629e7bc98', // Remnawave UUID
|
|
42
|
+
* plan: 'pro', // arbitrary extra — allowed
|
|
43
|
+
* },
|
|
44
|
+
* };
|
|
45
|
+
*/
|
|
46
|
+
type RemnawaveWebProfile = Omit<WebProfileDto, "extra"> & {
|
|
47
|
+
extra: RemnawaveExtra & Record<string, string>;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type { RemnawaveExtra, RemnawaveWebProfile };
|
package/dist/plugins.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"plugins.js"}
|
package/dist/plugins.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"plugins.mjs"}
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
type ClientOptions = {
|
|
2
|
+
baseUrl: string;
|
|
3
|
+
};
|
|
4
|
+
type WebProfileDto = {
|
|
5
|
+
/**
|
|
6
|
+
* Display name (≤120 chars)
|
|
7
|
+
*/
|
|
8
|
+
name: string;
|
|
9
|
+
/**
|
|
10
|
+
* User email
|
|
11
|
+
*/
|
|
12
|
+
email?: string;
|
|
13
|
+
/**
|
|
14
|
+
* URL to user profile in admin panel
|
|
15
|
+
*/
|
|
16
|
+
profileUrl?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Key-value pairs (≤32 keys, key ≤64, value ≤512). Read by plugins (e.g. Remnawave reads userId).
|
|
19
|
+
*/
|
|
20
|
+
extra?: {
|
|
21
|
+
[key: string]: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
type IssueTokenDto = {
|
|
25
|
+
/**
|
|
26
|
+
* External user ID from your backend database
|
|
27
|
+
*/
|
|
28
|
+
userId: string;
|
|
29
|
+
/**
|
|
30
|
+
* User profile snapshot passed from your backend
|
|
31
|
+
*/
|
|
32
|
+
userProfile: WebProfileDto;
|
|
33
|
+
/**
|
|
34
|
+
* JWT TTL in seconds (max 3600, default 900)
|
|
35
|
+
*/
|
|
36
|
+
ttlSec?: number;
|
|
37
|
+
};
|
|
38
|
+
type IssueTokenResponseDto = {
|
|
39
|
+
/**
|
|
40
|
+
* Short-lived JWT for widget authentication
|
|
41
|
+
*/
|
|
42
|
+
token: string;
|
|
43
|
+
/**
|
|
44
|
+
* ISO timestamp when the token expires
|
|
45
|
+
*/
|
|
46
|
+
expiresAt: string;
|
|
47
|
+
};
|
|
48
|
+
type WebSseEventDataDto = {
|
|
49
|
+
/**
|
|
50
|
+
* Message ID (for 'message' events)
|
|
51
|
+
*/
|
|
52
|
+
messageId?: number;
|
|
53
|
+
/**
|
|
54
|
+
* Message text
|
|
55
|
+
*/
|
|
56
|
+
text?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Attachment upload IDs
|
|
59
|
+
*/
|
|
60
|
+
attachmentIds?: Array<string>;
|
|
61
|
+
/**
|
|
62
|
+
* Message ID that triggered escalation ('escalation_ack' event)
|
|
63
|
+
*/
|
|
64
|
+
escalatableMessageId?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Escalation source
|
|
67
|
+
*/
|
|
68
|
+
source?: string;
|
|
69
|
+
/**
|
|
70
|
+
* ISO timestamp of the event
|
|
71
|
+
*/
|
|
72
|
+
createdAt?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Human-readable message for system events
|
|
75
|
+
*/
|
|
76
|
+
message?: string;
|
|
77
|
+
};
|
|
78
|
+
type WebSseEventDto = {
|
|
79
|
+
/**
|
|
80
|
+
* Event type
|
|
81
|
+
*/
|
|
82
|
+
type: 'message' | 'resolved' | 'closed' | 'escalation_ack' | 'reopened' | 'heartbeat';
|
|
83
|
+
/**
|
|
84
|
+
* Ticket ID this event belongs to
|
|
85
|
+
*/
|
|
86
|
+
ticketId: number;
|
|
87
|
+
/**
|
|
88
|
+
* Event payload (absent for heartbeat)
|
|
89
|
+
*/
|
|
90
|
+
data?: WebSseEventDataDto;
|
|
91
|
+
};
|
|
92
|
+
type SendMessageDto = {
|
|
93
|
+
/**
|
|
94
|
+
* Message text
|
|
95
|
+
*/
|
|
96
|
+
text: string;
|
|
97
|
+
/**
|
|
98
|
+
* Upload IDs returned by POST /web/uploads
|
|
99
|
+
*/
|
|
100
|
+
attachmentIds?: Array<string>;
|
|
101
|
+
};
|
|
102
|
+
type SendMessageResponseDto = {
|
|
103
|
+
/**
|
|
104
|
+
* Ticket ID (created or existing)
|
|
105
|
+
*/
|
|
106
|
+
ticketId: number;
|
|
107
|
+
/**
|
|
108
|
+
* ID of the recorded message
|
|
109
|
+
*/
|
|
110
|
+
messageId: number;
|
|
111
|
+
/**
|
|
112
|
+
* ISO timestamp when the message was created
|
|
113
|
+
*/
|
|
114
|
+
createdAt: string;
|
|
115
|
+
};
|
|
116
|
+
type TicketInfoDto = {
|
|
117
|
+
/**
|
|
118
|
+
* Ticket ID
|
|
119
|
+
*/
|
|
120
|
+
id: number;
|
|
121
|
+
/**
|
|
122
|
+
* Ticket status
|
|
123
|
+
*/
|
|
124
|
+
status: 'open' | 'closed';
|
|
125
|
+
/**
|
|
126
|
+
* ISO timestamp when ticket was created
|
|
127
|
+
*/
|
|
128
|
+
createdAt: string;
|
|
129
|
+
/**
|
|
130
|
+
* ISO timestamp of last update
|
|
131
|
+
*/
|
|
132
|
+
updatedAt: string;
|
|
133
|
+
};
|
|
134
|
+
type MessageDto = {
|
|
135
|
+
/**
|
|
136
|
+
* Message ID
|
|
137
|
+
*/
|
|
138
|
+
id: number;
|
|
139
|
+
/**
|
|
140
|
+
* Message author role
|
|
141
|
+
*/
|
|
142
|
+
role: 'user' | 'moderator' | 'bot' | 'system';
|
|
143
|
+
/**
|
|
144
|
+
* Text content of the message
|
|
145
|
+
*/
|
|
146
|
+
content: {
|
|
147
|
+
[key: string]: unknown;
|
|
148
|
+
} | null;
|
|
149
|
+
/**
|
|
150
|
+
* Upload IDs of attached images
|
|
151
|
+
*/
|
|
152
|
+
webAttachmentIds: Array<string> | null;
|
|
153
|
+
/**
|
|
154
|
+
* ISO timestamp when the message was created
|
|
155
|
+
*/
|
|
156
|
+
createdAt: string;
|
|
157
|
+
};
|
|
158
|
+
type CurrentTicketResponseDto = {
|
|
159
|
+
/**
|
|
160
|
+
* Current open ticket, null if none
|
|
161
|
+
*/
|
|
162
|
+
ticket: TicketInfoDto | null;
|
|
163
|
+
/**
|
|
164
|
+
* Messages in chronological order (oldest first, max 50)
|
|
165
|
+
*/
|
|
166
|
+
messages: Array<MessageDto>;
|
|
167
|
+
};
|
|
168
|
+
type MessagesResponseDto = {
|
|
169
|
+
/**
|
|
170
|
+
* Messages in chronological order (oldest first)
|
|
171
|
+
*/
|
|
172
|
+
messages: Array<MessageDto>;
|
|
173
|
+
/**
|
|
174
|
+
* Pass as ?since= in the next poll request. Null when no messages returned.
|
|
175
|
+
*/
|
|
176
|
+
nextCursor: {
|
|
177
|
+
[key: string]: unknown;
|
|
178
|
+
} | null;
|
|
179
|
+
};
|
|
180
|
+
type UploadResponseDto = {
|
|
181
|
+
/**
|
|
182
|
+
* Upload ID to use in attachmentIds when sending a message
|
|
183
|
+
*/
|
|
184
|
+
uploadId: string;
|
|
185
|
+
/**
|
|
186
|
+
* MIME type of the uploaded file
|
|
187
|
+
*/
|
|
188
|
+
mimeType: string;
|
|
189
|
+
/**
|
|
190
|
+
* File size in bytes
|
|
191
|
+
*/
|
|
192
|
+
sizeBytes: number;
|
|
193
|
+
};
|
|
194
|
+
type WebAuthControllerIssueTokenData = {
|
|
195
|
+
body: IssueTokenDto;
|
|
196
|
+
path?: never;
|
|
197
|
+
query?: never;
|
|
198
|
+
url: '/web/auth/token';
|
|
199
|
+
};
|
|
200
|
+
type WebAuthControllerIssueTokenResponses = {
|
|
201
|
+
/**
|
|
202
|
+
* Short-lived JWT issued
|
|
203
|
+
*/
|
|
204
|
+
200: IssueTokenResponseDto;
|
|
205
|
+
};
|
|
206
|
+
type WebAuthControllerIssueTokenResponse = WebAuthControllerIssueTokenResponses[keyof WebAuthControllerIssueTokenResponses];
|
|
207
|
+
type WebTicketsControllerSendMessageData = {
|
|
208
|
+
body: SendMessageDto;
|
|
209
|
+
path?: never;
|
|
210
|
+
query?: never;
|
|
211
|
+
url: '/web/messages';
|
|
212
|
+
};
|
|
213
|
+
type WebTicketsControllerSendMessageResponses = {
|
|
214
|
+
/**
|
|
215
|
+
* Message recorded
|
|
216
|
+
*/
|
|
217
|
+
200: SendMessageResponseDto;
|
|
218
|
+
};
|
|
219
|
+
type WebTicketsControllerSendMessageResponse = WebTicketsControllerSendMessageResponses[keyof WebTicketsControllerSendMessageResponses];
|
|
220
|
+
type WebTicketsControllerGetCurrentTicketData = {
|
|
221
|
+
body?: never;
|
|
222
|
+
path?: never;
|
|
223
|
+
query?: never;
|
|
224
|
+
url: '/web/tickets/current';
|
|
225
|
+
};
|
|
226
|
+
type WebTicketsControllerGetCurrentTicketResponses = {
|
|
227
|
+
/**
|
|
228
|
+
* Current ticket state
|
|
229
|
+
*/
|
|
230
|
+
200: CurrentTicketResponseDto;
|
|
231
|
+
};
|
|
232
|
+
type WebTicketsControllerGetCurrentTicketResponse = WebTicketsControllerGetCurrentTicketResponses[keyof WebTicketsControllerGetCurrentTicketResponses];
|
|
233
|
+
type WebTicketsControllerGetMessagesData = {
|
|
234
|
+
body?: never;
|
|
235
|
+
path: {
|
|
236
|
+
/**
|
|
237
|
+
* Ticket ID
|
|
238
|
+
*/
|
|
239
|
+
id: number;
|
|
240
|
+
};
|
|
241
|
+
query?: {
|
|
242
|
+
/**
|
|
243
|
+
* ISO timestamp cursor from previous response nextCursor
|
|
244
|
+
*/
|
|
245
|
+
since?: string;
|
|
246
|
+
/**
|
|
247
|
+
* Max messages to return (1–100, default 50)
|
|
248
|
+
*/
|
|
249
|
+
limit?: string;
|
|
250
|
+
};
|
|
251
|
+
url: '/web/tickets/{id}/messages';
|
|
252
|
+
};
|
|
253
|
+
type WebTicketsControllerGetMessagesResponses = {
|
|
254
|
+
/**
|
|
255
|
+
* Messages since cursor
|
|
256
|
+
*/
|
|
257
|
+
200: MessagesResponseDto;
|
|
258
|
+
};
|
|
259
|
+
type WebTicketsControllerGetMessagesResponse = WebTicketsControllerGetMessagesResponses[keyof WebTicketsControllerGetMessagesResponses];
|
|
260
|
+
type WebTicketsControllerSseStreamData = {
|
|
261
|
+
body?: never;
|
|
262
|
+
path: {
|
|
263
|
+
/**
|
|
264
|
+
* Ticket ID
|
|
265
|
+
*/
|
|
266
|
+
id: number;
|
|
267
|
+
};
|
|
268
|
+
query?: {
|
|
269
|
+
/**
|
|
270
|
+
* JWT token (alternative to Authorization header, required for native EventSource)
|
|
271
|
+
*/
|
|
272
|
+
access_token?: unknown;
|
|
273
|
+
};
|
|
274
|
+
url: '/web/tickets/{id}/stream';
|
|
275
|
+
};
|
|
276
|
+
type WebTicketsControllerSseStreamResponses = {
|
|
277
|
+
/**
|
|
278
|
+
* Server-Sent Events stream
|
|
279
|
+
*/
|
|
280
|
+
200: WebSseEventDto;
|
|
281
|
+
};
|
|
282
|
+
type WebTicketsControllerSseStreamResponse = WebTicketsControllerSseStreamResponses[keyof WebTicketsControllerSseStreamResponses];
|
|
283
|
+
type WebTicketsControllerEscalateData = {
|
|
284
|
+
body?: never;
|
|
285
|
+
path: {
|
|
286
|
+
/**
|
|
287
|
+
* Ticket ID
|
|
288
|
+
*/
|
|
289
|
+
id: number;
|
|
290
|
+
};
|
|
291
|
+
query?: never;
|
|
292
|
+
url: '/web/tickets/{id}/escalate';
|
|
293
|
+
};
|
|
294
|
+
type WebTicketsControllerEscalateResponses = {
|
|
295
|
+
/**
|
|
296
|
+
* Escalation request submitted
|
|
297
|
+
*/
|
|
298
|
+
204: void;
|
|
299
|
+
};
|
|
300
|
+
type WebTicketsControllerEscalateResponse = WebTicketsControllerEscalateResponses[keyof WebTicketsControllerEscalateResponses];
|
|
301
|
+
type WebTicketsControllerResolveByUserData = {
|
|
302
|
+
body?: never;
|
|
303
|
+
path: {
|
|
304
|
+
/**
|
|
305
|
+
* Ticket ID
|
|
306
|
+
*/
|
|
307
|
+
id: number;
|
|
308
|
+
};
|
|
309
|
+
query?: never;
|
|
310
|
+
url: '/web/tickets/{id}/resolve';
|
|
311
|
+
};
|
|
312
|
+
type WebTicketsControllerResolveByUserResponses = {
|
|
313
|
+
/**
|
|
314
|
+
* Ticket resolved
|
|
315
|
+
*/
|
|
316
|
+
204: void;
|
|
317
|
+
};
|
|
318
|
+
type WebTicketsControllerResolveByUserResponse = WebTicketsControllerResolveByUserResponses[keyof WebTicketsControllerResolveByUserResponses];
|
|
319
|
+
type WebUploadsControllerUploadData = {
|
|
320
|
+
body: {
|
|
321
|
+
/**
|
|
322
|
+
* Image file (jpeg/png/webp, max 10 MB)
|
|
323
|
+
*/
|
|
324
|
+
file: Blob | File;
|
|
325
|
+
};
|
|
326
|
+
path?: never;
|
|
327
|
+
query?: never;
|
|
328
|
+
url: '/web/uploads';
|
|
329
|
+
};
|
|
330
|
+
type WebUploadsControllerUploadResponses = {
|
|
331
|
+
/**
|
|
332
|
+
* File uploaded successfully
|
|
333
|
+
*/
|
|
334
|
+
200: UploadResponseDto;
|
|
335
|
+
};
|
|
336
|
+
type WebUploadsControllerUploadResponse = WebUploadsControllerUploadResponses[keyof WebUploadsControllerUploadResponses];
|
|
337
|
+
type WebUploadsControllerGetUploadData = {
|
|
338
|
+
body?: never;
|
|
339
|
+
path: {
|
|
340
|
+
/**
|
|
341
|
+
* Upload ID returned by POST /web/uploads
|
|
342
|
+
*/
|
|
343
|
+
id: string;
|
|
344
|
+
};
|
|
345
|
+
query?: never;
|
|
346
|
+
url: '/web/uploads/{id}';
|
|
347
|
+
};
|
|
348
|
+
type WebUploadsControllerGetUploadResponses = {
|
|
349
|
+
/**
|
|
350
|
+
* Image file stream
|
|
351
|
+
*/
|
|
352
|
+
200: Blob | File;
|
|
353
|
+
};
|
|
354
|
+
type WebUploadsControllerGetUploadResponse = WebUploadsControllerGetUploadResponses[keyof WebUploadsControllerGetUploadResponses];
|
|
355
|
+
|
|
356
|
+
export type { WebTicketsControllerSseStreamResponses as A, WebUploadsControllerGetUploadData as B, ClientOptions as C, WebUploadsControllerGetUploadResponse as D, WebUploadsControllerGetUploadResponses as E, WebUploadsControllerUploadData as F, WebUploadsControllerUploadResponse as G, WebUploadsControllerUploadResponses as H, IssueTokenDto as I, MessageDto as M, SendMessageDto as S, TicketInfoDto as T, UploadResponseDto as U, WebAuthControllerIssueTokenData as W, CurrentTicketResponseDto as a, IssueTokenResponseDto as b, MessagesResponseDto as c, SendMessageResponseDto as d, WebAuthControllerIssueTokenResponse as e, WebAuthControllerIssueTokenResponses as f, WebProfileDto as g, WebSseEventDataDto as h, WebSseEventDto as i, WebTicketsControllerEscalateData as j, WebTicketsControllerEscalateResponse as k, WebTicketsControllerEscalateResponses as l, WebTicketsControllerGetCurrentTicketData as m, WebTicketsControllerGetCurrentTicketResponse as n, WebTicketsControllerGetCurrentTicketResponses as o, WebTicketsControllerGetMessagesData as p, WebTicketsControllerGetMessagesResponse as q, WebTicketsControllerGetMessagesResponses as r, WebTicketsControllerResolveByUserData as s, WebTicketsControllerResolveByUserResponse as t, WebTicketsControllerResolveByUserResponses as u, WebTicketsControllerSendMessageData as v, WebTicketsControllerSendMessageResponse as w, WebTicketsControllerSendMessageResponses as x, WebTicketsControllerSseStreamData as y, WebTicketsControllerSseStreamResponse as z };
|