@pidgeon-ai/sdk 2.1.1 → 2.2.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 +5 -0
- package/dist/index.d.ts +9 -1
- package/dist/index.js +7 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.2.0
|
|
4
|
+
|
|
5
|
+
- `webhooks.create` takes `inboxIds`: the endpoint hears only those inboxes'
|
|
6
|
+
events. `Webhook` has `inbox_ids`, null for one of the whole account.
|
|
7
|
+
|
|
3
8
|
## 2.1.1
|
|
4
9
|
|
|
5
10
|
- `calendar.create` and `calendar.update` take `attendees` and `sendInvites`,
|
package/dist/index.d.ts
CHANGED
|
@@ -200,6 +200,8 @@ export type MailDomain = {
|
|
|
200
200
|
mail: boolean;
|
|
201
201
|
status: 'pending' | 'verified' | 'failed' | null;
|
|
202
202
|
receiving: boolean;
|
|
203
|
+
/** Whether Pidgeon signs agents' `Agent-of` here: the `pgn2._domainkey` record answered at the last check. */
|
|
204
|
+
agent_signing: boolean;
|
|
203
205
|
checked_at: string | null;
|
|
204
206
|
records: {
|
|
205
207
|
purpose: string;
|
|
@@ -245,6 +247,8 @@ export type Webhook = {
|
|
|
245
247
|
id: string;
|
|
246
248
|
url: string;
|
|
247
249
|
events: string[];
|
|
250
|
+
/** The inboxes it hears; null when it hears the whole account. */
|
|
251
|
+
inbox_ids: string[] | null;
|
|
248
252
|
created_at: string;
|
|
249
253
|
disabled_at: string | null;
|
|
250
254
|
};
|
|
@@ -681,10 +685,14 @@ export declare class Pidgeon {
|
|
|
681
685
|
list: () => Promise<{
|
|
682
686
|
data: Webhook[];
|
|
683
687
|
}>;
|
|
684
|
-
/**
|
|
688
|
+
/**
|
|
689
|
+
* Answers `secret` once: check each delivery's signature with it (`verifyWebhook`).
|
|
690
|
+
* With `inboxIds` it hears only those inboxes' events; without, the whole account's.
|
|
691
|
+
*/
|
|
685
692
|
create: (input: {
|
|
686
693
|
url: string;
|
|
687
694
|
events: string[];
|
|
695
|
+
inboxIds?: string[];
|
|
688
696
|
}) => Promise<{
|
|
689
697
|
id: string;
|
|
690
698
|
secret: string;
|
package/dist/index.js
CHANGED
|
@@ -419,8 +419,13 @@ export class Pidgeon {
|
|
|
419
419
|
/** Your webhook endpoints. A key of the whole account only. */
|
|
420
420
|
webhooks = {
|
|
421
421
|
list: () => this.request('GET', '/v1/webhooks'),
|
|
422
|
-
/**
|
|
423
|
-
|
|
422
|
+
/**
|
|
423
|
+
* Answers `secret` once: check each delivery's signature with it (`verifyWebhook`).
|
|
424
|
+
* With `inboxIds` it hears only those inboxes' events; without, the whole account's.
|
|
425
|
+
*/
|
|
426
|
+
create: (input) => this.request('POST', '/v1/webhooks', {
|
|
427
|
+
body: { url: input.url, events: input.events, inbox_ids: input.inboxIds },
|
|
428
|
+
}),
|
|
424
429
|
remove: (id) => this.request('DELETE', `/v1/webhooks/${segment(id)}`),
|
|
425
430
|
};
|
|
426
431
|
/** A multipart POST (uploads): the same authentication and errors as `request`. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pidgeon-ai/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Pidgeon's TypeScript SDK: Passport, Bouncer, Email and Auth. Sign your agents' requests, verify agents at your site, send mail from agent inboxes, and Sign in with Pidgeon.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|