@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.
Files changed (223) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/LICENSE +198 -4
  3. package/README.md +52 -52
  4. package/client.d.mts +34 -22
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +34 -22
  7. package/client.d.ts.map +1 -1
  8. package/client.js +50 -41
  9. package/client.js.map +1 -1
  10. package/client.mjs +49 -40
  11. package/client.mjs.map +1 -1
  12. package/core/api-promise.d.mts +2 -2
  13. package/core/api-promise.d.mts.map +1 -1
  14. package/core/api-promise.d.ts +2 -2
  15. package/core/api-promise.d.ts.map +1 -1
  16. package/core/api-promise.js.map +1 -1
  17. package/core/api-promise.mjs.map +1 -1
  18. package/core/error.d.mts +2 -2
  19. package/core/error.d.mts.map +1 -1
  20. package/core/error.d.ts +2 -2
  21. package/core/error.d.ts.map +1 -1
  22. package/core/error.js +4 -4
  23. package/core/error.js.map +1 -1
  24. package/core/error.mjs +2 -2
  25. package/core/error.mjs.map +1 -1
  26. package/core/resource.d.mts +3 -3
  27. package/core/resource.d.mts.map +1 -1
  28. package/core/resource.d.ts +3 -3
  29. package/core/resource.d.ts.map +1 -1
  30. package/core/resource.js.map +1 -1
  31. package/core/resource.mjs.map +1 -1
  32. package/index.d.mts +3 -3
  33. package/index.d.mts.map +1 -1
  34. package/index.d.ts +3 -3
  35. package/index.d.ts.map +1 -1
  36. package/index.js +4 -4
  37. package/index.js.map +1 -1
  38. package/index.mjs +3 -3
  39. package/index.mjs.map +1 -1
  40. package/internal/parse.d.mts +2 -2
  41. package/internal/parse.d.mts.map +1 -1
  42. package/internal/parse.d.ts +2 -2
  43. package/internal/parse.d.ts.map +1 -1
  44. package/internal/parse.js.map +1 -1
  45. package/internal/parse.mjs.map +1 -1
  46. package/internal/shims.js +1 -1
  47. package/internal/shims.js.map +1 -1
  48. package/internal/shims.mjs +1 -1
  49. package/internal/shims.mjs.map +1 -1
  50. package/internal/uploads.d.mts +4 -4
  51. package/internal/uploads.d.mts.map +1 -1
  52. package/internal/uploads.d.ts +4 -4
  53. package/internal/uploads.d.ts.map +1 -1
  54. package/internal/uploads.js.map +1 -1
  55. package/internal/uploads.mjs.map +1 -1
  56. package/internal/utils/base64.js +2 -2
  57. package/internal/utils/base64.js.map +1 -1
  58. package/internal/utils/base64.mjs +3 -3
  59. package/internal/utils/base64.mjs.map +1 -1
  60. package/internal/utils/log.d.mts +3 -3
  61. package/internal/utils/log.d.mts.map +1 -1
  62. package/internal/utils/log.d.ts +3 -3
  63. package/internal/utils/log.d.ts.map +1 -1
  64. package/internal/utils/log.js.map +1 -1
  65. package/internal/utils/log.mjs.map +1 -1
  66. package/internal/utils/path.js +1 -1
  67. package/internal/utils/path.js.map +1 -1
  68. package/internal/utils/path.mjs +2 -2
  69. package/internal/utils/path.mjs.map +1 -1
  70. package/internal/utils/values.js +5 -5
  71. package/internal/utils/values.js.map +1 -1
  72. package/internal/utils/values.mjs +6 -6
  73. package/internal/utils/values.mjs.map +1 -1
  74. package/package.json +4 -4
  75. package/resources/attachments.d.mts +28 -3
  76. package/resources/attachments.d.mts.map +1 -1
  77. package/resources/attachments.d.ts +28 -3
  78. package/resources/attachments.d.ts.map +1 -1
  79. package/resources/capability.d.mts +74 -0
  80. package/resources/capability.d.mts.map +1 -0
  81. package/resources/capability.d.ts +74 -0
  82. package/resources/capability.d.ts.map +1 -0
  83. package/resources/capability.js +36 -0
  84. package/resources/capability.js.map +1 -0
  85. package/resources/capability.mjs +32 -0
  86. package/resources/capability.mjs.map +1 -0
  87. package/resources/chats/chats.d.mts +133 -663
  88. package/resources/chats/chats.d.mts.map +1 -1
  89. package/resources/chats/chats.d.ts +133 -663
  90. package/resources/chats/chats.d.ts.map +1 -1
  91. package/resources/chats/chats.js +2 -2
  92. package/resources/chats/chats.js.map +1 -1
  93. package/resources/chats/chats.mjs +2 -2
  94. package/resources/chats/chats.mjs.map +1 -1
  95. package/resources/chats/index.d.mts +2 -2
  96. package/resources/chats/index.d.mts.map +1 -1
  97. package/resources/chats/index.d.ts +2 -2
  98. package/resources/chats/index.d.ts.map +1 -1
  99. package/resources/chats/index.js.map +1 -1
  100. package/resources/chats/index.mjs.map +1 -1
  101. package/resources/chats/messages.d.mts +55 -716
  102. package/resources/chats/messages.d.mts.map +1 -1
  103. package/resources/chats/messages.d.ts +55 -716
  104. package/resources/chats/messages.d.ts.map +1 -1
  105. package/resources/chats/messages.js.map +1 -1
  106. package/resources/chats/messages.mjs.map +1 -1
  107. package/resources/index.d.mts +8 -5
  108. package/resources/index.d.mts.map +1 -1
  109. package/resources/index.d.ts +8 -5
  110. package/resources/index.d.ts.map +1 -1
  111. package/resources/index.js +9 -3
  112. package/resources/index.js.map +1 -1
  113. package/resources/index.mjs +5 -2
  114. package/resources/index.mjs.map +1 -1
  115. package/resources/messages.d.mts +129 -553
  116. package/resources/messages.d.mts.map +1 -1
  117. package/resources/messages.d.ts +129 -553
  118. package/resources/messages.d.ts.map +1 -1
  119. package/resources/messages.js +1 -1
  120. package/resources/messages.js.map +1 -1
  121. package/resources/messages.mjs +1 -1
  122. package/resources/messages.mjs.map +1 -1
  123. package/resources/phone-numbers.d.mts +1 -50
  124. package/resources/phone-numbers.d.mts.map +1 -1
  125. package/resources/phone-numbers.d.ts +1 -50
  126. package/resources/phone-numbers.d.ts.map +1 -1
  127. package/resources/phone-numbers.js +0 -8
  128. package/resources/phone-numbers.js.map +1 -1
  129. package/resources/phone-numbers.mjs +0 -8
  130. package/resources/phone-numbers.mjs.map +1 -1
  131. package/resources/phonenumbers.d.mts +58 -0
  132. package/resources/phonenumbers.d.mts.map +1 -0
  133. package/resources/phonenumbers.d.ts +58 -0
  134. package/resources/phonenumbers.d.ts.map +1 -0
  135. package/resources/phonenumbers.js +17 -0
  136. package/resources/phonenumbers.js.map +1 -0
  137. package/resources/phonenumbers.mjs +13 -0
  138. package/resources/phonenumbers.mjs.map +1 -0
  139. package/resources/webhook-events.d.mts +29 -0
  140. package/resources/webhook-events.d.mts.map +1 -0
  141. package/resources/webhook-events.d.ts +29 -0
  142. package/resources/webhook-events.d.ts.map +1 -0
  143. package/resources/{webhooks/events.js → webhook-events.js} +5 -10
  144. package/resources/webhook-events.js.map +1 -0
  145. package/resources/{webhooks/events.mjs → webhook-events.mjs} +3 -8
  146. package/resources/webhook-events.mjs.map +1 -0
  147. package/resources/webhook-subscriptions.d.mts +184 -0
  148. package/resources/webhook-subscriptions.d.mts.map +1 -0
  149. package/resources/webhook-subscriptions.d.ts +184 -0
  150. package/resources/webhook-subscriptions.d.ts.map +1 -0
  151. package/resources/{webhooks/subscriptions.js → webhook-subscriptions.js} +16 -16
  152. package/resources/webhook-subscriptions.js.map +1 -0
  153. package/resources/{webhooks/subscriptions.mjs → webhook-subscriptions.mjs} +14 -14
  154. package/resources/webhook-subscriptions.mjs.map +1 -0
  155. package/src/client.ts +97 -41
  156. package/src/core/api-promise.ts +4 -4
  157. package/src/core/error.ts +2 -2
  158. package/src/core/resource.ts +3 -3
  159. package/src/index.ts +3 -3
  160. package/src/internal/parse.ts +2 -2
  161. package/src/internal/shims.ts +1 -1
  162. package/src/internal/uploads.ts +5 -5
  163. package/src/internal/utils/base64.ts +3 -3
  164. package/src/internal/utils/log.ts +3 -3
  165. package/src/internal/utils/path.ts +2 -2
  166. package/src/internal/utils/values.ts +6 -6
  167. package/src/resources/attachments.ts +81 -106
  168. package/src/resources/capability.ts +98 -0
  169. package/src/resources/chats/chats.ts +135 -770
  170. package/src/resources/chats/index.ts +4 -2
  171. package/src/resources/chats/messages.ts +60 -839
  172. package/src/resources/index.ts +29 -9
  173. package/src/resources/messages.ts +153 -659
  174. package/src/resources/phone-numbers.ts +1 -65
  175. package/src/resources/phonenumbers.ts +72 -0
  176. package/src/resources/webhook-events.ts +57 -0
  177. package/src/resources/webhook-subscriptions.ts +238 -0
  178. package/src/version.ts +1 -1
  179. package/version.d.mts +1 -1
  180. package/version.d.ts +1 -1
  181. package/version.js +1 -1
  182. package/version.mjs +1 -1
  183. package/resources/webhooks/events.d.mts +0 -30
  184. package/resources/webhooks/events.d.mts.map +0 -1
  185. package/resources/webhooks/events.d.ts +0 -30
  186. package/resources/webhooks/events.d.ts.map +0 -1
  187. package/resources/webhooks/events.js.map +0 -1
  188. package/resources/webhooks/events.mjs.map +0 -1
  189. package/resources/webhooks/index.d.mts +0 -4
  190. package/resources/webhooks/index.d.mts.map +0 -1
  191. package/resources/webhooks/index.d.ts +0 -4
  192. package/resources/webhooks/index.d.ts.map +0 -1
  193. package/resources/webhooks/index.js +0 -11
  194. package/resources/webhooks/index.js.map +0 -1
  195. package/resources/webhooks/index.mjs +0 -5
  196. package/resources/webhooks/index.mjs.map +0 -1
  197. package/resources/webhooks/subscriptions.d.mts +0 -237
  198. package/resources/webhooks/subscriptions.d.mts.map +0 -1
  199. package/resources/webhooks/subscriptions.d.ts +0 -237
  200. package/resources/webhooks/subscriptions.d.ts.map +0 -1
  201. package/resources/webhooks/subscriptions.js.map +0 -1
  202. package/resources/webhooks/subscriptions.mjs.map +0 -1
  203. package/resources/webhooks/webhooks.d.mts +0 -14
  204. package/resources/webhooks/webhooks.d.mts.map +0 -1
  205. package/resources/webhooks/webhooks.d.ts +0 -14
  206. package/resources/webhooks/webhooks.d.ts.map +0 -1
  207. package/resources/webhooks/webhooks.js +0 -21
  208. package/resources/webhooks/webhooks.js.map +0 -1
  209. package/resources/webhooks/webhooks.mjs +0 -16
  210. package/resources/webhooks/webhooks.mjs.map +0 -1
  211. package/resources/webhooks.d.mts +0 -2
  212. package/resources/webhooks.d.mts.map +0 -1
  213. package/resources/webhooks.d.ts +0 -2
  214. package/resources/webhooks.d.ts.map +0 -1
  215. package/resources/webhooks.js +0 -6
  216. package/resources/webhooks.js.map +0 -1
  217. package/resources/webhooks.mjs +0 -3
  218. package/resources/webhooks.mjs.map +0 -1
  219. package/src/resources/webhooks/events.ts +0 -55
  220. package/src/resources/webhooks/index.ts +0 -13
  221. package/src/resources/webhooks/subscriptions.ts +0 -409
  222. package/src/resources/webhooks/webhooks.ts +0 -37
  223. package/src/resources/webhooks.ts +0 -3
@@ -13,15 +13,6 @@ export class PhoneNumbers extends APIResource {
13
13
  list(options?: RequestOptions): APIPromise<PhoneNumberListResponse> {
14
14
  return this._client.get('/v3/phone_numbers', options);
15
15
  }
16
-
17
- /**
18
- * **Deprecated.** Use `GET /v3/phone_numbers` instead.
19
- *
20
- * @deprecated Use `list` instead, which calls `GET /v3/phone_numbers`.
21
- */
22
- listDeprecated(options?: RequestOptions): APIPromise<PhoneNumberListDeprecatedResponse> {
23
- return this._client.get('/v3/phonenumbers', options);
24
- }
25
16
  }
26
17
 
27
18
  export interface PhoneNumberListResponse {
@@ -45,61 +36,6 @@ export namespace PhoneNumberListResponse {
45
36
  }
46
37
  }
47
38
 
48
- export interface PhoneNumberListDeprecatedResponse {
49
- /**
50
- * List of phone numbers assigned to the partner
51
- */
52
- phone_numbers: Array<PhoneNumberListDeprecatedResponse.PhoneNumber>;
53
- }
54
-
55
- export namespace PhoneNumberListDeprecatedResponse {
56
- export interface PhoneNumber {
57
- /**
58
- * Unique identifier for the phone number
59
- */
60
- id: string;
61
-
62
- /**
63
- * Phone number in E.164 format
64
- */
65
- phone_number: string;
66
-
67
- capabilities?: PhoneNumber.Capabilities;
68
-
69
- /**
70
- * Deprecated. Always null.
71
- */
72
- country_code?: string;
73
-
74
- /**
75
- * Deprecated. Always null.
76
- */
77
- type?: 'TWILIO' | 'APPLE_ID';
78
- }
79
-
80
- export namespace PhoneNumber {
81
- export interface Capabilities {
82
- /**
83
- * Whether MMS messaging is supported
84
- */
85
- mms: boolean;
86
-
87
- /**
88
- * Whether SMS messaging is supported
89
- */
90
- sms: boolean;
91
-
92
- /**
93
- * Whether voice calls are supported
94
- */
95
- voice: boolean;
96
- }
97
- }
98
- }
99
-
100
39
  export declare namespace PhoneNumbers {
101
- export {
102
- type PhoneNumberListResponse as PhoneNumberListResponse,
103
- type PhoneNumberListDeprecatedResponse as PhoneNumberListDeprecatedResponse,
104
- };
40
+ export { type PhoneNumberListResponse as PhoneNumberListResponse };
105
41
  }
@@ -0,0 +1,72 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+
7
+ export class Phonenumbers extends APIResource {
8
+ /**
9
+ * **Deprecated.** Use `GET /v3/phone_numbers` instead.
10
+ *
11
+ * @deprecated
12
+ */
13
+ list(options?: RequestOptions): APIPromise<PhonenumberListResponse> {
14
+ return this._client.get('/v3/phonenumbers', options);
15
+ }
16
+ }
17
+
18
+ export interface PhonenumberListResponse {
19
+ /**
20
+ * List of phone numbers assigned to the partner
21
+ */
22
+ phone_numbers: Array<PhonenumberListResponse.PhoneNumber>;
23
+ }
24
+
25
+ export namespace PhonenumberListResponse {
26
+ export interface PhoneNumber {
27
+ /**
28
+ * Unique identifier for the phone number
29
+ */
30
+ id: string;
31
+
32
+ /**
33
+ * Phone number in E.164 format
34
+ */
35
+ phone_number: string;
36
+
37
+ capabilities?: PhoneNumber.Capabilities;
38
+
39
+ /**
40
+ * Deprecated. Always null.
41
+ */
42
+ country_code?: string;
43
+
44
+ /**
45
+ * Deprecated. Always null.
46
+ */
47
+ type?: 'TWILIO' | 'APPLE_ID';
48
+ }
49
+
50
+ export namespace PhoneNumber {
51
+ export interface Capabilities {
52
+ /**
53
+ * Whether MMS messaging is supported
54
+ */
55
+ mms: boolean;
56
+
57
+ /**
58
+ * Whether SMS messaging is supported
59
+ */
60
+ sms: boolean;
61
+
62
+ /**
63
+ * Whether voice calls are supported
64
+ */
65
+ voice: boolean;
66
+ }
67
+ }
68
+ }
69
+
70
+ export declare namespace Phonenumbers {
71
+ export { type PhonenumberListResponse as PhonenumberListResponse };
72
+ }
@@ -0,0 +1,57 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+
7
+ export class WebhookEvents extends APIResource {
8
+ /**
9
+ * Returns all available webhook event types that can be subscribed to. Use this
10
+ * endpoint to discover valid values for the `subscribed_events` field when
11
+ * creating or updating webhook subscriptions.
12
+ */
13
+ list(options?: RequestOptions): APIPromise<WebhookEventListResponse> {
14
+ return this._client.get('/v3/webhook-events', options);
15
+ }
16
+ }
17
+
18
+ /**
19
+ * Valid webhook event types that can be subscribed to
20
+ */
21
+ export type WebhookEventType =
22
+ | 'message.sent'
23
+ | 'message.received'
24
+ | 'message.read'
25
+ | 'message.delivered'
26
+ | 'message.failed'
27
+ | 'reaction.added'
28
+ | 'reaction.removed'
29
+ | 'participant.added'
30
+ | 'participant.removed'
31
+ | 'chat.created'
32
+ | 'chat.group_name_updated'
33
+ | 'chat.group_icon_updated'
34
+ | 'chat.group_name_update_failed'
35
+ | 'chat.group_icon_update_failed'
36
+ | 'chat.typing_indicator.started'
37
+ | 'chat.typing_indicator.stopped'
38
+ | 'phone_number.status_updated';
39
+
40
+ export interface WebhookEventListResponse {
41
+ /**
42
+ * URL to the webhook events documentation
43
+ */
44
+ doc_url: 'https://apidocs.linqapp.com/documentation/webhook-events';
45
+
46
+ /**
47
+ * List of all available webhook event types
48
+ */
49
+ events: Array<WebhookEventType>;
50
+ }
51
+
52
+ export declare namespace WebhookEvents {
53
+ export {
54
+ type WebhookEventType as WebhookEventType,
55
+ type WebhookEventListResponse as WebhookEventListResponse,
56
+ };
57
+ }
@@ -0,0 +1,238 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import * as WebhookEventsAPI from './webhook-events';
5
+ import { APIPromise } from '../core/api-promise';
6
+ import { buildHeaders } from '../internal/headers';
7
+ import { RequestOptions } from '../internal/request-options';
8
+ import { path } from '../internal/utils/path';
9
+
10
+ export class WebhookSubscriptions extends APIResource {
11
+ /**
12
+ * Create a new webhook subscription to receive events at a target URL. Upon
13
+ * creation, a signing secret is generated for verifying webhook authenticity.
14
+ * **Store this secret securely — it cannot be retrieved later.**
15
+ *
16
+ * **Webhook Delivery:**
17
+ *
18
+ * - Events are sent via HTTP POST to the target URL
19
+ * - Each request includes `X-Webhook-Signature` and `X-Webhook-Timestamp` headers
20
+ * - Signature is HMAC-SHA256 over `{timestamp}.{payload}` — see
21
+ * [Webhook Events](/docs/webhook-events) for verification details
22
+ * - Failed deliveries (5xx, 429, network errors) are retried up to 10 times over
23
+ * ~2 hours with exponential backoff
24
+ * - Client errors (4xx except 429) are not retried
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * const webhookSubscription =
29
+ * await client.webhookSubscriptions.create({
30
+ * subscribed_events: [
31
+ * 'message.sent',
32
+ * 'message.delivered',
33
+ * 'message.read',
34
+ * ],
35
+ * target_url: 'https://webhooks.example.com/linq/events',
36
+ * });
37
+ * ```
38
+ */
39
+ create(
40
+ body: WebhookSubscriptionCreateParams,
41
+ options?: RequestOptions,
42
+ ): APIPromise<WebhookSubscriptionCreateResponse> {
43
+ return this._client.post('/v3/webhook-subscriptions', { body, ...options });
44
+ }
45
+
46
+ /**
47
+ * Retrieve details for a specific webhook subscription including its target URL,
48
+ * subscribed events, and current status.
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * const webhookSubscription =
53
+ * await client.webhookSubscriptions.retrieve(
54
+ * 'b2c3d4e5-f6a7-8901-bcde-f23456789012',
55
+ * );
56
+ * ```
57
+ */
58
+ retrieve(subscriptionID: string, options?: RequestOptions): APIPromise<WebhookSubscription> {
59
+ return this._client.get(path`/v3/webhook-subscriptions/${subscriptionID}`, options);
60
+ }
61
+
62
+ /**
63
+ * Update an existing webhook subscription. You can modify the target URL,
64
+ * subscribed events, or activate/deactivate the subscription.
65
+ *
66
+ * **Note:** The signing secret cannot be changed via this endpoint.
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * const webhookSubscription =
71
+ * await client.webhookSubscriptions.update(
72
+ * 'b2c3d4e5-f6a7-8901-bcde-f23456789012',
73
+ * {
74
+ * target_url:
75
+ * 'https://webhooks.example.com/linq/events',
76
+ * },
77
+ * );
78
+ * ```
79
+ */
80
+ update(
81
+ subscriptionID: string,
82
+ body: WebhookSubscriptionUpdateParams,
83
+ options?: RequestOptions,
84
+ ): APIPromise<WebhookSubscription> {
85
+ return this._client.put(path`/v3/webhook-subscriptions/${subscriptionID}`, { body, ...options });
86
+ }
87
+
88
+ /**
89
+ * Retrieve all webhook subscriptions for the authenticated partner. Returns a list
90
+ * of active and inactive subscriptions with their configuration and status.
91
+ *
92
+ * @example
93
+ * ```ts
94
+ * const webhookSubscriptions =
95
+ * await client.webhookSubscriptions.list();
96
+ * ```
97
+ */
98
+ list(options?: RequestOptions): APIPromise<WebhookSubscriptionListResponse> {
99
+ return this._client.get('/v3/webhook-subscriptions', options);
100
+ }
101
+
102
+ /**
103
+ * Delete a webhook subscription.
104
+ *
105
+ * @example
106
+ * ```ts
107
+ * await client.webhookSubscriptions.delete(
108
+ * 'b2c3d4e5-f6a7-8901-bcde-f23456789012',
109
+ * );
110
+ * ```
111
+ */
112
+ delete(subscriptionID: string, options?: RequestOptions): APIPromise<void> {
113
+ return this._client.delete(path`/v3/webhook-subscriptions/${subscriptionID}`, {
114
+ ...options,
115
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
116
+ });
117
+ }
118
+ }
119
+
120
+ export interface WebhookSubscription {
121
+ /**
122
+ * Unique identifier for the webhook subscription
123
+ */
124
+ id: string;
125
+
126
+ /**
127
+ * When the subscription was created
128
+ */
129
+ created_at: string;
130
+
131
+ /**
132
+ * Whether this subscription is currently active
133
+ */
134
+ is_active: boolean;
135
+
136
+ /**
137
+ * List of event types this subscription receives
138
+ */
139
+ subscribed_events: Array<WebhookEventsAPI.WebhookEventType>;
140
+
141
+ /**
142
+ * URL where webhook events will be sent
143
+ */
144
+ target_url: string;
145
+
146
+ /**
147
+ * When the subscription was last updated
148
+ */
149
+ updated_at: string;
150
+ }
151
+
152
+ /**
153
+ * Response returned when creating a webhook subscription. Includes the signing
154
+ * secret which is only shown once.
155
+ */
156
+ export interface WebhookSubscriptionCreateResponse {
157
+ /**
158
+ * Unique identifier for the webhook subscription
159
+ */
160
+ id: string;
161
+
162
+ /**
163
+ * When the subscription was created
164
+ */
165
+ created_at: string;
166
+
167
+ /**
168
+ * Whether this subscription is currently active
169
+ */
170
+ is_active: boolean;
171
+
172
+ /**
173
+ * Secret for verifying webhook signatures. Store this securely - it cannot be
174
+ * retrieved again.
175
+ */
176
+ signing_secret: string;
177
+
178
+ /**
179
+ * List of event types this subscription receives
180
+ */
181
+ subscribed_events: Array<WebhookEventsAPI.WebhookEventType>;
182
+
183
+ /**
184
+ * URL where webhook events will be sent
185
+ */
186
+ target_url: string;
187
+
188
+ /**
189
+ * When the subscription was last updated
190
+ */
191
+ updated_at: string;
192
+ }
193
+
194
+ export interface WebhookSubscriptionListResponse {
195
+ /**
196
+ * List of webhook subscriptions
197
+ */
198
+ subscriptions: Array<WebhookSubscription>;
199
+ }
200
+
201
+ export interface WebhookSubscriptionCreateParams {
202
+ /**
203
+ * List of event types to subscribe to
204
+ */
205
+ subscribed_events: Array<WebhookEventsAPI.WebhookEventType>;
206
+
207
+ /**
208
+ * URL where webhook events will be sent. Must be HTTPS.
209
+ */
210
+ target_url: string;
211
+ }
212
+
213
+ export interface WebhookSubscriptionUpdateParams {
214
+ /**
215
+ * Activate or deactivate the subscription
216
+ */
217
+ is_active?: boolean;
218
+
219
+ /**
220
+ * Updated list of event types to subscribe to
221
+ */
222
+ subscribed_events?: Array<WebhookEventsAPI.WebhookEventType>;
223
+
224
+ /**
225
+ * New target URL for webhook events
226
+ */
227
+ target_url?: string;
228
+ }
229
+
230
+ export declare namespace WebhookSubscriptions {
231
+ export {
232
+ type WebhookSubscription as WebhookSubscription,
233
+ type WebhookSubscriptionCreateResponse as WebhookSubscriptionCreateResponse,
234
+ type WebhookSubscriptionListResponse as WebhookSubscriptionListResponse,
235
+ type WebhookSubscriptionCreateParams as WebhookSubscriptionCreateParams,
236
+ type WebhookSubscriptionUpdateParams as WebhookSubscriptionUpdateParams,
237
+ };
238
+ }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.0'; // x-release-please-version
1
+ export const VERSION = '0.1.3'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0";
1
+ export declare const VERSION = "0.1.3";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0";
1
+ export declare const VERSION = "0.1.3";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.1.0'; // x-release-please-version
4
+ exports.VERSION = '0.1.3'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.1.0'; // x-release-please-version
1
+ export const VERSION = '0.1.3'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
@@ -1,30 +0,0 @@
1
- import { APIResource } from "../../core/resource.mjs";
2
- import { APIPromise } from "../../core/api-promise.mjs";
3
- import { RequestOptions } from "../../internal/request-options.mjs";
4
- export declare class Events extends APIResource {
5
- /**
6
- * Returns all available webhook event types that can be subscribed to. Use this
7
- * endpoint to discover valid values for the `subscribed_events` field when
8
- * creating or updating webhook subscriptions.
9
- *
10
- * @example
11
- * ```ts
12
- * const events = await client.webhooks.events.list();
13
- * ```
14
- */
15
- list(options?: RequestOptions): APIPromise<EventListResponse>;
16
- }
17
- export interface EventListResponse {
18
- /**
19
- * URL to the webhook events documentation
20
- */
21
- doc_url: 'https://apidocs.linqapp.com/documentation/webhook-events';
22
- /**
23
- * List of all available webhook event types
24
- */
25
- events: Array<'message.sent' | 'message.received' | 'message.read' | 'message.delivered' | 'message.failed' | 'reaction.added' | 'reaction.removed' | 'participant.added' | 'participant.removed' | 'chat.created' | 'chat.group_name_updated' | 'chat.group_icon_updated' | 'chat.group_name_update_failed' | 'chat.group_icon_update_failed' | 'chat.typing_indicator.started' | 'chat.typing_indicator.stopped' | 'phone_number.status_updated'>;
26
- }
27
- export declare namespace Events {
28
- export { type EventListResponse as EventListResponse };
29
- }
30
- //# sourceMappingURL=events.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"events.d.mts","sourceRoot":"","sources":["../../src/resources/webhooks/events.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;CAG9D;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,OAAO,EAAE,0DAA0D,CAAC;IAEpE;;OAEG;IACH,MAAM,EAAE,KAAK,CACT,cAAc,GACd,kBAAkB,GAClB,cAAc,GACd,mBAAmB,GACnB,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,mBAAmB,GACnB,qBAAqB,GACrB,cAAc,GACd,yBAAyB,GACzB,yBAAyB,GACzB,+BAA+B,GAC/B,+BAA+B,GAC/B,+BAA+B,GAC/B,+BAA+B,GAC/B,6BAA6B,CAChC,CAAC;CACH;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACxD"}
@@ -1,30 +0,0 @@
1
- import { APIResource } from "../../core/resource.js";
2
- import { APIPromise } from "../../core/api-promise.js";
3
- import { RequestOptions } from "../../internal/request-options.js";
4
- export declare class Events extends APIResource {
5
- /**
6
- * Returns all available webhook event types that can be subscribed to. Use this
7
- * endpoint to discover valid values for the `subscribed_events` field when
8
- * creating or updating webhook subscriptions.
9
- *
10
- * @example
11
- * ```ts
12
- * const events = await client.webhooks.events.list();
13
- * ```
14
- */
15
- list(options?: RequestOptions): APIPromise<EventListResponse>;
16
- }
17
- export interface EventListResponse {
18
- /**
19
- * URL to the webhook events documentation
20
- */
21
- doc_url: 'https://apidocs.linqapp.com/documentation/webhook-events';
22
- /**
23
- * List of all available webhook event types
24
- */
25
- events: Array<'message.sent' | 'message.received' | 'message.read' | 'message.delivered' | 'message.failed' | 'reaction.added' | 'reaction.removed' | 'participant.added' | 'participant.removed' | 'chat.created' | 'chat.group_name_updated' | 'chat.group_icon_updated' | 'chat.group_name_update_failed' | 'chat.group_icon_update_failed' | 'chat.typing_indicator.started' | 'chat.typing_indicator.stopped' | 'phone_number.status_updated'>;
26
- }
27
- export declare namespace Events {
28
- export { type EventListResponse as EventListResponse };
29
- }
30
- //# sourceMappingURL=events.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/resources/webhooks/events.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;CAG9D;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,OAAO,EAAE,0DAA0D,CAAC;IAEpE;;OAEG;IACH,MAAM,EAAE,KAAK,CACT,cAAc,GACd,kBAAkB,GAClB,cAAc,GACd,mBAAmB,GACnB,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,mBAAmB,GACnB,qBAAqB,GACrB,cAAc,GACd,yBAAyB,GACzB,yBAAyB,GACzB,+BAA+B,GAC/B,+BAA+B,GAC/B,+BAA+B,GAC/B,+BAA+B,GAC/B,6BAA6B,CAChC,CAAC;CACH;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACxD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/resources/webhooks/events.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;CACF;AAdD,wBAcC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"events.mjs","sourceRoot":"","sources":["../../src/resources/webhooks/events.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;CACF"}
@@ -1,4 +0,0 @@
1
- export { Events, type EventListResponse } from "./events.mjs";
2
- export { Subscriptions, type SubscriptionCreateResponse, type SubscriptionRetrieveResponse, type SubscriptionUpdateResponse, type SubscriptionListResponse, type SubscriptionCreateParams, type SubscriptionUpdateParams, } from "./subscriptions.mjs";
3
- export { Webhooks } from "./webhooks.mjs";
4
- //# sourceMappingURL=index.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/webhooks/index.ts"],"names":[],"mappings":"OAEO,EAAE,MAAM,EAAE,KAAK,iBAAiB,EAAE;OAClC,EACL,aAAa,EACb,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,GAC9B;OACM,EAAE,QAAQ,EAAE"}
@@ -1,4 +0,0 @@
1
- export { Events, type EventListResponse } from "./events.js";
2
- export { Subscriptions, type SubscriptionCreateResponse, type SubscriptionRetrieveResponse, type SubscriptionUpdateResponse, type SubscriptionListResponse, type SubscriptionCreateParams, type SubscriptionUpdateParams, } from "./subscriptions.js";
3
- export { Webhooks } from "./webhooks.js";
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/webhooks/index.ts"],"names":[],"mappings":"OAEO,EAAE,MAAM,EAAE,KAAK,iBAAiB,EAAE;OAClC,EACL,aAAa,EACb,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,GAC9B;OACM,EAAE,QAAQ,EAAE"}
@@ -1,11 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Webhooks = exports.Subscriptions = exports.Events = void 0;
5
- var events_1 = require("./events.js");
6
- Object.defineProperty(exports, "Events", { enumerable: true, get: function () { return events_1.Events; } });
7
- var subscriptions_1 = require("./subscriptions.js");
8
- Object.defineProperty(exports, "Subscriptions", { enumerable: true, get: function () { return subscriptions_1.Subscriptions; } });
9
- var webhooks_1 = require("./webhooks.js");
10
- Object.defineProperty(exports, "Webhooks", { enumerable: true, get: function () { return webhooks_1.Webhooks; } });
11
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/webhooks/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAA0D;AAAjD,gGAAA,MAAM,OAAA;AACf,oDAQyB;AAPvB,8GAAA,aAAa,OAAA;AAQf,0CAAsC;AAA7B,oGAAA,QAAQ,OAAA"}
@@ -1,5 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- export { Events } from "./events.mjs";
3
- export { Subscriptions, } from "./subscriptions.mjs";
4
- export { Webhooks } from "./webhooks.mjs";
5
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/webhooks/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,MAAM,EAA0B;OAClC,EACL,aAAa,GAOd;OACM,EAAE,QAAQ,EAAE"}