agentmail 0.4.13 → 0.4.15
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 +46 -14
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +12 -0
- package/dist/cjs/Client.js +74 -0
- package/dist/cjs/api/errors/UnprocessableError.d.ts +6 -0
- package/dist/cjs/api/errors/UnprocessableError.js +54 -0
- package/dist/cjs/api/errors/index.d.ts +1 -0
- package/dist/cjs/api/errors/index.js +1 -0
- package/dist/cjs/api/resources/agent/exports.d.ts +2 -0
- package/dist/cjs/api/resources/agent/exports.js +21 -0
- package/dist/cjs/api/resources/apiKeys/exports.d.ts +2 -0
- package/dist/cjs/api/resources/apiKeys/exports.js +21 -0
- package/dist/cjs/api/resources/attachments/exports.d.ts +1 -0
- package/dist/cjs/api/resources/attachments/exports.js +18 -0
- package/dist/cjs/api/resources/domains/exports.d.ts +2 -0
- package/dist/cjs/api/resources/domains/exports.js +21 -0
- package/dist/cjs/api/resources/drafts/exports.d.ts +2 -0
- package/dist/cjs/api/resources/drafts/exports.js +21 -0
- package/dist/cjs/api/resources/events/exports.d.ts +1 -0
- package/dist/cjs/api/resources/events/exports.js +18 -0
- package/dist/cjs/api/resources/inboxes/exports.d.ts +3 -0
- package/dist/cjs/api/resources/inboxes/exports.js +22 -0
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/exports.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/exports.js +21 -0
- package/dist/cjs/api/resources/inboxes/resources/drafts/exports.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/resources/drafts/exports.js +21 -0
- package/dist/cjs/api/resources/inboxes/resources/lists/exports.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/resources/lists/exports.js +21 -0
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +1 -1
- package/dist/cjs/api/resources/inboxes/resources/messages/exports.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/resources/messages/exports.js +21 -0
- package/dist/cjs/api/resources/inboxes/resources/metrics/exports.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/resources/metrics/exports.js +21 -0
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +17 -0
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +90 -0
- package/dist/cjs/api/resources/inboxes/resources/threads/exports.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/resources/threads/exports.js +21 -0
- package/dist/cjs/api/resources/lists/exports.d.ts +2 -0
- package/dist/cjs/api/resources/lists/exports.js +21 -0
- package/dist/cjs/api/resources/messages/exports.d.ts +1 -0
- package/dist/cjs/api/resources/messages/exports.js +18 -0
- package/dist/cjs/api/resources/messages/types/UpdateMessageResponse.d.ts +5 -0
- package/dist/cjs/api/resources/messages/types/UpdateMessageResponse.js +3 -0
- package/dist/cjs/api/resources/messages/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/messages/types/index.js +1 -0
- package/dist/cjs/api/resources/metrics/exports.d.ts +2 -0
- package/dist/cjs/api/resources/metrics/exports.js +21 -0
- package/dist/cjs/api/resources/metrics/types/QueryMetricsResponse.d.ts +1 -1
- package/dist/cjs/api/resources/organizations/exports.d.ts +2 -0
- package/dist/cjs/api/resources/organizations/exports.js +21 -0
- package/dist/cjs/api/resources/pods/exports.d.ts +3 -0
- package/dist/cjs/api/resources/pods/exports.js +22 -0
- package/dist/cjs/api/resources/pods/resources/apiKeys/exports.d.ts +2 -0
- package/dist/cjs/api/resources/pods/resources/apiKeys/exports.js +21 -0
- package/dist/cjs/api/resources/pods/resources/domains/exports.d.ts +2 -0
- package/dist/cjs/api/resources/pods/resources/domains/exports.js +21 -0
- package/dist/cjs/api/resources/pods/resources/drafts/exports.d.ts +2 -0
- package/dist/cjs/api/resources/pods/resources/drafts/exports.js +21 -0
- package/dist/cjs/api/resources/pods/resources/inboxes/exports.d.ts +2 -0
- package/dist/cjs/api/resources/pods/resources/inboxes/exports.js +21 -0
- package/dist/cjs/api/resources/pods/resources/lists/exports.d.ts +2 -0
- package/dist/cjs/api/resources/pods/resources/lists/exports.js +21 -0
- package/dist/cjs/api/resources/pods/resources/metrics/exports.d.ts +2 -0
- package/dist/cjs/api/resources/pods/resources/metrics/exports.js +21 -0
- package/dist/cjs/api/resources/pods/resources/threads/client/Client.d.ts +17 -0
- package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +90 -0
- package/dist/cjs/api/resources/pods/resources/threads/exports.d.ts +2 -0
- package/dist/cjs/api/resources/pods/resources/threads/exports.js +21 -0
- package/dist/cjs/api/resources/threads/client/Client.d.ts +16 -0
- package/dist/cjs/api/resources/threads/client/Client.js +89 -0
- package/dist/cjs/api/resources/threads/exports.d.ts +2 -0
- package/dist/cjs/api/resources/threads/exports.js +21 -0
- package/dist/cjs/api/resources/threads/types/UpdateThreadRequest.d.ts +6 -0
- package/dist/cjs/api/resources/threads/types/UpdateThreadRequest.js +3 -0
- package/dist/cjs/api/resources/threads/types/UpdateThreadResponse.d.ts +5 -0
- package/dist/cjs/api/resources/threads/types/UpdateThreadResponse.js +3 -0
- package/dist/cjs/api/resources/threads/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/threads/types/index.js +2 -0
- package/dist/cjs/api/resources/webhooks/exports.d.ts +3 -0
- package/dist/cjs/api/resources/webhooks/exports.js +22 -0
- package/dist/cjs/api/resources/webhooks/resources/events/exports.d.ts +1 -0
- package/dist/cjs/api/resources/webhooks/resources/events/exports.js +18 -0
- package/dist/cjs/api/resources/websockets/client/Client.d.ts +6 -0
- package/dist/cjs/api/resources/websockets/client/Client.js +8 -3
- package/dist/cjs/api/resources/websockets/client/Socket.d.ts +2 -2
- package/dist/cjs/api/resources/websockets/client/Socket.js +2 -2
- package/dist/cjs/api/resources/websockets/exports.d.ts +3 -0
- package/dist/cjs/api/resources/websockets/exports.js +23 -0
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +1 -1
- package/dist/cjs/core/fetcher/Fetcher.js +8 -2
- package/dist/cjs/core/fetcher/index.d.ts +2 -0
- package/dist/cjs/core/fetcher/index.js +3 -1
- package/dist/cjs/core/fetcher/makePassthroughRequest.d.ts +49 -0
- package/dist/cjs/core/fetcher/makePassthroughRequest.js +135 -0
- package/dist/cjs/core/fetcher/makeRequest.d.ts +6 -1
- package/dist/cjs/core/fetcher/makeRequest.js +30 -9
- package/dist/cjs/core/runtime/runtime.js +8 -7
- package/dist/cjs/core/schemas/builders/list/list.js +12 -17
- package/dist/cjs/core/schemas/builders/object/object.js +102 -40
- package/dist/cjs/core/schemas/builders/object-like/getObjectLikeUtils.js +10 -3
- package/dist/cjs/core/schemas/builders/record/index.d.ts +2 -2
- package/dist/cjs/core/schemas/builders/record/index.js +2 -1
- package/dist/cjs/core/schemas/builders/record/record.d.ts +2 -1
- package/dist/cjs/core/schemas/builders/record/record.js +63 -25
- package/dist/cjs/core/schemas/builders/record/types.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/union/union.js +9 -12
- package/dist/cjs/core/schemas/utils/isPlainObject.js +4 -6
- package/dist/cjs/core/websocket/ws.d.ts +14 -2
- package/dist/cjs/core/websocket/ws.js +51 -7
- package/dist/cjs/serialization/resources/messages/types/UpdateMessageResponse.d.ts +12 -0
- package/dist/cjs/serialization/resources/messages/types/UpdateMessageResponse.js +44 -0
- package/dist/cjs/serialization/resources/messages/types/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/messages/types/index.js +1 -0
- package/dist/cjs/serialization/resources/metrics/types/QueryMetricsResponse.js +1 -1
- package/dist/cjs/serialization/resources/threads/types/UpdateThreadRequest.d.ts +10 -0
- package/dist/cjs/serialization/resources/threads/types/UpdateThreadRequest.js +42 -0
- package/dist/cjs/serialization/resources/threads/types/UpdateThreadResponse.d.ts +12 -0
- package/dist/cjs/serialization/resources/threads/types/UpdateThreadResponse.js +44 -0
- package/dist/cjs/serialization/resources/threads/types/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/threads/types/index.js +2 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +12 -0
- package/dist/esm/Client.mjs +41 -0
- package/dist/esm/api/errors/UnprocessableError.d.mts +6 -0
- package/dist/esm/api/errors/UnprocessableError.mjs +17 -0
- package/dist/esm/api/errors/index.d.mts +1 -0
- package/dist/esm/api/errors/index.mjs +1 -0
- package/dist/esm/api/resources/agent/exports.d.mts +2 -0
- package/dist/esm/api/resources/agent/exports.mjs +3 -0
- package/dist/esm/api/resources/apiKeys/exports.d.mts +2 -0
- package/dist/esm/api/resources/apiKeys/exports.mjs +3 -0
- package/dist/esm/api/resources/attachments/exports.d.mts +1 -0
- package/dist/esm/api/resources/attachments/exports.mjs +2 -0
- package/dist/esm/api/resources/domains/exports.d.mts +2 -0
- package/dist/esm/api/resources/domains/exports.mjs +3 -0
- package/dist/esm/api/resources/drafts/exports.d.mts +2 -0
- package/dist/esm/api/resources/drafts/exports.mjs +3 -0
- package/dist/esm/api/resources/events/exports.d.mts +1 -0
- package/dist/esm/api/resources/events/exports.mjs +2 -0
- package/dist/esm/api/resources/inboxes/exports.d.mts +3 -0
- package/dist/esm/api/resources/inboxes/exports.mjs +4 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/exports.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/exports.mjs +3 -0
- package/dist/esm/api/resources/inboxes/resources/drafts/exports.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/resources/drafts/exports.mjs +3 -0
- package/dist/esm/api/resources/inboxes/resources/lists/exports.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/resources/lists/exports.mjs +3 -0
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +1 -1
- package/dist/esm/api/resources/inboxes/resources/messages/exports.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/resources/messages/exports.mjs +3 -0
- package/dist/esm/api/resources/inboxes/resources/metrics/exports.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/resources/metrics/exports.mjs +3 -0
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +17 -0
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +90 -0
- package/dist/esm/api/resources/inboxes/resources/threads/exports.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/resources/threads/exports.mjs +3 -0
- package/dist/esm/api/resources/lists/exports.d.mts +2 -0
- package/dist/esm/api/resources/lists/exports.mjs +3 -0
- package/dist/esm/api/resources/messages/exports.d.mts +1 -0
- package/dist/esm/api/resources/messages/exports.mjs +2 -0
- package/dist/esm/api/resources/messages/types/UpdateMessageResponse.d.mts +5 -0
- package/dist/esm/api/resources/messages/types/UpdateMessageResponse.mjs +2 -0
- package/dist/esm/api/resources/messages/types/index.d.mts +1 -0
- package/dist/esm/api/resources/messages/types/index.mjs +1 -0
- package/dist/esm/api/resources/metrics/exports.d.mts +2 -0
- package/dist/esm/api/resources/metrics/exports.mjs +3 -0
- package/dist/esm/api/resources/metrics/types/QueryMetricsResponse.d.mts +1 -1
- package/dist/esm/api/resources/organizations/exports.d.mts +2 -0
- package/dist/esm/api/resources/organizations/exports.mjs +3 -0
- package/dist/esm/api/resources/pods/exports.d.mts +3 -0
- package/dist/esm/api/resources/pods/exports.mjs +4 -0
- package/dist/esm/api/resources/pods/resources/apiKeys/exports.d.mts +2 -0
- package/dist/esm/api/resources/pods/resources/apiKeys/exports.mjs +3 -0
- package/dist/esm/api/resources/pods/resources/domains/exports.d.mts +2 -0
- package/dist/esm/api/resources/pods/resources/domains/exports.mjs +3 -0
- package/dist/esm/api/resources/pods/resources/drafts/exports.d.mts +2 -0
- package/dist/esm/api/resources/pods/resources/drafts/exports.mjs +3 -0
- package/dist/esm/api/resources/pods/resources/inboxes/exports.d.mts +2 -0
- package/dist/esm/api/resources/pods/resources/inboxes/exports.mjs +3 -0
- package/dist/esm/api/resources/pods/resources/lists/exports.d.mts +2 -0
- package/dist/esm/api/resources/pods/resources/lists/exports.mjs +3 -0
- package/dist/esm/api/resources/pods/resources/metrics/exports.d.mts +2 -0
- package/dist/esm/api/resources/pods/resources/metrics/exports.mjs +3 -0
- package/dist/esm/api/resources/pods/resources/threads/client/Client.d.mts +17 -0
- package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +90 -0
- package/dist/esm/api/resources/pods/resources/threads/exports.d.mts +2 -0
- package/dist/esm/api/resources/pods/resources/threads/exports.mjs +3 -0
- package/dist/esm/api/resources/threads/client/Client.d.mts +16 -0
- package/dist/esm/api/resources/threads/client/Client.mjs +89 -0
- package/dist/esm/api/resources/threads/exports.d.mts +2 -0
- package/dist/esm/api/resources/threads/exports.mjs +3 -0
- package/dist/esm/api/resources/threads/types/UpdateThreadRequest.d.mts +6 -0
- package/dist/esm/api/resources/threads/types/UpdateThreadRequest.mjs +2 -0
- package/dist/esm/api/resources/threads/types/UpdateThreadResponse.d.mts +5 -0
- package/dist/esm/api/resources/threads/types/UpdateThreadResponse.mjs +2 -0
- package/dist/esm/api/resources/threads/types/index.d.mts +2 -0
- package/dist/esm/api/resources/threads/types/index.mjs +2 -0
- package/dist/esm/api/resources/webhooks/exports.d.mts +3 -0
- package/dist/esm/api/resources/webhooks/exports.mjs +4 -0
- package/dist/esm/api/resources/webhooks/resources/events/exports.d.mts +1 -0
- package/dist/esm/api/resources/webhooks/resources/events/exports.mjs +2 -0
- package/dist/esm/api/resources/websockets/client/Client.d.mts +6 -0
- package/dist/esm/api/resources/websockets/client/Client.mjs +8 -3
- package/dist/esm/api/resources/websockets/client/Socket.d.mts +2 -2
- package/dist/esm/api/resources/websockets/client/Socket.mjs +2 -2
- package/dist/esm/api/resources/websockets/exports.d.mts +3 -0
- package/dist/esm/api/resources/websockets/exports.mjs +4 -0
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +1 -1
- package/dist/esm/core/fetcher/Fetcher.mjs +8 -2
- package/dist/esm/core/fetcher/index.d.mts +2 -0
- package/dist/esm/core/fetcher/index.mjs +1 -0
- package/dist/esm/core/fetcher/makePassthroughRequest.d.mts +49 -0
- package/dist/esm/core/fetcher/makePassthroughRequest.mjs +132 -0
- package/dist/esm/core/fetcher/makeRequest.d.mts +6 -1
- package/dist/esm/core/fetcher/makeRequest.mjs +28 -9
- package/dist/esm/core/runtime/runtime.mjs +8 -7
- package/dist/esm/core/schemas/builders/list/list.mjs +12 -17
- package/dist/esm/core/schemas/builders/object/object.mjs +102 -40
- package/dist/esm/core/schemas/builders/object-like/getObjectLikeUtils.mjs +10 -3
- package/dist/esm/core/schemas/builders/record/index.d.mts +2 -2
- package/dist/esm/core/schemas/builders/record/index.mjs +1 -1
- package/dist/esm/core/schemas/builders/record/record.d.mts +2 -1
- package/dist/esm/core/schemas/builders/record/record.mjs +62 -25
- package/dist/esm/core/schemas/builders/record/types.d.mts +2 -0
- package/dist/esm/core/schemas/builders/union/union.mjs +9 -12
- package/dist/esm/core/schemas/utils/isPlainObject.mjs +4 -6
- package/dist/esm/core/websocket/ws.d.mts +14 -2
- package/dist/esm/core/websocket/ws.mjs +51 -7
- package/dist/esm/serialization/resources/messages/types/UpdateMessageResponse.d.mts +12 -0
- package/dist/esm/serialization/resources/messages/types/UpdateMessageResponse.mjs +8 -0
- package/dist/esm/serialization/resources/messages/types/index.d.mts +1 -0
- package/dist/esm/serialization/resources/messages/types/index.mjs +1 -0
- package/dist/esm/serialization/resources/metrics/types/QueryMetricsResponse.mjs +1 -1
- package/dist/esm/serialization/resources/threads/types/UpdateThreadRequest.d.mts +10 -0
- package/dist/esm/serialization/resources/threads/types/UpdateThreadRequest.mjs +6 -0
- package/dist/esm/serialization/resources/threads/types/UpdateThreadResponse.d.mts +12 -0
- package/dist/esm/serialization/resources/threads/types/UpdateThreadResponse.mjs +8 -0
- package/dist/esm/serialization/resources/threads/types/index.d.mts +2 -0
- package/dist/esm/serialization/resources/threads/types/index.mjs +2 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +305 -13
- package/reference.md +231 -1
|
@@ -2,6 +2,8 @@ import { filterObject } from "../../utils/filterObject.mjs";
|
|
|
2
2
|
import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType.mjs";
|
|
3
3
|
import { isPlainObject } from "../../utils/isPlainObject.mjs";
|
|
4
4
|
import { getSchemaUtils } from "../schema-utils/index.mjs";
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
6
|
+
const _hasOwn = Object.prototype.hasOwnProperty;
|
|
5
7
|
export function getObjectLikeUtils(schema) {
|
|
6
8
|
return {
|
|
7
9
|
withParsedProperties: (properties) => withParsedProperties(schema, properties),
|
|
@@ -17,9 +19,14 @@ export function withParsedProperties(objectLike, properties) {
|
|
|
17
19
|
if (!parsedObject.ok) {
|
|
18
20
|
return parsedObject;
|
|
19
21
|
}
|
|
20
|
-
const additionalProperties =
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
const additionalProperties = {};
|
|
23
|
+
for (const key in properties) {
|
|
24
|
+
if (_hasOwn.call(properties, key)) {
|
|
25
|
+
const value = properties[key];
|
|
26
|
+
additionalProperties[key] =
|
|
27
|
+
typeof value === "function" ? value(parsedObject.value) : value;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
23
30
|
return {
|
|
24
31
|
ok: true,
|
|
25
32
|
value: Object.assign(Object.assign({}, parsedObject.value), additionalProperties),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { record } from "./record.mjs";
|
|
2
|
-
export type { BaseRecordSchema, RecordSchema } from "./types.mjs";
|
|
1
|
+
export { partialRecord, record } from "./record.mjs";
|
|
2
|
+
export type { BasePartialRecordSchema, BaseRecordSchema, PartialRecordSchema, RecordSchema } from "./types.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { record } from "./record.mjs";
|
|
1
|
+
export { partialRecord, record } from "./record.mjs";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { type Schema } from "../../Schema.mjs";
|
|
2
|
-
import type { RecordSchema } from "./types.mjs";
|
|
2
|
+
import type { PartialRecordSchema, RecordSchema } from "./types.mjs";
|
|
3
3
|
export declare function record<RawKey extends string | number, RawValue, ParsedValue, ParsedKey extends string | number>(keySchema: Schema<RawKey, ParsedKey>, valueSchema: Schema<RawValue, ParsedValue>): RecordSchema<RawKey, RawValue, ParsedKey, ParsedValue>;
|
|
4
|
+
export declare function partialRecord<RawKey extends string | number, RawValue, ParsedValue, ParsedKey extends string | number>(keySchema: Schema<RawKey, ParsedKey>, valueSchema: Schema<RawValue, ParsedValue>): PartialRecordSchema<RawKey, RawValue, ParsedKey, ParsedValue>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { SchemaType } from "../../Schema.mjs";
|
|
2
|
-
import { entries } from "../../utils/entries.mjs";
|
|
3
2
|
import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType.mjs";
|
|
4
3
|
import { isPlainObject } from "../../utils/isPlainObject.mjs";
|
|
5
4
|
import { maybeSkipValidation } from "../../utils/maybeSkipValidation.mjs";
|
|
6
5
|
import { getSchemaUtils } from "../schema-utils/index.mjs";
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
7
|
+
const _hasOwn = Object.prototype.hasOwnProperty;
|
|
7
8
|
export function record(keySchema, valueSchema) {
|
|
8
9
|
const baseSchema = {
|
|
9
10
|
parse: (raw, opts) => {
|
|
@@ -40,6 +41,42 @@ export function record(keySchema, valueSchema) {
|
|
|
40
41
|
};
|
|
41
42
|
return Object.assign(Object.assign({}, maybeSkipValidation(baseSchema)), getSchemaUtils(baseSchema));
|
|
42
43
|
}
|
|
44
|
+
export function partialRecord(keySchema, valueSchema) {
|
|
45
|
+
const baseSchema = {
|
|
46
|
+
parse: (raw, opts) => {
|
|
47
|
+
return validateAndTransformRecord({
|
|
48
|
+
value: raw,
|
|
49
|
+
isKeyNumeric: keySchema.getType() === SchemaType.NUMBER,
|
|
50
|
+
transformKey: (key) => {
|
|
51
|
+
var _a;
|
|
52
|
+
return keySchema.parse(key, Object.assign(Object.assign({}, opts), { breadcrumbsPrefix: [...((_a = opts === null || opts === void 0 ? void 0 : opts.breadcrumbsPrefix) !== null && _a !== void 0 ? _a : []), `${key} (key)`] }));
|
|
53
|
+
},
|
|
54
|
+
transformValue: (value, key) => {
|
|
55
|
+
var _a;
|
|
56
|
+
return valueSchema.parse(value, Object.assign(Object.assign({}, opts), { breadcrumbsPrefix: [...((_a = opts === null || opts === void 0 ? void 0 : opts.breadcrumbsPrefix) !== null && _a !== void 0 ? _a : []), `${key}`] }));
|
|
57
|
+
},
|
|
58
|
+
breadcrumbsPrefix: opts === null || opts === void 0 ? void 0 : opts.breadcrumbsPrefix,
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
json: (parsed, opts) => {
|
|
62
|
+
return validateAndTransformRecord({
|
|
63
|
+
value: parsed,
|
|
64
|
+
isKeyNumeric: keySchema.getType() === SchemaType.NUMBER,
|
|
65
|
+
transformKey: (key) => {
|
|
66
|
+
var _a;
|
|
67
|
+
return keySchema.json(key, Object.assign(Object.assign({}, opts), { breadcrumbsPrefix: [...((_a = opts === null || opts === void 0 ? void 0 : opts.breadcrumbsPrefix) !== null && _a !== void 0 ? _a : []), `${key} (key)`] }));
|
|
68
|
+
},
|
|
69
|
+
transformValue: (value, key) => {
|
|
70
|
+
var _a;
|
|
71
|
+
return valueSchema.json(value, Object.assign(Object.assign({}, opts), { breadcrumbsPrefix: [...((_a = opts === null || opts === void 0 ? void 0 : opts.breadcrumbsPrefix) !== null && _a !== void 0 ? _a : []), `${key}`] }));
|
|
72
|
+
},
|
|
73
|
+
breadcrumbsPrefix: opts === null || opts === void 0 ? void 0 : opts.breadcrumbsPrefix,
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
getType: () => SchemaType.RECORD,
|
|
77
|
+
};
|
|
78
|
+
return Object.assign(Object.assign({}, maybeSkipValidation(baseSchema)), getSchemaUtils(baseSchema));
|
|
79
|
+
}
|
|
43
80
|
function validateAndTransformRecord({ value, isKeyNumeric, transformKey, transformValue, breadcrumbsPrefix = [], }) {
|
|
44
81
|
if (!isPlainObject(value)) {
|
|
45
82
|
return {
|
|
@@ -52,11 +89,16 @@ function validateAndTransformRecord({ value, isKeyNumeric, transformKey, transfo
|
|
|
52
89
|
],
|
|
53
90
|
};
|
|
54
91
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
92
|
+
const result = {};
|
|
93
|
+
const errors = [];
|
|
94
|
+
for (const stringKey in value) {
|
|
95
|
+
if (!_hasOwn.call(value, stringKey)) {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
const entryValue = value[stringKey];
|
|
99
|
+
if (entryValue === undefined) {
|
|
100
|
+
continue;
|
|
58
101
|
}
|
|
59
|
-
const acc = accPromise;
|
|
60
102
|
let key = stringKey;
|
|
61
103
|
if (isKeyNumeric) {
|
|
62
104
|
const numberKey = stringKey.length > 0 ? Number(stringKey) : NaN;
|
|
@@ -65,26 +107,21 @@ function validateAndTransformRecord({ value, isKeyNumeric, transformKey, transfo
|
|
|
65
107
|
}
|
|
66
108
|
}
|
|
67
109
|
const transformedKey = transformKey(key);
|
|
68
|
-
const transformedValue = transformValue(
|
|
69
|
-
if (
|
|
70
|
-
|
|
71
|
-
ok: true,
|
|
72
|
-
value: Object.assign(Object.assign({}, acc.value), { [transformedKey.value]: transformedValue.value }),
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
const errors = [];
|
|
76
|
-
if (!acc.ok) {
|
|
77
|
-
errors.push(...acc.errors);
|
|
110
|
+
const transformedValue = transformValue(entryValue, key);
|
|
111
|
+
if (transformedKey.ok && transformedValue.ok) {
|
|
112
|
+
result[transformedKey.value] = transformedValue.value;
|
|
78
113
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
114
|
+
else {
|
|
115
|
+
if (!transformedKey.ok) {
|
|
116
|
+
errors.push(...transformedKey.errors);
|
|
117
|
+
}
|
|
118
|
+
if (!transformedValue.ok) {
|
|
119
|
+
errors.push(...transformedValue.errors);
|
|
120
|
+
}
|
|
84
121
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
122
|
+
}
|
|
123
|
+
if (errors.length === 0) {
|
|
124
|
+
return { ok: true, value: result };
|
|
125
|
+
}
|
|
126
|
+
return { ok: false, errors };
|
|
90
127
|
}
|
|
@@ -2,3 +2,5 @@ import type { BaseSchema } from "../../Schema.mjs";
|
|
|
2
2
|
import type { SchemaUtils } from "../schema-utils/index.mjs";
|
|
3
3
|
export type RecordSchema<RawKey extends string | number, RawValue, ParsedKey extends string | number, ParsedValue> = BaseRecordSchema<RawKey, RawValue, ParsedKey, ParsedValue> & SchemaUtils<Record<RawKey, RawValue>, Record<ParsedKey, ParsedValue>>;
|
|
4
4
|
export type BaseRecordSchema<RawKey extends string | number, RawValue, ParsedKey extends string | number, ParsedValue> = BaseSchema<Record<RawKey, RawValue>, Record<ParsedKey, ParsedValue>>;
|
|
5
|
+
export type PartialRecordSchema<RawKey extends string | number, RawValue, ParsedKey extends string | number, ParsedValue> = BasePartialRecordSchema<RawKey, RawValue, ParsedKey, ParsedValue> & SchemaUtils<Record<RawKey, RawValue>, Partial<Record<ParsedKey, ParsedValue>>>;
|
|
6
|
+
export type BasePartialRecordSchema<RawKey extends string | number, RawValue, ParsedKey extends string | number, ParsedValue> = BaseSchema<Record<RawKey, RawValue>, Partial<Record<ParsedKey, ParsedValue>>>;
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
1
|
import { SchemaType } from "../../Schema.mjs";
|
|
13
2
|
import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType.mjs";
|
|
14
3
|
import { isPlainObject } from "../../utils/isPlainObject.mjs";
|
|
@@ -17,6 +6,8 @@ import { maybeSkipValidation } from "../../utils/maybeSkipValidation.mjs";
|
|
|
17
6
|
import { enum_ } from "../enum/index.mjs";
|
|
18
7
|
import { getObjectLikeUtils } from "../object-like/index.mjs";
|
|
19
8
|
import { getSchemaUtils } from "../schema-utils/index.mjs";
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
10
|
+
const _hasOwn = Object.prototype.hasOwnProperty;
|
|
20
11
|
export function union(discriminant, union) {
|
|
21
12
|
const rawDiscriminant = typeof discriminant === "string" ? discriminant : discriminant.rawDiscriminant;
|
|
22
13
|
const parsedDiscriminant = typeof discriminant === "string"
|
|
@@ -76,7 +67,13 @@ function transformAndValidateUnion({ value, discriminant, transformedDiscriminan
|
|
|
76
67
|
],
|
|
77
68
|
};
|
|
78
69
|
}
|
|
79
|
-
const
|
|
70
|
+
const discriminantValue = value[discriminant];
|
|
71
|
+
const additionalProperties = {};
|
|
72
|
+
for (const key in value) {
|
|
73
|
+
if (_hasOwn.call(value, key) && key !== discriminant) {
|
|
74
|
+
additionalProperties[key] = value[key];
|
|
75
|
+
}
|
|
76
|
+
}
|
|
80
77
|
if (discriminantValue == null) {
|
|
81
78
|
return {
|
|
82
79
|
ok: false,
|
|
@@ -3,12 +3,10 @@ export function isPlainObject(value) {
|
|
|
3
3
|
if (typeof value !== "object" || value === null) {
|
|
4
4
|
return false;
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
const proto = Object.getPrototypeOf(value);
|
|
7
|
+
if (proto === null) {
|
|
7
8
|
return true;
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
proto = Object.getPrototypeOf(proto);
|
|
12
|
-
}
|
|
13
|
-
return Object.getPrototypeOf(value) === proto;
|
|
10
|
+
// Check that the prototype chain has exactly one level (i.e., proto is Object.prototype)
|
|
11
|
+
return Object.getPrototypeOf(proto) === null;
|
|
14
12
|
}
|
|
@@ -9,6 +9,7 @@ export declare namespace ReconnectingWebSocket {
|
|
|
9
9
|
options?: ReconnectingWebSocket.Options;
|
|
10
10
|
headers?: Record<string, unknown>;
|
|
11
11
|
queryParameters?: Record<string, unknown>;
|
|
12
|
+
abortSignal?: AbortSignal;
|
|
12
13
|
}
|
|
13
14
|
type Options = {
|
|
14
15
|
WebSocket?: any;
|
|
@@ -47,7 +48,8 @@ export declare class ReconnectingWebSocket {
|
|
|
47
48
|
private readonly _options;
|
|
48
49
|
private readonly _headers?;
|
|
49
50
|
private readonly _queryParameters?;
|
|
50
|
-
|
|
51
|
+
private readonly _abortSignal?;
|
|
52
|
+
constructor({ url, protocols, options, headers, queryParameters, abortSignal }: ReconnectingWebSocket.Args);
|
|
51
53
|
static readonly CONNECTING = 0;
|
|
52
54
|
static readonly OPEN = 1;
|
|
53
55
|
static readonly CLOSING = 2;
|
|
@@ -83,7 +85,7 @@ export declare class ReconnectingWebSocket {
|
|
|
83
85
|
/**
|
|
84
86
|
* The current state of the connection; this is one of the Ready state constants
|
|
85
87
|
*/
|
|
86
|
-
get readyState():
|
|
88
|
+
get readyState(): ReconnectingWebSocket.ReadyState;
|
|
87
89
|
/**
|
|
88
90
|
* The URL as resolved by the constructor
|
|
89
91
|
*/
|
|
@@ -133,6 +135,7 @@ export declare class ReconnectingWebSocket {
|
|
|
133
135
|
private _wait;
|
|
134
136
|
private _getNextUrl;
|
|
135
137
|
private _connect;
|
|
138
|
+
private _handleAbort;
|
|
136
139
|
private _handleTimeout;
|
|
137
140
|
private _disconnect;
|
|
138
141
|
private _acceptOpen;
|
|
@@ -145,3 +148,12 @@ export declare class ReconnectingWebSocket {
|
|
|
145
148
|
private _addListeners;
|
|
146
149
|
private _clearTimeouts;
|
|
147
150
|
}
|
|
151
|
+
export declare namespace ReconnectingWebSocket {
|
|
152
|
+
const ReadyState: {
|
|
153
|
+
readonly CONNECTING: 0;
|
|
154
|
+
readonly OPEN: 1;
|
|
155
|
+
readonly CLOSING: 2;
|
|
156
|
+
readonly CLOSED: 3;
|
|
157
|
+
};
|
|
158
|
+
type ReadyState = (typeof ReadyState)[keyof typeof ReadyState];
|
|
159
|
+
}
|
|
@@ -3,13 +3,13 @@ import { RUNTIME } from "../runtime/index.mjs";
|
|
|
3
3
|
import { toQueryString } from "../url/qs.mjs";
|
|
4
4
|
import * as Events from "./events.mjs";
|
|
5
5
|
const getGlobalWebSocket = () => {
|
|
6
|
-
if (
|
|
6
|
+
if (RUNTIME.type === "node" || RUNTIME.type === "bun" || RUNTIME.type === "deno") {
|
|
7
|
+
return NodeWebSocket;
|
|
8
|
+
}
|
|
9
|
+
else if (typeof WebSocket !== "undefined") {
|
|
7
10
|
// @ts-ignore
|
|
8
11
|
return WebSocket;
|
|
9
12
|
}
|
|
10
|
-
else if (RUNTIME.type === "node") {
|
|
11
|
-
return NodeWebSocket;
|
|
12
|
-
}
|
|
13
13
|
return undefined;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
@@ -28,7 +28,7 @@ const DEFAULT_OPTIONS = {
|
|
|
28
28
|
debug: false,
|
|
29
29
|
};
|
|
30
30
|
export class ReconnectingWebSocket {
|
|
31
|
-
constructor({ url, protocols, options, headers, queryParameters }) {
|
|
31
|
+
constructor({ url, protocols, options, headers, queryParameters, abortSignal }) {
|
|
32
32
|
this._listeners = {
|
|
33
33
|
error: [],
|
|
34
34
|
message: [],
|
|
@@ -62,6 +62,27 @@ export class ReconnectingWebSocket {
|
|
|
62
62
|
* this indicates that the connection is ready to send and receive data
|
|
63
63
|
*/
|
|
64
64
|
this.onopen = null;
|
|
65
|
+
this._handleAbort = () => {
|
|
66
|
+
if (this._closeCalled) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
this._debug("abort signal fired");
|
|
70
|
+
this._shouldReconnect = false;
|
|
71
|
+
this._closeCalled = true;
|
|
72
|
+
this._clearTimeouts();
|
|
73
|
+
if (this._ws) {
|
|
74
|
+
this._removeListeners();
|
|
75
|
+
// Absorb async errors emitted by ws when closing during CONNECTING state
|
|
76
|
+
this._ws.addEventListener("error", () => { });
|
|
77
|
+
try {
|
|
78
|
+
this._ws.close(1000, "aborted");
|
|
79
|
+
this._handleClose(new Events.CloseEvent(1000, "aborted", this));
|
|
80
|
+
}
|
|
81
|
+
catch (_error) {
|
|
82
|
+
// ignore
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
65
86
|
this._handleOpen = (event) => {
|
|
66
87
|
this._debug("open event");
|
|
67
88
|
const { minUptime = DEFAULT_OPTIONS.minUptime } = this._options;
|
|
@@ -112,6 +133,10 @@ export class ReconnectingWebSocket {
|
|
|
112
133
|
this._options = options !== null && options !== void 0 ? options : DEFAULT_OPTIONS;
|
|
113
134
|
this._headers = headers;
|
|
114
135
|
this._queryParameters = queryParameters;
|
|
136
|
+
this._abortSignal = abortSignal;
|
|
137
|
+
if (this._abortSignal) {
|
|
138
|
+
this._abortSignal.addEventListener("abort", this._handleAbort, { once: true });
|
|
139
|
+
}
|
|
115
140
|
if (this._options.startClosed) {
|
|
116
141
|
this._shouldReconnect = false;
|
|
117
142
|
}
|
|
@@ -175,7 +200,9 @@ export class ReconnectingWebSocket {
|
|
|
175
200
|
if (this._ws) {
|
|
176
201
|
return this._ws.readyState;
|
|
177
202
|
}
|
|
178
|
-
return this._options.startClosed
|
|
203
|
+
return this._options.startClosed
|
|
204
|
+
? ReconnectingWebSocket.ReadyState.CLOSED
|
|
205
|
+
: ReconnectingWebSocket.ReadyState.CONNECTING;
|
|
179
206
|
}
|
|
180
207
|
/**
|
|
181
208
|
* The URL as resolved by the constructor
|
|
@@ -304,9 +331,14 @@ export class ReconnectingWebSocket {
|
|
|
304
331
|
throw Error("Invalid URL");
|
|
305
332
|
}
|
|
306
333
|
_connect() {
|
|
334
|
+
var _a;
|
|
307
335
|
if (this._connectLock || !this._shouldReconnect) {
|
|
308
336
|
return;
|
|
309
337
|
}
|
|
338
|
+
if ((_a = this._abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) {
|
|
339
|
+
this._debug("connect aborted");
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
310
342
|
this._connectLock = true;
|
|
311
343
|
const { maxRetries = DEFAULT_OPTIONS.maxRetries, connectionTimeout = DEFAULT_OPTIONS.connectionTimeout, WebSocket = getGlobalWebSocket(), } = this._options;
|
|
312
344
|
if (this._retryCount >= maxRetries) {
|
|
@@ -322,7 +354,9 @@ export class ReconnectingWebSocket {
|
|
|
322
354
|
this._wait()
|
|
323
355
|
.then(() => this._getNextUrl(this._url))
|
|
324
356
|
.then((url) => {
|
|
325
|
-
|
|
357
|
+
var _a;
|
|
358
|
+
if (this._closeCalled || ((_a = this._abortSignal) === null || _a === void 0 ? void 0 : _a.aborted)) {
|
|
359
|
+
this._connectLock = false;
|
|
326
360
|
return;
|
|
327
361
|
}
|
|
328
362
|
const options = {};
|
|
@@ -352,6 +386,8 @@ export class ReconnectingWebSocket {
|
|
|
352
386
|
return;
|
|
353
387
|
}
|
|
354
388
|
this._removeListeners();
|
|
389
|
+
// Absorb async errors emitted by ws when closing during CONNECTING state
|
|
390
|
+
this._ws.addEventListener("error", () => { });
|
|
355
391
|
try {
|
|
356
392
|
this._ws.close(code, reason);
|
|
357
393
|
this._handleClose(new Events.CloseEvent(code, reason, this));
|
|
@@ -405,3 +441,11 @@ ReconnectingWebSocket.CONNECTING = 0;
|
|
|
405
441
|
ReconnectingWebSocket.OPEN = 1;
|
|
406
442
|
ReconnectingWebSocket.CLOSING = 2;
|
|
407
443
|
ReconnectingWebSocket.CLOSED = 3;
|
|
444
|
+
(function (ReconnectingWebSocket) {
|
|
445
|
+
ReconnectingWebSocket.ReadyState = {
|
|
446
|
+
CONNECTING: 0,
|
|
447
|
+
OPEN: 1,
|
|
448
|
+
CLOSING: 2,
|
|
449
|
+
CLOSED: 3,
|
|
450
|
+
};
|
|
451
|
+
})(ReconnectingWebSocket || (ReconnectingWebSocket = {}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../api/index.mjs";
|
|
2
|
+
import * as core from "../../../../core/index.mjs";
|
|
3
|
+
import type * as serializers from "../../../index.mjs";
|
|
4
|
+
import { MessageId } from "./MessageId.mjs";
|
|
5
|
+
import { MessageLabels } from "./MessageLabels.mjs";
|
|
6
|
+
export declare const UpdateMessageResponse: core.serialization.ObjectSchema<serializers.UpdateMessageResponse.Raw, AgentMail.UpdateMessageResponse>;
|
|
7
|
+
export declare namespace UpdateMessageResponse {
|
|
8
|
+
interface Raw {
|
|
9
|
+
message_id: MessageId.Raw;
|
|
10
|
+
labels: MessageLabels.Raw;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as core from "../../../../core/index.mjs";
|
|
3
|
+
import { MessageId } from "./MessageId.mjs";
|
|
4
|
+
import { MessageLabels } from "./MessageLabels.mjs";
|
|
5
|
+
export const UpdateMessageResponse = core.serialization.object({
|
|
6
|
+
messageId: core.serialization.property("message_id", MessageId),
|
|
7
|
+
labels: MessageLabels,
|
|
8
|
+
});
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import * as core from "../../../../core/index.mjs";
|
|
3
3
|
import { MetricBucket } from "./MetricBucket.mjs";
|
|
4
4
|
import { MetricEventType } from "./MetricEventType.mjs";
|
|
5
|
-
export const QueryMetricsResponse = core.serialization.
|
|
5
|
+
export const QueryMetricsResponse = core.serialization.partialRecord(MetricEventType, core.serialization.list(MetricBucket).optional());
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../api/index.mjs";
|
|
2
|
+
import * as core from "../../../../core/index.mjs";
|
|
3
|
+
import type * as serializers from "../../../index.mjs";
|
|
4
|
+
export declare const UpdateThreadRequest: core.serialization.ObjectSchema<serializers.UpdateThreadRequest.Raw, AgentMail.UpdateThreadRequest>;
|
|
5
|
+
export declare namespace UpdateThreadRequest {
|
|
6
|
+
interface Raw {
|
|
7
|
+
add_labels?: string[] | null;
|
|
8
|
+
remove_labels?: string[] | null;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as core from "../../../../core/index.mjs";
|
|
3
|
+
export const UpdateThreadRequest = core.serialization.object({
|
|
4
|
+
addLabels: core.serialization.property("add_labels", core.serialization.list(core.serialization.string()).optional()),
|
|
5
|
+
removeLabels: core.serialization.property("remove_labels", core.serialization.list(core.serialization.string()).optional()),
|
|
6
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../api/index.mjs";
|
|
2
|
+
import * as core from "../../../../core/index.mjs";
|
|
3
|
+
import type * as serializers from "../../../index.mjs";
|
|
4
|
+
import { ThreadId } from "./ThreadId.mjs";
|
|
5
|
+
import { ThreadLabels } from "./ThreadLabels.mjs";
|
|
6
|
+
export declare const UpdateThreadResponse: core.serialization.ObjectSchema<serializers.UpdateThreadResponse.Raw, AgentMail.UpdateThreadResponse>;
|
|
7
|
+
export declare namespace UpdateThreadResponse {
|
|
8
|
+
interface Raw {
|
|
9
|
+
thread_id: ThreadId.Raw;
|
|
10
|
+
labels: ThreadLabels.Raw;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as core from "../../../../core/index.mjs";
|
|
3
|
+
import { ThreadId } from "./ThreadId.mjs";
|
|
4
|
+
import { ThreadLabels } from "./ThreadLabels.mjs";
|
|
5
|
+
export const UpdateThreadResponse = core.serialization.object({
|
|
6
|
+
threadId: core.serialization.property("thread_id", ThreadId),
|
|
7
|
+
labels: ThreadLabels,
|
|
8
|
+
});
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.4.
|
|
1
|
+
export declare const SDK_VERSION = "0.4.15";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.4.
|
|
1
|
+
export const SDK_VERSION = "0.4.15";
|