@linqapp/sdk 0.1.0 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/LICENSE +198 -4
- package/README.md +52 -52
- package/client.d.mts +34 -22
- package/client.d.mts.map +1 -1
- package/client.d.ts +34 -22
- package/client.d.ts.map +1 -1
- package/client.js +50 -41
- package/client.js.map +1 -1
- package/client.mjs +49 -40
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +2 -2
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +2 -2
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts +2 -2
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts +2 -2
- package/core/error.d.ts.map +1 -1
- package/core/error.js +4 -4
- package/core/error.js.map +1 -1
- package/core/error.mjs +2 -2
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts +3 -3
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts +3 -3
- package/core/resource.d.ts.map +1 -1
- package/core/resource.js.map +1 -1
- package/core/resource.mjs.map +1 -1
- package/index.d.mts +3 -3
- package/index.d.mts.map +1 -1
- package/index.d.ts +3 -3
- package/index.d.ts.map +1 -1
- package/index.js +4 -4
- package/index.js.map +1 -1
- package/index.mjs +3 -3
- package/index.mjs.map +1 -1
- package/internal/parse.d.mts +2 -2
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts +2 -2
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/shims.js +1 -1
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs +1 -1
- package/internal/shims.mjs.map +1 -1
- package/internal/uploads.d.mts +4 -4
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +4 -4
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.js +2 -2
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs +3 -3
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts +3 -3
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts +3 -3
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.js +1 -1
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +2 -2
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/values.js +5 -5
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +6 -6
- package/internal/utils/values.mjs.map +1 -1
- package/package.json +4 -4
- package/resources/attachments.d.mts +28 -3
- package/resources/attachments.d.mts.map +1 -1
- package/resources/attachments.d.ts +28 -3
- package/resources/attachments.d.ts.map +1 -1
- package/resources/capability.d.mts +74 -0
- package/resources/capability.d.mts.map +1 -0
- package/resources/capability.d.ts +74 -0
- package/resources/capability.d.ts.map +1 -0
- package/resources/capability.js +36 -0
- package/resources/capability.js.map +1 -0
- package/resources/capability.mjs +32 -0
- package/resources/capability.mjs.map +1 -0
- package/resources/chats/chats.d.mts +133 -663
- package/resources/chats/chats.d.mts.map +1 -1
- package/resources/chats/chats.d.ts +133 -663
- package/resources/chats/chats.d.ts.map +1 -1
- package/resources/chats/chats.js +2 -2
- package/resources/chats/chats.js.map +1 -1
- package/resources/chats/chats.mjs +2 -2
- package/resources/chats/chats.mjs.map +1 -1
- package/resources/chats/index.d.mts +2 -2
- package/resources/chats/index.d.mts.map +1 -1
- package/resources/chats/index.d.ts +2 -2
- package/resources/chats/index.d.ts.map +1 -1
- package/resources/chats/index.js.map +1 -1
- package/resources/chats/index.mjs.map +1 -1
- package/resources/chats/messages.d.mts +55 -716
- package/resources/chats/messages.d.mts.map +1 -1
- package/resources/chats/messages.d.ts +55 -716
- package/resources/chats/messages.d.ts.map +1 -1
- package/resources/chats/messages.js.map +1 -1
- package/resources/chats/messages.mjs.map +1 -1
- package/resources/index.d.mts +8 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +8 -5
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -2
- package/resources/index.mjs.map +1 -1
- package/resources/messages.d.mts +129 -553
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +129 -553
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +1 -1
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +1 -1
- package/resources/messages.mjs.map +1 -1
- package/resources/phone-numbers.d.mts +1 -50
- package/resources/phone-numbers.d.mts.map +1 -1
- package/resources/phone-numbers.d.ts +1 -50
- package/resources/phone-numbers.d.ts.map +1 -1
- package/resources/phone-numbers.js +0 -8
- package/resources/phone-numbers.js.map +1 -1
- package/resources/phone-numbers.mjs +0 -8
- package/resources/phone-numbers.mjs.map +1 -1
- package/resources/phonenumbers.d.mts +58 -0
- package/resources/phonenumbers.d.mts.map +1 -0
- package/resources/phonenumbers.d.ts +58 -0
- package/resources/phonenumbers.d.ts.map +1 -0
- package/resources/phonenumbers.js +17 -0
- package/resources/phonenumbers.js.map +1 -0
- package/resources/phonenumbers.mjs +13 -0
- package/resources/phonenumbers.mjs.map +1 -0
- package/resources/webhook-events.d.mts +29 -0
- package/resources/webhook-events.d.mts.map +1 -0
- package/resources/webhook-events.d.ts +29 -0
- package/resources/webhook-events.d.ts.map +1 -0
- package/resources/{webhooks/events.js → webhook-events.js} +5 -10
- package/resources/webhook-events.js.map +1 -0
- package/resources/{webhooks/events.mjs → webhook-events.mjs} +3 -8
- package/resources/webhook-events.mjs.map +1 -0
- package/resources/webhook-subscriptions.d.mts +184 -0
- package/resources/webhook-subscriptions.d.mts.map +1 -0
- package/resources/webhook-subscriptions.d.ts +184 -0
- package/resources/webhook-subscriptions.d.ts.map +1 -0
- package/resources/{webhooks/subscriptions.js → webhook-subscriptions.js} +16 -16
- package/resources/webhook-subscriptions.js.map +1 -0
- package/resources/{webhooks/subscriptions.mjs → webhook-subscriptions.mjs} +14 -14
- package/resources/webhook-subscriptions.mjs.map +1 -0
- package/src/client.ts +97 -41
- package/src/core/api-promise.ts +4 -4
- package/src/core/error.ts +2 -2
- package/src/core/resource.ts +3 -3
- package/src/index.ts +3 -3
- package/src/internal/parse.ts +2 -2
- package/src/internal/shims.ts +1 -1
- package/src/internal/uploads.ts +5 -5
- package/src/internal/utils/base64.ts +3 -3
- package/src/internal/utils/log.ts +3 -3
- package/src/internal/utils/path.ts +2 -2
- package/src/internal/utils/values.ts +6 -6
- package/src/resources/attachments.ts +81 -106
- package/src/resources/capability.ts +98 -0
- package/src/resources/chats/chats.ts +135 -770
- package/src/resources/chats/index.ts +4 -2
- package/src/resources/chats/messages.ts +60 -839
- package/src/resources/index.ts +29 -9
- package/src/resources/messages.ts +153 -659
- package/src/resources/phone-numbers.ts +1 -65
- package/src/resources/phonenumbers.ts +72 -0
- package/src/resources/webhook-events.ts +57 -0
- package/src/resources/webhook-subscriptions.ts +238 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/webhooks/events.d.mts +0 -30
- package/resources/webhooks/events.d.mts.map +0 -1
- package/resources/webhooks/events.d.ts +0 -30
- package/resources/webhooks/events.d.ts.map +0 -1
- package/resources/webhooks/events.js.map +0 -1
- package/resources/webhooks/events.mjs.map +0 -1
- package/resources/webhooks/index.d.mts +0 -4
- package/resources/webhooks/index.d.mts.map +0 -1
- package/resources/webhooks/index.d.ts +0 -4
- package/resources/webhooks/index.d.ts.map +0 -1
- package/resources/webhooks/index.js +0 -11
- package/resources/webhooks/index.js.map +0 -1
- package/resources/webhooks/index.mjs +0 -5
- package/resources/webhooks/index.mjs.map +0 -1
- package/resources/webhooks/subscriptions.d.mts +0 -237
- package/resources/webhooks/subscriptions.d.mts.map +0 -1
- package/resources/webhooks/subscriptions.d.ts +0 -237
- package/resources/webhooks/subscriptions.d.ts.map +0 -1
- package/resources/webhooks/subscriptions.js.map +0 -1
- package/resources/webhooks/subscriptions.mjs.map +0 -1
- package/resources/webhooks/webhooks.d.mts +0 -14
- package/resources/webhooks/webhooks.d.mts.map +0 -1
- package/resources/webhooks/webhooks.d.ts +0 -14
- package/resources/webhooks/webhooks.d.ts.map +0 -1
- package/resources/webhooks/webhooks.js +0 -21
- package/resources/webhooks/webhooks.js.map +0 -1
- package/resources/webhooks/webhooks.mjs +0 -16
- package/resources/webhooks/webhooks.mjs.map +0 -1
- package/resources/webhooks.d.mts +0 -2
- package/resources/webhooks.d.mts.map +0 -1
- package/resources/webhooks.d.ts +0 -2
- package/resources/webhooks.d.ts.map +0 -1
- package/resources/webhooks.js +0 -6
- package/resources/webhooks.js.map +0 -1
- package/resources/webhooks.mjs +0 -3
- package/resources/webhooks.mjs.map +0 -1
- package/src/resources/webhooks/events.ts +0 -55
- package/src/resources/webhooks/index.ts +0 -13
- package/src/resources/webhooks/subscriptions.ts +0 -409
- package/src/resources/webhooks/webhooks.ts +0 -37
- package/src/resources/webhooks.ts +0 -3
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as WebhookEventsAPI from "./webhook-events.mjs";
|
|
3
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
|
+
export declare class WebhookSubscriptions extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a new webhook subscription to receive events at a target URL. Upon
|
|
8
|
+
* creation, a signing secret is generated for verifying webhook authenticity.
|
|
9
|
+
* **Store this secret securely — it cannot be retrieved later.**
|
|
10
|
+
*
|
|
11
|
+
* **Webhook Delivery:**
|
|
12
|
+
*
|
|
13
|
+
* - Events are sent via HTTP POST to the target URL
|
|
14
|
+
* - Each request includes `X-Webhook-Signature` and `X-Webhook-Timestamp` headers
|
|
15
|
+
* - Signature is HMAC-SHA256 over `{timestamp}.{payload}` — see
|
|
16
|
+
* [Webhook Events](/docs/webhook-events) for verification details
|
|
17
|
+
* - Failed deliveries (5xx, 429, network errors) are retried up to 10 times over
|
|
18
|
+
* ~2 hours with exponential backoff
|
|
19
|
+
* - Client errors (4xx except 429) are not retried
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const webhookSubscription =
|
|
24
|
+
* await client.webhookSubscriptions.create({
|
|
25
|
+
* subscribed_events: [
|
|
26
|
+
* 'message.sent',
|
|
27
|
+
* 'message.delivered',
|
|
28
|
+
* 'message.read',
|
|
29
|
+
* ],
|
|
30
|
+
* target_url: 'https://webhooks.example.com/linq/events',
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
create(body: WebhookSubscriptionCreateParams, options?: RequestOptions): APIPromise<WebhookSubscriptionCreateResponse>;
|
|
35
|
+
/**
|
|
36
|
+
* Retrieve details for a specific webhook subscription including its target URL,
|
|
37
|
+
* subscribed events, and current status.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const webhookSubscription =
|
|
42
|
+
* await client.webhookSubscriptions.retrieve(
|
|
43
|
+
* 'b2c3d4e5-f6a7-8901-bcde-f23456789012',
|
|
44
|
+
* );
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
retrieve(subscriptionID: string, options?: RequestOptions): APIPromise<WebhookSubscription>;
|
|
48
|
+
/**
|
|
49
|
+
* Update an existing webhook subscription. You can modify the target URL,
|
|
50
|
+
* subscribed events, or activate/deactivate the subscription.
|
|
51
|
+
*
|
|
52
|
+
* **Note:** The signing secret cannot be changed via this endpoint.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const webhookSubscription =
|
|
57
|
+
* await client.webhookSubscriptions.update(
|
|
58
|
+
* 'b2c3d4e5-f6a7-8901-bcde-f23456789012',
|
|
59
|
+
* {
|
|
60
|
+
* target_url:
|
|
61
|
+
* 'https://webhooks.example.com/linq/events',
|
|
62
|
+
* },
|
|
63
|
+
* );
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
update(subscriptionID: string, body: WebhookSubscriptionUpdateParams, options?: RequestOptions): APIPromise<WebhookSubscription>;
|
|
67
|
+
/**
|
|
68
|
+
* Retrieve all webhook subscriptions for the authenticated partner. Returns a list
|
|
69
|
+
* of active and inactive subscriptions with their configuration and status.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const webhookSubscriptions =
|
|
74
|
+
* await client.webhookSubscriptions.list();
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
list(options?: RequestOptions): APIPromise<WebhookSubscriptionListResponse>;
|
|
78
|
+
/**
|
|
79
|
+
* Delete a webhook subscription.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```ts
|
|
83
|
+
* await client.webhookSubscriptions.delete(
|
|
84
|
+
* 'b2c3d4e5-f6a7-8901-bcde-f23456789012',
|
|
85
|
+
* );
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
delete(subscriptionID: string, options?: RequestOptions): APIPromise<void>;
|
|
89
|
+
}
|
|
90
|
+
export interface WebhookSubscription {
|
|
91
|
+
/**
|
|
92
|
+
* Unique identifier for the webhook subscription
|
|
93
|
+
*/
|
|
94
|
+
id: string;
|
|
95
|
+
/**
|
|
96
|
+
* When the subscription was created
|
|
97
|
+
*/
|
|
98
|
+
created_at: string;
|
|
99
|
+
/**
|
|
100
|
+
* Whether this subscription is currently active
|
|
101
|
+
*/
|
|
102
|
+
is_active: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* List of event types this subscription receives
|
|
105
|
+
*/
|
|
106
|
+
subscribed_events: Array<WebhookEventsAPI.WebhookEventType>;
|
|
107
|
+
/**
|
|
108
|
+
* URL where webhook events will be sent
|
|
109
|
+
*/
|
|
110
|
+
target_url: string;
|
|
111
|
+
/**
|
|
112
|
+
* When the subscription was last updated
|
|
113
|
+
*/
|
|
114
|
+
updated_at: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Response returned when creating a webhook subscription. Includes the signing
|
|
118
|
+
* secret which is only shown once.
|
|
119
|
+
*/
|
|
120
|
+
export interface WebhookSubscriptionCreateResponse {
|
|
121
|
+
/**
|
|
122
|
+
* Unique identifier for the webhook subscription
|
|
123
|
+
*/
|
|
124
|
+
id: string;
|
|
125
|
+
/**
|
|
126
|
+
* When the subscription was created
|
|
127
|
+
*/
|
|
128
|
+
created_at: string;
|
|
129
|
+
/**
|
|
130
|
+
* Whether this subscription is currently active
|
|
131
|
+
*/
|
|
132
|
+
is_active: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Secret for verifying webhook signatures. Store this securely - it cannot be
|
|
135
|
+
* retrieved again.
|
|
136
|
+
*/
|
|
137
|
+
signing_secret: string;
|
|
138
|
+
/**
|
|
139
|
+
* List of event types this subscription receives
|
|
140
|
+
*/
|
|
141
|
+
subscribed_events: Array<WebhookEventsAPI.WebhookEventType>;
|
|
142
|
+
/**
|
|
143
|
+
* URL where webhook events will be sent
|
|
144
|
+
*/
|
|
145
|
+
target_url: string;
|
|
146
|
+
/**
|
|
147
|
+
* When the subscription was last updated
|
|
148
|
+
*/
|
|
149
|
+
updated_at: string;
|
|
150
|
+
}
|
|
151
|
+
export interface WebhookSubscriptionListResponse {
|
|
152
|
+
/**
|
|
153
|
+
* List of webhook subscriptions
|
|
154
|
+
*/
|
|
155
|
+
subscriptions: Array<WebhookSubscription>;
|
|
156
|
+
}
|
|
157
|
+
export interface WebhookSubscriptionCreateParams {
|
|
158
|
+
/**
|
|
159
|
+
* List of event types to subscribe to
|
|
160
|
+
*/
|
|
161
|
+
subscribed_events: Array<WebhookEventsAPI.WebhookEventType>;
|
|
162
|
+
/**
|
|
163
|
+
* URL where webhook events will be sent. Must be HTTPS.
|
|
164
|
+
*/
|
|
165
|
+
target_url: string;
|
|
166
|
+
}
|
|
167
|
+
export interface WebhookSubscriptionUpdateParams {
|
|
168
|
+
/**
|
|
169
|
+
* Activate or deactivate the subscription
|
|
170
|
+
*/
|
|
171
|
+
is_active?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Updated list of event types to subscribe to
|
|
174
|
+
*/
|
|
175
|
+
subscribed_events?: Array<WebhookEventsAPI.WebhookEventType>;
|
|
176
|
+
/**
|
|
177
|
+
* New target URL for webhook events
|
|
178
|
+
*/
|
|
179
|
+
target_url?: string;
|
|
180
|
+
}
|
|
181
|
+
export declare namespace WebhookSubscriptions {
|
|
182
|
+
export { type WebhookSubscription as WebhookSubscription, type WebhookSubscriptionCreateResponse as WebhookSubscriptionCreateResponse, type WebhookSubscriptionListResponse as WebhookSubscriptionListResponse, type WebhookSubscriptionCreateParams as WebhookSubscriptionCreateParams, type WebhookSubscriptionUpdateParams as WebhookSubscriptionUpdateParams, };
|
|
183
|
+
}
|
|
184
|
+
//# sourceMappingURL=webhook-subscriptions.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook-subscriptions.d.mts","sourceRoot":"","sources":["../src/resources/webhook-subscriptions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,gBAAgB;OACrB,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,oBAAqB,SAAQ,WAAW;IACnD;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,MAAM,CACJ,IAAI,EAAE,+BAA+B,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iCAAiC,CAAC;IAIhD;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EA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AM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,iBAAiB,EAAE,KAAK,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAE5D;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAE7D;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,oBAAoB,CAAC;IAC5C,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import * as WebhookEventsAPI from "./webhook-events.js";
|
|
3
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
5
|
+
export declare class WebhookSubscriptions extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a new webhook subscription to receive events at a target URL. Upon
|
|
8
|
+
* creation, a signing secret is generated for verifying webhook authenticity.
|
|
9
|
+
* **Store this secret securely — it cannot be retrieved later.**
|
|
10
|
+
*
|
|
11
|
+
* **Webhook Delivery:**
|
|
12
|
+
*
|
|
13
|
+
* - Events are sent via HTTP POST to the target URL
|
|
14
|
+
* - Each request includes `X-Webhook-Signature` and `X-Webhook-Timestamp` headers
|
|
15
|
+
* - Signature is HMAC-SHA256 over `{timestamp}.{payload}` — see
|
|
16
|
+
* [Webhook Events](/docs/webhook-events) for verification details
|
|
17
|
+
* - Failed deliveries (5xx, 429, network errors) are retried up to 10 times over
|
|
18
|
+
* ~2 hours with exponential backoff
|
|
19
|
+
* - Client errors (4xx except 429) are not retried
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const webhookSubscription =
|
|
24
|
+
* await client.webhookSubscriptions.create({
|
|
25
|
+
* subscribed_events: [
|
|
26
|
+
* 'message.sent',
|
|
27
|
+
* 'message.delivered',
|
|
28
|
+
* 'message.read',
|
|
29
|
+
* ],
|
|
30
|
+
* target_url: 'https://webhooks.example.com/linq/events',
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
create(body: WebhookSubscriptionCreateParams, options?: RequestOptions): APIPromise<WebhookSubscriptionCreateResponse>;
|
|
35
|
+
/**
|
|
36
|
+
* Retrieve details for a specific webhook subscription including its target URL,
|
|
37
|
+
* subscribed events, and current status.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const webhookSubscription =
|
|
42
|
+
* await client.webhookSubscriptions.retrieve(
|
|
43
|
+
* 'b2c3d4e5-f6a7-8901-bcde-f23456789012',
|
|
44
|
+
* );
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
retrieve(subscriptionID: string, options?: RequestOptions): APIPromise<WebhookSubscription>;
|
|
48
|
+
/**
|
|
49
|
+
* Update an existing webhook subscription. You can modify the target URL,
|
|
50
|
+
* subscribed events, or activate/deactivate the subscription.
|
|
51
|
+
*
|
|
52
|
+
* **Note:** The signing secret cannot be changed via this endpoint.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const webhookSubscription =
|
|
57
|
+
* await client.webhookSubscriptions.update(
|
|
58
|
+
* 'b2c3d4e5-f6a7-8901-bcde-f23456789012',
|
|
59
|
+
* {
|
|
60
|
+
* target_url:
|
|
61
|
+
* 'https://webhooks.example.com/linq/events',
|
|
62
|
+
* },
|
|
63
|
+
* );
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
update(subscriptionID: string, body: WebhookSubscriptionUpdateParams, options?: RequestOptions): APIPromise<WebhookSubscription>;
|
|
67
|
+
/**
|
|
68
|
+
* Retrieve all webhook subscriptions for the authenticated partner. Returns a list
|
|
69
|
+
* of active and inactive subscriptions with their configuration and status.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const webhookSubscriptions =
|
|
74
|
+
* await client.webhookSubscriptions.list();
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
list(options?: RequestOptions): APIPromise<WebhookSubscriptionListResponse>;
|
|
78
|
+
/**
|
|
79
|
+
* Delete a webhook subscription.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```ts
|
|
83
|
+
* await client.webhookSubscriptions.delete(
|
|
84
|
+
* 'b2c3d4e5-f6a7-8901-bcde-f23456789012',
|
|
85
|
+
* );
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
delete(subscriptionID: string, options?: RequestOptions): APIPromise<void>;
|
|
89
|
+
}
|
|
90
|
+
export interface WebhookSubscription {
|
|
91
|
+
/**
|
|
92
|
+
* Unique identifier for the webhook subscription
|
|
93
|
+
*/
|
|
94
|
+
id: string;
|
|
95
|
+
/**
|
|
96
|
+
* When the subscription was created
|
|
97
|
+
*/
|
|
98
|
+
created_at: string;
|
|
99
|
+
/**
|
|
100
|
+
* Whether this subscription is currently active
|
|
101
|
+
*/
|
|
102
|
+
is_active: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* List of event types this subscription receives
|
|
105
|
+
*/
|
|
106
|
+
subscribed_events: Array<WebhookEventsAPI.WebhookEventType>;
|
|
107
|
+
/**
|
|
108
|
+
* URL where webhook events will be sent
|
|
109
|
+
*/
|
|
110
|
+
target_url: string;
|
|
111
|
+
/**
|
|
112
|
+
* When the subscription was last updated
|
|
113
|
+
*/
|
|
114
|
+
updated_at: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Response returned when creating a webhook subscription. Includes the signing
|
|
118
|
+
* secret which is only shown once.
|
|
119
|
+
*/
|
|
120
|
+
export interface WebhookSubscriptionCreateResponse {
|
|
121
|
+
/**
|
|
122
|
+
* Unique identifier for the webhook subscription
|
|
123
|
+
*/
|
|
124
|
+
id: string;
|
|
125
|
+
/**
|
|
126
|
+
* When the subscription was created
|
|
127
|
+
*/
|
|
128
|
+
created_at: string;
|
|
129
|
+
/**
|
|
130
|
+
* Whether this subscription is currently active
|
|
131
|
+
*/
|
|
132
|
+
is_active: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Secret for verifying webhook signatures. Store this securely - it cannot be
|
|
135
|
+
* retrieved again.
|
|
136
|
+
*/
|
|
137
|
+
signing_secret: string;
|
|
138
|
+
/**
|
|
139
|
+
* List of event types this subscription receives
|
|
140
|
+
*/
|
|
141
|
+
subscribed_events: Array<WebhookEventsAPI.WebhookEventType>;
|
|
142
|
+
/**
|
|
143
|
+
* URL where webhook events will be sent
|
|
144
|
+
*/
|
|
145
|
+
target_url: string;
|
|
146
|
+
/**
|
|
147
|
+
* When the subscription was last updated
|
|
148
|
+
*/
|
|
149
|
+
updated_at: string;
|
|
150
|
+
}
|
|
151
|
+
export interface WebhookSubscriptionListResponse {
|
|
152
|
+
/**
|
|
153
|
+
* List of webhook subscriptions
|
|
154
|
+
*/
|
|
155
|
+
subscriptions: Array<WebhookSubscription>;
|
|
156
|
+
}
|
|
157
|
+
export interface WebhookSubscriptionCreateParams {
|
|
158
|
+
/**
|
|
159
|
+
* List of event types to subscribe to
|
|
160
|
+
*/
|
|
161
|
+
subscribed_events: Array<WebhookEventsAPI.WebhookEventType>;
|
|
162
|
+
/**
|
|
163
|
+
* URL where webhook events will be sent. Must be HTTPS.
|
|
164
|
+
*/
|
|
165
|
+
target_url: string;
|
|
166
|
+
}
|
|
167
|
+
export interface WebhookSubscriptionUpdateParams {
|
|
168
|
+
/**
|
|
169
|
+
* Activate or deactivate the subscription
|
|
170
|
+
*/
|
|
171
|
+
is_active?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Updated list of event types to subscribe to
|
|
174
|
+
*/
|
|
175
|
+
subscribed_events?: Array<WebhookEventsAPI.WebhookEventType>;
|
|
176
|
+
/**
|
|
177
|
+
* New target URL for webhook events
|
|
178
|
+
*/
|
|
179
|
+
target_url?: string;
|
|
180
|
+
}
|
|
181
|
+
export declare namespace WebhookSubscriptions {
|
|
182
|
+
export { type WebhookSubscription as WebhookSubscription, type WebhookSubscriptionCreateResponse as WebhookSubscriptionCreateResponse, type WebhookSubscriptionListResponse as WebhookSubscriptionListResponse, type WebhookSubscriptionCreateParams as WebhookSubscriptionCreateParams, type WebhookSubscriptionUpdateParams as WebhookSubscriptionUpdateParams, };
|
|
183
|
+
}
|
|
184
|
+
//# sourceMappingURL=webhook-subscriptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook-subscriptions.d.ts","sourceRoot":"","sources":["../src/resources/webhook-subscriptions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,gBAAgB;OACrB,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,oBAAqB,SAAQ,WAAW;IACnD;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,MAAM,CACJ,IAAI,EAAE,+BAA+B,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iCAAiC,CAAC;IAIhD;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;IAI3F;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CACJ,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,+BAA+B,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CA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OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAE7D;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,oBAAoB,CAAC;IAC5C,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
const resource_1 = require("
|
|
6
|
-
const headers_1 = require("
|
|
7
|
-
const path_1 = require("
|
|
8
|
-
class
|
|
4
|
+
exports.WebhookSubscriptions = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const headers_1 = require("../internal/headers.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
class WebhookSubscriptions extends resource_1.APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Create a new webhook subscription to receive events at a target URL. Upon
|
|
11
11
|
* creation, a signing secret is generated for verifying webhook authenticity.
|
|
@@ -23,8 +23,8 @@ class Subscriptions extends resource_1.APIResource {
|
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
25
|
* ```ts
|
|
26
|
-
* const
|
|
27
|
-
* await client.
|
|
26
|
+
* const webhookSubscription =
|
|
27
|
+
* await client.webhookSubscriptions.create({
|
|
28
28
|
* subscribed_events: [
|
|
29
29
|
* 'message.sent',
|
|
30
30
|
* 'message.delivered',
|
|
@@ -43,8 +43,8 @@ class Subscriptions extends resource_1.APIResource {
|
|
|
43
43
|
*
|
|
44
44
|
* @example
|
|
45
45
|
* ```ts
|
|
46
|
-
* const
|
|
47
|
-
* await client.
|
|
46
|
+
* const webhookSubscription =
|
|
47
|
+
* await client.webhookSubscriptions.retrieve(
|
|
48
48
|
* 'b2c3d4e5-f6a7-8901-bcde-f23456789012',
|
|
49
49
|
* );
|
|
50
50
|
* ```
|
|
@@ -60,8 +60,8 @@ class Subscriptions extends resource_1.APIResource {
|
|
|
60
60
|
*
|
|
61
61
|
* @example
|
|
62
62
|
* ```ts
|
|
63
|
-
* const
|
|
64
|
-
* await client.
|
|
63
|
+
* const webhookSubscription =
|
|
64
|
+
* await client.webhookSubscriptions.update(
|
|
65
65
|
* 'b2c3d4e5-f6a7-8901-bcde-f23456789012',
|
|
66
66
|
* {
|
|
67
67
|
* target_url:
|
|
@@ -79,8 +79,8 @@ class Subscriptions extends resource_1.APIResource {
|
|
|
79
79
|
*
|
|
80
80
|
* @example
|
|
81
81
|
* ```ts
|
|
82
|
-
* const
|
|
83
|
-
* await client.
|
|
82
|
+
* const webhookSubscriptions =
|
|
83
|
+
* await client.webhookSubscriptions.list();
|
|
84
84
|
* ```
|
|
85
85
|
*/
|
|
86
86
|
list(options) {
|
|
@@ -91,7 +91,7 @@ class Subscriptions extends resource_1.APIResource {
|
|
|
91
91
|
*
|
|
92
92
|
* @example
|
|
93
93
|
* ```ts
|
|
94
|
-
* await client.
|
|
94
|
+
* await client.webhookSubscriptions.delete(
|
|
95
95
|
* 'b2c3d4e5-f6a7-8901-bcde-f23456789012',
|
|
96
96
|
* );
|
|
97
97
|
* ```
|
|
@@ -103,5 +103,5 @@ class Subscriptions extends resource_1.APIResource {
|
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
exports.
|
|
107
|
-
//# sourceMappingURL=subscriptions.js.map
|
|
106
|
+
exports.WebhookSubscriptions = WebhookSubscriptions;
|
|
107
|
+
//# sourceMappingURL=webhook-subscriptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook-subscriptions.js","sourceRoot":"","sources":["../src/resources/webhook-subscriptions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAAmD;AAEnD,oDAA8C;AAE9C,MAAa,oBAAqB,SAAQ,sBAAW;IACnD;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,MAAM,CACJ,IAAqC,EACrC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,cAAsB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,6BAA6B,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CACJ,cAAsB,EACtB,IAAqC,EACrC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,6BAA6B,cAAc,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnG,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,cAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,6BAA6B,cAAc,EAAE,EAAE;YAC5E,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AA5GD,oDA4GC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "
|
|
3
|
-
import { buildHeaders } from "
|
|
4
|
-
import { path } from "
|
|
5
|
-
export class
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
|
+
export class WebhookSubscriptions extends APIResource {
|
|
6
6
|
/**
|
|
7
7
|
* Create a new webhook subscription to receive events at a target URL. Upon
|
|
8
8
|
* creation, a signing secret is generated for verifying webhook authenticity.
|
|
@@ -20,8 +20,8 @@ export class Subscriptions extends APIResource {
|
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
22
22
|
* ```ts
|
|
23
|
-
* const
|
|
24
|
-
* await client.
|
|
23
|
+
* const webhookSubscription =
|
|
24
|
+
* await client.webhookSubscriptions.create({
|
|
25
25
|
* subscribed_events: [
|
|
26
26
|
* 'message.sent',
|
|
27
27
|
* 'message.delivered',
|
|
@@ -40,8 +40,8 @@ export class Subscriptions extends APIResource {
|
|
|
40
40
|
*
|
|
41
41
|
* @example
|
|
42
42
|
* ```ts
|
|
43
|
-
* const
|
|
44
|
-
* await client.
|
|
43
|
+
* const webhookSubscription =
|
|
44
|
+
* await client.webhookSubscriptions.retrieve(
|
|
45
45
|
* 'b2c3d4e5-f6a7-8901-bcde-f23456789012',
|
|
46
46
|
* );
|
|
47
47
|
* ```
|
|
@@ -57,8 +57,8 @@ export class Subscriptions extends APIResource {
|
|
|
57
57
|
*
|
|
58
58
|
* @example
|
|
59
59
|
* ```ts
|
|
60
|
-
* const
|
|
61
|
-
* await client.
|
|
60
|
+
* const webhookSubscription =
|
|
61
|
+
* await client.webhookSubscriptions.update(
|
|
62
62
|
* 'b2c3d4e5-f6a7-8901-bcde-f23456789012',
|
|
63
63
|
* {
|
|
64
64
|
* target_url:
|
|
@@ -76,8 +76,8 @@ export class Subscriptions extends APIResource {
|
|
|
76
76
|
*
|
|
77
77
|
* @example
|
|
78
78
|
* ```ts
|
|
79
|
-
* const
|
|
80
|
-
* await client.
|
|
79
|
+
* const webhookSubscriptions =
|
|
80
|
+
* await client.webhookSubscriptions.list();
|
|
81
81
|
* ```
|
|
82
82
|
*/
|
|
83
83
|
list(options) {
|
|
@@ -88,7 +88,7 @@ export class Subscriptions extends APIResource {
|
|
|
88
88
|
*
|
|
89
89
|
* @example
|
|
90
90
|
* ```ts
|
|
91
|
-
* await client.
|
|
91
|
+
* await client.webhookSubscriptions.delete(
|
|
92
92
|
* 'b2c3d4e5-f6a7-8901-bcde-f23456789012',
|
|
93
93
|
* );
|
|
94
94
|
* ```
|
|
@@ -100,4 +100,4 @@ export class Subscriptions extends APIResource {
|
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
//# sourceMappingURL=subscriptions.mjs.map
|
|
103
|
+
//# sourceMappingURL=webhook-subscriptions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook-subscriptions.mjs","sourceRoot":"","sources":["../src/resources/webhook-subscriptions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,oBAAqB,SAAQ,WAAW;IACnD;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,MAAM,CACJ,IAAqC,EACrC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,cAA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