@lorikeetai/node-sdk 0.1.0-alpha.1 → 0.1.0-alpha.2
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 +9 -0
- package/README.md +18 -12
- package/index.d.mts +15 -17
- package/index.d.ts +15 -17
- package/index.d.ts.map +1 -1
- package/index.js +26 -39
- package/index.js.map +1 -1
- package/index.mjs +26 -39
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/conversation/chat.d.ts +59 -0
- package/resources/conversation/chat.d.ts.map +1 -0
- package/resources/conversation/chat.js +29 -0
- package/resources/conversation/chat.js.map +1 -0
- package/resources/conversation/chat.mjs +25 -0
- package/resources/conversation/chat.mjs.map +1 -0
- package/resources/conversation/conversation.d.ts +13 -0
- package/resources/conversation/conversation.d.ts.map +1 -0
- package/resources/conversation/conversation.js +40 -0
- package/resources/conversation/conversation.js.map +1 -0
- package/resources/conversation/conversation.mjs +13 -0
- package/resources/conversation/conversation.mjs.map +1 -0
- package/resources/conversation/index.d.ts +3 -0
- package/resources/conversation/index.d.ts.map +1 -0
- package/resources/conversation/index.js +9 -0
- package/resources/conversation/index.js.map +1 -0
- package/resources/conversation/index.mjs +4 -0
- package/resources/conversation/index.mjs.map +1 -0
- package/resources/conversation.d.ts +0 -41
- package/resources/conversation.d.ts.map +1 -1
- package/resources/conversation.js +0 -14
- package/resources/conversation.js.map +1 -1
- package/resources/conversation.mjs +0 -14
- package/resources/conversation.mjs.map +1 -1
- package/resources/index.d.ts +3 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -2
- package/resources/index.mjs.map +1 -1
- package/resources/ingest.d.ts +8 -27
- package/resources/ingest.d.ts.map +1 -1
- package/resources/ingest.js +7 -17
- package/resources/ingest.js.map +1 -1
- package/resources/ingest.mjs +7 -17
- package/resources/ingest.mjs.map +1 -1
- package/resources/token.d.ts +32 -0
- package/resources/token.d.ts.map +1 -0
- package/resources/token.js +22 -0
- package/resources/token.js.map +1 -0
- package/resources/token.mjs +18 -0
- package/resources/token.mjs.map +1 -0
- package/src/index.ts +44 -58
- package/src/resources/conversation/chat.ts +83 -0
- package/src/resources/conversation/conversation.ts +16 -0
- package/src/resources/conversation/index.ts +4 -0
- package/src/resources/conversation.ts +1 -58
- package/src/resources/index.ts +3 -13
- package/src/resources/ingest.ts +17 -46
- package/src/resources/token.ts +45 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -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 Chat extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Retrieves the latest conversation message for a given conversation ID.
|
|
6
|
+
*/
|
|
7
|
+
generate(conversationId, body, options) {
|
|
8
|
+
return this._client.post(`/conversation/chat/${conversationId}/generate`, { body, ...options });
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Retrieves the latest conversation message for a given conversation ID.
|
|
12
|
+
*/
|
|
13
|
+
get(conversationId, options) {
|
|
14
|
+
return this._client.get(`/conversation/chat/${conversationId}`, options);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Generates a new conversation ID.
|
|
18
|
+
*/
|
|
19
|
+
start(body, options) {
|
|
20
|
+
return this._client.post('/conversation/chat/start', { body, ...options });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
(function (Chat) {
|
|
24
|
+
})(Chat || (Chat = {}));
|
|
25
|
+
//# sourceMappingURL=chat.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.mjs","sourceRoot":"","sources":["../../src/resources/conversation/chat.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,QAAQ,CACN,cAAsB,EACtB,IAAwB,EACxB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,cAAc,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClG,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,cAAsB,EAAE,OAA6B;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,IAAqB,EAAE,OAA6B;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF;AA8CD,WAAiB,IAAI;AAKrB,CAAC,EALgB,IAAI,KAAJ,IAAI,QAKpB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { APIResource } from "../../resource.js";
|
|
2
|
+
import * as ChatAPI from "./chat.js";
|
|
3
|
+
export declare class Conversation extends APIResource {
|
|
4
|
+
chat: ChatAPI.Chat;
|
|
5
|
+
}
|
|
6
|
+
export declare namespace Conversation {
|
|
7
|
+
export import Chat = ChatAPI.Chat;
|
|
8
|
+
export import ConversationMessage = ChatAPI.ConversationMessage;
|
|
9
|
+
export import ChatStartResponse = ChatAPI.ChatStartResponse;
|
|
10
|
+
export import ChatGenerateParams = ChatAPI.ChatGenerateParams;
|
|
11
|
+
export import ChatStartParams = ChatAPI.ChatStartParams;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=conversation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/resources/conversation/conversation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,QAAQ,CAAC;AAElC,qBAAa,YAAa,SAAQ,WAAW;IAC3C,IAAI,EAAE,OAAO,CAAC,IAAI,CAAkC;CACrD;AAED,yBAAiB,YAAY,CAAC;IAC5B,MAAM,QAAQ,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAClC,MAAM,QAAQ,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAChE,MAAM,QAAQ,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAC5D,MAAM,QAAQ,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAC9D,MAAM,QAAQ,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;CACzD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
+
if (mod && mod.__esModule) return mod;
|
|
21
|
+
var result = {};
|
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
__setModuleDefault(result, mod);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.Conversation = void 0;
|
|
28
|
+
const resource_1 = require("../../resource.js");
|
|
29
|
+
const ChatAPI = __importStar(require("./chat.js"));
|
|
30
|
+
class Conversation extends resource_1.APIResource {
|
|
31
|
+
constructor() {
|
|
32
|
+
super(...arguments);
|
|
33
|
+
this.chat = new ChatAPI.Chat(this._client);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.Conversation = Conversation;
|
|
37
|
+
(function (Conversation) {
|
|
38
|
+
Conversation.Chat = ChatAPI.Chat;
|
|
39
|
+
})(Conversation = exports.Conversation || (exports.Conversation = {}));
|
|
40
|
+
//# sourceMappingURL=conversation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation.js","sourceRoot":"","sources":["../../src/resources/conversation/conversation.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAC7C,mDAAkC;AAElC,MAAa,YAAa,SAAQ,sBAAW;IAA7C;;QACE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACtD,CAAC;CAAA;AAFD,oCAEC;AAED,WAAiB,YAAY;IACb,iBAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AAKpC,CAAC,EANgB,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAM5B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../resource.mjs";
|
|
3
|
+
import * as ChatAPI from "./chat.mjs";
|
|
4
|
+
export class Conversation extends APIResource {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.chat = new ChatAPI.Chat(this._client);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
(function (Conversation) {
|
|
11
|
+
Conversation.Chat = ChatAPI.Chat;
|
|
12
|
+
})(Conversation || (Conversation = {}));
|
|
13
|
+
//# sourceMappingURL=conversation.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation.mjs","sourceRoot":"","sources":["../../src/resources/conversation/conversation.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;AAEnB,MAAM,OAAO,YAAa,SAAQ,WAAW;IAA7C;;QACE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACtD,CAAC;CAAA;AAED,WAAiB,YAAY;IACb,iBAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AAKpC,CAAC,EANgB,YAAY,KAAZ,YAAY,QAM5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/conversation/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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.Chat = exports.Conversation = void 0;
|
|
5
|
+
var conversation_1 = require("./conversation.js");
|
|
6
|
+
Object.defineProperty(exports, "Conversation", { enumerable: true, get: function () { return conversation_1.Conversation; } });
|
|
7
|
+
var chat_1 = require("./chat.js");
|
|
8
|
+
Object.defineProperty(exports, "Chat", { enumerable: true, get: function () { return chat_1.Chat; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/conversation/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,kCAA2G;AAArB,4FAAA,IAAI,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/conversation/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,YAAY,EAAE;OAChB,EAA+E,IAAI,EAAE"}
|
|
@@ -1,45 +1,4 @@
|
|
|
1
1
|
import { APIResource } from "../resource.js";
|
|
2
|
-
import * as Core from "../core.js";
|
|
3
|
-
import * as ConversationAPI from "./conversation.js";
|
|
4
2
|
export declare class Conversation extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* Adds a message to an existing conversation using the conversation ID.
|
|
7
|
-
*/
|
|
8
|
-
message(conversationId: string, body: ConversationMessageParams, options?: Core.RequestOptions): Core.APIPromise<ConversationMessageResponse>;
|
|
9
|
-
/**
|
|
10
|
-
* Generates a new conversation ID.
|
|
11
|
-
*/
|
|
12
|
-
start(options?: Core.RequestOptions): Core.APIPromise<ConversationStartResponse>;
|
|
13
|
-
}
|
|
14
|
-
export interface ConversationMessageResponse {
|
|
15
|
-
/**
|
|
16
|
-
* The ID of the conversation the message was added to.
|
|
17
|
-
*/
|
|
18
|
-
conversationId?: string;
|
|
19
|
-
/**
|
|
20
|
-
* The content of the message.
|
|
21
|
-
*/
|
|
22
|
-
message?: string;
|
|
23
|
-
/**
|
|
24
|
-
* The unique identifier of the added message.
|
|
25
|
-
*/
|
|
26
|
-
messageId?: string;
|
|
27
|
-
}
|
|
28
|
-
export interface ConversationStartResponse {
|
|
29
|
-
/**
|
|
30
|
-
* The unique identifier of the created conversation.
|
|
31
|
-
*/
|
|
32
|
-
conversationId?: string;
|
|
33
|
-
}
|
|
34
|
-
export interface ConversationMessageParams {
|
|
35
|
-
/**
|
|
36
|
-
* The message text to add to the conversation.
|
|
37
|
-
*/
|
|
38
|
-
message?: string;
|
|
39
|
-
}
|
|
40
|
-
export declare namespace Conversation {
|
|
41
|
-
export import ConversationMessageResponse = ConversationAPI.ConversationMessageResponse;
|
|
42
|
-
export import ConversationStartResponse = ConversationAPI.ConversationStartResponse;
|
|
43
|
-
export import ConversationMessageParams = ConversationAPI.ConversationMessageParams;
|
|
44
3
|
}
|
|
45
4
|
//# sourceMappingURL=conversation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../src/resources/conversation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../src/resources/conversation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,qBAAa,YAAa,SAAQ,WAAW;CAAG"}
|
|
@@ -4,20 +4,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.Conversation = void 0;
|
|
5
5
|
const resource_1 = require("../resource.js");
|
|
6
6
|
class Conversation extends resource_1.APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Adds a message to an existing conversation using the conversation ID.
|
|
9
|
-
*/
|
|
10
|
-
message(conversationId, body, options) {
|
|
11
|
-
return this._client.post(`/conversation/${conversationId}/message`, { body, ...options });
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Generates a new conversation ID.
|
|
15
|
-
*/
|
|
16
|
-
start(options) {
|
|
17
|
-
return this._client.post('/conversation/start', options);
|
|
18
|
-
}
|
|
19
7
|
}
|
|
20
8
|
exports.Conversation = Conversation;
|
|
21
|
-
(function (Conversation) {
|
|
22
|
-
})(Conversation = exports.Conversation || (exports.Conversation = {}));
|
|
23
9
|
//# sourceMappingURL=conversation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.js","sourceRoot":"","sources":["../src/resources/conversation.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;
|
|
1
|
+
{"version":3,"file":"conversation.js","sourceRoot":"","sources":["../src/resources/conversation.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAE1C,MAAa,YAAa,SAAQ,sBAAW;CAAG;AAAhD,oCAAgD"}
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../resource.mjs";
|
|
3
3
|
export class Conversation extends APIResource {
|
|
4
|
-
/**
|
|
5
|
-
* Adds a message to an existing conversation using the conversation ID.
|
|
6
|
-
*/
|
|
7
|
-
message(conversationId, body, options) {
|
|
8
|
-
return this._client.post(`/conversation/${conversationId}/message`, { body, ...options });
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Generates a new conversation ID.
|
|
12
|
-
*/
|
|
13
|
-
start(options) {
|
|
14
|
-
return this._client.post('/conversation/start', options);
|
|
15
|
-
}
|
|
16
4
|
}
|
|
17
|
-
(function (Conversation) {
|
|
18
|
-
})(Conversation || (Conversation = {}));
|
|
19
5
|
//# sourceMappingURL=conversation.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.mjs","sourceRoot":"","sources":["../src/resources/conversation.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"conversation.mjs","sourceRoot":"","sources":["../src/resources/conversation.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAEtB,MAAM,OAAO,YAAa,SAAQ,WAAW;CAAG"}
|
package/resources/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { IngestValidateResponse,
|
|
1
|
+
export { Conversation } from "./conversation/conversation.js";
|
|
2
|
+
export { IngestValidateResponse, IngestValidateParams, IngestWebhooksParams, Ingest } from "./ingest.js";
|
|
3
|
+
export { TokenCreateParams, Token } from "./token.js";
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
package/resources/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACtG,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
package/resources/index.js
CHANGED
|
@@ -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.Ingest = exports.Conversation = void 0;
|
|
5
|
-
var conversation_1 = require("./conversation.js");
|
|
4
|
+
exports.Token = exports.Ingest = exports.Conversation = void 0;
|
|
5
|
+
var conversation_1 = require("./conversation/conversation.js");
|
|
6
6
|
Object.defineProperty(exports, "Conversation", { enumerable: true, get: function () { return conversation_1.Conversation; } });
|
|
7
7
|
var ingest_1 = require("./ingest.js");
|
|
8
8
|
Object.defineProperty(exports, "Ingest", { enumerable: true, get: function () { return ingest_1.Ingest; } });
|
|
9
|
+
var token_1 = require("./token.js");
|
|
10
|
+
Object.defineProperty(exports, "Token", { enumerable: true, get: function () { return token_1.Token; } });
|
|
9
11
|
//# sourceMappingURL=index.js.map
|
package/resources/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,+DAA2D;AAAlD,4GAAA,YAAY,OAAA;AACrB,sCAAsG;AAAzB,gGAAA,MAAM,OAAA;AACnF,oCAAmD;AAAvB,8FAAA,KAAK,OAAA"}
|
package/resources/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
export { Conversation
|
|
3
|
-
export { Ingest
|
|
2
|
+
export { Conversation } from "./conversation/conversation.mjs";
|
|
3
|
+
export { Ingest } from "./ingest.mjs";
|
|
4
|
+
export { Token } from "./token.mjs";
|
|
4
5
|
//# sourceMappingURL=index.mjs.map
|
package/resources/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,YAAY,EAAE;OAChB,EAAsE,MAAM,EAAE;OAC9E,EAAqB,KAAK,EAAE"}
|
package/resources/ingest.d.ts
CHANGED
|
@@ -3,18 +3,14 @@ import * as Core from "../core.js";
|
|
|
3
3
|
import * as IngestAPI from "./ingest.js";
|
|
4
4
|
export declare class Ingest extends APIResource {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
* Lorikeet and sent as a payload to your webhook.
|
|
6
|
+
* Validate your webhook is configured correctly
|
|
8
7
|
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Create a signed JWT that can be associated with a user account.
|
|
12
|
-
*/
|
|
13
|
-
token(body: IngestTokenParams, options?: Core.RequestOptions): Core.APIPromise<void>;
|
|
8
|
+
validate(body: IngestValidateParams, options?: Core.RequestOptions): Core.APIPromise<IngestValidateResponse>;
|
|
14
9
|
/**
|
|
15
|
-
*
|
|
10
|
+
* The url to post a return webhook request to. This url will be generated by
|
|
11
|
+
* Lorikeet and sent as a payload to your webhook
|
|
16
12
|
*/
|
|
17
|
-
|
|
13
|
+
webhooks(toolId: string, ticketId: string, body: IngestWebhooksParams, options?: Core.RequestOptions): Core.APIPromise<void>;
|
|
18
14
|
}
|
|
19
15
|
export interface IngestValidateResponse {
|
|
20
16
|
code?: 200;
|
|
@@ -23,27 +19,13 @@ export interface IngestValidateResponse {
|
|
|
23
19
|
*/
|
|
24
20
|
data?: string;
|
|
25
21
|
}
|
|
26
|
-
export interface
|
|
22
|
+
export interface IngestValidateParams {
|
|
27
23
|
/**
|
|
28
24
|
* The return data for the tool request.
|
|
29
25
|
*/
|
|
30
26
|
data: unknown;
|
|
31
27
|
}
|
|
32
|
-
export interface
|
|
33
|
-
/**
|
|
34
|
-
* The email of the user.
|
|
35
|
-
*/
|
|
36
|
-
email: string;
|
|
37
|
-
/**
|
|
38
|
-
* The first name of the user.
|
|
39
|
-
*/
|
|
40
|
-
firstName: string;
|
|
41
|
-
/**
|
|
42
|
-
* The last name of the user.
|
|
43
|
-
*/
|
|
44
|
-
lastName: string;
|
|
45
|
-
}
|
|
46
|
-
export interface IngestValidateParams {
|
|
28
|
+
export interface IngestWebhooksParams {
|
|
47
29
|
/**
|
|
48
30
|
* The return data for the tool request.
|
|
49
31
|
*/
|
|
@@ -51,8 +33,7 @@ export interface IngestValidateParams {
|
|
|
51
33
|
}
|
|
52
34
|
export declare namespace Ingest {
|
|
53
35
|
export import IngestValidateResponse = IngestAPI.IngestValidateResponse;
|
|
54
|
-
export import IngestReturnWebhookParams = IngestAPI.IngestReturnWebhookParams;
|
|
55
|
-
export import IngestTokenParams = IngestAPI.IngestTokenParams;
|
|
56
36
|
export import IngestValidateParams = IngestAPI.IngestValidateParams;
|
|
37
|
+
export import IngestWebhooksParams = IngestAPI.IngestWebhooksParams;
|
|
57
38
|
}
|
|
58
39
|
//# sourceMappingURL=ingest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingest.d.ts","sourceRoot":"","sources":["../src/resources/ingest.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,SAAS,MAAM,UAAU,CAAC;AAEtC,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"ingest.d.ts","sourceRoot":"","sources":["../src/resources/ingest.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,SAAS,MAAM,UAAU,CAAC;AAEtC,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,QAAQ,CACN,IAAI,EAAE,oBAAoB,EAC1B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAI1C;;;OAGG;IACH,QAAQ,CACN,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,oBAAoB,EAC1B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;CAOzB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,GAAG,CAAC;IAEX;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED,yBAAiB,MAAM,CAAC;IACtB,MAAM,QAAQ,sBAAsB,GAAG,SAAS,CAAC,sBAAsB,CAAC;IACxE,MAAM,QAAQ,oBAAoB,GAAG,SAAS,CAAC,oBAAoB,CAAC;IACpE,MAAM,QAAQ,oBAAoB,GAAG,SAAS,CAAC,oBAAoB,CAAC;CACrE"}
|
package/resources/ingest.js
CHANGED
|
@@ -5,32 +5,22 @@ exports.Ingest = void 0;
|
|
|
5
5
|
const resource_1 = require("../resource.js");
|
|
6
6
|
class Ingest extends resource_1.APIResource {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* Lorikeet and sent as a payload to your webhook.
|
|
8
|
+
* Validate your webhook is configured correctly
|
|
10
9
|
*/
|
|
11
|
-
|
|
12
|
-
return this._client.post(
|
|
13
|
-
body,
|
|
14
|
-
...options,
|
|
15
|
-
headers: { Accept: '*/*', ...options?.headers },
|
|
16
|
-
});
|
|
10
|
+
validate(body, options) {
|
|
11
|
+
return this._client.post('/ingest/validate', { body, ...options });
|
|
17
12
|
}
|
|
18
13
|
/**
|
|
19
|
-
*
|
|
14
|
+
* The url to post a return webhook request to. This url will be generated by
|
|
15
|
+
* Lorikeet and sent as a payload to your webhook
|
|
20
16
|
*/
|
|
21
|
-
|
|
22
|
-
return this._client.post(
|
|
17
|
+
webhooks(toolId, ticketId, body, options) {
|
|
18
|
+
return this._client.post(`/ingest/${toolId}/${ticketId}`, {
|
|
23
19
|
body,
|
|
24
20
|
...options,
|
|
25
21
|
headers: { Accept: '*/*', ...options?.headers },
|
|
26
22
|
});
|
|
27
23
|
}
|
|
28
|
-
/**
|
|
29
|
-
* Validate your webhook is configured correctly.
|
|
30
|
-
*/
|
|
31
|
-
validate(body, options) {
|
|
32
|
-
return this._client.post('/ingest/validate', { body, ...options });
|
|
33
|
-
}
|
|
34
24
|
}
|
|
35
25
|
exports.Ingest = Ingest;
|
|
36
26
|
(function (Ingest) {
|
package/resources/ingest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingest.js","sourceRoot":"","sources":["../src/resources/ingest.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAI1C,MAAa,MAAO,SAAQ,sBAAW;IACrC
|
|
1
|
+
{"version":3,"file":"ingest.js","sourceRoot":"","sources":["../src/resources/ingest.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAI1C,MAAa,MAAO,SAAQ,sBAAW;IACrC;;OAEG;IACH,QAAQ,CACN,IAA0B,EAC1B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;OAGG;IACH,QAAQ,CACN,MAAc,EACd,QAAgB,EAChB,IAA0B,EAC1B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,MAAM,IAAI,QAAQ,EAAE,EAAE;YACxD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;CACF;AA3BD,wBA2BC;AAyBD,WAAiB,MAAM;AAIvB,CAAC,EAJgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAItB"}
|
package/resources/ingest.mjs
CHANGED
|
@@ -2,32 +2,22 @@
|
|
|
2
2
|
import { APIResource } from "../resource.mjs";
|
|
3
3
|
export class Ingest extends APIResource {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* Lorikeet and sent as a payload to your webhook.
|
|
5
|
+
* Validate your webhook is configured correctly
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
return this._client.post(
|
|
10
|
-
body,
|
|
11
|
-
...options,
|
|
12
|
-
headers: { Accept: '*/*', ...options?.headers },
|
|
13
|
-
});
|
|
7
|
+
validate(body, options) {
|
|
8
|
+
return this._client.post('/ingest/validate', { body, ...options });
|
|
14
9
|
}
|
|
15
10
|
/**
|
|
16
|
-
*
|
|
11
|
+
* The url to post a return webhook request to. This url will be generated by
|
|
12
|
+
* Lorikeet and sent as a payload to your webhook
|
|
17
13
|
*/
|
|
18
|
-
|
|
19
|
-
return this._client.post(
|
|
14
|
+
webhooks(toolId, ticketId, body, options) {
|
|
15
|
+
return this._client.post(`/ingest/${toolId}/${ticketId}`, {
|
|
20
16
|
body,
|
|
21
17
|
...options,
|
|
22
18
|
headers: { Accept: '*/*', ...options?.headers },
|
|
23
19
|
});
|
|
24
20
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Validate your webhook is configured correctly.
|
|
27
|
-
*/
|
|
28
|
-
validate(body, options) {
|
|
29
|
-
return this._client.post('/ingest/validate', { body, ...options });
|
|
30
|
-
}
|
|
31
21
|
}
|
|
32
22
|
(function (Ingest) {
|
|
33
23
|
})(Ingest || (Ingest = {}));
|
package/resources/ingest.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingest.mjs","sourceRoot":"","sources":["../src/resources/ingest.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"ingest.mjs","sourceRoot":"","sources":["../src/resources/ingest.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,QAAQ,CACN,IAA0B,EAC1B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;OAGG;IACH,QAAQ,CACN,MAAc,EACd,QAAgB,EAChB,IAA0B,EAC1B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,MAAM,IAAI,QAAQ,EAAE,EAAE;YACxD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;CACF;AAyBD,WAAiB,MAAM;AAIvB,CAAC,EAJgB,MAAM,KAAN,MAAM,QAItB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { APIResource } from "../resource.js";
|
|
2
|
+
import * as Core from "../core.js";
|
|
3
|
+
import * as TokenAPI from "./token.js";
|
|
4
|
+
export declare class Token extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create a signed JWT so that we can associate customer data with a user account
|
|
7
|
+
* securely.
|
|
8
|
+
*/
|
|
9
|
+
create(body: TokenCreateParams, options?: Core.RequestOptions): Core.APIPromise<void>;
|
|
10
|
+
}
|
|
11
|
+
export interface TokenCreateParams {
|
|
12
|
+
/**
|
|
13
|
+
* The email of the user.
|
|
14
|
+
*/
|
|
15
|
+
email: string;
|
|
16
|
+
/**
|
|
17
|
+
* The first name of the user.
|
|
18
|
+
*/
|
|
19
|
+
firstName: string;
|
|
20
|
+
/**
|
|
21
|
+
* The last name of the user.
|
|
22
|
+
*/
|
|
23
|
+
lastName: string;
|
|
24
|
+
/**
|
|
25
|
+
* The unique identifier of the user in your system.
|
|
26
|
+
*/
|
|
27
|
+
remoteId: string;
|
|
28
|
+
}
|
|
29
|
+
export declare namespace Token {
|
|
30
|
+
export import TokenCreateParams = TokenAPI.TokenCreateParams;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=token.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../src/resources/token.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,QAAQ,MAAM,SAAS,CAAC;AAEpC,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;CAOtF;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,yBAAiB,KAAK,CAAC;IACrB,MAAM,QAAQ,iBAAiB,GAAG,QAAQ,CAAC,iBAAiB,CAAC;CAC9D"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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.Token = void 0;
|
|
5
|
+
const resource_1 = require("../resource.js");
|
|
6
|
+
class Token extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create a signed JWT so that we can associate customer data with a user account
|
|
9
|
+
* securely.
|
|
10
|
+
*/
|
|
11
|
+
create(body, options) {
|
|
12
|
+
return this._client.post('/ingest/token', {
|
|
13
|
+
body,
|
|
14
|
+
...options,
|
|
15
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.Token = Token;
|
|
20
|
+
(function (Token) {
|
|
21
|
+
})(Token = exports.Token || (exports.Token = {}));
|
|
22
|
+
//# sourceMappingURL=token.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token.js","sourceRoot":"","sources":["../src/resources/token.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAI1C,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;OAGG;IACH,MAAM,CAAC,IAAuB,EAAE,OAA6B;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE;YACxC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;CACF;AAZD,sBAYC;AAwBD,WAAiB,KAAK;AAEtB,CAAC,EAFgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAErB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../resource.mjs";
|
|
3
|
+
export class Token extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Create a signed JWT so that we can associate customer data with a user account
|
|
6
|
+
* securely.
|
|
7
|
+
*/
|
|
8
|
+
create(body, options) {
|
|
9
|
+
return this._client.post('/ingest/token', {
|
|
10
|
+
body,
|
|
11
|
+
...options,
|
|
12
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
(function (Token) {
|
|
17
|
+
})(Token || (Token = {}));
|
|
18
|
+
//# sourceMappingURL=token.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token.mjs","sourceRoot":"","sources":["../src/resources/token.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;OAGG;IACH,MAAM,CAAC,IAAuB,EAAE,OAA6B;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE;YACxC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;CACF;AAwBD,WAAiB,KAAK;AAEtB,CAAC,EAFgB,KAAK,KAAL,KAAK,QAErB"}
|