@lorikeetai/node-sdk 1.2.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.
- package/CHANGELOG.md +24 -0
- package/core.js +3 -3
- package/core.js.map +1 -1
- package/core.mjs +3 -3
- package/core.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/conversation/chat.d.ts +6 -3
- package/resources/conversation/chat.d.ts.map +1 -1
- package/resources/conversation/email.d.ts +6 -3
- package/resources/conversation/email.d.ts.map +1 -1
- package/resources/conversation/voice.d.ts +14 -9
- package/resources/conversation/voice.d.ts.map +1 -1
- package/resources/conversation/voice.js +0 -2
- package/resources/conversation/voice.js.map +1 -1
- package/resources/conversation/voice.mjs +0 -2
- package/resources/conversation/voice.mjs.map +1 -1
- package/resources/customer/customer.d.ts +4 -0
- package/resources/customer/customer.d.ts.map +1 -1
- package/resources/customer/customer.js +4 -0
- package/resources/customer/customer.js.map +1 -1
- package/resources/customer/customer.mjs +4 -0
- package/resources/customer/customer.mjs.map +1 -1
- package/resources/customer/index.d.ts +1 -0
- package/resources/customer/index.d.ts.map +1 -1
- package/resources/customer/index.js +3 -1
- package/resources/customer/index.js.map +1 -1
- package/resources/customer/index.mjs +1 -0
- package/resources/customer/index.mjs.map +1 -1
- package/resources/customer/remote.d.ts +151 -0
- package/resources/customer/remote.d.ts.map +1 -0
- package/resources/customer/remote.js +29 -0
- package/resources/customer/remote.js.map +1 -0
- package/resources/customer/remote.mjs +25 -0
- package/resources/customer/remote.mjs.map +1 -0
- package/src/core.ts +3 -3
- package/src/resources/conversation/chat.ts +6 -3
- package/src/resources/conversation/email.ts +6 -3
- package/src/resources/conversation/voice.ts +15 -9
- package/src/resources/customer/customer.ts +11 -0
- package/src/resources/customer/index.ts +1 -0
- package/src/resources/customer/remote.ts +195 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"customer.js","sourceRoot":"","sources":["../../src/resources/customer/customer.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAE7C,yDAAwC;AACxC,0CAA4E;AAC5E,uDAAsC;AACtC,wCAA+F;AAE/F,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,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;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,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,UAAU;OACf,EAAE,OAAO,EAA0C;
|
|
1
|
+
{"version":3,"file":"customer.mjs","sourceRoot":"","sources":["../../src/resources/customer/customer.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,UAAU;OACf,EAAE,OAAO,EAA0C;OACnD,KAAK,SAAS;OACd,EAAE,MAAM,EAA+D;AAE9E,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,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 +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,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC;CAGzF;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,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,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,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,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,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
|
|
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
|
|
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
|
|
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
|
|
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
|
/**
|
|
@@ -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
|
|
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
|
/**
|
|
@@ -8,9 +8,7 @@ export class Voice extends APIResource {
|
|
|
8
8
|
* @example
|
|
9
9
|
* ```ts
|
|
10
10
|
* await client.conversation.voice.outbound({
|
|
11
|
-
* brandId: 'brandId',
|
|
12
11
|
* phoneNumber: '+61400000000',
|
|
13
|
-
* workflowId: 'workflowId',
|
|
14
12
|
* });
|
|
15
13
|
* ```
|
|
16
14
|
*/
|
|
@@ -25,24 +23,32 @@ export class Voice extends APIResource {
|
|
|
25
23
|
|
|
26
24
|
export interface VoiceOutboundParams {
|
|
27
25
|
/**
|
|
28
|
-
* The
|
|
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
29
|
*/
|
|
30
|
-
|
|
30
|
+
phoneNumber: string;
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* The
|
|
33
|
+
* The ID of the brand to make the call from
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
brandId?: string;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
* The ID of the
|
|
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.
|
|
39
40
|
*/
|
|
40
|
-
|
|
41
|
+
customerId?: string;
|
|
41
42
|
|
|
42
43
|
/**
|
|
43
|
-
* The input data to pass to the workflow
|
|
44
|
+
* The input data to pass to the workflow. Only used if a workflow is specified.
|
|
44
45
|
*/
|
|
45
46
|
inputData?: unknown;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The ID of the workflow to use for the call
|
|
50
|
+
*/
|
|
51
|
+
workflowId?: string;
|
|
46
52
|
}
|
|
47
53
|
|
|
48
54
|
export declare namespace Voice {
|
|
@@ -4,8 +4,11 @@ import { APIResource } from '../../resource';
|
|
|
4
4
|
import * as Core from '../../core';
|
|
5
5
|
import * as ProfileAPI from './profile';
|
|
6
6
|
import { Profile, ProfileSyncParams, ProfileSyncResponse } from './profile';
|
|
7
|
+
import * as RemoteAPI from './remote';
|
|
8
|
+
import { Remote, RemoteGetResponse, RemoteUpdateParams, RemoteUpdateResponse } from './remote';
|
|
7
9
|
|
|
8
10
|
export class Customer extends APIResource {
|
|
11
|
+
remote: RemoteAPI.Remote = new RemoteAPI.Remote(this._client);
|
|
9
12
|
profile: ProfileAPI.Profile = new ProfileAPI.Profile(this._client);
|
|
10
13
|
|
|
11
14
|
/**
|
|
@@ -365,6 +368,7 @@ export interface CustomerTokenParams {
|
|
|
365
368
|
subscriberToken?: string;
|
|
366
369
|
}
|
|
367
370
|
|
|
371
|
+
Customer.Remote = Remote;
|
|
368
372
|
Customer.Profile = Profile;
|
|
369
373
|
|
|
370
374
|
export declare namespace Customer {
|
|
@@ -378,6 +382,13 @@ export declare namespace Customer {
|
|
|
378
382
|
type CustomerTokenParams as CustomerTokenParams,
|
|
379
383
|
};
|
|
380
384
|
|
|
385
|
+
export {
|
|
386
|
+
Remote as Remote,
|
|
387
|
+
type RemoteUpdateResponse as RemoteUpdateResponse,
|
|
388
|
+
type RemoteGetResponse as RemoteGetResponse,
|
|
389
|
+
type RemoteUpdateParams as RemoteUpdateParams,
|
|
390
|
+
};
|
|
391
|
+
|
|
381
392
|
export {
|
|
382
393
|
Profile as Profile,
|
|
383
394
|
type ProfileSyncResponse as ProfileSyncResponse,
|
|
@@ -0,0 +1,195 @@
|
|
|
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 Remote extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const remote = await client.customer.remote.update(
|
|
11
|
+
* 'remoteId',
|
|
12
|
+
* );
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
update(
|
|
16
|
+
pathRemoteId: string,
|
|
17
|
+
body: RemoteUpdateParams,
|
|
18
|
+
options?: Core.RequestOptions,
|
|
19
|
+
): Core.APIPromise<RemoteUpdateResponse> {
|
|
20
|
+
return this._client.patch(`/v1/customer/remote/${pathRemoteId}`, { body, ...options });
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const remote = await client.customer.remote.get('remoteId');
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
get(remoteId: string, options?: Core.RequestOptions): Core.APIPromise<RemoteGetResponse> {
|
|
30
|
+
return this._client.get(`/v1/customer/remote/${remoteId}`, options);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface RemoteUpdateResponse {
|
|
35
|
+
/**
|
|
36
|
+
* The id of the customer in the subscriber system
|
|
37
|
+
*/
|
|
38
|
+
id: string;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The timestamp of the when the customer was created in our system
|
|
42
|
+
*/
|
|
43
|
+
createdAt: string;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The URL of the customer avatar
|
|
47
|
+
*/
|
|
48
|
+
avatarUrl?: string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The display name of the customer
|
|
52
|
+
*/
|
|
53
|
+
displayName?: string;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The email of the customer
|
|
57
|
+
*/
|
|
58
|
+
email?: string;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The first name of the customer
|
|
62
|
+
*/
|
|
63
|
+
firstName?: string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The last name of the customer
|
|
67
|
+
*/
|
|
68
|
+
lastName?: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The id of the customer in the ticketing system. For the SDK this needs to be
|
|
72
|
+
* stable and unique
|
|
73
|
+
*/
|
|
74
|
+
remoteId?: string;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The id of the customer in your own primary database or a unique identifier, for
|
|
78
|
+
* example a cookie
|
|
79
|
+
*/
|
|
80
|
+
subscriberCustomerId?: string;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* A token that can be used to authenticate the customer in the your system, like a
|
|
84
|
+
* JWT
|
|
85
|
+
*/
|
|
86
|
+
subscriberToken?: string;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface RemoteGetResponse {
|
|
90
|
+
/**
|
|
91
|
+
* The id of the customer in the subscriber system
|
|
92
|
+
*/
|
|
93
|
+
id: string;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The timestamp of the when the customer was created in our system
|
|
97
|
+
*/
|
|
98
|
+
createdAt: string;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The URL of the customer avatar
|
|
102
|
+
*/
|
|
103
|
+
avatarUrl?: string;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The display name of the customer
|
|
107
|
+
*/
|
|
108
|
+
displayName?: string;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The email of the customer
|
|
112
|
+
*/
|
|
113
|
+
email?: string;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The first name of the customer
|
|
117
|
+
*/
|
|
118
|
+
firstName?: string;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* The last name of the customer
|
|
122
|
+
*/
|
|
123
|
+
lastName?: string;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The id of the customer in the ticketing system. For the SDK this needs to be
|
|
127
|
+
* stable and unique
|
|
128
|
+
*/
|
|
129
|
+
remoteId?: string;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* The id of the customer in your own primary database or a unique identifier, for
|
|
133
|
+
* example a cookie
|
|
134
|
+
*/
|
|
135
|
+
subscriberCustomerId?: string;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* A token that can be used to authenticate the customer in the your system, like a
|
|
139
|
+
* JWT
|
|
140
|
+
*/
|
|
141
|
+
subscriberToken?: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface RemoteUpdateParams {
|
|
145
|
+
/**
|
|
146
|
+
* The URL of the customer avatar
|
|
147
|
+
*/
|
|
148
|
+
avatarUrl?: string;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* The display name of the customer
|
|
152
|
+
*/
|
|
153
|
+
displayName?: string;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* The email of the customer
|
|
157
|
+
*/
|
|
158
|
+
email?: string;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The first name of the customer
|
|
162
|
+
*/
|
|
163
|
+
firstName?: string;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* The last name of the customer
|
|
167
|
+
*/
|
|
168
|
+
lastName?: string;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* The id of the customer in the ticketing system. For the SDK this needs to be
|
|
172
|
+
* stable and unique
|
|
173
|
+
*/
|
|
174
|
+
body_remoteId?: string;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* The id of the customer in your own primary database or a unique identifier, for
|
|
178
|
+
* example a cookie
|
|
179
|
+
*/
|
|
180
|
+
subscriberCustomerId?: string;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* A token that can be used to authenticate the customer in the your system, like a
|
|
184
|
+
* JWT
|
|
185
|
+
*/
|
|
186
|
+
subscriberToken?: string;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export declare namespace Remote {
|
|
190
|
+
export {
|
|
191
|
+
type RemoteUpdateResponse as RemoteUpdateResponse,
|
|
192
|
+
type RemoteGetResponse as RemoteGetResponse,
|
|
193
|
+
type RemoteUpdateParams as RemoteUpdateParams,
|
|
194
|
+
};
|
|
195
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.3.0'; // x-release-please-version
|