@keystrokehq/sanity 0.1.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 (202) hide show
  1. package/README.md +17 -0
  2. package/dist/action.cjs +21 -0
  3. package/dist/action.cjs.map +1 -0
  4. package/dist/action.mjs +21 -0
  5. package/dist/action.mjs.map +1 -0
  6. package/dist/actions/add-default-role-to-users.cjs +19 -0
  7. package/dist/actions/add-default-role-to-users.cjs.map +1 -0
  8. package/dist/actions/add-default-role-to-users.d.cts +9 -0
  9. package/dist/actions/add-default-role-to-users.d.cts.map +1 -0
  10. package/dist/actions/add-default-role-to-users.d.mts +9 -0
  11. package/dist/actions/add-default-role-to-users.d.mts.map +1 -0
  12. package/dist/actions/add-default-role-to-users.mjs +16 -0
  13. package/dist/actions/add-default-role-to-users.mjs.map +1 -0
  14. package/dist/actions/create-attr-definition.cjs +37 -0
  15. package/dist/actions/create-attr-definition.cjs.map +1 -0
  16. package/dist/actions/create-attr-definition.d.cts +9 -0
  17. package/dist/actions/create-attr-definition.d.cts.map +1 -0
  18. package/dist/actions/create-attr-definition.d.mts +9 -0
  19. package/dist/actions/create-attr-definition.d.mts.map +1 -0
  20. package/dist/actions/create-attr-definition.mjs +34 -0
  21. package/dist/actions/create-attr-definition.mjs.map +1 -0
  22. package/dist/actions/create-prompt-post.cjs +27 -0
  23. package/dist/actions/create-prompt-post.cjs.map +1 -0
  24. package/dist/actions/create-prompt-post.d.cts +9 -0
  25. package/dist/actions/create-prompt-post.d.cts.map +1 -0
  26. package/dist/actions/create-prompt-post.d.mts +9 -0
  27. package/dist/actions/create-prompt-post.d.mts.map +1 -0
  28. package/dist/actions/create-prompt-post.mjs +24 -0
  29. package/dist/actions/create-prompt-post.mjs.map +1 -0
  30. package/dist/actions/delete-attr-definition.cjs +20 -0
  31. package/dist/actions/delete-attr-definition.cjs.map +1 -0
  32. package/dist/actions/delete-attr-definition.d.cts +9 -0
  33. package/dist/actions/delete-attr-definition.d.cts.map +1 -0
  34. package/dist/actions/delete-attr-definition.d.mts +9 -0
  35. package/dist/actions/delete-attr-definition.d.mts.map +1 -0
  36. package/dist/actions/delete-attr-definition.mjs +17 -0
  37. package/dist/actions/delete-attr-definition.mjs.map +1 -0
  38. package/dist/actions/delete-document.cjs +30 -0
  39. package/dist/actions/delete-document.cjs.map +1 -0
  40. package/dist/actions/delete-document.d.cts +9 -0
  41. package/dist/actions/delete-document.d.cts.map +1 -0
  42. package/dist/actions/delete-document.d.mts +9 -0
  43. package/dist/actions/delete-document.d.mts.map +1 -0
  44. package/dist/actions/delete-document.mjs +27 -0
  45. package/dist/actions/delete-document.mjs.map +1 -0
  46. package/dist/actions/delete-user-attributes.cjs +32 -0
  47. package/dist/actions/delete-user-attributes.cjs.map +1 -0
  48. package/dist/actions/delete-user-attributes.d.cts +9 -0
  49. package/dist/actions/delete-user-attributes.d.cts.map +1 -0
  50. package/dist/actions/delete-user-attributes.d.mts +9 -0
  51. package/dist/actions/delete-user-attributes.d.mts.map +1 -0
  52. package/dist/actions/delete-user-attributes.mjs +31 -0
  53. package/dist/actions/delete-user-attributes.mjs.map +1 -0
  54. package/dist/actions/get-document.cjs +35 -0
  55. package/dist/actions/get-document.cjs.map +1 -0
  56. package/dist/actions/get-document.d.cts +9 -0
  57. package/dist/actions/get-document.d.cts.map +1 -0
  58. package/dist/actions/get-document.d.mts +9 -0
  59. package/dist/actions/get-document.d.mts.map +1 -0
  60. package/dist/actions/get-document.mjs +34 -0
  61. package/dist/actions/get-document.mjs.map +1 -0
  62. package/dist/actions/get-invite-by-token.cjs +55 -0
  63. package/dist/actions/get-invite-by-token.cjs.map +1 -0
  64. package/dist/actions/get-invite-by-token.d.cts +9 -0
  65. package/dist/actions/get-invite-by-token.d.cts.map +1 -0
  66. package/dist/actions/get-invite-by-token.d.mts +9 -0
  67. package/dist/actions/get-invite-by-token.d.mts.map +1 -0
  68. package/dist/actions/get-invite-by-token.mjs +54 -0
  69. package/dist/actions/get-invite-by-token.mjs.map +1 -0
  70. package/dist/actions/get-org-role.cjs +37 -0
  71. package/dist/actions/get-org-role.cjs.map +1 -0
  72. package/dist/actions/get-org-role.d.cts +9 -0
  73. package/dist/actions/get-org-role.d.cts.map +1 -0
  74. package/dist/actions/get-org-role.d.mts +9 -0
  75. package/dist/actions/get-org-role.d.mts.map +1 -0
  76. package/dist/actions/get-org-role.mjs +36 -0
  77. package/dist/actions/get-org-role.mjs.map +1 -0
  78. package/dist/actions/get-permission.cjs +35 -0
  79. package/dist/actions/get-permission.cjs.map +1 -0
  80. package/dist/actions/get-permission.d.cts +9 -0
  81. package/dist/actions/get-permission.d.cts.map +1 -0
  82. package/dist/actions/get-permission.d.mts +9 -0
  83. package/dist/actions/get-permission.d.mts.map +1 -0
  84. package/dist/actions/get-permission.mjs +34 -0
  85. package/dist/actions/get-permission.mjs.map +1 -0
  86. package/dist/actions/get-project.cjs +45 -0
  87. package/dist/actions/get-project.cjs.map +1 -0
  88. package/dist/actions/get-project.d.cts +9 -0
  89. package/dist/actions/get-project.d.cts.map +1 -0
  90. package/dist/actions/get-project.d.mts +9 -0
  91. package/dist/actions/get-project.d.mts.map +1 -0
  92. package/dist/actions/get-project.mjs +44 -0
  93. package/dist/actions/get-project.mjs.map +1 -0
  94. package/dist/actions/get-robots.cjs +46 -0
  95. package/dist/actions/get-robots.cjs.map +1 -0
  96. package/dist/actions/get-robots.d.cts +9 -0
  97. package/dist/actions/get-robots.d.cts.map +1 -0
  98. package/dist/actions/get-robots.d.mts +9 -0
  99. package/dist/actions/get-robots.d.mts.map +1 -0
  100. package/dist/actions/get-robots.mjs +45 -0
  101. package/dist/actions/get-robots.mjs.map +1 -0
  102. package/dist/actions/get-role.cjs +43 -0
  103. package/dist/actions/get-role.cjs.map +1 -0
  104. package/dist/actions/get-role.d.cts +9 -0
  105. package/dist/actions/get-role.d.cts.map +1 -0
  106. package/dist/actions/get-role.d.mts +9 -0
  107. package/dist/actions/get-role.d.mts.map +1 -0
  108. package/dist/actions/get-role.mjs +42 -0
  109. package/dist/actions/get-role.mjs.map +1 -0
  110. package/dist/actions/get-users.cjs +35 -0
  111. package/dist/actions/get-users.cjs.map +1 -0
  112. package/dist/actions/get-users.d.cts +9 -0
  113. package/dist/actions/get-users.d.cts.map +1 -0
  114. package/dist/actions/get-users.d.mts +9 -0
  115. package/dist/actions/get-users.d.mts.map +1 -0
  116. package/dist/actions/get-users.mjs +34 -0
  117. package/dist/actions/get-users.mjs.map +1 -0
  118. package/dist/actions/index.cjs +43 -0
  119. package/dist/actions/index.d.cts +22 -0
  120. package/dist/actions/index.d.mts +22 -0
  121. package/dist/actions/index.mjs +22 -0
  122. package/dist/actions/list-org-roles.cjs +24 -0
  123. package/dist/actions/list-org-roles.cjs.map +1 -0
  124. package/dist/actions/list-org-roles.d.cts +9 -0
  125. package/dist/actions/list-org-roles.d.cts.map +1 -0
  126. package/dist/actions/list-org-roles.d.mts +9 -0
  127. package/dist/actions/list-org-roles.d.mts.map +1 -0
  128. package/dist/actions/list-org-roles.mjs +23 -0
  129. package/dist/actions/list-org-roles.mjs.map +1 -0
  130. package/dist/actions/list-user-attributes.cjs +32 -0
  131. package/dist/actions/list-user-attributes.cjs.map +1 -0
  132. package/dist/actions/list-user-attributes.d.cts +9 -0
  133. package/dist/actions/list-user-attributes.d.cts.map +1 -0
  134. package/dist/actions/list-user-attributes.d.mts +9 -0
  135. package/dist/actions/list-user-attributes.d.mts.map +1 -0
  136. package/dist/actions/list-user-attributes.mjs +31 -0
  137. package/dist/actions/list-user-attributes.mjs.map +1 -0
  138. package/dist/actions/query-all-screening.cjs +27 -0
  139. package/dist/actions/query-all-screening.cjs.map +1 -0
  140. package/dist/actions/query-all-screening.d.cts +9 -0
  141. package/dist/actions/query-all-screening.d.cts.map +1 -0
  142. package/dist/actions/query-all-screening.d.mts +9 -0
  143. package/dist/actions/query-all-screening.d.mts.map +1 -0
  144. package/dist/actions/query-all-screening.mjs +24 -0
  145. package/dist/actions/query-all-screening.mjs.map +1 -0
  146. package/dist/actions/query-documents.cjs +38 -0
  147. package/dist/actions/query-documents.cjs.map +1 -0
  148. package/dist/actions/query-documents.d.cts +9 -0
  149. package/dist/actions/query-documents.d.cts.map +1 -0
  150. package/dist/actions/query-documents.d.mts +9 -0
  151. package/dist/actions/query-documents.d.mts.map +1 -0
  152. package/dist/actions/query-documents.mjs +37 -0
  153. package/dist/actions/query-documents.mjs.map +1 -0
  154. package/dist/actions/update-org-acl.cjs +20 -0
  155. package/dist/actions/update-org-acl.cjs.map +1 -0
  156. package/dist/actions/update-org-acl.d.cts +9 -0
  157. package/dist/actions/update-org-acl.d.cts.map +1 -0
  158. package/dist/actions/update-org-acl.d.mts +9 -0
  159. package/dist/actions/update-org-acl.d.mts.map +1 -0
  160. package/dist/actions/update-org-acl.mjs +17 -0
  161. package/dist/actions/update-org-acl.mjs.map +1 -0
  162. package/dist/actions/update-user-attributes-values.cjs +34 -0
  163. package/dist/actions/update-user-attributes-values.cjs.map +1 -0
  164. package/dist/actions/update-user-attributes-values.d.cts +9 -0
  165. package/dist/actions/update-user-attributes-values.d.cts.map +1 -0
  166. package/dist/actions/update-user-attributes-values.d.mts +9 -0
  167. package/dist/actions/update-user-attributes-values.d.mts.map +1 -0
  168. package/dist/actions/update-user-attributes-values.mjs +33 -0
  169. package/dist/actions/update-user-attributes-values.mjs.map +1 -0
  170. package/dist/actions/validate-credential.cjs +32 -0
  171. package/dist/actions/validate-credential.cjs.map +1 -0
  172. package/dist/actions/validate-credential.d.cts +9 -0
  173. package/dist/actions/validate-credential.d.cts.map +1 -0
  174. package/dist/actions/validate-credential.d.mts +9 -0
  175. package/dist/actions/validate-credential.d.mts.map +1 -0
  176. package/dist/actions/validate-credential.mjs +31 -0
  177. package/dist/actions/validate-credential.mjs.map +1 -0
  178. package/dist/app.cjs +9 -0
  179. package/dist/app.cjs.map +1 -0
  180. package/dist/app.d.cts +5 -0
  181. package/dist/app.d.cts.map +1 -0
  182. package/dist/app.d.mts +5 -0
  183. package/dist/app.d.mts.map +1 -0
  184. package/dist/app.mjs +10 -0
  185. package/dist/app.mjs.map +1 -0
  186. package/dist/catalog.cjs +15 -0
  187. package/dist/catalog.cjs.map +1 -0
  188. package/dist/catalog.d.cts +14 -0
  189. package/dist/catalog.d.cts.map +1 -0
  190. package/dist/catalog.d.mts +14 -0
  191. package/dist/catalog.d.mts.map +1 -0
  192. package/dist/catalog.mjs +15 -0
  193. package/dist/catalog.mjs.map +1 -0
  194. package/dist/execute.cjs +18 -0
  195. package/dist/execute.cjs.map +1 -0
  196. package/dist/execute.mjs +18 -0
  197. package/dist/execute.mjs.map +1 -0
  198. package/dist/index.cjs +48 -0
  199. package/dist/index.d.cts +24 -0
  200. package/dist/index.d.mts +24 -0
  201. package/dist/index.mjs +25 -0
  202. package/package.json +49 -0
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # @keystrokehq/sanity
2
+
3
+ Keystroke-managed integration.
4
+
5
+ **App:** `sanity`
6
+ **Version:** `20260615_00`
7
+ **Actions:** 21
8
+
9
+ ```ts
10
+ import { defineAgent } from "@keystrokehq/keystroke/agent";
11
+ import { sanityAddDefaultRoleToUsers } from "@keystrokehq/sanity/actions";
12
+
13
+ export default defineAgent({
14
+ key: "sanity-agent",
15
+ tools: [sanityAddDefaultRoleToUsers],
16
+ });
17
+ ```
@@ -0,0 +1,21 @@
1
+ const require_app = require("./app.cjs");
2
+ const require_execute = require("./execute.cjs");
3
+ require("zod");
4
+ //#region src/action.ts
5
+ /** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
6
+ function action(tool, def) {
7
+ return require_app.sanity.action({
8
+ slug: def.slug,
9
+ name: def.name,
10
+ description: def.description,
11
+ input: def.input,
12
+ output: def.output,
13
+ async run(input) {
14
+ return def.output.parse(await require_execute.executeSanityTool(tool, input));
15
+ }
16
+ });
17
+ }
18
+ //#endregion
19
+ exports.action = action;
20
+
21
+ //# sourceMappingURL=action.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.cjs","names":["sanity","executeSanityTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { sanity } from \"./app\";\nimport { executeSanityTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return sanity.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeSanityTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAOA,YAAAA,OAAO,OAAO;EACnB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAMC,gBAAAA,kBAAkB,MAAM,KAAgC,CAAC;EACzF;CACF,CAAC;AACH"}
@@ -0,0 +1,21 @@
1
+ import { sanity } from "./app.mjs";
2
+ import { executeSanityTool } from "./execute.mjs";
3
+ import "zod";
4
+ //#region src/action.ts
5
+ /** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
6
+ function action(tool, def) {
7
+ return sanity.action({
8
+ slug: def.slug,
9
+ name: def.name,
10
+ description: def.description,
11
+ input: def.input,
12
+ output: def.output,
13
+ async run(input) {
14
+ return def.output.parse(await executeSanityTool(tool, input));
15
+ }
16
+ });
17
+ }
18
+ //#endregion
19
+ export { action };
20
+
21
+ //# sourceMappingURL=action.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { sanity } from \"./app\";\nimport { executeSanityTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return sanity.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeSanityTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAO,OAAO,OAAO;EACnB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,kBAAkB,MAAM,KAAgC,CAAC;EACzF;CACF,CAAC;AACH"}
@@ -0,0 +1,19 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/add-default-role-to-users.ts
4
+ const SanityAddDefaultRoleToUsersInput = zod.z.object({ resource_id: zod.z.string().describe("The resource ID to scope the access request to. Must be a valid ID for the resource type.") });
5
+ const SanityAddDefaultRoleToUsersOutput = zod.z.object({
6
+ message: zod.z.string().describe("Response message describing the result").nullable().optional(),
7
+ success: zod.z.boolean().describe("Indicates whether the operation was successful").nullable().optional()
8
+ }).describe("Response schema for the add default role to users action.");
9
+ const sanityAddDefaultRoleToUsers = require_action.action("SANITY_ADD_DEFAULT_ROLE_TO_USERS", {
10
+ slug: "sanity-add-default-role-to-users",
11
+ name: "Add Default Role to Users",
12
+ description: "Apply organization default role to all users. Use when you need to assign the organization's default role to all existing users in the organization. Requires the resource ID of the organization.",
13
+ input: SanityAddDefaultRoleToUsersInput,
14
+ output: SanityAddDefaultRoleToUsersOutput
15
+ });
16
+ //#endregion
17
+ exports.sanityAddDefaultRoleToUsers = sanityAddDefaultRoleToUsers;
18
+
19
+ //# sourceMappingURL=add-default-role-to-users.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-default-role-to-users.cjs","names":["z","action"],"sources":["../../src/actions/add-default-role-to-users.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SanityAddDefaultRoleToUsersInput: z.ZodTypeAny = z.object({\n resource_id: z.string().describe(\"The resource ID to scope the access request to. Must be a valid ID for the resource type.\"),\n});\nexport const SanityAddDefaultRoleToUsersOutput: z.ZodTypeAny = z.object({\n message: z.string().describe(\"Response message describing the result\").nullable().optional(),\n success: z.boolean().describe(\"Indicates whether the operation was successful\").nullable().optional(),\n}).describe(\"Response schema for the add default role to users action.\");\n\nexport const sanityAddDefaultRoleToUsers = action(\"SANITY_ADD_DEFAULT_ROLE_TO_USERS\", {\n slug: \"sanity-add-default-role-to-users\",\n name: \"Add Default Role to Users\",\n description: \"Apply organization default role to all users. Use when you need to assign the organization's default role to all existing users in the organization. Requires the resource ID of the organization.\",\n input: SanityAddDefaultRoleToUsersInput,\n output: SanityAddDefaultRoleToUsersOutput,\n});\n"],"mappings":";;;AAIA,MAAa,mCAAiDA,IAAAA,EAAE,OAAO,EACrE,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2FAA2F,EAC9H,CAAC;AACD,MAAa,oCAAkDA,IAAAA,EAAE,OAAO;CACtE,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3F,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACtG,CAAC,CAAC,CAAC,SAAS,2DAA2D;AAEvE,MAAa,8BAA8BC,eAAAA,OAAO,oCAAoC;CACpF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/add-default-role-to-users.d.ts
4
+ declare const SanityAddDefaultRoleToUsersInput: z.ZodTypeAny;
5
+ declare const SanityAddDefaultRoleToUsersOutput: z.ZodTypeAny;
6
+ declare const sanityAddDefaultRoleToUsers: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { sanityAddDefaultRoleToUsers };
9
+ //# sourceMappingURL=add-default-role-to-users.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-default-role-to-users.d.cts","names":[],"sources":["../../src/actions/add-default-role-to-users.ts"],"mappings":";;;cAIa,gCAAA,EAAkC,CAAA,CAAE,UAE/C;AAAA,cACW,iCAAA,EAAmC,CAAA,CAAE,UAGsB;AAAA,cAE3D,2BAAA,gCAA2B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/add-default-role-to-users.d.ts
4
+ declare const SanityAddDefaultRoleToUsersInput: z.ZodTypeAny;
5
+ declare const SanityAddDefaultRoleToUsersOutput: z.ZodTypeAny;
6
+ declare const sanityAddDefaultRoleToUsers: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { sanityAddDefaultRoleToUsers };
9
+ //# sourceMappingURL=add-default-role-to-users.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-default-role-to-users.d.mts","names":[],"sources":["../../src/actions/add-default-role-to-users.ts"],"mappings":";;;cAIa,gCAAA,EAAkC,CAAA,CAAE,UAE/C;AAAA,cACW,iCAAA,EAAmC,CAAA,CAAE,UAGsB;AAAA,cAE3D,2BAAA,gCAA2B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,16 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ const sanityAddDefaultRoleToUsers = action("SANITY_ADD_DEFAULT_ROLE_TO_USERS", {
4
+ slug: "sanity-add-default-role-to-users",
5
+ name: "Add Default Role to Users",
6
+ description: "Apply organization default role to all users. Use when you need to assign the organization's default role to all existing users in the organization. Requires the resource ID of the organization.",
7
+ input: z.object({ resource_id: z.string().describe("The resource ID to scope the access request to. Must be a valid ID for the resource type.") }),
8
+ output: z.object({
9
+ message: z.string().describe("Response message describing the result").nullable().optional(),
10
+ success: z.boolean().describe("Indicates whether the operation was successful").nullable().optional()
11
+ }).describe("Response schema for the add default role to users action.")
12
+ });
13
+ //#endregion
14
+ export { sanityAddDefaultRoleToUsers };
15
+
16
+ //# sourceMappingURL=add-default-role-to-users.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-default-role-to-users.mjs","names":[],"sources":["../../src/actions/add-default-role-to-users.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SanityAddDefaultRoleToUsersInput: z.ZodTypeAny = z.object({\n resource_id: z.string().describe(\"The resource ID to scope the access request to. Must be a valid ID for the resource type.\"),\n});\nexport const SanityAddDefaultRoleToUsersOutput: z.ZodTypeAny = z.object({\n message: z.string().describe(\"Response message describing the result\").nullable().optional(),\n success: z.boolean().describe(\"Indicates whether the operation was successful\").nullable().optional(),\n}).describe(\"Response schema for the add default role to users action.\");\n\nexport const sanityAddDefaultRoleToUsers = action(\"SANITY_ADD_DEFAULT_ROLE_TO_USERS\", {\n slug: \"sanity-add-default-role-to-users\",\n name: \"Add Default Role to Users\",\n description: \"Apply organization default role to all users. Use when you need to assign the organization's default role to all existing users in the organization. Requires the resource ID of the organization.\",\n input: SanityAddDefaultRoleToUsersInput,\n output: SanityAddDefaultRoleToUsersOutput,\n});\n"],"mappings":";;AAYA,MAAa,8BAA8B,OAAO,oCAAoC;CACpF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAZ4D,EAAE,OAAO,EACrE,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,2FAA2F,EAC9H,CAUS;CACP,QAV6D,EAAE,OAAO;EACtE,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC3F,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtG,CAAC,CAAC,CAAC,SAAS,2DAOF;AACV,CAAC"}
@@ -0,0 +1,37 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/create-attr-definition.ts
4
+ const SanityCreateAttrDefinitionInput = zod.z.object({
5
+ key: zod.z.string().describe("The unique key/name for the attribute definition. This must be unique within the resource."),
6
+ list: zod.z.boolean().describe("When true, the attribute accepts an array of values. When false or omitted, it accepts a single value.").optional(),
7
+ type: zod.z.enum([
8
+ "string",
9
+ "number",
10
+ "boolean"
11
+ ]).describe("The data type of the attribute. Must be one of: 'string', 'number', 'boolean'."),
12
+ read_only: zod.z.boolean().describe("When true, the attribute value cannot be modified after creation. Defaults to false.").optional(),
13
+ description: zod.z.string().describe("An optional description explaining what this attribute is used for.").optional(),
14
+ resource_id: zod.z.string().describe("The unique identifier of the specific resource (e.g., organization ID, project ID)."),
15
+ resource_type: zod.z.string().describe("The type of resource the attribute definition belongs to. Examples: 'organizations', 'projects', 'datasets'.")
16
+ }).describe("Request model for creating a user attribute definition in Sanity.");
17
+ const SanityCreateAttrDefinitionOutput = zod.z.object({
18
+ id: zod.z.string().describe("The unique identifier for the created attribute definition.").nullable().optional(),
19
+ key: zod.z.string().describe("The unique key/name of the attribute definition.").nullable().optional(),
20
+ list: zod.z.boolean().describe("Whether the attribute accepts an array of values.").nullable().optional(),
21
+ type: zod.z.string().describe("The data type of the attribute (e.g., 'string', 'number', 'boolean').").nullable().optional(),
22
+ read_only: zod.z.boolean().describe("Whether the attribute is read-only.").nullable().optional(),
23
+ created_at: zod.z.string().describe("ISO 8601 timestamp when the attribute was created.").nullable().optional(),
24
+ updated_at: zod.z.string().describe("ISO 8601 timestamp when the attribute was last updated.").nullable().optional(),
25
+ description: zod.z.string().describe("Description of the attribute definition.").nullable().optional()
26
+ }).describe("Response model for created user attribute definition.");
27
+ const sanityCreateAttrDefinition = require_action.action("SANITY_CREATE_ATTR_DEFINITION", {
28
+ slug: "sanity-create-attr-definition",
29
+ name: "Create Attribute Definition",
30
+ description: "Tool to create a new user attribute definition in Sanity. Use when you need to define a custom attribute (like 'customer-tier' or 'subscription-level') that can be attached to resources. The key must be unique within the resource. The attribute can have a type of 'string', 'number', or 'boolean' and can optionally be a list of values or read-only.",
31
+ input: SanityCreateAttrDefinitionInput,
32
+ output: SanityCreateAttrDefinitionOutput
33
+ });
34
+ //#endregion
35
+ exports.sanityCreateAttrDefinition = sanityCreateAttrDefinition;
36
+
37
+ //# sourceMappingURL=create-attr-definition.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-attr-definition.cjs","names":["z","action"],"sources":["../../src/actions/create-attr-definition.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SanityCreateAttrDefinitionInput: z.ZodTypeAny = z.object({\n key: z.string().describe(\"The unique key/name for the attribute definition. This must be unique within the resource.\"),\n list: z.boolean().describe(\"When true, the attribute accepts an array of values. When false or omitted, it accepts a single value.\").optional(),\n type: z.enum([\"string\", \"number\", \"boolean\"]).describe(\"The data type of the attribute. Must be one of: 'string', 'number', 'boolean'.\"),\n read_only: z.boolean().describe(\"When true, the attribute value cannot be modified after creation. Defaults to false.\").optional(),\n description: z.string().describe(\"An optional description explaining what this attribute is used for.\").optional(),\n resource_id: z.string().describe(\"The unique identifier of the specific resource (e.g., organization ID, project ID).\"),\n resource_type: z.string().describe(\"The type of resource the attribute definition belongs to. Examples: 'organizations', 'projects', 'datasets'.\"),\n}).describe(\"Request model for creating a user attribute definition in Sanity.\");\nexport const SanityCreateAttrDefinitionOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"The unique identifier for the created attribute definition.\").nullable().optional(),\n key: z.string().describe(\"The unique key/name of the attribute definition.\").nullable().optional(),\n list: z.boolean().describe(\"Whether the attribute accepts an array of values.\").nullable().optional(),\n type: z.string().describe(\"The data type of the attribute (e.g., 'string', 'number', 'boolean').\").nullable().optional(),\n read_only: z.boolean().describe(\"Whether the attribute is read-only.\").nullable().optional(),\n created_at: z.string().describe(\"ISO 8601 timestamp when the attribute was created.\").nullable().optional(),\n updated_at: z.string().describe(\"ISO 8601 timestamp when the attribute was last updated.\").nullable().optional(),\n description: z.string().describe(\"Description of the attribute definition.\").nullable().optional(),\n}).describe(\"Response model for created user attribute definition.\");\n\nexport const sanityCreateAttrDefinition = action(\"SANITY_CREATE_ATTR_DEFINITION\", {\n slug: \"sanity-create-attr-definition\",\n name: \"Create Attribute Definition\",\n description: \"Tool to create a new user attribute definition in Sanity. Use when you need to define a custom attribute (like 'customer-tier' or 'subscription-level') that can be attached to resources. The key must be unique within the resource. The attribute can have a type of 'string', 'number', or 'boolean' and can optionally be a list of values or read-only.\",\n input: SanityCreateAttrDefinitionInput,\n output: SanityCreateAttrDefinitionOutput,\n});\n"],"mappings":";;;AAIA,MAAa,kCAAgDA,IAAAA,EAAE,OAAO;CACpE,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4FAA4F;CACrH,MAAMA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,wGAAwG,CAAC,CAAC,SAAS;CAC9I,MAAMA,IAAAA,EAAE,KAAK;EAAC;EAAU;EAAU;CAAS,CAAC,CAAC,CAAC,SAAS,gFAAgF;CACvI,WAAWA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,sFAAsF,CAAC,CAAC,SAAS;CACjI,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qEAAqE,CAAC,CAAC,SAAS;CACjH,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qFAAqF;CACtH,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8GAA8G;AACnJ,CAAC,CAAC,CAAC,SAAS,mEAAmE;AAC/E,MAAa,mCAAiDA,IAAAA,EAAE,OAAO;CACrE,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3G,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjG,MAAMA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpG,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvH,WAAWA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3F,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1G,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/G,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACnG,CAAC,CAAC,CAAC,SAAS,uDAAuD;AAEnE,MAAa,6BAA6BC,eAAAA,OAAO,iCAAiC;CAChF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/create-attr-definition.d.ts
4
+ declare const SanityCreateAttrDefinitionInput: z.ZodTypeAny;
5
+ declare const SanityCreateAttrDefinitionOutput: z.ZodTypeAny;
6
+ declare const sanityCreateAttrDefinition: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { sanityCreateAttrDefinition };
9
+ //# sourceMappingURL=create-attr-definition.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-attr-definition.d.cts","names":[],"sources":["../../src/actions/create-attr-definition.ts"],"mappings":";;;cAIa,+BAAA,EAAiC,CAAA,CAAE,UAQgC;AAAA,cACnE,gCAAA,EAAkC,CAAA,CAAE,UASmB;AAAA,cAEvD,0BAAA,gCAA0B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/create-attr-definition.d.ts
4
+ declare const SanityCreateAttrDefinitionInput: z.ZodTypeAny;
5
+ declare const SanityCreateAttrDefinitionOutput: z.ZodTypeAny;
6
+ declare const sanityCreateAttrDefinition: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { sanityCreateAttrDefinition };
9
+ //# sourceMappingURL=create-attr-definition.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-attr-definition.d.mts","names":[],"sources":["../../src/actions/create-attr-definition.ts"],"mappings":";;;cAIa,+BAAA,EAAiC,CAAA,CAAE,UAQgC;AAAA,cACnE,gCAAA,EAAkC,CAAA,CAAE,UASmB;AAAA,cAEvD,0BAAA,gCAA0B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,34 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ const sanityCreateAttrDefinition = action("SANITY_CREATE_ATTR_DEFINITION", {
4
+ slug: "sanity-create-attr-definition",
5
+ name: "Create Attribute Definition",
6
+ description: "Tool to create a new user attribute definition in Sanity. Use when you need to define a custom attribute (like 'customer-tier' or 'subscription-level') that can be attached to resources. The key must be unique within the resource. The attribute can have a type of 'string', 'number', or 'boolean' and can optionally be a list of values or read-only.",
7
+ input: z.object({
8
+ key: z.string().describe("The unique key/name for the attribute definition. This must be unique within the resource."),
9
+ list: z.boolean().describe("When true, the attribute accepts an array of values. When false or omitted, it accepts a single value.").optional(),
10
+ type: z.enum([
11
+ "string",
12
+ "number",
13
+ "boolean"
14
+ ]).describe("The data type of the attribute. Must be one of: 'string', 'number', 'boolean'."),
15
+ read_only: z.boolean().describe("When true, the attribute value cannot be modified after creation. Defaults to false.").optional(),
16
+ description: z.string().describe("An optional description explaining what this attribute is used for.").optional(),
17
+ resource_id: z.string().describe("The unique identifier of the specific resource (e.g., organization ID, project ID)."),
18
+ resource_type: z.string().describe("The type of resource the attribute definition belongs to. Examples: 'organizations', 'projects', 'datasets'.")
19
+ }).describe("Request model for creating a user attribute definition in Sanity."),
20
+ output: z.object({
21
+ id: z.string().describe("The unique identifier for the created attribute definition.").nullable().optional(),
22
+ key: z.string().describe("The unique key/name of the attribute definition.").nullable().optional(),
23
+ list: z.boolean().describe("Whether the attribute accepts an array of values.").nullable().optional(),
24
+ type: z.string().describe("The data type of the attribute (e.g., 'string', 'number', 'boolean').").nullable().optional(),
25
+ read_only: z.boolean().describe("Whether the attribute is read-only.").nullable().optional(),
26
+ created_at: z.string().describe("ISO 8601 timestamp when the attribute was created.").nullable().optional(),
27
+ updated_at: z.string().describe("ISO 8601 timestamp when the attribute was last updated.").nullable().optional(),
28
+ description: z.string().describe("Description of the attribute definition.").nullable().optional()
29
+ }).describe("Response model for created user attribute definition.")
30
+ });
31
+ //#endregion
32
+ export { sanityCreateAttrDefinition };
33
+
34
+ //# sourceMappingURL=create-attr-definition.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-attr-definition.mjs","names":[],"sources":["../../src/actions/create-attr-definition.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SanityCreateAttrDefinitionInput: z.ZodTypeAny = z.object({\n key: z.string().describe(\"The unique key/name for the attribute definition. This must be unique within the resource.\"),\n list: z.boolean().describe(\"When true, the attribute accepts an array of values. When false or omitted, it accepts a single value.\").optional(),\n type: z.enum([\"string\", \"number\", \"boolean\"]).describe(\"The data type of the attribute. Must be one of: 'string', 'number', 'boolean'.\"),\n read_only: z.boolean().describe(\"When true, the attribute value cannot be modified after creation. Defaults to false.\").optional(),\n description: z.string().describe(\"An optional description explaining what this attribute is used for.\").optional(),\n resource_id: z.string().describe(\"The unique identifier of the specific resource (e.g., organization ID, project ID).\"),\n resource_type: z.string().describe(\"The type of resource the attribute definition belongs to. Examples: 'organizations', 'projects', 'datasets'.\"),\n}).describe(\"Request model for creating a user attribute definition in Sanity.\");\nexport const SanityCreateAttrDefinitionOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"The unique identifier for the created attribute definition.\").nullable().optional(),\n key: z.string().describe(\"The unique key/name of the attribute definition.\").nullable().optional(),\n list: z.boolean().describe(\"Whether the attribute accepts an array of values.\").nullable().optional(),\n type: z.string().describe(\"The data type of the attribute (e.g., 'string', 'number', 'boolean').\").nullable().optional(),\n read_only: z.boolean().describe(\"Whether the attribute is read-only.\").nullable().optional(),\n created_at: z.string().describe(\"ISO 8601 timestamp when the attribute was created.\").nullable().optional(),\n updated_at: z.string().describe(\"ISO 8601 timestamp when the attribute was last updated.\").nullable().optional(),\n description: z.string().describe(\"Description of the attribute definition.\").nullable().optional(),\n}).describe(\"Response model for created user attribute definition.\");\n\nexport const sanityCreateAttrDefinition = action(\"SANITY_CREATE_ATTR_DEFINITION\", {\n slug: \"sanity-create-attr-definition\",\n name: \"Create Attribute Definition\",\n description: \"Tool to create a new user attribute definition in Sanity. Use when you need to define a custom attribute (like 'customer-tier' or 'subscription-level') that can be attached to resources. The key must be unique within the resource. The attribute can have a type of 'string', 'number', or 'boolean' and can optionally be a list of values or read-only.\",\n input: SanityCreateAttrDefinitionInput,\n output: SanityCreateAttrDefinitionOutput,\n});\n"],"mappings":";;AAwBA,MAAa,6BAA6B,OAAO,iCAAiC;CAChF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAxB2D,EAAE,OAAO;EACpE,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,4FAA4F;EACrH,MAAM,EAAE,QAAQ,CAAC,CAAC,SAAS,wGAAwG,CAAC,CAAC,SAAS;EAC9I,MAAM,EAAE,KAAK;GAAC;GAAU;GAAU;EAAS,CAAC,CAAC,CAAC,SAAS,gFAAgF;EACvI,WAAW,EAAE,QAAQ,CAAC,CAAC,SAAS,sFAAsF,CAAC,CAAC,SAAS;EACjI,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,qEAAqE,CAAC,CAAC,SAAS;EACjH,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,qFAAqF;EACtH,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,8GAA8G;CACnJ,CAAC,CAAC,CAAC,SAAS,mEAgBH;CACP,QAhB4D,EAAE,OAAO;EACrE,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC3G,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACjG,MAAM,EAAE,QAAQ,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACpG,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACvH,WAAW,EAAE,QAAQ,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC3F,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC1G,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC/G,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnG,CAAC,CAAC,CAAC,SAAS,uDAOF;AACV,CAAC"}
@@ -0,0 +1,27 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/create-prompt-post.ts
4
+ const SanityCreatePromptPostInput = zod.z.object({
5
+ config: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Agent configuration. Controls behavior, capabilities, and document access.").optional(),
6
+ format: zod.z.enum(["markdown", "directives"]).default("markdown").describe("Controls how directives in the response are formatted.").optional(),
7
+ message: zod.z.string().describe("The prompt message to send to the agent"),
8
+ instructions: zod.z.string().describe("Custom instructions for the agent").optional(),
9
+ organizationId: zod.z.string().describe("Your Sanity organization ID")
10
+ }).describe("Request model for sending a one-shot prompt to the Sanity Content Agent.\nStateless endpoint - no thread management or message persistence.\nIdeal for simple, single-turn interactions.");
11
+ const SanityCreatePromptPostOutput = zod.z.object({
12
+ text: zod.z.string().describe("The text content of the agent's response.").nullable().optional(),
13
+ usage: zod.z.object({}).describe("Token usage statistics for the request.").nullable().optional(),
14
+ finishReason: zod.z.string().describe("The reason the model stopped generating (e.g., 'stop', 'length').").nullable().optional(),
15
+ raw_response: zod.z.string().describe("The raw response data from the API.").nullable().optional()
16
+ }).describe("Response model for the prompt endpoint.");
17
+ const sanityCreatePromptPost = require_action.action("SANITY_CREATE_PROMPT_POST", {
18
+ slug: "sanity-create-prompt-post",
19
+ name: "Create Prompt Post",
20
+ description: "Send a one-shot prompt to the Sanity Content Agent. Stateless one-shot prompt endpoint. No thread management or message persistence. Ideal for simple, single-turn interactions. Use when you need to send a single prompt and receive a response without maintaining conversation context.",
21
+ input: SanityCreatePromptPostInput,
22
+ output: SanityCreatePromptPostOutput
23
+ });
24
+ //#endregion
25
+ exports.sanityCreatePromptPost = sanityCreatePromptPost;
26
+
27
+ //# sourceMappingURL=create-prompt-post.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-prompt-post.cjs","names":["z","action"],"sources":["../../src/actions/create-prompt-post.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SanityCreatePromptPostInput: z.ZodTypeAny = z.object({\n config: z.record(z.string(), z.unknown()).describe(\"Agent configuration. Controls behavior, capabilities, and document access.\").optional(),\n format: z.enum([\"markdown\", \"directives\"]).default(\"markdown\").describe(\"Controls how directives in the response are formatted.\").optional(),\n message: z.string().describe(\"The prompt message to send to the agent\"),\n instructions: z.string().describe(\"Custom instructions for the agent\").optional(),\n organizationId: z.string().describe(\"Your Sanity organization ID\"),\n}).describe(\"Request model for sending a one-shot prompt to the Sanity Content Agent.\\nStateless endpoint - no thread management or message persistence.\\nIdeal for simple, single-turn interactions.\");\nexport const SanityCreatePromptPostOutput: z.ZodTypeAny = z.object({\n text: z.string().describe(\"The text content of the agent's response.\").nullable().optional(),\n usage: z.object({}).describe(\"Token usage statistics for the request.\").nullable().optional(),\n finishReason: z.string().describe(\"The reason the model stopped generating (e.g., 'stop', 'length').\").nullable().optional(),\n raw_response: z.string().describe(\"The raw response data from the API.\").nullable().optional(),\n}).describe(\"Response model for the prompt endpoint.\");\n\nexport const sanityCreatePromptPost = action(\"SANITY_CREATE_PROMPT_POST\", {\n slug: \"sanity-create-prompt-post\",\n name: \"Create Prompt Post\",\n description: \"Send a one-shot prompt to the Sanity Content Agent. Stateless one-shot prompt endpoint. No thread management or message persistence. Ideal for simple, single-turn interactions. Use when you need to send a single prompt and receive a response without maintaining conversation context.\",\n input: SanityCreatePromptPostInput,\n output: SanityCreatePromptPostOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA4CA,IAAAA,EAAE,OAAO;CAChE,QAAQA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,4EAA4E,CAAC,CAAC,SAAS;CAC1I,QAAQA,IAAAA,EAAE,KAAK,CAAC,YAAY,YAAY,CAAC,CAAC,CAAC,QAAQ,UAAU,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS;CAC3I,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC;CACtE,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CAChF,gBAAgBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B;AACnE,CAAC,CAAC,CAAC,SAAS,0LAA0L;AACtM,MAAa,+BAA6CA,IAAAA,EAAE,OAAO;CACjE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3F,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5F,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3H,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC/F,CAAC,CAAC,CAAC,SAAS,yCAAyC;AAErD,MAAa,yBAAyBC,eAAAA,OAAO,6BAA6B;CACxE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/create-prompt-post.d.ts
4
+ declare const SanityCreatePromptPostInput: z.ZodTypeAny;
5
+ declare const SanityCreatePromptPostOutput: z.ZodTypeAny;
6
+ declare const sanityCreatePromptPost: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { sanityCreatePromptPost };
9
+ //# sourceMappingURL=create-prompt-post.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-prompt-post.d.cts","names":[],"sources":["../../src/actions/create-prompt-post.ts"],"mappings":";;;cAIa,2BAAA,EAA6B,CAAA,CAAE,UAM2J;AAAA,cAC1L,4BAAA,EAA8B,CAAA,CAAE,UAKS;AAAA,cAEzC,sBAAA,gCAAsB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/create-prompt-post.d.ts
4
+ declare const SanityCreatePromptPostInput: z.ZodTypeAny;
5
+ declare const SanityCreatePromptPostOutput: z.ZodTypeAny;
6
+ declare const sanityCreatePromptPost: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { sanityCreatePromptPost };
9
+ //# sourceMappingURL=create-prompt-post.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-prompt-post.d.mts","names":[],"sources":["../../src/actions/create-prompt-post.ts"],"mappings":";;;cAIa,2BAAA,EAA6B,CAAA,CAAE,UAM2J;AAAA,cAC1L,4BAAA,EAA8B,CAAA,CAAE,UAKS;AAAA,cAEzC,sBAAA,gCAAsB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,24 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ const sanityCreatePromptPost = action("SANITY_CREATE_PROMPT_POST", {
4
+ slug: "sanity-create-prompt-post",
5
+ name: "Create Prompt Post",
6
+ description: "Send a one-shot prompt to the Sanity Content Agent. Stateless one-shot prompt endpoint. No thread management or message persistence. Ideal for simple, single-turn interactions. Use when you need to send a single prompt and receive a response without maintaining conversation context.",
7
+ input: z.object({
8
+ config: z.record(z.string(), z.unknown()).describe("Agent configuration. Controls behavior, capabilities, and document access.").optional(),
9
+ format: z.enum(["markdown", "directives"]).default("markdown").describe("Controls how directives in the response are formatted.").optional(),
10
+ message: z.string().describe("The prompt message to send to the agent"),
11
+ instructions: z.string().describe("Custom instructions for the agent").optional(),
12
+ organizationId: z.string().describe("Your Sanity organization ID")
13
+ }).describe("Request model for sending a one-shot prompt to the Sanity Content Agent.\nStateless endpoint - no thread management or message persistence.\nIdeal for simple, single-turn interactions."),
14
+ output: z.object({
15
+ text: z.string().describe("The text content of the agent's response.").nullable().optional(),
16
+ usage: z.object({}).describe("Token usage statistics for the request.").nullable().optional(),
17
+ finishReason: z.string().describe("The reason the model stopped generating (e.g., 'stop', 'length').").nullable().optional(),
18
+ raw_response: z.string().describe("The raw response data from the API.").nullable().optional()
19
+ }).describe("Response model for the prompt endpoint.")
20
+ });
21
+ //#endregion
22
+ export { sanityCreatePromptPost };
23
+
24
+ //# sourceMappingURL=create-prompt-post.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-prompt-post.mjs","names":[],"sources":["../../src/actions/create-prompt-post.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SanityCreatePromptPostInput: z.ZodTypeAny = z.object({\n config: z.record(z.string(), z.unknown()).describe(\"Agent configuration. Controls behavior, capabilities, and document access.\").optional(),\n format: z.enum([\"markdown\", \"directives\"]).default(\"markdown\").describe(\"Controls how directives in the response are formatted.\").optional(),\n message: z.string().describe(\"The prompt message to send to the agent\"),\n instructions: z.string().describe(\"Custom instructions for the agent\").optional(),\n organizationId: z.string().describe(\"Your Sanity organization ID\"),\n}).describe(\"Request model for sending a one-shot prompt to the Sanity Content Agent.\\nStateless endpoint - no thread management or message persistence.\\nIdeal for simple, single-turn interactions.\");\nexport const SanityCreatePromptPostOutput: z.ZodTypeAny = z.object({\n text: z.string().describe(\"The text content of the agent's response.\").nullable().optional(),\n usage: z.object({}).describe(\"Token usage statistics for the request.\").nullable().optional(),\n finishReason: z.string().describe(\"The reason the model stopped generating (e.g., 'stop', 'length').\").nullable().optional(),\n raw_response: z.string().describe(\"The raw response data from the API.\").nullable().optional(),\n}).describe(\"Response model for the prompt endpoint.\");\n\nexport const sanityCreatePromptPost = action(\"SANITY_CREATE_PROMPT_POST\", {\n slug: \"sanity-create-prompt-post\",\n name: \"Create Prompt Post\",\n description: \"Send a one-shot prompt to the Sanity Content Agent. Stateless one-shot prompt endpoint. No thread management or message persistence. Ideal for simple, single-turn interactions. Use when you need to send a single prompt and receive a response without maintaining conversation context.\",\n input: SanityCreatePromptPostInput,\n output: SanityCreatePromptPostOutput,\n});\n"],"mappings":";;AAkBA,MAAa,yBAAyB,OAAO,6BAA6B;CACxE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAlBuD,EAAE,OAAO;EAChE,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,4EAA4E,CAAC,CAAC,SAAS;EAC1I,QAAQ,EAAE,KAAK,CAAC,YAAY,YAAY,CAAC,CAAC,CAAC,QAAQ,UAAU,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS;EAC3I,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC;EACtE,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;EAChF,gBAAgB,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B;CACnE,CAAC,CAAC,CAAC,SAAS,0LAYH;CACP,QAZwD,EAAE,OAAO;EACjE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC3F,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC5F,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC3H,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/F,CAAC,CAAC,CAAC,SAAS,yCAOF;AACV,CAAC"}
@@ -0,0 +1,20 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/delete-attr-definition.ts
4
+ const SanityDeleteAttrDefinitionInput = zod.z.object({
5
+ resource_id: zod.z.string().describe("The unique identifier of the resource. For organizations, this is typically like 'oN7sjLEfL'. For projects, this is the project ID."),
6
+ definition_id: zod.z.string().describe("The unique identifier of the attribute definition to delete."),
7
+ resource_type: zod.z.enum(["organization", "project"]).describe("The type of resource to scope the user attribute definitions to. Common values: 'organization' or 'project'.")
8
+ });
9
+ const SanityDeleteAttrDefinitionOutput = zod.z.object({ deleted: zod.z.boolean().describe("Whether the attribute definition was successfully deleted.") }).describe("Response schema for deleting an attribute definition.");
10
+ const sanityDeleteAttrDefinition = require_action.action("SANITY_DELETE_ATTR_DEFINITION", {
11
+ slug: "sanity-delete-attr-definition",
12
+ name: "Delete User Attribute Definition",
13
+ description: "Delete a user attribute definition. Use when you need to remove a custom attribute definition from an organization or project in Sanity. The attribute definition controls how user attributes are structured and validated for a given resource. Deleting a definition does not delete existing user attribute values, but users will no longer be able to set values for that attribute.",
14
+ input: SanityDeleteAttrDefinitionInput,
15
+ output: SanityDeleteAttrDefinitionOutput
16
+ });
17
+ //#endregion
18
+ exports.sanityDeleteAttrDefinition = sanityDeleteAttrDefinition;
19
+
20
+ //# sourceMappingURL=delete-attr-definition.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-attr-definition.cjs","names":["z","action"],"sources":["../../src/actions/delete-attr-definition.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SanityDeleteAttrDefinitionInput: z.ZodTypeAny = z.object({\n resource_id: z.string().describe(\"The unique identifier of the resource. For organizations, this is typically like 'oN7sjLEfL'. For projects, this is the project ID.\"),\n definition_id: z.string().describe(\"The unique identifier of the attribute definition to delete.\"),\n resource_type: z.enum([\"organization\", \"project\"]).describe(\"The type of resource to scope the user attribute definitions to. Common values: 'organization' or 'project'.\"),\n});\nexport const SanityDeleteAttrDefinitionOutput: z.ZodTypeAny = z.object({\n deleted: z.boolean().describe(\"Whether the attribute definition was successfully deleted.\"),\n}).describe(\"Response schema for deleting an attribute definition.\");\n\nexport const sanityDeleteAttrDefinition = action(\"SANITY_DELETE_ATTR_DEFINITION\", {\n slug: \"sanity-delete-attr-definition\",\n name: \"Delete User Attribute Definition\",\n description: \"Delete a user attribute definition. Use when you need to remove a custom attribute definition from an organization or project in Sanity. The attribute definition controls how user attributes are structured and validated for a given resource. Deleting a definition does not delete existing user attribute values, but users will no longer be able to set values for that attribute.\",\n input: SanityDeleteAttrDefinitionInput,\n output: SanityDeleteAttrDefinitionOutput,\n});\n"],"mappings":";;;AAIA,MAAa,kCAAgDA,IAAAA,EAAE,OAAO;CACpE,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qIAAqI;CACtK,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D;CACjG,eAAeA,IAAAA,EAAE,KAAK,CAAC,gBAAgB,SAAS,CAAC,CAAC,CAAC,SAAS,8GAA8G;AAC5K,CAAC;AACD,MAAa,mCAAiDA,IAAAA,EAAE,OAAO,EACrE,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,4DAA4D,EAC5F,CAAC,CAAC,CAAC,SAAS,uDAAuD;AAEnE,MAAa,6BAA6BC,eAAAA,OAAO,iCAAiC;CAChF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/delete-attr-definition.d.ts
4
+ declare const SanityDeleteAttrDefinitionInput: z.ZodTypeAny;
5
+ declare const SanityDeleteAttrDefinitionOutput: z.ZodTypeAny;
6
+ declare const sanityDeleteAttrDefinition: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { sanityDeleteAttrDefinition };
9
+ //# sourceMappingURL=delete-attr-definition.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-attr-definition.d.cts","names":[],"sources":["../../src/actions/delete-attr-definition.ts"],"mappings":";;;cAIa,+BAAA,EAAiC,CAAA,CAAE,UAI9C;AAAA,cACW,gCAAA,EAAkC,CAAA,CAAE,UAEmB;AAAA,cAEvD,0BAAA,gCAA0B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/delete-attr-definition.d.ts
4
+ declare const SanityDeleteAttrDefinitionInput: z.ZodTypeAny;
5
+ declare const SanityDeleteAttrDefinitionOutput: z.ZodTypeAny;
6
+ declare const sanityDeleteAttrDefinition: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { sanityDeleteAttrDefinition };
9
+ //# sourceMappingURL=delete-attr-definition.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-attr-definition.d.mts","names":[],"sources":["../../src/actions/delete-attr-definition.ts"],"mappings":";;;cAIa,+BAAA,EAAiC,CAAA,CAAE,UAI9C;AAAA,cACW,gCAAA,EAAkC,CAAA,CAAE,UAEmB;AAAA,cAEvD,0BAAA,gCAA0B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,17 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ const sanityDeleteAttrDefinition = action("SANITY_DELETE_ATTR_DEFINITION", {
4
+ slug: "sanity-delete-attr-definition",
5
+ name: "Delete User Attribute Definition",
6
+ description: "Delete a user attribute definition. Use when you need to remove a custom attribute definition from an organization or project in Sanity. The attribute definition controls how user attributes are structured and validated for a given resource. Deleting a definition does not delete existing user attribute values, but users will no longer be able to set values for that attribute.",
7
+ input: z.object({
8
+ resource_id: z.string().describe("The unique identifier of the resource. For organizations, this is typically like 'oN7sjLEfL'. For projects, this is the project ID."),
9
+ definition_id: z.string().describe("The unique identifier of the attribute definition to delete."),
10
+ resource_type: z.enum(["organization", "project"]).describe("The type of resource to scope the user attribute definitions to. Common values: 'organization' or 'project'.")
11
+ }),
12
+ output: z.object({ deleted: z.boolean().describe("Whether the attribute definition was successfully deleted.") }).describe("Response schema for deleting an attribute definition.")
13
+ });
14
+ //#endregion
15
+ export { sanityDeleteAttrDefinition };
16
+
17
+ //# sourceMappingURL=delete-attr-definition.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-attr-definition.mjs","names":[],"sources":["../../src/actions/delete-attr-definition.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SanityDeleteAttrDefinitionInput: z.ZodTypeAny = z.object({\n resource_id: z.string().describe(\"The unique identifier of the resource. For organizations, this is typically like 'oN7sjLEfL'. For projects, this is the project ID.\"),\n definition_id: z.string().describe(\"The unique identifier of the attribute definition to delete.\"),\n resource_type: z.enum([\"organization\", \"project\"]).describe(\"The type of resource to scope the user attribute definitions to. Common values: 'organization' or 'project'.\"),\n});\nexport const SanityDeleteAttrDefinitionOutput: z.ZodTypeAny = z.object({\n deleted: z.boolean().describe(\"Whether the attribute definition was successfully deleted.\"),\n}).describe(\"Response schema for deleting an attribute definition.\");\n\nexport const sanityDeleteAttrDefinition = action(\"SANITY_DELETE_ATTR_DEFINITION\", {\n slug: \"sanity-delete-attr-definition\",\n name: \"Delete User Attribute Definition\",\n description: \"Delete a user attribute definition. Use when you need to remove a custom attribute definition from an organization or project in Sanity. The attribute definition controls how user attributes are structured and validated for a given resource. Deleting a definition does not delete existing user attribute values, but users will no longer be able to set values for that attribute.\",\n input: SanityDeleteAttrDefinitionInput,\n output: SanityDeleteAttrDefinitionOutput,\n});\n"],"mappings":";;AAaA,MAAa,6BAA6B,OAAO,iCAAiC;CAChF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAb2D,EAAE,OAAO;EACpE,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,qIAAqI;EACtK,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D;EACjG,eAAe,EAAE,KAAK,CAAC,gBAAgB,SAAS,CAAC,CAAC,CAAC,SAAS,8GAA8G;CAC5K,CASS;CACP,QAT4D,EAAE,OAAO,EACrE,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,4DAA4D,EAC5F,CAAC,CAAC,CAAC,SAAS,uDAOF;AACV,CAAC"}
@@ -0,0 +1,30 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/delete-document.ts
4
+ const SanityDeleteDocumentInput = zod.z.object({
5
+ purge: zod.z.boolean().describe("If true, permanently removes the document from the history. If false or omitted, the document is soft-deleted and can be recovered.").optional(),
6
+ query: zod.z.string().describe("GROQ query string to select documents for deletion. Query-based deletions are limited to 10,000 documents. Either document_id or query must be provided, not both.").optional(),
7
+ params: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Optional parameters for the GROQ query when using query-based deletion. Use $variableName syntax in the query.").optional(),
8
+ dataset: zod.z.string().describe("The dataset name where the document resides."),
9
+ dry_run: zod.z.boolean().describe("If true, simulates the deletion without actually modifying any documents. Useful for testing.").optional(),
10
+ project_id: zod.z.string().describe("The Sanity project ID where the document resides."),
11
+ return_ids: zod.z.boolean().describe("If true, returns the IDs of deleted documents in the response.").optional(),
12
+ document_id: zod.z.string().describe("The ID of the specific document to delete. Either document_id or query must be provided, not both.").optional(),
13
+ return_documents: zod.z.boolean().describe("If true, returns the full document content of deleted documents in the response.").optional()
14
+ }).describe("Request model for deleting a document from Sanity.");
15
+ const SanityDeleteDocumentOutput = zod.z.object({
16
+ results: zod.z.array(zod.z.record(zod.z.string(), zod.z.unknown())).describe("List of full document objects that were deleted. Only present if return_documents was true.").nullable().optional(),
17
+ documentIds: zod.z.array(zod.z.string()).describe("List of document IDs that were deleted. Only present if return_ids was true.").nullable().optional(),
18
+ transactionId: zod.z.string().describe("Unique identifier for this mutation transaction.").nullable().optional()
19
+ }).describe("Response model for the delete document operation.");
20
+ const sanityDeleteDocument = require_action.action("SANITY_DELETE_DOCUMENT", {
21
+ slug: "sanity-delete-document",
22
+ name: "Delete Document",
23
+ description: "Delete a document from Sanity by ID or query. This action is irreversible when purge is true — the document cannot be recovered once permanently deleted. Use when you need to remove a specific document by ID or bulk delete documents matching a GROQ query (limited to 10,000 documents per operation). For large deletions, paginate by document ID. Set dry_run to true to test the operation without modifying data.",
24
+ input: SanityDeleteDocumentInput,
25
+ output: SanityDeleteDocumentOutput
26
+ });
27
+ //#endregion
28
+ exports.sanityDeleteDocument = sanityDeleteDocument;
29
+
30
+ //# sourceMappingURL=delete-document.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-document.cjs","names":["z","action"],"sources":["../../src/actions/delete-document.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SanityDeleteDocumentInput: z.ZodTypeAny = z.object({\n purge: z.boolean().describe(\"If true, permanently removes the document from the history. If false or omitted, the document is soft-deleted and can be recovered.\").optional(),\n query: z.string().describe(\"GROQ query string to select documents for deletion. Query-based deletions are limited to 10,000 documents. Either document_id or query must be provided, not both.\").optional(),\n params: z.record(z.string(), z.unknown()).describe(\"Optional parameters for the GROQ query when using query-based deletion. Use $variableName syntax in the query.\").optional(),\n dataset: z.string().describe(\"The dataset name where the document resides.\"),\n dry_run: z.boolean().describe(\"If true, simulates the deletion without actually modifying any documents. Useful for testing.\").optional(),\n project_id: z.string().describe(\"The Sanity project ID where the document resides.\"),\n return_ids: z.boolean().describe(\"If true, returns the IDs of deleted documents in the response.\").optional(),\n document_id: z.string().describe(\"The ID of the specific document to delete. Either document_id or query must be provided, not both.\").optional(),\n return_documents: z.boolean().describe(\"If true, returns the full document content of deleted documents in the response.\").optional(),\n}).describe(\"Request model for deleting a document from Sanity.\");\nexport const SanityDeleteDocumentOutput: z.ZodTypeAny = z.object({\n results: z.array(z.record(z.string(), z.unknown())).describe(\"List of full document objects that were deleted. Only present if return_documents was true.\").nullable().optional(),\n documentIds: z.array(z.string()).describe(\"List of document IDs that were deleted. Only present if return_ids was true.\").nullable().optional(),\n transactionId: z.string().describe(\"Unique identifier for this mutation transaction.\").nullable().optional(),\n}).describe(\"Response model for the delete document operation.\");\n\nexport const sanityDeleteDocument = action(\"SANITY_DELETE_DOCUMENT\", {\n slug: \"sanity-delete-document\",\n name: \"Delete Document\",\n description: \"Delete a document from Sanity by ID or query. This action is irreversible when purge is true — the document cannot be recovered once permanently deleted. Use when you need to remove a specific document by ID or bulk delete documents matching a GROQ query (limited to 10,000 documents per operation). For large deletions, paginate by document ID. Set dry_run to true to test the operation without modifying data.\",\n input: SanityDeleteDocumentInput,\n output: SanityDeleteDocumentOutput,\n});\n"],"mappings":";;;AAIA,MAAa,4BAA0CA,IAAAA,EAAE,OAAO;CAC9D,OAAOA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,qIAAqI,CAAC,CAAC,SAAS;CAC5K,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oKAAoK,CAAC,CAAC,SAAS;CAC1M,QAAQA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,gHAAgH,CAAC,CAAC,SAAS;CAC9K,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C;CAC3E,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,+FAA+F,CAAC,CAAC,SAAS;CACxI,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD;CACnF,YAAYA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;CAC5G,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oGAAoG,CAAC,CAAC,SAAS;CAChJ,kBAAkBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,kFAAkF,CAAC,CAAC,SAAS;AACtI,CAAC,CAAC,CAAC,SAAS,oDAAoD;AAChE,MAAa,6BAA2CA,IAAAA,EAAE,OAAO;CAC/D,SAASA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,6FAA6F,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChL,aAAaA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,8EAA8E,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC9I,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC7G,CAAC,CAAC,CAAC,SAAS,mDAAmD;AAE/D,MAAa,uBAAuBC,eAAAA,OAAO,0BAA0B;CACnE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/delete-document.d.ts
4
+ declare const SanityDeleteDocumentInput: z.ZodTypeAny;
5
+ declare const SanityDeleteDocumentOutput: z.ZodTypeAny;
6
+ declare const sanityDeleteDocument: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { sanityDeleteDocument };
9
+ //# sourceMappingURL=delete-document.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-document.d.cts","names":[],"sources":["../../src/actions/delete-document.ts"],"mappings":";;;cAIa,yBAAA,EAA2B,CAAA,CAAE,UAUuB;AAAA,cACpD,0BAAA,EAA4B,CAAA,CAAE,UAIqB;AAAA,cAEnD,oBAAA,gCAAoB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/delete-document.d.ts
4
+ declare const SanityDeleteDocumentInput: z.ZodTypeAny;
5
+ declare const SanityDeleteDocumentOutput: z.ZodTypeAny;
6
+ declare const sanityDeleteDocument: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { sanityDeleteDocument };
9
+ //# sourceMappingURL=delete-document.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-document.d.mts","names":[],"sources":["../../src/actions/delete-document.ts"],"mappings":";;;cAIa,yBAAA,EAA2B,CAAA,CAAE,UAUuB;AAAA,cACpD,0BAAA,EAA4B,CAAA,CAAE,UAIqB;AAAA,cAEnD,oBAAA,gCAAoB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,27 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ const sanityDeleteDocument = action("SANITY_DELETE_DOCUMENT", {
4
+ slug: "sanity-delete-document",
5
+ name: "Delete Document",
6
+ description: "Delete a document from Sanity by ID or query. This action is irreversible when purge is true — the document cannot be recovered once permanently deleted. Use when you need to remove a specific document by ID or bulk delete documents matching a GROQ query (limited to 10,000 documents per operation). For large deletions, paginate by document ID. Set dry_run to true to test the operation without modifying data.",
7
+ input: z.object({
8
+ purge: z.boolean().describe("If true, permanently removes the document from the history. If false or omitted, the document is soft-deleted and can be recovered.").optional(),
9
+ query: z.string().describe("GROQ query string to select documents for deletion. Query-based deletions are limited to 10,000 documents. Either document_id or query must be provided, not both.").optional(),
10
+ params: z.record(z.string(), z.unknown()).describe("Optional parameters for the GROQ query when using query-based deletion. Use $variableName syntax in the query.").optional(),
11
+ dataset: z.string().describe("The dataset name where the document resides."),
12
+ dry_run: z.boolean().describe("If true, simulates the deletion without actually modifying any documents. Useful for testing.").optional(),
13
+ project_id: z.string().describe("The Sanity project ID where the document resides."),
14
+ return_ids: z.boolean().describe("If true, returns the IDs of deleted documents in the response.").optional(),
15
+ document_id: z.string().describe("The ID of the specific document to delete. Either document_id or query must be provided, not both.").optional(),
16
+ return_documents: z.boolean().describe("If true, returns the full document content of deleted documents in the response.").optional()
17
+ }).describe("Request model for deleting a document from Sanity."),
18
+ output: z.object({
19
+ results: z.array(z.record(z.string(), z.unknown())).describe("List of full document objects that were deleted. Only present if return_documents was true.").nullable().optional(),
20
+ documentIds: z.array(z.string()).describe("List of document IDs that were deleted. Only present if return_ids was true.").nullable().optional(),
21
+ transactionId: z.string().describe("Unique identifier for this mutation transaction.").nullable().optional()
22
+ }).describe("Response model for the delete document operation.")
23
+ });
24
+ //#endregion
25
+ export { sanityDeleteDocument };
26
+
27
+ //# sourceMappingURL=delete-document.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-document.mjs","names":[],"sources":["../../src/actions/delete-document.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SanityDeleteDocumentInput: z.ZodTypeAny = z.object({\n purge: z.boolean().describe(\"If true, permanently removes the document from the history. If false or omitted, the document is soft-deleted and can be recovered.\").optional(),\n query: z.string().describe(\"GROQ query string to select documents for deletion. Query-based deletions are limited to 10,000 documents. Either document_id or query must be provided, not both.\").optional(),\n params: z.record(z.string(), z.unknown()).describe(\"Optional parameters for the GROQ query when using query-based deletion. Use $variableName syntax in the query.\").optional(),\n dataset: z.string().describe(\"The dataset name where the document resides.\"),\n dry_run: z.boolean().describe(\"If true, simulates the deletion without actually modifying any documents. Useful for testing.\").optional(),\n project_id: z.string().describe(\"The Sanity project ID where the document resides.\"),\n return_ids: z.boolean().describe(\"If true, returns the IDs of deleted documents in the response.\").optional(),\n document_id: z.string().describe(\"The ID of the specific document to delete. Either document_id or query must be provided, not both.\").optional(),\n return_documents: z.boolean().describe(\"If true, returns the full document content of deleted documents in the response.\").optional(),\n}).describe(\"Request model for deleting a document from Sanity.\");\nexport const SanityDeleteDocumentOutput: z.ZodTypeAny = z.object({\n results: z.array(z.record(z.string(), z.unknown())).describe(\"List of full document objects that were deleted. Only present if return_documents was true.\").nullable().optional(),\n documentIds: z.array(z.string()).describe(\"List of document IDs that were deleted. Only present if return_ids was true.\").nullable().optional(),\n transactionId: z.string().describe(\"Unique identifier for this mutation transaction.\").nullable().optional(),\n}).describe(\"Response model for the delete document operation.\");\n\nexport const sanityDeleteDocument = action(\"SANITY_DELETE_DOCUMENT\", {\n slug: \"sanity-delete-document\",\n name: \"Delete Document\",\n description: \"Delete a document from Sanity by ID or query. This action is irreversible when purge is true — the document cannot be recovered once permanently deleted. Use when you need to remove a specific document by ID or bulk delete documents matching a GROQ query (limited to 10,000 documents per operation). For large deletions, paginate by document ID. Set dry_run to true to test the operation without modifying data.\",\n input: SanityDeleteDocumentInput,\n output: SanityDeleteDocumentOutput,\n});\n"],"mappings":";;AAqBA,MAAa,uBAAuB,OAAO,0BAA0B;CACnE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OArBqD,EAAE,OAAO;EAC9D,OAAO,EAAE,QAAQ,CAAC,CAAC,SAAS,qIAAqI,CAAC,CAAC,SAAS;EAC5K,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,oKAAoK,CAAC,CAAC,SAAS;EAC1M,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,gHAAgH,CAAC,CAAC,SAAS;EAC9K,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C;EAC3E,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,+FAA+F,CAAC,CAAC,SAAS;EACxI,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD;EACnF,YAAY,EAAE,QAAQ,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;EAC5G,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,oGAAoG,CAAC,CAAC,SAAS;EAChJ,kBAAkB,EAAE,QAAQ,CAAC,CAAC,SAAS,kFAAkF,CAAC,CAAC,SAAS;CACtI,CAAC,CAAC,CAAC,SAAS,oDAWH;CACP,QAXsD,EAAE,OAAO;EAC/D,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,6FAA6F,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAChL,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,8EAA8E,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC9I,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7G,CAAC,CAAC,CAAC,SAAS,mDAOF;AACV,CAAC"}