@keystrokehq/plain 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 (210) 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-customer-to-group.cjs +56 -0
  7. package/dist/actions/add-customer-to-group.cjs.map +1 -0
  8. package/dist/actions/add-customer-to-group.d.cts +9 -0
  9. package/dist/actions/add-customer-to-group.d.cts.map +1 -0
  10. package/dist/actions/add-customer-to-group.d.mts +9 -0
  11. package/dist/actions/add-customer-to-group.d.mts.map +1 -0
  12. package/dist/actions/add-customer-to-group.mjs +55 -0
  13. package/dist/actions/add-customer-to-group.mjs.map +1 -0
  14. package/dist/actions/create-customer-group.cjs +45 -0
  15. package/dist/actions/create-customer-group.cjs.map +1 -0
  16. package/dist/actions/create-customer-group.d.cts +9 -0
  17. package/dist/actions/create-customer-group.d.cts.map +1 -0
  18. package/dist/actions/create-customer-group.d.mts +9 -0
  19. package/dist/actions/create-customer-group.d.mts.map +1 -0
  20. package/dist/actions/create-customer-group.mjs +44 -0
  21. package/dist/actions/create-customer-group.mjs.map +1 -0
  22. package/dist/actions/create-thread.cjs +52 -0
  23. package/dist/actions/create-thread.cjs.map +1 -0
  24. package/dist/actions/create-thread.d.cts +9 -0
  25. package/dist/actions/create-thread.d.cts.map +1 -0
  26. package/dist/actions/create-thread.d.mts +9 -0
  27. package/dist/actions/create-thread.d.mts.map +1 -0
  28. package/dist/actions/create-thread.mjs +51 -0
  29. package/dist/actions/create-thread.mjs.map +1 -0
  30. package/dist/actions/delete-customer.cjs +27 -0
  31. package/dist/actions/delete-customer.cjs.map +1 -0
  32. package/dist/actions/delete-customer.d.cts +9 -0
  33. package/dist/actions/delete-customer.d.cts.map +1 -0
  34. package/dist/actions/delete-customer.d.mts +9 -0
  35. package/dist/actions/delete-customer.d.mts.map +1 -0
  36. package/dist/actions/delete-customer.mjs +26 -0
  37. package/dist/actions/delete-customer.mjs.map +1 -0
  38. package/dist/actions/delete-user.cjs +27 -0
  39. package/dist/actions/delete-user.cjs.map +1 -0
  40. package/dist/actions/delete-user.d.cts +9 -0
  41. package/dist/actions/delete-user.d.cts.map +1 -0
  42. package/dist/actions/delete-user.d.mts +9 -0
  43. package/dist/actions/delete-user.d.mts.map +1 -0
  44. package/dist/actions/delete-user.mjs +26 -0
  45. package/dist/actions/delete-user.mjs.map +1 -0
  46. package/dist/actions/fetch-company.cjs +33 -0
  47. package/dist/actions/fetch-company.cjs.map +1 -0
  48. package/dist/actions/fetch-company.d.cts +9 -0
  49. package/dist/actions/fetch-company.d.cts.map +1 -0
  50. package/dist/actions/fetch-company.d.mts +9 -0
  51. package/dist/actions/fetch-company.d.mts.map +1 -0
  52. package/dist/actions/fetch-company.mjs +32 -0
  53. package/dist/actions/fetch-company.mjs.map +1 -0
  54. package/dist/actions/fetch-issues.cjs +34 -0
  55. package/dist/actions/fetch-issues.cjs.map +1 -0
  56. package/dist/actions/fetch-issues.d.cts +9 -0
  57. package/dist/actions/fetch-issues.d.cts.map +1 -0
  58. package/dist/actions/fetch-issues.d.mts +9 -0
  59. package/dist/actions/fetch-issues.d.mts.map +1 -0
  60. package/dist/actions/fetch-issues.mjs +33 -0
  61. package/dist/actions/fetch-issues.mjs.map +1 -0
  62. package/dist/actions/fetch-tier.cjs +31 -0
  63. package/dist/actions/fetch-tier.cjs.map +1 -0
  64. package/dist/actions/fetch-tier.d.cts +9 -0
  65. package/dist/actions/fetch-tier.d.cts.map +1 -0
  66. package/dist/actions/fetch-tier.d.mts +9 -0
  67. package/dist/actions/fetch-tier.d.mts.map +1 -0
  68. package/dist/actions/fetch-tier.mjs +30 -0
  69. package/dist/actions/fetch-tier.mjs.map +1 -0
  70. package/dist/actions/get-customer-by-email.cjs +31 -0
  71. package/dist/actions/get-customer-by-email.cjs.map +1 -0
  72. package/dist/actions/get-customer-by-email.d.cts +9 -0
  73. package/dist/actions/get-customer-by-email.d.cts.map +1 -0
  74. package/dist/actions/get-customer-by-email.d.mts +9 -0
  75. package/dist/actions/get-customer-by-email.d.mts.map +1 -0
  76. package/dist/actions/get-customer-by-email.mjs +30 -0
  77. package/dist/actions/get-customer-by-email.mjs.map +1 -0
  78. package/dist/actions/get-customer-by-id.cjs +22 -0
  79. package/dist/actions/get-customer-by-id.cjs.map +1 -0
  80. package/dist/actions/get-customer-by-id.d.cts +9 -0
  81. package/dist/actions/get-customer-by-id.d.cts.map +1 -0
  82. package/dist/actions/get-customer-by-id.d.mts +9 -0
  83. package/dist/actions/get-customer-by-id.d.mts.map +1 -0
  84. package/dist/actions/get-customer-by-id.mjs +19 -0
  85. package/dist/actions/get-customer-by-id.mjs.map +1 -0
  86. package/dist/actions/get-customers.cjs +55 -0
  87. package/dist/actions/get-customers.cjs.map +1 -0
  88. package/dist/actions/get-customers.d.cts +9 -0
  89. package/dist/actions/get-customers.d.cts.map +1 -0
  90. package/dist/actions/get-customers.d.mts +9 -0
  91. package/dist/actions/get-customers.d.mts.map +1 -0
  92. package/dist/actions/get-customers.mjs +54 -0
  93. package/dist/actions/get-customers.mjs.map +1 -0
  94. package/dist/actions/get-thread-by-id.cjs +62 -0
  95. package/dist/actions/get-thread-by-id.cjs.map +1 -0
  96. package/dist/actions/get-thread-by-id.d.cts +9 -0
  97. package/dist/actions/get-thread-by-id.d.cts.map +1 -0
  98. package/dist/actions/get-thread-by-id.d.mts +9 -0
  99. package/dist/actions/get-thread-by-id.d.mts.map +1 -0
  100. package/dist/actions/get-thread-by-id.mjs +61 -0
  101. package/dist/actions/get-thread-by-id.mjs.map +1 -0
  102. package/dist/actions/get-user-by-id.cjs +27 -0
  103. package/dist/actions/get-user-by-id.cjs.map +1 -0
  104. package/dist/actions/get-user-by-id.d.cts +9 -0
  105. package/dist/actions/get-user-by-id.d.cts.map +1 -0
  106. package/dist/actions/get-user-by-id.d.mts +9 -0
  107. package/dist/actions/get-user-by-id.d.mts.map +1 -0
  108. package/dist/actions/get-user-by-id.mjs +26 -0
  109. package/dist/actions/get-user-by-id.mjs.map +1 -0
  110. package/dist/actions/index.cjs +45 -0
  111. package/dist/actions/index.d.cts +23 -0
  112. package/dist/actions/index.d.mts +23 -0
  113. package/dist/actions/index.mjs +23 -0
  114. package/dist/actions/list-customer-groups.cjs +45 -0
  115. package/dist/actions/list-customer-groups.cjs.map +1 -0
  116. package/dist/actions/list-customer-groups.d.cts +9 -0
  117. package/dist/actions/list-customer-groups.d.cts.map +1 -0
  118. package/dist/actions/list-customer-groups.d.mts +9 -0
  119. package/dist/actions/list-customer-groups.d.mts.map +1 -0
  120. package/dist/actions/list-customer-groups.mjs +44 -0
  121. package/dist/actions/list-customer-groups.mjs.map +1 -0
  122. package/dist/actions/list-tiers.cjs +41 -0
  123. package/dist/actions/list-tiers.cjs.map +1 -0
  124. package/dist/actions/list-tiers.d.cts +9 -0
  125. package/dist/actions/list-tiers.d.cts.map +1 -0
  126. package/dist/actions/list-tiers.d.mts +9 -0
  127. package/dist/actions/list-tiers.d.mts.map +1 -0
  128. package/dist/actions/list-tiers.mjs +40 -0
  129. package/dist/actions/list-tiers.mjs.map +1 -0
  130. package/dist/actions/query-threads.cjs +43 -0
  131. package/dist/actions/query-threads.cjs.map +1 -0
  132. package/dist/actions/query-threads.d.cts +9 -0
  133. package/dist/actions/query-threads.d.cts.map +1 -0
  134. package/dist/actions/query-threads.d.mts +9 -0
  135. package/dist/actions/query-threads.d.mts.map +1 -0
  136. package/dist/actions/query-threads.mjs +42 -0
  137. package/dist/actions/query-threads.mjs.map +1 -0
  138. package/dist/actions/remove-customer-from-group.cjs +41 -0
  139. package/dist/actions/remove-customer-from-group.cjs.map +1 -0
  140. package/dist/actions/remove-customer-from-group.d.cts +9 -0
  141. package/dist/actions/remove-customer-from-group.d.cts.map +1 -0
  142. package/dist/actions/remove-customer-from-group.d.mts +9 -0
  143. package/dist/actions/remove-customer-from-group.d.mts.map +1 -0
  144. package/dist/actions/remove-customer-from-group.mjs +40 -0
  145. package/dist/actions/remove-customer-from-group.mjs.map +1 -0
  146. package/dist/actions/run-graphql-query.cjs +34 -0
  147. package/dist/actions/run-graphql-query.cjs.map +1 -0
  148. package/dist/actions/run-graphql-query.d.cts +9 -0
  149. package/dist/actions/run-graphql-query.d.cts.map +1 -0
  150. package/dist/actions/run-graphql-query.d.mts +9 -0
  151. package/dist/actions/run-graphql-query.d.mts.map +1 -0
  152. package/dist/actions/run-graphql-query.mjs +33 -0
  153. package/dist/actions/run-graphql-query.mjs.map +1 -0
  154. package/dist/actions/send-message.cjs +37 -0
  155. package/dist/actions/send-message.cjs.map +1 -0
  156. package/dist/actions/send-message.d.cts +9 -0
  157. package/dist/actions/send-message.d.cts.map +1 -0
  158. package/dist/actions/send-message.d.mts +9 -0
  159. package/dist/actions/send-message.d.mts.map +1 -0
  160. package/dist/actions/send-message.mjs +36 -0
  161. package/dist/actions/send-message.mjs.map +1 -0
  162. package/dist/actions/update-company.cjs +45 -0
  163. package/dist/actions/update-company.cjs.map +1 -0
  164. package/dist/actions/update-company.d.cts +9 -0
  165. package/dist/actions/update-company.d.cts.map +1 -0
  166. package/dist/actions/update-company.d.mts +9 -0
  167. package/dist/actions/update-company.d.mts.map +1 -0
  168. package/dist/actions/update-company.mjs +44 -0
  169. package/dist/actions/update-company.mjs.map +1 -0
  170. package/dist/actions/update-thread.cjs +39 -0
  171. package/dist/actions/update-thread.cjs.map +1 -0
  172. package/dist/actions/update-thread.d.cts +9 -0
  173. package/dist/actions/update-thread.d.cts.map +1 -0
  174. package/dist/actions/update-thread.d.mts +9 -0
  175. package/dist/actions/update-thread.d.mts.map +1 -0
  176. package/dist/actions/update-thread.mjs +38 -0
  177. package/dist/actions/update-thread.mjs.map +1 -0
  178. package/dist/actions/upsert-customer.cjs +82 -0
  179. package/dist/actions/upsert-customer.cjs.map +1 -0
  180. package/dist/actions/upsert-customer.d.cts +9 -0
  181. package/dist/actions/upsert-customer.d.cts.map +1 -0
  182. package/dist/actions/upsert-customer.d.mts +9 -0
  183. package/dist/actions/upsert-customer.d.mts.map +1 -0
  184. package/dist/actions/upsert-customer.mjs +81 -0
  185. package/dist/actions/upsert-customer.mjs.map +1 -0
  186. package/dist/app.cjs +9 -0
  187. package/dist/app.cjs.map +1 -0
  188. package/dist/app.d.cts +5 -0
  189. package/dist/app.d.cts.map +1 -0
  190. package/dist/app.d.mts +5 -0
  191. package/dist/app.d.mts.map +1 -0
  192. package/dist/app.mjs +10 -0
  193. package/dist/app.mjs.map +1 -0
  194. package/dist/catalog.cjs +15 -0
  195. package/dist/catalog.cjs.map +1 -0
  196. package/dist/catalog.d.cts +14 -0
  197. package/dist/catalog.d.cts.map +1 -0
  198. package/dist/catalog.d.mts +14 -0
  199. package/dist/catalog.d.mts.map +1 -0
  200. package/dist/catalog.mjs +15 -0
  201. package/dist/catalog.mjs.map +1 -0
  202. package/dist/execute.cjs +18 -0
  203. package/dist/execute.cjs.map +1 -0
  204. package/dist/execute.mjs +18 -0
  205. package/dist/execute.mjs.map +1 -0
  206. package/dist/index.cjs +50 -0
  207. package/dist/index.d.cts +25 -0
  208. package/dist/index.d.mts +25 -0
  209. package/dist/index.mjs +26 -0
  210. package/package.json +49 -0
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # @keystrokehq/plain
2
+
3
+ Keystroke-managed integration.
4
+
5
+ **App:** `plain`
6
+ **Version:** `20260615_00`
7
+ **Actions:** 22
8
+
9
+ ```ts
10
+ import { defineAgent } from "@keystrokehq/keystroke/agent";
11
+ import { plainAddCustomerToGroup } from "@keystrokehq/plain/actions";
12
+
13
+ export default defineAgent({
14
+ key: "plain-agent",
15
+ tools: [plainAddCustomerToGroup],
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.plain.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.executePlainTool(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":["plain","executePlainTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { plain } from \"./app\";\nimport { executePlainTool } 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 plain.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 executePlainTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAOA,YAAAA,MAAM,OAAO;EAClB,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,iBAAiB,MAAM,KAAgC,CAAC;EACxF;CACF,CAAC;AACH"}
@@ -0,0 +1,21 @@
1
+ import { plain } from "./app.mjs";
2
+ import { executePlainTool } 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 plain.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 executePlainTool(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 { plain } from \"./app\";\nimport { executePlainTool } 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 plain.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 executePlainTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAO,MAAM,OAAO;EAClB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,iBAAiB,MAAM,KAAgC,CAAC;EACxF;CACF,CAAC;AACH"}
@@ -0,0 +1,56 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/add-customer-to-group.ts
4
+ const PlainAddCustomerToGroupInput = zod.z.object({
5
+ customerId: zod.z.string().describe("ID of the customer to add to groups."),
6
+ customerGroupIdentifiers: zod.z.array(zod.z.object({
7
+ externalId: zod.z.string().describe("Your external ID for the customer group. NOTE: The Plain API does not support this field for adding customers to groups - use customerGroupId or customerGroupKey instead.").optional(),
8
+ customerGroupId: zod.z.string().describe("Plain internal ID of the customer group. Use this or customerGroupKey (not externalId).").optional(),
9
+ customerGroupKey: zod.z.string().describe("Unique key of the customer group. Use this or customerGroupId (not externalId).").optional()
10
+ })).describe("List of customer group identifiers. Must contain at least one identifier.")
11
+ });
12
+ const PlainAddCustomerToGroup_MutationFieldErrorSchema = zod.z.object({
13
+ type: zod.z.enum([
14
+ "VALIDATION",
15
+ "REQUIRED",
16
+ "NOT_FOUND"
17
+ ]).describe("Type of field error."),
18
+ field: zod.z.string().describe("Name of the field where error occurred."),
19
+ message: zod.z.string().describe("Technical error message.")
20
+ });
21
+ const PlainAddCustomerToGroup_MutationErrorSchema = zod.z.object({
22
+ code: zod.z.string().describe("Fixed error code from the API."),
23
+ type: zod.z.enum([
24
+ "VALIDATION",
25
+ "FORBIDDEN",
26
+ "INTERNAL"
27
+ ]).describe("Type of error."),
28
+ fields: zod.z.array(PlainAddCustomerToGroup_MutationFieldErrorSchema).describe("List of field-specific errors, if any.").nullable().optional(),
29
+ message: zod.z.string().describe("Technical error message.")
30
+ });
31
+ const PlainAddCustomerToGroup_CreatedAtSchema = zod.z.object({ iso8601: zod.z.string().describe("ISO 8601 timestamp of creation.") });
32
+ const PlainAddCustomerToGroup_CustomerGroupSchema = zod.z.object({
33
+ id: zod.z.string().describe("ID of the customer group."),
34
+ key: zod.z.string().describe("Key of the customer group."),
35
+ name: zod.z.string().describe("Name of the customer group.")
36
+ });
37
+ const PlainAddCustomerToGroup_CustomerGroupMembershipSchema = zod.z.object({
38
+ createdAt: PlainAddCustomerToGroup_CreatedAtSchema.nullable(),
39
+ customerId: zod.z.string().describe("ID of the customer."),
40
+ customerGroup: PlainAddCustomerToGroup_CustomerGroupSchema.nullable()
41
+ });
42
+ const PlainAddCustomerToGroupOutput = zod.z.object({
43
+ error: PlainAddCustomerToGroup_MutationErrorSchema.nullable().optional(),
44
+ customerGroupMemberships: zod.z.array(PlainAddCustomerToGroup_CustomerGroupMembershipSchema).nullable().optional()
45
+ });
46
+ const plainAddCustomerToGroup = require_action.action("PLAIN_ADD_CUSTOMER_TO_GROUP", {
47
+ slug: "plain-add-customer-to-group",
48
+ name: "Add Customer To Group",
49
+ description: "Tool to add a customer to one or more customer groups. Use when you have a customer and groups ready.",
50
+ input: PlainAddCustomerToGroupInput,
51
+ output: PlainAddCustomerToGroupOutput
52
+ });
53
+ //#endregion
54
+ exports.plainAddCustomerToGroup = plainAddCustomerToGroup;
55
+
56
+ //# sourceMappingURL=add-customer-to-group.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-customer-to-group.cjs","names":["z","action"],"sources":["../../src/actions/add-customer-to-group.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PlainAddCustomerToGroupInput: z.ZodTypeAny = z.object({\n customerId: z.string().describe(\"ID of the customer to add to groups.\"),\n customerGroupIdentifiers: z.array(z.object({\n externalId: z.string().describe(\"Your external ID for the customer group. NOTE: The Plain API does not support this field for adding customers to groups - use customerGroupId or customerGroupKey instead.\").optional(),\n customerGroupId: z.string().describe(\"Plain internal ID of the customer group. Use this or customerGroupKey (not externalId).\").optional(),\n customerGroupKey: z.string().describe(\"Unique key of the customer group. Use this or customerGroupId (not externalId).\").optional(),\n})).describe(\"List of customer group identifiers. Must contain at least one identifier.\"),\n});\nconst PlainAddCustomerToGroup_MutationFieldErrorSchema: z.ZodTypeAny = z.object({\n type: z.enum([\"VALIDATION\", \"REQUIRED\", \"NOT_FOUND\"]).describe(\"Type of field error.\"),\n field: z.string().describe(\"Name of the field where error occurred.\"),\n message: z.string().describe(\"Technical error message.\"),\n});\nconst PlainAddCustomerToGroup_MutationErrorSchema: z.ZodTypeAny = z.object({\n code: z.string().describe(\"Fixed error code from the API.\"),\n type: z.enum([\"VALIDATION\", \"FORBIDDEN\", \"INTERNAL\"]).describe(\"Type of error.\"),\n fields: z.array(PlainAddCustomerToGroup_MutationFieldErrorSchema).describe(\"List of field-specific errors, if any.\").nullable().optional(),\n message: z.string().describe(\"Technical error message.\"),\n});\nconst PlainAddCustomerToGroup_CreatedAtSchema: z.ZodTypeAny = z.object({\n iso8601: z.string().describe(\"ISO 8601 timestamp of creation.\"),\n});\nconst PlainAddCustomerToGroup_CustomerGroupSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"ID of the customer group.\"),\n key: z.string().describe(\"Key of the customer group.\"),\n name: z.string().describe(\"Name of the customer group.\"),\n});\nconst PlainAddCustomerToGroup_CustomerGroupMembershipSchema: z.ZodTypeAny = z.object({\n createdAt: PlainAddCustomerToGroup_CreatedAtSchema.nullable(),\n customerId: z.string().describe(\"ID of the customer.\"),\n customerGroup: PlainAddCustomerToGroup_CustomerGroupSchema.nullable(),\n});\nexport const PlainAddCustomerToGroupOutput: z.ZodTypeAny = z.object({\n error: PlainAddCustomerToGroup_MutationErrorSchema.nullable().optional(),\n customerGroupMemberships: z.array(PlainAddCustomerToGroup_CustomerGroupMembershipSchema).nullable().optional(),\n});\n\nexport const plainAddCustomerToGroup = action(\"PLAIN_ADD_CUSTOMER_TO_GROUP\", {\n slug: \"plain-add-customer-to-group\",\n name: \"Add Customer To Group\",\n description: \"Tool to add a customer to one or more customer groups. Use when you have a customer and groups ready.\",\n input: PlainAddCustomerToGroupInput,\n output: PlainAddCustomerToGroupOutput,\n});\n"],"mappings":";;;AAIA,MAAa,+BAA6CA,IAAAA,EAAE,OAAO;CACjE,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC;CACtE,0BAA0BA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EAC3C,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4KAA4K,CAAC,CAAC,SAAS;EACvN,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yFAAyF,CAAC,CAAC,SAAS;EACzI,kBAAkBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS;CACpI,CAAC,CAAC,CAAC,CAAC,SAAS,2EAA2E;AACxF,CAAC;AACD,MAAM,mDAAiEA,IAAAA,EAAE,OAAO;CAC9E,MAAMA,IAAAA,EAAE,KAAK;EAAC;EAAc;EAAY;CAAW,CAAC,CAAC,CAAC,SAAS,sBAAsB;CACrF,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SA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AC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/add-customer-to-group.d.ts
4
+ declare const PlainAddCustomerToGroupInput: z.ZodTypeAny;
5
+ declare const PlainAddCustomerToGroupOutput: z.ZodTypeAny;
6
+ declare const plainAddCustomerToGroup: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { plainAddCustomerToGroup };
9
+ //# sourceMappingURL=add-customer-to-group.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-customer-to-group.d.cts","names":[],"sources":["../../src/actions/add-customer-to-group.ts"],"mappings":";;;cAIa,4BAAA,EAA8B,CAAA,CAAE,UAO3C;AAAA,cAyBW,6BAAA,EAA+B,CAAA,CAAE,UAG5C;AAAA,cAEW,uBAAA,gCAAuB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/add-customer-to-group.d.ts
4
+ declare const PlainAddCustomerToGroupInput: z.ZodTypeAny;
5
+ declare const PlainAddCustomerToGroupOutput: z.ZodTypeAny;
6
+ declare const plainAddCustomerToGroup: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { plainAddCustomerToGroup };
9
+ //# sourceMappingURL=add-customer-to-group.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-customer-to-group.d.mts","names":[],"sources":["../../src/actions/add-customer-to-group.ts"],"mappings":";;;cAIa,4BAAA,EAA8B,CAAA,CAAE,UAO3C;AAAA,cAyBW,6BAAA,EAA+B,CAAA,CAAE,UAG5C;AAAA,cAEW,uBAAA,gCAAuB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,55 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ //#region src/actions/add-customer-to-group.ts
4
+ const PlainAddCustomerToGroupInput = z.object({
5
+ customerId: z.string().describe("ID of the customer to add to groups."),
6
+ customerGroupIdentifiers: z.array(z.object({
7
+ externalId: z.string().describe("Your external ID for the customer group. NOTE: The Plain API does not support this field for adding customers to groups - use customerGroupId or customerGroupKey instead.").optional(),
8
+ customerGroupId: z.string().describe("Plain internal ID of the customer group. Use this or customerGroupKey (not externalId).").optional(),
9
+ customerGroupKey: z.string().describe("Unique key of the customer group. Use this or customerGroupId (not externalId).").optional()
10
+ })).describe("List of customer group identifiers. Must contain at least one identifier.")
11
+ });
12
+ const PlainAddCustomerToGroup_MutationFieldErrorSchema = z.object({
13
+ type: z.enum([
14
+ "VALIDATION",
15
+ "REQUIRED",
16
+ "NOT_FOUND"
17
+ ]).describe("Type of field error."),
18
+ field: z.string().describe("Name of the field where error occurred."),
19
+ message: z.string().describe("Technical error message.")
20
+ });
21
+ const PlainAddCustomerToGroup_MutationErrorSchema = z.object({
22
+ code: z.string().describe("Fixed error code from the API."),
23
+ type: z.enum([
24
+ "VALIDATION",
25
+ "FORBIDDEN",
26
+ "INTERNAL"
27
+ ]).describe("Type of error."),
28
+ fields: z.array(PlainAddCustomerToGroup_MutationFieldErrorSchema).describe("List of field-specific errors, if any.").nullable().optional(),
29
+ message: z.string().describe("Technical error message.")
30
+ });
31
+ const PlainAddCustomerToGroup_CreatedAtSchema = z.object({ iso8601: z.string().describe("ISO 8601 timestamp of creation.") });
32
+ const PlainAddCustomerToGroup_CustomerGroupSchema = z.object({
33
+ id: z.string().describe("ID of the customer group."),
34
+ key: z.string().describe("Key of the customer group."),
35
+ name: z.string().describe("Name of the customer group.")
36
+ });
37
+ const PlainAddCustomerToGroup_CustomerGroupMembershipSchema = z.object({
38
+ createdAt: PlainAddCustomerToGroup_CreatedAtSchema.nullable(),
39
+ customerId: z.string().describe("ID of the customer."),
40
+ customerGroup: PlainAddCustomerToGroup_CustomerGroupSchema.nullable()
41
+ });
42
+ const plainAddCustomerToGroup = action("PLAIN_ADD_CUSTOMER_TO_GROUP", {
43
+ slug: "plain-add-customer-to-group",
44
+ name: "Add Customer To Group",
45
+ description: "Tool to add a customer to one or more customer groups. Use when you have a customer and groups ready.",
46
+ input: PlainAddCustomerToGroupInput,
47
+ output: z.object({
48
+ error: PlainAddCustomerToGroup_MutationErrorSchema.nullable().optional(),
49
+ customerGroupMemberships: z.array(PlainAddCustomerToGroup_CustomerGroupMembershipSchema).nullable().optional()
50
+ })
51
+ });
52
+ //#endregion
53
+ export { plainAddCustomerToGroup };
54
+
55
+ //# sourceMappingURL=add-customer-to-group.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-customer-to-group.mjs","names":[],"sources":["../../src/actions/add-customer-to-group.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PlainAddCustomerToGroupInput: z.ZodTypeAny = z.object({\n customerId: z.string().describe(\"ID of the customer to add to groups.\"),\n customerGroupIdentifiers: z.array(z.object({\n externalId: z.string().describe(\"Your external ID for the customer group. NOTE: The Plain API does not support this field for adding customers to groups - use customerGroupId or customerGroupKey instead.\").optional(),\n customerGroupId: z.string().describe(\"Plain internal ID of the customer group. Use this or customerGroupKey (not externalId).\").optional(),\n customerGroupKey: z.string().describe(\"Unique key of the customer group. Use this or customerGroupId (not externalId).\").optional(),\n})).describe(\"List of customer group identifiers. Must contain at least one identifier.\"),\n});\nconst PlainAddCustomerToGroup_MutationFieldErrorSchema: z.ZodTypeAny = z.object({\n type: z.enum([\"VALIDATION\", \"REQUIRED\", \"NOT_FOUND\"]).describe(\"Type of field error.\"),\n field: z.string().describe(\"Name of the field where error occurred.\"),\n message: z.string().describe(\"Technical error message.\"),\n});\nconst PlainAddCustomerToGroup_MutationErrorSchema: z.ZodTypeAny = z.object({\n code: z.string().describe(\"Fixed error code from the API.\"),\n type: z.enum([\"VALIDATION\", \"FORBIDDEN\", \"INTERNAL\"]).describe(\"Type of error.\"),\n fields: z.array(PlainAddCustomerToGroup_MutationFieldErrorSchema).describe(\"List of field-specific errors, if any.\").nullable().optional(),\n message: z.string().describe(\"Technical error message.\"),\n});\nconst PlainAddCustomerToGroup_CreatedAtSchema: z.ZodTypeAny = z.object({\n iso8601: z.string().describe(\"ISO 8601 timestamp of creation.\"),\n});\nconst PlainAddCustomerToGroup_CustomerGroupSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"ID of the customer group.\"),\n key: z.string().describe(\"Key of the customer group.\"),\n name: z.string().describe(\"Name of the customer group.\"),\n});\nconst PlainAddCustomerToGroup_CustomerGroupMembershipSchema: z.ZodTypeAny = z.object({\n createdAt: PlainAddCustomerToGroup_CreatedAtSchema.nullable(),\n customerId: z.string().describe(\"ID of the customer.\"),\n customerGroup: PlainAddCustomerToGroup_CustomerGroupSchema.nullable(),\n});\nexport const PlainAddCustomerToGroupOutput: z.ZodTypeAny = z.object({\n error: PlainAddCustomerToGroup_MutationErrorSchema.nullable().optional(),\n customerGroupMemberships: z.array(PlainAddCustomerToGroup_CustomerGroupMembershipSchema).nullable().optional(),\n});\n\nexport const plainAddCustomerToGroup = action(\"PLAIN_ADD_CUSTOMER_TO_GROUP\", {\n slug: \"plain-add-customer-to-group\",\n name: \"Add Customer To Group\",\n description: \"Tool to add a customer to one or more customer groups. Use when you have a customer and groups ready.\",\n input: PlainAddCustomerToGroupInput,\n output: PlainAddCustomerToGroupOutput,\n});\n"],"mappings":";;;AAIA,MAAa,+BAA6C,EAAE,OAAO;CACjE,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC;CACtE,0BAA0B,EAAE,MAAM,EAAE,OAAO;EAC3C,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,4KAA4K,CAAC,CAAC,SAAS;EACvN,iBAAiB,EAAE,OAAO,CAAC,CAAC,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QAVyD,EAAE,OAAO;EAClE,OAAO,4CAA4C,SAAS,CAAC,CAAC,SAAS;EACvE,0BAA0B,EAAE,MAAM,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/G,CAOU;AACV,CAAC"}
@@ -0,0 +1,45 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/create-customer-group.ts
4
+ const PlainCreateCustomerGroupInput = zod.z.object({
5
+ key: zod.z.string().describe("Unique identifier key for the customer group. Must be unique across all customer groups in your workspace. Use lowercase with underscores (e.g., 'vip_customers')."),
6
+ name: zod.z.string().describe("Display name of the customer group (e.g., 'VIP Customers', 'Free Tier'). Used for organization and display purposes."),
7
+ color: zod.z.string().describe("Hex color code for the group (e.g., #FF5733). Must be a valid 6-digit hex color starting with #."),
8
+ externalId: zod.z.string().describe("Optional external ID to link this customer group with an identifier from your system (e.g., Stripe plan ID, internal database ID).").optional()
9
+ });
10
+ const PlainCreateCustomerGroup_MutationFieldErrorSchema = zod.z.object({
11
+ type: zod.z.string().describe("Type of the field error, e.g., REQUIRED or VALIDATION"),
12
+ field: zod.z.string().describe("Field with validation error"),
13
+ message: zod.z.string().describe("Technical error message for the field error")
14
+ });
15
+ const PlainCreateCustomerGroup_MutationErrorSchema = zod.z.object({
16
+ code: zod.z.string().describe("Fixed error code identifying the error"),
17
+ type: zod.z.string().describe("High-level error type, e.g., VALIDATION, FORBIDDEN"),
18
+ fields: zod.z.array(PlainCreateCustomerGroup_MutationFieldErrorSchema).describe("List of field-specific errors if any").nullable().optional(),
19
+ message: zod.z.string().describe("Technical error message for the mutation failure")
20
+ });
21
+ const PlainCreateCustomerGroup_DateTimeModelSchema = zod.z.object({ iso8601: zod.z.string().describe("Date and time in ISO 8601 format") });
22
+ const PlainCreateCustomerGroup_CustomerGroupModelSchema = zod.z.object({
23
+ id: zod.z.string().describe("ID of the created customer group"),
24
+ key: zod.z.string().describe("Unique key for the customer group"),
25
+ name: zod.z.string().describe("Name of the customer group"),
26
+ color: zod.z.string().describe("Hex color code for the group"),
27
+ createdAt: PlainCreateCustomerGroup_DateTimeModelSchema.nullable(),
28
+ updatedAt: PlainCreateCustomerGroup_DateTimeModelSchema.nullable(),
29
+ externalId: zod.z.string().describe("Optional external ID of the group").nullable().optional()
30
+ });
31
+ const PlainCreateCustomerGroupOutput = zod.z.object({
32
+ error: PlainCreateCustomerGroup_MutationErrorSchema.nullable().optional(),
33
+ customerGroup: PlainCreateCustomerGroup_CustomerGroupModelSchema.nullable().optional()
34
+ });
35
+ const plainCreateCustomerGroup = require_action.action("PLAIN_CREATE_CUSTOMER_GROUP", {
36
+ slug: "plain-create-customer-group",
37
+ name: "Create Customer Group",
38
+ description: "Creates a new customer group in Plain for organizing and segmenting customers. Customer groups allow you to categorize customers (e.g., by pricing tier, feature access, or support level) and manage them more effectively in your support workflow. Each group has a unique key, display name, and visual color for easy identification. Use this when you need to create a new customer segment for organization or filtering purposes.",
39
+ input: PlainCreateCustomerGroupInput,
40
+ output: PlainCreateCustomerGroupOutput
41
+ });
42
+ //#endregion
43
+ exports.plainCreateCustomerGroup = plainCreateCustomerGroup;
44
+
45
+ //# sourceMappingURL=create-customer-group.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-customer-group.cjs","names":["z","action"],"sources":["../../src/actions/create-customer-group.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PlainCreateCustomerGroupInput: z.ZodTypeAny = z.object({\n key: z.string().describe(\"Unique identifier key for the customer group. Must be unique across all customer groups in your workspace. Use lowercase with underscores (e.g., 'vip_customers').\"),\n name: z.string().describe(\"Display name of the customer group (e.g., 'VIP Customers', 'Free Tier'). Used for organization and display purposes.\"),\n color: z.string().describe(\"Hex color code for the group (e.g., #FF5733). Must be a valid 6-digit hex color starting with #.\"),\n externalId: z.string().describe(\"Optional external ID to link this customer group with an identifier from your system (e.g., Stripe plan ID, internal database ID).\").optional(),\n});\nconst PlainCreateCustomerGroup_MutationFieldErrorSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Type of the field error, e.g., REQUIRED or VALIDATION\"),\n field: z.string().describe(\"Field with validation error\"),\n message: z.string().describe(\"Technical error message for the field error\"),\n});\nconst PlainCreateCustomerGroup_MutationErrorSchema: z.ZodTypeAny = z.object({\n code: z.string().describe(\"Fixed error code identifying the error\"),\n type: z.string().describe(\"High-level error type, e.g., VALIDATION, FORBIDDEN\"),\n fields: z.array(PlainCreateCustomerGroup_MutationFieldErrorSchema).describe(\"List of field-specific errors if any\").nullable().optional(),\n message: z.string().describe(\"Technical error message for the mutation failure\"),\n});\nconst PlainCreateCustomerGroup_DateTimeModelSchema: z.ZodTypeAny = z.object({\n iso8601: z.string().describe(\"Date and time in ISO 8601 format\"),\n});\nconst PlainCreateCustomerGroup_CustomerGroupModelSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"ID of the created customer group\"),\n key: z.string().describe(\"Unique key for the customer group\"),\n name: z.string().describe(\"Name of the customer group\"),\n color: z.string().describe(\"Hex color code for the group\"),\n createdAt: PlainCreateCustomerGroup_DateTimeModelSchema.nullable(),\n updatedAt: PlainCreateCustomerGroup_DateTimeModelSchema.nullable(),\n externalId: z.string().describe(\"Optional external ID of the group\").nullable().optional(),\n});\nexport const PlainCreateCustomerGroupOutput: z.ZodTypeAny = z.object({\n error: PlainCreateCustomerGroup_MutationErrorSchema.nullable().optional(),\n customerGroup: PlainCreateCustomerGroup_CustomerGroupModelSchema.nullable().optional(),\n});\n\nexport const plainCreateCustomerGroup = action(\"PLAIN_CREATE_CUSTOMER_GROUP\", {\n slug: \"plain-create-customer-group\",\n name: \"Create Customer Group\",\n description: \"Creates a new customer group in Plain for organizing and segmenting customers. Customer groups allow you to categorize customers (e.g., by pricing tier, feature access, or support level) and manage them more effectively in your support workflow. Each group has a unique key, display name, and visual color for easy identification. Use this when you need to create a new customer segment for organization or filtering purposes.\",\n input: PlainCreateCustomerGroupInput,\n output: PlainCreateCustomerGro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D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B;CACzD,WAAW,6CAA6C,SAAS;CACjE,WAAW,6CAA6C,SAAS;CACjE,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC3F,CAAC;AACD,MAAa,iCAA+CA,IAAAA,EAAE,OAAO;CACnE,OAAO,6CAA6C,SAAS,CAAC,CAAC,SAAS;CACxE,eAAe,kDAAkD,SAAS,CAAC,CAAC,SAAS;AACvF,CAAC;AAED,MAAa,2BAA2BC,eAAAA,OAAO,+BAA+B;CAC5E,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-customer-group.d.ts
4
+ declare const PlainCreateCustomerGroupInput: z.ZodTypeAny;
5
+ declare const PlainCreateCustomerGroupOutput: z.ZodTypeAny;
6
+ declare const plainCreateCustomerGroup: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { plainCreateCustomerGroup };
9
+ //# sourceMappingURL=create-customer-group.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-customer-group.d.cts","names":[],"sources":["../../src/actions/create-customer-group.ts"],"mappings":";;;cAIa,6BAAA,EAA+B,CAAA,CAAE,UAK5C;AAAA,cAwBW,8BAAA,EAAgC,CAAA,CAAE,UAG7C;AAAA,cAEW,wBAAA,gCAAwB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/create-customer-group.d.ts
4
+ declare const PlainCreateCustomerGroupInput: z.ZodTypeAny;
5
+ declare const PlainCreateCustomerGroupOutput: z.ZodTypeAny;
6
+ declare const plainCreateCustomerGroup: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { plainCreateCustomerGroup };
9
+ //# sourceMappingURL=create-customer-group.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-customer-group.d.mts","names":[],"sources":["../../src/actions/create-customer-group.ts"],"mappings":";;;cAIa,6BAAA,EAA+B,CAAA,CAAE,UAK5C;AAAA,cAwBW,8BAAA,EAAgC,CAAA,CAAE,UAG7C;AAAA,cAEW,wBAAA,gCAAwB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,44 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ //#region src/actions/create-customer-group.ts
4
+ const PlainCreateCustomerGroupInput = z.object({
5
+ key: z.string().describe("Unique identifier key for the customer group. Must be unique across all customer groups in your workspace. Use lowercase with underscores (e.g., 'vip_customers')."),
6
+ name: z.string().describe("Display name of the customer group (e.g., 'VIP Customers', 'Free Tier'). Used for organization and display purposes."),
7
+ color: z.string().describe("Hex color code for the group (e.g., #FF5733). Must be a valid 6-digit hex color starting with #."),
8
+ externalId: z.string().describe("Optional external ID to link this customer group with an identifier from your system (e.g., Stripe plan ID, internal database ID).").optional()
9
+ });
10
+ const PlainCreateCustomerGroup_MutationFieldErrorSchema = z.object({
11
+ type: z.string().describe("Type of the field error, e.g., REQUIRED or VALIDATION"),
12
+ field: z.string().describe("Field with validation error"),
13
+ message: z.string().describe("Technical error message for the field error")
14
+ });
15
+ const PlainCreateCustomerGroup_MutationErrorSchema = z.object({
16
+ code: z.string().describe("Fixed error code identifying the error"),
17
+ type: z.string().describe("High-level error type, e.g., VALIDATION, FORBIDDEN"),
18
+ fields: z.array(PlainCreateCustomerGroup_MutationFieldErrorSchema).describe("List of field-specific errors if any").nullable().optional(),
19
+ message: z.string().describe("Technical error message for the mutation failure")
20
+ });
21
+ const PlainCreateCustomerGroup_DateTimeModelSchema = z.object({ iso8601: z.string().describe("Date and time in ISO 8601 format") });
22
+ const PlainCreateCustomerGroup_CustomerGroupModelSchema = z.object({
23
+ id: z.string().describe("ID of the created customer group"),
24
+ key: z.string().describe("Unique key for the customer group"),
25
+ name: z.string().describe("Name of the customer group"),
26
+ color: z.string().describe("Hex color code for the group"),
27
+ createdAt: PlainCreateCustomerGroup_DateTimeModelSchema.nullable(),
28
+ updatedAt: PlainCreateCustomerGroup_DateTimeModelSchema.nullable(),
29
+ externalId: z.string().describe("Optional external ID of the group").nullable().optional()
30
+ });
31
+ const plainCreateCustomerGroup = action("PLAIN_CREATE_CUSTOMER_GROUP", {
32
+ slug: "plain-create-customer-group",
33
+ name: "Create Customer Group",
34
+ description: "Creates a new customer group in Plain for organizing and segmenting customers. Customer groups allow you to categorize customers (e.g., by pricing tier, feature access, or support level) and manage them more effectively in your support workflow. Each group has a unique key, display name, and visual color for easy identification. Use this when you need to create a new customer segment for organization or filtering purposes.",
35
+ input: PlainCreateCustomerGroupInput,
36
+ output: z.object({
37
+ error: PlainCreateCustomerGroup_MutationErrorSchema.nullable().optional(),
38
+ customerGroup: PlainCreateCustomerGroup_CustomerGroupModelSchema.nullable().optional()
39
+ })
40
+ });
41
+ //#endregion
42
+ export { plainCreateCustomerGroup };
43
+
44
+ //# sourceMappingURL=create-customer-group.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-customer-group.mjs","names":[],"sources":["../../src/actions/create-customer-group.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PlainCreateCustomerGroupInput: z.ZodTypeAny = z.object({\n key: z.string().describe(\"Unique identifier key for the customer group. Must be unique across all customer groups in your workspace. Use lowercase with underscores (e.g., 'vip_customers').\"),\n name: z.string().describe(\"Display name of the customer group (e.g., 'VIP Customers', 'Free Tier'). Used for organization and display purposes.\"),\n color: z.string().describe(\"Hex color code for the group (e.g., #FF5733). Must be a valid 6-digit hex color starting with #.\"),\n externalId: z.string().describe(\"Optional external ID to link this customer group with an identifier from your system (e.g., Stripe plan ID, internal database ID).\").optional(),\n});\nconst PlainCreateCustomerGroup_MutationFieldErrorSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Type of the field error, e.g., REQUIRED or VALIDATION\"),\n field: z.string().describe(\"Field with validation error\"),\n message: z.string().describe(\"Technical error message for the field error\"),\n});\nconst PlainCreateCustomerGroup_MutationErrorSchema: z.ZodTypeAny = z.object({\n code: z.string().describe(\"Fixed error code identifying the error\"),\n type: z.string().describe(\"High-level error type, e.g., VALIDATION, FORBIDDEN\"),\n fields: z.array(PlainCreateCustomerGroup_MutationFieldErrorSchema).describe(\"List of field-specific errors if any\").nullable().optional(),\n message: z.string().describe(\"Technical error message for the mutation failure\"),\n});\nconst PlainCreateCustomerGroup_DateTimeModelSchema: z.ZodTypeAny = z.object({\n iso8601: z.string().describe(\"Date and time in ISO 8601 format\"),\n});\nconst PlainCreateCustomerGroup_CustomerGroupModelSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"ID of the created customer group\"),\n key: z.string().describe(\"Unique key for the customer group\"),\n name: z.string().describe(\"Name of the customer group\"),\n color: z.string().describe(\"Hex color code for the group\"),\n createdAt: PlainCreateCustomerGroup_DateTimeModelSchema.nullable(),\n updatedAt: PlainCreateCustomerGroup_DateTimeModelSchema.nullable(),\n externalId: z.string().describe(\"Optional external ID of the group\").nullable().optional(),\n});\nexport const PlainCreateCustomerGroupOutput: z.ZodTypeAny = z.object({\n error: PlainCreateCustomerGroup_MutationErrorSchema.nullable().optional(),\n customerGroup: PlainCreateCustomerGroup_CustomerGroupModelSchema.nullable().optional(),\n});\n\nexport const plainCreateCustomerGroup = action(\"PLAIN_CREATE_CUSTOMER_GROUP\", {\n slug: \"plain-create-customer-group\",\n name: \"Create Customer Group\",\n description: \"Creates a new customer group in Plain for organizing and segmenting customers. Customer groups allow you to categorize customers (e.g., by pricing tier, feature access, or support level) and manage them more effectively in your support workflow. Each group has a unique key, display name, and visual color for easy identification. Use this when you need to create a new customer segment for organization or filtering purposes.\",\n input: PlainCreateCustomerGroupInput,\n output: PlainCreateCustomerGroupOutput,\n});\n"],"mappings":";;;AAIA,MAAa,gCAA8C,EAAE,OAAO;CAClE,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,oKAAoK;CAC7L,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,sHAAsH;CAChJ,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,kGAAkG;CAC7H,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,oIAAoI,CAAC,CAAC,SAAS;AACjL,CAAC;AACD,MAAM,oDAAkE,EAAE,OAAO;CAC/E,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD;CACjF,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B;CACxD,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C;AAC5E,CAAC;AACD,MAAM,+CAA6D,EAAE,OAAO;CAC1E,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC;CAClE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD;CAC9E,QAAQ,EAAE,MAAM,iDAAiD,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxI,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD;AACjF,CAAC;AACD,MAAM,+CAA6D,EAAE,OAAO,EAC1E,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC,EACjE,CAAC;AACD,MAAM,oDAAkE,EAAE,OAAO;CAC/E,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC;CAC1D,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC;CAC5D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B;CACtD,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B;CACzD,WAAW,6CAA6C,SAAS;CACjE,WAAW,6CAA6C,SAAS;CACjE,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC3F,CAAC;AAMD,MAAa,2BAA2B,OAAO,+BAA+B;CAC5E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAV0D,EAAE,OAAO;EACnE,OAAO,6CAA6C,SAAS,CAAC,CAAC,SAAS;EACxE,eAAe,kDAAkD,SAAS,CAAC,CAAC,SAAS;CACvF,CAOU;AACV,CAAC"}
@@ -0,0 +1,52 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/create-thread.ts
4
+ const PlainCreateThreadInput = zod.z.object({
5
+ title: zod.z.string().describe("Title of the new thread"),
6
+ assignedTo: zod.z.object({ userId: zod.z.string().describe("Plain user ID to assign the thread to") }).describe("Optional user assignment for the thread").optional(),
7
+ components: zod.z.array(zod.z.object({ componentText: zod.z.object({ text: zod.z.string().describe("Text content of the component") }).describe("A text component to include in the thread").optional() })).describe("Optional list of content components for the thread").optional(),
8
+ labelTypeIds: zod.z.array(zod.z.string()).describe("Optional list of label type IDs to assign").optional(),
9
+ customerIdentifier: zod.z.object({
10
+ customerId: zod.z.string().describe("Plain customer ID to identify the customer").optional(),
11
+ externalId: zod.z.string().describe("External ID for the customer").optional(),
12
+ emailAddress: zod.z.string().describe("Email address of the customer").optional()
13
+ }).describe("Identifier object for the customer")
14
+ });
15
+ const PlainCreateThread_ThreadLabelTypeSchema = zod.z.object({
16
+ id: zod.z.string().describe("LabelType unique identifier"),
17
+ name: zod.z.string().describe("LabelType name")
18
+ });
19
+ const PlainCreateThread_ThreadLabelSchema = zod.z.object({
20
+ id: zod.z.string().describe("Label unique identifier"),
21
+ labelType: PlainCreateThread_ThreadLabelTypeSchema.nullable()
22
+ });
23
+ const PlainCreateThread_CustomerEmailSchema = zod.z.object({ email: zod.z.string().describe("Email address of the customer") });
24
+ const PlainCreateThread_CustomerSchema = zod.z.object({
25
+ id: zod.z.string().describe("Customer unique identifier"),
26
+ email: PlainCreateThread_CustomerEmailSchema.nullable(),
27
+ fullName: zod.z.string().describe("Full name of the customer")
28
+ });
29
+ const PlainCreateThread_StatusChangedAtSchema = zod.z.object({ iso8601: zod.z.string().describe("Timestamp of last status change in ISO8601 format") });
30
+ const PlainCreateThread_ThreadSchema = zod.z.object({
31
+ id: zod.z.string().describe("Thread unique identifier"),
32
+ title: zod.z.string().describe("Title of the thread"),
33
+ labels: zod.z.array(PlainCreateThread_ThreadLabelSchema).describe("Labels assigned to the thread"),
34
+ status: zod.z.string().describe("Current status of the thread"),
35
+ customer: PlainCreateThread_CustomerSchema.nullable(),
36
+ priority: zod.z.number().int().describe("Priority level of the thread"),
37
+ statusChangedAt: PlainCreateThread_StatusChangedAtSchema.nullable()
38
+ });
39
+ const PlainCreateThread_CreateThreadDataSchema = zod.z.object({ thread: PlainCreateThread_ThreadSchema.nullable().optional() });
40
+ const PlainCreateThread_CreateThreadPayloadSchema = zod.z.object({ createThread: PlainCreateThread_CreateThreadDataSchema.nullable() });
41
+ const PlainCreateThreadOutput = zod.z.object({ data: PlainCreateThread_CreateThreadPayloadSchema.nullable() });
42
+ const plainCreateThread = require_action.action("PLAIN_CREATE_THREAD", {
43
+ slug: "plain-create-thread",
44
+ name: "Create Thread",
45
+ description: "Tool to create a new thread. Use after obtaining valid customer identifier.",
46
+ input: PlainCreateThreadInput,
47
+ output: PlainCreateThreadOutput
48
+ });
49
+ //#endregion
50
+ exports.plainCreateThread = plainCreateThread;
51
+
52
+ //# sourceMappingURL=create-thread.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-thread.cjs","names":["z","action"],"sources":["../../src/actions/create-thread.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PlainCreateThreadInput: z.ZodTypeAny = z.object({\n title: z.string().describe(\"Title of the new thread\"),\n assignedTo: z.object({\n userId: z.string().describe(\"Plain user ID to assign the thread to\"),\n}).describe(\"Optional user assignment for the thread\").optional(),\n components: z.array(z.object({\n componentText: z.object({\n text: z.string().describe(\"Text content of the component\"),\n}).describe(\"A text component to include in the thread\").optional(),\n})).describe(\"Optional list of content components for the thread\").optional(),\n labelTypeIds: z.array(z.string()).describe(\"Optional list of label type IDs to assign\").optional(),\n customerIdentifier: z.object({\n customerId: z.string().describe(\"Plain customer ID to identify the customer\").optional(),\n externalId: z.string().describe(\"External ID for the customer\").optional(),\n emailAddress: z.string().describe(\"Email address of the customer\").optional(),\n}).describe(\"Identifier object for the customer\"),\n});\nconst PlainCreateThread_ThreadLabelTypeSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"LabelType unique identifier\"),\n name: z.string().describe(\"LabelType name\"),\n});\nconst PlainCreateThread_ThreadLabelSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Label unique identifier\"),\n labelType: PlainCreateThread_ThreadLabelTypeSchema.nullable(),\n});\nconst PlainCreateThread_CustomerEmailSchema: z.ZodTypeAny = z.object({\n email: z.string().describe(\"Email address of the customer\"),\n});\nconst PlainCreateThread_CustomerSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Customer unique identifier\"),\n email: PlainCreateThread_CustomerEmailSchema.nullable(),\n fullName: z.string().describe(\"Full name of the customer\"),\n});\nconst PlainCreateThread_StatusChangedAtSchema: z.ZodTypeAny = z.object({\n iso8601: z.string().describe(\"Timestamp of last status change in ISO8601 format\"),\n});\nconst PlainCreateThread_ThreadSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Thread unique identifier\"),\n title: z.string().describe(\"Title of the thread\"),\n labels: z.array(PlainCreateThread_ThreadLabelSchema).describe(\"Labels assigned to the thread\"),\n status: z.string().describe(\"Current status of the thread\"),\n customer: PlainCreateThread_CustomerSchema.nullable(),\n priority: z.number().int().describe(\"Priority level of the thread\"),\n statusChangedAt: PlainCreateThread_StatusChangedAtSchema.nullable(),\n});\nconst PlainCreateThread_CreateThreadDataSchema: z.ZodTypeAny = z.object({\n thread: PlainCreateThread_ThreadSchema.nullable().optional(),\n});\nconst PlainCreateThread_CreateThreadPayloadSchema: z.ZodTypeAny = z.object({\n createThread: PlainCreateThread_CreateThreadDataSchema.nullable(),\n});\nexport const PlainCreateThreadOutput: z.ZodTypeAny = z.object({\n data: PlainCreateThread_CreateThreadPayloadSchema.nullable(),\n});\n\nexport const plainCreateThread = action(\"PLAIN_CREATE_THREAD\", {\n slug: \"plain-create-thread\",\n name: \"Create Thread\",\n description: \"Tool to create a new thread. Use after obtaining valid customer identifier.\",\n input: PlainCreateThreadInput,\n output: PlainCreateThreadOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yBAAuCA,IAAAA,EAAE,OAAO;CAC3D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yBAAyB;CACpD,YAAYA,IAAAA,EAAE,OAAO,EACrB,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC,EACrE,CAAC,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CAC9D,YAAYA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,EAC7B,eAAeA,IAAAA,EAAE,OAAO,EACxB,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,EAC3D,CAAC,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,EAClE,CAAC,CAAC,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;CAC1E,cAAcA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CACjG,oBAAoBA,IAAAA,EAAE,OAAO;EAC7B,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS;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U,iCAAiC,SAAS;CACpD,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,8BAA8B;CAClE,iBAAiB,wCAAwC,SAAS;AACpE,CAAC;AACD,MAAM,2CAAyDA,IAAAA,EAAE,OAAO,EACtE,QAAQ,+BAA+B,SAAS,CAAC,CAAC,SAAS,EAC7D,CAAC;AACD,MAAM,8CAA4DA,IAAAA,EAAE,OAAO,EACzE,cAAc,yCAAyC,SAAS,EAClE,CAAC;AACD,MAAa,0BAAwCA,IAAAA,EAAE,OAAO,EAC5D,MAAM,4CAA4C,SAAS,EAC7D,CAAC;AAED,MAAa,oBAAoBC,eAAAA,OAAO,uBAAuB;CAC7D,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-thread.d.ts
4
+ declare const PlainCreateThreadInput: z.ZodTypeAny;
5
+ declare const PlainCreateThreadOutput: z.ZodTypeAny;
6
+ declare const plainCreateThread: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { plainCreateThread };
9
+ //# sourceMappingURL=create-thread.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-thread.d.cts","names":[],"sources":["../../src/actions/create-thread.ts"],"mappings":";;;cAIa,sBAAA,EAAwB,CAAA,CAAE,UAgBrC;AAAA,cAmCW,uBAAA,EAAyB,CAAA,CAAE,UAEtC;AAAA,cAEW,iBAAA,gCAAiB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/create-thread.d.ts
4
+ declare const PlainCreateThreadInput: z.ZodTypeAny;
5
+ declare const PlainCreateThreadOutput: z.ZodTypeAny;
6
+ declare const plainCreateThread: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { plainCreateThread };
9
+ //# sourceMappingURL=create-thread.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-thread.d.mts","names":[],"sources":["../../src/actions/create-thread.ts"],"mappings":";;;cAIa,sBAAA,EAAwB,CAAA,CAAE,UAgBrC;AAAA,cAmCW,uBAAA,EAAyB,CAAA,CAAE,UAEtC;AAAA,cAEW,iBAAA,gCAAiB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,51 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ //#region src/actions/create-thread.ts
4
+ const PlainCreateThreadInput = z.object({
5
+ title: z.string().describe("Title of the new thread"),
6
+ assignedTo: z.object({ userId: z.string().describe("Plain user ID to assign the thread to") }).describe("Optional user assignment for the thread").optional(),
7
+ components: z.array(z.object({ componentText: z.object({ text: z.string().describe("Text content of the component") }).describe("A text component to include in the thread").optional() })).describe("Optional list of content components for the thread").optional(),
8
+ labelTypeIds: z.array(z.string()).describe("Optional list of label type IDs to assign").optional(),
9
+ customerIdentifier: z.object({
10
+ customerId: z.string().describe("Plain customer ID to identify the customer").optional(),
11
+ externalId: z.string().describe("External ID for the customer").optional(),
12
+ emailAddress: z.string().describe("Email address of the customer").optional()
13
+ }).describe("Identifier object for the customer")
14
+ });
15
+ const PlainCreateThread_ThreadLabelTypeSchema = z.object({
16
+ id: z.string().describe("LabelType unique identifier"),
17
+ name: z.string().describe("LabelType name")
18
+ });
19
+ const PlainCreateThread_ThreadLabelSchema = z.object({
20
+ id: z.string().describe("Label unique identifier"),
21
+ labelType: PlainCreateThread_ThreadLabelTypeSchema.nullable()
22
+ });
23
+ const PlainCreateThread_CustomerEmailSchema = z.object({ email: z.string().describe("Email address of the customer") });
24
+ const PlainCreateThread_CustomerSchema = z.object({
25
+ id: z.string().describe("Customer unique identifier"),
26
+ email: PlainCreateThread_CustomerEmailSchema.nullable(),
27
+ fullName: z.string().describe("Full name of the customer")
28
+ });
29
+ const PlainCreateThread_StatusChangedAtSchema = z.object({ iso8601: z.string().describe("Timestamp of last status change in ISO8601 format") });
30
+ const PlainCreateThread_ThreadSchema = z.object({
31
+ id: z.string().describe("Thread unique identifier"),
32
+ title: z.string().describe("Title of the thread"),
33
+ labels: z.array(PlainCreateThread_ThreadLabelSchema).describe("Labels assigned to the thread"),
34
+ status: z.string().describe("Current status of the thread"),
35
+ customer: PlainCreateThread_CustomerSchema.nullable(),
36
+ priority: z.number().int().describe("Priority level of the thread"),
37
+ statusChangedAt: PlainCreateThread_StatusChangedAtSchema.nullable()
38
+ });
39
+ const PlainCreateThread_CreateThreadDataSchema = z.object({ thread: PlainCreateThread_ThreadSchema.nullable().optional() });
40
+ const PlainCreateThread_CreateThreadPayloadSchema = z.object({ createThread: PlainCreateThread_CreateThreadDataSchema.nullable() });
41
+ const plainCreateThread = action("PLAIN_CREATE_THREAD", {
42
+ slug: "plain-create-thread",
43
+ name: "Create Thread",
44
+ description: "Tool to create a new thread. Use after obtaining valid customer identifier.",
45
+ input: PlainCreateThreadInput,
46
+ output: z.object({ data: PlainCreateThread_CreateThreadPayloadSchema.nullable() })
47
+ });
48
+ //#endregion
49
+ export { plainCreateThread };
50
+
51
+ //# sourceMappingURL=create-thread.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-thread.mjs","names":[],"sources":["../../src/actions/create-thread.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PlainCreateThreadInput: z.ZodTypeAny = z.object({\n title: z.string().describe(\"Title of the new thread\"),\n assignedTo: z.object({\n userId: z.string().describe(\"Plain user ID to assign the thread to\"),\n}).describe(\"Optional user assignment for the thread\").optional(),\n components: z.array(z.object({\n componentText: z.object({\n text: z.string().describe(\"Text content of the component\"),\n}).describe(\"A text component to include in the thread\").optional(),\n})).describe(\"Optional list of content components for the thread\").optional(),\n labelTypeIds: z.array(z.string()).describe(\"Optional list of label type IDs to assign\").optional(),\n customerIdentifier: z.object({\n customerId: z.string().describe(\"Plain customer ID to identify the customer\").optional(),\n externalId: z.string().describe(\"External ID for the customer\").optional(),\n emailAddress: z.string().describe(\"Email address of the customer\").optional(),\n}).describe(\"Identifier object for the customer\"),\n});\nconst PlainCreateThread_ThreadLabelTypeSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"LabelType unique identifier\"),\n name: z.string().describe(\"LabelType name\"),\n});\nconst PlainCreateThread_ThreadLabelSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Label unique identifier\"),\n labelType: PlainCreateThread_ThreadLabelTypeSchema.nullable(),\n});\nconst PlainCreateThread_CustomerEmailSchema: z.ZodTypeAny = z.object({\n email: z.string().describe(\"Email address of the customer\"),\n});\nconst PlainCreateThread_CustomerSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Customer unique identifier\"),\n email: PlainCreateThread_CustomerEmailSchema.nullable(),\n fullName: z.string().describe(\"Full name of the customer\"),\n});\nconst PlainCreateThread_StatusChangedAtSchema: z.ZodTypeAny = z.object({\n iso8601: z.string().describe(\"Timestamp of last status change in ISO8601 format\"),\n});\nconst PlainCreateThread_ThreadSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Thread unique identifier\"),\n title: z.string().describe(\"Title of the thread\"),\n labels: z.array(PlainCreateThread_ThreadLabelSchema).describe(\"Labels assigned to the thread\"),\n status: z.string().describe(\"Current status of the thread\"),\n customer: PlainCreateThread_CustomerSchema.nullable(),\n priority: z.number().int().describe(\"Priority level of the thread\"),\n statusChangedAt: PlainCreateThread_StatusChangedAtSchema.nullable(),\n});\nconst PlainCreateThread_CreateThreadDataSchema: z.ZodTypeAny = z.object({\n thread: PlainCreateThread_ThreadSchema.nullable().optional(),\n});\nconst PlainCreateThread_CreateThreadPayloadSchema: z.ZodTypeAny = z.object({\n createThread: PlainCreateThread_CreateThreadDataSchema.nullable(),\n});\nexport const PlainCreateThreadOutput: z.ZodTypeAny = z.object({\n data: PlainCreateThread_CreateThreadPayloadSchema.nullable(),\n});\n\nexport const plainCreateThread = action(\"PLAIN_CREATE_THREAD\", {\n slug: \"plain-create-thread\",\n name: \"Create Thread\",\n description: \"Tool to create a new thread. Use after obtaining valid customer identifier.\",\n input: PlainCreateThreadInput,\n output: PlainCreateThreadOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yBAAuC,EAAE,OAAO;CAC3D,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,yBAAyB;CACpD,YAAY,EAAE,OAAO,EACrB,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC,EACrE,CAAC,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CAC9D,YAAY,EAAE,MAAM,EAAE,OAAO,EAC7B,eAAe,EAAE,OAAO,EACxB,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,EAC3D,CAAC,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,EAClE,CAAC,CAAC,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;CAC1E,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CACjG,oBAAoB,EAAE,OAAO;EAC7B,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS;EACvF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS;EACzE,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS;CAC9E,CAAC,CAAC,CAAC,SAAS,oCAAoC;AAChD,CAAC;AACD,MAAM,0CAAwD,EAAE,OAAO;CACrE,IAAI,EAAE,OAAO,CA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4CAA4C,SAAS,EAC7D,CAOU;AACV,CAAC"}
@@ -0,0 +1,27 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/delete-customer.ts
4
+ const PlainDeleteCustomerInput = zod.z.object({ customer_id: zod.z.string().describe("Unique identifier of the customer to delete, as returned by the Plain API.") });
5
+ const PlainDeleteCustomer_DeleteCustomerErrorFieldSchema = zod.z.object({
6
+ type: zod.z.string().describe("Type of the error for the field."),
7
+ field: zod.z.string().describe("Name of the field with the error."),
8
+ message: zod.z.string().describe("Validation message for the field.")
9
+ });
10
+ const PlainDeleteCustomer_DeleteCustomerErrorSchema = zod.z.object({
11
+ code: zod.z.string().describe("Error code."),
12
+ type: zod.z.string().describe("Error type."),
13
+ fields: zod.z.array(PlainDeleteCustomer_DeleteCustomerErrorFieldSchema).describe("List of field-specific errors."),
14
+ message: zod.z.string().describe("Error message.")
15
+ });
16
+ const PlainDeleteCustomerOutput = zod.z.object({ error: PlainDeleteCustomer_DeleteCustomerErrorSchema.nullable().optional() });
17
+ const plainDeleteCustomer = require_action.action("PLAIN_DELETE_CUSTOMER", {
18
+ slug: "plain-delete-customer",
19
+ name: "Delete Customer",
20
+ description: "Tool to delete a customer from the system. Use when you need to remove a customer by their ID.",
21
+ input: PlainDeleteCustomerInput,
22
+ output: PlainDeleteCustomerOutput
23
+ });
24
+ //#endregion
25
+ exports.plainDeleteCustomer = plainDeleteCustomer;
26
+
27
+ //# sourceMappingURL=delete-customer.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-customer.cjs","names":["z","action"],"sources":["../../src/actions/delete-customer.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PlainDeleteCustomerInput: z.ZodTypeAny = z.object({\n customer_id: z.string().describe(\"Unique identifier of the customer to delete, as returned by the Plain API.\"),\n});\nconst PlainDeleteCustomer_DeleteCustomerErrorFieldSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Type of the error for the field.\"),\n field: z.string().describe(\"Name of the field with the error.\"),\n message: z.string().describe(\"Validation message for the field.\"),\n});\nconst PlainDeleteCustomer_DeleteCustomerErrorSchema: z.ZodTypeAny = z.object({\n code: z.string().describe(\"Error code.\"),\n type: z.string().describe(\"Error type.\"),\n fields: z.array(PlainDeleteCustomer_DeleteCustomerErrorFieldSchema).describe(\"List of field-specific errors.\"),\n message: z.string().describe(\"Error message.\"),\n});\nexport const PlainDeleteCustomerOutput: z.ZodTypeAny = z.object({\n error: PlainDeleteCustomer_DeleteCustomerErrorSchema.nullable().optional(),\n});\n\nexport const plainDeleteCustomer = action(\"PLAIN_DELETE_CUSTOMER\", {\n slug: \"plain-delete-customer\",\n name: \"Delete Customer\",\n description: \"Tool to delete a customer from the system. Use when you need to remove a customer by their ID.\",\n input: PlainDeleteCustomerInput,\n output: PlainDeleteCustomerOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAAyCA,IAAAA,EAAE,OAAO,EAC7D,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4EAA4E,EAC/G,CAAC;AACD,MAAM,qDAAmEA,IAAAA,EAAE,OAAO;CAChF,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC;CAC5D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC;CAC9D,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC;AAClE,CAAC;AACD,MAAM,gDAA8DA,IAAAA,EAAE,OAAO;CAC3E,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,aAAa;CACvC,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,aAAa;CACvC,QAAQA,IAAAA,EAAE,MAAM,kDAAkD,CAAC,CAAC,SAAS,gCAAgC;CAC7G,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gBAAgB;AAC/C,CAAC;AACD,MAAa,4BAA0CA,IAAAA,EAAE,OAAO,EAC9D,OAAO,8CAA8C,SAAS,CAAC,CAAC,SAAS,EAC3E,CAAC;AAED,MAAa,sBAAsBC,eAAAA,OAAO,yBAAyB;CACjE,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-customer.d.ts
4
+ declare const PlainDeleteCustomerInput: z.ZodTypeAny;
5
+ declare const PlainDeleteCustomerOutput: z.ZodTypeAny;
6
+ declare const plainDeleteCustomer: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { plainDeleteCustomer };
9
+ //# sourceMappingURL=delete-customer.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-customer.d.cts","names":[],"sources":["../../src/actions/delete-customer.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UAEvC;AAAA,cAYW,yBAAA,EAA2B,CAAA,CAAE,UAExC;AAAA,cAEW,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}