@lorikeetai/node-sdk 0.12.0 → 0.13.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.
@@ -5,14 +5,47 @@ import * as Core from '../../core';
5
5
  import { pollUntil } from "../../lib/poll-until";
6
6
 
7
7
  export class Email extends APIResource {
8
+ /**
9
+ * @example
10
+ * ```ts
11
+ * const response = await client.conversation.email.generate({
12
+ * attachments: [
13
+ * {
14
+ * name: 'example.jpg',
15
+ * type: 'image/jpeg',
16
+ * url: 'https://example.com/example.jpg',
17
+ * },
18
+ * ],
19
+ * conversationId: 'conversationId',
20
+ * message: 'message',
21
+ * });
22
+ * ```
23
+ */
8
24
  generate(body: EmailGenerateParams, options?: Core.RequestOptions): Core.APIPromise<EmailGenerateResponse> {
9
25
  return this._client.post('/v1/conversation/email/message', { body, ...options });
10
26
  }
11
27
 
28
+ /**
29
+ * @example
30
+ * ```ts
31
+ * const email = await client.conversation.email.get({
32
+ * conversationId: 'conversationId',
33
+ * });
34
+ * ```
35
+ */
12
36
  get(query: EmailGetParams, options?: Core.RequestOptions): Core.APIPromise<EmailGetResponse> {
13
37
  return this._client.get('/v1/conversation/email/message', { query, ...options });
14
38
  }
15
39
 
40
+ /**
41
+ * @example
42
+ * ```ts
43
+ * const response = await client.conversation.email.start({
44
+ * customerId: 'customerId',
45
+ * publicKey: 'publicKey',
46
+ * });
47
+ * ```
48
+ */
16
49
  start(body: EmailStartParams, options?: Core.RequestOptions): Core.APIPromise<EmailStartResponse> {
17
50
  return this._client.post('/v1/conversation/email/create', { body, ...options });
18
51
  }
@@ -117,7 +150,8 @@ export namespace EmailGenerateResponse {
117
150
  | 'ESCALATED'
118
151
  | 'ESCALATION_REQUEST'
119
152
  | 'PROCESSING_CANCELLED'
120
- | 'HOSTILE_MESSAGE';
153
+ | 'HOSTILE_MESSAGE'
154
+ | 'NEW_TICKET';
121
155
  }
122
156
 
123
157
  export interface Message {
@@ -241,7 +275,8 @@ export namespace EmailGetResponse {
241
275
  | 'ESCALATED'
242
276
  | 'ESCALATION_REQUEST'
243
277
  | 'PROCESSING_CANCELLED'
244
- | 'HOSTILE_MESSAGE';
278
+ | 'HOSTILE_MESSAGE'
279
+ | 'NEW_TICKET';
245
280
  }
246
281
 
247
282
  export interface Message {
@@ -350,7 +385,8 @@ export namespace EmailStartResponse {
350
385
  | 'ESCALATED'
351
386
  | 'ESCALATION_REQUEST'
352
387
  | 'PROCESSING_CANCELLED'
353
- | 'HOSTILE_MESSAGE';
388
+ | 'HOSTILE_MESSAGE'
389
+ | 'NEW_TICKET';
354
390
  }
355
391
  }
356
392
 
@@ -4,10 +4,24 @@ import { APIResource } from '../resource';
4
4
  import * as Core from '../core';
5
5
 
6
6
  export class Customer extends APIResource {
7
+ /**
8
+ * @example
9
+ * ```ts
10
+ * const customer = await client.customer.create();
11
+ * ```
12
+ */
7
13
  create(body: CustomerCreateParams, options?: Core.RequestOptions): Core.APIPromise<CustomerCreateResponse> {
8
14
  return this._client.post('/v1/customer', { body, ...options });
9
15
  }
10
16
 
17
+ /**
18
+ * @example
19
+ * ```ts
20
+ * const customer = await client.customer.update(
21
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
22
+ * );
23
+ * ```
24
+ */
11
25
  update(
12
26
  id: string,
13
27
  body: CustomerUpdateParams,
@@ -16,10 +30,24 @@ export class Customer extends APIResource {
16
30
  return this._client.put(`/v1/customer/${id}`, { body, ...options });
17
31
  }
18
32
 
33
+ /**
34
+ * @example
35
+ * ```ts
36
+ * const customer = await client.customer.get(
37
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
38
+ * );
39
+ * ```
40
+ */
19
41
  get(id: string, options?: Core.RequestOptions): Core.APIPromise<CustomerGetResponse> {
20
42
  return this._client.get(`/v1/customer/${id}`, options);
21
43
  }
22
44
 
45
+ /**
46
+ * @example
47
+ * ```ts
48
+ * const response = await client.customer.token();
49
+ * ```
50
+ */
23
51
  token(body: CustomerTokenParams, options?: Core.RequestOptions): Core.APIPromise<string> {
24
52
  return this._client.post('/v1/customer/token', { body, ...options });
25
53
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.12.0'; // x-release-please-version
1
+ export const VERSION = '0.13.1'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.12.0";
1
+ export declare const VERSION = "0.13.1";
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.12.0'; // x-release-please-version
4
+ exports.VERSION = '0.13.1'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.12.0'; // x-release-please-version
1
+ export const VERSION = '0.13.1'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map