@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.
Files changed (197) hide show
  1. package/bin/mcp-server.js +112 -112
  2. package/bin/mcp-server.js.map +30 -30
  3. package/examples/contactsCreate.example.ts +1 -1
  4. package/examples/package-lock.json +1 -1
  5. package/jsr.json +1 -1
  6. package/lib/config.d.ts +3 -3
  7. package/lib/config.js +3 -3
  8. package/mcp-server/mcp-server.js +1 -1
  9. package/mcp-server/server.js +1 -1
  10. package/models/operations/createbudget.js +2 -2
  11. package/models/operations/createcontact.js +2 -2
  12. package/models/operations/createdataset.js +2 -2
  13. package/models/operations/createdatasetitem.js +2 -2
  14. package/models/operations/createdatasource.js +2 -2
  15. package/models/operations/createeval.js +16 -16
  16. package/models/operations/fileget.js +2 -2
  17. package/models/operations/filelist.js +2 -2
  18. package/models/operations/fileupload.js +2 -2
  19. package/models/operations/getbudget.js +2 -2
  20. package/models/operations/getevals.js +28 -28
  21. package/models/operations/listbudgets.js +2 -2
  22. package/models/operations/listcontacts.js +2 -2
  23. package/models/operations/listdatasetdatapoints.js +2 -2
  24. package/models/operations/listdatasets.js +2 -2
  25. package/models/operations/listdatasources.js +2 -2
  26. package/models/operations/retrievecontact.js +2 -2
  27. package/models/operations/retrievedatapoint.js +2 -2
  28. package/models/operations/retrievedataset.js +2 -2
  29. package/models/operations/retrievedatasource.js +2 -2
  30. package/models/operations/updatebudget.js +2 -2
  31. package/models/operations/updatecontact.js +2 -2
  32. package/models/operations/updatedatapoint.js +2 -2
  33. package/models/operations/updatedataset.js +2 -2
  34. package/models/operations/updatedatasource.js +2 -2
  35. package/models/operations/updateeval.js +16 -16
  36. package/package.json +1 -1
  37. package/packages/orq-rc/FUNCTIONS.md +9 -19
  38. package/packages/orq-rc/README.md +180 -181
  39. package/packages/orq-rc/docs/sdks/agents/README.md +702 -0
  40. package/packages/orq-rc/docs/sdks/budgets/README.md +5 -5
  41. package/packages/orq-rc/docs/sdks/memorystores/README.md +1172 -0
  42. package/packages/orq-rc/docs/sdks/orq/README.md +81 -0
  43. package/packages/orq-rc/examples/package-lock.json +1 -1
  44. package/packages/orq-rc/examples/postV2AgentsInternal.example.ts +30 -0
  45. package/packages/orq-rc/jsr.json +1 -1
  46. package/packages/orq-rc/package-lock.json +2 -2
  47. package/packages/orq-rc/package.json +1 -1
  48. package/packages/orq-rc/src/funcs/agentsList.ts +167 -0
  49. package/packages/orq-rc/src/funcs/agentsListActions.ts +169 -0
  50. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +175 -0
  51. package/packages/orq-rc/src/funcs/agentsRetrieveAction.ts +173 -0
  52. package/packages/orq-rc/src/funcs/agentsRetrieveTask.ts +179 -0
  53. package/packages/orq-rc/src/funcs/agentsReviewAction.ts +177 -0
  54. package/packages/orq-rc/src/funcs/agentsRun.ts +163 -0
  55. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +187 -0
  56. package/packages/orq-rc/src/funcs/budgetsCreate.ts +1 -1
  57. package/packages/orq-rc/src/funcs/budgetsGet.ts +2 -2
  58. package/packages/orq-rc/src/funcs/budgetsList.ts +2 -2
  59. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +171 -0
  60. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +175 -0
  61. package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +170 -0
  62. package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +168 -0
  63. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +184 -0
  64. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +179 -0
  65. package/packages/orq-rc/src/funcs/memoryStoresList.ts +178 -0
  66. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +181 -0
  67. package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +176 -0
  68. package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +177 -0
  69. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +178 -0
  70. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +173 -0
  71. package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +168 -0
  72. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +179 -0
  73. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +174 -0
  74. package/packages/orq-rc/src/funcs/postV2AgentsInternal.ts +159 -0
  75. package/packages/orq-rc/src/lib/config.ts +3 -3
  76. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  77. package/packages/orq-rc/src/mcp-server/server.ts +49 -1
  78. package/packages/orq-rc/src/mcp-server/tools/agentsList.ts +37 -0
  79. package/packages/orq-rc/src/mcp-server/tools/agentsListActions.ts +35 -0
  80. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.ts +37 -0
  81. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveAction.ts +35 -0
  82. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveTask.ts +37 -0
  83. package/packages/orq-rc/src/mcp-server/tools/agentsReviewAction.ts +37 -0
  84. package/packages/orq-rc/src/mcp-server/tools/agentsRun.ts +37 -0
  85. package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +37 -0
  86. package/packages/orq-rc/src/mcp-server/tools/budgetsCreate.ts +1 -1
  87. package/packages/orq-rc/src/mcp-server/tools/budgetsGet.ts +2 -2
  88. package/packages/orq-rc/src/mcp-server/tools/budgetsList.ts +2 -2
  89. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreate.ts +35 -0
  90. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateDocument.ts +37 -0
  91. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateMemory.ts +37 -0
  92. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDelete.ts +35 -0
  93. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteDocument.ts +40 -0
  94. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteMemory.ts +40 -0
  95. package/packages/orq-rc/src/mcp-server/tools/memoryStoresList.ts +37 -0
  96. package/packages/orq-rc/src/mcp-server/tools/memoryStoresListDocuments.ts +37 -0
  97. package/packages/orq-rc/src/mcp-server/tools/memoryStoresListMemories.ts +37 -0
  98. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieve.ts +37 -0
  99. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveDocument.ts +37 -0
  100. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveMemory.ts +37 -0
  101. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdate.ts +37 -0
  102. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateDocument.ts +37 -0
  103. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateMemory.ts +37 -0
  104. package/packages/orq-rc/src/mcp-server/tools/postV2AgentsInternal.ts +33 -0
  105. package/packages/orq-rc/src/models/errors/getagent.ts +80 -0
  106. package/packages/orq-rc/src/models/errors/getagenttask.ts +80 -0
  107. package/packages/orq-rc/src/models/errors/index.ts +3 -0
  108. package/packages/orq-rc/src/models/errors/streamrunagent.ts +80 -0
  109. package/packages/orq-rc/src/models/operations/createbudget.ts +57 -58
  110. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  111. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  112. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
  113. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  114. package/packages/orq-rc/src/models/operations/createeval.ts +6383 -1075
  115. package/packages/orq-rc/src/models/operations/creatememory.ts +265 -0
  116. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +284 -0
  117. package/packages/orq-rc/src/models/operations/creatememorystore.ts +1956 -0
  118. package/packages/orq-rc/src/models/operations/deletememory.ts +87 -0
  119. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +98 -0
  120. package/packages/orq-rc/src/models/operations/deletememorystore.ts +78 -0
  121. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +36 -27
  122. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +31 -24
  123. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  124. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  125. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  126. package/packages/orq-rc/src/models/operations/getagent.ts +1171 -0
  127. package/packages/orq-rc/src/models/operations/getagenttask.ts +257 -0
  128. package/packages/orq-rc/src/models/operations/getallmemories.ts +315 -0
  129. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +335 -0
  130. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +1241 -0
  131. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -11
  132. package/packages/orq-rc/src/models/operations/getevals.ts +1362 -1166
  133. package/packages/orq-rc/src/models/operations/index.ts +24 -0
  134. package/packages/orq-rc/src/models/operations/listactions.ts +517 -0
  135. package/packages/orq-rc/src/models/operations/listagents.ts +1335 -0
  136. package/packages/orq-rc/src/models/operations/listbudgets.ts +5 -15
  137. package/packages/orq-rc/src/models/operations/listchunks.ts +21 -21
  138. package/packages/orq-rc/src/models/operations/listcontacts.ts +44 -37
  139. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
  140. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  141. package/packages/orq-rc/src/models/operations/listdatasources.ts +29 -22
  142. package/packages/orq-rc/src/models/operations/postv2agentsinternal.ts +103 -0
  143. package/packages/orq-rc/src/models/operations/retrieveaction.ts +419 -0
  144. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  145. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
  146. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  147. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  148. package/packages/orq-rc/src/models/operations/retrievememory.ts +198 -0
  149. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +217 -0
  150. package/packages/orq-rc/src/models/operations/retrievememorystore.ts +1124 -0
  151. package/packages/orq-rc/src/models/operations/reviewaction.ts +258 -0
  152. package/packages/orq-rc/src/models/operations/runagent.ts +3428 -0
  153. package/packages/orq-rc/src/models/operations/streamrunagent.ts +3361 -0
  154. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -11
  155. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  156. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
  157. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  158. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  159. package/packages/orq-rc/src/models/operations/updateeval.ts +6627 -1224
  160. package/packages/orq-rc/src/models/operations/updatememory.ts +274 -0
  161. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +293 -0
  162. package/packages/orq-rc/src/models/operations/updatememorystore.ts +1348 -0
  163. package/packages/orq-rc/src/models/operations/updateprompt.ts +64 -19
  164. package/packages/orq-rc/src/sdk/agents.ts +148 -0
  165. package/packages/orq-rc/src/sdk/budgets.ts +5 -5
  166. package/packages/orq-rc/src/sdk/memorystores.ts +286 -0
  167. package/packages/orq-rc/src/sdk/sdk.ts +27 -1
  168. package/src/lib/config.ts +3 -3
  169. package/src/mcp-server/mcp-server.ts +1 -1
  170. package/src/mcp-server/server.ts +1 -1
  171. package/src/models/operations/createbudget.ts +2 -2
  172. package/src/models/operations/createcontact.ts +2 -2
  173. package/src/models/operations/createdataset.ts +2 -2
  174. package/src/models/operations/createdatasetitem.ts +2 -2
  175. package/src/models/operations/createdatasource.ts +2 -2
  176. package/src/models/operations/createeval.ts +16 -16
  177. package/src/models/operations/fileget.ts +2 -2
  178. package/src/models/operations/filelist.ts +2 -2
  179. package/src/models/operations/fileupload.ts +2 -2
  180. package/src/models/operations/getbudget.ts +2 -2
  181. package/src/models/operations/getevals.ts +28 -28
  182. package/src/models/operations/listbudgets.ts +2 -2
  183. package/src/models/operations/listcontacts.ts +2 -2
  184. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  185. package/src/models/operations/listdatasets.ts +2 -2
  186. package/src/models/operations/listdatasources.ts +2 -2
  187. package/src/models/operations/retrievecontact.ts +2 -2
  188. package/src/models/operations/retrievedatapoint.ts +2 -2
  189. package/src/models/operations/retrievedataset.ts +2 -2
  190. package/src/models/operations/retrievedatasource.ts +2 -2
  191. package/src/models/operations/updatebudget.ts +2 -2
  192. package/src/models/operations/updatecontact.ts +2 -2
  193. package/src/models/operations/updatedatapoint.ts +2 -2
  194. package/src/models/operations/updatedataset.ts +2 -2
  195. package/src/models/operations/updatedatasource.ts +2 -2
  196. package/src/models/operations/updateeval.ts +16 -16
  197. 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-05T20:13:44.106Z",
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-05T20:13:44.106Z"))
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 QueryParamStatus = Array<string> | string;
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 QueryParamStatus$inboundSchema: z.ZodType<
120
- QueryParamStatus,
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 QueryParamStatus$Outbound = Array<string> | string;
126
+ export type ListChunksQueryParamStatus$Outbound = Array<string> | string;
127
127
 
128
128
  /** @internal */
129
- export const QueryParamStatus$outboundSchema: z.ZodType<
130
- QueryParamStatus$Outbound,
129
+ export const ListChunksQueryParamStatus$outboundSchema: z.ZodType<
130
+ ListChunksQueryParamStatus$Outbound,
131
131
  z.ZodTypeDef,
132
- QueryParamStatus
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 QueryParamStatus$ {
140
- /** @deprecated use `QueryParamStatus$inboundSchema` instead. */
141
- export const inboundSchema = QueryParamStatus$inboundSchema;
142
- /** @deprecated use `QueryParamStatus$outboundSchema` instead. */
143
- export const outboundSchema = QueryParamStatus$outboundSchema;
144
- /** @deprecated use `QueryParamStatus$Outbound` instead. */
145
- export type Outbound = QueryParamStatus$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 queryParamStatusToJSON(
149
- queryParamStatus: QueryParamStatus,
148
+ export function listChunksQueryParamStatusToJSON(
149
+ listChunksQueryParamStatus: ListChunksQueryParamStatus,
150
150
  ): string {
151
151
  return JSON.stringify(
152
- QueryParamStatus$outboundSchema.parse(queryParamStatus),
152
+ ListChunksQueryParamStatus$outboundSchema.parse(listChunksQueryParamStatus),
153
153
  );
154
154
  }
155
155
 
156
- export function queryParamStatusFromJSON(
156
+ export function listChunksQueryParamStatusFromJSON(
157
157
  jsonString: string,
158
- ): SafeParseResult<QueryParamStatus, SDKValidationError> {
158
+ ): SafeParseResult<ListChunksQueryParamStatus, SDKValidationError> {
159
159
  return safeParse(
160
160
  jsonString,
161
- (x) => QueryParamStatus$inboundSchema.parse(JSON.parse(x)),
162
- `Failed to parse 'QueryParamStatus' from JSON`,
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 Metrics = {
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: 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 Metrics$inboundSchema: z.ZodType<Metrics, z.ZodTypeDef, unknown> =
267
- z.object({
268
- total_cost: z.number(),
269
- total_tokens: z.number(),
270
- total_requests: z.number(),
271
- error_rate: z.number(),
272
- }).transform((v) => {
273
- return remap$(v, {
274
- "total_cost": "totalCost",
275
- "total_tokens": "totalTokens",
276
- "total_requests": "totalRequests",
277
- "error_rate": "errorRate",
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 Metrics$Outbound = {
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 Metrics$outboundSchema: z.ZodType<
291
- Metrics$Outbound,
293
+ export const ListContactsMetrics$outboundSchema: z.ZodType<
294
+ ListContactsMetrics$Outbound,
292
295
  z.ZodTypeDef,
293
- Metrics
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 Metrics$ {
313
- /** @deprecated use `Metrics$inboundSchema` instead. */
314
- export const inboundSchema = Metrics$inboundSchema;
315
- /** @deprecated use `Metrics$outboundSchema` instead. */
316
- export const outboundSchema = Metrics$outboundSchema;
317
- /** @deprecated use `Metrics$Outbound` instead. */
318
- export type Outbound = Metrics$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 metricsToJSON(metrics: Metrics): string {
322
- return JSON.stringify(Metrics$outboundSchema.parse(metrics));
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 metricsFromJSON(
332
+ export function listContactsMetricsFromJSON(
326
333
  jsonString: string,
327
- ): SafeParseResult<Metrics, SDKValidationError> {
334
+ ): SafeParseResult<ListContactsMetrics, SDKValidationError> {
328
335
  return safeParse(
329
336
  jsonString,
330
- (x) => Metrics$inboundSchema.parse(JSON.parse(x)),
331
- `Failed to parse 'Metrics' from JSON`,
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-05T20:13:44.106Z",
355
+ "2025-09-09T09:35:11.330Z",
349
356
  ).transform(v => new Date(v)),
350
- metrics: z.lazy(() => Metrics$inboundSchema),
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: Metrics$Outbound;
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-05T20:13:44.106Z"))
392
+ updated: z.date().default(() => new Date("2025-09-09T09:35:11.330Z"))
386
393
  .transform(v => v.toISOString()),
387
- metrics: z.lazy(() => Metrics$outboundSchema),
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-05T20:13:44.106Z",
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-05T20:13:44.106Z"))
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-05T20:13:44.106Z",
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-05T20:13:44.106Z"))
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 Status = Array<string> | string;
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 Status$inboundSchema: z.ZodType<Status, z.ZodTypeDef, unknown> = z
113
- .union([z.array(z.string()), z.string()]);
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 Status$Outbound = Array<string> | string;
119
+ export type QueryParamStatus$Outbound = Array<string> | string;
117
120
 
118
121
  /** @internal */
119
- export const Status$outboundSchema: z.ZodType<
120
- Status$Outbound,
122
+ export const QueryParamStatus$outboundSchema: z.ZodType<
123
+ QueryParamStatus$Outbound,
121
124
  z.ZodTypeDef,
122
- Status
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 Status$ {
130
- /** @deprecated use `Status$inboundSchema` instead. */
131
- export const inboundSchema = Status$inboundSchema;
132
- /** @deprecated use `Status$outboundSchema` instead. */
133
- export const outboundSchema = Status$outboundSchema;
134
- /** @deprecated use `Status$Outbound` instead. */
135
- export type Outbound = Status$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 statusToJSON(status: Status): string {
139
- return JSON.stringify(Status$outboundSchema.parse(status));
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 statusFromJSON(
149
+ export function queryParamStatusFromJSON(
143
150
  jsonString: string,
144
- ): SafeParseResult<Status, SDKValidationError> {
151
+ ): SafeParseResult<QueryParamStatus, SDKValidationError> {
145
152
  return safeParse(
146
153
  jsonString,
147
- (x) => Status$inboundSchema.parse(JSON.parse(x)),
148
- `Failed to parse 'Status' from JSON`,
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("01K4DR766K2JSKFBJVSZ2YTZGC"),
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("01K4DR766K2JSKFBJVSZ2YTZGC"),
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
+ }