@letta-ai/letta-client 0.1.170 → 0.1.172
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 +16 -3
- package/api/errors/BadRequestError.d.ts +2 -1
- package/api/errors/BadRequestError.js +2 -1
- package/api/errors/ConflictError.d.ts +2 -1
- package/api/errors/ConflictError.js +2 -1
- package/api/errors/InternalServerError.d.ts +2 -1
- package/api/errors/InternalServerError.js +2 -1
- package/api/errors/NotFoundError.d.ts +2 -1
- package/api/errors/NotFoundError.js +2 -1
- package/api/errors/PaymentRequiredError.d.ts +2 -1
- package/api/errors/PaymentRequiredError.js +2 -1
- package/api/errors/UnprocessableEntityError.d.ts +2 -1
- package/api/errors/UnprocessableEntityError.js +2 -1
- package/api/resources/agents/client/Client.d.ts +20 -10
- package/api/resources/agents/client/Client.js +166 -82
- package/api/resources/agents/resources/blocks/client/Client.d.ts +10 -5
- package/api/resources/agents/resources/blocks/client/Client.js +90 -45
- package/api/resources/agents/resources/context/client/Client.d.ts +2 -1
- package/api/resources/agents/resources/context/client/Client.js +18 -9
- package/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -1
- package/api/resources/agents/resources/coreMemory/client/Client.js +18 -9
- package/api/resources/agents/resources/files/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/files/client/Client.js +45 -21
- package/api/resources/agents/resources/folders/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/folders/client/Client.js +54 -27
- package/api/resources/agents/resources/groups/client/Client.d.ts +2 -1
- package/api/resources/agents/resources/groups/client/Client.js +19 -10
- package/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -1
- package/api/resources/agents/resources/memoryVariables/client/Client.js +18 -9
- package/api/resources/agents/resources/messages/client/Client.d.ts +16 -8
- package/api/resources/agents/resources/messages/client/Client.js +155 -83
- package/api/resources/agents/resources/passages/client/Client.d.ts +8 -4
- package/api/resources/agents/resources/passages/client/Client.js +64 -31
- package/api/resources/agents/resources/sources/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/sources/client/Client.js +54 -27
- package/api/resources/agents/resources/templates/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/templates/client/Client.js +54 -27
- package/api/resources/agents/resources/tools/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/tools/client/Client.js +54 -27
- package/api/resources/batches/client/Client.d.ts +8 -4
- package/api/resources/batches/client/Client.js +63 -30
- package/api/resources/blocks/client/Client.d.ts +12 -6
- package/api/resources/blocks/client/Client.js +100 -49
- package/api/resources/blocks/resources/agents/client/Client.d.ts +2 -1
- package/api/resources/blocks/resources/agents/client/Client.js +19 -10
- package/api/resources/clientSideAccessTokens/client/Client.d.ts +6 -3
- package/api/resources/clientSideAccessTokens/client/Client.js +46 -22
- package/api/resources/embeddingModels/client/Client.d.ts +2 -1
- package/api/resources/embeddingModels/client/Client.js +18 -9
- package/api/resources/folders/client/Client.d.ts +18 -9
- package/api/resources/folders/client/Client.js +154 -76
- package/api/resources/folders/resources/files/client/Client.d.ts +6 -3
- package/api/resources/folders/resources/files/client/Client.js +48 -24
- package/api/resources/folders/resources/passages/client/Client.d.ts +2 -1
- package/api/resources/folders/resources/passages/client/Client.js +19 -10
- package/api/resources/groups/client/Client.d.ts +12 -6
- package/api/resources/groups/client/Client.js +105 -52
- package/api/resources/groups/resources/messages/client/Client.d.ts +10 -5
- package/api/resources/groups/resources/messages/client/Client.js +91 -49
- package/api/resources/health/client/Client.d.ts +2 -1
- package/api/resources/health/client/Client.js +17 -8
- package/api/resources/identities/client/Client.d.ts +14 -7
- package/api/resources/identities/client/Client.js +123 -61
- package/api/resources/identities/resources/properties/client/Client.d.ts +2 -1
- package/api/resources/identities/resources/properties/client/Client.js +9 -3
- package/api/resources/jobs/client/Client.d.ts +10 -5
- package/api/resources/jobs/client/Client.js +92 -47
- package/api/resources/messages/client/Client.d.ts +2 -1
- package/api/resources/messages/client/Client.js +19 -10
- package/api/resources/models/client/Client.d.ts +2 -1
- package/api/resources/models/client/Client.js +27 -14
- package/api/resources/projects/client/Client.d.ts +2 -1
- package/api/resources/projects/client/Client.js +18 -9
- package/api/resources/providers/client/Client.d.ts +10 -5
- package/api/resources/providers/client/Client.js +77 -36
- package/api/resources/runs/client/Client.d.ts +8 -4
- package/api/resources/runs/client/Client.js +74 -38
- package/api/resources/runs/resources/messages/client/Client.d.ts +2 -1
- package/api/resources/runs/resources/messages/client/Client.js +21 -12
- package/api/resources/runs/resources/steps/client/Client.d.ts +2 -1
- package/api/resources/runs/resources/steps/client/Client.js +19 -10
- package/api/resources/runs/resources/usage/client/Client.d.ts +2 -1
- package/api/resources/runs/resources/usage/client/Client.js +18 -9
- package/api/resources/sources/client/Client.d.ts +20 -10
- package/api/resources/sources/client/Client.js +173 -86
- package/api/resources/sources/resources/files/client/Client.d.ts +6 -3
- package/api/resources/sources/resources/files/client/Client.js +48 -24
- package/api/resources/sources/resources/passages/client/Client.d.ts +2 -1
- package/api/resources/sources/resources/passages/client/Client.js +19 -10
- package/api/resources/steps/client/Client.d.ts +4 -2
- package/api/resources/steps/client/Client.js +41 -21
- package/api/resources/steps/resources/feedback/client/Client.d.ts +2 -1
- package/api/resources/steps/resources/feedback/client/Client.js +23 -12
- package/api/resources/tags/client/Client.d.ts +2 -1
- package/api/resources/tags/client/Client.js +19 -10
- package/api/resources/telemetry/client/Client.d.ts +2 -1
- package/api/resources/telemetry/client/Client.js +18 -9
- package/api/resources/templates/client/Client.d.ts +2 -1
- package/api/resources/templates/client/Client.js +18 -9
- package/api/resources/templates/resources/agents/client/Client.d.ts +2 -1
- package/api/resources/templates/resources/agents/client/Client.js +19 -10
- package/api/resources/tools/client/Client.d.ts +40 -20
- package/api/resources/tools/client/Client.js +356 -182
- package/api/resources/voice/client/Client.d.ts +2 -1
- package/api/resources/voice/client/Client.js +9 -3
- package/api/types/LettaStreamingRequest.d.ts +2 -0
- package/core/fetcher/APIResponse.d.ts +10 -0
- package/core/fetcher/Fetcher.d.ts +1 -1
- package/core/fetcher/Fetcher.js +11 -3
- package/core/fetcher/Headers.d.ts +2 -0
- package/core/fetcher/Headers.js +84 -0
- package/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/core/fetcher/HttpResponsePromise.js +103 -0
- package/core/fetcher/RawResponse.d.ts +29 -0
- package/core/fetcher/RawResponse.js +44 -0
- package/core/fetcher/createRequestUrl.d.ts +1 -1
- package/core/fetcher/getRequestBody.js +2 -1
- package/core/fetcher/index.d.ts +3 -0
- package/core/fetcher/index.js +7 -1
- package/core/fetcher/requestWithRetries.js +1 -1
- package/core/form-data-utils/FormDataWrapper.d.ts +3 -0
- package/core/form-data-utils/FormDataWrapper.js +53 -10
- package/core/form-data-utils/encodeAsFormParameter.d.ts +4 -0
- package/core/form-data-utils/encodeAsFormParameter.js +18 -0
- package/core/form-data-utils/index.d.ts +1 -0
- package/core/form-data-utils/index.js +3 -0
- package/core/json.d.ts +15 -0
- package/core/json.js +24 -0
- package/core/schemas/Schema.d.ts +2 -0
- package/core/schemas/Schema.js +2 -0
- package/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/core/schemas/builders/bigint/bigint.js +21 -17
- package/core/schemas/builders/object/object.js +1 -0
- package/core/schemas/builders/record/record.js +1 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +64 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +1 -1
- package/dist/api/errors/BadRequestError.d.ts +2 -1
- package/dist/api/errors/BadRequestError.js +2 -1
- package/dist/api/errors/ConflictError.d.ts +2 -1
- package/dist/api/errors/ConflictError.js +2 -1
- package/dist/api/errors/InternalServerError.d.ts +2 -1
- package/dist/api/errors/InternalServerError.js +2 -1
- package/dist/api/errors/NotFoundError.d.ts +2 -1
- package/dist/api/errors/NotFoundError.js +2 -1
- package/dist/api/errors/PaymentRequiredError.d.ts +2 -1
- package/dist/api/errors/PaymentRequiredError.js +2 -1
- package/dist/api/errors/UnprocessableEntityError.d.ts +2 -1
- package/dist/api/errors/UnprocessableEntityError.js +2 -1
- package/dist/api/resources/agents/client/Client.d.ts +20 -10
- package/dist/api/resources/agents/client/Client.js +166 -82
- package/dist/api/resources/agents/resources/blocks/client/Client.d.ts +10 -5
- package/dist/api/resources/agents/resources/blocks/client/Client.js +90 -45
- package/dist/api/resources/agents/resources/context/client/Client.d.ts +2 -1
- package/dist/api/resources/agents/resources/context/client/Client.js +18 -9
- package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -1
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +18 -9
- package/dist/api/resources/agents/resources/files/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/files/client/Client.js +45 -21
- package/dist/api/resources/agents/resources/folders/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/folders/client/Client.js +54 -27
- package/dist/api/resources/agents/resources/groups/client/Client.d.ts +2 -1
- package/dist/api/resources/agents/resources/groups/client/Client.js +19 -10
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -1
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +18 -9
- package/dist/api/resources/agents/resources/messages/client/Client.d.ts +16 -8
- package/dist/api/resources/agents/resources/messages/client/Client.js +155 -83
- package/dist/api/resources/agents/resources/passages/client/Client.d.ts +8 -4
- package/dist/api/resources/agents/resources/passages/client/Client.js +64 -31
- package/dist/api/resources/agents/resources/sources/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/sources/client/Client.js +54 -27
- package/dist/api/resources/agents/resources/templates/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/templates/client/Client.js +54 -27
- package/dist/api/resources/agents/resources/tools/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/tools/client/Client.js +54 -27
- package/dist/api/resources/batches/client/Client.d.ts +8 -4
- package/dist/api/resources/batches/client/Client.js +63 -30
- package/dist/api/resources/blocks/client/Client.d.ts +12 -6
- package/dist/api/resources/blocks/client/Client.js +100 -49
- package/dist/api/resources/blocks/resources/agents/client/Client.d.ts +2 -1
- package/dist/api/resources/blocks/resources/agents/client/Client.js +19 -10
- package/dist/api/resources/clientSideAccessTokens/client/Client.d.ts +6 -3
- package/dist/api/resources/clientSideAccessTokens/client/Client.js +46 -22
- package/dist/api/resources/embeddingModels/client/Client.d.ts +2 -1
- package/dist/api/resources/embeddingModels/client/Client.js +18 -9
- package/dist/api/resources/folders/client/Client.d.ts +18 -9
- package/dist/api/resources/folders/client/Client.js +154 -76
- package/dist/api/resources/folders/resources/files/client/Client.d.ts +6 -3
- package/dist/api/resources/folders/resources/files/client/Client.js +48 -24
- package/dist/api/resources/folders/resources/passages/client/Client.d.ts +2 -1
- package/dist/api/resources/folders/resources/passages/client/Client.js +19 -10
- package/dist/api/resources/groups/client/Client.d.ts +12 -6
- package/dist/api/resources/groups/client/Client.js +105 -52
- package/dist/api/resources/groups/resources/messages/client/Client.d.ts +10 -5
- package/dist/api/resources/groups/resources/messages/client/Client.js +91 -49
- package/dist/api/resources/health/client/Client.d.ts +2 -1
- package/dist/api/resources/health/client/Client.js +17 -8
- package/dist/api/resources/identities/client/Client.d.ts +14 -7
- package/dist/api/resources/identities/client/Client.js +123 -61
- package/dist/api/resources/identities/resources/properties/client/Client.d.ts +2 -1
- package/dist/api/resources/identities/resources/properties/client/Client.js +9 -3
- package/dist/api/resources/jobs/client/Client.d.ts +10 -5
- package/dist/api/resources/jobs/client/Client.js +92 -47
- package/dist/api/resources/messages/client/Client.d.ts +2 -1
- package/dist/api/resources/messages/client/Client.js +19 -10
- package/dist/api/resources/models/client/Client.d.ts +2 -1
- package/dist/api/resources/models/client/Client.js +27 -14
- package/dist/api/resources/projects/client/Client.d.ts +2 -1
- package/dist/api/resources/projects/client/Client.js +18 -9
- package/dist/api/resources/providers/client/Client.d.ts +10 -5
- package/dist/api/resources/providers/client/Client.js +77 -36
- package/dist/api/resources/runs/client/Client.d.ts +8 -4
- package/dist/api/resources/runs/client/Client.js +74 -38
- package/dist/api/resources/runs/resources/messages/client/Client.d.ts +2 -1
- package/dist/api/resources/runs/resources/messages/client/Client.js +21 -12
- package/dist/api/resources/runs/resources/steps/client/Client.d.ts +2 -1
- package/dist/api/resources/runs/resources/steps/client/Client.js +19 -10
- package/dist/api/resources/runs/resources/usage/client/Client.d.ts +2 -1
- package/dist/api/resources/runs/resources/usage/client/Client.js +18 -9
- package/dist/api/resources/sources/client/Client.d.ts +20 -10
- package/dist/api/resources/sources/client/Client.js +173 -86
- package/dist/api/resources/sources/resources/files/client/Client.d.ts +6 -3
- package/dist/api/resources/sources/resources/files/client/Client.js +48 -24
- package/dist/api/resources/sources/resources/passages/client/Client.d.ts +2 -1
- package/dist/api/resources/sources/resources/passages/client/Client.js +19 -10
- package/dist/api/resources/steps/client/Client.d.ts +4 -2
- package/dist/api/resources/steps/client/Client.js +41 -21
- package/dist/api/resources/steps/resources/feedback/client/Client.d.ts +2 -1
- package/dist/api/resources/steps/resources/feedback/client/Client.js +23 -12
- package/dist/api/resources/tags/client/Client.d.ts +2 -1
- package/dist/api/resources/tags/client/Client.js +19 -10
- package/dist/api/resources/telemetry/client/Client.d.ts +2 -1
- package/dist/api/resources/telemetry/client/Client.js +18 -9
- package/dist/api/resources/templates/client/Client.d.ts +2 -1
- package/dist/api/resources/templates/client/Client.js +18 -9
- package/dist/api/resources/templates/resources/agents/client/Client.d.ts +2 -1
- package/dist/api/resources/templates/resources/agents/client/Client.js +19 -10
- package/dist/api/resources/tools/client/Client.d.ts +40 -20
- package/dist/api/resources/tools/client/Client.js +356 -182
- package/dist/api/resources/voice/client/Client.d.ts +2 -1
- package/dist/api/resources/voice/client/Client.js +9 -3
- package/dist/api/types/LettaStreamingRequest.d.ts +2 -0
- package/dist/core/fetcher/APIResponse.d.ts +10 -0
- package/dist/core/fetcher/Fetcher.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.js +11 -3
- package/dist/core/fetcher/Headers.d.ts +2 -0
- package/dist/core/fetcher/Headers.js +84 -0
- package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/core/fetcher/HttpResponsePromise.js +103 -0
- package/dist/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/core/fetcher/RawResponse.js +44 -0
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
- package/dist/core/fetcher/getRequestBody.js +2 -1
- package/dist/core/fetcher/index.d.ts +3 -0
- package/dist/core/fetcher/index.js +7 -1
- package/dist/core/fetcher/requestWithRetries.js +1 -1
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +3 -0
- package/dist/core/form-data-utils/FormDataWrapper.js +53 -10
- package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +4 -0
- package/dist/core/form-data-utils/encodeAsFormParameter.js +18 -0
- package/dist/core/form-data-utils/index.d.ts +1 -0
- package/dist/core/form-data-utils/index.js +3 -0
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +24 -0
- package/dist/core/schemas/Schema.d.ts +2 -0
- package/dist/core/schemas/Schema.js +2 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/dist/core/schemas/builders/bigint/bigint.js +21 -17
- package/dist/core/schemas/builders/object/object.js +1 -0
- package/dist/core/schemas/builders/record/record.js +1 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +64 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +1 -1
- package/dist/errors/LettaError.d.ts +4 -1
- package/dist/errors/LettaError.js +6 -8
- package/dist/serialization/types/LettaStreamingRequest.d.ts +1 -0
- package/dist/serialization/types/LettaStreamingRequest.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/errors/LettaError.d.ts +4 -1
- package/errors/LettaError.js +6 -8
- package/package.json +4 -4
- package/serialization/types/LettaStreamingRequest.d.ts +1 -0
- package/serialization/types/LettaStreamingRequest.js +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -71,7 +71,10 @@ class Messages {
|
|
|
71
71
|
* @example
|
|
72
72
|
* await client.groups.messages.list("group_id")
|
|
73
73
|
*/
|
|
74
|
-
list(
|
|
74
|
+
list(groupId, request = {}, requestOptions) {
|
|
75
|
+
return core.HttpResponsePromise.fromPromise(this.__list(groupId, request, requestOptions));
|
|
76
|
+
}
|
|
77
|
+
__list(groupId_1) {
|
|
75
78
|
return __awaiter(this, arguments, void 0, function* (groupId, request = {}, requestOptions) {
|
|
76
79
|
var _a, _b, _c;
|
|
77
80
|
const { after, before, limit, useAssistantMessage, assistantMessageToolName, assistantMessageToolKwarg } = request;
|
|
@@ -99,7 +102,7 @@ class Messages {
|
|
|
99
102
|
method: "GET",
|
|
100
103
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
101
104
|
? yield core.Supplier.get(this._options.project)
|
|
102
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
105
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.172", "User-Agent": "@letta-ai/letta-client/0.1.172", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
103
106
|
contentType: "application/json",
|
|
104
107
|
queryParameters: _queryParams,
|
|
105
108
|
requestType: "json",
|
|
@@ -108,13 +111,16 @@ class Messages {
|
|
|
108
111
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
109
112
|
});
|
|
110
113
|
if (_response.ok) {
|
|
111
|
-
return
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
return {
|
|
115
|
+
data: serializers.groups.messages.list.Response.parseOrThrow(_response.body, {
|
|
116
|
+
unrecognizedObjectKeys: "passthrough",
|
|
117
|
+
allowUnrecognizedUnionMembers: true,
|
|
118
|
+
allowUnrecognizedEnumValues: true,
|
|
119
|
+
skipValidation: true,
|
|
120
|
+
breadcrumbsPrefix: ["response"],
|
|
121
|
+
}),
|
|
122
|
+
rawResponse: _response.rawResponse,
|
|
123
|
+
};
|
|
118
124
|
}
|
|
119
125
|
if (_response.error.reason === "status-code") {
|
|
120
126
|
switch (_response.error.statusCode) {
|
|
@@ -125,11 +131,12 @@ class Messages {
|
|
|
125
131
|
allowUnrecognizedEnumValues: true,
|
|
126
132
|
skipValidation: true,
|
|
127
133
|
breadcrumbsPrefix: ["response"],
|
|
128
|
-
}));
|
|
134
|
+
}), _response.rawResponse);
|
|
129
135
|
default:
|
|
130
136
|
throw new errors.LettaError({
|
|
131
137
|
statusCode: _response.error.statusCode,
|
|
132
138
|
body: _response.error.body,
|
|
139
|
+
rawResponse: _response.rawResponse,
|
|
133
140
|
});
|
|
134
141
|
}
|
|
135
142
|
}
|
|
@@ -138,12 +145,14 @@ class Messages {
|
|
|
138
145
|
throw new errors.LettaError({
|
|
139
146
|
statusCode: _response.error.statusCode,
|
|
140
147
|
body: _response.error.rawBody,
|
|
148
|
+
rawResponse: _response.rawResponse,
|
|
141
149
|
});
|
|
142
150
|
case "timeout":
|
|
143
151
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/groups/{group_id}/messages.");
|
|
144
152
|
case "unknown":
|
|
145
153
|
throw new errors.LettaError({
|
|
146
154
|
message: _response.error.errorMessage,
|
|
155
|
+
rawResponse: _response.rawResponse,
|
|
147
156
|
});
|
|
148
157
|
}
|
|
149
158
|
});
|
|
@@ -170,6 +179,9 @@ class Messages {
|
|
|
170
179
|
* })
|
|
171
180
|
*/
|
|
172
181
|
create(groupId, request, requestOptions) {
|
|
182
|
+
return core.HttpResponsePromise.fromPromise(this.__create(groupId, request, requestOptions));
|
|
183
|
+
}
|
|
184
|
+
__create(groupId, request, requestOptions) {
|
|
173
185
|
return __awaiter(this, void 0, void 0, function* () {
|
|
174
186
|
var _a, _b, _c;
|
|
175
187
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -177,7 +189,7 @@ class Messages {
|
|
|
177
189
|
method: "POST",
|
|
178
190
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
179
191
|
? yield core.Supplier.get(this._options.project)
|
|
180
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
192
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.172", "User-Agent": "@letta-ai/letta-client/0.1.172", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
181
193
|
contentType: "application/json",
|
|
182
194
|
requestType: "json",
|
|
183
195
|
body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -186,13 +198,16 @@ class Messages {
|
|
|
186
198
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
187
199
|
});
|
|
188
200
|
if (_response.ok) {
|
|
189
|
-
return
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
201
|
+
return {
|
|
202
|
+
data: serializers.LettaResponse.parseOrThrow(_response.body, {
|
|
203
|
+
unrecognizedObjectKeys: "passthrough",
|
|
204
|
+
allowUnrecognizedUnionMembers: true,
|
|
205
|
+
allowUnrecognizedEnumValues: true,
|
|
206
|
+
skipValidation: true,
|
|
207
|
+
breadcrumbsPrefix: ["response"],
|
|
208
|
+
}),
|
|
209
|
+
rawResponse: _response.rawResponse,
|
|
210
|
+
};
|
|
196
211
|
}
|
|
197
212
|
if (_response.error.reason === "status-code") {
|
|
198
213
|
switch (_response.error.statusCode) {
|
|
@@ -203,11 +218,12 @@ class Messages {
|
|
|
203
218
|
allowUnrecognizedEnumValues: true,
|
|
204
219
|
skipValidation: true,
|
|
205
220
|
breadcrumbsPrefix: ["response"],
|
|
206
|
-
}));
|
|
221
|
+
}), _response.rawResponse);
|
|
207
222
|
default:
|
|
208
223
|
throw new errors.LettaError({
|
|
209
224
|
statusCode: _response.error.statusCode,
|
|
210
225
|
body: _response.error.body,
|
|
226
|
+
rawResponse: _response.rawResponse,
|
|
211
227
|
});
|
|
212
228
|
}
|
|
213
229
|
}
|
|
@@ -216,12 +232,14 @@ class Messages {
|
|
|
216
232
|
throw new errors.LettaError({
|
|
217
233
|
statusCode: _response.error.statusCode,
|
|
218
234
|
body: _response.error.rawBody,
|
|
235
|
+
rawResponse: _response.rawResponse,
|
|
219
236
|
});
|
|
220
237
|
case "timeout":
|
|
221
238
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/groups/{group_id}/messages.");
|
|
222
239
|
case "unknown":
|
|
223
240
|
throw new errors.LettaError({
|
|
224
241
|
message: _response.error.errorMessage,
|
|
242
|
+
rawResponse: _response.rawResponse,
|
|
225
243
|
});
|
|
226
244
|
}
|
|
227
245
|
});
|
|
@@ -232,6 +250,9 @@ class Messages {
|
|
|
232
250
|
* It will stream the steps of the response always, and stream the tokens if 'stream_tokens' is set to True.
|
|
233
251
|
*/
|
|
234
252
|
createStream(groupId, request, requestOptions) {
|
|
253
|
+
return core.HttpResponsePromise.fromPromise(this.__createStream(groupId, request, requestOptions));
|
|
254
|
+
}
|
|
255
|
+
__createStream(groupId, request, requestOptions) {
|
|
235
256
|
return __awaiter(this, void 0, void 0, function* () {
|
|
236
257
|
var _a, _b, _c;
|
|
237
258
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -239,7 +260,7 @@ class Messages {
|
|
|
239
260
|
method: "POST",
|
|
240
261
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
241
262
|
? yield core.Supplier.get(this._options.project)
|
|
242
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
263
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.172", "User-Agent": "@letta-ai/letta-client/0.1.172", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
243
264
|
contentType: "application/json",
|
|
244
265
|
requestType: "json",
|
|
245
266
|
body: serializers.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -249,23 +270,26 @@ class Messages {
|
|
|
249
270
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
250
271
|
});
|
|
251
272
|
if (_response.ok) {
|
|
252
|
-
return
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
273
|
+
return {
|
|
274
|
+
data: new core.Stream({
|
|
275
|
+
stream: _response.body,
|
|
276
|
+
parse: (data) => __awaiter(this, void 0, void 0, function* () {
|
|
277
|
+
return serializers.groups.LettaStreamingResponse.parseOrThrow(data, {
|
|
278
|
+
unrecognizedObjectKeys: "passthrough",
|
|
279
|
+
allowUnrecognizedUnionMembers: true,
|
|
280
|
+
allowUnrecognizedEnumValues: true,
|
|
281
|
+
skipValidation: true,
|
|
282
|
+
breadcrumbsPrefix: ["response"],
|
|
283
|
+
});
|
|
284
|
+
}),
|
|
285
|
+
signal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
286
|
+
eventShape: {
|
|
287
|
+
type: "sse",
|
|
288
|
+
streamTerminator: "[DONE]",
|
|
289
|
+
},
|
|
262
290
|
}),
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
type: "sse",
|
|
266
|
-
streamTerminator: "[DONE]",
|
|
267
|
-
},
|
|
268
|
-
});
|
|
291
|
+
rawResponse: _response.rawResponse,
|
|
292
|
+
};
|
|
269
293
|
}
|
|
270
294
|
if (_response.error.reason === "status-code") {
|
|
271
295
|
switch (_response.error.statusCode) {
|
|
@@ -276,11 +300,12 @@ class Messages {
|
|
|
276
300
|
allowUnrecognizedEnumValues: true,
|
|
277
301
|
skipValidation: true,
|
|
278
302
|
breadcrumbsPrefix: ["response"],
|
|
279
|
-
}));
|
|
303
|
+
}), _response.rawResponse);
|
|
280
304
|
default:
|
|
281
305
|
throw new errors.LettaError({
|
|
282
306
|
statusCode: _response.error.statusCode,
|
|
283
307
|
body: _response.error.body,
|
|
308
|
+
rawResponse: _response.rawResponse,
|
|
284
309
|
});
|
|
285
310
|
}
|
|
286
311
|
}
|
|
@@ -289,12 +314,14 @@ class Messages {
|
|
|
289
314
|
throw new errors.LettaError({
|
|
290
315
|
statusCode: _response.error.statusCode,
|
|
291
316
|
body: _response.error.rawBody,
|
|
317
|
+
rawResponse: _response.rawResponse,
|
|
292
318
|
});
|
|
293
319
|
case "timeout":
|
|
294
320
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/groups/{group_id}/messages/stream.");
|
|
295
321
|
case "unknown":
|
|
296
322
|
throw new errors.LettaError({
|
|
297
323
|
message: _response.error.errorMessage,
|
|
324
|
+
rawResponse: _response.rawResponse,
|
|
298
325
|
});
|
|
299
326
|
}
|
|
300
327
|
});
|
|
@@ -315,6 +342,9 @@ class Messages {
|
|
|
315
342
|
* })
|
|
316
343
|
*/
|
|
317
344
|
modify(groupId, messageId, request, requestOptions) {
|
|
345
|
+
return core.HttpResponsePromise.fromPromise(this.__modify(groupId, messageId, request, requestOptions));
|
|
346
|
+
}
|
|
347
|
+
__modify(groupId, messageId, request, requestOptions) {
|
|
318
348
|
return __awaiter(this, void 0, void 0, function* () {
|
|
319
349
|
var _a, _b, _c;
|
|
320
350
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -322,7 +352,7 @@ class Messages {
|
|
|
322
352
|
method: "PATCH",
|
|
323
353
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
324
354
|
? yield core.Supplier.get(this._options.project)
|
|
325
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
355
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.172", "User-Agent": "@letta-ai/letta-client/0.1.172", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
326
356
|
contentType: "application/json",
|
|
327
357
|
requestType: "json",
|
|
328
358
|
body: serializers.groups.MessagesModifyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -331,13 +361,16 @@ class Messages {
|
|
|
331
361
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
332
362
|
});
|
|
333
363
|
if (_response.ok) {
|
|
334
|
-
return
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
364
|
+
return {
|
|
365
|
+
data: serializers.groups.MessagesModifyResponse.parseOrThrow(_response.body, {
|
|
366
|
+
unrecognizedObjectKeys: "passthrough",
|
|
367
|
+
allowUnrecognizedUnionMembers: true,
|
|
368
|
+
allowUnrecognizedEnumValues: true,
|
|
369
|
+
skipValidation: true,
|
|
370
|
+
breadcrumbsPrefix: ["response"],
|
|
371
|
+
}),
|
|
372
|
+
rawResponse: _response.rawResponse,
|
|
373
|
+
};
|
|
341
374
|
}
|
|
342
375
|
if (_response.error.reason === "status-code") {
|
|
343
376
|
switch (_response.error.statusCode) {
|
|
@@ -348,11 +381,12 @@ class Messages {
|
|
|
348
381
|
allowUnrecognizedEnumValues: true,
|
|
349
382
|
skipValidation: true,
|
|
350
383
|
breadcrumbsPrefix: ["response"],
|
|
351
|
-
}));
|
|
384
|
+
}), _response.rawResponse);
|
|
352
385
|
default:
|
|
353
386
|
throw new errors.LettaError({
|
|
354
387
|
statusCode: _response.error.statusCode,
|
|
355
388
|
body: _response.error.body,
|
|
389
|
+
rawResponse: _response.rawResponse,
|
|
356
390
|
});
|
|
357
391
|
}
|
|
358
392
|
}
|
|
@@ -361,12 +395,14 @@ class Messages {
|
|
|
361
395
|
throw new errors.LettaError({
|
|
362
396
|
statusCode: _response.error.statusCode,
|
|
363
397
|
body: _response.error.rawBody,
|
|
398
|
+
rawResponse: _response.rawResponse,
|
|
364
399
|
});
|
|
365
400
|
case "timeout":
|
|
366
401
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/groups/{group_id}/messages/{message_id}.");
|
|
367
402
|
case "unknown":
|
|
368
403
|
throw new errors.LettaError({
|
|
369
404
|
message: _response.error.errorMessage,
|
|
405
|
+
rawResponse: _response.rawResponse,
|
|
370
406
|
});
|
|
371
407
|
}
|
|
372
408
|
});
|
|
@@ -383,6 +419,9 @@ class Messages {
|
|
|
383
419
|
* await client.groups.messages.reset("group_id")
|
|
384
420
|
*/
|
|
385
421
|
reset(groupId, requestOptions) {
|
|
422
|
+
return core.HttpResponsePromise.fromPromise(this.__reset(groupId, requestOptions));
|
|
423
|
+
}
|
|
424
|
+
__reset(groupId, requestOptions) {
|
|
386
425
|
return __awaiter(this, void 0, void 0, function* () {
|
|
387
426
|
var _a, _b, _c;
|
|
388
427
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -390,7 +429,7 @@ class Messages {
|
|
|
390
429
|
method: "PATCH",
|
|
391
430
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
392
431
|
? yield core.Supplier.get(this._options.project)
|
|
393
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
432
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.172", "User-Agent": "@letta-ai/letta-client/0.1.172", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
394
433
|
contentType: "application/json",
|
|
395
434
|
requestType: "json",
|
|
396
435
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -398,7 +437,7 @@ class Messages {
|
|
|
398
437
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
399
438
|
});
|
|
400
439
|
if (_response.ok) {
|
|
401
|
-
return _response.body;
|
|
440
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
402
441
|
}
|
|
403
442
|
if (_response.error.reason === "status-code") {
|
|
404
443
|
switch (_response.error.statusCode) {
|
|
@@ -409,11 +448,12 @@ class Messages {
|
|
|
409
448
|
allowUnrecognizedEnumValues: true,
|
|
410
449
|
skipValidation: true,
|
|
411
450
|
breadcrumbsPrefix: ["response"],
|
|
412
|
-
}));
|
|
451
|
+
}), _response.rawResponse);
|
|
413
452
|
default:
|
|
414
453
|
throw new errors.LettaError({
|
|
415
454
|
statusCode: _response.error.statusCode,
|
|
416
455
|
body: _response.error.body,
|
|
456
|
+
rawResponse: _response.rawResponse,
|
|
417
457
|
});
|
|
418
458
|
}
|
|
419
459
|
}
|
|
@@ -422,12 +462,14 @@ class Messages {
|
|
|
422
462
|
throw new errors.LettaError({
|
|
423
463
|
statusCode: _response.error.statusCode,
|
|
424
464
|
body: _response.error.rawBody,
|
|
465
|
+
rawResponse: _response.rawResponse,
|
|
425
466
|
});
|
|
426
467
|
case "timeout":
|
|
427
468
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/groups/{group_id}/reset-messages.");
|
|
428
469
|
case "unknown":
|
|
429
470
|
throw new errors.LettaError({
|
|
430
471
|
message: _response.error.errorMessage,
|
|
472
|
+
rawResponse: _response.rawResponse,
|
|
431
473
|
});
|
|
432
474
|
}
|
|
433
475
|
});
|
|
@@ -36,7 +36,8 @@ export declare class Health {
|
|
|
36
36
|
* @example
|
|
37
37
|
* await client.health.check()
|
|
38
38
|
*/
|
|
39
|
-
check(requestOptions?: Health.RequestOptions):
|
|
39
|
+
check(requestOptions?: Health.RequestOptions): core.HttpResponsePromise<Letta.Health>;
|
|
40
|
+
private __check;
|
|
40
41
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
41
42
|
Authorization: string;
|
|
42
43
|
}>;
|
|
@@ -65,6 +65,9 @@ class Health {
|
|
|
65
65
|
* await client.health.check()
|
|
66
66
|
*/
|
|
67
67
|
check(requestOptions) {
|
|
68
|
+
return core.HttpResponsePromise.fromPromise(this.__check(requestOptions));
|
|
69
|
+
}
|
|
70
|
+
__check(requestOptions) {
|
|
68
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
69
72
|
var _a, _b, _c;
|
|
70
73
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -72,7 +75,7 @@ class Health {
|
|
|
72
75
|
method: "GET",
|
|
73
76
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
74
77
|
? yield core.Supplier.get(this._options.project)
|
|
75
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
78
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.172", "User-Agent": "@letta-ai/letta-client/0.1.172", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
76
79
|
contentType: "application/json",
|
|
77
80
|
requestType: "json",
|
|
78
81
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -80,18 +83,22 @@ class Health {
|
|
|
80
83
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
81
84
|
});
|
|
82
85
|
if (_response.ok) {
|
|
83
|
-
return
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
return {
|
|
87
|
+
data: serializers.Health.parseOrThrow(_response.body, {
|
|
88
|
+
unrecognizedObjectKeys: "passthrough",
|
|
89
|
+
allowUnrecognizedUnionMembers: true,
|
|
90
|
+
allowUnrecognizedEnumValues: true,
|
|
91
|
+
skipValidation: true,
|
|
92
|
+
breadcrumbsPrefix: ["response"],
|
|
93
|
+
}),
|
|
94
|
+
rawResponse: _response.rawResponse,
|
|
95
|
+
};
|
|
90
96
|
}
|
|
91
97
|
if (_response.error.reason === "status-code") {
|
|
92
98
|
throw new errors.LettaError({
|
|
93
99
|
statusCode: _response.error.statusCode,
|
|
94
100
|
body: _response.error.body,
|
|
101
|
+
rawResponse: _response.rawResponse,
|
|
95
102
|
});
|
|
96
103
|
}
|
|
97
104
|
switch (_response.error.reason) {
|
|
@@ -99,12 +106,14 @@ class Health {
|
|
|
99
106
|
throw new errors.LettaError({
|
|
100
107
|
statusCode: _response.error.statusCode,
|
|
101
108
|
body: _response.error.rawBody,
|
|
109
|
+
rawResponse: _response.rawResponse,
|
|
102
110
|
});
|
|
103
111
|
case "timeout":
|
|
104
112
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/health/.");
|
|
105
113
|
case "unknown":
|
|
106
114
|
throw new errors.LettaError({
|
|
107
115
|
message: _response.error.errorMessage,
|
|
116
|
+
rawResponse: _response.rawResponse,
|
|
108
117
|
});
|
|
109
118
|
}
|
|
110
119
|
});
|
|
@@ -44,7 +44,8 @@ export declare class Identities {
|
|
|
44
44
|
* @example
|
|
45
45
|
* await client.identities.list()
|
|
46
46
|
*/
|
|
47
|
-
list(request?: Letta.IdentitiesListRequest, requestOptions?: Identities.RequestOptions):
|
|
47
|
+
list(request?: Letta.IdentitiesListRequest, requestOptions?: Identities.RequestOptions): core.HttpResponsePromise<Letta.Identity[]>;
|
|
48
|
+
private __list;
|
|
48
49
|
/**
|
|
49
50
|
* @param {Letta.IdentityCreate} request
|
|
50
51
|
* @param {Identities.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -58,7 +59,8 @@ export declare class Identities {
|
|
|
58
59
|
* identityType: "org"
|
|
59
60
|
* })
|
|
60
61
|
*/
|
|
61
|
-
create(request: Letta.IdentityCreate, requestOptions?: Identities.RequestOptions):
|
|
62
|
+
create(request: Letta.IdentityCreate, requestOptions?: Identities.RequestOptions): core.HttpResponsePromise<Letta.Identity>;
|
|
63
|
+
private __create;
|
|
62
64
|
/**
|
|
63
65
|
* @param {Letta.IdentityUpsert} request
|
|
64
66
|
* @param {Identities.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -72,7 +74,8 @@ export declare class Identities {
|
|
|
72
74
|
* identityType: "org"
|
|
73
75
|
* })
|
|
74
76
|
*/
|
|
75
|
-
upsert(request: Letta.IdentityUpsert, requestOptions?: Identities.RequestOptions):
|
|
77
|
+
upsert(request: Letta.IdentityUpsert, requestOptions?: Identities.RequestOptions): core.HttpResponsePromise<Letta.Identity>;
|
|
78
|
+
private __upsert;
|
|
76
79
|
/**
|
|
77
80
|
* Get count of all identities for a user
|
|
78
81
|
*
|
|
@@ -83,7 +86,8 @@ export declare class Identities {
|
|
|
83
86
|
* @example
|
|
84
87
|
* await client.identities.count()
|
|
85
88
|
*/
|
|
86
|
-
count(requestOptions?: Identities.RequestOptions):
|
|
89
|
+
count(requestOptions?: Identities.RequestOptions): core.HttpResponsePromise<number>;
|
|
90
|
+
private __count;
|
|
87
91
|
/**
|
|
88
92
|
* @param {string} identityId
|
|
89
93
|
* @param {Identities.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -93,7 +97,8 @@ export declare class Identities {
|
|
|
93
97
|
* @example
|
|
94
98
|
* await client.identities.retrieve("identity_id")
|
|
95
99
|
*/
|
|
96
|
-
retrieve(identityId: string, requestOptions?: Identities.RequestOptions):
|
|
100
|
+
retrieve(identityId: string, requestOptions?: Identities.RequestOptions): core.HttpResponsePromise<Letta.Identity>;
|
|
101
|
+
private __retrieve;
|
|
97
102
|
/**
|
|
98
103
|
* Delete an identity by its identifier key
|
|
99
104
|
*
|
|
@@ -105,7 +110,8 @@ export declare class Identities {
|
|
|
105
110
|
* @example
|
|
106
111
|
* await client.identities.delete("identity_id")
|
|
107
112
|
*/
|
|
108
|
-
delete(identityId: string, requestOptions?: Identities.RequestOptions):
|
|
113
|
+
delete(identityId: string, requestOptions?: Identities.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
114
|
+
private __delete;
|
|
109
115
|
/**
|
|
110
116
|
* @param {string} identityId
|
|
111
117
|
* @param {Letta.IdentityUpdate} request
|
|
@@ -116,7 +122,8 @@ export declare class Identities {
|
|
|
116
122
|
* @example
|
|
117
123
|
* await client.identities.modify("identity_id")
|
|
118
124
|
*/
|
|
119
|
-
modify(identityId: string, request?: Letta.IdentityUpdate, requestOptions?: Identities.RequestOptions):
|
|
125
|
+
modify(identityId: string, request?: Letta.IdentityUpdate, requestOptions?: Identities.RequestOptions): core.HttpResponsePromise<Letta.Identity>;
|
|
126
|
+
private __modify;
|
|
120
127
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
121
128
|
Authorization: string;
|
|
122
129
|
}>;
|