@relaymessenger/sdk 0.2.0 → 0.3.0-staging.1
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 +21 -0
- package/LICENSES/Apache-2.0.txt +201 -0
- package/NOTICE +6 -0
- package/README.md +189 -17
- package/dist/client.d.ts +135 -57
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +520 -144
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +26 -19
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +28 -37
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -8
- package/dist/index.js.map +1 -1
- package/dist/operations.d.ts +144 -0
- package/dist/operations.d.ts.map +1 -0
- package/dist/operations.js +190 -0
- package/dist/operations.js.map +1 -0
- package/dist/pagination.d.ts +24 -0
- package/dist/pagination.d.ts.map +1 -0
- package/dist/pagination.js +48 -0
- package/dist/pagination.js.map +1 -0
- package/dist/types.d.ts +436 -74
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +0 -1
- package/dist/types.js.map +1 -1
- package/dist/webhooks.d.ts +19 -0
- package/dist/webhooks.d.ts.map +1 -0
- package/dist/webhooks.js +36 -0
- package/dist/webhooks.js.map +1 -0
- package/dist/websocket.d.ts +38 -0
- package/dist/websocket.d.ts.map +1 -0
- package/dist/websocket.js +547 -0
- package/dist/websocket.js.map +1 -0
- package/package.json +22 -15
- package/dist/file-cursor.d.ts +0 -10
- package/dist/file-cursor.js +0 -53
- package/dist/file-cursor.js.map +0 -1
- package/dist/idempotency.d.ts +0 -8
- package/dist/idempotency.js +0 -35
- package/dist/idempotency.js.map +0 -1
- package/dist/memory-dedupe.d.ts +0 -13
- package/dist/memory-dedupe.js +0 -25
- package/dist/memory-dedupe.js.map +0 -1
- package/dist/poll-loop.d.ts +0 -43
- package/dist/poll-loop.js +0 -164
- package/dist/poll-loop.js.map +0 -1
- package/dist/signature.d.ts +0 -18
- package/dist/signature.js +0 -61
- package/dist/signature.js.map +0 -1
- package/dist/url.d.ts +0 -6
- package/dist/url.js +0 -40
- package/dist/url.js.map +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Companion Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Linq API V3
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
@relaymessenger/sdk preserves selected resource organization and method names from
|
|
2
|
+
@linqapp/sdk 0.49.1, developed by Linq and distributed under the Apache License
|
|
3
|
+
2.0. The Apache license text is included in LICENSES/Apache-2.0.txt.
|
|
4
|
+
|
|
5
|
+
Relay's implementation, API host, v1 paths, types, and supported product
|
|
6
|
+
surface are independent. Linq does not sponsor or endorse this package.
|
package/README.md
CHANGED
|
@@ -1,28 +1,200 @@
|
|
|
1
1
|
# `@relaymessenger/sdk`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
TypeScript client for Relay v1.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
```ts
|
|
6
|
+
import Relay from "@relaymessenger/sdk";
|
|
7
|
+
|
|
8
|
+
const relay = new Relay({ apiKey: process.env.RELAY_AGENT_TOKEN! });
|
|
9
|
+
|
|
10
|
+
const chats = await relay.chats.listChats();
|
|
11
|
+
console.log(chats.chats);
|
|
12
|
+
console.log(chats.hasNextPage());
|
|
13
|
+
for await (const chat of chats) {
|
|
14
|
+
console.log(chat.id);
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Chat pages expose `.chats`, message pages expose `.messages`, and both expose `.hasNextPage()` and
|
|
19
|
+
`.getNextPage()`. `.data` remains an alias for generic consumers.
|
|
20
|
+
|
|
21
|
+
## Send
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
await relay.chats.messages.send(chatId, {
|
|
25
|
+
message: {
|
|
26
|
+
parts: [{ type: "text", value: "Hello" }],
|
|
27
|
+
idempotency_key: crypto.randomUUID(),
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Share your Contact Card
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
await relay.chats.shareContactCard(chatId);
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
This shares the authenticated agent's configured Contact Card in an existing
|
|
39
|
+
Chat.
|
|
40
|
+
|
|
41
|
+
## Request a Contact
|
|
42
|
+
|
|
43
|
+
An agent with a Premium Handle can send an Add request to a user who has not
|
|
44
|
+
added it:
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
const request = await relay.contactRequests.create({
|
|
48
|
+
handle: "advait",
|
|
49
|
+
"Idempotency-Key": crypto.randomUUID(),
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
console.log(request.state); // "pending"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
An agent without a Premium Handle receives `RelayAPIError` with
|
|
56
|
+
`status === 402`. Sending Messages to users who already added the agent
|
|
57
|
+
remains ordinary messaging.
|
|
58
|
+
|
|
59
|
+
Available resource methods:
|
|
60
|
+
|
|
61
|
+
- `chats.create`, `retrieve`, `update`, `listChats`, `leaveChat`, `markAsRead`,
|
|
62
|
+
`shareContactCard`, `startTyping`, `stopTyping`
|
|
63
|
+
- `chats.messages.list`, `chats.messages.send`
|
|
64
|
+
- `chats.participants.add`, `chats.participants.remove`
|
|
65
|
+
- `chats.sendVoicememo`
|
|
66
|
+
- `messages.create`, `retrieve`, `addReaction`, `listMessagesThread`
|
|
67
|
+
- `attachments.create`, `retrieve`, `delete`
|
|
68
|
+
- `webhookEvents.list`
|
|
69
|
+
- `webhookSubscriptions.create`, `retrieve`, `update`, `list`, `delete`
|
|
70
|
+
- `contactCard.create`, `retrieve`, `update`
|
|
71
|
+
- `contactRequests.create`
|
|
72
|
+
- `blockedHandles.list`, `block`, `unblock`
|
|
73
|
+
- `websocket.run`
|
|
74
|
+
|
|
75
|
+
Every retrieved `Message` may include `deliveries`, one entry per recipient:
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
for (const delivery of message.deliveries ?? []) {
|
|
79
|
+
console.log(
|
|
80
|
+
delivery.contact.handle,
|
|
81
|
+
delivery.delivered_at,
|
|
82
|
+
delivery.read_at,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Relay records this per-recipient truth for direct and group Chats.
|
|
88
|
+
|
|
89
|
+
## Typing
|
|
9
90
|
|
|
10
91
|
```ts
|
|
11
|
-
|
|
92
|
+
await relay.chats.startTyping(chatId);
|
|
93
|
+
await relay.chats.stopTyping(chatId);
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Calling `startTyping` again refreshes the indicator.
|
|
97
|
+
|
|
98
|
+
## Raw attachment upload
|
|
99
|
+
|
|
100
|
+
```ts
|
|
101
|
+
const allocation = await relay.attachments.create({
|
|
102
|
+
filename: "photo.png",
|
|
103
|
+
content_type: "image/png",
|
|
104
|
+
size_bytes: bytes.byteLength,
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
await relay.attachments.upload(allocation, bytes);
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
The upload helper sends the bytes as a raw `PUT` body with the exact returned
|
|
111
|
+
headers.
|
|
112
|
+
|
|
113
|
+
## Webhooks
|
|
114
|
+
|
|
115
|
+
```ts
|
|
116
|
+
const relay = new Relay({
|
|
117
|
+
apiKey: process.env.RELAY_AGENT_TOKEN!,
|
|
118
|
+
webhookSecret: process.env.RELAY_WEBHOOK_SECRET!,
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
const event = relay.webhooks.unwrap(rawBody, {
|
|
122
|
+
headers: {
|
|
123
|
+
"webhook-id": request.headers.get("webhook-id")!,
|
|
124
|
+
"webhook-timestamp": request.headers.get("webhook-timestamp")!,
|
|
125
|
+
"webhook-signature": request.headers.get("webhook-signature")!,
|
|
126
|
+
},
|
|
127
|
+
});
|
|
12
128
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
129
|
+
if (event.event_type === "contact.added") {
|
|
130
|
+
console.log(event.data.contact.handle, event.data.chat_id);
|
|
131
|
+
}
|
|
16
132
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
133
|
+
if (event.event_type === "contact.removed") {
|
|
134
|
+
console.log(event.data.contact.handle);
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Verification follows Standard Webhooks and must use the unmodified raw body.
|
|
139
|
+
Commit the complete event to a durable inbox, then return `2xx` before running
|
|
140
|
+
the handler or model. Relay uses that response as the agent's Delivered ACK.
|
|
141
|
+
|
|
142
|
+
## WebSocket
|
|
143
|
+
|
|
144
|
+
```ts
|
|
145
|
+
await relay.websocket.run({
|
|
146
|
+
onEvent: async (event, { sequence }) => {
|
|
147
|
+
// This promise must resolve only after a durable inbox commit.
|
|
148
|
+
await inbox.insertOnce(event.event_id, event);
|
|
149
|
+
console.log("accepted", sequence);
|
|
150
|
+
},
|
|
151
|
+
onFullSync: async ({ throughSequence, reason }) => {
|
|
152
|
+
// Fetch the complete REST state and atomically replace the local snapshot.
|
|
153
|
+
const snapshot = await loadCompleteRelayState(relay);
|
|
154
|
+
await inbox.replaceWithSnapshot(snapshot, { throughSequence, reason });
|
|
24
155
|
},
|
|
25
156
|
});
|
|
26
157
|
```
|
|
27
158
|
|
|
28
|
-
|
|
159
|
+
With one or more saved Webhook subscriptions, Relay delivers through those
|
|
160
|
+
Webhooks. With an empty subscription list, connect by WebSocket. A WebSocket
|
|
161
|
+
upgrade with saved subscriptions returns HTTP `409` as
|
|
162
|
+
`RelayWebhookConfiguredError`.
|
|
163
|
+
|
|
164
|
+
Creating the first Webhook subscription while sockets are connected closes
|
|
165
|
+
those sockets and moves undelivered events to Webhook delivery. Deleting the
|
|
166
|
+
last subscription makes the WebSocket path available again. Relay retains
|
|
167
|
+
undelivered events across either change.
|
|
168
|
+
|
|
169
|
+
The SDK derives `wss://<Relay host>/v1/websocket` from `baseURL` and sends the
|
|
170
|
+
Agent Token in the WebSocket upgrade `Authorization` header.
|
|
171
|
+
|
|
172
|
+
The SDK validates the ready checkpoint, rejects sequence gaps, and routes
|
|
173
|
+
replayed sequences through your durable deduplication handler. It sends a
|
|
174
|
+
cumulative ACK after `onEvent` resolves:
|
|
175
|
+
|
|
176
|
+
```json
|
|
177
|
+
{ "type": "ack", "through_sequence": "42" }
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Unacknowledged events replay after reconnect, so the inbox deduplicates by
|
|
181
|
+
`event_id`. Resolve `onEvent` after durable acceptance, then run model work and
|
|
182
|
+
send replies through the idempotent REST Message API.
|
|
183
|
+
|
|
184
|
+
The WebSocket and each signed Webhook carry the same
|
|
185
|
+
`RelayWebhookEnvelope`, so one durable event handler can serve either path.
|
|
186
|
+
Webhook retries remain at-least-once and can repeat an `event_id`.
|
|
187
|
+
|
|
188
|
+
If Relay reports that the stored checkpoint is older than retained event
|
|
189
|
+
history, it sends a `full_sync` frame. `onFullSync` must fetch and durably apply
|
|
190
|
+
a complete REST snapshot. The SDK sends `full_sync_complete` after that promise
|
|
191
|
+
resolves, then resumes event ACKs.
|
|
192
|
+
|
|
193
|
+
Relay sends a JSON ping every 30 seconds. The SDK answers with a JSON pong and
|
|
194
|
+
also uses the Node WebSocket heartbeat to detect a dead connection.
|
|
195
|
+
|
|
196
|
+
The runner uses capped, jittered exponential reconnect after
|
|
197
|
+
`heartbeat_timeout`, `restart`, close codes `1011`, `1012`, or `4408`, send
|
|
198
|
+
failures, and retryable `ack_failed` or `delivery_failed` errors. Revoked
|
|
199
|
+
credentials, HTTP `409`, terminal server-policy closes, and protocol violations
|
|
200
|
+
stop the runner so the operator can correct the configuration.
|
package/dist/client.d.ts
CHANGED
|
@@ -1,57 +1,135 @@
|
|
|
1
|
-
import
|
|
2
|
-
type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
1
|
+
import { ChatsPage, MessagesPage } from "./pagination.js";
|
|
2
|
+
import type { AcceptedResponse, Attachment, AttachmentCreateParams, AttachmentCreateResponse, BlockedHandleListResponse, BlockHandleParams, BlockHandleResponse, Chat, ChatCreateParams, ChatCreateResponse, ChatListChatsParams, ChatSendVoicememoParams, ChatSendVoicememoResponse, ChatUpdateParams, ChatUpdateResponse, ContactCardItem, ContactCardCreateParams, ContactCardRetrieveParams, ContactCardRetrieveResponse, ContactCardUpdateParams, ContactRequestCreateParams, ContactRequestCreateResponse, Message, MessageAddReactionParams, MessageAddReactionResponse, MessageCreateParams, MessageCreateResponse, MessageListParams, MessageSendParams, MessageSendResponse, MessageThreadParams, ParticipantAddParams, ParticipantRemoveParams, RequestOptions, UnblockHandleParams, WebhookEventListResponse, WebhookSubscription, WebhookSubscriptionCreateParams, WebhookSubscriptionCreateResponse, WebhookSubscriptionListResponse, WebhookSubscriptionUpdateParams } from "./types.js";
|
|
3
|
+
import { Webhooks } from "./webhooks.js";
|
|
4
|
+
import { type WebSocketRunOptions } from "./websocket.js";
|
|
5
|
+
type FetchLike = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
6
|
+
export interface RelayOptions {
|
|
7
|
+
apiKey: string;
|
|
8
|
+
baseURL?: string;
|
|
9
|
+
webhookSecret?: string | null;
|
|
10
|
+
maxRetries?: number;
|
|
11
|
+
timeout?: number;
|
|
12
|
+
retryBaseDelayMs?: number;
|
|
13
|
+
fetch?: FetchLike;
|
|
14
|
+
}
|
|
15
|
+
interface InternalRequest {
|
|
16
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
17
|
+
path: string;
|
|
18
|
+
query?: object;
|
|
19
|
+
body?: unknown;
|
|
20
|
+
options?: RequestOptions | undefined;
|
|
21
|
+
idempotencyKey?: string;
|
|
22
|
+
retryable?: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare class Transport {
|
|
25
|
+
#private;
|
|
26
|
+
readonly baseURL: string;
|
|
27
|
+
constructor(options: RelayOptions);
|
|
28
|
+
request<T>(request: InternalRequest): Promise<T>;
|
|
29
|
+
upload(allocation: AttachmentCreateResponse, data: BodyInit, options?: RequestOptions): Promise<void>;
|
|
30
|
+
runWebSocket(options: WebSocketRunOptions): Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
declare class ChatMessages {
|
|
33
|
+
private readonly transport;
|
|
34
|
+
constructor(transport: Transport);
|
|
35
|
+
list(chatID: string, query?: MessageListParams, options?: RequestOptions): Promise<MessagesPage<Message>>;
|
|
36
|
+
send(chatID: string, body: MessageSendParams, options?: RequestOptions): Promise<MessageSendResponse>;
|
|
37
|
+
}
|
|
38
|
+
declare class ChatParticipants {
|
|
39
|
+
private readonly transport;
|
|
40
|
+
constructor(transport: Transport);
|
|
41
|
+
add(chatID: string, body: ParticipantAddParams, options?: RequestOptions): Promise<AcceptedResponse>;
|
|
42
|
+
remove(chatID: string, body: ParticipantRemoveParams, options?: RequestOptions): Promise<AcceptedResponse>;
|
|
43
|
+
}
|
|
44
|
+
export declare class Chats {
|
|
45
|
+
private readonly transport;
|
|
46
|
+
readonly messages: ChatMessages;
|
|
47
|
+
readonly participants: ChatParticipants;
|
|
48
|
+
constructor(transport: Transport);
|
|
49
|
+
create(body: ChatCreateParams, options?: RequestOptions): Promise<ChatCreateResponse>;
|
|
50
|
+
retrieve(chatID: string, options?: RequestOptions): Promise<Chat>;
|
|
51
|
+
update(chatID: string, body: ChatUpdateParams, options?: RequestOptions): Promise<ChatUpdateResponse>;
|
|
52
|
+
listChats(query?: ChatListChatsParams, options?: RequestOptions): Promise<ChatsPage<Chat>>;
|
|
53
|
+
leaveChat(chatID: string, options?: RequestOptions): Promise<AcceptedResponse>;
|
|
54
|
+
startTyping(chatID: string, options?: RequestOptions): Promise<void>;
|
|
55
|
+
stopTyping(chatID: string, options?: RequestOptions): Promise<void>;
|
|
56
|
+
markAsRead(chatID: string, options?: RequestOptions): Promise<void>;
|
|
57
|
+
shareContactCard(chatID: string, options?: RequestOptions): Promise<void>;
|
|
58
|
+
sendVoicememo(chatID: string, body: ChatSendVoicememoParams, options?: RequestOptions): Promise<ChatSendVoicememoResponse>;
|
|
59
|
+
}
|
|
60
|
+
export declare class Messages {
|
|
61
|
+
private readonly transport;
|
|
62
|
+
constructor(transport: Transport);
|
|
63
|
+
create(params: MessageCreateParams, options?: RequestOptions): Promise<MessageCreateResponse>;
|
|
64
|
+
retrieve(messageID: string, options?: RequestOptions): Promise<Message>;
|
|
65
|
+
addReaction(messageID: string, body: MessageAddReactionParams, options?: RequestOptions): Promise<MessageAddReactionResponse>;
|
|
66
|
+
listMessagesThread(messageID: string, query?: MessageThreadParams, options?: RequestOptions): Promise<MessagesPage<Message>>;
|
|
67
|
+
}
|
|
68
|
+
export declare class Attachments {
|
|
69
|
+
private readonly transport;
|
|
70
|
+
constructor(transport: Transport);
|
|
71
|
+
create(body: AttachmentCreateParams, options?: RequestOptions): Promise<AttachmentCreateResponse>;
|
|
72
|
+
retrieve(attachmentID: string, options?: RequestOptions): Promise<Attachment>;
|
|
73
|
+
delete(attachmentID: string, options?: RequestOptions): Promise<void>;
|
|
74
|
+
upload(allocation: AttachmentCreateResponse, data: BodyInit, options?: RequestOptions): Promise<void>;
|
|
75
|
+
}
|
|
76
|
+
export declare class WebhookEvents {
|
|
77
|
+
private readonly transport;
|
|
78
|
+
constructor(transport: Transport);
|
|
79
|
+
list(options?: RequestOptions): Promise<WebhookEventListResponse>;
|
|
80
|
+
}
|
|
81
|
+
export declare class WebhookSubscriptions {
|
|
82
|
+
private readonly transport;
|
|
83
|
+
constructor(transport: Transport);
|
|
84
|
+
create(body: WebhookSubscriptionCreateParams, options?: RequestOptions): Promise<WebhookSubscriptionCreateResponse>;
|
|
85
|
+
retrieve(subscriptionID: string, options?: RequestOptions): Promise<WebhookSubscription>;
|
|
86
|
+
update(subscriptionID: string, body: WebhookSubscriptionUpdateParams, options?: RequestOptions): Promise<WebhookSubscription>;
|
|
87
|
+
list(options?: RequestOptions): Promise<WebhookSubscriptionListResponse>;
|
|
88
|
+
delete(subscriptionID: string, options?: RequestOptions): Promise<void>;
|
|
89
|
+
}
|
|
90
|
+
export declare class ContactCard {
|
|
91
|
+
private readonly transport;
|
|
92
|
+
constructor(transport: Transport);
|
|
93
|
+
create(body: ContactCardCreateParams, options?: RequestOptions): Promise<ContactCardItem>;
|
|
94
|
+
retrieve(query?: ContactCardRetrieveParams, options?: RequestOptions): Promise<ContactCardRetrieveResponse>;
|
|
95
|
+
update(params: ContactCardUpdateParams, options?: RequestOptions): Promise<ContactCardItem>;
|
|
96
|
+
}
|
|
97
|
+
export declare class ContactRequests {
|
|
98
|
+
private readonly transport;
|
|
99
|
+
constructor(transport: Transport);
|
|
100
|
+
create(params: ContactRequestCreateParams, options?: RequestOptions): Promise<ContactRequestCreateResponse>;
|
|
101
|
+
}
|
|
102
|
+
export declare class BlockedHandles {
|
|
103
|
+
private readonly transport;
|
|
104
|
+
constructor(transport: Transport);
|
|
105
|
+
list(options?: RequestOptions): Promise<BlockedHandleListResponse>;
|
|
106
|
+
block(body: BlockHandleParams, options?: RequestOptions): Promise<BlockHandleResponse>;
|
|
107
|
+
unblock(body: UnblockHandleParams, options?: RequestOptions): Promise<void>;
|
|
108
|
+
}
|
|
109
|
+
export declare class WebSocket {
|
|
110
|
+
private readonly transport;
|
|
111
|
+
constructor(transport: Transport);
|
|
112
|
+
/**
|
|
113
|
+
* Keeps one outbound WebSocket connection alive. `onEvent` must return
|
|
114
|
+
* only after the event is committed to a durable inbox; the SDK sends the
|
|
115
|
+
* cumulative ACK after that promise resolves. `onFullSync` must return only
|
|
116
|
+
* after a complete REST snapshot is durably applied.
|
|
117
|
+
*/
|
|
118
|
+
run(options: WebSocketRunOptions): Promise<void>;
|
|
119
|
+
}
|
|
120
|
+
export declare class Relay {
|
|
121
|
+
readonly baseURL: string;
|
|
122
|
+
readonly chats: Chats;
|
|
123
|
+
readonly messages: Messages;
|
|
124
|
+
readonly attachments: Attachments;
|
|
125
|
+
readonly webhookEvents: WebhookEvents;
|
|
126
|
+
readonly webhookSubscriptions: WebhookSubscriptions;
|
|
127
|
+
readonly contactCard: ContactCard;
|
|
128
|
+
readonly contactRequests: ContactRequests;
|
|
129
|
+
readonly blockedHandles: BlockedHandles;
|
|
130
|
+
readonly websocket: WebSocket;
|
|
131
|
+
readonly webhooks: Webhooks;
|
|
132
|
+
constructor(options: RelayOptions);
|
|
133
|
+
}
|
|
134
|
+
export default Relay;
|
|
135
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EACV,gBAAgB,EAChB,UAAU,EACV,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACnB,IAAI,EACJ,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,yBAAyB,EACzB,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