@robono/server 0.26.0 → 0.27.0
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/CHANGELOG.md +4 -0
- package/HISTORY-IMPORT.md +104 -5
- package/README.md +1 -1
- package/SBOM.spdx.json +9 -9
- package/dist/calling.d.ts +30 -0
- package/dist/calling.d.ts.map +1 -1
- package/dist/calling.js +13 -0
- package/dist/calling.js.map +1 -1
- package/dist/generated/history-import-interactions.d.ts +17 -0
- package/dist/generated/history-import-interactions.d.ts.map +1 -0
- package/dist/generated/history-import-interactions.js +40 -0
- package/dist/generated/history-import-interactions.js.map +1 -0
- package/dist/generated/interactions.d.ts +199 -0
- package/dist/generated/interactions.d.ts.map +1 -0
- package/dist/generated/interactions.js +89 -0
- package/dist/generated/interactions.js.map +1 -0
- package/dist/generated/sdk-versions.d.ts +6 -6
- package/dist/generated/sdk-versions.d.ts.map +1 -1
- package/dist/generated/sdk-versions.js +1 -1
- package/dist/generated/sdk-versions.js.map +1 -1
- package/dist/history-convert.d.ts +52 -0
- package/dist/history-convert.d.ts.map +1 -0
- package/dist/history-convert.js +276 -0
- package/dist/history-convert.js.map +1 -0
- package/dist/history-import-cli.d.ts +1 -7
- package/dist/history-import-cli.d.ts.map +1 -1
- package/dist/history-import-cli.js +4 -44
- package/dist/history-import-cli.js.map +1 -1
- package/dist/history-import-validation.d.ts +8 -0
- package/dist/history-import-validation.d.ts.map +1 -0
- package/dist/history-import-validation.js +85 -0
- package/dist/history-import-validation.js.map +1 -0
- package/dist/history-import.d.ts +8 -1
- package/dist/history-import.d.ts.map +1 -1
- package/dist/history-import.js +27 -6
- package/dist/history-import.js.map +1 -1
- package/dist/history-migrate-cli.d.ts +3 -0
- package/dist/history-migrate-cli.d.ts.map +1 -0
- package/dist/history-migrate-cli.js +260 -0
- package/dist/history-migrate-cli.js.map +1 -0
- package/dist/history-polls.d.ts +4 -0
- package/dist/history-polls.d.ts.map +1 -0
- package/dist/history-polls.js +66 -0
- package/dist/history-polls.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/messenger-example.json +1 -1
- package/dist/messenger-install.d.ts +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
## 0.26.0 — release candidate
|
|
2
2
|
|
|
3
|
+
## 0.27.0
|
|
4
|
+
|
|
5
|
+
Adds Sendbird/Stream history conversion with resumable private media uploads, reactions, poll votes, threads and pins; adds paged recording history, short-lived downloads and deletion.
|
|
6
|
+
|
|
3
7
|
Add complete runnable examples, maintained assistant instructions, business-message validation, public-group management, app availability and resumable history export including optional private attachment files. Keep installer/example package versions coordinated.
|
|
4
8
|
|
|
5
9
|
## 0.25.0 — release candidate
|
package/HISTORY-IMPORT.md
CHANGED
|
@@ -1,12 +1,102 @@
|
|
|
1
1
|
# Bring existing conversations to Robono
|
|
2
2
|
|
|
3
3
|
Use this server-only tool before opening the destination conversation to users.
|
|
4
|
-
It preserves original authors, dates, replies
|
|
4
|
+
It preserves original authors, dates, replies, supported reactions, complete poll
|
|
5
|
+
results, group threads, pins and validated custom message data, and keeps attachment files private.
|
|
5
6
|
It does not send old push notifications, create unread badges, fabricate read
|
|
6
7
|
receipts, or charge old messages as new sends. Storage, transfer and any enabled
|
|
7
8
|
screening still follow your selected plan and spending limits.
|
|
8
9
|
|
|
9
|
-
##
|
|
10
|
+
## Move a Sendbird or Stream export
|
|
11
|
+
|
|
12
|
+
Use the migration command to prepare and review several conversations together.
|
|
13
|
+
Give it the provider's JSON or JSONL export and a small mapping file:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"conversations": {"old-channel-id": "c829bd4f-1f67-4cd1-b285-6502923885b5"},
|
|
18
|
+
"users": {"old-user-1": "alice", "old-user-2": "bob"},
|
|
19
|
+
"reactions": {"love": "❤️"}
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For Stream, channel keys use `type:id`, such as `messaging:general`. The destination
|
|
24
|
+
IDs are authorized, empty Robono conversations created through your existing server
|
|
25
|
+
connection. When both systems use exactly the same authenticated user IDs, replace
|
|
26
|
+
`users` with `"preserveUserIds": true`. Importing history never grants membership.
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
npx --package @robono/server robono-history-migrate --provider sendbird --source export.json --mapping mapping.json --out private-migration
|
|
30
|
+
# Read private-migration/report.json. Resolve any listed issues first.
|
|
31
|
+
# Set ROBONO_API_KEY privately on your server, then:
|
|
32
|
+
npx --package @robono/server robono-history-migrate --apply private-migration
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Use `--provider stream` for Stream exports. Preparation is local and needs no key.
|
|
36
|
+
The command converts supported records, checks the whole plan before sending,
|
|
37
|
+
uploads prepared attachments and resumes interrupted conversations. Rerun the same
|
|
38
|
+
`--apply` command; keep the prepared folder and its checkpoints unchanged. Completed
|
|
39
|
+
conversations are confirmed with Robono rather than sent again.
|
|
40
|
+
|
|
41
|
+
For attachments, save the original files beside the mapping file and add a mapping
|
|
42
|
+
by channel and original message ID. The command copies them into the private
|
|
43
|
+
migration folder, checks their fingerprints and handles the private upload:
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"attachments": {
|
|
48
|
+
"old-channel-id": {
|
|
49
|
+
"old-photo-message": {"path":"files/photo.jpg","mimeType":"image/jpeg"},
|
|
50
|
+
"old-video-message": {"path":"files/video.mp4","mimeType":"video/mp4","durationMs":12000}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Merge this `attachments` section into your mapping file. Paths are relative to that
|
|
57
|
+
file; links and paths outside its folder are rejected. Do not put file URLs or
|
|
58
|
+
provider keys in the mapping. Each file can be up to 100 MiB, subject to your selected
|
|
59
|
+
attachment rules. A prepared batch can contain up to 512 MiB of files; use separate
|
|
60
|
+
conversation batches for larger archives. The command does not fetch arbitrary
|
|
61
|
+
URLs from message content or reuse old provider credentials.
|
|
62
|
+
|
|
63
|
+
Stream poll and vote records are converted together. For Sendbird, ordinary message
|
|
64
|
+
exports omit poll details: obtain the original definitions and full option voter
|
|
65
|
+
lists through its server API, then supply the definitions under `polls` in the mapping,
|
|
66
|
+
keyed by original poll ID. Include each option's complete `voters` list. A partial
|
|
67
|
+
voter preview is accepted only when its count proves it is the complete list.
|
|
68
|
+
Missing people are never invented from vote totals.
|
|
69
|
+
|
|
70
|
+
The private report identifies unsupported items before applying. These include
|
|
71
|
+
anonymous polls, incomplete voter/reaction lists, unsupported poll rules, missing pin
|
|
72
|
+
authors/dates and non-text custom metadata. Resolve these explicitly; the
|
|
73
|
+
command does not silently discard them. Keep the original export for provenance.
|
|
74
|
+
|
|
75
|
+
## Threads, pins and multiple files
|
|
76
|
+
|
|
77
|
+
A group thread keeps its original root and replies. A quote within a thread must
|
|
78
|
+
refer to its root or another reply in that same thread. Missing or later roots are
|
|
79
|
+
rejected. Thread imports require a group with replies enabled; they do not turn a
|
|
80
|
+
direct chat into a group. Pins keep their mapped author and original date, with the
|
|
81
|
+
same limit of 20 pins per group. The pin author must be supplied by the old export;
|
|
82
|
+
Robono does not guess who pinned a message.
|
|
83
|
+
|
|
84
|
+
For several files in one source message, use an array in its attachment mapping:
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{"attachments":{"old-channel-id":{"old-album":[
|
|
88
|
+
{"path":"files/one.jpg","mimeType":"image/jpeg"},
|
|
89
|
+
{"path":"files/two.jpg","mimeType":"image/jpeg"}
|
|
90
|
+
]}}}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Robono turns these into consecutive messages by the same author at the original
|
|
94
|
+
time. The first retains the original source ID, caption, reactions and pin. Later
|
|
95
|
+
files receive stable derived IDs; quotes of the original message still target the
|
|
96
|
+
first. This conversion appears in `report.json` before anything is sent. The file
|
|
97
|
+
count must match the export, so a missing mapping never silently drops a file.
|
|
98
|
+
|
|
99
|
+
## Import your own JSON format
|
|
10
100
|
|
|
11
101
|
1. Create the authorized empty conversation using your existing Robono connection.
|
|
12
102
|
Full history must be selected. For direct chats, authors must be the two members.
|
|
@@ -81,7 +171,7 @@ when the imported message is committed and uses your selected storage retention.
|
|
|
81
171
|
|
|
82
172
|
## Limits and recovery
|
|
83
173
|
|
|
84
|
-
- Up to
|
|
174
|
+
- Up to 100,000 messages and 256 MiB of staged content per conversation;
|
|
85
175
|
three active imports per customer. Each HTTP append accepts up to 100 messages;
|
|
86
176
|
the SDK uses smaller batches. Existing nonempty conversations cannot be merged.
|
|
87
177
|
- A job expires after 24 hours. Call `status(jobId)` to check it or `cancel(jobId)`
|
|
@@ -91,8 +181,13 @@ when the imported message is committed and uses your selected storage retention.
|
|
|
91
181
|
seven days; the content-free job result remains for safe retries.
|
|
92
182
|
- User erasure cancels affected unfinished imports and removes their staging
|
|
93
183
|
copies, so an old import cannot restore erased content.
|
|
94
|
-
-
|
|
95
|
-
|
|
184
|
+
- Reactions and poll results can be supplied as `interactions` on each message:
|
|
185
|
+
`reactions: [{userId, emoji}]`, `votes: [{userId, options: [0]}]`, and `closed: true`.
|
|
186
|
+
Option positions start at zero. Include every named person in `authors`, including
|
|
187
|
+
former participants; this does not grant them current access. Each message supports
|
|
188
|
+
up to 2,000 historical reactors/voters. Direct chats support Robono's Yes/No question
|
|
189
|
+
format; other polls belong in groups. No delivered/read receipts are invented.
|
|
190
|
+
- Custom message data is supported after mapping
|
|
96
191
|
it to Robono's versioned `custom` structure with a readable text fallback.
|
|
97
192
|
All data and action labels pass the same size limits and screening as new messages.
|
|
98
193
|
|
|
@@ -108,3 +203,7 @@ not silently discarded. Current word/link and AI screening cover all strings in
|
|
|
108
203
|
the custom data, including action labels. See the [business message guide](https://robono.com/guides/business-messages.html).
|
|
109
204
|
|
|
110
205
|
For exporting existing Robono data, see the [export guide](https://robono.com/guides/history-export.html).
|
|
206
|
+
|
|
207
|
+
For the JSON API, use `threadRootSourceId` together with `replyToSourceId`, and `interactions.pin: {userId, createdAt}`. Both refer to the explicitly authorized conversation and mapped user IDs.
|
|
208
|
+
|
|
209
|
+
Provider-specific fields on text messages are preserved as custom metadata. Unsupported file/poll metadata and expiring-message behavior block import with a report rather than being silently discarded. Conversion restores the exported current message content, not a provider’s earlier edit revisions or historical read receipts.
|
package/README.md
CHANGED
|
@@ -511,6 +511,6 @@ change an existing customer's security policy.
|
|
|
511
511
|
|
|
512
512
|
## Moving conversation history
|
|
513
513
|
|
|
514
|
-
Use `RobonoHistoryImport` or `robono-history-import` to bring existing messages into an empty conversation. Use `RobonoHistoryExport` or `robono-history-export` for private, resumable JSONL exports. These require a server-only `messaging:manage` key. [Import guide](https://robono.com/guides/history-import.html) · [Export guide](https://robono.com/guides/history-export.html). Exports include retained
|
|
514
|
+
Use `RobonoHistoryImport` or `robono-history-import` to bring existing messages into an empty conversation. Use `RobonoHistoryExport` or `robono-history-export` for private, resumable JSONL exports. These require a server-only `messaging:manage` key. [Import guide](https://robono.com/guides/history-import.html) · [Export guide](https://robono.com/guides/history-export.html). Exports include retained messages, pins, replies, threads and file references. Use `--files` to save verified managed attachments privately as well; unavailable or customer-managed files are reported. `robono-history-migrate` prepares Sendbird/Stream exports locally, then applies or resumes the reviewed plan. It preserves mapped authors, dates, reactions, complete named poll votes, pins and group threads. Multi-file messages become consecutive attachment messages, with the original caption and reactions on the first. The report identifies every conversion and blocks unsupported or incomplete records before applying. Each conversation supports up to 100,000 messages / 256 MiB; private attachment files have separate limits.
|
|
515
515
|
|
|
516
516
|
Public communities: [discovery, joining and moderator controls](https://robono.com/guides/public-groups.html).
|
package/SBOM.spdx.json
CHANGED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
"spdxVersion": "SPDX-2.3",
|
|
3
3
|
"dataLicense": "CC0-1.0",
|
|
4
4
|
"SPDXID": "SPDXRef-DOCUMENT",
|
|
5
|
-
"name": "@robono/server@0.
|
|
6
|
-
"documentNamespace": "http://spdx.org/spdxdocs/@robono%2fserver-0.
|
|
5
|
+
"name": "@robono/server@0.27.0",
|
|
6
|
+
"documentNamespace": "http://spdx.org/spdxdocs/@robono%2fserver-0.27.0-***",
|
|
7
7
|
"creationInfo": {
|
|
8
|
-
"created": "2026-11-
|
|
8
|
+
"created": "2026-11-05T15:11:33.074Z",
|
|
9
9
|
"creators": [
|
|
10
10
|
"Tool: npm/cli-11.6.2"
|
|
11
11
|
]
|
|
12
12
|
},
|
|
13
13
|
"documentDescribes": [
|
|
14
|
-
"SPDXRef-Package-robono.server-0.
|
|
14
|
+
"SPDXRef-Package-robono.server-0.27.0"
|
|
15
15
|
],
|
|
16
16
|
"packages": [
|
|
17
17
|
{
|
|
18
18
|
"name": "@robono/server",
|
|
19
|
-
"SPDXID": "SPDXRef-Package-robono.server-0.
|
|
20
|
-
"versionInfo": "0.
|
|
19
|
+
"SPDXID": "SPDXRef-Package-robono.server-0.27.0",
|
|
20
|
+
"versionInfo": "0.27.0",
|
|
21
21
|
"packageFileName": "",
|
|
22
22
|
"description": "Provider-neutral server SDK for the Robono Bridge API.",
|
|
23
23
|
"primaryPackagePurpose": "LIBRARY",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
{
|
|
30
30
|
"referenceCategory": "PACKAGE-MANAGER",
|
|
31
31
|
"referenceType": "purl",
|
|
32
|
-
"referenceLocator": "pkg:npm/%40robono/server@0.
|
|
32
|
+
"referenceLocator": "pkg:npm/%40robono/server@0.27.0"
|
|
33
33
|
}
|
|
34
34
|
]
|
|
35
35
|
},
|
|
@@ -175,12 +175,12 @@
|
|
|
175
175
|
"relationships": [
|
|
176
176
|
{
|
|
177
177
|
"spdxElementId": "SPDXRef-DOCUMENT",
|
|
178
|
-
"relatedSpdxElement": "SPDXRef-Package-robono.server-0.
|
|
178
|
+
"relatedSpdxElement": "SPDXRef-Package-robono.server-0.27.0",
|
|
179
179
|
"relationshipType": "DESCRIBES"
|
|
180
180
|
},
|
|
181
181
|
{
|
|
182
182
|
"spdxElementId": "SPDXRef-Package-cross-spawn-7.0.6",
|
|
183
|
-
"relatedSpdxElement": "SPDXRef-Package-robono.server-0.
|
|
183
|
+
"relatedSpdxElement": "SPDXRef-Package-robono.server-0.27.0",
|
|
184
184
|
"relationshipType": "DEPENDENCY_OF"
|
|
185
185
|
},
|
|
186
186
|
{
|
package/dist/calling.d.ts
CHANGED
|
@@ -22,6 +22,19 @@ export interface CallingRelationshipResult {
|
|
|
22
22
|
screenSharingAllowed?: boolean;
|
|
23
23
|
revision: number;
|
|
24
24
|
}
|
|
25
|
+
export interface CallingRecording {
|
|
26
|
+
id: string;
|
|
27
|
+
callId: string;
|
|
28
|
+
mode: 'audio' | 'video';
|
|
29
|
+
transcribe: boolean;
|
|
30
|
+
state: 'reserved' | 'complete' | 'failed' | 'declined' | 'cancelled';
|
|
31
|
+
durationMs: number | null;
|
|
32
|
+
reason: string | null;
|
|
33
|
+
createdAt: string;
|
|
34
|
+
endedAt: string | null;
|
|
35
|
+
expiresAt: string | null;
|
|
36
|
+
available: boolean;
|
|
37
|
+
}
|
|
25
38
|
export interface CallingSession {
|
|
26
39
|
serviceUrl: string;
|
|
27
40
|
token: string;
|
|
@@ -87,6 +100,23 @@ export declare class RobonoCallingBackend {
|
|
|
87
100
|
startedAt: number;
|
|
88
101
|
endsAt: number;
|
|
89
102
|
}>;
|
|
103
|
+
/** Backend-only archive; your server decides which staff/users may access it. */
|
|
104
|
+
recordings(options?: {
|
|
105
|
+
limit?: number;
|
|
106
|
+
cursor?: string;
|
|
107
|
+
}): Promise<{
|
|
108
|
+
recordings: CallingRecording[];
|
|
109
|
+
nextCursor: string | null;
|
|
110
|
+
}>;
|
|
111
|
+
/** Private link, valid for two minutes. Never put it in analytics or public pages. */
|
|
112
|
+
recordingDownload(id: string, kind?: 'media' | 'transcript'): Promise<{
|
|
113
|
+
url: string;
|
|
114
|
+
expiresAt: number;
|
|
115
|
+
}>;
|
|
116
|
+
/** Permanently remove a completed recording; repeating this is safe. */
|
|
117
|
+
deleteRecording(id: string): Promise<{
|
|
118
|
+
deleted: true;
|
|
119
|
+
}>;
|
|
90
120
|
/** Current technical limits, call usage, alerts and organization spending. Backend only. */
|
|
91
121
|
monitoring(): Promise<Record<string, unknown>>;
|
|
92
122
|
/** Apply current user permissions to all own-network and Bridge calls. Persist a strictly increasing revision. */
|
package/dist/calling.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calling.d.ts","sourceRoot":"","sources":["../src/calling.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,2BAA2B;IAC1C,kEAAkE;IAClE,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD,MAAM,WAAW,wBAAwB;IACvC,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,8EAA8E;IAC9E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oBAAoB,CAAC,EAAC,OAAO,CAAC;IAC9B,+EAA+E;IAC/E,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,yBAAyB;IAAG,YAAY,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,oBAAoB,CAAC,EAAC,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE;AAC9J,MAAM,WAAW,cAAc;IAAG,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAC,MAAM,CAAA;CAAE;AAO7G,2FAA2F;AAC3F,qBAAa,oB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AAC,OAAO,CAAA;KAAC,CAAC;CAWjP"}
|
package/dist/calling.js
CHANGED
|
@@ -87,6 +87,19 @@ export class RobonoCallingBackend {
|
|
|
87
87
|
throw Error('Invalid call countdown.');
|
|
88
88
|
return this.post(this.admissionUrl, { ...input, operation: 'start-countdown' });
|
|
89
89
|
}
|
|
90
|
+
/** Backend-only archive; your server decides which staff/users may access it. */
|
|
91
|
+
recordings(options = {}) {
|
|
92
|
+
if (options.limit !== undefined && (!Number.isInteger(options.limit) || options.limit < 1 || options.limit > 100) || options.cursor !== undefined && (typeof options.cursor !== 'string' || options.cursor.length > 300))
|
|
93
|
+
throw Error('Invalid recording page.');
|
|
94
|
+
return this.post(this.admissionUrl, { operation: 'recordings', ...options });
|
|
95
|
+
}
|
|
96
|
+
/** Private link, valid for two minutes. Never put it in analytics or public pages. */
|
|
97
|
+
recordingDownload(id, kind = 'media') { if (!/^[0-9a-f-]{36}$/i.test(id))
|
|
98
|
+
throw Error('Invalid recording ID.'); if (!['media', 'transcript'].includes(kind))
|
|
99
|
+
throw Error('Invalid recording format.'); return this.post(this.admissionUrl, { operation: 'recording-download', id, kind }); }
|
|
100
|
+
/** Permanently remove a completed recording; repeating this is safe. */
|
|
101
|
+
deleteRecording(id) { if (!/^[0-9a-f-]{36}$/i.test(id))
|
|
102
|
+
throw Error('Invalid recording ID.'); return this.post(this.admissionUrl, { operation: 'recording-delete', id }); }
|
|
90
103
|
/** Current technical limits, call usage, alerts and organization spending. Backend only. */
|
|
91
104
|
monitoring() { return this.post(this.admissionUrl, { operation: 'monitoring' }); }
|
|
92
105
|
/** Apply current user permissions to all own-network and Bridge calls. Persist a strictly increasing revision. */
|
package/dist/calling.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calling.js","sourceRoot":"","sources":["../src/calling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"calling.js","sourceRoot":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@@
|
|
|
1
|
+
export interface HistoryInteractions {
|
|
2
|
+
reactions?: {
|
|
3
|
+
userId: string;
|
|
4
|
+
emoji: string;
|
|
5
|
+
}[];
|
|
6
|
+
votes?: {
|
|
7
|
+
userId: string;
|
|
8
|
+
options: number[];
|
|
9
|
+
}[];
|
|
10
|
+
closed?: boolean;
|
|
11
|
+
pin?: {
|
|
12
|
+
userId: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export declare function validateHistoryInteractions(value: unknown, poll?: unknown, authors?: ReadonlySet<string>): HistoryInteractions;
|
|
17
|
+
//# sourceMappingURL=history-import-interactions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history-import-interactions.d.ts","sourceRoot":"","sources":["../../src/generated/history-import-interactions.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,mBAAmB;IACnC,SAAS,CAAC,EAAC;QAAC,MAAM,EAAC,MAAM,CAAC;QAAA,KAAK,EAAC,MAAM,CAAA;KAAC,EAAE,CAAC;IAC1C,KAAK,CAAC,EAAC;QAAC,MAAM,EAAC,MAAM,CAAC;QAAA,OAAO,EAAC,MAAM,EAAE,CAAA;KAAC,EAAE,CAAC;IAC1C,MAAM,CAAC,EAAC,OAAO,CAAC;IAChB,GAAG,CAAC,EAAC;QAAC,MAAM,EAAC,MAAM,CAAC;QAAA,SAAS,EAAC,MAAM,CAAA;KAAC,CAAC;CACtC;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAC,OAAO,EAAC,IAAI,CAAC,EAAC,OAAO,EAAC,OAAO,CAAC,EAAC,WAAW,CAAC,MAAM,CAAC,GAAE,mBAAmB,CAsBxH"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Generated by scripts/sync-server-message-schema.mjs. Edit shared/historyImportInteractions.ts.
|
|
2
|
+
import { validateReaction, validatePoll } from './interactions.js';
|
|
3
|
+
const object = (v) => v !== null && typeof v === 'object' && !Array.isArray(v);
|
|
4
|
+
export function validateHistoryInteractions(value, poll, authors) {
|
|
5
|
+
const v = value;
|
|
6
|
+
if (!object(v) || Object.keys(v).some(k => !['reactions', 'votes', 'closed', 'pin'].includes(k)) || JSON.stringify(v).length > 131072)
|
|
7
|
+
throw Error('invalid_import_interactions');
|
|
8
|
+
if (v.pin !== undefined) {
|
|
9
|
+
const p = v.pin;
|
|
10
|
+
if (!object(p) || Object.keys(p).some(k => !['userId', 'createdAt'].includes(k)) || typeof p.userId !== 'string' || !p.userId.length || p.userId.length > 200 || p.userId !== p.userId.trim() || /[\u0000-\u001f\u007f]/.test(p.userId) || authors && !authors.has(p.userId) || typeof p.createdAt !== 'string' || !Number.isFinite(Date.parse(p.createdAt)) || Date.parse(p.createdAt) < 0 || Date.parse(p.createdAt) > Date.now())
|
|
11
|
+
throw Error('invalid_import_pin');
|
|
12
|
+
}
|
|
13
|
+
const definition = poll === undefined ? undefined : validatePoll(poll);
|
|
14
|
+
if (v.closed !== undefined && (!definition || typeof v.closed !== 'boolean'))
|
|
15
|
+
throw Error('invalid_import_interactions');
|
|
16
|
+
for (const name of ['reactions', 'votes']) {
|
|
17
|
+
const rows = v[name];
|
|
18
|
+
if (rows === undefined)
|
|
19
|
+
continue;
|
|
20
|
+
if (!Array.isArray(rows) || rows.length > 2000)
|
|
21
|
+
throw Error('invalid_import_interactions');
|
|
22
|
+
const ids = new Set();
|
|
23
|
+
for (const row of rows) {
|
|
24
|
+
if (!object(row) || typeof row.userId !== 'string' || !row.userId.length || row.userId.length > 200 || row.userId !== row.userId.trim() || /[\u0000-\u001f\u007f]/.test(row.userId) || ids.has(row.userId) || authors && !authors.has(row.userId))
|
|
25
|
+
throw Error('invalid_import_interaction_user');
|
|
26
|
+
ids.add(row.userId);
|
|
27
|
+
if (name === 'reactions') {
|
|
28
|
+
if (Object.keys(row).some(k => !['userId', 'emoji'].includes(k)) || !validateReaction(row.emoji))
|
|
29
|
+
throw Error('invalid_import_reaction');
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
const options = row.options;
|
|
33
|
+
if (!definition || Object.keys(row).some(k => !['userId', 'options'].includes(k)) || !Array.isArray(options) || !options.length || options.length > definition.options.length || new Set(options).size !== options.length || !definition.multiple && options.length !== 1 || options.some((n) => !Number.isSafeInteger(n) || n < 0 || n >= definition.options.length))
|
|
34
|
+
throw Error('invalid_import_vote');
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return v;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=history-import-interactions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history-import-interactions.js","sourceRoot":"","sources":["../../src/generated/history-import-interactions.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,OAAO,EAAC,gBAAgB,EAAC,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAQhE,MAAM,MAAM,GAAC,CAAC,CAAK,EAAC,EAAE,CAAA,CAAC,KAAG,IAAI,IAAE,OAAO,CAAC,KAAG,QAAQ,IAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACvE,MAAM,UAAU,2BAA2B,CAAC,KAAa,EAAC,IAAa,EAAC,OAA4B;IACnG,MAAM,CAAC,GAAC,KAA4B,CAAC;IACrC,IAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA,EAAE,CAAA,CAAC,CAAC,WAAW,EAAC,OAAO,EAAC,QAAQ,EAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,GAAC,MAAM;QAAC,MAAM,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACrK,IAAG,CAAC,CAAC,GAAG,KAAG,SAAS,EAAC,CAAC;QAAA,MAAM,CAAC,GAAC,CAAC,CAAC,G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CAAC;gBACnC,IAAG,CAAC,UAAU,IAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA,EAAE,CAAA,CAAC,CAAC,QAAQ,EAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAE,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAE,CAAC,OAAO,CAAC,MAAM,IAAE,OAAO,CAAC,MAAM,GAAC,UAAU,CAAC,OAAO,CAAC,MAAM,IAAE,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,KAAG,OAAO,CAAC,MAAM,IAAE,CAAC,UAAU,CAAC,QAAQ,IAAE,OAAO,CAAC,MAAM,KAAG,CAAC,IAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAS,EAAC,EAAE,CAAA,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,IAAG,CAAY,GAAC,CAAC,IAAG,CAAY,IAAE,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC;oBAAC,MAAM,KAAK,CAAC,qBAAqB,CAAC,CAAC;YACtY,CAAC;QACF,CAAC;IACF,CAAC;IACD,OAAO,CAAC,CAAC;AACV,CAAC"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/** Messenger's shared, bounded emoji catalogue. */
|
|
2
|
+
export declare const messageReactionOptions: readonly [{
|
|
3
|
+
readonly emoji: "👍";
|
|
4
|
+
readonly label: "Thumbs up";
|
|
5
|
+
}, {
|
|
6
|
+
readonly emoji: "❤️";
|
|
7
|
+
readonly label: "Heart";
|
|
8
|
+
}, {
|
|
9
|
+
readonly emoji: "😂";
|
|
10
|
+
readonly label: "Laugh";
|
|
11
|
+
}, {
|
|
12
|
+
readonly emoji: "😢";
|
|
13
|
+
readonly label: "Cry";
|
|
14
|
+
}, {
|
|
15
|
+
readonly emoji: "😮";
|
|
16
|
+
readonly label: "Shock";
|
|
17
|
+
}, {
|
|
18
|
+
readonly emoji: "👏";
|
|
19
|
+
readonly label: "Clap";
|
|
20
|
+
}, {
|
|
21
|
+
readonly emoji: "🔥";
|
|
22
|
+
readonly label: "Fire";
|
|
23
|
+
}, {
|
|
24
|
+
readonly emoji: "🎉";
|
|
25
|
+
readonly label: "Party";
|
|
26
|
+
}, {
|
|
27
|
+
readonly emoji: "😁";
|
|
28
|
+
readonly label: "Grin";
|
|
29
|
+
}, {
|
|
30
|
+
readonly emoji: "😊";
|
|
31
|
+
readonly label: "Smile";
|
|
32
|
+
}, {
|
|
33
|
+
readonly emoji: "😉";
|
|
34
|
+
readonly label: "Wink";
|
|
35
|
+
}, {
|
|
36
|
+
readonly emoji: "🤔";
|
|
37
|
+
readonly label: "Thinking";
|
|
38
|
+
}, {
|
|
39
|
+
readonly emoji: "👌";
|
|
40
|
+
readonly label: "Okay";
|
|
41
|
+
}, {
|
|
42
|
+
readonly emoji: "🙏";
|
|
43
|
+
readonly label: "Please";
|
|
44
|
+
}, {
|
|
45
|
+
readonly emoji: "👀";
|
|
46
|
+
readonly label: "Eyes";
|
|
47
|
+
}, {
|
|
48
|
+
readonly emoji: "💯";
|
|
49
|
+
readonly label: "One hundred";
|
|
50
|
+
}, {
|
|
51
|
+
readonly emoji: "⭐";
|
|
52
|
+
readonly label: "Star";
|
|
53
|
+
}, {
|
|
54
|
+
readonly emoji: "💔";
|
|
55
|
+
readonly label: "Broken heart";
|
|
56
|
+
}, {
|
|
57
|
+
readonly emoji: "😡";
|
|
58
|
+
readonly label: "Angry";
|
|
59
|
+
}, {
|
|
60
|
+
readonly emoji: "😕";
|
|
61
|
+
readonly label: "Confused";
|
|
62
|
+
}, {
|
|
63
|
+
readonly emoji: "🤯";
|
|
64
|
+
readonly label: "Mind blown";
|
|
65
|
+
}, {
|
|
66
|
+
readonly emoji: "😎";
|
|
67
|
+
readonly label: "Cool";
|
|
68
|
+
}, {
|
|
69
|
+
readonly emoji: "🤗";
|
|
70
|
+
readonly label: "Hug";
|
|
71
|
+
}, {
|
|
72
|
+
readonly emoji: "🚀";
|
|
73
|
+
readonly label: "Rocket";
|
|
74
|
+
}, {
|
|
75
|
+
readonly emoji: "✅";
|
|
76
|
+
readonly label: "Check";
|
|
77
|
+
}, {
|
|
78
|
+
readonly emoji: "❌";
|
|
79
|
+
readonly label: "No";
|
|
80
|
+
}, {
|
|
81
|
+
readonly emoji: "🙌";
|
|
82
|
+
readonly label: "Hands raised";
|
|
83
|
+
}, {
|
|
84
|
+
readonly emoji: "🤝";
|
|
85
|
+
readonly label: "Handshake";
|
|
86
|
+
}, {
|
|
87
|
+
readonly emoji: "🫶";
|
|
88
|
+
readonly label: "Heart hands";
|
|
89
|
+
}, {
|
|
90
|
+
readonly emoji: "💪";
|
|
91
|
+
readonly label: "Strong";
|
|
92
|
+
}, {
|
|
93
|
+
readonly emoji: "👎";
|
|
94
|
+
readonly label: "Thumbs down";
|
|
95
|
+
}, {
|
|
96
|
+
readonly emoji: "✌️";
|
|
97
|
+
readonly label: "Peace";
|
|
98
|
+
}, {
|
|
99
|
+
readonly emoji: "🤞";
|
|
100
|
+
readonly label: "Fingers crossed";
|
|
101
|
+
}, {
|
|
102
|
+
readonly emoji: "😄";
|
|
103
|
+
readonly label: "Happy";
|
|
104
|
+
}, {
|
|
105
|
+
readonly emoji: "😍";
|
|
106
|
+
readonly label: "Love it";
|
|
107
|
+
}, {
|
|
108
|
+
readonly emoji: "😘";
|
|
109
|
+
readonly label: "Kiss";
|
|
110
|
+
}, {
|
|
111
|
+
readonly emoji: "🥰";
|
|
112
|
+
readonly label: "Loved";
|
|
113
|
+
}, {
|
|
114
|
+
readonly emoji: "😆";
|
|
115
|
+
readonly label: "Big laugh";
|
|
116
|
+
}, {
|
|
117
|
+
readonly emoji: "🤣";
|
|
118
|
+
readonly label: "Rolling laugh";
|
|
119
|
+
}, {
|
|
120
|
+
readonly emoji: "😅";
|
|
121
|
+
readonly label: "Nervous laugh";
|
|
122
|
+
}, {
|
|
123
|
+
readonly emoji: "😬";
|
|
124
|
+
readonly label: "Grimace";
|
|
125
|
+
}, {
|
|
126
|
+
readonly emoji: "😱";
|
|
127
|
+
readonly label: "Scream";
|
|
128
|
+
}, {
|
|
129
|
+
readonly emoji: "😭";
|
|
130
|
+
readonly label: "Sob";
|
|
131
|
+
}, {
|
|
132
|
+
readonly emoji: "😴";
|
|
133
|
+
readonly label: "Sleepy";
|
|
134
|
+
}, {
|
|
135
|
+
readonly emoji: "🤷";
|
|
136
|
+
readonly label: "Shrug";
|
|
137
|
+
}, {
|
|
138
|
+
readonly emoji: "🙄";
|
|
139
|
+
readonly label: "Eye roll";
|
|
140
|
+
}, {
|
|
141
|
+
readonly emoji: "😇";
|
|
142
|
+
readonly label: "Angel";
|
|
143
|
+
}, {
|
|
144
|
+
readonly emoji: "🤮";
|
|
145
|
+
readonly label: "Gross";
|
|
146
|
+
}, {
|
|
147
|
+
readonly emoji: "🤐";
|
|
148
|
+
readonly label: "Quiet";
|
|
149
|
+
}, {
|
|
150
|
+
readonly emoji: "🤫";
|
|
151
|
+
readonly label: "Shush";
|
|
152
|
+
}, {
|
|
153
|
+
readonly emoji: "😋";
|
|
154
|
+
readonly label: "Yum";
|
|
155
|
+
}, {
|
|
156
|
+
readonly emoji: "🍕";
|
|
157
|
+
readonly label: "Pizza";
|
|
158
|
+
}, {
|
|
159
|
+
readonly emoji: "🍿";
|
|
160
|
+
readonly label: "Popcorn";
|
|
161
|
+
}, {
|
|
162
|
+
readonly emoji: "🏆";
|
|
163
|
+
readonly label: "Trophy";
|
|
164
|
+
}, {
|
|
165
|
+
readonly emoji: "⚡";
|
|
166
|
+
readonly label: "Lightning";
|
|
167
|
+
}, {
|
|
168
|
+
readonly emoji: "✨";
|
|
169
|
+
readonly label: "Sparkles";
|
|
170
|
+
}, {
|
|
171
|
+
readonly emoji: "💡";
|
|
172
|
+
readonly label: "Idea";
|
|
173
|
+
}, {
|
|
174
|
+
readonly emoji: "🫡";
|
|
175
|
+
readonly label: "Salute";
|
|
176
|
+
}, {
|
|
177
|
+
readonly emoji: "👋";
|
|
178
|
+
readonly label: "Wave";
|
|
179
|
+
}, {
|
|
180
|
+
readonly emoji: "📌";
|
|
181
|
+
readonly label: "Pin";
|
|
182
|
+
}, {
|
|
183
|
+
readonly emoji: "❓";
|
|
184
|
+
readonly label: "Question";
|
|
185
|
+
}, {
|
|
186
|
+
readonly emoji: "‼️";
|
|
187
|
+
readonly label: "Double exclamation";
|
|
188
|
+
}];
|
|
189
|
+
export declare const messageReactions: ("👍" | "❤️" | "😂" | "😢" | "😮" | "👏" | "🔥" | "🎉" | "😁" | "😊" | "😉" | "🤔" | "👌" | "🙏" | "👀" | "💯" | "⭐" | "💔" | "😡" | "😕" | "🤯" | "😎" | "🤗" | "🚀" | "✅" | "❌" | "🙌" | "🤝" | "🫶" | "💪" | "👎" | "✌️" | "🤞" | "😄" | "😍" | "😘" | "🥰" | "😆" | "🤣" | "😅" | "😬" | "😱" | "😭" | "😴" | "🤷" | "🙄" | "😇" | "🤮" | "🤐" | "🤫" | "😋" | "🍕" | "🍿" | "🏆" | "⚡" | "✨" | "💡" | "🫡" | "👋" | "📌" | "❓" | "‼️")[];
|
|
190
|
+
export type MessageReaction = typeof messageReactions[number];
|
|
191
|
+
export declare function validateReaction(value: unknown): MessageReaction | null;
|
|
192
|
+
export interface MessagePoll {
|
|
193
|
+
question: string;
|
|
194
|
+
options: string[];
|
|
195
|
+
multiple: boolean;
|
|
196
|
+
kind?: "yes_no";
|
|
197
|
+
}
|
|
198
|
+
export declare function validatePoll(value: unknown): MessagePoll;
|
|
199
|
+
//# sourceMappingURL=interactions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interactions.d.ts","sourceRoot":"","sources":["../../src/generated/interactions.ts"],"names":[],"mappings":"AACA,mDAAmD;AACnD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+DzB,CAAC;AACX,eAAO,MAAM,gBAAgB,+aAAmD,CAAC;AACjF,MAAM,MAAM,eAAe,GAAG,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAC9D,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,GAAG,IAAI,CAIvE;AACD,MAAM,WAAW,WAAW;IAAG,QAAQ,EAAC,MAAM,CAAC;IAAC,OAAO,EAAC,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAC,OAAO,CAAC;IAAC,IAAI,CAAC,EAAC,QAAQ,CAAA;CAAE;AACpG,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CASxD"}
|