@cadenya/cadenya 0.124.0 → 0.126.0

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 (278) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +18 -7
  3. package/client.d.mts +17 -11
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +17 -11
  6. package/client.d.ts.map +1 -1
  7. package/client.js +7 -3
  8. package/client.js.map +1 -1
  9. package/client.mjs +7 -3
  10. package/client.mjs.map +1 -1
  11. package/internal/request-options.d.mts +1 -1
  12. package/internal/request-options.d.ts +1 -1
  13. package/package.json +1 -1
  14. package/resources/agents/agents.d.mts +115 -28
  15. package/resources/agents/agents.d.mts.map +1 -1
  16. package/resources/agents/agents.d.ts +115 -28
  17. package/resources/agents/agents.d.ts.map +1 -1
  18. package/resources/agents/agents.js +93 -13
  19. package/resources/agents/agents.js.map +1 -1
  20. package/resources/agents/agents.mjs +93 -13
  21. package/resources/agents/agents.mjs.map +1 -1
  22. package/resources/agents/feedback.d.mts +13 -2
  23. package/resources/agents/feedback.d.mts.map +1 -1
  24. package/resources/agents/feedback.d.ts +13 -2
  25. package/resources/agents/feedback.d.ts.map +1 -1
  26. package/resources/agents/feedback.js +13 -2
  27. package/resources/agents/feedback.js.map +1 -1
  28. package/resources/agents/feedback.mjs +13 -2
  29. package/resources/agents/feedback.mjs.map +1 -1
  30. package/resources/agents/index.d.mts +1 -1
  31. package/resources/agents/index.d.mts.map +1 -1
  32. package/resources/agents/index.d.ts +1 -1
  33. package/resources/agents/index.d.ts.map +1 -1
  34. package/resources/agents/index.js.map +1 -1
  35. package/resources/agents/index.mjs.map +1 -1
  36. package/resources/agents/schedules.d.mts +100 -52
  37. package/resources/agents/schedules.d.mts.map +1 -1
  38. package/resources/agents/schedules.d.ts +100 -52
  39. package/resources/agents/schedules.d.ts.map +1 -1
  40. package/resources/agents/schedules.js +99 -21
  41. package/resources/agents/schedules.js.map +1 -1
  42. package/resources/agents/schedules.mjs +99 -21
  43. package/resources/agents/schedules.mjs.map +1 -1
  44. package/resources/agents/variations.d.mts +252 -105
  45. package/resources/agents/variations.d.mts.map +1 -1
  46. package/resources/agents/variations.d.ts +252 -105
  47. package/resources/agents/variations.d.ts.map +1 -1
  48. package/resources/agents/variations.js +138 -27
  49. package/resources/agents/variations.js.map +1 -1
  50. package/resources/agents/variations.mjs +138 -27
  51. package/resources/agents/variations.mjs.map +1 -1
  52. package/resources/agents/webhook-deliveries.d.mts +13 -2
  53. package/resources/agents/webhook-deliveries.d.mts.map +1 -1
  54. package/resources/agents/webhook-deliveries.d.ts +13 -2
  55. package/resources/agents/webhook-deliveries.d.ts.map +1 -1
  56. package/resources/agents/webhook-deliveries.js +13 -2
  57. package/resources/agents/webhook-deliveries.js.map +1 -1
  58. package/resources/agents/webhook-deliveries.mjs +13 -2
  59. package/resources/agents/webhook-deliveries.mjs.map +1 -1
  60. package/resources/ai-provider-keys.d.mts +125 -110
  61. package/resources/ai-provider-keys.d.mts.map +1 -1
  62. package/resources/ai-provider-keys.d.ts +125 -110
  63. package/resources/ai-provider-keys.d.ts.map +1 -1
  64. package/resources/ai-provider-keys.js +11 -9
  65. package/resources/ai-provider-keys.js.map +1 -1
  66. package/resources/ai-provider-keys.mjs +11 -9
  67. package/resources/ai-provider-keys.mjs.map +1 -1
  68. package/resources/api-keys.d.mts +28 -20
  69. package/resources/api-keys.d.mts.map +1 -1
  70. package/resources/api-keys.d.ts +28 -20
  71. package/resources/api-keys.d.ts.map +1 -1
  72. package/resources/api-keys.js +14 -12
  73. package/resources/api-keys.js.map +1 -1
  74. package/resources/api-keys.mjs +14 -12
  75. package/resources/api-keys.mjs.map +1 -1
  76. package/resources/index.d.mts +4 -4
  77. package/resources/index.d.mts.map +1 -1
  78. package/resources/index.d.ts +4 -4
  79. package/resources/index.d.ts.map +1 -1
  80. package/resources/index.js.map +1 -1
  81. package/resources/index.mjs.map +1 -1
  82. package/resources/memory-layers/entries.d.mts +27 -30
  83. package/resources/memory-layers/entries.d.mts.map +1 -1
  84. package/resources/memory-layers/entries.d.ts +27 -30
  85. package/resources/memory-layers/entries.d.ts.map +1 -1
  86. package/resources/memory-layers/entries.js +12 -12
  87. package/resources/memory-layers/entries.js.map +1 -1
  88. package/resources/memory-layers/entries.mjs +12 -12
  89. package/resources/memory-layers/entries.mjs.map +1 -1
  90. package/resources/memory-layers/index.d.mts +1 -1
  91. package/resources/memory-layers/index.d.mts.map +1 -1
  92. package/resources/memory-layers/index.d.ts +1 -1
  93. package/resources/memory-layers/index.d.ts.map +1 -1
  94. package/resources/memory-layers/index.js.map +1 -1
  95. package/resources/memory-layers/index.mjs.map +1 -1
  96. package/resources/memory-layers/memory-layers.d.mts +34 -22
  97. package/resources/memory-layers/memory-layers.d.mts.map +1 -1
  98. package/resources/memory-layers/memory-layers.d.ts +34 -22
  99. package/resources/memory-layers/memory-layers.d.ts.map +1 -1
  100. package/resources/memory-layers/memory-layers.js +11 -9
  101. package/resources/memory-layers/memory-layers.js.map +1 -1
  102. package/resources/memory-layers/memory-layers.mjs +11 -9
  103. package/resources/memory-layers/memory-layers.mjs.map +1 -1
  104. package/resources/models.d.mts +32 -24
  105. package/resources/models.d.mts.map +1 -1
  106. package/resources/models.d.ts +32 -24
  107. package/resources/models.d.ts.map +1 -1
  108. package/resources/models.js +10 -8
  109. package/resources/models.js.map +1 -1
  110. package/resources/models.mjs +10 -8
  111. package/resources/models.mjs.map +1 -1
  112. package/resources/objectives/feedback.d.mts +27 -3
  113. package/resources/objectives/feedback.d.mts.map +1 -1
  114. package/resources/objectives/feedback.d.ts +27 -3
  115. package/resources/objectives/feedback.d.ts.map +1 -1
  116. package/resources/objectives/feedback.js +27 -3
  117. package/resources/objectives/feedback.js.map +1 -1
  118. package/resources/objectives/feedback.mjs +27 -3
  119. package/resources/objectives/feedback.mjs.map +1 -1
  120. package/resources/objectives/index.d.mts +2 -2
  121. package/resources/objectives/index.d.mts.map +1 -1
  122. package/resources/objectives/index.d.ts +2 -2
  123. package/resources/objectives/index.d.ts.map +1 -1
  124. package/resources/objectives/index.js.map +1 -1
  125. package/resources/objectives/index.mjs.map +1 -1
  126. package/resources/objectives/objectives.d.mts +273 -102
  127. package/resources/objectives/objectives.d.mts.map +1 -1
  128. package/resources/objectives/objectives.d.ts +273 -102
  129. package/resources/objectives/objectives.d.ts.map +1 -1
  130. package/resources/objectives/objectives.js +112 -17
  131. package/resources/objectives/objectives.js.map +1 -1
  132. package/resources/objectives/objectives.mjs +112 -17
  133. package/resources/objectives/objectives.mjs.map +1 -1
  134. package/resources/objectives/tasks.d.mts +25 -8
  135. package/resources/objectives/tasks.d.mts.map +1 -1
  136. package/resources/objectives/tasks.d.ts +25 -8
  137. package/resources/objectives/tasks.d.ts.map +1 -1
  138. package/resources/objectives/tasks.js +26 -5
  139. package/resources/objectives/tasks.js.map +1 -1
  140. package/resources/objectives/tasks.mjs +26 -5
  141. package/resources/objectives/tasks.mjs.map +1 -1
  142. package/resources/objectives/tool-calls.d.mts +99 -42
  143. package/resources/objectives/tool-calls.d.mts.map +1 -1
  144. package/resources/objectives/tool-calls.d.ts +99 -42
  145. package/resources/objectives/tool-calls.d.ts.map +1 -1
  146. package/resources/objectives/tool-calls.js +73 -14
  147. package/resources/objectives/tool-calls.js.map +1 -1
  148. package/resources/objectives/tool-calls.mjs +73 -14
  149. package/resources/objectives/tool-calls.mjs.map +1 -1
  150. package/resources/objectives/tools.d.mts +13 -2
  151. package/resources/objectives/tools.d.mts.map +1 -1
  152. package/resources/objectives/tools.d.ts +13 -2
  153. package/resources/objectives/tools.d.ts.map +1 -1
  154. package/resources/objectives/tools.js +13 -2
  155. package/resources/objectives/tools.js.map +1 -1
  156. package/resources/objectives/tools.mjs +13 -2
  157. package/resources/objectives/tools.mjs.map +1 -1
  158. package/resources/search.d.mts +11 -2
  159. package/resources/search.d.mts.map +1 -1
  160. package/resources/search.d.ts +11 -2
  161. package/resources/search.d.ts.map +1 -1
  162. package/resources/search.js +3 -2
  163. package/resources/search.js.map +1 -1
  164. package/resources/search.mjs +3 -2
  165. package/resources/search.mjs.map +1 -1
  166. package/resources/tool-sets/index.d.mts +2 -2
  167. package/resources/tool-sets/index.d.mts.map +1 -1
  168. package/resources/tool-sets/index.d.ts +2 -2
  169. package/resources/tool-sets/index.d.ts.map +1 -1
  170. package/resources/tool-sets/index.js.map +1 -1
  171. package/resources/tool-sets/index.mjs.map +1 -1
  172. package/resources/tool-sets/secrets.d.mts +9 -24
  173. package/resources/tool-sets/secrets.d.mts.map +1 -1
  174. package/resources/tool-sets/secrets.d.ts +9 -24
  175. package/resources/tool-sets/secrets.d.ts.map +1 -1
  176. package/resources/tool-sets/secrets.js +12 -12
  177. package/resources/tool-sets/secrets.js.map +1 -1
  178. package/resources/tool-sets/secrets.mjs +12 -12
  179. package/resources/tool-sets/secrets.mjs.map +1 -1
  180. package/resources/tool-sets/tool-sets.d.mts +149 -64
  181. package/resources/tool-sets/tool-sets.d.mts.map +1 -1
  182. package/resources/tool-sets/tool-sets.d.ts +149 -64
  183. package/resources/tool-sets/tool-sets.d.ts.map +1 -1
  184. package/resources/tool-sets/tool-sets.js +17 -15
  185. package/resources/tool-sets/tool-sets.js.map +1 -1
  186. package/resources/tool-sets/tool-sets.mjs +17 -15
  187. package/resources/tool-sets/tool-sets.mjs.map +1 -1
  188. package/resources/tool-sets/tools.d.mts +33 -43
  189. package/resources/tool-sets/tools.d.mts.map +1 -1
  190. package/resources/tool-sets/tools.d.ts +33 -43
  191. package/resources/tool-sets/tools.d.ts.map +1 -1
  192. package/resources/tool-sets/tools.js +18 -18
  193. package/resources/tool-sets/tools.js.map +1 -1
  194. package/resources/tool-sets/tools.mjs +18 -18
  195. package/resources/tool-sets/tools.mjs.map +1 -1
  196. package/resources/uploads.d.mts +14 -6
  197. package/resources/uploads.d.mts.map +1 -1
  198. package/resources/uploads.d.ts +14 -6
  199. package/resources/uploads.d.ts.map +1 -1
  200. package/resources/uploads.js +5 -4
  201. package/resources/uploads.js.map +1 -1
  202. package/resources/uploads.mjs +5 -4
  203. package/resources/uploads.mjs.map +1 -1
  204. package/resources/workspace-admin/index.d.mts +1 -1
  205. package/resources/workspace-admin/index.d.mts.map +1 -1
  206. package/resources/workspace-admin/index.d.ts +1 -1
  207. package/resources/workspace-admin/index.d.ts.map +1 -1
  208. package/resources/workspace-admin/index.js.map +1 -1
  209. package/resources/workspace-admin/index.mjs.map +1 -1
  210. package/resources/workspace-admin/members.d.mts +41 -6
  211. package/resources/workspace-admin/members.d.mts.map +1 -1
  212. package/resources/workspace-admin/members.d.ts +41 -6
  213. package/resources/workspace-admin/members.d.ts.map +1 -1
  214. package/resources/workspace-admin/members.js +34 -6
  215. package/resources/workspace-admin/members.js.map +1 -1
  216. package/resources/workspace-admin/members.mjs +34 -6
  217. package/resources/workspace-admin/members.mjs.map +1 -1
  218. package/resources/workspace-admin/profiles.d.mts +8 -0
  219. package/resources/workspace-admin/profiles.d.mts.map +1 -1
  220. package/resources/workspace-admin/profiles.d.ts +8 -0
  221. package/resources/workspace-admin/profiles.d.ts.map +1 -1
  222. package/resources/workspace-admin/profiles.js +8 -0
  223. package/resources/workspace-admin/profiles.js.map +1 -1
  224. package/resources/workspace-admin/profiles.mjs +8 -0
  225. package/resources/workspace-admin/profiles.mjs.map +1 -1
  226. package/resources/workspace-admin/workspace-admin.d.mts +65 -9
  227. package/resources/workspace-admin/workspace-admin.d.mts.map +1 -1
  228. package/resources/workspace-admin/workspace-admin.d.ts +65 -9
  229. package/resources/workspace-admin/workspace-admin.d.ts.map +1 -1
  230. package/resources/workspace-admin/workspace-admin.js +46 -6
  231. package/resources/workspace-admin/workspace-admin.js.map +1 -1
  232. package/resources/workspace-admin/workspace-admin.mjs +46 -6
  233. package/resources/workspace-admin/workspace-admin.mjs.map +1 -1
  234. package/resources/workspace-secrets.d.mts +27 -15
  235. package/resources/workspace-secrets.d.mts.map +1 -1
  236. package/resources/workspace-secrets.d.ts +27 -15
  237. package/resources/workspace-secrets.d.ts.map +1 -1
  238. package/resources/workspace-secrets.js +11 -9
  239. package/resources/workspace-secrets.js.map +1 -1
  240. package/resources/workspace-secrets.mjs +11 -9
  241. package/resources/workspace-secrets.mjs.map +1 -1
  242. package/src/client.ts +102 -5
  243. package/src/internal/request-options.ts +1 -1
  244. package/src/resources/agents/agents.ts +147 -37
  245. package/src/resources/agents/feedback.ts +14 -3
  246. package/src/resources/agents/index.ts +6 -0
  247. package/src/resources/agents/schedules.ts +143 -71
  248. package/src/resources/agents/variations.ts +319 -125
  249. package/src/resources/agents/webhook-deliveries.ts +14 -3
  250. package/src/resources/ai-provider-keys.ts +155 -127
  251. package/src/resources/api-keys.ts +48 -29
  252. package/src/resources/index.ts +44 -1
  253. package/src/resources/memory-layers/entries.ts +56 -40
  254. package/src/resources/memory-layers/index.ts +2 -0
  255. package/src/resources/memory-layers/memory-layers.ts +53 -30
  256. package/src/resources/models.ts +46 -31
  257. package/src/resources/objectives/feedback.ts +29 -5
  258. package/src/resources/objectives/index.ts +26 -0
  259. package/src/resources/objectives/objectives.ts +373 -125
  260. package/src/resources/objectives/tasks.ts +33 -12
  261. package/src/resources/objectives/tool-calls.ts +123 -46
  262. package/src/resources/objectives/tools.ts +14 -3
  263. package/src/resources/search.ts +14 -4
  264. package/src/resources/tool-sets/index.ts +23 -3
  265. package/src/resources/tool-sets/secrets.ts +32 -35
  266. package/src/resources/tool-sets/tool-sets.ts +239 -79
  267. package/src/resources/tool-sets/tools.ts +79 -61
  268. package/src/resources/uploads.ts +22 -8
  269. package/src/resources/workspace-admin/index.ts +2 -0
  270. package/src/resources/workspace-admin/members.ts +53 -12
  271. package/src/resources/workspace-admin/profiles.ts +8 -0
  272. package/src/resources/workspace-admin/workspace-admin.ts +80 -11
  273. package/src/resources/workspace-secrets.ts +40 -25
  274. package/src/version.ts +1 -1
  275. package/version.d.mts +1 -1
  276. package/version.d.ts +1 -1
  277. package/version.js +1 -1
  278. package/version.mjs +1 -1
@@ -14,11 +14,11 @@ export declare class Uploads extends APIResource {
14
14
  * returned id is used to reference the upload from resources that accept binary
15
15
  * content.
16
16
  */
17
- create(workspaceID: string, body: UploadCreateParams, options?: RequestOptions): APIPromise<Upload>;
17
+ create(params: UploadCreateParams, options?: RequestOptions): APIPromise<Upload>;
18
18
  /**
19
19
  * Retrieves the current state of an upload, including its lifecycle status
20
20
  */
21
- retrieve(id: string, params: UploadRetrieveParams, options?: RequestOptions): APIPromise<Upload>;
21
+ retrieve(id: string, params?: UploadRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<Upload>;
22
22
  }
23
23
  /**
24
24
  * A handle representing a single file upload flow. Clients call CreateUpload to
@@ -80,18 +80,26 @@ export interface UploadSpec {
80
80
  }
81
81
  export interface UploadCreateParams {
82
82
  /**
83
- * CreateResourceMetadata contains the user-provided fields for creating a
84
- * workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
85
- * profile_id, created_at) are excluded since they are set by the server.
83
+ * Path param: Workspace ID.
84
+ */
85
+ workspaceId?: string;
86
+ /**
87
+ * Body param: CreateResourceMetadata contains the user-provided fields for
88
+ * creating a workspace-scoped resource. Read-only fields (id, account_id,
89
+ * workspace_id, profile_id, created_at) are excluded since they are set by the
90
+ * server.
86
91
  */
87
92
  metadata: Shared.CreateResourceMetadata;
93
+ /**
94
+ * Body param
95
+ */
88
96
  spec: UploadSpec;
89
97
  }
90
98
  export interface UploadRetrieveParams {
91
99
  /**
92
100
  * Workspace ID.
93
101
  */
94
- workspaceId: string;
102
+ workspaceId?: string;
95
103
  }
96
104
  export declare namespace Uploads {
97
105
  export { type Upload as Upload, type UploadInfo as UploadInfo, type UploadSpec as UploadSpec, type UploadCreateParams as UploadCreateParams, type UploadRetrieveParams as UploadRetrieveParams, };
@@ -1 +1 @@
1
- {"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,KAAK,UAAU,sBAAkB;AACxC,OAAO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AAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC,sBAAsB,CAAC;IAExC;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
@@ -14,11 +14,11 @@ export declare class Uploads extends APIResource {
14
14
  * returned id is used to reference the upload from resources that accept binary
15
15
  * content.
16
16
  */
17
- create(workspaceID: string, body: UploadCreateParams, options?: RequestOptions): APIPromise<Upload>;
17
+ create(params: UploadCreateParams, options?: RequestOptions): APIPromise<Upload>;
18
18
  /**
19
19
  * Retrieves the current state of an upload, including its lifecycle status
20
20
  */
21
- retrieve(id: string, params: UploadRetrieveParams, options?: RequestOptions): APIPromise<Upload>;
21
+ retrieve(id: string, params?: UploadRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<Upload>;
22
22
  }
23
23
  /**
24
24
  * A handle representing a single file upload flow. Clients call CreateUpload to
@@ -80,18 +80,26 @@ export interface UploadSpec {
80
80
  }
81
81
  export interface UploadCreateParams {
82
82
  /**
83
- * CreateResourceMetadata contains the user-provided fields for creating a
84
- * workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
85
- * profile_id, created_at) are excluded since they are set by the server.
83
+ * Path param: Workspace ID.
84
+ */
85
+ workspaceId?: string;
86
+ /**
87
+ * Body param: CreateResourceMetadata contains the user-provided fields for
88
+ * creating a workspace-scoped resource. Read-only fields (id, account_id,
89
+ * workspace_id, profile_id, created_at) are excluded since they are set by the
90
+ * server.
86
91
  */
87
92
  metadata: Shared.CreateResourceMetadata;
93
+ /**
94
+ * Body param
95
+ */
88
96
  spec: UploadSpec;
89
97
  }
90
98
  export interface UploadRetrieveParams {
91
99
  /**
92
100
  * Workspace ID.
93
101
  */
94
- workspaceId: string;
102
+ workspaceId?: string;
95
103
  }
96
104
  export declare namespace Uploads {
97
105
  export { type Upload as Upload, type UploadInfo as UploadInfo, type UploadSpec as UploadSpec, type UploadCreateParams as UploadCreateParams, type UploadRetrieveParams as UploadRetrieveParams, };
@@ -1 +1 @@
1
- {"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,UAAU,qBAAkB;AACxC,OAAO,KAAK,MAAM,oBAAiB;AACnC,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;;;GAIG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;OAIG;IACH,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAInG;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;CAIjG;AAED;;;;;;;;;GASG;AACH,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AAoB;IACnC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
@@ -15,14 +15,15 @@ class Uploads extends resource_1.APIResource {
15
15
  * returned id is used to reference the upload from resources that accept binary
16
16
  * content.
17
17
  */
18
- create(workspaceID, body, options) {
19
- return this._client.post((0, path_1.path) `/v1/workspaces/${workspaceID}/uploads`, { body, ...options });
18
+ create(params, options) {
19
+ const { workspaceId = this._client.workspaceID, ...body } = params;
20
+ return this._client.post((0, path_1.path) `/v1/workspaces/${workspaceId}/uploads`, { body, ...options });
20
21
  }
21
22
  /**
22
23
  * Retrieves the current state of an upload, including its lifecycle status
23
24
  */
24
- retrieve(id, params, options) {
25
- const { workspaceId } = params;
25
+ retrieve(id, params = {}, options) {
26
+ const { workspaceId = this._client.workspaceID } = params ?? {};
26
27
  return this._client.get((0, path_1.path) `/v1/workspaces/${workspaceId}/uploads/${id}`, options);
27
28
  }
28
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"uploads.js","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAK/C,oDAA8C;AAE9C;;;;GAIG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;OAIG;IACH,MAAM,CAAC,WAAmB,EAAE,IAAwB,EAAE,OAAwB;QAC5E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,kBAAkB,WAAW,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,MAA4B,EAAE,OAAwB;QACzE,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,WAAW,YAAY,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;CACF;AAjBD,0BAiBC"}
1
+ {"version":3,"file":"uploads.js","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAK/C,oDAA8C;AAE9C;;;;GAIG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;OAIG;IACH,MAAM,CAAC,MAA0B,EAAE,OAAwB;QACzD,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,kBAAkB,WAAW,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,SAAkD,EAAE,EACpD,OAAwB;QAExB,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,WAAW,YAAY,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;CACF;AAtBD,0BAsBC"}
@@ -12,14 +12,15 @@ export class Uploads extends APIResource {
12
12
  * returned id is used to reference the upload from resources that accept binary
13
13
  * content.
14
14
  */
15
- create(workspaceID, body, options) {
16
- return this._client.post(path `/v1/workspaces/${workspaceID}/uploads`, { body, ...options });
15
+ create(params, options) {
16
+ const { workspaceId = this._client.workspaceID, ...body } = params;
17
+ return this._client.post(path `/v1/workspaces/${workspaceId}/uploads`, { body, ...options });
17
18
  }
18
19
  /**
19
20
  * Retrieves the current state of an upload, including its lifecycle status
20
21
  */
21
- retrieve(id, params, options) {
22
- const { workspaceId } = params;
22
+ retrieve(id, params = {}, options) {
23
+ const { workspaceId = this._client.workspaceID } = params ?? {};
23
24
  return this._client.get(path `/v1/workspaces/${workspaceId}/uploads/${id}`, options);
24
25
  }
25
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAK/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;;;GAIG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;OAIG;IACH,MAAM,CAAC,WAAmB,EAAE,IAAwB,EAAE,OAAwB;QAC5E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,kBAAkB,WAAW,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,MAA4B,EAAE,OAAwB;QACzE,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,WAAW,YAAY,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;CACF"}
1
+ {"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAK/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;;;GAIG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;OAIG;IACH,MAAM,CAAC,MAA0B,EAAE,OAAwB;QACzD,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,kBAAkB,WAAW,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,SAAkD,EAAE,EACpD,OAAwB;QAExB,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,WAAW,YAAY,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;CACF"}
@@ -1,4 +1,4 @@
1
1
  export { Members, type MemberListParams, type MemberAddParams, type MemberRemoveParams } from "./members.mjs";
2
2
  export { Profiles, type ProfileListParams } from "./profiles.mjs";
3
- export { WorkspaceAdmin, type WorkspaceMember, type WorkspaceAdminCreateParams, type WorkspaceAdminUpdateParams, type WorkspaceAdminListParams, type WorkspaceMembersCursorPagination, } from "./workspace-admin.mjs";
3
+ export { WorkspaceAdmin, type WorkspaceMember, type WorkspaceAdminCreateParams, type WorkspaceAdminRetrieveParams, type WorkspaceAdminUpdateParams, type WorkspaceAdminListParams, type WorkspaceAdminArchiveParams, type WorkspaceMembersCursorPagination, } from "./workspace-admin.mjs";
4
4
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/workspace-admin/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,kBAAkB,EAAE,sBAAkB;AAC1G,OAAO,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE,uBAAmB;AAC9D,OAAO,EACL,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,GACtC,8BAA0B"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/workspace-admin/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,kBAAkB,EAAE,sBAAkB;AAC1G,OAAO,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE,uBAAmB;AAC9D,OAAO,EACL,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,gCAAgC,GACtC,8BAA0B"}
@@ -1,4 +1,4 @@
1
1
  export { Members, type MemberListParams, type MemberAddParams, type MemberRemoveParams } from "./members.js";
2
2
  export { Profiles, type ProfileListParams } from "./profiles.js";
3
- export { WorkspaceAdmin, type WorkspaceMember, type WorkspaceAdminCreateParams, type WorkspaceAdminUpdateParams, type WorkspaceAdminListParams, type WorkspaceMembersCursorPagination, } from "./workspace-admin.js";
3
+ export { WorkspaceAdmin, type WorkspaceMember, type WorkspaceAdminCreateParams, type WorkspaceAdminRetrieveParams, type WorkspaceAdminUpdateParams, type WorkspaceAdminListParams, type WorkspaceAdminArchiveParams, type WorkspaceMembersCursorPagination, } from "./workspace-admin.js";
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/workspace-admin/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,kBAAkB,EAAE,qBAAkB;AAC1G,OAAO,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE,sBAAmB;AAC9D,OAAO,EACL,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,GACtC,6BAA0B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/workspace-admin/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,kBAAkB,EAAE,qBAAkB;AAC1G,OAAO,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE,sBAAmB;AAC9D,OAAO,EACL,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,gCAAgC,GACtC,6BAA0B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/workspace-admin/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAA0G;AAAjG,kGAAA,OAAO,OAAA;AAChB,0CAA8D;AAArD,oGAAA,QAAQ,OAAA;AACjB,wDAO2B;AANzB,iHAAA,cAAc,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/workspace-admin/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAA0G;AAAjG,kGAAA,OAAO,OAAA;AAChB,0CAA8D;AAArD,oGAAA,QAAQ,OAAA;AACjB,wDAS2B;AARzB,iHAAA,cAAc,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/workspace-admin/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,OAAO,EAAwE,sBAAkB;AAC1G,OAAO,EAAE,QAAQ,EAA0B,uBAAmB;AAC9D,OAAO,EACL,cAAc,GAMf,8BAA0B"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/workspace-admin/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,OAAO,EAAwE,sBAAkB;AAC1G,OAAO,EAAE,QAAQ,EAA0B,uBAAmB;AAC9D,OAAO,EACL,cAAc,GAQf,8BAA0B"}
@@ -15,30 +15,65 @@ import { RequestOptions } from "../../internal/request-options.mjs";
15
15
  export declare class Members extends APIResource {
16
16
  /**
17
17
  * Lists the members of a workspace. Admin only.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * // Automatically fetches more pages as needed.
22
+ * for await (const workspaceMember of client.workspaceAdmin.members.list(
23
+ * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
24
+ * )) {
25
+ * // ...
26
+ * }
27
+ * ```
18
28
  */
19
- list(workspaceID: string, query?: MemberListParams | null | undefined, options?: RequestOptions): PagePromise<WorkspaceMembersCursorPagination, WorkspaceAdminAPI.WorkspaceMember>;
29
+ list(params?: MemberListParams | null | undefined, options?: RequestOptions): PagePromise<WorkspaceMembersCursorPagination, WorkspaceAdminAPI.WorkspaceMember>;
20
30
  /**
21
31
  * Grants a profile access to the workspace by creating (or reactivating) the actor
22
32
  * that links the profile to the workspace. Accepts either an existing profile_id
23
33
  * or an email to resolve-or-invite. Idempotent for an already-active member. Admin
24
34
  * only.
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const workspaceMember =
39
+ * await client.workspaceAdmin.members.add({
40
+ * workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q',
41
+ * });
42
+ * ```
25
43
  */
26
- add(workspaceID: string, body: MemberAddParams, options?: RequestOptions): APIPromise<WorkspaceAdminAPI.WorkspaceMember>;
44
+ add(params?: MemberAddParams | null | undefined, options?: RequestOptions): APIPromise<WorkspaceAdminAPI.WorkspaceMember>;
27
45
  /**
28
46
  * Revokes a member's access by deactivating their actor; the member is immediately
29
47
  * cut off. The underlying profile is not deleted. Admin only.
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * await client.workspaceAdmin.members.remove(
52
+ * 'profile_01HXKD2E5NQM3T9AYWCFS0AP08',
53
+ * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
54
+ * );
55
+ * ```
30
56
  */
31
- remove(profileID: string, params: MemberRemoveParams, options?: RequestOptions): APIPromise<void>;
57
+ remove(profileID: string, params?: MemberRemoveParams | null | undefined, options?: RequestOptions): APIPromise<void>;
32
58
  }
33
59
  export interface MemberListParams extends CursorPaginationParams {
60
+ /**
61
+ * Path param: The workspace whose members will be listed (path).
62
+ */
63
+ workspaceId?: string;
34
64
  }
35
65
  export interface MemberAddParams {
36
66
  /**
37
- * Email address to add (resolve-or-invite). Mutually exclusive with profile_id.
67
+ * Path param: The workspace to add the member to (path).
68
+ */
69
+ workspaceId?: string;
70
+ /**
71
+ * Body param: Email address to add (resolve-or-invite). Mutually exclusive with
72
+ * profile_id.
38
73
  */
39
74
  email?: string;
40
75
  /**
41
- * An existing account profile to add. Mutually exclusive with email.
76
+ * Body param: An existing account profile to add. Mutually exclusive with email.
42
77
  */
43
78
  profileId?: string;
44
79
  }
@@ -46,7 +81,7 @@ export interface MemberRemoveParams {
46
81
  /**
47
82
  * The workspace to remove the member from (path).
48
83
  */
49
- workspaceId: string;
84
+ workspaceId?: string;
50
85
  }
51
86
  export declare namespace Members {
52
87
  export { type MemberListParams as MemberListParams, type MemberAddParams as MemberAddParams, type MemberRemoveParams as MemberRemoveParams, };
@@ -1 +1 @@
1
- {"version":3,"file":"members.d.mts","sourceRoot":"","sources":["../../src/resources/workspace-admin/members.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,iBAAiB,8BAA0B;AACvD,OAAO,EAAE,gCAAgC,EAAE,8BAA0B;AACrE,OAAO,EAA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,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH;AAED,OAAO,EAAE,KAAK,gCAAgC,EAAE,CAAC"}
@@ -15,30 +15,65 @@ import { RequestOptions } from "../../internal/request-options.js";
15
15
  export declare class Members extends APIResource {
16
16
  /**
17
17
  * Lists the members of a workspace. Admin only.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * // Automatically fetches more pages as needed.
22
+ * for await (const workspaceMember of client.workspaceAdmin.members.list(
23
+ * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
24
+ * )) {
25
+ * // ...
26
+ * }
27
+ * ```
18
28
  */
19
- list(workspaceID: string, query?: MemberListParams | null | undefined, options?: RequestOptions): PagePromise<WorkspaceMembersCursorPagination, WorkspaceAdminAPI.WorkspaceMember>;
29
+ list(params?: MemberListParams | null | undefined, options?: RequestOptions): PagePromise<WorkspaceMembersCursorPagination, WorkspaceAdminAPI.WorkspaceMember>;
20
30
  /**
21
31
  * Grants a profile access to the workspace by creating (or reactivating) the actor
22
32
  * that links the profile to the workspace. Accepts either an existing profile_id
23
33
  * or an email to resolve-or-invite. Idempotent for an already-active member. Admin
24
34
  * only.
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const workspaceMember =
39
+ * await client.workspaceAdmin.members.add({
40
+ * workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q',
41
+ * });
42
+ * ```
25
43
  */
26
- add(workspaceID: string, body: MemberAddParams, options?: RequestOptions): APIPromise<WorkspaceAdminAPI.WorkspaceMember>;
44
+ add(params?: MemberAddParams | null | undefined, options?: RequestOptions): APIPromise<WorkspaceAdminAPI.WorkspaceMember>;
27
45
  /**
28
46
  * Revokes a member's access by deactivating their actor; the member is immediately
29
47
  * cut off. The underlying profile is not deleted. Admin only.
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * await client.workspaceAdmin.members.remove(
52
+ * 'profile_01HXKD2E5NQM3T9AYWCFS0AP08',
53
+ * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
54
+ * );
55
+ * ```
30
56
  */
31
- remove(profileID: string, params: MemberRemoveParams, options?: RequestOptions): APIPromise<void>;
57
+ remove(profileID: string, params?: MemberRemoveParams | null | undefined, options?: RequestOptions): APIPromise<void>;
32
58
  }
33
59
  export interface MemberListParams extends CursorPaginationParams {
60
+ /**
61
+ * Path param: The workspace whose members will be listed (path).
62
+ */
63
+ workspaceId?: string;
34
64
  }
35
65
  export interface MemberAddParams {
36
66
  /**
37
- * Email address to add (resolve-or-invite). Mutually exclusive with profile_id.
67
+ * Path param: The workspace to add the member to (path).
68
+ */
69
+ workspaceId?: string;
70
+ /**
71
+ * Body param: Email address to add (resolve-or-invite). Mutually exclusive with
72
+ * profile_id.
38
73
  */
39
74
  email?: string;
40
75
  /**
41
- * An existing account profile to add. Mutually exclusive with email.
76
+ * Body param: An existing account profile to add. Mutually exclusive with email.
42
77
  */
43
78
  profileId?: string;
44
79
  }
@@ -46,7 +81,7 @@ export interface MemberRemoveParams {
46
81
  /**
47
82
  * The workspace to remove the member from (path).
48
83
  */
49
- workspaceId: string;
84
+ workspaceId?: string;
50
85
  }
51
86
  export declare namespace Members {
52
87
  export { type MemberListParams as MemberListParams, type MemberAddParams as MemberAddParams, type MemberRemoveParams as MemberRemoveParams, };
@@ -1 +1 @@
1
- {"version":3,"file":"members.d.ts","sourceRoot":"","sources":["../../src/resources/workspace-admin/members.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,iBAAiB,6BAA0B;AACvD,OAAO,EAAE,gCAAgC,EAAE,6BAA0B;AACrE,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAoB,KAAK,sBAAsB,EAAE,WAAW,EAAE,iCAA8B;AAEnG,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;;;;;;GAOG;AACH,qBAAa,OAAQ,SAAQ,W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17
  class Members extends resource_1.APIResource {
18
18
  /**
19
19
  * Lists the members of a workspace. Admin only.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * // Automatically fetches more pages as needed.
24
+ * for await (const workspaceMember of client.workspaceAdmin.members.list(
25
+ * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
26
+ * )) {
27
+ * // ...
28
+ * }
29
+ * ```
20
30
  */
21
- list(workspaceID, query = {}, options) {
22
- return this._client.getAPIList((0, path_1.path) `/v1/account/workspaces/${workspaceID}/members`, (pagination_1.CursorPagination), { query, ...options });
31
+ list(params = {}, options) {
32
+ const { workspaceId = this._client.workspaceID, ...query } = params ?? {};
33
+ return this._client.getAPIList((0, path_1.path) `/v1/account/workspaces/${workspaceId}/members`, (pagination_1.CursorPagination), { query, ...options });
23
34
  }
24
35
  /**
25
36
  * Grants a profile access to the workspace by creating (or reactivating) the actor
26
37
  * that links the profile to the workspace. Accepts either an existing profile_id
27
38
  * or an email to resolve-or-invite. Idempotent for an already-active member. Admin
28
39
  * only.
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * const workspaceMember =
44
+ * await client.workspaceAdmin.members.add({
45
+ * workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q',
46
+ * });
47
+ * ```
29
48
  */
30
- add(workspaceID, body, options) {
31
- return this._client.post((0, path_1.path) `/v1/account/workspaces/${workspaceID}/members`, { body, ...options });
49
+ add(params = {}, options) {
50
+ const { workspaceId = this._client.workspaceID, ...body } = params ?? {};
51
+ return this._client.post((0, path_1.path) `/v1/account/workspaces/${workspaceId}/members`, { body, ...options });
32
52
  }
33
53
  /**
34
54
  * Revokes a member's access by deactivating their actor; the member is immediately
35
55
  * cut off. The underlying profile is not deleted. Admin only.
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * await client.workspaceAdmin.members.remove(
60
+ * 'profile_01HXKD2E5NQM3T9AYWCFS0AP08',
61
+ * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
62
+ * );
63
+ * ```
36
64
  */
37
- remove(profileID, params, options) {
38
- const { workspaceId } = params;
65
+ remove(profileID, params = {}, options) {
66
+ const { workspaceId = this._client.workspaceID } = params ?? {};
39
67
  return this._client.delete((0, path_1.path) `/v1/account/workspaces/${workspaceId}/members/${profileID}`, {
40
68
  ...options,
41
69
  headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
@@ -1 +1 @@
1
- {"version":3,"file":"members.js","sourceRoot":"","sources":["../../src/resources/workspace-admin/members.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,yDAAmG;AACnG,uDAAsD;AAEtD,uDAAiD;AAEjD;;;;;;;GAOG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,IAAI,CACF,WAAmB,EACnB,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,0BAA0B,WAAW,UAAU,EACnD,CAAA,6BAAmD,CAAA,EACnD,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,GAAG,CACD,WAAmB,EACnB,IAAqB,EACrB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,0BAA0B,WAAW,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtG,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,SAAiB,EAAE,MAA0B,EAAE,OAAwB;QAC5E,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,0BAA0B,WAAW,YAAY,SAAS,EAAE,EAAE;YAC3F,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,M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M,CAAC,IAAA,WAAI,EAAA,0BAA0B,WAAW,YAAY,SAAS,EAAE,EAAE;YAC3F,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAvED,0BAuEC"}
@@ -14,25 +14,53 @@ import { path } from "../../internal/utils/path.mjs";
14
14
  export class Members extends APIResource {
15
15
  /**
16
16
  * Lists the members of a workspace. Admin only.
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * // Automatically fetches more pages as needed.
21
+ * for await (const workspaceMember of client.workspaceAdmin.members.list(
22
+ * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
23
+ * )) {
24
+ * // ...
25
+ * }
26
+ * ```
17
27
  */
18
- list(workspaceID, query = {}, options) {
19
- return this._client.getAPIList(path `/v1/account/workspaces/${workspaceID}/members`, (CursorPagination), { query, ...options });
28
+ list(params = {}, options) {
29
+ const { workspaceId = this._client.workspaceID, ...query } = params ?? {};
30
+ return this._client.getAPIList(path `/v1/account/workspaces/${workspaceId}/members`, (CursorPagination), { query, ...options });
20
31
  }
21
32
  /**
22
33
  * Grants a profile access to the workspace by creating (or reactivating) the actor
23
34
  * that links the profile to the workspace. Accepts either an existing profile_id
24
35
  * or an email to resolve-or-invite. Idempotent for an already-active member. Admin
25
36
  * only.
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * const workspaceMember =
41
+ * await client.workspaceAdmin.members.add({
42
+ * workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q',
43
+ * });
44
+ * ```
26
45
  */
27
- add(workspaceID, body, options) {
28
- return this._client.post(path `/v1/account/workspaces/${workspaceID}/members`, { body, ...options });
46
+ add(params = {}, options) {
47
+ const { workspaceId = this._client.workspaceID, ...body } = params ?? {};
48
+ return this._client.post(path `/v1/account/workspaces/${workspaceId}/members`, { body, ...options });
29
49
  }
30
50
  /**
31
51
  * Revokes a member's access by deactivating their actor; the member is immediately
32
52
  * cut off. The underlying profile is not deleted. Admin only.
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * await client.workspaceAdmin.members.remove(
57
+ * 'profile_01HXKD2E5NQM3T9AYWCFS0AP08',
58
+ * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
59
+ * );
60
+ * ```
33
61
  */
34
- remove(profileID, params, options) {
35
- const { workspaceId } = params;
62
+ remove(profileID, params = {}, options) {
63
+ const { workspaceId = this._client.workspaceID } = params ?? {};
36
64
  return this._client.delete(path `/v1/account/workspaces/${workspaceId}/members/${profileID}`, {
37
65
  ...options,
38
66
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
@@ -1 +1 @@
1
- {"version":3,"file":"members.mjs","sourceRoot":"","sources":["../../src/resources/workspace-admin/members.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD,OAAO,EAAE,gBAAgB,EAA4C,kCAA8B;AACnG,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;;;;;;GAOG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,IAAI,CACF,WAAmB,EACnB,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAI,CAAA,0BAA0B,WAAW,UAAU,EACnD,CAAA,gBAAmD,CAAA,EACnD,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,GAAG,CACD,WAAmB,EACnB,IAAqB,EACrB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,0BAA0B,WAAW,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,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,EAAE,CAAC;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,0BAA0B,WAAW,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtG,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,SAAiB,EACjB,SAAgD,EAAE,EAClD,OAAwB;QAExB,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,0BAA0B,WAAW,YAAY,SAAS,EAAE,EAAE;YAC3F,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -15,6 +15,14 @@ export declare class Profiles extends APIResource {
15
15
  /**
16
16
  * Searches the account's profiles for a member picker, with free-form name/email
17
17
  * search and an optional type filter. Account-scoped; admin only.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * // Automatically fetches more pages as needed.
22
+ * for await (const profile of client.workspaceAdmin.profiles.list()) {
23
+ * // ...
24
+ * }
25
+ * ```
18
26
  */
19
27
  list(query?: ProfileListParams | null | undefined, options?: RequestOptions): PagePromise<ProfilesCursorPagination, AccountAPI.Profile>;
20
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"profiles.d.mts","sourceRoot":"","sources":["../../src/resources/workspace-admin/profiles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,UAAU,uBAAmB;AACzC,OAAO,EAAE,wBAAwB,EAAE,uBAAmB;AACtD,OAAO,EAAoB,KAAK,sBAAsB,EAAE,WAAW,EAAE,kCAA8B;AACnG,OAAO,EAAE,cAAc,EAAE,2CAAuC;A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AC;IAChC,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACxD;AAED,OAAO,EAAE,KAAK,wBAAwB,EAAE,CAAC"}
@@ -15,6 +15,14 @@ export declare class Profiles extends APIResource {
15
15
  /**
16
16
  * Searches the account's profiles for a member picker, with free-form name/email
17
17
  * search and an optional type filter. Account-scoped; admin only.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * // Automatically fetches more pages as needed.
22
+ * for await (const profile of client.workspaceAdmin.profiles.list()) {
23
+ * // ...
24
+ * }
25
+ * ```
18
26
  */
19
27
  list(query?: ProfileListParams | null | undefined, options?: RequestOptions): PagePromise<ProfilesCursorPagination, AccountAPI.Profile>;
20
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../src/resources/workspace-admin/profiles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,UAAU,sBAAmB;AACzC,OAAO,EAAE,wBAAwB,EAAE,sBAAmB;AACtD,OAAO,EAAoB,KAAK,sBAAsB,EAAE,WAAW,EAAE,iCAA8B;AACnG,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAEhE;;;;;;;GAOG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;OAGG;IACH,IAAI,CACF,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,wBAAwB,EAAE,UAAU,CAAC,OAAO,CAAC;CAM7D;AAED,MAAM,WAAW,iBAAkB,SAAQ,sBAAsB;IAC/D;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACxD;AAED,OAAO,EAAE,KAAK,wBAAwB,EAAE,CAAC"}
1
+ {"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../src/resources/workspace-admin/profiles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,UAAU,sBAAmB;AACzC,OAAO,EAAE,wBAAwB,EAAE,sBAAmB;AACtD,OAAO,EAAoB,KAAK,sBAAsB,EAAE,WAAW,EAAE,iCAA8B;AACnG,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAEhE;;;;;;;GAOG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;OAWG;IACH,IAAI,CACF,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,wBAAwB,EAAE,UAAU,CAAC,OAAO,CAAC;CAM7D;AAED,MAAM,WAAW,iBAAkB,SAAQ,sBAAsB;IAC/D;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACxD;AAED,OAAO,EAAE,KAAK,wBAAwB,EAAE,CAAC"}
@@ -16,6 +16,14 @@ class Profiles extends resource_1.APIResource {
16
16
  /**
17
17
  * Searches the account's profiles for a member picker, with free-form name/email
18
18
  * search and an optional type filter. Account-scoped; admin only.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * // Automatically fetches more pages as needed.
23
+ * for await (const profile of client.workspaceAdmin.profiles.list()) {
24
+ * // ...
25
+ * }
26
+ * ```
19
27
  */
20
28
  list(query = {}, options) {
21
29
  return this._client.getAPIList('/v1/account/profiles', (pagination_1.CursorPagination), {
@@ -1 +1 @@
1
- {"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../src/resources/workspace-admin/profiles.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,yDAAmG;AAGnG;;;;;;;GAOG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;OAGG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAA,6BAAoC,CAAA,EAAE;YAC3F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAdD,4BAcC"}
1
+ {"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../src/resources/workspace-admin/profiles.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,yDAAmG;AAGnG;;;;;;;GAOG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;;OAWG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAA,6BAAoC,CAAA,EAAE;YAC3F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAtBD,4BAsBC"}
@@ -13,6 +13,14 @@ export class Profiles extends APIResource {
13
13
  /**
14
14
  * Searches the account's profiles for a member picker, with free-form name/email
15
15
  * search and an optional type filter. Account-scoped; admin only.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * // Automatically fetches more pages as needed.
20
+ * for await (const profile of client.workspaceAdmin.profiles.list()) {
21
+ * // ...
22
+ * }
23
+ * ```
16
24
  */
17
25
  list(query = {}, options) {
18
26
  return this._client.getAPIList('/v1/account/profiles', (CursorPagination), {
@@ -1 +1 @@
1
- {"version":3,"file":"profiles.mjs","sourceRoot":"","sources":["../../src/resources/workspace-admin/profiles.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAGlD,OAAO,EAAE,gBAAgB,EAA4C,kCAA8B;AAGnG;;;;;;;GAOG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;OAGG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAA,gBAAoC,CAAA,EAAE;YAC3F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
1
+ {"version":3,"file":"profiles.mjs","sourceRoot":"","sources":["../../src/resources/workspace-admin/profiles.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAGlD,OAAO,EAAE,gBAAgB,EAA4C,kCAA8B;AAGnG;;;;;;;GAOG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;OAWG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAA,gBAAoC,CAAA,EAAE;YAC3F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}