@orq-ai/node 4.9.10 → 4.9.12

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 (188) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +2 -2
  3. package/lib/config.js +2 -2
  4. package/models/components/reasoningpart.js +1 -1
  5. package/models/operations/createcontact.js +1 -1
  6. package/models/operations/createdataset.js +1 -1
  7. package/models/operations/createdatasetitem.js +4 -4
  8. package/models/operations/createdatasource.js +1 -1
  9. package/models/operations/createeval.js +16 -16
  10. package/models/operations/createidentity.js +1 -1
  11. package/models/operations/createtool.js +6 -6
  12. package/models/operations/getalltools.js +6 -6
  13. package/models/operations/getevals.js +16 -16
  14. package/models/operations/getv2humanevalsets.js +2 -2
  15. package/models/operations/getv2humanevalsetsid.js +2 -2
  16. package/models/operations/listdatasetdatapoints.js +4 -4
  17. package/models/operations/listdatasets.js +1 -1
  18. package/models/operations/listdatasources.js +1 -1
  19. package/models/operations/listidentities.js +1 -1
  20. package/models/operations/patchv2humanevalsetsid.js +2 -2
  21. package/models/operations/postv2feedbackevaluation.js +3 -3
  22. package/models/operations/postv2humanevalsets.js +2 -2
  23. package/models/operations/retrievedatapoint.js +4 -4
  24. package/models/operations/retrievedataset.js +1 -1
  25. package/models/operations/retrievedatasource.js +1 -1
  26. package/models/operations/retrieveidentity.js +1 -1
  27. package/models/operations/retrievetool.js +6 -6
  28. package/models/operations/runagent.js +1 -1
  29. package/models/operations/streamrunagent.js +1 -1
  30. package/models/operations/updatedatapoint.js +4 -4
  31. package/models/operations/updatedataset.js +1 -1
  32. package/models/operations/updatedatasource.js +1 -1
  33. package/models/operations/updateeval.js +16 -16
  34. package/models/operations/updateidentity.js +1 -1
  35. package/models/operations/updatetool.js +7 -7
  36. package/package.json +7 -7
  37. package/packages/orq-rc/src/funcs/{reportingQuery.ts → contactsCreate.ts} +13 -13
  38. package/packages/orq-rc/src/funcs/identitiesCreate.ts +15 -10
  39. package/packages/orq-rc/src/funcs/identitiesDelete.ts +16 -7
  40. package/packages/orq-rc/src/funcs/identitiesList.ts +5 -6
  41. package/packages/orq-rc/src/funcs/identitiesRetrieve.ts +18 -6
  42. package/packages/orq-rc/src/funcs/identitiesUpdate.ts +15 -9
  43. package/packages/orq-rc/src/funcs/projectsCreate.ts +1 -1
  44. package/packages/orq-rc/src/funcs/projectsDelete.ts +0 -3
  45. package/packages/orq-rc/src/funcs/projectsList.ts +1 -1
  46. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +163 -0
  47. package/packages/orq-rc/src/funcs/skillsCreate.ts +1 -1
  48. package/packages/orq-rc/src/funcs/skillsDelete.ts +0 -3
  49. package/packages/orq-rc/src/funcs/skillsGet.ts +1 -1
  50. package/packages/orq-rc/src/funcs/skillsList.ts +1 -1
  51. package/packages/orq-rc/src/funcs/skillsUpdate.ts +1 -1
  52. package/packages/orq-rc/src/lib/config.ts +2 -2
  53. package/packages/orq-rc/src/models/components/createprojectrequest.ts +0 -6
  54. package/packages/orq-rc/src/models/components/createprojectresponse.ts +0 -3
  55. package/packages/orq-rc/src/models/components/createskillrequest.ts +0 -18
  56. package/packages/orq-rc/src/models/components/createskillresponse.ts +0 -3
  57. package/packages/orq-rc/src/models/components/file.ts +3 -0
  58. package/packages/orq-rc/src/models/components/getprojectresponse.ts +0 -3
  59. package/packages/orq-rc/src/models/components/getskillresponse.ts +0 -3
  60. package/packages/orq-rc/src/models/components/index.ts +0 -15
  61. package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +10 -17
  62. package/packages/orq-rc/src/models/components/listprojectsresponse.ts +0 -12
  63. package/packages/orq-rc/src/models/components/listskillsresponse.ts +0 -12
  64. package/packages/orq-rc/src/models/components/modelref.ts +0 -6
  65. package/packages/orq-rc/src/models/components/project.ts +3 -42
  66. package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
  67. package/packages/orq-rc/src/models/components/skill.ts +3 -37
  68. package/packages/orq-rc/src/models/components/updateprojectrequest.ts +0 -12
  69. package/packages/orq-rc/src/models/components/updateprojectresponse.ts +0 -3
  70. package/packages/orq-rc/src/models/components/updateskillrequest.ts +0 -21
  71. package/packages/orq-rc/src/models/components/updateskillresponse.ts +0 -3
  72. package/packages/orq-rc/src/models/errors/deleteidentity.ts +62 -0
  73. package/packages/orq-rc/src/models/errors/index.ts +3 -0
  74. package/packages/orq-rc/src/models/errors/retrieveidentity.ts +118 -0
  75. package/packages/orq-rc/src/models/errors/updateidentity.ts +54 -0
  76. package/packages/orq-rc/src/models/operations/createagentrequest.ts +3 -3
  77. package/packages/orq-rc/src/models/operations/createannotation.ts +11 -7
  78. package/packages/orq-rc/src/models/operations/createcontact.ts +156 -0
  79. package/packages/orq-rc/src/models/operations/createdataset.ts +4 -4
  80. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +4 -4
  81. package/packages/orq-rc/src/models/operations/createdatasource.ts +1 -1
  82. package/packages/orq-rc/src/models/operations/createeval.ts +31 -45
  83. package/packages/orq-rc/src/models/operations/createidentity.ts +162 -0
  84. package/packages/orq-rc/src/models/operations/createknowledge.ts +9 -9
  85. package/packages/orq-rc/src/models/operations/creatememorystore.ts +3 -3
  86. package/packages/orq-rc/src/models/operations/createprompt.ts +3 -3
  87. package/packages/orq-rc/src/models/operations/createtool.ts +36 -36
  88. package/packages/orq-rc/src/models/operations/deleteidentity.ts +3 -0
  89. package/packages/orq-rc/src/models/operations/getalltools.ts +21 -21
  90. package/packages/orq-rc/src/models/operations/getevals.ts +16 -22
  91. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +6 -6
  92. package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
  93. package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
  94. package/packages/orq-rc/src/models/operations/index.ts +3 -0
  95. package/packages/orq-rc/src/models/operations/invokeeval.ts +80 -83
  96. package/packages/orq-rc/src/models/operations/listagents.ts +3 -3
  97. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +4 -4
  98. package/packages/orq-rc/src/models/operations/listdatasets.ts +1 -1
  99. package/packages/orq-rc/src/models/operations/listdatasources.ts +1 -1
  100. package/packages/orq-rc/src/models/operations/listidentities.ts +230 -9
  101. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +6 -6
  102. package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  103. package/packages/orq-rc/src/models/operations/postv2agentsa2a.ts +17 -14
  104. package/packages/orq-rc/src/models/operations/postv2feedback.ts +27 -34
  105. package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +3 -3
  106. package/packages/orq-rc/src/models/operations/postv2feedbackremove.ts +17 -14
  107. package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
  108. package/packages/orq-rc/src/models/operations/projectdelete.ts +0 -3
  109. package/packages/orq-rc/src/models/operations/projectget.ts +0 -3
  110. package/packages/orq-rc/src/models/operations/projectlist.ts +0 -15
  111. package/packages/orq-rc/src/models/operations/projectupdate.ts +0 -3
  112. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +108 -0
  113. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +3 -3
  114. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +4 -4
  115. package/packages/orq-rc/src/models/operations/retrievedataset.ts +1 -1
  116. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +1 -1
  117. package/packages/orq-rc/src/models/operations/retrieveidentity.ts +138 -3
  118. package/packages/orq-rc/src/models/operations/retrievetool.ts +21 -21
  119. package/packages/orq-rc/src/models/operations/runagent.ts +4 -4
  120. package/packages/orq-rc/src/models/operations/skilldelete.ts +0 -3
  121. package/packages/orq-rc/src/models/operations/skilllist.ts +0 -12
  122. package/packages/orq-rc/src/models/operations/skillupdate.ts +0 -3
  123. package/packages/orq-rc/src/models/operations/streamrunagent.ts +4 -4
  124. package/packages/orq-rc/src/models/operations/updateagent.ts +6 -6
  125. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +4 -4
  126. package/packages/orq-rc/src/models/operations/updatedataset.ts +4 -4
  127. package/packages/orq-rc/src/models/operations/updatedatasource.ts +1 -1
  128. package/packages/orq-rc/src/models/operations/updateeval.ts +23 -30
  129. package/packages/orq-rc/src/models/operations/updateidentity.ts +154 -5
  130. package/packages/orq-rc/src/models/operations/updateknowledge.ts +12 -12
  131. package/packages/orq-rc/src/models/operations/updateprompt.ts +3 -3
  132. package/packages/orq-rc/src/models/operations/updatetool.ts +37 -37
  133. package/packages/orq-rc/src/sdk/contacts.ts +27 -0
  134. package/packages/orq-rc/src/sdk/feedback.ts +8 -8
  135. package/packages/orq-rc/src/sdk/identities.ts +17 -18
  136. package/packages/orq-rc/src/sdk/projects.ts +2 -5
  137. package/packages/orq-rc/src/sdk/remoteconfigs.ts +24 -0
  138. package/packages/orq-rc/src/sdk/sdk.ts +22 -16
  139. package/packages/orq-rc/src/sdk/skills.ts +4 -7
  140. package/src/lib/config.ts +2 -2
  141. package/src/models/components/reasoningpart.ts +1 -1
  142. package/src/models/operations/createcontact.ts +1 -1
  143. package/src/models/operations/createdataset.ts +1 -1
  144. package/src/models/operations/createdatasetitem.ts +4 -4
  145. package/src/models/operations/createdatasource.ts +1 -1
  146. package/src/models/operations/createeval.ts +16 -16
  147. package/src/models/operations/createidentity.ts +1 -1
  148. package/src/models/operations/createtool.ts +6 -6
  149. package/src/models/operations/getalltools.ts +6 -6
  150. package/src/models/operations/getevals.ts +16 -16
  151. package/src/models/operations/getv2humanevalsets.ts +2 -2
  152. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  153. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  154. package/src/models/operations/listdatasets.ts +1 -1
  155. package/src/models/operations/listdatasources.ts +1 -1
  156. package/src/models/operations/listidentities.ts +1 -1
  157. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  158. package/src/models/operations/postv2feedbackevaluation.ts +3 -3
  159. package/src/models/operations/postv2humanevalsets.ts +2 -2
  160. package/src/models/operations/retrievedatapoint.ts +4 -4
  161. package/src/models/operations/retrievedataset.ts +1 -1
  162. package/src/models/operations/retrievedatasource.ts +1 -1
  163. package/src/models/operations/retrieveidentity.ts +1 -1
  164. package/src/models/operations/retrievetool.ts +6 -6
  165. package/src/models/operations/runagent.ts +1 -1
  166. package/src/models/operations/streamrunagent.ts +1 -1
  167. package/src/models/operations/updatedatapoint.ts +4 -4
  168. package/src/models/operations/updatedataset.ts +1 -1
  169. package/src/models/operations/updatedatasource.ts +1 -1
  170. package/src/models/operations/updateeval.ts +16 -16
  171. package/src/models/operations/updateidentity.ts +1 -1
  172. package/src/models/operations/updatetool.ts +7 -7
  173. package/packages/orq-rc/src/models/components/createidentityrequest.ts +0 -76
  174. package/packages/orq-rc/src/models/components/createidentityresponse.ts +0 -32
  175. package/packages/orq-rc/src/models/components/datapoint.ts +0 -60
  176. package/packages/orq-rc/src/models/components/deleteidentityresponse.ts +0 -27
  177. package/packages/orq-rc/src/models/components/filter.ts +0 -137
  178. package/packages/orq-rc/src/models/components/identity.ts +0 -83
  179. package/packages/orq-rc/src/models/components/identitymetrics.ts +0 -45
  180. package/packages/orq-rc/src/models/components/listidentitiesresponse.ts +0 -41
  181. package/packages/orq-rc/src/models/components/queryreportrequest.ts +0 -237
  182. package/packages/orq-rc/src/models/components/queryreportresponse.ts +0 -96
  183. package/packages/orq-rc/src/models/components/responsemeta.ts +0 -103
  184. package/packages/orq-rc/src/models/components/retrieveidentityresponse.ts +0 -32
  185. package/packages/orq-rc/src/models/components/totals.ts +0 -34
  186. package/packages/orq-rc/src/models/components/updateidentityrequest.ts +0 -75
  187. package/packages/orq-rc/src/models/components/updateidentityresponse.ts +0 -32
  188. package/packages/orq-rc/src/sdk/reporting.ts +0 -27
@@ -6,9 +6,6 @@ import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
 
8
8
  export type ProjectDeleteRequest = {
9
- /**
10
- * Project ID to delete.
11
- */
12
9
  projectId: string;
13
10
  };
14
11
 
@@ -6,9 +6,6 @@ import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
 
8
8
  export type ProjectGetRequest = {
9
- /**
10
- * Project ID to retrieve.
11
- */
12
9
  projectId: string;
13
10
  };
14
11
 
@@ -6,23 +6,8 @@ import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
 
8
8
  export type ProjectListRequest = {
9
- /**
10
- * Page size, 1-200. Unset uses the server default.
11
- */
12
9
  limit?: number | undefined;
13
- /**
14
- * Cursor for forward pagination. Set to the `project_id` of the last
15
- *
16
- * @remarks
17
- * item from the previous page.
18
- */
19
10
  startingAfter?: string | undefined;
20
- /**
21
- * Cursor for backward pagination. Set to the `project_id` of the first
22
- *
23
- * @remarks
24
- * item from the previous page.
25
- */
26
11
  endingBefore?: string | undefined;
27
12
  };
28
13
 
@@ -7,9 +7,6 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import * as components from "../components/index.js";
8
8
 
9
9
  export type ProjectUpdateRequest = {
10
- /**
11
- * Project ID to update.
12
- */
13
10
  projectId: string;
14
11
  updateProjectRequest: components.UpdateProjectRequest;
15
12
  };
@@ -0,0 +1,108 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type RemoteConfigsGetConfigRequestBody = {
12
+ /**
13
+ * Remote configuration key
14
+ */
15
+ key: string;
16
+ /**
17
+ * Key-value pairs matching your data model, applied to each prompt key.
18
+ */
19
+ context?: { [k: string]: any } | undefined;
20
+ /**
21
+ * Key-value pairs to attach to the log generated by this request.
22
+ */
23
+ metadata?: { [k: string]: any } | undefined;
24
+ };
25
+
26
+ /**
27
+ * The return type of the rule
28
+ */
29
+ export const RemoteConfigsGetConfigType = {
30
+ Boolean: "boolean",
31
+ String: "string",
32
+ Integer: "integer",
33
+ Decimal: "decimal",
34
+ List: "list",
35
+ Json: "json",
36
+ Deployment: "deployment",
37
+ } as const;
38
+ /**
39
+ * The return type of the rule
40
+ */
41
+ export type RemoteConfigsGetConfigType = ClosedEnum<
42
+ typeof RemoteConfigsGetConfigType
43
+ >;
44
+
45
+ /**
46
+ * An individual remote config
47
+ */
48
+ export type RemoteConfigsGetConfigResponseBody = {
49
+ /**
50
+ * The return type of the rule
51
+ */
52
+ type: RemoteConfigsGetConfigType;
53
+ value?: any | undefined;
54
+ };
55
+
56
+ /** @internal */
57
+ export type RemoteConfigsGetConfigRequestBody$Outbound = {
58
+ key: string;
59
+ context?: { [k: string]: any } | undefined;
60
+ metadata?: { [k: string]: any } | undefined;
61
+ };
62
+
63
+ /** @internal */
64
+ export const RemoteConfigsGetConfigRequestBody$outboundSchema: z.ZodType<
65
+ RemoteConfigsGetConfigRequestBody$Outbound,
66
+ z.ZodTypeDef,
67
+ RemoteConfigsGetConfigRequestBody
68
+ > = z.object({
69
+ key: z.string(),
70
+ context: z.record(z.any()).optional(),
71
+ metadata: z.record(z.any()).optional(),
72
+ });
73
+
74
+ export function remoteConfigsGetConfigRequestBodyToJSON(
75
+ remoteConfigsGetConfigRequestBody: RemoteConfigsGetConfigRequestBody,
76
+ ): string {
77
+ return JSON.stringify(
78
+ RemoteConfigsGetConfigRequestBody$outboundSchema.parse(
79
+ remoteConfigsGetConfigRequestBody,
80
+ ),
81
+ );
82
+ }
83
+
84
+ /** @internal */
85
+ export const RemoteConfigsGetConfigType$inboundSchema: z.ZodNativeEnum<
86
+ typeof RemoteConfigsGetConfigType
87
+ > = z.nativeEnum(RemoteConfigsGetConfigType);
88
+
89
+ /** @internal */
90
+ export const RemoteConfigsGetConfigResponseBody$inboundSchema: z.ZodType<
91
+ RemoteConfigsGetConfigResponseBody,
92
+ z.ZodTypeDef,
93
+ unknown
94
+ > = z.object({
95
+ type: RemoteConfigsGetConfigType$inboundSchema,
96
+ value: z.any().optional(),
97
+ });
98
+
99
+ export function remoteConfigsGetConfigResponseBodyFromJSON(
100
+ jsonString: string,
101
+ ): SafeParseResult<RemoteConfigsGetConfigResponseBody, SDKValidationError> {
102
+ return safeParse(
103
+ jsonString,
104
+ (x) =>
105
+ RemoteConfigsGetConfigResponseBody$inboundSchema.parse(JSON.parse(x)),
106
+ `Failed to parse 'RemoteConfigsGetConfigResponseBody' from JSON`,
107
+ );
108
+ }
@@ -1119,13 +1119,13 @@ export type RetrieveAgentRequestResponseBody = {
1119
1119
  */
1120
1120
  version?: string | undefined;
1121
1121
  /**
1122
- * Entity storage path.
1122
+ * Entity storage path in the format: `project/folder/subfolder/...`
1123
1123
  *
1124
1124
  * @remarks
1125
1125
  *
1126
- * With workspace-level API keys, use the format `project/folder/subfolder/...`. The first element identifies the project, followed by nested folders (auto-created as needed). Example: `Default/agents`.
1126
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
1127
1127
  *
1128
- * With project-level API keys, the project is predetermined by the API key, so the path is relative to that project. Example: `agents`. For backward compatibility, a leading project name is ignored when it matches the scoped project.
1128
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
1129
1129
  */
1130
1130
  path: string;
1131
1131
  /**
@@ -1207,7 +1207,7 @@ export const RetrieveDatapointEvaluations3$inboundSchema: z.ZodType<
1207
1207
  .default("orq"),
1208
1208
  reviewed_by_id: z.string(),
1209
1209
  reviewed_at: z.string().datetime({ offset: true }).default(
1210
- "2026-05-19T07:57:49.139Z",
1210
+ "2026-05-19T14:38:26.547Z",
1211
1211
  ).transform(v => new Date(v)),
1212
1212
  type: z.literal("string_array"),
1213
1213
  values: z.array(z.string()),
@@ -1255,7 +1255,7 @@ export const RetrieveDatapointEvaluations2$inboundSchema: z.ZodType<
1255
1255
  ),
1256
1256
  reviewed_by_id: z.string(),
1257
1257
  reviewed_at: z.string().datetime({ offset: true }).default(
1258
- "2026-05-19T07:57:49.138Z",
1258
+ "2026-05-19T14:38:26.546Z",
1259
1259
  ).transform(v => new Date(v)),
1260
1260
  type: z.literal("number"),
1261
1261
  value: z.number(),
@@ -1300,7 +1300,7 @@ export const RetrieveDatapointEvaluations1$inboundSchema: z.ZodType<
1300
1300
  source: RetrieveDatapointEvaluationsSource$inboundSchema.default("orq"),
1301
1301
  reviewed_by_id: z.string(),
1302
1302
  reviewed_at: z.string().datetime({ offset: true }).default(
1303
- "2026-05-19T07:57:49.138Z",
1303
+ "2026-05-19T14:38:26.546Z",
1304
1304
  ).transform(v => new Date(v)),
1305
1305
  type: z.literal("string"),
1306
1306
  value: z.string(),
@@ -1377,7 +1377,7 @@ export const RetrieveDatapointResponseBody$inboundSchema: z.ZodType<
1377
1377
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
1378
1378
  .optional(),
1379
1379
  updated: z.string().datetime({ offset: true }).default(
1380
- "2026-05-19T07:57:33.807Z",
1380
+ "2026-05-19T14:38:12.201Z",
1381
1381
  ).transform(v => new Date(v)),
1382
1382
  }).transform((v) => {
1383
1383
  return remap$(v, {
@@ -126,7 +126,7 @@ export const RetrieveDatasetResponseBody$inboundSchema: z.ZodType<
126
126
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
127
127
  .optional(),
128
128
  updated: z.string().datetime({ offset: true }).default(
129
- "2026-05-19T07:57:33.807Z",
129
+ "2026-05-19T14:38:12.201Z",
130
130
  ).transform(v => new Date(v)),
131
131
  }).transform((v) => {
132
132
  return remap$(v, {
@@ -118,7 +118,7 @@ export const RetrieveDatasourceResponseBody$inboundSchema: z.ZodType<
118
118
  z.ZodTypeDef,
119
119
  unknown
120
120
  > = z.object({
121
- _id: z.string().default("01KRZKVD42ZRKH7921W2ZB3G2P"),
121
+ _id: z.string().default("01KS0ARZ5W6TGQ0RTXT1W4AJ8M"),
122
122
  display_name: z.string(),
123
123
  description: z.string().optional(),
124
124
  status: RetrieveDatasourceStatus$inboundSchema,
@@ -4,16 +4,87 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
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";
7
10
 
8
11
  export type RetrieveIdentityRequest = {
12
+ /**
13
+ * Unique identity id or external id
14
+ */
9
15
  id: string;
10
- includeMetrics?: boolean | undefined;
16
+ /**
17
+ * Include usage metrics of the last 30 days for the identity.
18
+ */
19
+ includeMetrics?: boolean | null | undefined;
20
+ };
21
+
22
+ export type Metrics = {
23
+ /**
24
+ * Total cost in dollars of the last 30 days
25
+ */
26
+ totalCost: number;
27
+ /**
28
+ * Total tokens of the last 30 days
29
+ */
30
+ totalTokens: number;
31
+ /**
32
+ * Total requests of the last 30 days
33
+ */
34
+ totalRequests: number;
35
+ /**
36
+ * Error rate of the last 30 days as a ratio (0–1)
37
+ */
38
+ errorRate: number;
39
+ };
40
+
41
+ /**
42
+ * Identity details
43
+ */
44
+ export type RetrieveIdentityResponseBody = {
45
+ /**
46
+ * Unique ULID (Universally Unique Lexicographically Sortable Identifier) for the contact
47
+ */
48
+ id: string;
49
+ /**
50
+ * Unique string value to identify the contact user in the customer's system. This should be the same ID you use in your system to reference this user.
51
+ */
52
+ externalId: string;
53
+ /**
54
+ * Display name or nickname of the contact user. This is typically shown in user interfaces.
55
+ */
56
+ displayName?: string | null | undefined;
57
+ /**
58
+ * Email address of the contact user
59
+ */
60
+ email?: string | null | undefined;
61
+ /**
62
+ * URL linking to the contact user's avatar image
63
+ */
64
+ avatarUrl?: string | null | undefined;
65
+ /**
66
+ * Array of tags associated with the contact. Useful for organizing and filtering contacts by categories, departments, or custom classifications.
67
+ */
68
+ tags?: Array<string> | undefined;
69
+ /**
70
+ * Additional custom metadata associated with the contact as key-value pairs. Use this to store any extra information specific to your application.
71
+ */
72
+ metadata?: { [k: string]: any } | undefined;
73
+ /**
74
+ * The date and time the resource was created
75
+ */
76
+ created?: Date | undefined;
77
+ /**
78
+ * The date and time the resource was last updated
79
+ */
80
+ updated: Date;
81
+ metrics?: Metrics | null | undefined;
11
82
  };
12
83
 
13
84
  /** @internal */
14
85
  export type RetrieveIdentityRequest$Outbound = {
15
86
  id: string;
16
- include_metrics?: boolean | undefined;
87
+ include_metrics: boolean | null;
17
88
  };
18
89
 
19
90
  /** @internal */
@@ -23,7 +94,7 @@ export const RetrieveIdentityRequest$outboundSchema: z.ZodType<
23
94
  RetrieveIdentityRequest
24
95
  > = z.object({
25
96
  id: z.string(),
26
- includeMetrics: z.boolean().optional(),
97
+ includeMetrics: z.nullable(z.boolean().default(false)),
27
98
  }).transform((v) => {
28
99
  return remap$(v, {
29
100
  includeMetrics: "include_metrics",
@@ -37,3 +108,67 @@ export function retrieveIdentityRequestToJSON(
37
108
  RetrieveIdentityRequest$outboundSchema.parse(retrieveIdentityRequest),
38
109
  );
39
110
  }
111
+
112
+ /** @internal */
113
+ export const Metrics$inboundSchema: z.ZodType<Metrics, z.ZodTypeDef, unknown> =
114
+ z.object({
115
+ total_cost: z.number(),
116
+ total_tokens: z.number(),
117
+ total_requests: z.number(),
118
+ error_rate: z.number(),
119
+ }).transform((v) => {
120
+ return remap$(v, {
121
+ "total_cost": "totalCost",
122
+ "total_tokens": "totalTokens",
123
+ "total_requests": "totalRequests",
124
+ "error_rate": "errorRate",
125
+ });
126
+ });
127
+
128
+ export function metricsFromJSON(
129
+ jsonString: string,
130
+ ): SafeParseResult<Metrics, SDKValidationError> {
131
+ return safeParse(
132
+ jsonString,
133
+ (x) => Metrics$inboundSchema.parse(JSON.parse(x)),
134
+ `Failed to parse 'Metrics' from JSON`,
135
+ );
136
+ }
137
+
138
+ /** @internal */
139
+ export const RetrieveIdentityResponseBody$inboundSchema: z.ZodType<
140
+ RetrieveIdentityResponseBody,
141
+ z.ZodTypeDef,
142
+ unknown
143
+ > = z.object({
144
+ _id: z.string(),
145
+ external_id: z.string(),
146
+ display_name: z.nullable(z.string()).optional(),
147
+ email: z.nullable(z.string()).optional(),
148
+ avatar_url: z.nullable(z.string()).optional(),
149
+ tags: z.array(z.string()).optional(),
150
+ metadata: z.record(z.any()).optional(),
151
+ created: z.string().datetime({ offset: true }).transform(v => new Date(v))
152
+ .optional(),
153
+ updated: z.string().datetime({ offset: true }).default(
154
+ "2026-05-19T14:38:12.201Z",
155
+ ).transform(v => new Date(v)),
156
+ metrics: z.nullable(z.lazy(() => Metrics$inboundSchema)).optional(),
157
+ }).transform((v) => {
158
+ return remap$(v, {
159
+ "_id": "id",
160
+ "external_id": "externalId",
161
+ "display_name": "displayName",
162
+ "avatar_url": "avatarUrl",
163
+ });
164
+ });
165
+
166
+ export function retrieveIdentityResponseBodyFromJSON(
167
+ jsonString: string,
168
+ ): SafeParseResult<RetrieveIdentityResponseBody, SDKValidationError> {
169
+ return safeParse(
170
+ jsonString,
171
+ (x) => RetrieveIdentityResponseBody$inboundSchema.parse(JSON.parse(x)),
172
+ `Failed to parse 'RetrieveIdentityResponseBody' from JSON`,
173
+ );
174
+ }
@@ -91,13 +91,13 @@ export type RetrieveToolResponseBodyCodeTool = {
91
91
  export type RetrieveToolResponseBodyCodeExecutionTool = {
92
92
  id: string;
93
93
  /**
94
- * Entity storage path.
94
+ * Entity storage path in the format: `project/folder/subfolder/...`
95
95
  *
96
96
  * @remarks
97
97
  *
98
- * With workspace-level API keys, use the format `project/folder/subfolder/...`. The first element identifies the project, followed by nested folders (auto-created as needed). Example: `Default/agents`.
98
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
99
99
  *
100
- * With project-level API keys, the project is predetermined by the API key, so the path is relative to that project. Example: `agents`. For backward compatibility, a leading project name is ignored when it matches the scoped project.
100
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
101
101
  */
102
102
  path: string;
103
103
  /**
@@ -217,13 +217,13 @@ export type RetrieveToolResponseBodyMcp = {
217
217
  export type RetrieveToolResponseBodyMCPTool = {
218
218
  id: string;
219
219
  /**
220
- * Entity storage path.
220
+ * Entity storage path in the format: `project/folder/subfolder/...`
221
221
  *
222
222
  * @remarks
223
223
  *
224
- * With workspace-level API keys, use the format `project/folder/subfolder/...`. The first element identifies the project, followed by nested folders (auto-created as needed). Example: `Default/agents`.
224
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
225
225
  *
226
- * With project-level API keys, the project is predetermined by the API key, so the path is relative to that project. Example: `agents`. For backward compatibility, a leading project name is ignored when it matches the scoped project.
226
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
227
227
  */
228
228
  path: string;
229
229
  /**
@@ -378,13 +378,13 @@ export type RetrieveToolResponseBodyHttp = {
378
378
  export type RetrieveToolResponseBodyHTTPTool = {
379
379
  id: string;
380
380
  /**
381
- * Entity storage path.
381
+ * Entity storage path in the format: `project/folder/subfolder/...`
382
382
  *
383
383
  * @remarks
384
384
  *
385
- * With workspace-level API keys, use the format `project/folder/subfolder/...`. The first element identifies the project, followed by nested folders (auto-created as needed). Example: `Default/agents`.
385
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
386
386
  *
387
- * With project-level API keys, the project is predetermined by the API key, so the path is relative to that project. Example: `agents`. For backward compatibility, a leading project name is ignored when it matches the scoped project.
387
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
388
388
  */
389
389
  path: string;
390
390
  /**
@@ -479,13 +479,13 @@ export type RetrieveToolResponseBodyJsonSchema = {
479
479
  export type RetrieveToolResponseBodyJSONSchemaTool = {
480
480
  id: string;
481
481
  /**
482
- * Entity storage path.
482
+ * Entity storage path in the format: `project/folder/subfolder/...`
483
483
  *
484
484
  * @remarks
485
485
  *
486
- * With workspace-level API keys, use the format `project/folder/subfolder/...`. The first element identifies the project, followed by nested folders (auto-created as needed). Example: `Default/agents`.
486
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
487
487
  *
488
- * With project-level API keys, the project is predetermined by the API key, so the path is relative to that project. Example: `agents`. For backward compatibility, a leading project name is ignored when it matches the scoped project.
488
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
489
489
  */
490
490
  path: string;
491
491
  /**
@@ -594,13 +594,13 @@ export type RetrieveToolResponseBodyFunction = {
594
594
  export type RetrieveToolResponseBodyFunctionTool = {
595
595
  id: string;
596
596
  /**
597
- * Entity storage path.
597
+ * Entity storage path in the format: `project/folder/subfolder/...`
598
598
  *
599
599
  * @remarks
600
600
  *
601
- * With workspace-level API keys, use the format `project/folder/subfolder/...`. The first element identifies the project, followed by nested folders (auto-created as needed). Example: `Default/agents`.
601
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
602
602
  *
603
- * With project-level API keys, the project is predetermined by the API key, so the path is relative to that project. Example: `agents`. For backward compatibility, a leading project name is ignored when it matches the scoped project.
603
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
604
604
  */
605
605
  path: string;
606
606
  /**
@@ -753,7 +753,7 @@ export const RetrieveToolResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
753
753
  z.ZodTypeDef,
754
754
  unknown
755
755
  > = z.object({
756
- _id: z.string().default("tool_01KRZKVCZSFYRZVG158SSKHXPF"),
756
+ _id: z.string().default("tool_01KS0ARZ3FAYNC84HMYHJS40JA"),
757
757
  path: z.string(),
758
758
  key: z.string(),
759
759
  display_name: z.string().optional(),
@@ -859,7 +859,7 @@ export const RetrieveToolResponseBodyTools$inboundSchema: z.ZodType<
859
859
  z.ZodTypeDef,
860
860
  unknown
861
861
  > = z.object({
862
- id: z.string().default("01KRZKVCZSKGD6AVA8RR6YQG9P"),
862
+ id: z.string().default("01KS0ARZ3F66N2VD0V7ARH9XQF"),
863
863
  name: z.string(),
864
864
  description: z.string().optional(),
865
865
  schema: z.lazy(() => RetrieveToolResponseBodyToolsSchema$inboundSchema),
@@ -917,7 +917,7 @@ export const RetrieveToolResponseBodyMCPTool$inboundSchema: z.ZodType<
917
917
  z.ZodTypeDef,
918
918
  unknown
919
919
  > = z.object({
920
- _id: z.string().default("tool_01KRZKVCZR5WT58E73MV7XRR24"),
920
+ _id: z.string().default("tool_01KS0ARZ3E4A73DJ3GP7XCZ46Q"),
921
921
  path: z.string(),
922
922
  key: z.string(),
923
923
  display_name: z.string().optional(),
@@ -1108,7 +1108,7 @@ export const RetrieveToolResponseBodyHTTPTool$inboundSchema: z.ZodType<
1108
1108
  z.ZodTypeDef,
1109
1109
  unknown
1110
1110
  > = z.object({
1111
- _id: z.string().default("tool_01KRZKVCZPZDBYWH1H7SE02BMS"),
1111
+ _id: z.string().default("tool_01KS0ARZ3DE79XDQHNXC1B3BGQ"),
1112
1112
  path: z.string(),
1113
1113
  key: z.string(),
1114
1114
  display_name: z.string().optional(),
@@ -1204,7 +1204,7 @@ export const RetrieveToolResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
1204
1204
  z.ZodTypeDef,
1205
1205
  unknown
1206
1206
  > = z.object({
1207
- _id: z.string().default("tool_01KRZKVCZM8GWJPJWQXD1FKK9N"),
1207
+ _id: z.string().default("tool_01KS0ARZ3C5JQ4AAXKC57BN38N"),
1208
1208
  path: z.string(),
1209
1209
  key: z.string(),
1210
1210
  display_name: z.string().optional(),
@@ -1310,7 +1310,7 @@ export const RetrieveToolResponseBodyFunctionTool$inboundSchema: z.ZodType<
1310
1310
  z.ZodTypeDef,
1311
1311
  unknown
1312
1312
  > = z.object({
1313
- _id: z.string().default("tool_01KRZKVCZKRV6WX8S9HCMB092P"),
1313
+ _id: z.string().default("tool_01KS0ARZ3BE24XGJPD6HJ2NA08"),
1314
1314
  path: z.string(),
1315
1315
  key: z.string(),
1316
1316
  display_name: z.string().optional(),
@@ -1710,13 +1710,13 @@ export type RunAgentRequestBody = {
1710
1710
  */
1711
1711
  memory?: RunAgentMemory | undefined;
1712
1712
  /**
1713
- * Entity storage path.
1713
+ * Entity storage path in the format: `project/folder/subfolder/...`
1714
1714
  *
1715
1715
  * @remarks
1716
1716
  *
1717
- * With workspace-level API keys, use the format `project/folder/subfolder/...`. The first element identifies the project, followed by nested folders (auto-created as needed). Example: `Default/agents`.
1717
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
1718
1718
  *
1719
- * With project-level API keys, the project is predetermined by the API key, so the path is relative to that project. Example: `agents`. For backward compatibility, a leading project name is ignored when it matches the scoped project.
1719
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
1720
1720
  */
1721
1721
  path: string;
1722
1722
  /**
@@ -3628,7 +3628,7 @@ export const Tools$outboundSchema: z.ZodType<
3628
3628
  z.ZodTypeDef,
3629
3629
  Tools
3630
3630
  > = z.object({
3631
- id: z.string().default("01KRZKVCJQ6SF06EPZFCHKHM89"),
3631
+ id: z.string().default("01KS0ARYSE4NACBKD8T5YJ3TJ7"),
3632
3632
  name: z.string(),
3633
3633
  description: z.string().optional(),
3634
3634
  schema: z.lazy(() => AgentToolInputRunSchema$outboundSchema),
@@ -6,9 +6,6 @@ import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
 
8
8
  export type SkillDeleteRequest = {
9
- /**
10
- * Skill ID to delete.
11
- */
12
9
  skillId: string;
13
10
  };
14
11
 
@@ -13,19 +13,7 @@ export type SkillListRequest = {
13
13
  * (or anything outside the range) is rejected by buf.validate.
14
14
  */
15
15
  limit?: number | undefined;
16
- /**
17
- * Cursor for forward pagination. Set to the `skill_id` of the last
18
- *
19
- * @remarks
20
- * item from the previous page.
21
- */
22
16
  startingAfter?: string | undefined;
23
- /**
24
- * Cursor for backward pagination. Set to the `skill_id` of the first
25
- *
26
- * @remarks
27
- * item from the previous page.
28
- */
29
17
  endingBefore?: string | undefined;
30
18
  };
31
19
 
@@ -7,9 +7,6 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import * as components from "../components/index.js";
8
8
 
9
9
  export type SkillUpdateRequest = {
10
- /**
11
- * Skill ID to update.
12
- */
13
10
  skillId: string;
14
11
  updateSkillRequest: components.UpdateSkillRequest;
15
12
  };
@@ -1747,13 +1747,13 @@ export type StreamRunAgentRequestBody = {
1747
1747
  */
1748
1748
  memory?: StreamRunAgentMemory | undefined;
1749
1749
  /**
1750
- * Entity storage path.
1750
+ * Entity storage path in the format: `project/folder/subfolder/...`
1751
1751
  *
1752
1752
  * @remarks
1753
1753
  *
1754
- * With workspace-level API keys, use the format `project/folder/subfolder/...`. The first element identifies the project, followed by nested folders (auto-created as needed). Example: `Default/agents`.
1754
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
1755
1755
  *
1756
- * With project-level API keys, the project is predetermined by the API key, so the path is relative to that project. Example: `agents`. For backward compatibility, a leading project name is ignored when it matches the scoped project.
1756
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
1757
1757
  */
1758
1758
  path: string;
1759
1759
  /**
@@ -3675,7 +3675,7 @@ export const AgentToolInputRunTools$outboundSchema: z.ZodType<
3675
3675
  z.ZodTypeDef,
3676
3676
  AgentToolInputRunTools
3677
3677
  > = z.object({
3678
- id: z.string().default("01KRZKVCMQVCZ877PPKCPR1Q4W"),
3678
+ id: z.string().default("01KS0ARYTSBY60SV029MWBS3XC"),
3679
3679
  name: z.string(),
3680
3680
  description: z.string().optional(),
3681
3681
  schema: z.lazy(() =>