@robono/server 0.1.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/LICENSE ADDED
@@ -0,0 +1,130 @@
1
+ ROBONO SDK LICENSE AGREEMENT
2
+ Version 1.0, July 20, 2026
3
+
4
+ Copyright (c) 2026 Alexander Ginzburg. All rights reserved.
5
+
6
+ This Robono SDK License Agreement (the "Agreement") is between Alexander
7
+ Ginzburg, doing business as Robono ("Robono"), and the person or entity that
8
+ downloads, installs, copies, or uses the Software ("You"). By downloading,
9
+ installing, copying, or using the Software, You accept this Agreement. If You
10
+ do not accept it, do not use the Software.
11
+
12
+ 1. Definitions
13
+
14
+ "Software" means this Robono software development kit, its documentation, and
15
+ any updates Robono provides under this Agreement.
16
+
17
+ "Robono Service" means the messaging interoperability, routing, policy,
18
+ conversion, delivery, and related services operated or expressly authorized by
19
+ Robono.
20
+
21
+ "Application" means a product or service owned or controlled by You that is
22
+ authorized to connect to the Robono Service.
23
+
24
+ 2. Limited License
25
+
26
+ Subject to this Agreement, Robono grants You a limited, non-exclusive,
27
+ non-transferable, non-sublicensable, revocable license to:
28
+
29
+ (a) install, copy, and use the Software internally to develop, test, and
30
+ operate an Application that communicates with the Robono Service; and
31
+
32
+ (b) reproduce and distribute the portions of the Software that are necessarily
33
+ included in Your Application, solely in compiled, minified, bundled, or object
34
+ code form and solely as needed for that Application to communicate with the
35
+ Robono Service.
36
+
37
+ No right is granted to distribute the Software as a standalone product or SDK.
38
+
39
+ 3. Restrictions
40
+
41
+ You may not, and may not permit another person to:
42
+
43
+ (a) sell, rent, lease, sublicense, publish, or redistribute the Software as a
44
+ standalone product, library, SDK, or service;
45
+
46
+ (b) use the Software or a modified or derivative version of it to develop,
47
+ provide, or support a product or service that competes with the Robono Service;
48
+
49
+ (c) use the Software to bypass Robono, avoid applicable usage controls or fees,
50
+ or access the Robono Service without authorization;
51
+
52
+ (d) remove or alter copyright, trademark, attribution, or proprietary notices;
53
+
54
+ (e) reverse engineer, decompile, or disassemble the Software except to the
55
+ limited extent applicable law expressly prohibits this restriction; or
56
+
57
+ (f) use the Software in violation of applicable law, the rights of another
58
+ person, or the terms governing access to the Robono Service.
59
+
60
+ 4. Ownership and Reserved Rights
61
+
62
+ The Software is licensed, not sold. Robono and its licensors retain all right,
63
+ title, and interest in the Software and all related intellectual property.
64
+ Except for the limited rights expressly granted in Section 2, all rights are
65
+ reserved.
66
+
67
+ No patent license is granted except the minimum license, if any, necessarily
68
+ required to exercise the rights expressly granted in Section 2, and that
69
+ limited patent license applies only while the Software is used with an
70
+ authorized Robono Service.
71
+
72
+ 5. Service Access
73
+
74
+ This Agreement does not itself grant an account, API credentials, service
75
+ availability, support, or a right to access the Robono Service. Service access
76
+ may be governed by additional terms, plans, limits, and policies. Robono may
77
+ suspend or terminate access to protect users, systems, legal compliance, or the
78
+ integrity of the Robono Service.
79
+
80
+ 6. Updates and Support
81
+
82
+ Robono is not required to provide maintenance, updates, support, or continued
83
+ availability of any version of the Software unless separately agreed in
84
+ writing.
85
+
86
+ 7. Term and Termination
87
+
88
+ This Agreement continues until terminated. Your rights terminate automatically
89
+ if You breach this Agreement. On termination, You must stop using the Software
90
+ and delete copies under Your control, except for copies necessarily contained
91
+ in previously distributed Applications. Sections 3, 4, 8, 9, 10, and 11
92
+ survive termination.
93
+
94
+ 8. Disclaimer of Warranties
95
+
96
+ TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" AND
97
+ "AS AVAILABLE," WITHOUT WARRANTIES OF ANY KIND, EXPRESS, IMPLIED, OR
98
+ STATUTORY, INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
99
+ PURPOSE, TITLE, AND NON-INFRINGEMENT.
100
+
101
+ 9. Limitation of Liability
102
+
103
+ TO THE MAXIMUM EXTENT PERMITTED BY LAW, ROBONO WILL NOT BE LIABLE FOR INDIRECT,
104
+ INCIDENTAL, SPECIAL, CONSEQUENTIAL, EXEMPLARY, OR PUNITIVE DAMAGES, OR FOR LOSS
105
+ OF DATA, REVENUE, PROFITS, GOODWILL, OR BUSINESS OPPORTUNITY, ARISING FROM OR
106
+ RELATING TO THE SOFTWARE. ROBONO'S TOTAL LIABILITY RELATING TO THE SOFTWARE
107
+ WILL NOT EXCEED THE GREATER OF ONE HUNDRED U.S. DOLLARS (US $100) OR THE AMOUNT
108
+ YOU PAID ROBONO FOR THE SOFTWARE DURING THE TWELVE MONTHS BEFORE THE EVENT
109
+ GIVING RISE TO THE CLAIM. THESE LIMITATIONS APPLY TO THE MAXIMUM EXTENT
110
+ PERMITTED BY LAW.
111
+
112
+ 10. Governing Law
113
+
114
+ This Agreement is governed by the laws of the State of Florida, excluding its
115
+ conflict-of-laws rules. The state and federal courts located in Palm Beach
116
+ County, Florida have exclusive jurisdiction, and each party consents to their
117
+ jurisdiction and venue.
118
+
119
+ 11. General
120
+
121
+ You may not assign this Agreement without Robono's prior written consent.
122
+ Robono may assign this Agreement in connection with a reorganization, transfer
123
+ of intellectual property, financing, merger, acquisition, or sale of all or
124
+ substantially all of the relevant assets. If a provision is unenforceable, it
125
+ will be enforced to the maximum extent permitted and the remaining provisions
126
+ will remain effective. A waiver must be in writing. This Agreement is the
127
+ entire agreement concerning the Software unless You and Robono sign a separate
128
+ written agreement that expressly replaces it.
129
+
130
+ Questions about this license may be sent to alexg@letitplay.com.
package/README.md ADDED
@@ -0,0 +1,124 @@
1
+ # `@robono/server`
2
+
3
+ Provider-neutral Node/TypeScript SDK for connecting an existing private network to Robono. It has no user interface and does not depend on Loop, Sendbird, or another messaging provider.
4
+
5
+ The package handles authenticated API calls, typed inputs and responses, understandable errors, timeouts, limited retries, idempotency, negotiated restrictions, speech transforms, and signed webhook verification. It is ESM-only and requires Node.js 18 or newer.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @robono/server
11
+ ```
12
+
13
+ ## Connect two networks
14
+
15
+ ```ts
16
+ import { RobonoServer } from "@robono/server";
17
+
18
+ const robono = new RobonoServer({
19
+ apiKey: process.env.ROBONO_API_KEY!,
20
+ });
21
+
22
+ const directory = await robono.directory.list();
23
+ const connection = await robono.networkConnections.request({
24
+ target_app_slug: directory.directory[0].slug,
25
+ source_external_user_id: "local-child-123",
26
+ source_display_name: "Jordan",
27
+ target_identifier: "BLUE-STAR-456",
28
+ });
29
+ ```
30
+
31
+ The directory response describes the identifier each destination requires. Ask the user for that identifier using your app's own screens.
32
+
33
+ ## Send a message
34
+
35
+ Use a stable `external_message_id` for every local message. Robono and the SDK use it to prevent a retry from creating a duplicate.
36
+
37
+ ```ts
38
+ await robono.messages.send({
39
+ bridge_connection_id: connection.bridge_connection_id,
40
+ external_user_id: "local-child-123",
41
+ external_message_id: "your-message-789",
42
+ message_kind: "text",
43
+ text_body: "Are you free after school?",
44
+ });
45
+ ```
46
+
47
+ Text, voice, image, video, and document messages use the same method. Read `networkConnections.restrictions(connection, direction)` before enabling a control in your interface. Robono will also enforce the negotiated limits on the server.
48
+
49
+ ## Errors and retries
50
+
51
+ ```ts
52
+ import { RobonoError } from "@robono/server";
53
+
54
+ try {
55
+ await robono.messages.send(messageInput);
56
+ } catch (error) {
57
+ if (error instanceof RobonoError) {
58
+ console.error(error.code, error.message, error.requestId, error.retryable);
59
+ }
60
+ }
61
+ ```
62
+
63
+ The SDK retries only temporary failures and rate limits, with bounded backoff. An explicit `idempotencyKey` can be supplied in the request options when your own system already has one.
64
+
65
+ ## Verify incoming webhooks
66
+
67
+ Signature verification requires the exact raw request body, before JSON parsing.
68
+
69
+ ```ts
70
+ import { verifyRobonoWebhook } from "@robono/server";
71
+
72
+ const verified = await verifyRobonoWebhook(
73
+ rawBody,
74
+ request.headers,
75
+ process.env.ROBONO_WEBHOOK_SECRET!,
76
+ { hasProcessedEvent: eventId => events.has(eventId) },
77
+ );
78
+
79
+ if (!verified.duplicate) {
80
+ await existingMessagingSystem.handle(verified.event);
81
+ }
82
+ ```
83
+
84
+ Store `verified.eventId` after successful processing and return it from `hasProcessedEvent` on later attempts. Return a successful HTTP response only after the event is safely stored or processed.
85
+
86
+ ## Design
87
+
88
+ - Keep the Robono API key and webhook secret on the network's server.
89
+ - Continue using the network's existing accounts, friend list, conversation screens, storage, and push notifications.
90
+ - Use `directory.list()` to learn which identifier each destination network requires.
91
+ - Use `networkConnections.restrictions()` before showing or accepting message controls.
92
+ - Robono remains the cross-network relationship, policy, and delivery layer.
93
+
94
+ ## Safe Web and React Native adapter
95
+
96
+ Keep the Robono key on your server. The included adapter authenticates your own user and exposes the small endpoint set expected by `@robono/web` and `@robono/react-native`.
97
+
98
+ ```ts
99
+ const handleRobono = createRobonoBackendAdapter({
100
+ robono,
101
+ authenticate: request => yourAuth.requireUser(request).id,
102
+ });
103
+ ```
104
+
105
+ Mount `handleRobono` at `/robono/*`. The adapter replaces any user id supplied by the browser or phone with the identity returned by your authentication code.
106
+
107
+ The adapter is based on standard Web `Request` and `Response` objects, so it can be mounted in Express, Fastify, Next.js, serverless functions, or another Node-compatible framework with a small framework wrapper.
108
+
109
+ The child SDK uses separate `networkConnections` / `networkMessages` methods for network-to-network communication and `robonoConnections` / `robonoMessages` methods for Phone / Robono. This keeps the two workflows explicit while allowing the child app to present them in one friend picker.
110
+
111
+ ## Stateful sandbox test
112
+
113
+ Create isolated Network A and Network B credentials in the Robono developer portal, then run:
114
+
115
+ ```bash
116
+ ROBONO_SANDBOX_KEY_A=rbn_test_... \
117
+ ROBONO_SANDBOX_KEY_B=rbn_test_... \
118
+ ROBONO_SANDBOX_NETWORK_B_ID=... \
119
+ npm run test:sandbox
120
+ ```
121
+
122
+ The test creates and accepts a connection, sends and retrieves a message, records a read receipt, synchronizes state, and disconnects. Set Network B to “Push fails” in the portal to prove polling recovery; the final output then reports `accepted_via: "polling"`.
123
+
124
+ The complete API, Compatibility Inspector, webhook, sandbox, reliability, and limit documentation is at [robono.com/docs](https://robono.com/docs).
@@ -0,0 +1,10 @@
1
+ import type { RobonoServer } from "./client.js";
2
+ import type { JsonObject } from "./types.js";
3
+ export interface RobonoBackendAdapterOptions {
4
+ robono: RobonoServer;
5
+ authenticate: (request: Request) => string | Promise<string>;
6
+ authorizeSpeechTransform?: (request: Request, externalUserId: string, input: JsonObject) => boolean | Promise<boolean>;
7
+ maxRequestBytes?: number;
8
+ }
9
+ export declare function createRobonoBackendAdapter(options: RobonoBackendAdapterOptions): (request: Request) => Promise<Response>;
10
+ //# sourceMappingURL=adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,YAAY,CAAC;IACrB,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7D,wBAAwB,CAAC,EAAE,CACzB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,UAAU,KACd,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,2BAA2B,IAIP,SAAS,OAAO,KAAG,OAAO,CAAC,QAAQ,CAAC,CAsPlE"}
@@ -0,0 +1,222 @@
1
+ import { RobonoError } from "./errors.js";
2
+ export function createRobonoBackendAdapter(options) {
3
+ const maxRequestBytes = positiveInteger(options.maxRequestBytes, 1_000_000);
4
+ return async function handle(request) {
5
+ const requestId = request.headers.get("x-request-id") ??
6
+ `child_req_${crypto.randomUUID()}`;
7
+ try {
8
+ if (request.method !== "POST") {
9
+ return responseError(405, "method_not_allowed", "Only POST is supported.", requestId);
10
+ }
11
+ const externalUserId = (await options.authenticate(request))?.trim();
12
+ if (!externalUserId) {
13
+ return responseError(401, "user_authentication_required", "The child app user is not authenticated.", requestId);
14
+ }
15
+ const body = await readBody(request, maxRequestBytes);
16
+ const path = normalizedAdapterPath(new URL(request.url).pathname);
17
+ const requestOptions = { requestId };
18
+ if (path === "/networks") {
19
+ return responseJson(await options.robono.directory.list({}, requestOptions));
20
+ }
21
+ if (path === "/network-connections") {
22
+ return responseJson(await options.robono.networkConnections.request({
23
+ ...body,
24
+ source_external_user_id: externalUserId,
25
+ source_display_name: requiredString(body.source_display_name, "source_display_name"),
26
+ target_identifier: requiredString(body.target_identifier, "target_identifier"),
27
+ }, requestOptions));
28
+ }
29
+ if (path === "/network-connections/respond") {
30
+ return responseJson(await options.robono.networkConnections.respond({
31
+ ...body,
32
+ bridge_connection_id: requiredString(body.bridge_connection_id, "bridge_connection_id"),
33
+ status: requiredConnectionResponseStatus(body.status),
34
+ target_external_user_id: externalUserId,
35
+ }, requestOptions));
36
+ }
37
+ if (path === "/network-connections/list") {
38
+ const status = optionalString(body.status);
39
+ const limit = optionalNumber(body.limit);
40
+ const before = optionalString(body.before);
41
+ return responseJson(await options.robono.networkConnections.list({
42
+ external_user_id: externalUserId,
43
+ ...(status ? { status } : {}),
44
+ ...(limit ? { limit } : {}),
45
+ ...(before ? { before } : {}),
46
+ }, requestOptions));
47
+ }
48
+ if (path === "/network-connections/disconnect") {
49
+ const reason = optionalString(body.reason);
50
+ return responseJson(await options.robono.networkConnections.disconnect({
51
+ bridge_connection_id: requiredString(body.bridge_connection_id, "bridge_connection_id"),
52
+ external_user_id: externalUserId,
53
+ ...(reason ? { reason } : {}),
54
+ }, requestOptions));
55
+ }
56
+ if (path === "/network-connections/update") {
57
+ return responseJson(await options.robono.networkConnections.update({
58
+ ...body,
59
+ bridge_connection_id: requiredString(body.bridge_connection_id, "bridge_connection_id"),
60
+ external_user_id: externalUserId,
61
+ }, requestOptions));
62
+ }
63
+ if (path === "/connections") {
64
+ return responseJson(await options.robono.connections.create({
65
+ ...body,
66
+ target_phone_e164: requiredString(body.target_phone_e164, "target_phone_e164"),
67
+ external_user_id: externalUserId,
68
+ external_display_name: requiredString(body.external_display_name, "external_display_name"),
69
+ }, requestOptions));
70
+ }
71
+ if (path === "/connections/profile") {
72
+ return responseJson(await options.robono.connections.updateProfile({
73
+ ...body,
74
+ connection_id: requiredString(body.connection_id, "connection_id"),
75
+ external_user_id: externalUserId,
76
+ }, requestOptions));
77
+ }
78
+ if (path === "/connections/disconnect") {
79
+ const reason = optionalString(body.reason);
80
+ return responseJson(await options.robono.connections.disconnect({
81
+ connection_id: requiredString(body.connection_id, "connection_id"),
82
+ external_user_id: externalUserId,
83
+ ...(reason ? { reason } : {}),
84
+ }, requestOptions));
85
+ }
86
+ if (path === "/network-messages") {
87
+ return responseJson(await options.robono.messages.send({
88
+ ...body,
89
+ bridge_connection_id: requiredString(body.bridge_connection_id, "bridge_connection_id"),
90
+ external_user_id: externalUserId,
91
+ external_message_id: requiredString(body.external_message_id, "external_message_id"),
92
+ }, requestOptions));
93
+ }
94
+ if (path === "/network-messages/list") {
95
+ const limit = optionalNumber(body.limit);
96
+ const before = optionalString(body.before);
97
+ return responseJson(await options.robono.messages.list({
98
+ bridge_connection_id: requiredString(body.bridge_connection_id, "bridge_connection_id"),
99
+ external_user_id: externalUserId,
100
+ ...(limit ? { limit } : {}),
101
+ ...(before ? { before } : {}),
102
+ }, requestOptions));
103
+ }
104
+ if (path === "/network-messages/events") {
105
+ const bridgeConnectionId = requiredString(body.bridge_connection_id, "bridge_connection_id");
106
+ const occurredAt = optionalString(body.occurred_at);
107
+ await assertConnectionBelongsToUser(options.robono, bridgeConnectionId, externalUserId, requestId);
108
+ return responseJson(await options.robono.messages.mark({
109
+ bridge_connection_id: bridgeConnectionId,
110
+ bridge_message_id: requiredString(body.bridge_message_id, "bridge_message_id"),
111
+ event: requiredEvent(body.event),
112
+ ...(occurredAt ? { occurred_at: occurredAt } : {}),
113
+ }, requestOptions));
114
+ }
115
+ if (path === "/messages") {
116
+ return responseJson(await options.robono.messages.sendToRobono({
117
+ ...body,
118
+ connection_id: requiredString(body.connection_id, "connection_id"),
119
+ external_user_id: externalUserId,
120
+ external_message_id: requiredString(body.external_message_id, "external_message_id"),
121
+ }, requestOptions));
122
+ }
123
+ if (path === "/transforms/speech") {
124
+ const allowed = await options.authorizeSpeechTransform?.(request, externalUserId, body) ?? true;
125
+ if (!allowed) {
126
+ return responseError(403, "speech_transform_not_allowed", "Speech transforms are not allowed for this child app user.", requestId);
127
+ }
128
+ return responseJson(await options.robono.transforms.speech(body, requestOptions));
129
+ }
130
+ return responseError(404, "adapter_route_not_found", "Robono adapter route was not found.", requestId);
131
+ }
132
+ catch (error) {
133
+ if (error instanceof RobonoError) {
134
+ return responseJson({
135
+ error: { code: error.code, message: error.message },
136
+ request_id: error.requestId ?? requestId,
137
+ ...(error.fields ? { fields: error.fields } : {}),
138
+ }, error.status ?? 400);
139
+ }
140
+ return responseError(400, "adapter_request_failed", error instanceof Error
141
+ ? error.message
142
+ : "Robono adapter request failed.", requestId);
143
+ }
144
+ };
145
+ }
146
+ async function assertConnectionBelongsToUser(robono, connectionId, externalUserId, requestId) {
147
+ const result = await robono.networkConnections.list({
148
+ external_user_id: externalUserId,
149
+ limit: 100,
150
+ }, { requestId });
151
+ if (!result.connections.some((item) => item.bridge_connection_id === connectionId)) {
152
+ throw new RobonoError("Connection was not found for this child app user.", {
153
+ code: "connection_not_found",
154
+ status: 404,
155
+ requestId,
156
+ });
157
+ }
158
+ }
159
+ async function readBody(request, maxRequestBytes) {
160
+ const length = Number(request.headers.get("content-length") ?? "0");
161
+ if (Number.isFinite(length) && length > maxRequestBytes) {
162
+ throw new Error("Request body is too large.");
163
+ }
164
+ const text = await request.text();
165
+ if (new TextEncoder().encode(text).byteLength > maxRequestBytes) {
166
+ throw new Error("Request body is too large.");
167
+ }
168
+ if (!text.trim())
169
+ return {};
170
+ const parsed = JSON.parse(text);
171
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
172
+ throw new Error("Request body must be a JSON object.");
173
+ }
174
+ return parsed;
175
+ }
176
+ function normalizedAdapterPath(pathname) {
177
+ const marker = "/robono";
178
+ const index = pathname.lastIndexOf(marker);
179
+ const path = index >= 0 ? pathname.slice(index + marker.length) : pathname;
180
+ return `/${path}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/";
181
+ }
182
+ function requiredString(value, field) {
183
+ const normalized = optionalString(value);
184
+ if (!normalized)
185
+ throw new Error(`${field} is required.`);
186
+ return normalized;
187
+ }
188
+ function optionalString(value) {
189
+ return typeof value === "string" && value.trim() ? value.trim() : undefined;
190
+ }
191
+ function optionalNumber(value) {
192
+ return typeof value === "number" && Number.isFinite(value)
193
+ ? value
194
+ : undefined;
195
+ }
196
+ function requiredEvent(value) {
197
+ if (value === "delivered" || value === "read" || value === "heard") {
198
+ return value;
199
+ }
200
+ throw new Error("event must be delivered, read, or heard.");
201
+ }
202
+ function requiredConnectionResponseStatus(value) {
203
+ if (value === "accepted" || value === "rejected" || value === "not_found") {
204
+ return value;
205
+ }
206
+ throw new Error("status must be accepted, rejected, or not_found.");
207
+ }
208
+ function positiveInteger(value, fallback) {
209
+ return typeof value === "number" && Number.isFinite(value) && value > 0
210
+ ? Math.floor(value)
211
+ : fallback;
212
+ }
213
+ function responseJson(payload, status = 200) {
214
+ return new Response(JSON.stringify(payload), {
215
+ status,
216
+ headers: { "content-type": "application/json" },
217
+ });
218
+ }
219
+ function responseError(status, code, message, requestId) {
220
+ return responseJson({ error: { code, message }, request_id: requestId }, status);
221
+ }
222
+ //# sourceMappingURL=adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAe1C,MAAM,UAAU,0BAA0B,CACxC,OAAoC;IAEpC,MAAM,eAAe,GAAG,eAAe,CAAC,OAAO,CAAC,eAAe,EAAE,SAAS,CA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ACnE,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;AAC9D,CAAC;AAED,SAAS,gCAAgC,CAAC,KAAc;IACtD,IAAI,KAAK,KAAK,UAAU,IAAI,KAAK,KAAK,UAAU,IAAI,KAAK,KAAK,WAAW,EAAE,CAAC;QAC1E,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;AACtE,CAAC;AAED,SAAS,eAAe,CAAC,KAAyB,EAAE,QAAgB;IAClE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC;QACrE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;QACnB,CAAC,CAAC,QAAQ,CAAC;AACf,CAAC;AAED,SAAS,YAAY,CAAC,OAAgB,EAAE,MAAM,GAAG,GAAG;IAClD,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE;QAC3C,MAAM;QACN,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;KAChD,CAAC,CAAC;AACL,CAAC;AAED,SAAS,aAAa,CACpB,MAAc,EACd,IAAY,EACZ,OAAe,EACf,SAAiB;IAEjB,OAAO,YAAY,CACjB,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,EACnD,MAAM,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,100 @@
1
+ import { type BridgeDirection, restrictionsFor } from "./restrictions.js";
2
+ import type { BridgeConnection, BridgeConnectionListResponse, BridgeConnectionResponse, BridgeMessageEventResponse, BridgeMessageListResponse, CreateRobonoConnectionInput, DirectoryResponse, GuardianMessageListResponse, JsonObject, LanguageResponse, RequestBridgeConnectionInput, RespondBridgeConnectionInput, RobonoConnectionResponse, RobonoRequestOptions, RobonoServerOptions, SendBridgeMessageInput, SendBridgeMessageResponse, SendGuardianMessageInput, SendGuardianMessageResponse, SendRobonoMessageInput, SendRobonoMessageResponse, TransformOutput, TransformResponse, UpdateBridgeConnectionInput } from "./types.js";
3
+ export declare class RobonoServer {
4
+ readonly directory: {
5
+ list: (input?: {
6
+ includePhoneRobono?: boolean;
7
+ includeSelf?: boolean;
8
+ }, options?: RobonoRequestOptions) => Promise<DirectoryResponse>;
9
+ };
10
+ readonly connections: {
11
+ create: (input: CreateRobonoConnectionInput, options?: RobonoRequestOptions) => Promise<RobonoConnectionResponse>;
12
+ updateProfile: (input: JsonObject, options?: RobonoRequestOptions) => Promise<RobonoConnectionResponse>;
13
+ disconnect: (input: {
14
+ connection_id: string;
15
+ external_user_id: string;
16
+ reason?: string;
17
+ disconnected_at?: string;
18
+ }, options?: RobonoRequestOptions) => Promise<JsonObject>;
19
+ };
20
+ readonly networkConnections: {
21
+ request: (input: RequestBridgeConnectionInput, options?: RobonoRequestOptions) => Promise<BridgeConnectionResponse>;
22
+ update: (input: UpdateBridgeConnectionInput, options?: RobonoRequestOptions) => Promise<BridgeConnectionResponse>;
23
+ respond: (input: RespondBridgeConnectionInput, options?: RobonoRequestOptions) => Promise<BridgeConnectionResponse>;
24
+ list: (input?: {
25
+ external_user_id?: string;
26
+ status?: string;
27
+ limit?: number;
28
+ before?: string;
29
+ }, options?: RobonoRequestOptions) => Promise<BridgeConnectionListResponse>;
30
+ disconnect: (input: {
31
+ bridge_connection_id: string;
32
+ external_user_id: string;
33
+ reason?: string;
34
+ disconnected_at?: string;
35
+ }, options?: RobonoRequestOptions) => Promise<BridgeConnectionResponse>;
36
+ restrictions: (connection: Pick<BridgeConnection, "capabilities">, direction: BridgeDirection) => ReturnType<typeof restrictionsFor>;
37
+ };
38
+ readonly messages: {
39
+ sendToRobono: (input: SendRobonoMessageInput, options?: RobonoRequestOptions) => Promise<SendRobonoMessageResponse>;
40
+ send: (input: SendBridgeMessageInput, options?: RobonoRequestOptions & {
41
+ connection?: BridgeConnection;
42
+ direction?: BridgeDirection;
43
+ }) => Promise<SendBridgeMessageResponse>;
44
+ sendGuardian: (input: SendGuardianMessageInput, options?: RobonoRequestOptions) => Promise<SendGuardianMessageResponse>;
45
+ listGuardian: (input: {
46
+ bridge_connection_id: string;
47
+ limit?: number;
48
+ before?: string;
49
+ }, options?: RobonoRequestOptions) => Promise<GuardianMessageListResponse>;
50
+ markGuardian: (input: {
51
+ bridge_connection_id: string;
52
+ guardian_message_id: string;
53
+ event: "delivered" | "read";
54
+ occurred_at?: string;
55
+ }, options?: RobonoRequestOptions) => Promise<JsonObject>;
56
+ list: (input: {
57
+ bridge_connection_id: string;
58
+ external_user_id?: string;
59
+ limit?: number;
60
+ before?: string;
61
+ }, options?: RobonoRequestOptions) => Promise<BridgeMessageListResponse>;
62
+ mark: (input: {
63
+ bridge_connection_id: string;
64
+ bridge_message_id: string;
65
+ event: "delivered" | "read" | "heard";
66
+ occurred_at?: string;
67
+ }, options?: RobonoRequestOptions) => Promise<BridgeMessageEventResponse>;
68
+ markHeard: (input: {
69
+ connection_id: string;
70
+ robono_message_id: string;
71
+ heard_by: JsonObject;
72
+ heard_at?: string;
73
+ dry_run?: boolean;
74
+ }, options?: RobonoRequestOptions) => Promise<JsonObject>;
75
+ };
76
+ readonly transforms: {
77
+ message: (input: {
78
+ connection_id: string;
79
+ message_id: string;
80
+ outputs: TransformOutput[];
81
+ }, options?: RobonoRequestOptions) => Promise<TransformResponse>;
82
+ speech: (input: JsonObject, options?: RobonoRequestOptions) => Promise<TransformResponse>;
83
+ };
84
+ private readonly apiKey;
85
+ private readonly baseUrl;
86
+ private readonly defaultTimeoutMs;
87
+ private readonly defaultRetries;
88
+ private readonly fetcher;
89
+ private readonly userAgent;
90
+ private readonly apiVersion;
91
+ constructor(options: RobonoServerOptions);
92
+ languages(options?: RobonoRequestOptions): Promise<LanguageResponse>;
93
+ health(options?: Omit<RobonoRequestOptions, "idempotencyKey">): Promise<{
94
+ ok: true;
95
+ service: string;
96
+ }>;
97
+ private request;
98
+ private requestAbsolute;
99
+ }
100
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,gBAAgB,EAChB,4BAA4B,EAC5B,wBAAwB,EACxB,0BAA0B,EAC1B,yBAAyB,EAEzB,2BAA2B,EAC3B,iBAAiB,EACjB,2BAA2B,EAC3B,UAAU,EACV,gBAAgB,EAChB,4BAA4B,EAC5B,4BAA4B,EAC5B,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,2BAA2B,EAC3B,sBAAsB,EACtB,yBAAyB,EACzB,eAAe,EACf,iBAAiB,EACjB,2BAA2B,EAC5B,MAAM,YAAY,CAAC;AAMpB,qBAAa,YAAY;IACvB,QAAQ,CAAC,SAAS,EAAE;QAClB,IAAI,EAAE,CACJ,KAAK,CAAC,EAAE;YAAE,kBAAkB,CAAC,EAAE,OAAO,CAAC;YAAC,WAAW,CAAC,EAAE,OAAO,CAAA;SAAE,EAC/D,OAAO,CAAC,EAAE,oBAAoB,KAC3B,OAAO,CAAC,iBAAiB,CAAC,CAAC;KACjC,CAAC;IACF,QAAQ,CAAC,WAAW,EAAE;QACpB,MAAM,EAAE,CACN,KAAK,EAAE,2BAA2B,EAClC,OAAO,CAAC,EAAE,oBAAoB,KAC3B,OAAO,CAAC,wBAAwB,CAAC,CAAC;QACvC,aAAa,EAAE,CACb,KAAK,EAAE,UAAU,EACjB,OAAO,CAAC,EAAE,oBAAoB,KAC3B,OAAO,CAAC,wBAAwB,CAAC,CAAC;QACvC,UAAU,EAAE,CACV,KAAK,EAAE;YACL,aAAa,EAAE,MAAM,CAAC;YACtB,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