@orq-ai/node 3.12.3 → 3.12.5
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/bin/mcp-server.js +112 -112
- package/bin/mcp-server.js.map +30 -30
- package/examples/contactsCreate.example.ts +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/operations/createbudget.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +2 -2
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +16 -16
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getbudget.js +2 -2
- package/models/operations/getevals.js +28 -28
- package/models/operations/listbudgets.js +2 -2
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +2 -2
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.js +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/updatebudget.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +16 -16
- package/package.json +1 -1
- package/packages/orq-rc/FUNCTIONS.md +9 -19
- package/packages/orq-rc/README.md +180 -181
- package/packages/orq-rc/docs/sdks/agents/README.md +702 -0
- package/packages/orq-rc/docs/sdks/budgets/README.md +5 -5
- package/packages/orq-rc/docs/sdks/memorystores/README.md +1172 -0
- package/packages/orq-rc/docs/sdks/orq/README.md +81 -0
- package/packages/orq-rc/examples/package-lock.json +1 -1
- package/packages/orq-rc/examples/postV2AgentsInternal.example.ts +30 -0
- package/packages/orq-rc/jsr.json +1 -1
- package/packages/orq-rc/package-lock.json +2 -2
- package/packages/orq-rc/package.json +1 -1
- package/packages/orq-rc/src/funcs/agentsList.ts +167 -0
- package/packages/orq-rc/src/funcs/agentsListActions.ts +169 -0
- package/packages/orq-rc/src/funcs/agentsRetrieve.ts +175 -0
- package/packages/orq-rc/src/funcs/agentsRetrieveAction.ts +173 -0
- package/packages/orq-rc/src/funcs/agentsRetrieveTask.ts +179 -0
- package/packages/orq-rc/src/funcs/agentsReviewAction.ts +177 -0
- package/packages/orq-rc/src/funcs/agentsRun.ts +163 -0
- package/packages/orq-rc/src/funcs/agentsStreamRun.ts +187 -0
- package/packages/orq-rc/src/funcs/budgetsCreate.ts +1 -1
- package/packages/orq-rc/src/funcs/budgetsGet.ts +2 -2
- package/packages/orq-rc/src/funcs/budgetsList.ts +2 -2
- package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +171 -0
- package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +175 -0
- package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +170 -0
- package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +168 -0
- package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +184 -0
- package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +179 -0
- package/packages/orq-rc/src/funcs/memoryStoresList.ts +178 -0
- package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +181 -0
- package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +176 -0
- package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +177 -0
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +178 -0
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +173 -0
- package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +168 -0
- package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +179 -0
- package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +174 -0
- package/packages/orq-rc/src/funcs/postV2AgentsInternal.ts +159 -0
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +49 -1
- package/packages/orq-rc/src/mcp-server/tools/agentsList.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsListActions.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveAction.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveTask.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsReviewAction.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsRun.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/budgetsCreate.ts +1 -1
- package/packages/orq-rc/src/mcp-server/tools/budgetsGet.ts +2 -2
- package/packages/orq-rc/src/mcp-server/tools/budgetsList.ts +2 -2
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreate.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateDocument.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateMemory.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresDelete.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteDocument.ts +40 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteMemory.ts +40 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresList.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresListDocuments.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresListMemories.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieve.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveDocument.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveMemory.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdate.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateDocument.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateMemory.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/postV2AgentsInternal.ts +33 -0
- package/packages/orq-rc/src/models/errors/getagent.ts +80 -0
- package/packages/orq-rc/src/models/errors/getagenttask.ts +80 -0
- package/packages/orq-rc/src/models/errors/index.ts +3 -0
- package/packages/orq-rc/src/models/errors/streamrunagent.ts +80 -0
- package/packages/orq-rc/src/models/operations/createbudget.ts +57 -58
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/createeval.ts +6383 -1075
- package/packages/orq-rc/src/models/operations/creatememory.ts +265 -0
- package/packages/orq-rc/src/models/operations/creatememorydocument.ts +284 -0
- package/packages/orq-rc/src/models/operations/creatememorystore.ts +1956 -0
- package/packages/orq-rc/src/models/operations/deletememory.ts +87 -0
- package/packages/orq-rc/src/models/operations/deletememorydocument.ts +98 -0
- package/packages/orq-rc/src/models/operations/deletememorystore.ts +78 -0
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +36 -27
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +31 -24
- package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
- package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
- package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
- package/packages/orq-rc/src/models/operations/getagent.ts +1171 -0
- package/packages/orq-rc/src/models/operations/getagenttask.ts +257 -0
- package/packages/orq-rc/src/models/operations/getallmemories.ts +315 -0
- package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +335 -0
- package/packages/orq-rc/src/models/operations/getallmemorystores.ts +1241 -0
- package/packages/orq-rc/src/models/operations/getbudget.ts +2 -11
- package/packages/orq-rc/src/models/operations/getevals.ts +1362 -1166
- package/packages/orq-rc/src/models/operations/index.ts +24 -0
- package/packages/orq-rc/src/models/operations/listactions.ts +517 -0
- package/packages/orq-rc/src/models/operations/listagents.ts +1335 -0
- package/packages/orq-rc/src/models/operations/listbudgets.ts +5 -15
- package/packages/orq-rc/src/models/operations/listchunks.ts +21 -21
- package/packages/orq-rc/src/models/operations/listcontacts.ts +44 -37
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasources.ts +29 -22
- package/packages/orq-rc/src/models/operations/postv2agentsinternal.ts +103 -0
- package/packages/orq-rc/src/models/operations/retrieveaction.ts +419 -0
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievememory.ts +198 -0
- package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +217 -0
- package/packages/orq-rc/src/models/operations/retrievememorystore.ts +1124 -0
- package/packages/orq-rc/src/models/operations/reviewaction.ts +258 -0
- package/packages/orq-rc/src/models/operations/runagent.ts +3428 -0
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +3361 -0
- package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -11
- package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateeval.ts +6627 -1224
- package/packages/orq-rc/src/models/operations/updatememory.ts +274 -0
- package/packages/orq-rc/src/models/operations/updatememorydocument.ts +293 -0
- package/packages/orq-rc/src/models/operations/updatememorystore.ts +1348 -0
- package/packages/orq-rc/src/models/operations/updateprompt.ts +64 -19
- package/packages/orq-rc/src/sdk/agents.ts +148 -0
- package/packages/orq-rc/src/sdk/budgets.ts +5 -5
- package/packages/orq-rc/src/sdk/memorystores.ts +286 -0
- package/packages/orq-rc/src/sdk/sdk.ts +27 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/operations/createbudget.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +2 -2
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +16 -16
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/getbudget.ts +2 -2
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/listbudgets.ts +2 -2
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +2 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/updatebudget.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -2
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +16 -16
- package/packages/orq-rc/examples/contactsCreate.example.ts +0 -42
|
@@ -10,15 +10,14 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* Filter by budget entity type
|
|
13
|
+
* Filter by budget entity type (contact or workspace)
|
|
14
14
|
*/
|
|
15
15
|
export const QueryParamType = {
|
|
16
|
-
ApiKey: "api_key",
|
|
17
16
|
Contact: "contact",
|
|
18
17
|
Workspace: "workspace",
|
|
19
18
|
} as const;
|
|
20
19
|
/**
|
|
21
|
-
* Filter by budget entity type
|
|
20
|
+
* Filter by budget entity type (contact or workspace)
|
|
22
21
|
*/
|
|
23
22
|
export type QueryParamType = ClosedEnum<typeof QueryParamType>;
|
|
24
23
|
|
|
@@ -36,7 +35,7 @@ export type ListBudgetsRequest = {
|
|
|
36
35
|
*/
|
|
37
36
|
endingBefore?: string | undefined;
|
|
38
37
|
/**
|
|
39
|
-
* Filter by budget entity type
|
|
38
|
+
* Filter by budget entity type (contact or workspace)
|
|
40
39
|
*/
|
|
41
40
|
type?: QueryParamType | undefined;
|
|
42
41
|
entityId?: string | undefined;
|
|
@@ -121,10 +120,6 @@ export type ListBudgetsData = {
|
|
|
121
120
|
* Contact external identifier (present when type is "contact")
|
|
122
121
|
*/
|
|
123
122
|
contactId?: string | undefined;
|
|
124
|
-
/**
|
|
125
|
-
* API Key identifier (present when type is "api_key")
|
|
126
|
-
*/
|
|
127
|
-
apiKeyId?: string | undefined;
|
|
128
123
|
/**
|
|
129
124
|
* Budget configuration
|
|
130
125
|
*/
|
|
@@ -463,20 +458,18 @@ export const ListBudgetsData$inboundSchema: z.ZodType<
|
|
|
463
458
|
_id: z.string(),
|
|
464
459
|
type: ListBudgetsType$inboundSchema,
|
|
465
460
|
contact_id: z.string().optional(),
|
|
466
|
-
api_key_id: z.string().optional(),
|
|
467
461
|
budget: z.lazy(() => ListBudgetsBudget$inboundSchema),
|
|
468
462
|
is_active: z.boolean(),
|
|
469
463
|
consumption: z.lazy(() => ListBudgetsConsumption$inboundSchema).optional(),
|
|
470
464
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
471
465
|
.optional(),
|
|
472
466
|
updated: z.string().datetime({ offset: true }).default(
|
|
473
|
-
"2025-09-
|
|
467
|
+
"2025-09-09T09:35:11.330Z",
|
|
474
468
|
).transform(v => new Date(v)),
|
|
475
469
|
}).transform((v) => {
|
|
476
470
|
return remap$(v, {
|
|
477
471
|
"_id": "id",
|
|
478
472
|
"contact_id": "contactId",
|
|
479
|
-
"api_key_id": "apiKeyId",
|
|
480
473
|
"is_active": "isActive",
|
|
481
474
|
});
|
|
482
475
|
});
|
|
@@ -486,7 +479,6 @@ export type ListBudgetsData$Outbound = {
|
|
|
486
479
|
_id: string;
|
|
487
480
|
type: string;
|
|
488
481
|
contact_id?: string | undefined;
|
|
489
|
-
api_key_id?: string | undefined;
|
|
490
482
|
budget: ListBudgetsBudget$Outbound;
|
|
491
483
|
is_active: boolean;
|
|
492
484
|
consumption?: ListBudgetsConsumption$Outbound | undefined;
|
|
@@ -503,18 +495,16 @@ export const ListBudgetsData$outboundSchema: z.ZodType<
|
|
|
503
495
|
id: z.string(),
|
|
504
496
|
type: ListBudgetsType$outboundSchema,
|
|
505
497
|
contactId: z.string().optional(),
|
|
506
|
-
apiKeyId: z.string().optional(),
|
|
507
498
|
budget: z.lazy(() => ListBudgetsBudget$outboundSchema),
|
|
508
499
|
isActive: z.boolean(),
|
|
509
500
|
consumption: z.lazy(() => ListBudgetsConsumption$outboundSchema).optional(),
|
|
510
501
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
511
|
-
updated: z.date().default(() => new Date("2025-09-
|
|
502
|
+
updated: z.date().default(() => new Date("2025-09-09T09:35:11.330Z"))
|
|
512
503
|
.transform(v => v.toISOString()),
|
|
513
504
|
}).transform((v) => {
|
|
514
505
|
return remap$(v, {
|
|
515
506
|
id: "_id",
|
|
516
507
|
contactId: "contact_id",
|
|
517
|
-
apiKeyId: "api_key_id",
|
|
518
508
|
isActive: "is_active",
|
|
519
509
|
});
|
|
520
510
|
});
|
|
@@ -12,7 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
12
12
|
/**
|
|
13
13
|
* Filter datasources by status.
|
|
14
14
|
*/
|
|
15
|
-
export type
|
|
15
|
+
export type ListChunksQueryParamStatus = Array<string> | string;
|
|
16
16
|
|
|
17
17
|
export type ListChunksRequest = {
|
|
18
18
|
/**
|
|
@@ -116,50 +116,50 @@ export type ListChunksResponseBody = {
|
|
|
116
116
|
};
|
|
117
117
|
|
|
118
118
|
/** @internal */
|
|
119
|
-
export const
|
|
120
|
-
|
|
119
|
+
export const ListChunksQueryParamStatus$inboundSchema: z.ZodType<
|
|
120
|
+
ListChunksQueryParamStatus,
|
|
121
121
|
z.ZodTypeDef,
|
|
122
122
|
unknown
|
|
123
123
|
> = z.union([z.array(z.string()), z.string()]);
|
|
124
124
|
|
|
125
125
|
/** @internal */
|
|
126
|
-
export type
|
|
126
|
+
export type ListChunksQueryParamStatus$Outbound = Array<string> | string;
|
|
127
127
|
|
|
128
128
|
/** @internal */
|
|
129
|
-
export const
|
|
130
|
-
|
|
129
|
+
export const ListChunksQueryParamStatus$outboundSchema: z.ZodType<
|
|
130
|
+
ListChunksQueryParamStatus$Outbound,
|
|
131
131
|
z.ZodTypeDef,
|
|
132
|
-
|
|
132
|
+
ListChunksQueryParamStatus
|
|
133
133
|
> = z.union([z.array(z.string()), z.string()]);
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
* @internal
|
|
137
137
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
138
138
|
*/
|
|
139
|
-
export namespace
|
|
140
|
-
/** @deprecated use `
|
|
141
|
-
export const inboundSchema =
|
|
142
|
-
/** @deprecated use `
|
|
143
|
-
export const outboundSchema =
|
|
144
|
-
/** @deprecated use `
|
|
145
|
-
export type Outbound =
|
|
139
|
+
export namespace ListChunksQueryParamStatus$ {
|
|
140
|
+
/** @deprecated use `ListChunksQueryParamStatus$inboundSchema` instead. */
|
|
141
|
+
export const inboundSchema = ListChunksQueryParamStatus$inboundSchema;
|
|
142
|
+
/** @deprecated use `ListChunksQueryParamStatus$outboundSchema` instead. */
|
|
143
|
+
export const outboundSchema = ListChunksQueryParamStatus$outboundSchema;
|
|
144
|
+
/** @deprecated use `ListChunksQueryParamStatus$Outbound` instead. */
|
|
145
|
+
export type Outbound = ListChunksQueryParamStatus$Outbound;
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
export function
|
|
149
|
-
|
|
148
|
+
export function listChunksQueryParamStatusToJSON(
|
|
149
|
+
listChunksQueryParamStatus: ListChunksQueryParamStatus,
|
|
150
150
|
): string {
|
|
151
151
|
return JSON.stringify(
|
|
152
|
-
|
|
152
|
+
ListChunksQueryParamStatus$outboundSchema.parse(listChunksQueryParamStatus),
|
|
153
153
|
);
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
export function
|
|
156
|
+
export function listChunksQueryParamStatusFromJSON(
|
|
157
157
|
jsonString: string,
|
|
158
|
-
): SafeParseResult<
|
|
158
|
+
): SafeParseResult<ListChunksQueryParamStatus, SDKValidationError> {
|
|
159
159
|
return safeParse(
|
|
160
160
|
jsonString,
|
|
161
|
-
(x) =>
|
|
162
|
-
`Failed to parse '
|
|
161
|
+
(x) => ListChunksQueryParamStatus$inboundSchema.parse(JSON.parse(x)),
|
|
162
|
+
`Failed to parse 'ListChunksQueryParamStatus' from JSON`,
|
|
163
163
|
);
|
|
164
164
|
}
|
|
165
165
|
|
|
@@ -41,7 +41,7 @@ export const ObjectT = {
|
|
|
41
41
|
} as const;
|
|
42
42
|
export type ObjectT = ClosedEnum<typeof ObjectT>;
|
|
43
43
|
|
|
44
|
-
export type
|
|
44
|
+
export type ListContactsMetrics = {
|
|
45
45
|
/**
|
|
46
46
|
* Total cost in dollars of the last 30 days
|
|
47
47
|
*/
|
|
@@ -97,7 +97,7 @@ export type Data = {
|
|
|
97
97
|
* The date and time the resource was last updated
|
|
98
98
|
*/
|
|
99
99
|
updated?: Date | undefined;
|
|
100
|
-
metrics:
|
|
100
|
+
metrics: ListContactsMetrics;
|
|
101
101
|
};
|
|
102
102
|
|
|
103
103
|
/**
|
|
@@ -263,23 +263,26 @@ export namespace ObjectT$ {
|
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
/** @internal */
|
|
266
|
-
export const
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
266
|
+
export const ListContactsMetrics$inboundSchema: z.ZodType<
|
|
267
|
+
ListContactsMetrics,
|
|
268
|
+
z.ZodTypeDef,
|
|
269
|
+
unknown
|
|
270
|
+
> = z.object({
|
|
271
|
+
total_cost: z.number(),
|
|
272
|
+
total_tokens: z.number(),
|
|
273
|
+
total_requests: z.number(),
|
|
274
|
+
error_rate: z.number(),
|
|
275
|
+
}).transform((v) => {
|
|
276
|
+
return remap$(v, {
|
|
277
|
+
"total_cost": "totalCost",
|
|
278
|
+
"total_tokens": "totalTokens",
|
|
279
|
+
"total_requests": "totalRequests",
|
|
280
|
+
"error_rate": "errorRate",
|
|
279
281
|
});
|
|
282
|
+
});
|
|
280
283
|
|
|
281
284
|
/** @internal */
|
|
282
|
-
export type
|
|
285
|
+
export type ListContactsMetrics$Outbound = {
|
|
283
286
|
total_cost: number;
|
|
284
287
|
total_tokens: number;
|
|
285
288
|
total_requests: number;
|
|
@@ -287,10 +290,10 @@ export type Metrics$Outbound = {
|
|
|
287
290
|
};
|
|
288
291
|
|
|
289
292
|
/** @internal */
|
|
290
|
-
export const
|
|
291
|
-
|
|
293
|
+
export const ListContactsMetrics$outboundSchema: z.ZodType<
|
|
294
|
+
ListContactsMetrics$Outbound,
|
|
292
295
|
z.ZodTypeDef,
|
|
293
|
-
|
|
296
|
+
ListContactsMetrics
|
|
294
297
|
> = z.object({
|
|
295
298
|
totalCost: z.number(),
|
|
296
299
|
totalTokens: z.number(),
|
|
@@ -309,26 +312,30 @@ export const Metrics$outboundSchema: z.ZodType<
|
|
|
309
312
|
* @internal
|
|
310
313
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
311
314
|
*/
|
|
312
|
-
export namespace
|
|
313
|
-
/** @deprecated use `
|
|
314
|
-
export const inboundSchema =
|
|
315
|
-
/** @deprecated use `
|
|
316
|
-
export const outboundSchema =
|
|
317
|
-
/** @deprecated use `
|
|
318
|
-
export type Outbound =
|
|
315
|
+
export namespace ListContactsMetrics$ {
|
|
316
|
+
/** @deprecated use `ListContactsMetrics$inboundSchema` instead. */
|
|
317
|
+
export const inboundSchema = ListContactsMetrics$inboundSchema;
|
|
318
|
+
/** @deprecated use `ListContactsMetrics$outboundSchema` instead. */
|
|
319
|
+
export const outboundSchema = ListContactsMetrics$outboundSchema;
|
|
320
|
+
/** @deprecated use `ListContactsMetrics$Outbound` instead. */
|
|
321
|
+
export type Outbound = ListContactsMetrics$Outbound;
|
|
319
322
|
}
|
|
320
323
|
|
|
321
|
-
export function
|
|
322
|
-
|
|
324
|
+
export function listContactsMetricsToJSON(
|
|
325
|
+
listContactsMetrics: ListContactsMetrics,
|
|
326
|
+
): string {
|
|
327
|
+
return JSON.stringify(
|
|
328
|
+
ListContactsMetrics$outboundSchema.parse(listContactsMetrics),
|
|
329
|
+
);
|
|
323
330
|
}
|
|
324
331
|
|
|
325
|
-
export function
|
|
332
|
+
export function listContactsMetricsFromJSON(
|
|
326
333
|
jsonString: string,
|
|
327
|
-
): SafeParseResult<
|
|
334
|
+
): SafeParseResult<ListContactsMetrics, SDKValidationError> {
|
|
328
335
|
return safeParse(
|
|
329
336
|
jsonString,
|
|
330
|
-
(x) =>
|
|
331
|
-
`Failed to parse '
|
|
337
|
+
(x) => ListContactsMetrics$inboundSchema.parse(JSON.parse(x)),
|
|
338
|
+
`Failed to parse 'ListContactsMetrics' from JSON`,
|
|
332
339
|
);
|
|
333
340
|
}
|
|
334
341
|
|
|
@@ -345,9 +352,9 @@ export const Data$inboundSchema: z.ZodType<Data, z.ZodTypeDef, unknown> = z
|
|
|
345
352
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
346
353
|
.optional(),
|
|
347
354
|
updated: z.string().datetime({ offset: true }).default(
|
|
348
|
-
"2025-09-
|
|
355
|
+
"2025-09-09T09:35:11.330Z",
|
|
349
356
|
).transform(v => new Date(v)),
|
|
350
|
-
metrics: z.lazy(() =>
|
|
357
|
+
metrics: z.lazy(() => ListContactsMetrics$inboundSchema),
|
|
351
358
|
}).transform((v) => {
|
|
352
359
|
return remap$(v, {
|
|
353
360
|
"_id": "id",
|
|
@@ -368,7 +375,7 @@ export type Data$Outbound = {
|
|
|
368
375
|
metadata?: { [k: string]: any } | undefined;
|
|
369
376
|
created?: string | undefined;
|
|
370
377
|
updated: string;
|
|
371
|
-
metrics:
|
|
378
|
+
metrics: ListContactsMetrics$Outbound;
|
|
372
379
|
};
|
|
373
380
|
|
|
374
381
|
/** @internal */
|
|
@@ -382,9 +389,9 @@ export const Data$outboundSchema: z.ZodType<Data$Outbound, z.ZodTypeDef, Data> =
|
|
|
382
389
|
tags: z.array(z.string()).optional(),
|
|
383
390
|
metadata: z.record(z.any()).optional(),
|
|
384
391
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
385
|
-
updated: z.date().default(() => new Date("2025-09-
|
|
392
|
+
updated: z.date().default(() => new Date("2025-09-09T09:35:11.330Z"))
|
|
386
393
|
.transform(v => v.toISOString()),
|
|
387
|
-
metrics: z.lazy(() =>
|
|
394
|
+
metrics: z.lazy(() => ListContactsMetrics$outboundSchema),
|
|
388
395
|
}).transform((v) => {
|
|
389
396
|
return remap$(v, {
|
|
390
397
|
id: "_id",
|
|
@@ -3100,7 +3100,7 @@ export const ListDatasetDatapointsData$inboundSchema: z.ZodType<
|
|
|
3100
3100
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
3101
3101
|
.optional(),
|
|
3102
3102
|
updated: z.string().datetime({ offset: true }).default(
|
|
3103
|
-
"2025-09-
|
|
3103
|
+
"2025-09-09T09:35:11.330Z",
|
|
3104
3104
|
).transform(v => new Date(v)),
|
|
3105
3105
|
}).transform((v) => {
|
|
3106
3106
|
return remap$(v, {
|
|
@@ -3164,7 +3164,7 @@ export const ListDatasetDatapointsData$outboundSchema: z.ZodType<
|
|
|
3164
3164
|
createdById: z.string().optional(),
|
|
3165
3165
|
updatedById: z.string().optional(),
|
|
3166
3166
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
3167
|
-
updated: z.date().default(() => new Date("2025-09-
|
|
3167
|
+
updated: z.date().default(() => new Date("2025-09-09T09:35:11.330Z"))
|
|
3168
3168
|
.transform(v => v.toISOString()),
|
|
3169
3169
|
}).transform((v) => {
|
|
3170
3170
|
return remap$(v, {
|
|
@@ -253,7 +253,7 @@ export const ListDatasetsData$inboundSchema: z.ZodType<
|
|
|
253
253
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
254
254
|
.optional(),
|
|
255
255
|
updated: z.string().datetime({ offset: true }).default(
|
|
256
|
-
"2025-09-
|
|
256
|
+
"2025-09-09T09:35:11.330Z",
|
|
257
257
|
).transform(v => new Date(v)),
|
|
258
258
|
}).transform((v) => {
|
|
259
259
|
return remap$(v, {
|
|
@@ -293,7 +293,7 @@ export const ListDatasetsData$outboundSchema: z.ZodType<
|
|
|
293
293
|
updatedById: z.string().optional(),
|
|
294
294
|
metadata: z.lazy(() => ListDatasetsMetadata$outboundSchema),
|
|
295
295
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
296
|
-
updated: z.date().default(() => new Date("2025-09-
|
|
296
|
+
updated: z.date().default(() => new Date("2025-09-09T09:35:11.330Z"))
|
|
297
297
|
.transform(v => v.toISOString()),
|
|
298
298
|
}).transform((v) => {
|
|
299
299
|
return remap$(v, {
|
|
@@ -12,7 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
12
12
|
/**
|
|
13
13
|
* Filter datasources by status.
|
|
14
14
|
*/
|
|
15
|
-
export type
|
|
15
|
+
export type QueryParamStatus = Array<string> | string;
|
|
16
16
|
|
|
17
17
|
export type ListDatasourcesRequest = {
|
|
18
18
|
/**
|
|
@@ -109,43 +109,50 @@ export type ListDatasourcesResponseBody = {
|
|
|
109
109
|
};
|
|
110
110
|
|
|
111
111
|
/** @internal */
|
|
112
|
-
export const
|
|
113
|
-
|
|
112
|
+
export const QueryParamStatus$inboundSchema: z.ZodType<
|
|
113
|
+
QueryParamStatus,
|
|
114
|
+
z.ZodTypeDef,
|
|
115
|
+
unknown
|
|
116
|
+
> = z.union([z.array(z.string()), z.string()]);
|
|
114
117
|
|
|
115
118
|
/** @internal */
|
|
116
|
-
export type
|
|
119
|
+
export type QueryParamStatus$Outbound = Array<string> | string;
|
|
117
120
|
|
|
118
121
|
/** @internal */
|
|
119
|
-
export const
|
|
120
|
-
|
|
122
|
+
export const QueryParamStatus$outboundSchema: z.ZodType<
|
|
123
|
+
QueryParamStatus$Outbound,
|
|
121
124
|
z.ZodTypeDef,
|
|
122
|
-
|
|
125
|
+
QueryParamStatus
|
|
123
126
|
> = z.union([z.array(z.string()), z.string()]);
|
|
124
127
|
|
|
125
128
|
/**
|
|
126
129
|
* @internal
|
|
127
130
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
128
131
|
*/
|
|
129
|
-
export namespace
|
|
130
|
-
/** @deprecated use `
|
|
131
|
-
export const inboundSchema =
|
|
132
|
-
/** @deprecated use `
|
|
133
|
-
export const outboundSchema =
|
|
134
|
-
/** @deprecated use `
|
|
135
|
-
export type Outbound =
|
|
132
|
+
export namespace QueryParamStatus$ {
|
|
133
|
+
/** @deprecated use `QueryParamStatus$inboundSchema` instead. */
|
|
134
|
+
export const inboundSchema = QueryParamStatus$inboundSchema;
|
|
135
|
+
/** @deprecated use `QueryParamStatus$outboundSchema` instead. */
|
|
136
|
+
export const outboundSchema = QueryParamStatus$outboundSchema;
|
|
137
|
+
/** @deprecated use `QueryParamStatus$Outbound` instead. */
|
|
138
|
+
export type Outbound = QueryParamStatus$Outbound;
|
|
136
139
|
}
|
|
137
140
|
|
|
138
|
-
export function
|
|
139
|
-
|
|
141
|
+
export function queryParamStatusToJSON(
|
|
142
|
+
queryParamStatus: QueryParamStatus,
|
|
143
|
+
): string {
|
|
144
|
+
return JSON.stringify(
|
|
145
|
+
QueryParamStatus$outboundSchema.parse(queryParamStatus),
|
|
146
|
+
);
|
|
140
147
|
}
|
|
141
148
|
|
|
142
|
-
export function
|
|
149
|
+
export function queryParamStatusFromJSON(
|
|
143
150
|
jsonString: string,
|
|
144
|
-
): SafeParseResult<
|
|
151
|
+
): SafeParseResult<QueryParamStatus, SDKValidationError> {
|
|
145
152
|
return safeParse(
|
|
146
153
|
jsonString,
|
|
147
|
-
(x) =>
|
|
148
|
-
`Failed to parse '
|
|
154
|
+
(x) => QueryParamStatus$inboundSchema.parse(JSON.parse(x)),
|
|
155
|
+
`Failed to parse 'QueryParamStatus' from JSON`,
|
|
149
156
|
);
|
|
150
157
|
}
|
|
151
158
|
|
|
@@ -278,7 +285,7 @@ export const ListDatasourcesData$inboundSchema: z.ZodType<
|
|
|
278
285
|
z.ZodTypeDef,
|
|
279
286
|
unknown
|
|
280
287
|
> = z.object({
|
|
281
|
-
_id: z.string().default("
|
|
288
|
+
_id: z.string().default("01K4PX8V6KGHP9HR9H0N7MTBMR"),
|
|
282
289
|
display_name: z.string(),
|
|
283
290
|
description: z.string().optional(),
|
|
284
291
|
status: ListDatasourcesStatus$inboundSchema,
|
|
@@ -322,7 +329,7 @@ export const ListDatasourcesData$outboundSchema: z.ZodType<
|
|
|
322
329
|
z.ZodTypeDef,
|
|
323
330
|
ListDatasourcesData
|
|
324
331
|
> = z.object({
|
|
325
|
-
id: z.string().default("
|
|
332
|
+
id: z.string().default("01K4PX8V6KGHP9HR9H0N7MTBMR"),
|
|
326
333
|
displayName: z.string(),
|
|
327
334
|
description: z.string().optional(),
|
|
328
335
|
status: ListDatasourcesStatus$outboundSchema,
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type PostV2AgentsInternalRequestBody = {
|
|
12
|
+
/**
|
|
13
|
+
* The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
|
|
14
|
+
*/
|
|
15
|
+
path: string;
|
|
16
|
+
key: string;
|
|
17
|
+
description: string;
|
|
18
|
+
instructions: string;
|
|
19
|
+
model: string;
|
|
20
|
+
/**
|
|
21
|
+
* Optional array of fallback model IDs to use when the primary model fails
|
|
22
|
+
*/
|
|
23
|
+
fallbackModels?: Array<string> | undefined;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const PostV2AgentsInternalRequestBody$inboundSchema: z.ZodType<
|
|
28
|
+
PostV2AgentsInternalRequestBody,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
unknown
|
|
31
|
+
> = z.object({
|
|
32
|
+
path: z.string(),
|
|
33
|
+
key: z.string(),
|
|
34
|
+
description: z.string(),
|
|
35
|
+
instructions: z.string(),
|
|
36
|
+
model: z.string(),
|
|
37
|
+
fallback_models: z.array(z.string()).optional(),
|
|
38
|
+
}).transform((v) => {
|
|
39
|
+
return remap$(v, {
|
|
40
|
+
"fallback_models": "fallbackModels",
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export type PostV2AgentsInternalRequestBody$Outbound = {
|
|
46
|
+
path: string;
|
|
47
|
+
key: string;
|
|
48
|
+
description: string;
|
|
49
|
+
instructions: string;
|
|
50
|
+
model: string;
|
|
51
|
+
fallback_models?: Array<string> | undefined;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const PostV2AgentsInternalRequestBody$outboundSchema: z.ZodType<
|
|
56
|
+
PostV2AgentsInternalRequestBody$Outbound,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
PostV2AgentsInternalRequestBody
|
|
59
|
+
> = z.object({
|
|
60
|
+
path: z.string(),
|
|
61
|
+
key: z.string(),
|
|
62
|
+
description: z.string(),
|
|
63
|
+
instructions: z.string(),
|
|
64
|
+
model: z.string(),
|
|
65
|
+
fallbackModels: z.array(z.string()).optional(),
|
|
66
|
+
}).transform((v) => {
|
|
67
|
+
return remap$(v, {
|
|
68
|
+
fallbackModels: "fallback_models",
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @internal
|
|
74
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
75
|
+
*/
|
|
76
|
+
export namespace PostV2AgentsInternalRequestBody$ {
|
|
77
|
+
/** @deprecated use `PostV2AgentsInternalRequestBody$inboundSchema` instead. */
|
|
78
|
+
export const inboundSchema = PostV2AgentsInternalRequestBody$inboundSchema;
|
|
79
|
+
/** @deprecated use `PostV2AgentsInternalRequestBody$outboundSchema` instead. */
|
|
80
|
+
export const outboundSchema = PostV2AgentsInternalRequestBody$outboundSchema;
|
|
81
|
+
/** @deprecated use `PostV2AgentsInternalRequestBody$Outbound` instead. */
|
|
82
|
+
export type Outbound = PostV2AgentsInternalRequestBody$Outbound;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function postV2AgentsInternalRequestBodyToJSON(
|
|
86
|
+
postV2AgentsInternalRequestBody: PostV2AgentsInternalRequestBody,
|
|
87
|
+
): string {
|
|
88
|
+
return JSON.stringify(
|
|
89
|
+
PostV2AgentsInternalRequestBody$outboundSchema.parse(
|
|
90
|
+
postV2AgentsInternalRequestBody,
|
|
91
|
+
),
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function postV2AgentsInternalRequestBodyFromJSON(
|
|
96
|
+
jsonString: string,
|
|
97
|
+
): SafeParseResult<PostV2AgentsInternalRequestBody, SDKValidationError> {
|
|
98
|
+
return safeParse(
|
|
99
|
+
jsonString,
|
|
100
|
+
(x) => PostV2AgentsInternalRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
101
|
+
`Failed to parse 'PostV2AgentsInternalRequestBody' from JSON`,
|
|
102
|
+
);
|
|
103
|
+
}
|