@linqapp/sdk 0.1.3 → 0.1.5

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 (61) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/client.d.mts +5 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +5 -4
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/internal/tslib.js +6 -6
  9. package/package.json +1 -1
  10. package/resources/chats/chats.d.mts +7 -11
  11. package/resources/chats/chats.d.mts.map +1 -1
  12. package/resources/chats/chats.d.ts +7 -11
  13. package/resources/chats/chats.d.ts.map +1 -1
  14. package/resources/chats/chats.js.map +1 -1
  15. package/resources/chats/chats.mjs.map +1 -1
  16. package/resources/chats/index.d.mts +1 -1
  17. package/resources/chats/index.d.mts.map +1 -1
  18. package/resources/chats/index.d.ts +1 -1
  19. package/resources/chats/index.d.ts.map +1 -1
  20. package/resources/chats/index.js.map +1 -1
  21. package/resources/chats/index.mjs.map +1 -1
  22. package/resources/chats/messages.d.mts +3 -2
  23. package/resources/chats/messages.d.mts.map +1 -1
  24. package/resources/chats/messages.d.ts +3 -2
  25. package/resources/chats/messages.d.ts.map +1 -1
  26. package/resources/chats/messages.js.map +1 -1
  27. package/resources/chats/messages.mjs.map +1 -1
  28. package/resources/index.d.mts +3 -2
  29. package/resources/index.d.mts.map +1 -1
  30. package/resources/index.d.ts +3 -2
  31. package/resources/index.d.ts.map +1 -1
  32. package/resources/index.js +2 -0
  33. package/resources/index.js.map +1 -1
  34. package/resources/index.mjs +1 -0
  35. package/resources/index.mjs.map +1 -1
  36. package/resources/messages.d.mts +52 -11
  37. package/resources/messages.d.mts.map +1 -1
  38. package/resources/messages.d.ts +52 -11
  39. package/resources/messages.d.ts.map +1 -1
  40. package/resources/messages.js +1 -1
  41. package/resources/messages.mjs +1 -1
  42. package/resources/shared.d.mts +5 -0
  43. package/resources/shared.d.mts.map +1 -0
  44. package/resources/shared.d.ts +5 -0
  45. package/resources/shared.d.ts.map +1 -0
  46. package/resources/shared.js +4 -0
  47. package/resources/shared.js.map +1 -0
  48. package/resources/shared.mjs +3 -0
  49. package/resources/shared.mjs.map +1 -0
  50. package/src/client.ts +4 -2
  51. package/src/resources/chats/chats.ts +6 -12
  52. package/src/resources/chats/index.ts +0 -1
  53. package/src/resources/chats/messages.ts +3 -2
  54. package/src/resources/index.ts +2 -1
  55. package/src/resources/messages.ts +69 -10
  56. package/src/resources/shared.ts +6 -0
  57. package/src/version.ts +1 -1
  58. package/version.d.mts +1 -1
  59. package/version.d.ts +1 -1
  60. package/version.js +1 -1
  61. package/version.mjs +1 -1
package/src/client.ts CHANGED
@@ -35,6 +35,7 @@ import {
35
35
  MediaPart,
36
36
  Message,
37
37
  MessageAddReactionParams,
38
+ MessageAddReactionResponse,
38
39
  MessageDeleteParams,
39
40
  MessageEffect,
40
41
  MessageRetrieveThreadParams,
@@ -67,7 +68,6 @@ import {
67
68
  ChatUpdateParams,
68
69
  Chats,
69
70
  MessageContent,
70
- ServiceType,
71
71
  } from './resources/chats/chats';
72
72
  import { type Fetch } from './internal/builtin-types';
73
73
  import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
@@ -810,7 +810,6 @@ export declare namespace LinqAPIV3 {
810
810
  Chats as Chats,
811
811
  type Chat as Chat,
812
812
  type MessageContent as MessageContent,
813
- type ServiceType as ServiceType,
814
813
  type ChatCreateResponse as ChatCreateResponse,
815
814
  type ChatListResponse as ChatListResponse,
816
815
  type ChatSendVoicememoResponse as ChatSendVoicememoResponse,
@@ -830,6 +829,7 @@ export declare namespace LinqAPIV3 {
830
829
  type ReactionType as ReactionType,
831
830
  type ReplyTo as ReplyTo,
832
831
  type TextPart as TextPart,
832
+ type MessageAddReactionResponse as MessageAddReactionResponse,
833
833
  type MessageRetrieveThreadResponse as MessageRetrieveThreadResponse,
834
834
  type MessageDeleteParams as MessageDeleteParams,
835
835
  type MessageAddReactionParams as MessageAddReactionParams,
@@ -870,4 +870,6 @@ export declare namespace LinqAPIV3 {
870
870
  type CapabilityCheckImessageParams as CapabilityCheckImessageParams,
871
871
  type CapabilityCheckRcsParams as CapabilityCheckRcsParams,
872
872
  };
873
+
874
+ export type ServiceType = API.ServiceType;
873
875
  }
@@ -1,8 +1,8 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
- import * as ChatsAPI from './chats';
5
4
  import * as MessagesAPI from '../messages';
5
+ import * as Shared from '../shared';
6
6
  import * as ChatsMessagesAPI from './messages';
7
7
  import {
8
8
  MessageListParams,
@@ -244,7 +244,7 @@ export interface Chat {
244
244
  /**
245
245
  * Messaging service type
246
246
  */
247
- service?: ServiceType | null;
247
+ service?: Shared.ServiceType | null;
248
248
  }
249
249
 
250
250
  /**
@@ -293,7 +293,7 @@ export interface MessageContent {
293
293
  /**
294
294
  * Messaging service type
295
295
  */
296
- preferred_service?: ServiceType;
296
+ preferred_service?: Shared.ServiceType;
297
297
 
298
298
  /**
299
299
  * Reply to another message to create a threaded conversation
@@ -375,11 +375,6 @@ export namespace MessageContent {
375
375
  }
376
376
  }
377
377
 
378
- /**
379
- * Messaging service type
380
- */
381
- export type ServiceType = 'iMessage' | 'SMS' | 'RCS';
382
-
383
378
  /**
384
379
  * Response for creating a new chat with an initial message
385
380
  */
@@ -419,7 +414,7 @@ export namespace ChatCreateResponse {
419
414
  /**
420
415
  * Messaging service type
421
416
  */
422
- service: ChatsAPI.ServiceType;
417
+ service: Shared.ServiceType;
423
418
  }
424
419
  }
425
420
 
@@ -477,7 +472,7 @@ export namespace ChatSendVoicememoResponse {
477
472
  /**
478
473
  * Messaging service type
479
474
  */
480
- service?: ChatsAPI.ServiceType | null;
475
+ service?: Shared.ServiceType | null;
481
476
  }
482
477
 
483
478
  export namespace VoiceMemo {
@@ -505,7 +500,7 @@ export namespace ChatSendVoicememoResponse {
505
500
  /**
506
501
  * Messaging service type
507
502
  */
508
- service: ChatsAPI.ServiceType;
503
+ service: Shared.ServiceType;
509
504
  }
510
505
 
511
506
  export interface VoiceMemo {
@@ -615,7 +610,6 @@ export declare namespace Chats {
615
610
  export {
616
611
  type Chat as Chat,
617
612
  type MessageContent as MessageContent,
618
- type ServiceType as ServiceType,
619
613
  type ChatCreateResponse as ChatCreateResponse,
620
614
  type ChatListResponse as ChatListResponse,
621
615
  type ChatSendVoicememoResponse as ChatSendVoicememoResponse,
@@ -4,7 +4,6 @@ export {
4
4
  Chats,
5
5
  type Chat,
6
6
  type MessageContent,
7
- type ServiceType,
8
7
  type ChatCreateResponse,
9
8
  type ChatListResponse,
10
9
  type ChatSendVoicememoResponse,
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as MessagesAPI from '../messages';
5
+ import * as Shared from '../shared';
5
6
  import * as ChatsAPI from './chats';
6
7
  import { APIPromise } from '../../core/api-promise';
7
8
  import { RequestOptions } from '../../internal/request-options';
@@ -108,7 +109,7 @@ export interface SentMessage {
108
109
  /**
109
110
  * Messaging service type
110
111
  */
111
- preferred_service?: ChatsAPI.ServiceType | null;
112
+ preferred_service?: Shared.ServiceType | null;
112
113
 
113
114
  /**
114
115
  * Indicates this message is a threaded reply to another message
@@ -118,7 +119,7 @@ export interface SentMessage {
118
119
  /**
119
120
  * Messaging service type
120
121
  */
121
- service?: ChatsAPI.ServiceType | null;
122
+ service?: Shared.ServiceType | null;
122
123
  }
123
124
 
124
125
  export interface MessageListResponse {
@@ -1,5 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ export * from './shared';
3
4
  export {
4
5
  Attachments,
5
6
  type SupportedContentType,
@@ -18,7 +19,6 @@ export {
18
19
  Chats,
19
20
  type Chat,
20
21
  type MessageContent,
21
- type ServiceType,
22
22
  type ChatCreateResponse,
23
23
  type ChatListResponse,
24
24
  type ChatSendVoicememoResponse,
@@ -37,6 +37,7 @@ export {
37
37
  type ReactionType,
38
38
  type ReplyTo,
39
39
  type TextPart,
40
+ type MessageAddReactionResponse,
40
41
  type MessageRetrieveThreadResponse,
41
42
  type MessageDeleteParams,
42
43
  type MessageAddReactionParams,
@@ -1,7 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
- import * as ChatsAPI from './chats/chats';
4
+ import * as Shared from './shared';
5
5
  import { APIPromise } from '../core/api-promise';
6
6
  import { buildHeaders } from '../internal/headers';
7
7
  import { RequestOptions } from '../internal/request-options';
@@ -62,7 +62,7 @@ export class Messages extends APIResource {
62
62
  *
63
63
  * @example
64
64
  * ```ts
65
- * const reaction = await client.messages.addReaction(
65
+ * const response = await client.messages.addReaction(
66
66
  * '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
67
67
  * { operation: 'add', type: 'love' },
68
68
  * );
@@ -72,7 +72,7 @@ export class Messages extends APIResource {
72
72
  messageID: string,
73
73
  body: MessageAddReactionParams,
74
74
  options?: RequestOptions,
75
- ): APIPromise<Reaction> {
75
+ ): APIPromise<MessageAddReactionResponse> {
76
76
  return this._client.post(path`/v3/messages/${messageID}/reactions`, { body, ...options });
77
77
  }
78
78
 
@@ -119,7 +119,7 @@ export interface ChatHandle {
119
119
  /**
120
120
  * Messaging service type
121
121
  */
122
- service: ChatsAPI.ServiceType;
122
+ service: Shared.ServiceType;
123
123
 
124
124
  /**
125
125
  * Whether this handle belongs to the sender (your phone number)
@@ -242,7 +242,7 @@ export interface Message {
242
242
  /**
243
243
  * Messaging service type
244
244
  */
245
- preferred_service?: ChatsAPI.ServiceType | null;
245
+ preferred_service?: Shared.ServiceType | null;
246
246
 
247
247
  /**
248
248
  * When the message was read
@@ -262,7 +262,7 @@ export interface Message {
262
262
  /**
263
263
  * Messaging service type
264
264
  */
265
- service?: ChatsAPI.ServiceType | null;
265
+ service?: Shared.ServiceType | null;
266
266
  }
267
267
 
268
268
  /**
@@ -295,7 +295,8 @@ export interface Reaction {
295
295
  /**
296
296
  * Type of reaction. Standard iMessage tapbacks are love, like, dislike, laugh,
297
297
  * emphasize, question. Custom emoji reactions have type "custom" with the actual
298
- * emoji in the custom_emoji field.
298
+ * emoji in the custom_emoji field. Sticker reactions have type "sticker" with
299
+ * sticker attachment details in the sticker field.
299
300
  */
300
301
  type: ReactionType;
301
302
 
@@ -303,14 +304,62 @@ export interface Reaction {
303
304
  * Custom emoji if type is "custom", null otherwise
304
305
  */
305
306
  custom_emoji?: string | null;
307
+
308
+ /**
309
+ * Sticker attachment details when reaction_type is "sticker". Null for non-sticker
310
+ * reactions.
311
+ */
312
+ sticker?: Reaction.Sticker | null;
313
+ }
314
+
315
+ export namespace Reaction {
316
+ /**
317
+ * Sticker attachment details when reaction_type is "sticker". Null for non-sticker
318
+ * reactions.
319
+ */
320
+ export interface Sticker {
321
+ /**
322
+ * Filename of the sticker
323
+ */
324
+ file_name?: string;
325
+
326
+ /**
327
+ * Sticker image height in pixels
328
+ */
329
+ height?: number;
330
+
331
+ /**
332
+ * MIME type of the sticker image
333
+ */
334
+ mime_type?: string;
335
+
336
+ /**
337
+ * Presigned URL for downloading the sticker image (expires in 1 hour).
338
+ */
339
+ url?: string;
340
+
341
+ /**
342
+ * Sticker image width in pixels
343
+ */
344
+ width?: number;
345
+ }
306
346
  }
307
347
 
308
348
  /**
309
349
  * Type of reaction. Standard iMessage tapbacks are love, like, dislike, laugh,
310
350
  * emphasize, question. Custom emoji reactions have type "custom" with the actual
311
- * emoji in the custom_emoji field.
351
+ * emoji in the custom_emoji field. Sticker reactions have type "sticker" with
352
+ * sticker attachment details in the sticker field.
312
353
  */
313
- export type ReactionType = 'love' | 'like' | 'dislike' | 'laugh' | 'emphasize' | 'question' | 'custom';
354
+ export type ReactionType =
355
+ | 'love'
356
+ | 'like'
357
+ | 'dislike'
358
+ | 'laugh'
359
+ | 'emphasize'
360
+ | 'question'
361
+ | 'custom'
362
+ | 'sticker';
314
363
 
315
364
  /**
316
365
  * Indicates this message is a threaded reply to another message
@@ -349,6 +398,14 @@ export interface TextPart {
349
398
  value: string;
350
399
  }
351
400
 
401
+ export interface MessageAddReactionResponse {
402
+ message?: string;
403
+
404
+ status?: string;
405
+
406
+ trace_id?: string;
407
+ }
408
+
352
409
  /**
353
410
  * Response containing messages in a thread with pagination
354
411
  */
@@ -380,7 +437,8 @@ export interface MessageAddReactionParams {
380
437
  /**
381
438
  * Type of reaction. Standard iMessage tapbacks are love, like, dislike, laugh,
382
439
  * emphasize, question. Custom emoji reactions have type "custom" with the actual
383
- * emoji in the custom_emoji field.
440
+ * emoji in the custom_emoji field. Sticker reactions have type "sticker" with
441
+ * sticker attachment details in the sticker field.
384
442
  */
385
443
  type: ReactionType;
386
444
 
@@ -423,6 +481,7 @@ export declare namespace Messages {
423
481
  type ReactionType as ReactionType,
424
482
  type ReplyTo as ReplyTo,
425
483
  type TextPart as TextPart,
484
+ type MessageAddReactionResponse as MessageAddReactionResponse,
426
485
  type MessageRetrieveThreadResponse as MessageRetrieveThreadResponse,
427
486
  type MessageDeleteParams as MessageDeleteParams,
428
487
  type MessageAddReactionParams as MessageAddReactionParams,
@@ -0,0 +1,6 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ /**
4
+ * Messaging service type
5
+ */
6
+ export type ServiceType = 'iMessage' | 'SMS' | 'RCS';
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.3'; // x-release-please-version
1
+ export const VERSION = '0.1.5'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.3";
1
+ export declare const VERSION = "0.1.5";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.3";
1
+ export declare const VERSION = "0.1.5";
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.3'; // x-release-please-version
4
+ exports.VERSION = '0.1.5'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.1.3'; // x-release-please-version
1
+ export const VERSION = '0.1.5'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map