@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
|
@@ -73,7 +73,10 @@ class Blocks {
|
|
|
73
73
|
* @example
|
|
74
74
|
* await client.blocks.list()
|
|
75
75
|
*/
|
|
76
|
-
list() {
|
|
76
|
+
list(request = {}, requestOptions) {
|
|
77
|
+
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
78
|
+
}
|
|
79
|
+
__list() {
|
|
77
80
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
78
81
|
var _a, _b, _c;
|
|
79
82
|
const { label, templatesOnly, name, identityId, identifierKeys, projectId, limit, before, after, labelSearch, descriptionSearch, valueSearch, connectedToAgentsCountGt, connectedToAgentsCountLt, connectedToAgentsCountEq, } = request;
|
|
@@ -138,7 +141,7 @@ class Blocks {
|
|
|
138
141
|
method: "GET",
|
|
139
142
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
140
143
|
? yield core.Supplier.get(this._options.project)
|
|
141
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
144
|
+
: 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),
|
|
142
145
|
contentType: "application/json",
|
|
143
146
|
queryParameters: _queryParams,
|
|
144
147
|
requestType: "json",
|
|
@@ -147,13 +150,16 @@ class Blocks {
|
|
|
147
150
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
148
151
|
});
|
|
149
152
|
if (_response.ok) {
|
|
150
|
-
return
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
153
|
+
return {
|
|
154
|
+
data: serializers.blocks.list.Response.parseOrThrow(_response.body, {
|
|
155
|
+
unrecognizedObjectKeys: "passthrough",
|
|
156
|
+
allowUnrecognizedUnionMembers: true,
|
|
157
|
+
allowUnrecognizedEnumValues: true,
|
|
158
|
+
skipValidation: true,
|
|
159
|
+
breadcrumbsPrefix: ["response"],
|
|
160
|
+
}),
|
|
161
|
+
rawResponse: _response.rawResponse,
|
|
162
|
+
};
|
|
157
163
|
}
|
|
158
164
|
if (_response.error.reason === "status-code") {
|
|
159
165
|
switch (_response.error.statusCode) {
|
|
@@ -164,11 +170,12 @@ class Blocks {
|
|
|
164
170
|
allowUnrecognizedEnumValues: true,
|
|
165
171
|
skipValidation: true,
|
|
166
172
|
breadcrumbsPrefix: ["response"],
|
|
167
|
-
}));
|
|
173
|
+
}), _response.rawResponse);
|
|
168
174
|
default:
|
|
169
175
|
throw new errors.LettaError({
|
|
170
176
|
statusCode: _response.error.statusCode,
|
|
171
177
|
body: _response.error.body,
|
|
178
|
+
rawResponse: _response.rawResponse,
|
|
172
179
|
});
|
|
173
180
|
}
|
|
174
181
|
}
|
|
@@ -177,12 +184,14 @@ class Blocks {
|
|
|
177
184
|
throw new errors.LettaError({
|
|
178
185
|
statusCode: _response.error.statusCode,
|
|
179
186
|
body: _response.error.rawBody,
|
|
187
|
+
rawResponse: _response.rawResponse,
|
|
180
188
|
});
|
|
181
189
|
case "timeout":
|
|
182
190
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/blocks/.");
|
|
183
191
|
case "unknown":
|
|
184
192
|
throw new errors.LettaError({
|
|
185
193
|
message: _response.error.errorMessage,
|
|
194
|
+
rawResponse: _response.rawResponse,
|
|
186
195
|
});
|
|
187
196
|
}
|
|
188
197
|
});
|
|
@@ -200,6 +209,9 @@ class Blocks {
|
|
|
200
209
|
* })
|
|
201
210
|
*/
|
|
202
211
|
create(request, requestOptions) {
|
|
212
|
+
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
213
|
+
}
|
|
214
|
+
__create(request, requestOptions) {
|
|
203
215
|
return __awaiter(this, void 0, void 0, function* () {
|
|
204
216
|
var _a, _b, _c;
|
|
205
217
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -207,7 +219,7 @@ class Blocks {
|
|
|
207
219
|
method: "POST",
|
|
208
220
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
209
221
|
? yield core.Supplier.get(this._options.project)
|
|
210
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
222
|
+
: 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),
|
|
211
223
|
contentType: "application/json",
|
|
212
224
|
requestType: "json",
|
|
213
225
|
body: serializers.CreateBlock.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -216,13 +228,16 @@ class Blocks {
|
|
|
216
228
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
217
229
|
});
|
|
218
230
|
if (_response.ok) {
|
|
219
|
-
return
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
231
|
+
return {
|
|
232
|
+
data: serializers.Block.parseOrThrow(_response.body, {
|
|
233
|
+
unrecognizedObjectKeys: "passthrough",
|
|
234
|
+
allowUnrecognizedUnionMembers: true,
|
|
235
|
+
allowUnrecognizedEnumValues: true,
|
|
236
|
+
skipValidation: true,
|
|
237
|
+
breadcrumbsPrefix: ["response"],
|
|
238
|
+
}),
|
|
239
|
+
rawResponse: _response.rawResponse,
|
|
240
|
+
};
|
|
226
241
|
}
|
|
227
242
|
if (_response.error.reason === "status-code") {
|
|
228
243
|
switch (_response.error.statusCode) {
|
|
@@ -233,11 +248,12 @@ class Blocks {
|
|
|
233
248
|
allowUnrecognizedEnumValues: true,
|
|
234
249
|
skipValidation: true,
|
|
235
250
|
breadcrumbsPrefix: ["response"],
|
|
236
|
-
}));
|
|
251
|
+
}), _response.rawResponse);
|
|
237
252
|
default:
|
|
238
253
|
throw new errors.LettaError({
|
|
239
254
|
statusCode: _response.error.statusCode,
|
|
240
255
|
body: _response.error.body,
|
|
256
|
+
rawResponse: _response.rawResponse,
|
|
241
257
|
});
|
|
242
258
|
}
|
|
243
259
|
}
|
|
@@ -246,12 +262,14 @@ class Blocks {
|
|
|
246
262
|
throw new errors.LettaError({
|
|
247
263
|
statusCode: _response.error.statusCode,
|
|
248
264
|
body: _response.error.rawBody,
|
|
265
|
+
rawResponse: _response.rawResponse,
|
|
249
266
|
});
|
|
250
267
|
case "timeout":
|
|
251
268
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/blocks/.");
|
|
252
269
|
case "unknown":
|
|
253
270
|
throw new errors.LettaError({
|
|
254
271
|
message: _response.error.errorMessage,
|
|
272
|
+
rawResponse: _response.rawResponse,
|
|
255
273
|
});
|
|
256
274
|
}
|
|
257
275
|
});
|
|
@@ -267,6 +285,9 @@ class Blocks {
|
|
|
267
285
|
* await client.blocks.count()
|
|
268
286
|
*/
|
|
269
287
|
count(requestOptions) {
|
|
288
|
+
return core.HttpResponsePromise.fromPromise(this.__count(requestOptions));
|
|
289
|
+
}
|
|
290
|
+
__count(requestOptions) {
|
|
270
291
|
return __awaiter(this, void 0, void 0, function* () {
|
|
271
292
|
var _a, _b, _c;
|
|
272
293
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -274,7 +295,7 @@ class Blocks {
|
|
|
274
295
|
method: "GET",
|
|
275
296
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
276
297
|
? yield core.Supplier.get(this._options.project)
|
|
277
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
298
|
+
: 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),
|
|
278
299
|
contentType: "application/json",
|
|
279
300
|
requestType: "json",
|
|
280
301
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -282,13 +303,16 @@ class Blocks {
|
|
|
282
303
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
283
304
|
});
|
|
284
305
|
if (_response.ok) {
|
|
285
|
-
return
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
306
|
+
return {
|
|
307
|
+
data: serializers.blocks.count.Response.parseOrThrow(_response.body, {
|
|
308
|
+
unrecognizedObjectKeys: "passthrough",
|
|
309
|
+
allowUnrecognizedUnionMembers: true,
|
|
310
|
+
allowUnrecognizedEnumValues: true,
|
|
311
|
+
skipValidation: true,
|
|
312
|
+
breadcrumbsPrefix: ["response"],
|
|
313
|
+
}),
|
|
314
|
+
rawResponse: _response.rawResponse,
|
|
315
|
+
};
|
|
292
316
|
}
|
|
293
317
|
if (_response.error.reason === "status-code") {
|
|
294
318
|
switch (_response.error.statusCode) {
|
|
@@ -299,11 +323,12 @@ class Blocks {
|
|
|
299
323
|
allowUnrecognizedEnumValues: true,
|
|
300
324
|
skipValidation: true,
|
|
301
325
|
breadcrumbsPrefix: ["response"],
|
|
302
|
-
}));
|
|
326
|
+
}), _response.rawResponse);
|
|
303
327
|
default:
|
|
304
328
|
throw new errors.LettaError({
|
|
305
329
|
statusCode: _response.error.statusCode,
|
|
306
330
|
body: _response.error.body,
|
|
331
|
+
rawResponse: _response.rawResponse,
|
|
307
332
|
});
|
|
308
333
|
}
|
|
309
334
|
}
|
|
@@ -312,12 +337,14 @@ class Blocks {
|
|
|
312
337
|
throw new errors.LettaError({
|
|
313
338
|
statusCode: _response.error.statusCode,
|
|
314
339
|
body: _response.error.rawBody,
|
|
340
|
+
rawResponse: _response.rawResponse,
|
|
315
341
|
});
|
|
316
342
|
case "timeout":
|
|
317
343
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/blocks/count.");
|
|
318
344
|
case "unknown":
|
|
319
345
|
throw new errors.LettaError({
|
|
320
346
|
message: _response.error.errorMessage,
|
|
347
|
+
rawResponse: _response.rawResponse,
|
|
321
348
|
});
|
|
322
349
|
}
|
|
323
350
|
});
|
|
@@ -332,6 +359,9 @@ class Blocks {
|
|
|
332
359
|
* await client.blocks.retrieve("block_id")
|
|
333
360
|
*/
|
|
334
361
|
retrieve(blockId, requestOptions) {
|
|
362
|
+
return core.HttpResponsePromise.fromPromise(this.__retrieve(blockId, requestOptions));
|
|
363
|
+
}
|
|
364
|
+
__retrieve(blockId, requestOptions) {
|
|
335
365
|
return __awaiter(this, void 0, void 0, function* () {
|
|
336
366
|
var _a, _b, _c;
|
|
337
367
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -339,7 +369,7 @@ class Blocks {
|
|
|
339
369
|
method: "GET",
|
|
340
370
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
341
371
|
? yield core.Supplier.get(this._options.project)
|
|
342
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
372
|
+
: 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),
|
|
343
373
|
contentType: "application/json",
|
|
344
374
|
requestType: "json",
|
|
345
375
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -347,13 +377,16 @@ class Blocks {
|
|
|
347
377
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
348
378
|
});
|
|
349
379
|
if (_response.ok) {
|
|
350
|
-
return
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
380
|
+
return {
|
|
381
|
+
data: serializers.Block.parseOrThrow(_response.body, {
|
|
382
|
+
unrecognizedObjectKeys: "passthrough",
|
|
383
|
+
allowUnrecognizedUnionMembers: true,
|
|
384
|
+
allowUnrecognizedEnumValues: true,
|
|
385
|
+
skipValidation: true,
|
|
386
|
+
breadcrumbsPrefix: ["response"],
|
|
387
|
+
}),
|
|
388
|
+
rawResponse: _response.rawResponse,
|
|
389
|
+
};
|
|
357
390
|
}
|
|
358
391
|
if (_response.error.reason === "status-code") {
|
|
359
392
|
switch (_response.error.statusCode) {
|
|
@@ -364,11 +397,12 @@ class Blocks {
|
|
|
364
397
|
allowUnrecognizedEnumValues: true,
|
|
365
398
|
skipValidation: true,
|
|
366
399
|
breadcrumbsPrefix: ["response"],
|
|
367
|
-
}));
|
|
400
|
+
}), _response.rawResponse);
|
|
368
401
|
default:
|
|
369
402
|
throw new errors.LettaError({
|
|
370
403
|
statusCode: _response.error.statusCode,
|
|
371
404
|
body: _response.error.body,
|
|
405
|
+
rawResponse: _response.rawResponse,
|
|
372
406
|
});
|
|
373
407
|
}
|
|
374
408
|
}
|
|
@@ -377,12 +411,14 @@ class Blocks {
|
|
|
377
411
|
throw new errors.LettaError({
|
|
378
412
|
statusCode: _response.error.statusCode,
|
|
379
413
|
body: _response.error.rawBody,
|
|
414
|
+
rawResponse: _response.rawResponse,
|
|
380
415
|
});
|
|
381
416
|
case "timeout":
|
|
382
417
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/blocks/{block_id}.");
|
|
383
418
|
case "unknown":
|
|
384
419
|
throw new errors.LettaError({
|
|
385
420
|
message: _response.error.errorMessage,
|
|
421
|
+
rawResponse: _response.rawResponse,
|
|
386
422
|
});
|
|
387
423
|
}
|
|
388
424
|
});
|
|
@@ -397,6 +433,9 @@ class Blocks {
|
|
|
397
433
|
* await client.blocks.delete("block_id")
|
|
398
434
|
*/
|
|
399
435
|
delete(blockId, requestOptions) {
|
|
436
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(blockId, requestOptions));
|
|
437
|
+
}
|
|
438
|
+
__delete(blockId, requestOptions) {
|
|
400
439
|
return __awaiter(this, void 0, void 0, function* () {
|
|
401
440
|
var _a, _b, _c;
|
|
402
441
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -404,7 +443,7 @@ class Blocks {
|
|
|
404
443
|
method: "DELETE",
|
|
405
444
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
406
445
|
? yield core.Supplier.get(this._options.project)
|
|
407
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
446
|
+
: 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),
|
|
408
447
|
contentType: "application/json",
|
|
409
448
|
requestType: "json",
|
|
410
449
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -412,7 +451,7 @@ class Blocks {
|
|
|
412
451
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
413
452
|
});
|
|
414
453
|
if (_response.ok) {
|
|
415
|
-
return _response.body;
|
|
454
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
416
455
|
}
|
|
417
456
|
if (_response.error.reason === "status-code") {
|
|
418
457
|
switch (_response.error.statusCode) {
|
|
@@ -423,11 +462,12 @@ class Blocks {
|
|
|
423
462
|
allowUnrecognizedEnumValues: true,
|
|
424
463
|
skipValidation: true,
|
|
425
464
|
breadcrumbsPrefix: ["response"],
|
|
426
|
-
}));
|
|
465
|
+
}), _response.rawResponse);
|
|
427
466
|
default:
|
|
428
467
|
throw new errors.LettaError({
|
|
429
468
|
statusCode: _response.error.statusCode,
|
|
430
469
|
body: _response.error.body,
|
|
470
|
+
rawResponse: _response.rawResponse,
|
|
431
471
|
});
|
|
432
472
|
}
|
|
433
473
|
}
|
|
@@ -436,12 +476,14 @@ class Blocks {
|
|
|
436
476
|
throw new errors.LettaError({
|
|
437
477
|
statusCode: _response.error.statusCode,
|
|
438
478
|
body: _response.error.rawBody,
|
|
479
|
+
rawResponse: _response.rawResponse,
|
|
439
480
|
});
|
|
440
481
|
case "timeout":
|
|
441
482
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/blocks/{block_id}.");
|
|
442
483
|
case "unknown":
|
|
443
484
|
throw new errors.LettaError({
|
|
444
485
|
message: _response.error.errorMessage,
|
|
486
|
+
rawResponse: _response.rawResponse,
|
|
445
487
|
});
|
|
446
488
|
}
|
|
447
489
|
});
|
|
@@ -457,6 +499,9 @@ class Blocks {
|
|
|
457
499
|
* await client.blocks.modify("block_id", {})
|
|
458
500
|
*/
|
|
459
501
|
modify(blockId, request, requestOptions) {
|
|
502
|
+
return core.HttpResponsePromise.fromPromise(this.__modify(blockId, request, requestOptions));
|
|
503
|
+
}
|
|
504
|
+
__modify(blockId, request, requestOptions) {
|
|
460
505
|
return __awaiter(this, void 0, void 0, function* () {
|
|
461
506
|
var _a, _b, _c;
|
|
462
507
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -464,7 +509,7 @@ class Blocks {
|
|
|
464
509
|
method: "PATCH",
|
|
465
510
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
466
511
|
? yield core.Supplier.get(this._options.project)
|
|
467
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
512
|
+
: 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),
|
|
468
513
|
contentType: "application/json",
|
|
469
514
|
requestType: "json",
|
|
470
515
|
body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -473,13 +518,16 @@ class Blocks {
|
|
|
473
518
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
474
519
|
});
|
|
475
520
|
if (_response.ok) {
|
|
476
|
-
return
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
521
|
+
return {
|
|
522
|
+
data: serializers.Block.parseOrThrow(_response.body, {
|
|
523
|
+
unrecognizedObjectKeys: "passthrough",
|
|
524
|
+
allowUnrecognizedUnionMembers: true,
|
|
525
|
+
allowUnrecognizedEnumValues: true,
|
|
526
|
+
skipValidation: true,
|
|
527
|
+
breadcrumbsPrefix: ["response"],
|
|
528
|
+
}),
|
|
529
|
+
rawResponse: _response.rawResponse,
|
|
530
|
+
};
|
|
483
531
|
}
|
|
484
532
|
if (_response.error.reason === "status-code") {
|
|
485
533
|
switch (_response.error.statusCode) {
|
|
@@ -490,11 +538,12 @@ class Blocks {
|
|
|
490
538
|
allowUnrecognizedEnumValues: true,
|
|
491
539
|
skipValidation: true,
|
|
492
540
|
breadcrumbsPrefix: ["response"],
|
|
493
|
-
}));
|
|
541
|
+
}), _response.rawResponse);
|
|
494
542
|
default:
|
|
495
543
|
throw new errors.LettaError({
|
|
496
544
|
statusCode: _response.error.statusCode,
|
|
497
545
|
body: _response.error.body,
|
|
546
|
+
rawResponse: _response.rawResponse,
|
|
498
547
|
});
|
|
499
548
|
}
|
|
500
549
|
}
|
|
@@ -503,12 +552,14 @@ class Blocks {
|
|
|
503
552
|
throw new errors.LettaError({
|
|
504
553
|
statusCode: _response.error.statusCode,
|
|
505
554
|
body: _response.error.rawBody,
|
|
555
|
+
rawResponse: _response.rawResponse,
|
|
506
556
|
});
|
|
507
557
|
case "timeout":
|
|
508
558
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/blocks/{block_id}.");
|
|
509
559
|
case "unknown":
|
|
510
560
|
throw new errors.LettaError({
|
|
511
561
|
message: _response.error.errorMessage,
|
|
562
|
+
rawResponse: _response.rawResponse,
|
|
512
563
|
});
|
|
513
564
|
}
|
|
514
565
|
});
|
|
@@ -43,7 +43,8 @@ export declare class Agents {
|
|
|
43
43
|
* @example
|
|
44
44
|
* await client.blocks.agents.list("block_id")
|
|
45
45
|
*/
|
|
46
|
-
list(blockId: string, request?: Letta.blocks.AgentsListRequest, requestOptions?: Agents.RequestOptions):
|
|
46
|
+
list(blockId: string, request?: Letta.blocks.AgentsListRequest, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<Letta.AgentState[]>;
|
|
47
|
+
private __list;
|
|
47
48
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
48
49
|
Authorization: string;
|
|
49
50
|
}>;
|
|
@@ -72,7 +72,10 @@ class Agents {
|
|
|
72
72
|
* @example
|
|
73
73
|
* await client.blocks.agents.list("block_id")
|
|
74
74
|
*/
|
|
75
|
-
list(
|
|
75
|
+
list(blockId, request = {}, requestOptions) {
|
|
76
|
+
return core.HttpResponsePromise.fromPromise(this.__list(blockId, request, requestOptions));
|
|
77
|
+
}
|
|
78
|
+
__list(blockId_1) {
|
|
76
79
|
return __awaiter(this, arguments, void 0, function* (blockId, request = {}, requestOptions) {
|
|
77
80
|
var _a, _b, _c;
|
|
78
81
|
const { includeRelationships } = request;
|
|
@@ -90,7 +93,7 @@ class Agents {
|
|
|
90
93
|
method: "GET",
|
|
91
94
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
92
95
|
? yield core.Supplier.get(this._options.project)
|
|
93
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
96
|
+
: 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),
|
|
94
97
|
contentType: "application/json",
|
|
95
98
|
queryParameters: _queryParams,
|
|
96
99
|
requestType: "json",
|
|
@@ -99,13 +102,16 @@ class Agents {
|
|
|
99
102
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
100
103
|
});
|
|
101
104
|
if (_response.ok) {
|
|
102
|
-
return
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
return {
|
|
106
|
+
data: serializers.blocks.agents.list.Response.parseOrThrow(_response.body, {
|
|
107
|
+
unrecognizedObjectKeys: "passthrough",
|
|
108
|
+
allowUnrecognizedUnionMembers: true,
|
|
109
|
+
allowUnrecognizedEnumValues: true,
|
|
110
|
+
skipValidation: true,
|
|
111
|
+
breadcrumbsPrefix: ["response"],
|
|
112
|
+
}),
|
|
113
|
+
rawResponse: _response.rawResponse,
|
|
114
|
+
};
|
|
109
115
|
}
|
|
110
116
|
if (_response.error.reason === "status-code") {
|
|
111
117
|
switch (_response.error.statusCode) {
|
|
@@ -116,11 +122,12 @@ class Agents {
|
|
|
116
122
|
allowUnrecognizedEnumValues: true,
|
|
117
123
|
skipValidation: true,
|
|
118
124
|
breadcrumbsPrefix: ["response"],
|
|
119
|
-
}));
|
|
125
|
+
}), _response.rawResponse);
|
|
120
126
|
default:
|
|
121
127
|
throw new errors.LettaError({
|
|
122
128
|
statusCode: _response.error.statusCode,
|
|
123
129
|
body: _response.error.body,
|
|
130
|
+
rawResponse: _response.rawResponse,
|
|
124
131
|
});
|
|
125
132
|
}
|
|
126
133
|
}
|
|
@@ -129,12 +136,14 @@ class Agents {
|
|
|
129
136
|
throw new errors.LettaError({
|
|
130
137
|
statusCode: _response.error.statusCode,
|
|
131
138
|
body: _response.error.rawBody,
|
|
139
|
+
rawResponse: _response.rawResponse,
|
|
132
140
|
});
|
|
133
141
|
case "timeout":
|
|
134
142
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/blocks/{block_id}/agents.");
|
|
135
143
|
case "unknown":
|
|
136
144
|
throw new errors.LettaError({
|
|
137
145
|
message: _response.error.errorMessage,
|
|
146
|
+
rawResponse: _response.rawResponse,
|
|
138
147
|
});
|
|
139
148
|
}
|
|
140
149
|
});
|
|
@@ -41,7 +41,8 @@ export declare class ClientSideAccessTokens {
|
|
|
41
41
|
* @example
|
|
42
42
|
* await client.clientSideAccessTokens.clientSideAccessTokensListClientSideAccessTokens()
|
|
43
43
|
*/
|
|
44
|
-
clientSideAccessTokensListClientSideAccessTokens(request?: Letta.ClientSideAccessTokensListClientSideAccessTokensRequest, requestOptions?: ClientSideAccessTokens.RequestOptions):
|
|
44
|
+
clientSideAccessTokensListClientSideAccessTokens(request?: Letta.ClientSideAccessTokensListClientSideAccessTokensRequest, requestOptions?: ClientSideAccessTokens.RequestOptions): core.HttpResponsePromise<Letta.ClientSideAccessTokensListClientSideAccessTokensResponse>;
|
|
45
|
+
private __clientSideAccessTokensListClientSideAccessTokens;
|
|
45
46
|
/**
|
|
46
47
|
* Create a new client side access token with the specified configuration.
|
|
47
48
|
*
|
|
@@ -60,7 +61,8 @@ export declare class ClientSideAccessTokens {
|
|
|
60
61
|
* hostname: "hostname"
|
|
61
62
|
* })
|
|
62
63
|
*/
|
|
63
|
-
create(request: Letta.ClientSideAccessTokensCreateRequest, requestOptions?: ClientSideAccessTokens.RequestOptions):
|
|
64
|
+
create(request: Letta.ClientSideAccessTokensCreateRequest, requestOptions?: ClientSideAccessTokens.RequestOptions): core.HttpResponsePromise<Letta.ClientSideAccessTokensCreateResponse>;
|
|
65
|
+
private __create;
|
|
64
66
|
/**
|
|
65
67
|
* Delete a client side access token.
|
|
66
68
|
*
|
|
@@ -75,7 +77,8 @@ export declare class ClientSideAccessTokens {
|
|
|
75
77
|
* "key": "value"
|
|
76
78
|
* })
|
|
77
79
|
*/
|
|
78
|
-
delete(token: string, request?: unknown, requestOptions?: ClientSideAccessTokens.RequestOptions):
|
|
80
|
+
delete(token: string, request?: unknown, requestOptions?: ClientSideAccessTokens.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
81
|
+
private __delete;
|
|
79
82
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
80
83
|
Authorization: string;
|
|
81
84
|
}>;
|