@lorikeetai/node-sdk 1.1.0 → 1.3.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.
Files changed (59) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/core.js +3 -3
  3. package/core.js.map +1 -1
  4. package/core.mjs +3 -3
  5. package/core.mjs.map +1 -1
  6. package/package.json +1 -1
  7. package/resources/conversation/chat.d.ts +6 -3
  8. package/resources/conversation/chat.d.ts.map +1 -1
  9. package/resources/conversation/conversation.d.ts +4 -0
  10. package/resources/conversation/conversation.d.ts.map +1 -1
  11. package/resources/conversation/conversation.js +4 -0
  12. package/resources/conversation/conversation.js.map +1 -1
  13. package/resources/conversation/conversation.mjs +4 -0
  14. package/resources/conversation/conversation.mjs.map +1 -1
  15. package/resources/conversation/email.d.ts +6 -3
  16. package/resources/conversation/email.d.ts.map +1 -1
  17. package/resources/conversation/index.d.ts +1 -0
  18. package/resources/conversation/index.d.ts.map +1 -1
  19. package/resources/conversation/index.js +3 -1
  20. package/resources/conversation/index.js.map +1 -1
  21. package/resources/conversation/index.mjs +1 -0
  22. package/resources/conversation/index.mjs.map +1 -1
  23. package/resources/conversation/voice.d.ts +42 -0
  24. package/resources/conversation/voice.d.ts.map +1 -0
  25. package/resources/conversation/voice.js +24 -0
  26. package/resources/conversation/voice.js.map +1 -0
  27. package/resources/conversation/voice.mjs +20 -0
  28. package/resources/conversation/voice.mjs.map +1 -0
  29. package/resources/customer/customer.d.ts +4 -0
  30. package/resources/customer/customer.d.ts.map +1 -1
  31. package/resources/customer/customer.js +4 -0
  32. package/resources/customer/customer.js.map +1 -1
  33. package/resources/customer/customer.mjs +4 -0
  34. package/resources/customer/customer.mjs.map +1 -1
  35. package/resources/customer/index.d.ts +1 -0
  36. package/resources/customer/index.d.ts.map +1 -1
  37. package/resources/customer/index.js +3 -1
  38. package/resources/customer/index.js.map +1 -1
  39. package/resources/customer/index.mjs +1 -0
  40. package/resources/customer/index.mjs.map +1 -1
  41. package/resources/customer/remote.d.ts +151 -0
  42. package/resources/customer/remote.d.ts.map +1 -0
  43. package/resources/customer/remote.js +29 -0
  44. package/resources/customer/remote.js.map +1 -0
  45. package/resources/customer/remote.mjs +25 -0
  46. package/resources/customer/remote.mjs.map +1 -0
  47. package/src/core.ts +3 -3
  48. package/src/resources/conversation/chat.ts +6 -3
  49. package/src/resources/conversation/conversation.ts +6 -0
  50. package/src/resources/conversation/email.ts +6 -3
  51. package/src/resources/conversation/index.ts +1 -0
  52. package/src/resources/conversation/voice.ts +56 -0
  53. package/src/resources/customer/customer.ts +11 -0
  54. package/src/resources/customer/index.ts +1 -0
  55. package/src/resources/customer/remote.ts +195 -0
  56. package/src/version.ts +1 -1
  57. package/version.d.ts +1 -1
  58. package/version.js +1 -1
  59. package/version.mjs +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/conversation/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,IAAI,GAOL;OACM,EACL,YAAY,GAQb;OACM,EACL,KAAK,GAON"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/conversation/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,IAAI,GAOL;OACM,EACL,YAAY,GAQb;OACM,EACL,KAAK,GAON;OACM,EAAE,KAAK,EAA4B"}
@@ -0,0 +1,42 @@
1
+ import { APIResource } from "../../resource.js";
2
+ import * as Core from "../../core.js";
3
+ export declare class Voice extends APIResource {
4
+ /**
5
+ * @example
6
+ * ```ts
7
+ * await client.conversation.voice.outbound({
8
+ * phoneNumber: '+61400000000',
9
+ * });
10
+ * ```
11
+ */
12
+ outbound(body: VoiceOutboundParams, options?: Core.RequestOptions): Core.APIPromise<void>;
13
+ }
14
+ export interface VoiceOutboundParams {
15
+ /**
16
+ * The phone number to call in E.164 format. If a customer ID is not provided, the
17
+ * customer will be looked up by phone number. If no customer is found, a new
18
+ * customer will be created.
19
+ */
20
+ phoneNumber: string;
21
+ /**
22
+ * The ID of the brand to make the call from
23
+ */
24
+ brandId?: string;
25
+ /**
26
+ * The ID of the customer to call. If not provided, the customer will be looked up
27
+ * by phone number. If no customer is found, a new customer will be created.
28
+ */
29
+ customerId?: string;
30
+ /**
31
+ * The input data to pass to the workflow. Only used if a workflow is specified.
32
+ */
33
+ inputData?: unknown;
34
+ /**
35
+ * The ID of the workflow to use for the call
36
+ */
37
+ workflowId?: string;
38
+ }
39
+ export declare namespace Voice {
40
+ export { type VoiceOutboundParams as VoiceOutboundParams };
41
+ }
42
+ //# sourceMappingURL=voice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["../../src/resources/conversation/voice.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;CAO1F;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,CAAC;CAC5D"}
@@ -0,0 +1,24 @@
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.Voice = void 0;
5
+ const resource_1 = require("../../resource.js");
6
+ class Voice extends resource_1.APIResource {
7
+ /**
8
+ * @example
9
+ * ```ts
10
+ * await client.conversation.voice.outbound({
11
+ * phoneNumber: '+61400000000',
12
+ * });
13
+ * ```
14
+ */
15
+ outbound(body, options) {
16
+ return this._client.post('/v1/conversation/voice/outbound', {
17
+ body,
18
+ ...options,
19
+ headers: { Accept: '*/*', ...options?.headers },
20
+ });
21
+ }
22
+ }
23
+ exports.Voice = Voice;
24
+ //# sourceMappingURL=voice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice.js","sourceRoot":"","sources":["../../src/resources/conversation/voice.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAG7C,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAyB,EAAE,OAA6B;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iCAAiC,EAAE;YAC1D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;CACF;AAhBD,sBAgBC"}
@@ -0,0 +1,20 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../resource.mjs";
3
+ export class Voice extends APIResource {
4
+ /**
5
+ * @example
6
+ * ```ts
7
+ * await client.conversation.voice.outbound({
8
+ * phoneNumber: '+61400000000',
9
+ * });
10
+ * ```
11
+ */
12
+ outbound(body, options) {
13
+ return this._client.post('/v1/conversation/voice/outbound', {
14
+ body,
15
+ ...options,
16
+ headers: { Accept: '*/*', ...options?.headers },
17
+ });
18
+ }
19
+ }
20
+ //# sourceMappingURL=voice.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice.mjs","sourceRoot":"","sources":["../../src/resources/conversation/voice.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAyB,EAAE,OAA6B;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iCAAiC,EAAE;YAC1D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -2,7 +2,10 @@ import { APIResource } from "../../resource.js";
2
2
  import * as Core from "../../core.js";
3
3
  import * as ProfileAPI from "./profile.js";
4
4
  import { Profile, ProfileSyncParams, ProfileSyncResponse } from "./profile.js";
5
+ import * as RemoteAPI from "./remote.js";
6
+ import { Remote, RemoteGetResponse, RemoteUpdateParams, RemoteUpdateResponse } from "./remote.js";
5
7
  export declare class Customer extends APIResource {
8
+ remote: RemoteAPI.Remote;
6
9
  profile: ProfileAPI.Profile;
7
10
  /**
8
11
  * @example
@@ -291,6 +294,7 @@ export interface CustomerTokenParams {
291
294
  }
292
295
  export declare namespace Customer {
293
296
  export { type CustomerCreateResponse as CustomerCreateResponse, type CustomerUpdateResponse as CustomerUpdateResponse, type CustomerGetResponse as CustomerGetResponse, type CustomerTokenResponse as CustomerTokenResponse, type CustomerCreateParams as CustomerCreateParams, type CustomerUpdateParams as CustomerUpdateParams, type CustomerTokenParams as CustomerTokenParams, };
297
+ export { Remote as Remote, type RemoteUpdateResponse as RemoteUpdateResponse, type RemoteGetResponse as RemoteGetResponse, type RemoteUpdateParams as RemoteUpdateParams, };
294
298
  export { Profile as Profile, type ProfileSyncResponse as ProfileSyncResponse, type ProfileSyncParams as ProfileSyncParams, };
295
299
  }
296
300
  //# sourceMappingURL=customer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"customer.d.ts","source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I,oBAAoB,EACjD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
@@ -28,9 +28,12 @@ exports.Customer = void 0;
28
28
  const resource_1 = require("../../resource.js");
29
29
  const ProfileAPI = __importStar(require("./profile.js"));
30
30
  const profile_1 = require("./profile.js");
31
+ const RemoteAPI = __importStar(require("./remote.js"));
32
+ const remote_1 = require("./remote.js");
31
33
  class Customer extends resource_1.APIResource {
32
34
  constructor() {
33
35
  super(...arguments);
36
+ this.remote = new RemoteAPI.Remote(this._client);
34
37
  this.profile = new ProfileAPI.Profile(this._client);
35
38
  }
36
39
  /**
@@ -75,5 +78,6 @@ class Customer extends resource_1.APIResource {
75
78
  }
76
79
  }
77
80
  exports.Customer = Customer;
81
+ Customer.Remote = remote_1.Remote;
78
82
  Customer.Profile = profile_1.Profile;
79
83
  //# sourceMappingURL=customer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"customer.js","sourceRoot":"","sources":["../../src/resources/customer/customer.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAE7C,yDAAwC;AACxC,0CAA4E;AAE5E,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiDrE,CAAC;IA/CC;;;;;OAKG;IACH,MAAM,CAAC,IAA0B,EAAE,OAA6B;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cA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,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CACJ,EAAU,EACV,IAA0B,EAC1B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;OAOG;IACH,GAAG,CAAC,EAAU,EAAE,OAA6B;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,IAAyB,EAAE,OAA6B;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;CACF;AAnDD,4BAmDC;AAsTD,QAAQ,CAAC,MAAM,GAAG,eAAM,CAAC;AACzB,QAAQ,CAAC,OAAO,GAAG,iBAAO,CAAC"}
@@ -2,9 +2,12 @@
2
2
  import { APIResource } from "../../resource.mjs";
3
3
  import * as ProfileAPI from "./profile.mjs";
4
4
  import { Profile } from "./profile.mjs";
5
+ import * as RemoteAPI from "./remote.mjs";
6
+ import { Remote } from "./remote.mjs";
5
7
  export class Customer extends APIResource {
6
8
  constructor() {
7
9
  super(...arguments);
10
+ this.remote = new RemoteAPI.Remote(this._client);
8
11
  this.profile = new ProfileAPI.Profile(this._client);
9
12
  }
10
13
  /**
@@ -48,5 +51,6 @@ export class Customer extends APIResource {
48
51
  return this._client.post('/v1/customer/token', { body, ...options });
49
52
  }
50
53
  }
54
+ Customer.Remote = Remote;
51
55
  Customer.Profile = Profile;
52
56
  //# sourceMappingURL=customer.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"customer.mjs","sourceRoot":"","sources":["../../src/resources/customer/customer.ts"],"names":[],"mappings":"AAAA,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E,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiDrE,CAAC;IA/CC;;;;;OAKG;IACH,MAAM,CAAC,IAA0B,EAAE,OAA6B;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CACJ,EAAU,EACV,IAA0B,EAC1B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;OAOG;IACH,GAAG,CAAC,EAAU,EAAE,OAA6B;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,IAAyB,EAAE,OAA6B;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;CACF;AAsTD,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;AACzB,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export { Customer, type CustomerCreateResponse, type CustomerUpdateResponse, type CustomerGetResponse, type CustomerTokenResponse, type CustomerCreateParams, type CustomerUpdateParams, type CustomerTokenParams, } from "./customer.js";
2
2
  export { Profile, type ProfileSyncResponse, type ProfileSyncParams } from "./profile.js";
3
+ export { Remote, type RemoteUpdateResponse, type RemoteGetResponse, type RemoteUpdateParams } from "./remote.js";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/customer/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/customer/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACtF,OAAO,EAAE,MAAM,EAAE,KAAK,oBAAoB,EAAE,KAAK,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC"}
@@ -1,9 +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.Profile = exports.Customer = void 0;
4
+ exports.Remote = exports.Profile = exports.Customer = void 0;
5
5
  var customer_1 = require("./customer.js");
6
6
  Object.defineProperty(exports, "Customer", { enumerable: true, get: function () { return customer_1.Customer; } });
7
7
  var profile_1 = require("./profile.js");
8
8
  Object.defineProperty(exports, "Profile", { enumerable: true, get: function () { return profile_1.Profile; } });
9
+ var remote_1 = require("./remote.js");
10
+ Object.defineProperty(exports, "Remote", { enumerable: true, get: function () { return remote_1.Remote; } });
9
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/customer/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0CASoB;AARlB,oGAAA,QAAQ,OAAA;AASV,wCAAsF;AAA7E,kGAAA,OAAO,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/customer/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0CASoB;AARlB,oGAAA,QAAQ,OAAA;AASV,wCAAsF;AAA7E,kGAAA,OAAO,OAAA;AAChB,sCAA8G;AAArG,gGAAA,MAAM,OAAA"}
@@ -1,4 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  export { Customer, } from "./customer.mjs";
3
3
  export { Profile } from "./profile.mjs";
4
+ export { Remote } from "./remote.mjs";
4
5
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/customer/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,QAAQ,GAQT;OACM,EAAE,OAAO,EAAoD"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/customer/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,QAAQ,GAQT;OACM,EAAE,OAAO,EAAoD;OAC7D,EAAE,MAAM,EAA8E"}
@@ -0,0 +1,151 @@
1
+ import { APIResource } from "../../resource.js";
2
+ import * as Core from "../../core.js";
3
+ export declare class Remote extends APIResource {
4
+ /**
5
+ * @example
6
+ * ```ts
7
+ * const remote = await client.customer.remote.update(
8
+ * 'remoteId',
9
+ * );
10
+ * ```
11
+ */
12
+ update(pathRemoteId: string, body: RemoteUpdateParams, options?: Core.RequestOptions): Core.APIPromise<RemoteUpdateResponse>;
13
+ /**
14
+ * @example
15
+ * ```ts
16
+ * const remote = await client.customer.remote.get('remoteId');
17
+ * ```
18
+ */
19
+ get(remoteId: string, options?: Core.RequestOptions): Core.APIPromise<RemoteGetResponse>;
20
+ }
21
+ export interface RemoteUpdateResponse {
22
+ /**
23
+ * The id of the customer in the subscriber system
24
+ */
25
+ id: string;
26
+ /**
27
+ * The timestamp of the when the customer was created in our system
28
+ */
29
+ createdAt: string;
30
+ /**
31
+ * The URL of the customer avatar
32
+ */
33
+ avatarUrl?: string;
34
+ /**
35
+ * The display name of the customer
36
+ */
37
+ displayName?: string;
38
+ /**
39
+ * The email of the customer
40
+ */
41
+ email?: string;
42
+ /**
43
+ * The first name of the customer
44
+ */
45
+ firstName?: string;
46
+ /**
47
+ * The last name of the customer
48
+ */
49
+ lastName?: string;
50
+ /**
51
+ * The id of the customer in the ticketing system. For the SDK this needs to be
52
+ * stable and unique
53
+ */
54
+ remoteId?: string;
55
+ /**
56
+ * The id of the customer in your own primary database or a unique identifier, for
57
+ * example a cookie
58
+ */
59
+ subscriberCustomerId?: string;
60
+ /**
61
+ * A token that can be used to authenticate the customer in the your system, like a
62
+ * JWT
63
+ */
64
+ subscriberToken?: string;
65
+ }
66
+ export interface RemoteGetResponse {
67
+ /**
68
+ * The id of the customer in the subscriber system
69
+ */
70
+ id: string;
71
+ /**
72
+ * The timestamp of the when the customer was created in our system
73
+ */
74
+ createdAt: string;
75
+ /**
76
+ * The URL of the customer avatar
77
+ */
78
+ avatarUrl?: string;
79
+ /**
80
+ * The display name of the customer
81
+ */
82
+ displayName?: string;
83
+ /**
84
+ * The email of the customer
85
+ */
86
+ email?: string;
87
+ /**
88
+ * The first name of the customer
89
+ */
90
+ firstName?: string;
91
+ /**
92
+ * The last name of the customer
93
+ */
94
+ lastName?: string;
95
+ /**
96
+ * The id of the customer in the ticketing system. For the SDK this needs to be
97
+ * stable and unique
98
+ */
99
+ remoteId?: string;
100
+ /**
101
+ * The id of the customer in your own primary database or a unique identifier, for
102
+ * example a cookie
103
+ */
104
+ subscriberCustomerId?: string;
105
+ /**
106
+ * A token that can be used to authenticate the customer in the your system, like a
107
+ * JWT
108
+ */
109
+ subscriberToken?: string;
110
+ }
111
+ export interface RemoteUpdateParams {
112
+ /**
113
+ * The URL of the customer avatar
114
+ */
115
+ avatarUrl?: string;
116
+ /**
117
+ * The display name of the customer
118
+ */
119
+ displayName?: string;
120
+ /**
121
+ * The email of the customer
122
+ */
123
+ email?: string;
124
+ /**
125
+ * The first name of the customer
126
+ */
127
+ firstName?: string;
128
+ /**
129
+ * The last name of the customer
130
+ */
131
+ lastName?: string;
132
+ /**
133
+ * The id of the customer in the ticketing system. For the SDK this needs to be
134
+ * stable and unique
135
+ */
136
+ body_remoteId?: string;
137
+ /**
138
+ * The id of the customer in your own primary database or a unique identifier, for
139
+ * example a cookie
140
+ */
141
+ subscriberCustomerId?: string;
142
+ /**
143
+ * A token that can be used to authenticate the customer in the your system, like a
144
+ * JWT
145
+ */
146
+ subscriberToken?: string;
147
+ }
148
+ export declare namespace Remote {
149
+ export { type RemoteUpdateResponse as RemoteUpdateResponse, type RemoteGetResponse as RemoteGetResponse, type RemoteUpdateParams as RemoteUpdateParams, };
150
+ }
151
+ //# sourceMappingURL=remote.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../src/resources/customer/remote.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;OAOG;IACH,MAAM,CACJ,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,kBAAkB,EACxB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC;IAIxC;;;;;OAKG;IACH,GAAG,CAAC,QAAQ,E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AAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
@@ -0,0 +1,29 @@
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.Remote = void 0;
5
+ const resource_1 = require("../../resource.js");
6
+ class Remote extends resource_1.APIResource {
7
+ /**
8
+ * @example
9
+ * ```ts
10
+ * const remote = await client.customer.remote.update(
11
+ * 'remoteId',
12
+ * );
13
+ * ```
14
+ */
15
+ update(pathRemoteId, body, options) {
16
+ return this._client.patch(`/v1/customer/remote/${pathRemoteId}`, { body, ...options });
17
+ }
18
+ /**
19
+ * @example
20
+ * ```ts
21
+ * const remote = await client.customer.remote.get('remoteId');
22
+ * ```
23
+ */
24
+ get(remoteId, options) {
25
+ return this._client.get(`/v1/customer/remote/${remoteId}`, options);
26
+ }
27
+ }
28
+ exports.Remote = Remote;
29
+ //# sourceMappingURL=remote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.js","sourceRoot":"","sources":["../../src/resources/customer/remote.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAG7C,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;OAOG;IACH,MAAM,CACJ,YAAoB,EACpB,IAAwB,EACxB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,uBAAuB,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;IAED;;;;;OAKG;IACH,GAAG,CAAC,QAAgB,EAAE,OAA6B;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;CACF;AA1BD,wBA0BC"}
@@ -0,0 +1,25 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../resource.mjs";
3
+ export class Remote extends APIResource {
4
+ /**
5
+ * @example
6
+ * ```ts
7
+ * const remote = await client.customer.remote.update(
8
+ * 'remoteId',
9
+ * );
10
+ * ```
11
+ */
12
+ update(pathRemoteId, body, options) {
13
+ return this._client.patch(`/v1/customer/remote/${pathRemoteId}`, { body, ...options });
14
+ }
15
+ /**
16
+ * @example
17
+ * ```ts
18
+ * const remote = await client.customer.remote.get('remoteId');
19
+ * ```
20
+ */
21
+ get(remoteId, options) {
22
+ return this._client.get(`/v1/customer/remote/${remoteId}`, options);
23
+ }
24
+ }
25
+ //# sourceMappingURL=remote.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.mjs","sourceRoot":"","sources":["../../src/resources/customer/remote.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;OAOG;IACH,MAAM,CACJ,YAAoB,EACpB,IAAwB,EACxB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,uBAAuB,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;IAED;;;;;OAKG;IACH,GAAG,CAAC,QAAgB,EAAE,OAA6B;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;CACF"}
package/src/core.ts CHANGED
@@ -1087,21 +1087,21 @@ export const coerceBoolean = (value: unknown): boolean => {
1087
1087
  };
1088
1088
 
1089
1089
  export const maybeCoerceInteger = (value: unknown): number | undefined => {
1090
- if (value === undefined) {
1090
+ if (value == null) {
1091
1091
  return undefined;
1092
1092
  }
1093
1093
  return coerceInteger(value);
1094
1094
  };
1095
1095
 
1096
1096
  export const maybeCoerceFloat = (value: unknown): number | undefined => {
1097
- if (value === undefined) {
1097
+ if (value == null) {
1098
1098
  return undefined;
1099
1099
  }
1100
1100
  return coerceFloat(value);
1101
1101
  };
1102
1102
 
1103
1103
  export const maybeCoerceBoolean = (value: unknown): boolean | undefined => {
1104
- if (value === undefined) {
1104
+ if (value == null) {
1105
1105
  return undefined;
1106
1106
  }
1107
1107
  return coerceBoolean(value);
@@ -369,13 +369,15 @@ export interface ChatGenerateParams {
369
369
  conversationId: string;
370
370
 
371
371
  /**
372
- * The message to be sent to the user. This endpoint supports markdown.
372
+ * The message to be sent to the user (customer or agent). This endpoint supports
373
+ * markdown.
373
374
  */
374
375
  message: string;
375
376
 
376
377
  /**
377
378
  * Any additional customer information, that has changed in the course of the
378
- * conversation.
379
+ * conversation. Required if the message is sent by the customer to the agent. Must
380
+ * be omitted if the message is sent by the agent to the customer.
379
381
  */
380
382
  customer?: ChatGenerateParams.Customer;
381
383
  }
@@ -383,7 +385,8 @@ export interface ChatGenerateParams {
383
385
  export namespace ChatGenerateParams {
384
386
  /**
385
387
  * Any additional customer information, that has changed in the course of the
386
- * conversation.
388
+ * conversation. Required if the message is sent by the customer to the agent. Must
389
+ * be omitted if the message is sent by the agent to the customer.
387
390
  */
388
391
  export interface Customer {
389
392
  /**
@@ -22,10 +22,13 @@ import {
22
22
  EmailStartParams,
23
23
  EmailStartResponse,
24
24
  } from './email';
25
+ import * as VoiceAPI from './voice';
26
+ import { Voice, VoiceOutboundParams } from './voice';
25
27
 
26
28
  export class Conversation extends APIResource {
27
29
  email: EmailAPI.Email = new EmailAPI.Email(this._client);
28
30
  chat: ChatAPI.Chat = new ChatAPI.Chat(this._client);
31
+ voice: VoiceAPI.Voice = new VoiceAPI.Voice(this._client);
29
32
 
30
33
  /**
31
34
  * @example
@@ -194,6 +197,7 @@ export interface ConversationRetrieveTranscriptParams {
194
197
 
195
198
  Conversation.Email = Email;
196
199
  Conversation.Chat = Chat;
200
+ Conversation.Voice = Voice;
197
201
 
198
202
  export declare namespace Conversation {
199
203
  export {
@@ -225,4 +229,6 @@ export declare namespace Conversation {
225
229
  type ChatGetParams as ChatGetParams,
226
230
  type ChatStartParams as ChatStartParams,
227
231
  };
232
+
233
+ export { Voice as Voice, type VoiceOutboundParams as VoiceOutboundParams };
228
234
  }
@@ -223,13 +223,15 @@ export interface EmailGenerateParams {
223
223
  conversationId: string;
224
224
 
225
225
  /**
226
- * The message to be sent to the user. This endpoint supports markdown.
226
+ * The message to be sent to the user (customer or agent). This endpoint supports
227
+ * markdown.
227
228
  */
228
229
  message: string;
229
230
 
230
231
  /**
231
232
  * Any additional customer information, that has changed in the course of the
232
- * conversation.
233
+ * conversation. Required if the message is sent by the customer to the agent. Must
234
+ * be omitted if the message is sent by the agent to the customer.
233
235
  */
234
236
  customer?: EmailGenerateParams.Customer;
235
237
  }
@@ -237,7 +239,8 @@ export interface EmailGenerateParams {
237
239
  export namespace EmailGenerateParams {
238
240
  /**
239
241
  * Any additional customer information, that has changed in the course of the
240
- * conversation.
242
+ * conversation. Required if the message is sent by the customer to the agent. Must
243
+ * be omitted if the message is sent by the agent to the customer.
241
244
  */
242
245
  export interface Customer {
243
246
  /**
@@ -28,3 +28,4 @@ export {
28
28
  type EmailGetParams,
29
29
  type EmailStartParams,
30
30
  } from './email';
31
+ export { Voice, type VoiceOutboundParams } from './voice';
@@ -0,0 +1,56 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import * as Core from '../../core';
5
+
6
+ export class Voice extends APIResource {
7
+ /**
8
+ * @example
9
+ * ```ts
10
+ * await client.conversation.voice.outbound({
11
+ * phoneNumber: '+61400000000',
12
+ * });
13
+ * ```
14
+ */
15
+ outbound(body: VoiceOutboundParams, options?: Core.RequestOptions): Core.APIPromise<void> {
16
+ return this._client.post('/v1/conversation/voice/outbound', {
17
+ body,
18
+ ...options,
19
+ headers: { Accept: '*/*', ...options?.headers },
20
+ });
21
+ }
22
+ }
23
+
24
+ export interface VoiceOutboundParams {
25
+ /**
26
+ * The phone number to call in E.164 format. If a customer ID is not provided, the
27
+ * customer will be looked up by phone number. If no customer is found, a new
28
+ * customer will be created.
29
+ */
30
+ phoneNumber: string;
31
+
32
+ /**
33
+ * The ID of the brand to make the call from
34
+ */
35
+ brandId?: string;
36
+
37
+ /**
38
+ * The ID of the customer to call. If not provided, the customer will be looked up
39
+ * by phone number. If no customer is found, a new customer will be created.
40
+ */
41
+ customerId?: string;
42
+
43
+ /**
44
+ * The input data to pass to the workflow. Only used if a workflow is specified.
45
+ */
46
+ inputData?: unknown;
47
+
48
+ /**
49
+ * The ID of the workflow to use for the call
50
+ */
51
+ workflowId?: string;
52
+ }
53
+
54
+ export declare namespace Voice {
55
+ export { type VoiceOutboundParams as VoiceOutboundParams };
56
+ }