@orq-ai/node 4.4.0-rc.26 → 4.4.0-rc.28
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/README.md +27 -54
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/index.d.ts +0 -4
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +0 -4
- package/models/components/index.js.map +1 -1
- package/models/components/invokedeploymentrequest.d.ts +6 -6
- package/models/components/invokedeploymentrequest.d.ts.map +1 -1
- package/models/components/invokedeploymentrequest.js +6 -7
- package/models/components/invokedeploymentrequest.js.map +1 -1
- package/models/components/partdoneevent.js +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/errors/index.d.ts +0 -4
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +0 -4
- package/models/errors/index.js.map +1 -1
- package/models/operations/createcontact.js +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +4 -4
- package/models/operations/createdatasource.js +1 -1
- package/models/operations/createeval.js +16 -16
- package/models/operations/createidentity.js +1 -1
- package/models/operations/createtool.js +6 -6
- package/models/operations/fileget.js +1 -1
- package/models/operations/filelist.js +1 -1
- package/models/operations/fileupload.js +1 -1
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getevals.js +16 -16
- package/models/operations/index.d.ts +0 -7
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -7
- package/models/operations/index.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +4 -4
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listdatasources.js +1 -1
- package/models/operations/listidentities.js +1 -1
- package/models/operations/retrievedatapoint.js +4 -4
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +1 -1
- package/models/operations/retrieveidentity.js +1 -1
- package/models/operations/retrievetool.js +6 -6
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/updatedatapoint.js +4 -4
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.js +1 -1
- package/models/operations/updateeval.js +16 -16
- package/models/operations/updateidentity.js +1 -1
- package/models/operations/updatetool.js +7 -7
- package/package.json +1 -1
- package/sdk/sdk.d.ts +0 -6
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +0 -8
- package/sdk/sdk.js.map +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/index.ts +0 -4
- package/src/models/components/invokedeploymentrequest.ts +10 -17
- package/src/models/components/partdoneevent.ts +1 -1
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/errors/index.ts +0 -4
- package/src/models/operations/createcontact.ts +1 -1
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +4 -4
- package/src/models/operations/createdatasource.ts +1 -1
- package/src/models/operations/createeval.ts +16 -16
- package/src/models/operations/createidentity.ts +1 -1
- package/src/models/operations/createtool.ts +6 -6
- package/src/models/operations/fileget.ts +1 -1
- package/src/models/operations/filelist.ts +1 -1
- package/src/models/operations/fileupload.ts +1 -1
- package/src/models/operations/getalltools.ts +6 -6
- package/src/models/operations/getevals.ts +16 -16
- package/src/models/operations/index.ts +0 -7
- package/src/models/operations/listdatasetdatapoints.ts +4 -4
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listdatasources.ts +1 -1
- package/src/models/operations/listidentities.ts +1 -1
- package/src/models/operations/retrievedatapoint.ts +4 -4
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- package/src/models/operations/retrieveidentity.ts +1 -1
- package/src/models/operations/retrievetool.ts +6 -6
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/updatedatapoint.ts +4 -4
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +1 -1
- package/src/models/operations/updateeval.ts +16 -16
- package/src/models/operations/updateidentity.ts +1 -1
- package/src/models/operations/updatetool.ts +7 -7
- package/src/sdk/sdk.ts +0 -12
- package/funcs/conversationsCreate.d.ts +0 -17
- package/funcs/conversationsCreate.d.ts.map +0 -1
- package/funcs/conversationsCreate.js +0 -114
- package/funcs/conversationsCreate.js.map +0 -1
- package/funcs/conversationsCreateConversationResponse.d.ts +0 -18
- package/funcs/conversationsCreateConversationResponse.d.ts.map +0 -1
- package/funcs/conversationsCreateConversationResponse.js +0 -132
- package/funcs/conversationsCreateConversationResponse.js.map +0 -1
- package/funcs/conversationsDelete.d.ts +0 -17
- package/funcs/conversationsDelete.d.ts.map +0 -1
- package/funcs/conversationsDelete.js +0 -127
- package/funcs/conversationsDelete.js.map +0 -1
- package/funcs/conversationsGenerateName.d.ts +0 -18
- package/funcs/conversationsGenerateName.d.ts.map +0 -1
- package/funcs/conversationsGenerateName.js +0 -128
- package/funcs/conversationsGenerateName.js.map +0 -1
- package/funcs/conversationsList.d.ts +0 -17
- package/funcs/conversationsList.d.ts.map +0 -1
- package/funcs/conversationsList.js +0 -126
- package/funcs/conversationsList.js.map +0 -1
- package/funcs/conversationsRetrieve.d.ts +0 -18
- package/funcs/conversationsRetrieve.d.ts.map +0 -1
- package/funcs/conversationsRetrieve.js +0 -127
- package/funcs/conversationsRetrieve.js.map +0 -1
- package/funcs/conversationsUpdate.d.ts +0 -18
- package/funcs/conversationsUpdate.d.ts.map +0 -1
- package/funcs/conversationsUpdate.js +0 -128
- package/funcs/conversationsUpdate.js.map +0 -1
- package/models/components/conversationresponse.d.ts +0 -74
- package/models/components/conversationresponse.d.ts.map +0 -1
- package/models/components/conversationresponse.js +0 -80
- package/models/components/conversationresponse.js.map +0 -1
- package/models/components/conversationwithmessagesresponse.d.ts +0 -79
- package/models/components/conversationwithmessagesresponse.d.ts.map +0 -1
- package/models/components/conversationwithmessagesresponse.js +0 -83
- package/models/components/conversationwithmessagesresponse.js.map +0 -1
- package/models/components/messageresponse.d.ts +0 -58
- package/models/components/messageresponse.d.ts.map +0 -1
- package/models/components/messageresponse.js +0 -89
- package/models/components/messageresponse.js.map +0 -1
- package/models/components/usermessagerequest.d.ts +0 -54
- package/models/components/usermessagerequest.d.ts.map +0 -1
- package/models/components/usermessagerequest.js +0 -79
- package/models/components/usermessagerequest.js.map +0 -1
- package/models/errors/deleteconversation.d.ts +0 -23
- package/models/errors/deleteconversation.d.ts.map +0 -1
- package/models/errors/deleteconversation.js +0 -68
- package/models/errors/deleteconversation.js.map +0 -1
- package/models/errors/generateconversationname.d.ts +0 -43
- package/models/errors/generateconversationname.d.ts.map +0 -1
- package/models/errors/generateconversationname.js +0 -94
- package/models/errors/generateconversationname.js.map +0 -1
- package/models/errors/retrieveconversation.d.ts +0 -23
- package/models/errors/retrieveconversation.d.ts.map +0 -1
- package/models/errors/retrieveconversation.js +0 -68
- package/models/errors/retrieveconversation.js.map +0 -1
- package/models/errors/updateconversation.d.ts +0 -23
- package/models/errors/updateconversation.d.ts.map +0 -1
- package/models/errors/updateconversation.js +0 -68
- package/models/errors/updateconversation.js.map +0 -1
- package/models/operations/createconversation.d.ts +0 -126
- package/models/operations/createconversation.d.ts.map +0 -1
- package/models/operations/createconversation.js +0 -101
- package/models/operations/createconversation.js.map +0 -1
- package/models/operations/createconversationresponse.d.ts +0 -209
- package/models/operations/createconversationresponse.d.ts.map +0 -1
- package/models/operations/createconversationresponse.js +0 -217
- package/models/operations/createconversationresponse.js.map +0 -1
- package/models/operations/deleteconversation.d.ts +0 -15
- package/models/operations/deleteconversation.d.ts.map +0 -1
- package/models/operations/deleteconversation.js +0 -54
- package/models/operations/deleteconversation.js.map +0 -1
- package/models/operations/generateconversationname.d.ts +0 -105
- package/models/operations/generateconversationname.d.ts.map +0 -1
- package/models/operations/generateconversationname.js +0 -103
- package/models/operations/generateconversationname.js.map +0 -1
- package/models/operations/listconversations.d.ts +0 -51
- package/models/operations/listconversations.d.ts.map +0 -1
- package/models/operations/listconversations.js +0 -74
- package/models/operations/listconversations.js.map +0 -1
- package/models/operations/retrieveconversation.d.ts +0 -15
- package/models/operations/retrieveconversation.d.ts.map +0 -1
- package/models/operations/retrieveconversation.js +0 -54
- package/models/operations/retrieveconversation.js.map +0 -1
- package/models/operations/updateconversation.d.ts +0 -131
- package/models/operations/updateconversation.d.ts.map +0 -1
- package/models/operations/updateconversation.js +0 -113
- package/models/operations/updateconversation.js.map +0 -1
- package/sdk/conversations.d.ts +0 -56
- package/sdk/conversations.d.ts.map +0 -1
- package/sdk/conversations.js +0 -82
- package/sdk/conversations.js.map +0 -1
- package/sdk/internal.d.ts +0 -13
- package/sdk/internal.d.ts.map +0 -1
- package/sdk/internal.js +0 -22
- package/sdk/internal.js.map +0 -1
- package/src/funcs/conversationsCreate.ts +0 -161
- package/src/funcs/conversationsCreateConversationResponse.ts +0 -186
- package/src/funcs/conversationsDelete.ts +0 -180
- package/src/funcs/conversationsGenerateName.ts +0 -194
- package/src/funcs/conversationsList.ts +0 -186
- package/src/funcs/conversationsRetrieve.ts +0 -181
- package/src/funcs/conversationsUpdate.ts +0 -184
- package/src/models/components/conversationresponse.ts +0 -132
- package/src/models/components/conversationwithmessagesresponse.ts +0 -149
- package/src/models/components/messageresponse.ts +0 -127
- package/src/models/components/usermessagerequest.ts +0 -136
- package/src/models/errors/deleteconversation.ts +0 -51
- package/src/models/errors/generateconversationname.ts +0 -99
- package/src/models/errors/retrieveconversation.ts +0 -51
- package/src/models/errors/updateconversation.ts +0 -51
- package/src/models/operations/createconversation.ts +0 -227
- package/src/models/operations/createconversationresponse.ts +0 -498
- package/src/models/operations/deleteconversation.ts +0 -39
- package/src/models/operations/generateconversationname.ts +0 -207
- package/src/models/operations/listconversations.ts +0 -104
- package/src/models/operations/retrieveconversation.ts +0 -41
- package/src/models/operations/updateconversation.ts +0 -252
- package/src/sdk/conversations.ts +0 -147
- package/src/sdk/internal.ts +0 -28
package/sdk/conversations.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Conversations = void 0;
|
|
7
|
-
const conversationsCreate_js_1 = require("../funcs/conversationsCreate.js");
|
|
8
|
-
const conversationsCreateConversationResponse_js_1 = require("../funcs/conversationsCreateConversationResponse.js");
|
|
9
|
-
const conversationsDelete_js_1 = require("../funcs/conversationsDelete.js");
|
|
10
|
-
const conversationsGenerateName_js_1 = require("../funcs/conversationsGenerateName.js");
|
|
11
|
-
const conversationsList_js_1 = require("../funcs/conversationsList.js");
|
|
12
|
-
const conversationsRetrieve_js_1 = require("../funcs/conversationsRetrieve.js");
|
|
13
|
-
const conversationsUpdate_js_1 = require("../funcs/conversationsUpdate.js");
|
|
14
|
-
const sdks_js_1 = require("../lib/sdks.js");
|
|
15
|
-
const fp_js_1 = require("../types/fp.js");
|
|
16
|
-
class Conversations extends sdks_js_1.ClientSDK {
|
|
17
|
-
/**
|
|
18
|
-
* List conversations
|
|
19
|
-
*
|
|
20
|
-
* @remarks
|
|
21
|
-
* Retrieves a paginated list of conversations in your workspace. Conversations are returned sorted by creation date (newest first). Use pagination parameters to efficiently navigate through large collections.
|
|
22
|
-
*/
|
|
23
|
-
async list(limit, startingAfter, endingBefore, entityId, options) {
|
|
24
|
-
return (0, fp_js_1.unwrapAsync)((0, conversationsList_js_1.conversationsList)(this, limit, startingAfter, endingBefore, entityId, options));
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Create conversation
|
|
28
|
-
*
|
|
29
|
-
* @remarks
|
|
30
|
-
* Creates a new conversation in the workspace. Conversations serve as containers for organizing related messages and interactions. Each conversation is assigned a unique identifier and timestamps for tracking.
|
|
31
|
-
*/
|
|
32
|
-
async create(request, options) {
|
|
33
|
-
return (0, fp_js_1.unwrapAsync)((0, conversationsCreate_js_1.conversationsCreate)(this, request, options));
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Generate conversation name
|
|
37
|
-
*
|
|
38
|
-
* @remarks
|
|
39
|
-
* Generates a display name for a conversation using AI based on the provided context. Updates the conversation with the generated name and sets generatingTitle to false.
|
|
40
|
-
*/
|
|
41
|
-
async generateName(requestBody, conversationId, options) {
|
|
42
|
-
return (0, fp_js_1.unwrapAsync)((0, conversationsGenerateName_js_1.conversationsGenerateName)(this, requestBody, conversationId, options));
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Retrieve conversation
|
|
46
|
-
*
|
|
47
|
-
* @remarks
|
|
48
|
-
* Retrieves detailed information about a specific conversation identified by its unique ID. Returns the complete conversation object including metadata and timestamps.
|
|
49
|
-
*/
|
|
50
|
-
async retrieve(conversationId, options) {
|
|
51
|
-
return (0, fp_js_1.unwrapAsync)((0, conversationsRetrieve_js_1.conversationsRetrieve)(this, conversationId, options));
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Update conversation
|
|
55
|
-
*
|
|
56
|
-
* @remarks
|
|
57
|
-
* Modifies an existing conversation's properties. Only the fields provided in the request body will be updated; all other fields remain unchanged. Changes are applied immediately.
|
|
58
|
-
*/
|
|
59
|
-
async update(requestBody, conversationId, options) {
|
|
60
|
-
return (0, fp_js_1.unwrapAsync)((0, conversationsUpdate_js_1.conversationsUpdate)(this, requestBody, conversationId, options));
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Delete conversation
|
|
64
|
-
*
|
|
65
|
-
* @remarks
|
|
66
|
-
* Permanently removes a conversation from the workspace
|
|
67
|
-
*/
|
|
68
|
-
async delete(conversationId, options) {
|
|
69
|
-
return (0, fp_js_1.unwrapAsync)((0, conversationsDelete_js_1.conversationsDelete)(this, conversationId, options));
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Create internal response
|
|
73
|
-
*
|
|
74
|
-
* @remarks
|
|
75
|
-
* Creates a response for a freeform conversation without an agent. Uses a default model for generation.
|
|
76
|
-
*/
|
|
77
|
-
async createConversationResponse(request, options) {
|
|
78
|
-
return (0, fp_js_1.unwrapAsync)((0, conversationsCreateConversationResponse_js_1.conversationsCreateConversationResponse)(this, request, options));
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
exports.Conversations = Conversations;
|
|
82
|
-
//# sourceMappingURL=conversations.js.map
|
package/sdk/conversations.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conversations.js","sourceRoot":"","sources":["../src/sdk/conversations.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4EAAsE;AACtE,oHAA8G;AAC9G,4EAAsE;AACtE,wFAAkF;AAClF,wEAAkE;AAClE,gFAA0E;AAC1E,4EAAsE;AAEtE,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,aAAc,SAAQ,mBAAS;IAC1C;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CACR,KAA0B,EAC1B,aAAkC,EAClC,YAAiC,EACjC,QAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,wCAAiB,EAClC,IAAI,EACJ,KAAK,EACL,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAAiD,EACjD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,4CAAmB,EACpC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,YAAY,CAChB,WAA2D,EAC3D,cAAsB,EACtB,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,wDAAyB,EAC1C,IAAI,EACJ,WAAW,EACX,cAAc,EACd,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,QAAQ,CACZ,cAAsB,EACtB,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gDAAqB,EACtC,IAAI,EACJ,cAAc,EACd,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,WAAqD,EACrD,cAAsB,EACtB,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,4CAAmB,EACpC,IAAI,EACJ,WAAW,EACX,cAAc,EACd,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,cAAsB,EACtB,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,4CAAmB,EACpC,IAAI,EACJ,cAAc,EACd,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,0BAA0B,CAC9B,OAAqD,EACrD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oFAAuC,EACxD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAjID,sCAiIC"}
|
package/sdk/internal.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { EventStream } from "../lib/event-streams.js";
|
|
2
|
-
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
3
|
-
import * as operations from "../models/operations/index.js";
|
|
4
|
-
export declare class Internal extends ClientSDK {
|
|
5
|
-
/**
|
|
6
|
-
* Create internal response
|
|
7
|
-
*
|
|
8
|
-
* @remarks
|
|
9
|
-
* Creates a response for a freeform conversation without an agent. Uses a default model for generation.
|
|
10
|
-
*/
|
|
11
|
-
createConversationResponse(request: operations.CreateConversationResponseRequest, options?: RequestOptions): Promise<EventStream<operations.CreateConversationResponseResponseBody>>;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=internal.d.ts.map
|
package/sdk/internal.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/sdk/internal.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,QAAS,SAAQ,SAAS;IACrC;;;;;OAKG;IACG,0BAA0B,CAC9B,OAAO,EAAE,UAAU,CAAC,iCAAiC,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,sCAAsC,CAAC,CAAC;CAO3E"}
|
package/sdk/internal.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Internal = void 0;
|
|
7
|
-
const conversationsCreateConversationResponse_js_1 = require("../funcs/conversationsCreateConversationResponse.js");
|
|
8
|
-
const sdks_js_1 = require("../lib/sdks.js");
|
|
9
|
-
const fp_js_1 = require("../types/fp.js");
|
|
10
|
-
class Internal extends sdks_js_1.ClientSDK {
|
|
11
|
-
/**
|
|
12
|
-
* Create internal response
|
|
13
|
-
*
|
|
14
|
-
* @remarks
|
|
15
|
-
* Creates a response for a freeform conversation without an agent. Uses a default model for generation.
|
|
16
|
-
*/
|
|
17
|
-
async createConversationResponse(request, options) {
|
|
18
|
-
return (0, fp_js_1.unwrapAsync)((0, conversationsCreateConversationResponse_js_1.conversationsCreateConversationResponse)(this, request, options));
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.Internal = Internal;
|
|
22
|
-
//# sourceMappingURL=internal.js.map
|
package/sdk/internal.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/sdk/internal.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,oHAA8G;AAE9G,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,QAAS,SAAQ,mBAAS;IACrC;;;;;OAKG;IACH,KAAK,CAAC,0BAA0B,CAC9B,OAAqD,EACrD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oFAAuC,EACxD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAjBD,4BAiBC"}
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { OrqCore } from "../core.js";
|
|
6
|
-
import { encodeJSON } from "../lib/encodings.js";
|
|
7
|
-
import * as M from "../lib/matchers.js";
|
|
8
|
-
import { compactMap } from "../lib/primitives.js";
|
|
9
|
-
import { safeParse } from "../lib/schemas.js";
|
|
10
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
-
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import {
|
|
14
|
-
ConnectionError,
|
|
15
|
-
InvalidRequestError,
|
|
16
|
-
RequestAbortedError,
|
|
17
|
-
RequestTimeoutError,
|
|
18
|
-
UnexpectedClientError,
|
|
19
|
-
} from "../models/errors/httpclienterrors.js";
|
|
20
|
-
import { OrqError } from "../models/errors/orqerror.js";
|
|
21
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
-
import * as operations from "../models/operations/index.js";
|
|
24
|
-
import { APICall, APIPromise } from "../types/async.js";
|
|
25
|
-
import { Result } from "../types/fp.js";
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Create conversation
|
|
29
|
-
*
|
|
30
|
-
* @remarks
|
|
31
|
-
* Creates a new conversation in the workspace. Conversations serve as containers for organizing related messages and interactions. Each conversation is assigned a unique identifier and timestamps for tracking.
|
|
32
|
-
*/
|
|
33
|
-
export function conversationsCreate(
|
|
34
|
-
client: OrqCore,
|
|
35
|
-
request: operations.CreateConversationRequestBody,
|
|
36
|
-
options?: RequestOptions,
|
|
37
|
-
): APIPromise<
|
|
38
|
-
Result<
|
|
39
|
-
operations.CreateConversationResponseBody,
|
|
40
|
-
| OrqError
|
|
41
|
-
| ResponseValidationError
|
|
42
|
-
| ConnectionError
|
|
43
|
-
| RequestAbortedError
|
|
44
|
-
| RequestTimeoutError
|
|
45
|
-
| InvalidRequestError
|
|
46
|
-
| UnexpectedClientError
|
|
47
|
-
| SDKValidationError
|
|
48
|
-
>
|
|
49
|
-
> {
|
|
50
|
-
return new APIPromise($do(
|
|
51
|
-
client,
|
|
52
|
-
request,
|
|
53
|
-
options,
|
|
54
|
-
));
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
async function $do(
|
|
58
|
-
client: OrqCore,
|
|
59
|
-
request: operations.CreateConversationRequestBody,
|
|
60
|
-
options?: RequestOptions,
|
|
61
|
-
): Promise<
|
|
62
|
-
[
|
|
63
|
-
Result<
|
|
64
|
-
operations.CreateConversationResponseBody,
|
|
65
|
-
| OrqError
|
|
66
|
-
| ResponseValidationError
|
|
67
|
-
| ConnectionError
|
|
68
|
-
| RequestAbortedError
|
|
69
|
-
| RequestTimeoutError
|
|
70
|
-
| InvalidRequestError
|
|
71
|
-
| UnexpectedClientError
|
|
72
|
-
| SDKValidationError
|
|
73
|
-
>,
|
|
74
|
-
APICall,
|
|
75
|
-
]
|
|
76
|
-
> {
|
|
77
|
-
const parsed = safeParse(
|
|
78
|
-
request,
|
|
79
|
-
(value) =>
|
|
80
|
-
operations.CreateConversationRequestBody$outboundSchema.parse(value),
|
|
81
|
-
"Input validation failed",
|
|
82
|
-
);
|
|
83
|
-
if (!parsed.ok) {
|
|
84
|
-
return [parsed, { status: "invalid" }];
|
|
85
|
-
}
|
|
86
|
-
const payload = parsed.value;
|
|
87
|
-
const body = encodeJSON("body", payload, { explode: true });
|
|
88
|
-
|
|
89
|
-
const path = pathToFunc("/v2/conversations")();
|
|
90
|
-
|
|
91
|
-
const headers = new Headers(compactMap({
|
|
92
|
-
"Content-Type": "application/json",
|
|
93
|
-
Accept: "application/json",
|
|
94
|
-
}));
|
|
95
|
-
|
|
96
|
-
const secConfig = await extractSecurity(client._options.apiKey);
|
|
97
|
-
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
98
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
99
|
-
|
|
100
|
-
const context = {
|
|
101
|
-
options: client._options,
|
|
102
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
103
|
-
operationID: "CreateConversation",
|
|
104
|
-
oAuth2Scopes: null,
|
|
105
|
-
|
|
106
|
-
resolvedSecurity: requestSecurity,
|
|
107
|
-
|
|
108
|
-
securitySource: client._options.apiKey,
|
|
109
|
-
retryConfig: options?.retries
|
|
110
|
-
|| client._options.retryConfig
|
|
111
|
-
|| { strategy: "none" },
|
|
112
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
const requestRes = client._createRequest(context, {
|
|
116
|
-
security: requestSecurity,
|
|
117
|
-
method: "POST",
|
|
118
|
-
baseURL: options?.serverURL,
|
|
119
|
-
path: path,
|
|
120
|
-
headers: headers,
|
|
121
|
-
body: body,
|
|
122
|
-
userAgent: client._options.userAgent,
|
|
123
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
124
|
-
}, options);
|
|
125
|
-
if (!requestRes.ok) {
|
|
126
|
-
return [requestRes, { status: "invalid" }];
|
|
127
|
-
}
|
|
128
|
-
const req = requestRes.value;
|
|
129
|
-
|
|
130
|
-
const doResult = await client._do(req, {
|
|
131
|
-
context,
|
|
132
|
-
errorCodes: ["4XX", "5XX"],
|
|
133
|
-
retryConfig: context.retryConfig,
|
|
134
|
-
retryCodes: context.retryCodes,
|
|
135
|
-
});
|
|
136
|
-
if (!doResult.ok) {
|
|
137
|
-
return [doResult, { status: "request-error", request: req }];
|
|
138
|
-
}
|
|
139
|
-
const response = doResult.value;
|
|
140
|
-
|
|
141
|
-
const [result] = await M.match<
|
|
142
|
-
operations.CreateConversationResponseBody,
|
|
143
|
-
| OrqError
|
|
144
|
-
| ResponseValidationError
|
|
145
|
-
| ConnectionError
|
|
146
|
-
| RequestAbortedError
|
|
147
|
-
| RequestTimeoutError
|
|
148
|
-
| InvalidRequestError
|
|
149
|
-
| UnexpectedClientError
|
|
150
|
-
| SDKValidationError
|
|
151
|
-
>(
|
|
152
|
-
M.json(201, operations.CreateConversationResponseBody$inboundSchema),
|
|
153
|
-
M.fail("4XX"),
|
|
154
|
-
M.fail("5XX"),
|
|
155
|
-
)(response, req);
|
|
156
|
-
if (!result.ok) {
|
|
157
|
-
return [result, { status: "complete", request: req, response }];
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
return [result, { status: "complete", request: req, response }];
|
|
161
|
-
}
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { OrqCore } from "../core.js";
|
|
7
|
-
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
8
|
-
import { EventStream } from "../lib/event-streams.js";
|
|
9
|
-
import * as M from "../lib/matchers.js";
|
|
10
|
-
import { compactMap } from "../lib/primitives.js";
|
|
11
|
-
import { safeParse } from "../lib/schemas.js";
|
|
12
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
13
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
14
|
-
import { pathToFunc } from "../lib/url.js";
|
|
15
|
-
import {
|
|
16
|
-
ConnectionError,
|
|
17
|
-
InvalidRequestError,
|
|
18
|
-
RequestAbortedError,
|
|
19
|
-
RequestTimeoutError,
|
|
20
|
-
UnexpectedClientError,
|
|
21
|
-
} from "../models/errors/httpclienterrors.js";
|
|
22
|
-
import { OrqError } from "../models/errors/orqerror.js";
|
|
23
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
-
import * as operations from "../models/operations/index.js";
|
|
26
|
-
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
-
import { Result } from "../types/fp.js";
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Create internal response
|
|
31
|
-
*
|
|
32
|
-
* @remarks
|
|
33
|
-
* Creates a response for a freeform conversation without an agent. Uses a default model for generation.
|
|
34
|
-
*/
|
|
35
|
-
export function conversationsCreateConversationResponse(
|
|
36
|
-
client: OrqCore,
|
|
37
|
-
request: operations.CreateConversationResponseRequest,
|
|
38
|
-
options?: RequestOptions,
|
|
39
|
-
): APIPromise<
|
|
40
|
-
Result<
|
|
41
|
-
EventStream<operations.CreateConversationResponseResponseBody>,
|
|
42
|
-
| OrqError
|
|
43
|
-
| ResponseValidationError
|
|
44
|
-
| ConnectionError
|
|
45
|
-
| RequestAbortedError
|
|
46
|
-
| RequestTimeoutError
|
|
47
|
-
| InvalidRequestError
|
|
48
|
-
| UnexpectedClientError
|
|
49
|
-
| SDKValidationError
|
|
50
|
-
>
|
|
51
|
-
> {
|
|
52
|
-
return new APIPromise($do(
|
|
53
|
-
client,
|
|
54
|
-
request,
|
|
55
|
-
options,
|
|
56
|
-
));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
async function $do(
|
|
60
|
-
client: OrqCore,
|
|
61
|
-
request: operations.CreateConversationResponseRequest,
|
|
62
|
-
options?: RequestOptions,
|
|
63
|
-
): Promise<
|
|
64
|
-
[
|
|
65
|
-
Result<
|
|
66
|
-
EventStream<operations.CreateConversationResponseResponseBody>,
|
|
67
|
-
| OrqError
|
|
68
|
-
| ResponseValidationError
|
|
69
|
-
| ConnectionError
|
|
70
|
-
| RequestAbortedError
|
|
71
|
-
| RequestTimeoutError
|
|
72
|
-
| InvalidRequestError
|
|
73
|
-
| UnexpectedClientError
|
|
74
|
-
| SDKValidationError
|
|
75
|
-
>,
|
|
76
|
-
APICall,
|
|
77
|
-
]
|
|
78
|
-
> {
|
|
79
|
-
const parsed = safeParse(
|
|
80
|
-
request,
|
|
81
|
-
(value) =>
|
|
82
|
-
operations.CreateConversationResponseRequest$outboundSchema.parse(value),
|
|
83
|
-
"Input validation failed",
|
|
84
|
-
);
|
|
85
|
-
if (!parsed.ok) {
|
|
86
|
-
return [parsed, { status: "invalid" }];
|
|
87
|
-
}
|
|
88
|
-
const payload = parsed.value;
|
|
89
|
-
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
90
|
-
|
|
91
|
-
const pathParams = {
|
|
92
|
-
conversation_id: encodeSimple("conversation_id", payload.conversation_id, {
|
|
93
|
-
explode: false,
|
|
94
|
-
charEncoding: "percent",
|
|
95
|
-
}),
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
const path = pathToFunc("/v2/conversations/{conversation_id}/responses")(
|
|
99
|
-
pathParams,
|
|
100
|
-
);
|
|
101
|
-
|
|
102
|
-
const headers = new Headers(compactMap({
|
|
103
|
-
"Content-Type": "application/json",
|
|
104
|
-
Accept: "text/event-stream",
|
|
105
|
-
}));
|
|
106
|
-
|
|
107
|
-
const secConfig = await extractSecurity(client._options.apiKey);
|
|
108
|
-
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
109
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
110
|
-
|
|
111
|
-
const context = {
|
|
112
|
-
options: client._options,
|
|
113
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
114
|
-
operationID: "CreateConversationResponse",
|
|
115
|
-
oAuth2Scopes: null,
|
|
116
|
-
|
|
117
|
-
resolvedSecurity: requestSecurity,
|
|
118
|
-
|
|
119
|
-
securitySource: client._options.apiKey,
|
|
120
|
-
retryConfig: options?.retries
|
|
121
|
-
|| client._options.retryConfig
|
|
122
|
-
|| { strategy: "none" },
|
|
123
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
const requestRes = client._createRequest(context, {
|
|
127
|
-
security: requestSecurity,
|
|
128
|
-
method: "POST",
|
|
129
|
-
baseURL: options?.serverURL,
|
|
130
|
-
path: path,
|
|
131
|
-
headers: headers,
|
|
132
|
-
body: body,
|
|
133
|
-
userAgent: client._options.userAgent,
|
|
134
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
135
|
-
}, options);
|
|
136
|
-
if (!requestRes.ok) {
|
|
137
|
-
return [requestRes, { status: "invalid" }];
|
|
138
|
-
}
|
|
139
|
-
const req = requestRes.value;
|
|
140
|
-
|
|
141
|
-
const doResult = await client._do(req, {
|
|
142
|
-
context,
|
|
143
|
-
errorCodes: ["4XX", "5XX"],
|
|
144
|
-
retryConfig: context.retryConfig,
|
|
145
|
-
retryCodes: context.retryCodes,
|
|
146
|
-
});
|
|
147
|
-
if (!doResult.ok) {
|
|
148
|
-
return [doResult, { status: "request-error", request: req }];
|
|
149
|
-
}
|
|
150
|
-
const response = doResult.value;
|
|
151
|
-
|
|
152
|
-
const [result] = await M.match<
|
|
153
|
-
EventStream<operations.CreateConversationResponseResponseBody>,
|
|
154
|
-
| OrqError
|
|
155
|
-
| ResponseValidationError
|
|
156
|
-
| ConnectionError
|
|
157
|
-
| RequestAbortedError
|
|
158
|
-
| RequestTimeoutError
|
|
159
|
-
| InvalidRequestError
|
|
160
|
-
| UnexpectedClientError
|
|
161
|
-
| SDKValidationError
|
|
162
|
-
>(
|
|
163
|
-
M.sse(
|
|
164
|
-
200,
|
|
165
|
-
z.instanceof(ReadableStream<Uint8Array>)
|
|
166
|
-
.transform(stream => {
|
|
167
|
-
return new EventStream(stream, rawEvent => {
|
|
168
|
-
if (rawEvent.data === "[DONE]") return { done: true };
|
|
169
|
-
return {
|
|
170
|
-
value: operations
|
|
171
|
-
.CreateConversationResponseResponseBody$inboundSchema.parse(
|
|
172
|
-
rawEvent,
|
|
173
|
-
),
|
|
174
|
-
};
|
|
175
|
-
});
|
|
176
|
-
}),
|
|
177
|
-
),
|
|
178
|
-
M.fail("4XX"),
|
|
179
|
-
M.fail("5XX"),
|
|
180
|
-
)(response, req);
|
|
181
|
-
if (!result.ok) {
|
|
182
|
-
return [result, { status: "complete", request: req, response }];
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
return [result, { status: "complete", request: req, response }];
|
|
186
|
-
}
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { OrqCore } from "../core.js";
|
|
7
|
-
import { encodeSimple } from "../lib/encodings.js";
|
|
8
|
-
import * as M from "../lib/matchers.js";
|
|
9
|
-
import { compactMap } from "../lib/primitives.js";
|
|
10
|
-
import { safeParse } from "../lib/schemas.js";
|
|
11
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
-
import { pathToFunc } from "../lib/url.js";
|
|
14
|
-
import {
|
|
15
|
-
ConnectionError,
|
|
16
|
-
InvalidRequestError,
|
|
17
|
-
RequestAbortedError,
|
|
18
|
-
RequestTimeoutError,
|
|
19
|
-
UnexpectedClientError,
|
|
20
|
-
} from "../models/errors/httpclienterrors.js";
|
|
21
|
-
import * as errors from "../models/errors/index.js";
|
|
22
|
-
import { OrqError } from "../models/errors/orqerror.js";
|
|
23
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
-
import * as operations from "../models/operations/index.js";
|
|
26
|
-
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
-
import { Result } from "../types/fp.js";
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Delete conversation
|
|
31
|
-
*
|
|
32
|
-
* @remarks
|
|
33
|
-
* Permanently removes a conversation from the workspace
|
|
34
|
-
*/
|
|
35
|
-
export function conversationsDelete(
|
|
36
|
-
client: OrqCore,
|
|
37
|
-
conversationId: string,
|
|
38
|
-
options?: RequestOptions,
|
|
39
|
-
): APIPromise<
|
|
40
|
-
Result<
|
|
41
|
-
void,
|
|
42
|
-
| errors.DeleteConversationResponseBody
|
|
43
|
-
| OrqError
|
|
44
|
-
| ResponseValidationError
|
|
45
|
-
| ConnectionError
|
|
46
|
-
| RequestAbortedError
|
|
47
|
-
| RequestTimeoutError
|
|
48
|
-
| InvalidRequestError
|
|
49
|
-
| UnexpectedClientError
|
|
50
|
-
| SDKValidationError
|
|
51
|
-
>
|
|
52
|
-
> {
|
|
53
|
-
return new APIPromise($do(
|
|
54
|
-
client,
|
|
55
|
-
conversationId,
|
|
56
|
-
options,
|
|
57
|
-
));
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
async function $do(
|
|
61
|
-
client: OrqCore,
|
|
62
|
-
conversationId: string,
|
|
63
|
-
options?: RequestOptions,
|
|
64
|
-
): Promise<
|
|
65
|
-
[
|
|
66
|
-
Result<
|
|
67
|
-
void,
|
|
68
|
-
| errors.DeleteConversationResponseBody
|
|
69
|
-
| OrqError
|
|
70
|
-
| ResponseValidationError
|
|
71
|
-
| ConnectionError
|
|
72
|
-
| RequestAbortedError
|
|
73
|
-
| RequestTimeoutError
|
|
74
|
-
| InvalidRequestError
|
|
75
|
-
| UnexpectedClientError
|
|
76
|
-
| SDKValidationError
|
|
77
|
-
>,
|
|
78
|
-
APICall,
|
|
79
|
-
]
|
|
80
|
-
> {
|
|
81
|
-
const input: operations.DeleteConversationRequest = {
|
|
82
|
-
conversationId: conversationId,
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
const parsed = safeParse(
|
|
86
|
-
input,
|
|
87
|
-
(value) => operations.DeleteConversationRequest$outboundSchema.parse(value),
|
|
88
|
-
"Input validation failed",
|
|
89
|
-
);
|
|
90
|
-
if (!parsed.ok) {
|
|
91
|
-
return [parsed, { status: "invalid" }];
|
|
92
|
-
}
|
|
93
|
-
const payload = parsed.value;
|
|
94
|
-
const body = null;
|
|
95
|
-
|
|
96
|
-
const pathParams = {
|
|
97
|
-
conversation_id: encodeSimple("conversation_id", payload.conversation_id, {
|
|
98
|
-
explode: false,
|
|
99
|
-
charEncoding: "percent",
|
|
100
|
-
}),
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
const path = pathToFunc("/v2/conversations/{conversation_id}")(pathParams);
|
|
104
|
-
|
|
105
|
-
const headers = new Headers(compactMap({
|
|
106
|
-
Accept: "application/json",
|
|
107
|
-
}));
|
|
108
|
-
|
|
109
|
-
const secConfig = await extractSecurity(client._options.apiKey);
|
|
110
|
-
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
111
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
112
|
-
|
|
113
|
-
const context = {
|
|
114
|
-
options: client._options,
|
|
115
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
116
|
-
operationID: "DeleteConversation",
|
|
117
|
-
oAuth2Scopes: null,
|
|
118
|
-
|
|
119
|
-
resolvedSecurity: requestSecurity,
|
|
120
|
-
|
|
121
|
-
securitySource: client._options.apiKey,
|
|
122
|
-
retryConfig: options?.retries
|
|
123
|
-
|| client._options.retryConfig
|
|
124
|
-
|| { strategy: "none" },
|
|
125
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
const requestRes = client._createRequest(context, {
|
|
129
|
-
security: requestSecurity,
|
|
130
|
-
method: "DELETE",
|
|
131
|
-
baseURL: options?.serverURL,
|
|
132
|
-
path: path,
|
|
133
|
-
headers: headers,
|
|
134
|
-
body: body,
|
|
135
|
-
userAgent: client._options.userAgent,
|
|
136
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
137
|
-
}, options);
|
|
138
|
-
if (!requestRes.ok) {
|
|
139
|
-
return [requestRes, { status: "invalid" }];
|
|
140
|
-
}
|
|
141
|
-
const req = requestRes.value;
|
|
142
|
-
|
|
143
|
-
const doResult = await client._do(req, {
|
|
144
|
-
context,
|
|
145
|
-
errorCodes: ["404", "4XX", "5XX"],
|
|
146
|
-
retryConfig: context.retryConfig,
|
|
147
|
-
retryCodes: context.retryCodes,
|
|
148
|
-
});
|
|
149
|
-
if (!doResult.ok) {
|
|
150
|
-
return [doResult, { status: "request-error", request: req }];
|
|
151
|
-
}
|
|
152
|
-
const response = doResult.value;
|
|
153
|
-
|
|
154
|
-
const responseFields = {
|
|
155
|
-
HttpMeta: { Response: response, Request: req },
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
const [result] = await M.match<
|
|
159
|
-
void,
|
|
160
|
-
| errors.DeleteConversationResponseBody
|
|
161
|
-
| OrqError
|
|
162
|
-
| ResponseValidationError
|
|
163
|
-
| ConnectionError
|
|
164
|
-
| RequestAbortedError
|
|
165
|
-
| RequestTimeoutError
|
|
166
|
-
| InvalidRequestError
|
|
167
|
-
| UnexpectedClientError
|
|
168
|
-
| SDKValidationError
|
|
169
|
-
>(
|
|
170
|
-
M.nil(204, z.void()),
|
|
171
|
-
M.jsonErr(404, errors.DeleteConversationResponseBody$inboundSchema),
|
|
172
|
-
M.fail("4XX"),
|
|
173
|
-
M.fail("5XX"),
|
|
174
|
-
)(response, req, { extraFields: responseFields });
|
|
175
|
-
if (!result.ok) {
|
|
176
|
-
return [result, { status: "complete", request: req, response }];
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
return [result, { status: "complete", request: req, response }];
|
|
180
|
-
}
|