@keystrokehq/plain 0.1.0 → 0.1.2

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 (185) hide show
  1. package/dist/action.cjs.map +1 -1
  2. package/dist/action.mjs.map +1 -1
  3. package/dist/actions/add-customer-to-group.cjs +11 -11
  4. package/dist/actions/add-customer-to-group.cjs.map +1 -1
  5. package/dist/actions/add-customer-to-group.d.cts +47 -3
  6. package/dist/actions/add-customer-to-group.d.cts.map +1 -1
  7. package/dist/actions/add-customer-to-group.d.mts +47 -3
  8. package/dist/actions/add-customer-to-group.d.mts.map +1 -1
  9. package/dist/actions/add-customer-to-group.mjs +11 -11
  10. package/dist/actions/add-customer-to-group.mjs.map +1 -1
  11. package/dist/actions/create-customer-group.cjs +11 -11
  12. package/dist/actions/create-customer-group.cjs.map +1 -1
  13. package/dist/actions/create-customer-group.d.cts +37 -3
  14. package/dist/actions/create-customer-group.d.cts.map +1 -1
  15. package/dist/actions/create-customer-group.d.mts +37 -3
  16. package/dist/actions/create-customer-group.d.mts.map +1 -1
  17. package/dist/actions/create-customer-group.mjs +11 -11
  18. package/dist/actions/create-customer-group.mjs.map +1 -1
  19. package/dist/actions/create-thread.cjs +11 -11
  20. package/dist/actions/create-thread.cjs.map +1 -1
  21. package/dist/actions/create-thread.d.cts +63 -3
  22. package/dist/actions/create-thread.d.cts.map +1 -1
  23. package/dist/actions/create-thread.d.mts +63 -3
  24. package/dist/actions/create-thread.d.mts.map +1 -1
  25. package/dist/actions/create-thread.mjs +11 -11
  26. package/dist/actions/create-thread.mjs.map +1 -1
  27. package/dist/actions/delete-customer.cjs +6 -6
  28. package/dist/actions/delete-customer.cjs.map +1 -1
  29. package/dist/actions/delete-customer.d.cts +18 -3
  30. package/dist/actions/delete-customer.d.cts.map +1 -1
  31. package/dist/actions/delete-customer.d.mts +18 -3
  32. package/dist/actions/delete-customer.d.mts.map +1 -1
  33. package/dist/actions/delete-customer.mjs +6 -6
  34. package/dist/actions/delete-customer.mjs.map +1 -1
  35. package/dist/actions/delete-user.cjs +6 -6
  36. package/dist/actions/delete-user.cjs.map +1 -1
  37. package/dist/actions/delete-user.d.cts +18 -3
  38. package/dist/actions/delete-user.d.cts.map +1 -1
  39. package/dist/actions/delete-user.d.mts +18 -3
  40. package/dist/actions/delete-user.d.mts.map +1 -1
  41. package/dist/actions/delete-user.mjs +6 -6
  42. package/dist/actions/delete-user.mjs.map +1 -1
  43. package/dist/actions/fetch-company.cjs +9 -9
  44. package/dist/actions/fetch-company.cjs.map +1 -1
  45. package/dist/actions/fetch-company.d.cts +26 -3
  46. package/dist/actions/fetch-company.d.cts.map +1 -1
  47. package/dist/actions/fetch-company.d.mts +26 -3
  48. package/dist/actions/fetch-company.d.mts.map +1 -1
  49. package/dist/actions/fetch-company.mjs +9 -9
  50. package/dist/actions/fetch-company.mjs.map +1 -1
  51. package/dist/actions/fetch-issues.cjs +7 -7
  52. package/dist/actions/fetch-issues.cjs.map +1 -1
  53. package/dist/actions/fetch-issues.d.cts +24 -3
  54. package/dist/actions/fetch-issues.d.cts.map +1 -1
  55. package/dist/actions/fetch-issues.d.mts +24 -3
  56. package/dist/actions/fetch-issues.d.mts.map +1 -1
  57. package/dist/actions/fetch-issues.mjs +7 -7
  58. package/dist/actions/fetch-issues.mjs.map +1 -1
  59. package/dist/actions/fetch-tier.cjs +8 -8
  60. package/dist/actions/fetch-tier.cjs.map +1 -1
  61. package/dist/actions/fetch-tier.d.cts +25 -3
  62. package/dist/actions/fetch-tier.d.cts.map +1 -1
  63. package/dist/actions/fetch-tier.d.mts +25 -3
  64. package/dist/actions/fetch-tier.d.mts.map +1 -1
  65. package/dist/actions/fetch-tier.mjs +8 -8
  66. package/dist/actions/fetch-tier.mjs.map +1 -1
  67. package/dist/actions/get-customer-by-email.cjs +5 -5
  68. package/dist/actions/get-customer-by-email.cjs.map +1 -1
  69. package/dist/actions/get-customer-by-email.d.cts +26 -3
  70. package/dist/actions/get-customer-by-email.d.cts.map +1 -1
  71. package/dist/actions/get-customer-by-email.d.mts +26 -3
  72. package/dist/actions/get-customer-by-email.d.mts.map +1 -1
  73. package/dist/actions/get-customer-by-email.mjs +5 -5
  74. package/dist/actions/get-customer-by-email.mjs.map +1 -1
  75. package/dist/actions/get-customer-by-id.cjs +5 -5
  76. package/dist/actions/get-customer-by-id.cjs.map +1 -1
  77. package/dist/actions/get-customer-by-id.d.cts +13 -3
  78. package/dist/actions/get-customer-by-id.d.cts.map +1 -1
  79. package/dist/actions/get-customer-by-id.d.mts +13 -3
  80. package/dist/actions/get-customer-by-id.d.mts.map +1 -1
  81. package/dist/actions/get-customer-by-id.mjs +5 -5
  82. package/dist/actions/get-customer-by-id.mjs.map +1 -1
  83. package/dist/actions/get-customers.cjs +8 -8
  84. package/dist/actions/get-customers.cjs.map +1 -1
  85. package/dist/actions/get-customers.d.cts +59 -3
  86. package/dist/actions/get-customers.d.cts.map +1 -1
  87. package/dist/actions/get-customers.d.mts +59 -3
  88. package/dist/actions/get-customers.d.mts.map +1 -1
  89. package/dist/actions/get-customers.mjs +8 -8
  90. package/dist/actions/get-customers.mjs.map +1 -1
  91. package/dist/actions/get-thread-by-id.cjs +14 -14
  92. package/dist/actions/get-thread-by-id.cjs.map +1 -1
  93. package/dist/actions/get-thread-by-id.d.cts +63 -3
  94. package/dist/actions/get-thread-by-id.d.cts.map +1 -1
  95. package/dist/actions/get-thread-by-id.d.mts +63 -3
  96. package/dist/actions/get-thread-by-id.d.mts.map +1 -1
  97. package/dist/actions/get-thread-by-id.mjs +14 -14
  98. package/dist/actions/get-thread-by-id.mjs.map +1 -1
  99. package/dist/actions/get-user-by-id.cjs +6 -6
  100. package/dist/actions/get-user-by-id.cjs.map +1 -1
  101. package/dist/actions/get-user-by-id.d.cts +21 -3
  102. package/dist/actions/get-user-by-id.d.cts.map +1 -1
  103. package/dist/actions/get-user-by-id.d.mts +21 -3
  104. package/dist/actions/get-user-by-id.d.mts.map +1 -1
  105. package/dist/actions/get-user-by-id.mjs +6 -6
  106. package/dist/actions/get-user-by-id.mjs.map +1 -1
  107. package/dist/actions/list-customer-groups.cjs +9 -9
  108. package/dist/actions/list-customer-groups.cjs.map +1 -1
  109. package/dist/actions/list-customer-groups.d.cts +40 -3
  110. package/dist/actions/list-customer-groups.d.cts.map +1 -1
  111. package/dist/actions/list-customer-groups.d.mts +40 -3
  112. package/dist/actions/list-customer-groups.d.mts.map +1 -1
  113. package/dist/actions/list-customer-groups.mjs +9 -9
  114. package/dist/actions/list-customer-groups.mjs.map +1 -1
  115. package/dist/actions/list-tiers.cjs +4 -4
  116. package/dist/actions/list-tiers.cjs.map +1 -1
  117. package/dist/actions/list-tiers.d.cts +31 -3
  118. package/dist/actions/list-tiers.d.cts.map +1 -1
  119. package/dist/actions/list-tiers.d.mts +31 -3
  120. package/dist/actions/list-tiers.d.mts.map +1 -1
  121. package/dist/actions/list-tiers.mjs +4 -4
  122. package/dist/actions/list-tiers.mjs.map +1 -1
  123. package/dist/actions/query-threads.cjs +8 -8
  124. package/dist/actions/query-threads.cjs.map +1 -1
  125. package/dist/actions/query-threads.d.cts +31 -3
  126. package/dist/actions/query-threads.d.cts.map +1 -1
  127. package/dist/actions/query-threads.d.mts +31 -3
  128. package/dist/actions/query-threads.d.mts.map +1 -1
  129. package/dist/actions/query-threads.mjs +8 -8
  130. package/dist/actions/query-threads.mjs.map +1 -1
  131. package/dist/actions/remove-customer-from-group.cjs +6 -6
  132. package/dist/actions/remove-customer-from-group.cjs.map +1 -1
  133. package/dist/actions/remove-customer-from-group.d.cts +34 -3
  134. package/dist/actions/remove-customer-from-group.d.cts.map +1 -1
  135. package/dist/actions/remove-customer-from-group.d.mts +34 -3
  136. package/dist/actions/remove-customer-from-group.d.mts.map +1 -1
  137. package/dist/actions/remove-customer-from-group.mjs +6 -6
  138. package/dist/actions/remove-customer-from-group.mjs.map +1 -1
  139. package/dist/actions/run-graphql-query.cjs +3 -3
  140. package/dist/actions/run-graphql-query.cjs.map +1 -1
  141. package/dist/actions/run-graphql-query.d.cts +23 -3
  142. package/dist/actions/run-graphql-query.d.cts.map +1 -1
  143. package/dist/actions/run-graphql-query.d.mts +23 -3
  144. package/dist/actions/run-graphql-query.d.mts.map +1 -1
  145. package/dist/actions/run-graphql-query.mjs +3 -3
  146. package/dist/actions/run-graphql-query.mjs.map +1 -1
  147. package/dist/actions/send-message.cjs +1 -1
  148. package/dist/actions/send-message.cjs.map +1 -1
  149. package/dist/actions/send-message.d.cts +59 -3
  150. package/dist/actions/send-message.d.cts.map +1 -1
  151. package/dist/actions/send-message.d.mts +59 -3
  152. package/dist/actions/send-message.d.mts.map +1 -1
  153. package/dist/actions/send-message.mjs +1 -1
  154. package/dist/actions/send-message.mjs.map +1 -1
  155. package/dist/actions/update-company.cjs +11 -11
  156. package/dist/actions/update-company.cjs.map +1 -1
  157. package/dist/actions/update-company.d.cts +37 -3
  158. package/dist/actions/update-company.d.cts.map +1 -1
  159. package/dist/actions/update-company.d.mts +37 -3
  160. package/dist/actions/update-company.d.mts.map +1 -1
  161. package/dist/actions/update-company.mjs +11 -11
  162. package/dist/actions/update-company.mjs.map +1 -1
  163. package/dist/actions/update-thread.cjs +9 -9
  164. package/dist/actions/update-thread.cjs.map +1 -1
  165. package/dist/actions/update-thread.d.cts +27 -3
  166. package/dist/actions/update-thread.d.cts.map +1 -1
  167. package/dist/actions/update-thread.d.mts +27 -3
  168. package/dist/actions/update-thread.d.mts.map +1 -1
  169. package/dist/actions/update-thread.mjs +9 -9
  170. package/dist/actions/update-thread.mjs.map +1 -1
  171. package/dist/actions/upsert-customer.cjs +10 -10
  172. package/dist/actions/upsert-customer.cjs.map +1 -1
  173. package/dist/actions/upsert-customer.d.cts +110 -3
  174. package/dist/actions/upsert-customer.d.cts.map +1 -1
  175. package/dist/actions/upsert-customer.d.mts +110 -3
  176. package/dist/actions/upsert-customer.d.mts.map +1 -1
  177. package/dist/actions/upsert-customer.mjs +10 -10
  178. package/dist/actions/upsert-customer.mjs.map +1 -1
  179. package/dist/catalog.cjs +7 -1
  180. package/dist/catalog.cjs.map +1 -1
  181. package/dist/catalog.d.cts +8 -0
  182. package/dist/catalog.d.mts +8 -0
  183. package/dist/catalog.mjs +7 -1
  184. package/dist/catalog.mjs.map +1 -1
  185. package/package.json +2 -2
@@ -1 +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"}
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<TInput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: z.ZodType;\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 as z.ZodTypeAny,\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"}
@@ -1 +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"}
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<TInput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: z.ZodType;\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 as z.ZodTypeAny,\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"}
@@ -14,29 +14,29 @@ const PlainAddCustomerToGroup_MutationFieldErrorSchema = zod.z.object({
14
14
  "VALIDATION",
15
15
  "REQUIRED",
16
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.")
17
+ ]).describe("Type of field error.").nullable(),
18
+ field: zod.z.string().describe("Name of the field where error occurred.").nullable(),
19
+ message: zod.z.string().describe("Technical error message.").nullable()
20
20
  });
21
21
  const PlainAddCustomerToGroup_MutationErrorSchema = zod.z.object({
22
- code: zod.z.string().describe("Fixed error code from the API."),
22
+ code: zod.z.string().describe("Fixed error code from the API.").nullable(),
23
23
  type: zod.z.enum([
24
24
  "VALIDATION",
25
25
  "FORBIDDEN",
26
26
  "INTERNAL"
27
- ]).describe("Type of error."),
27
+ ]).describe("Type of error.").nullable(),
28
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.")
29
+ message: zod.z.string().describe("Technical error message.").nullable()
30
30
  });
31
- const PlainAddCustomerToGroup_CreatedAtSchema = zod.z.object({ iso8601: zod.z.string().describe("ISO 8601 timestamp of creation.") });
31
+ const PlainAddCustomerToGroup_CreatedAtSchema = zod.z.object({ iso8601: zod.z.string().describe("ISO 8601 timestamp of creation.").nullable() });
32
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.")
33
+ id: zod.z.string().describe("ID of the customer group.").nullable(),
34
+ key: zod.z.string().describe("Key of the customer group.").nullable(),
35
+ name: zod.z.string().describe("Name of the customer group.").nullable()
36
36
  });
37
37
  const PlainAddCustomerToGroup_CustomerGroupMembershipSchema = zod.z.object({
38
38
  createdAt: PlainAddCustomerToGroup_CreatedAtSchema.nullable(),
39
- customerId: zod.z.string().describe("ID of the customer."),
39
+ customerId: zod.z.string().describe("ID of the customer.").nullable(),
40
40
  customerGroup: PlainAddCustomerToGroup_CustomerGroupSchema.nullable()
41
41
  });
42
42
  const PlainAddCustomerToGroupOutput = zod.z.object({
@@ -1 +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,CA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AsEA,IAAAA,EAAE,OAAO;CACnF,WAAW,wCAAwC,SAAS;CAC5D,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB;CACrD,eAAe,4CAA4C,SAAS;AACtE,CAAC;AACD,MAAa,gCAA8CA,IAAAA,EAAE,OAAO;CAClE,OAAO,4CAA4C,SAAS,CAAC,CAAC,SAAS;CACvE,0BAA0BA,IAAAA,EAAE,MAAM,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC/G,CAAC;AAED,MAAa,0BAA0BC,eAAAA,OAAO,+BAA+B;CAC3E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
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.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.object({\n type: z.enum([\"VALIDATION\", \"REQUIRED\", \"NOT_FOUND\"]).describe(\"Type of field error.\").nullable(),\n field: z.string().describe(\"Name of the field where error occurred.\").nullable(),\n message: z.string().describe(\"Technical error message.\").nullable(),\n});\nconst PlainAddCustomerToGroup_MutationErrorSchema = z.object({\n code: z.string().describe(\"Fixed error code from the API.\").nullable(),\n type: z.enum([\"VALIDATION\", \"FORBIDDEN\", \"INTERNAL\"]).describe(\"Type of error.\").nullable(),\n fields: z.array(PlainAddCustomerToGroup_MutationFieldErrorSchema).describe(\"List of field-specific errors, if any.\").nullable().optional(),\n message: z.string().describe(\"Technical error message.\").nullable(),\n});\nconst PlainAddCustomerToGroup_CreatedAtSchema = z.object({\n iso8601: z.string().describe(\"ISO 8601 timestamp of creation.\").nullable(),\n});\nconst PlainAddCustomerToGroup_CustomerGroupSchema = z.object({\n id: z.string().describe(\"ID of the customer group.\").nullable(),\n key: z.string().describe(\"Key of the customer group.\").nullable(),\n name: z.string().describe(\"Name of the customer group.\").nullable(),\n});\nconst PlainAddCustomerToGroup_CustomerGroupMembershipSchema = z.object({\n createdAt: PlainAddCustomerToGroup_CreatedAtSchema.nullable(),\n customerId: z.string().describe(\"ID of the customer.\").nullable(),\n customerGroup: PlainAddCustomerToGroup_CustomerGroupSchema.nullable(),\n});\nexport const PlainAddCustomerToGroupOutput = 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,+BAA+BA,IAAAA,EAAE,OAAO;CACnD,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,O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SAAS;AACpE,CAAC;AACD,MAAM,wDAAwDA,IAAAA,EAAE,OAAO;CACrE,WAAW,wCAAwC,SAAS;CAC5D,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB,CAAC,CAAC,SAAS;CAChE,eAAe,4CAA4C,SAAS;AACtE,CAAC;AACD,MAAa,gCAAgCA,IAAAA,EAAE,OAAO;CACpD,OAAO,4CAA4C,SAAS,CAAC,CAAC,SAAS;CACvE,0BAA0BA,IAAAA,EAAE,MAAM,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC/G,CAAC;AAED,MAAa,0BAA0BC,eAAAA,OAAO,+BAA+B;CAC3E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -1,9 +1,53 @@
1
1
  import { z } from "zod";
2
2
 
3
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]>;
4
+ declare const PlainAddCustomerToGroupInput: z.ZodObject<{
5
+ customerId: z.ZodString;
6
+ customerGroupIdentifiers: z.ZodArray<z.ZodObject<{
7
+ externalId: z.ZodOptional<z.ZodString>;
8
+ customerGroupId: z.ZodOptional<z.ZodString>;
9
+ customerGroupKey: z.ZodOptional<z.ZodString>;
10
+ }, z.core.$strip>>;
11
+ }, z.core.$strip>;
12
+ declare const PlainAddCustomerToGroupOutput: z.ZodObject<{
13
+ error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
14
+ code: z.ZodNullable<z.ZodString>;
15
+ type: z.ZodNullable<z.ZodEnum<{
16
+ VALIDATION: "VALIDATION";
17
+ FORBIDDEN: "FORBIDDEN";
18
+ INTERNAL: "INTERNAL";
19
+ }>>;
20
+ fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
21
+ type: z.ZodNullable<z.ZodEnum<{
22
+ VALIDATION: "VALIDATION";
23
+ REQUIRED: "REQUIRED";
24
+ NOT_FOUND: "NOT_FOUND";
25
+ }>>;
26
+ field: z.ZodNullable<z.ZodString>;
27
+ message: z.ZodNullable<z.ZodString>;
28
+ }, z.core.$strip>>>>;
29
+ message: z.ZodNullable<z.ZodString>;
30
+ }, z.core.$strip>>>;
31
+ customerGroupMemberships: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
32
+ createdAt: z.ZodNullable<z.ZodObject<{
33
+ iso8601: z.ZodNullable<z.ZodString>;
34
+ }, z.core.$strip>>;
35
+ customerId: z.ZodNullable<z.ZodString>;
36
+ customerGroup: z.ZodNullable<z.ZodObject<{
37
+ id: z.ZodNullable<z.ZodString>;
38
+ key: z.ZodNullable<z.ZodString>;
39
+ name: z.ZodNullable<z.ZodString>;
40
+ }, z.core.$strip>>;
41
+ }, z.core.$strip>>>>;
42
+ }, z.core.$strip>;
43
+ declare const plainAddCustomerToGroup: import("@keystrokehq/action").WorkflowActionDefinition<{
44
+ customerId: string;
45
+ customerGroupIdentifiers: {
46
+ externalId?: string | undefined;
47
+ customerGroupId?: string | undefined;
48
+ customerGroupKey?: string | undefined;
49
+ }[];
50
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
51
  //#endregion
8
52
  export { plainAddCustomerToGroup };
9
53
  //# sourceMappingURL=add-customer-to-group.d.cts.map
@@ -1 +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"}
1
+ {"version":3,"file":"add-customer-to-group.d.cts","names":[],"sources":["../../src/actions/add-customer-to-group.ts"],"mappings":";;;cAIa,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;cAgC5B,6BAAA,EAA6B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAK7B,uBAAA,gCAAuB,wBAAA"}
@@ -1,9 +1,53 @@
1
1
  import { z } from "zod";
2
2
 
3
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]>;
4
+ declare const PlainAddCustomerToGroupInput: z.ZodObject<{
5
+ customerId: z.ZodString;
6
+ customerGroupIdentifiers: z.ZodArray<z.ZodObject<{
7
+ externalId: z.ZodOptional<z.ZodString>;
8
+ customerGroupId: z.ZodOptional<z.ZodString>;
9
+ customerGroupKey: z.ZodOptional<z.ZodString>;
10
+ }, z.core.$strip>>;
11
+ }, z.core.$strip>;
12
+ declare const PlainAddCustomerToGroupOutput: z.ZodObject<{
13
+ error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
14
+ code: z.ZodNullable<z.ZodString>;
15
+ type: z.ZodNullable<z.ZodEnum<{
16
+ VALIDATION: "VALIDATION";
17
+ FORBIDDEN: "FORBIDDEN";
18
+ INTERNAL: "INTERNAL";
19
+ }>>;
20
+ fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
21
+ type: z.ZodNullable<z.ZodEnum<{
22
+ VALIDATION: "VALIDATION";
23
+ REQUIRED: "REQUIRED";
24
+ NOT_FOUND: "NOT_FOUND";
25
+ }>>;
26
+ field: z.ZodNullable<z.ZodString>;
27
+ message: z.ZodNullable<z.ZodString>;
28
+ }, z.core.$strip>>>>;
29
+ message: z.ZodNullable<z.ZodString>;
30
+ }, z.core.$strip>>>;
31
+ customerGroupMemberships: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
32
+ createdAt: z.ZodNullable<z.ZodObject<{
33
+ iso8601: z.ZodNullable<z.ZodString>;
34
+ }, z.core.$strip>>;
35
+ customerId: z.ZodNullable<z.ZodString>;
36
+ customerGroup: z.ZodNullable<z.ZodObject<{
37
+ id: z.ZodNullable<z.ZodString>;
38
+ key: z.ZodNullable<z.ZodString>;
39
+ name: z.ZodNullable<z.ZodString>;
40
+ }, z.core.$strip>>;
41
+ }, z.core.$strip>>>>;
42
+ }, z.core.$strip>;
43
+ declare const plainAddCustomerToGroup: import("@keystrokehq/action").WorkflowActionDefinition<{
44
+ customerId: string;
45
+ customerGroupIdentifiers: {
46
+ externalId?: string | undefined;
47
+ customerGroupId?: string | undefined;
48
+ customerGroupKey?: string | undefined;
49
+ }[];
50
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
51
  //#endregion
8
52
  export { plainAddCustomerToGroup };
9
53
  //# sourceMappingURL=add-customer-to-group.d.mts.map
@@ -1 +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"}
1
+ {"version":3,"file":"add-customer-to-group.d.mts","names":[],"sources":["../../src/actions/add-customer-to-group.ts"],"mappings":";;;cAIa,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;cAgC5B,6BAAA,EAA6B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAK7B,uBAAA,gCAAuB,wBAAA"}
@@ -14,29 +14,29 @@ const PlainAddCustomerToGroup_MutationFieldErrorSchema = z.object({
14
14
  "VALIDATION",
15
15
  "REQUIRED",
16
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.")
17
+ ]).describe("Type of field error.").nullable(),
18
+ field: z.string().describe("Name of the field where error occurred.").nullable(),
19
+ message: z.string().describe("Technical error message.").nullable()
20
20
  });
21
21
  const PlainAddCustomerToGroup_MutationErrorSchema = z.object({
22
- code: z.string().describe("Fixed error code from the API."),
22
+ code: z.string().describe("Fixed error code from the API.").nullable(),
23
23
  type: z.enum([
24
24
  "VALIDATION",
25
25
  "FORBIDDEN",
26
26
  "INTERNAL"
27
- ]).describe("Type of error."),
27
+ ]).describe("Type of error.").nullable(),
28
28
  fields: z.array(PlainAddCustomerToGroup_MutationFieldErrorSchema).describe("List of field-specific errors, if any.").nullable().optional(),
29
- message: z.string().describe("Technical error message.")
29
+ message: z.string().describe("Technical error message.").nullable()
30
30
  });
31
- const PlainAddCustomerToGroup_CreatedAtSchema = z.object({ iso8601: z.string().describe("ISO 8601 timestamp of creation.") });
31
+ const PlainAddCustomerToGroup_CreatedAtSchema = z.object({ iso8601: z.string().describe("ISO 8601 timestamp of creation.").nullable() });
32
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.")
33
+ id: z.string().describe("ID of the customer group.").nullable(),
34
+ key: z.string().describe("Key of the customer group.").nullable(),
35
+ name: z.string().describe("Name of the customer group.").nullable()
36
36
  });
37
37
  const PlainAddCustomerToGroup_CustomerGroupMembershipSchema = z.object({
38
38
  createdAt: PlainAddCustomerToGroup_CreatedAtSchema.nullable(),
39
- customerId: z.string().describe("ID of the customer."),
39
+ customerId: z.string().describe("ID of the customer.").nullable(),
40
40
  customerGroup: PlainAddCustomerToGroup_CustomerGroupSchema.nullable()
41
41
  });
42
42
  const plainAddCustomerToGroup = action("PLAIN_ADD_CUSTOMER_TO_GROUP", {
@@ -1 +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,SAAS,yFAAyF,CAAC,CAAC,SAAS;EACzI,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS;CACpI,CAAC,CAAC,CAAC,CAAC,SAAS,2EAA2E;AACxF,CAAC;AACD,MAAM,mDAAiE,EAAE,OAAO;CAC9E,MAAM,EAAE,KAAK;EAAC;EAAc;EAAY;CAAW,CAAC,CAAC,CAAC,SAAS,sBAAsB;CACrF,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC;CACpE,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B;AACzD,CAAC;AACD,MAAM,8CAA4D,EAAE,OAAO;CACzE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC;CAC1D,MAAM,EAAE,KAAK;EAAC;EAAc;EAAa;CAAU,CAAC,CAAC,CAAC,SAAS,gBAAgB;CAC/E,QAAQ,EAAE,MAAM,gDAAgD,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzI,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B;AACzD,CAAC;AACD,MAAM,0CAAwD,EAAE,OAAO,EACrE,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC,EAChE,CAAC;AACD,MAAM,8CAA4D,EAAE,OAAO;CACzE,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B;CACnD,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B;CACrD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B;AACzD,CAAC;AACD,MAAM,wDAAsE,EAAE,OAAO;CACnF,WAAW,wCAAwC,SAAS;CAC5D,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB;CACrD,eAAe,4CAA4C,SAAS;AACtE,CAAC;AAMD,MAAa,0BAA0B,OAAO,+BAA+B;CAC3E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,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"}
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.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.object({\n type: z.enum([\"VALIDATION\", \"REQUIRED\", \"NOT_FOUND\"]).describe(\"Type of field error.\").nullable(),\n field: z.string().describe(\"Name of the field where error occurred.\").nullable(),\n message: z.string().describe(\"Technical error message.\").nullable(),\n});\nconst PlainAddCustomerToGroup_MutationErrorSchema = z.object({\n code: z.string().describe(\"Fixed error code from the API.\").nullable(),\n type: z.enum([\"VALIDATION\", \"FORBIDDEN\", \"INTERNAL\"]).describe(\"Type of error.\").nullable(),\n fields: z.array(PlainAddCustomerToGroup_MutationFieldErrorSchema).describe(\"List of field-specific errors, if any.\").nullable().optional(),\n message: z.string().describe(\"Technical error message.\").nullable(),\n});\nconst PlainAddCustomerToGroup_CreatedAtSchema = z.object({\n iso8601: z.string().describe(\"ISO 8601 timestamp of creation.\").nullable(),\n});\nconst PlainAddCustomerToGroup_CustomerGroupSchema = z.object({\n id: z.string().describe(\"ID of the customer group.\").nullable(),\n key: z.string().describe(\"Key of the customer group.\").nullable(),\n name: z.string().describe(\"Name of the customer group.\").nullable(),\n});\nconst PlainAddCustomerToGroup_CustomerGroupMembershipSchema = z.object({\n createdAt: PlainAddCustomerToGroup_CreatedAtSchema.nullable(),\n customerId: z.string().describe(\"ID of the customer.\").nullable(),\n customerGroup: PlainAddCustomerToGroup_CustomerGroupSchema.nullable(),\n});\nexport const PlainAddCustomerToGroupOutput = 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,+BAA+B,EAAE,OAAO;CACnD,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,SAAS,yFAAyF,CAAC,CAAC,SAAS;EACzI,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS;CACpI,CAAC,CAAC,CAAC,CAAC,SAAS,2EAA2E;AACxF,CAAC;AACD,MAAM,mDAAmD,EAAE,OAAO;CAChE,MAAM,EAAE,KAAK;EAAC;EAAc;EAAY;CAAW,CAAC,CAAC,CAAC,SAAS,sBAAsB,CAAC,CAAC,SAAS;CAChG,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CAC/E,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;AACpE,CAAC;AACD,MAAM,8CAA8C,EAAE,OAAO;CAC3D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS;CACrE,MAAM,EAAE,KAAK;EAAC;EAAc;EAAa;CAAU,CAAC,CAAC,CAAC,SAAS,gBAAgB,CAAC,CAAC,SAAS;CAC1F,QAAQ,EAAE,MAAM,gDAAgD,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzI,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;AACpE,CAAC;AACD,MAAM,0CAA0C,EAAE,OAAO,EACvD,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS,EAC3E,CAAC;AACD,MAAM,8CAA8C,EAAE,OAAO;CAC3D,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;CAC9D,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS;CAChE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS;AACpE,CAAC;AACD,MAAM,wDAAwD,EAAE,OAAO;CACrE,WAAW,wCAAwC,SAAS;CAC5D,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB,CAAC,CAAC,SAAS;CAChE,eAAe,4CAA4C,SAAS;AACtE,CAAC;AAMD,MAAa,0BAA0B,OAAO,+BAA+B;CAC3E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAV2C,EAAE,OAAO;EACpD,OAAO,4CAA4C,SAAS,CAAC,CAAC,SAAS;EACvE,0BAA0B,EAAE,MAAM,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/G,CAOU;AACV,CAAC"}
@@ -8,22 +8,22 @@ const PlainCreateCustomerGroupInput = zod.z.object({
8
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
9
  });
10
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")
11
+ type: zod.z.string().describe("Type of the field error, e.g., REQUIRED or VALIDATION").nullable(),
12
+ field: zod.z.string().describe("Field with validation error").nullable(),
13
+ message: zod.z.string().describe("Technical error message for the field error").nullable()
14
14
  });
15
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"),
16
+ code: zod.z.string().describe("Fixed error code identifying the error").nullable(),
17
+ type: zod.z.string().describe("High-level error type, e.g., VALIDATION, FORBIDDEN").nullable(),
18
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")
19
+ message: zod.z.string().describe("Technical error message for the mutation failure").nullable()
20
20
  });
21
- const PlainCreateCustomerGroup_DateTimeModelSchema = zod.z.object({ iso8601: zod.z.string().describe("Date and time in ISO 8601 format") });
21
+ const PlainCreateCustomerGroup_DateTimeModelSchema = zod.z.object({ iso8601: zod.z.string().describe("Date and time in ISO 8601 format").nullable() });
22
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"),
23
+ id: zod.z.string().describe("ID of the created customer group").nullable(),
24
+ key: zod.z.string().describe("Unique key for the customer group").nullable(),
25
+ name: zod.z.string().describe("Name of the customer group").nullable(),
26
+ color: zod.z.string().describe("Hex color code for the group").nullable(),
27
27
  createdAt: PlainCreateCustomerGroup_DateTimeModelSchema.nullable(),
28
28
  updatedAt: PlainCreateCustomerGroup_DateTimeModelSchema.nullable(),
29
29
  externalId: zod.z.string().describe("Optional external ID of the group").nullable().optional()
@@ -1 +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: PlainCreateCustomerGroupOutput,\n});\n"],"mappings":";;;AAIA,MAAa,gCAA8CA,IAAAA,EAAE,OAAO;CAClE,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oKAAoK;CAC7L,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sHAAsH;CAChJ,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kGAAkG;CAC7H,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oIAAoI,CAAC,CAAC,SAAS;AACjL,CAAC;AACD,MAAM,oDAAkEA,IAAAA,EAAE,OAAO;CAC/E,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD;CACjF,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B;CACxD,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C;AAC5E,CAAC;AACD,MAAM,+CAA6DA,IAAAA,EAAE,OAAO;CAC1E,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC;CAClE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD;CAC9E,QAAQA,IAAAA,EAAE,MAAM,iDAAiD,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxI,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD;AACjF,CAAC;AACD,MAAM,+CAA6DA,IAAAA,EAAE,OAAO,EAC1E,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC,EACjE,CAAC;AACD,MAAM,oDAAkEA,IAAAA,EAAE,OAAO;CAC/E,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC;CAC1D,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC;CAC5D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B;CACtD,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"}
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.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.object({\n type: z.string().describe(\"Type of the field error, e.g., REQUIRED or VALIDATION\").nullable(),\n field: z.string().describe(\"Field with validation error\").nullable(),\n message: z.string().describe(\"Technical error message for the field error\").nullable(),\n});\nconst PlainCreateCustomerGroup_MutationErrorSchema = z.object({\n code: z.string().describe(\"Fixed error code identifying the error\").nullable(),\n type: z.string().describe(\"High-level error type, e.g., VALIDATION, FORBIDDEN\").nullable(),\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\").nullable(),\n});\nconst PlainCreateCustomerGroup_DateTimeModelSchema = z.object({\n iso8601: z.string().describe(\"Date and time in ISO 8601 format\").nullable(),\n});\nconst PlainCreateCustomerGroup_CustomerGroupModelSchema = z.object({\n id: z.string().describe(\"ID of the created customer group\").nullable(),\n key: z.string().describe(\"Unique key for the customer group\").nullable(),\n name: z.string().describe(\"Name of the customer group\").nullable(),\n color: z.string().describe(\"Hex color code for the group\").nullable(),\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.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.\",\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AAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS;CACrE,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CACvE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS;CACjE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS;CACpE,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,iCAAiCA,IAAAA,EAAE,OAAO;CACrD,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"}
@@ -1,9 +1,43 @@
1
1
  import { z } from "zod";
2
2
 
3
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]>;
4
+ declare const PlainCreateCustomerGroupInput: z.ZodObject<{
5
+ key: z.ZodString;
6
+ name: z.ZodString;
7
+ color: z.ZodString;
8
+ externalId: z.ZodOptional<z.ZodString>;
9
+ }, z.core.$strip>;
10
+ declare const PlainCreateCustomerGroupOutput: z.ZodObject<{
11
+ error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
12
+ code: z.ZodNullable<z.ZodString>;
13
+ type: z.ZodNullable<z.ZodString>;
14
+ fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
15
+ type: z.ZodNullable<z.ZodString>;
16
+ field: z.ZodNullable<z.ZodString>;
17
+ message: z.ZodNullable<z.ZodString>;
18
+ }, z.core.$strip>>>>;
19
+ message: z.ZodNullable<z.ZodString>;
20
+ }, z.core.$strip>>>;
21
+ customerGroup: z.ZodOptional<z.ZodNullable<z.ZodObject<{
22
+ id: z.ZodNullable<z.ZodString>;
23
+ key: z.ZodNullable<z.ZodString>;
24
+ name: z.ZodNullable<z.ZodString>;
25
+ color: z.ZodNullable<z.ZodString>;
26
+ createdAt: z.ZodNullable<z.ZodObject<{
27
+ iso8601: z.ZodNullable<z.ZodString>;
28
+ }, z.core.$strip>>;
29
+ updatedAt: z.ZodNullable<z.ZodObject<{
30
+ iso8601: z.ZodNullable<z.ZodString>;
31
+ }, z.core.$strip>>;
32
+ externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
+ }, z.core.$strip>>>;
34
+ }, z.core.$strip>;
35
+ declare const plainCreateCustomerGroup: import("@keystrokehq/action").WorkflowActionDefinition<{
36
+ key: string;
37
+ name: string;
38
+ color: string;
39
+ externalId?: string | undefined;
40
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
41
  //#endregion
8
42
  export { plainCreateCustomerGroup };
9
43
  //# sourceMappingURL=create-customer-group.d.cts.map
@@ -1 +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"}
1
+ {"version":3,"file":"create-customer-group.d.cts","names":[],"sources":["../../src/actions/create-customer-group.ts"],"mappings":";;;cAIa,6BAAA,EAA6B,CAAA,CAAA,SAAA;;;;;;cA6B7B,8BAAA,EAA8B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;cAK9B,wBAAA,gCAAwB,wBAAA"}
@@ -1,9 +1,43 @@
1
1
  import { z } from "zod";
2
2
 
3
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]>;
4
+ declare const PlainCreateCustomerGroupInput: z.ZodObject<{
5
+ key: z.ZodString;
6
+ name: z.ZodString;
7
+ color: z.ZodString;
8
+ externalId: z.ZodOptional<z.ZodString>;
9
+ }, z.core.$strip>;
10
+ declare const PlainCreateCustomerGroupOutput: z.ZodObject<{
11
+ error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
12
+ code: z.ZodNullable<z.ZodString>;
13
+ type: z.ZodNullable<z.ZodString>;
14
+ fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
15
+ type: z.ZodNullable<z.ZodString>;
16
+ field: z.ZodNullable<z.ZodString>;
17
+ message: z.ZodNullable<z.ZodString>;
18
+ }, z.core.$strip>>>>;
19
+ message: z.ZodNullable<z.ZodString>;
20
+ }, z.core.$strip>>>;
21
+ customerGroup: z.ZodOptional<z.ZodNullable<z.ZodObject<{
22
+ id: z.ZodNullable<z.ZodString>;
23
+ key: z.ZodNullable<z.ZodString>;
24
+ name: z.ZodNullable<z.ZodString>;
25
+ color: z.ZodNullable<z.ZodString>;
26
+ createdAt: z.ZodNullable<z.ZodObject<{
27
+ iso8601: z.ZodNullable<z.ZodString>;
28
+ }, z.core.$strip>>;
29
+ updatedAt: z.ZodNullable<z.ZodObject<{
30
+ iso8601: z.ZodNullable<z.ZodString>;
31
+ }, z.core.$strip>>;
32
+ externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
+ }, z.core.$strip>>>;
34
+ }, z.core.$strip>;
35
+ declare const plainCreateCustomerGroup: import("@keystrokehq/action").WorkflowActionDefinition<{
36
+ key: string;
37
+ name: string;
38
+ color: string;
39
+ externalId?: string | undefined;
40
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
41
  //#endregion
8
42
  export { plainCreateCustomerGroup };
9
43
  //# sourceMappingURL=create-customer-group.d.mts.map
@@ -1 +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"}
1
+ {"version":3,"file":"create-customer-group.d.mts","names":[],"sources":["../../src/actions/create-customer-group.ts"],"mappings":";;;cAIa,6BAAA,EAA6B,CAAA,CAAA,SAAA;;;;;;cA6B7B,8BAAA,EAA8B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;cAK9B,wBAAA,gCAAwB,wBAAA"}
@@ -8,22 +8,22 @@ const PlainCreateCustomerGroupInput = z.object({
8
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
9
  });
10
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")
11
+ type: z.string().describe("Type of the field error, e.g., REQUIRED or VALIDATION").nullable(),
12
+ field: z.string().describe("Field with validation error").nullable(),
13
+ message: z.string().describe("Technical error message for the field error").nullable()
14
14
  });
15
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"),
16
+ code: z.string().describe("Fixed error code identifying the error").nullable(),
17
+ type: z.string().describe("High-level error type, e.g., VALIDATION, FORBIDDEN").nullable(),
18
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")
19
+ message: z.string().describe("Technical error message for the mutation failure").nullable()
20
20
  });
21
- const PlainCreateCustomerGroup_DateTimeModelSchema = z.object({ iso8601: z.string().describe("Date and time in ISO 8601 format") });
21
+ const PlainCreateCustomerGroup_DateTimeModelSchema = z.object({ iso8601: z.string().describe("Date and time in ISO 8601 format").nullable() });
22
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"),
23
+ id: z.string().describe("ID of the created customer group").nullable(),
24
+ key: z.string().describe("Unique key for the customer group").nullable(),
25
+ name: z.string().describe("Name of the customer group").nullable(),
26
+ color: z.string().describe("Hex color code for the group").nullable(),
27
27
  createdAt: PlainCreateCustomerGroup_DateTimeModelSchema.nullable(),
28
28
  updatedAt: PlainCreateCustomerGroup_DateTimeModelSchema.nullable(),
29
29
  externalId: z.string().describe("Optional external ID of the group").nullable().optional()
@@ -1 +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"}
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.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.object({\n type: z.string().describe(\"Type of the field error, e.g., REQUIRED or VALIDATION\").nullable(),\n field: z.string().describe(\"Field with validation error\").nullable(),\n message: z.string().describe(\"Technical error message for the field error\").nullable(),\n});\nconst PlainCreateCustomerGroup_MutationErrorSchema = z.object({\n code: z.string().describe(\"Fixed error code identifying the error\").nullable(),\n type: z.string().describe(\"High-level error type, e.g., VALIDATION, FORBIDDEN\").nullable(),\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\").nullable(),\n});\nconst PlainCreateCustomerGroup_DateTimeModelSchema = z.object({\n iso8601: z.string().describe(\"Date and time in ISO 8601 format\").nullable(),\n});\nconst PlainCreateCustomerGroup_CustomerGroupModelSchema = z.object({\n id: z.string().describe(\"ID of the created customer group\").nullable(),\n key: z.string().describe(\"Unique key for the customer group\").nullable(),\n name: z.string().describe(\"Name of the customer group\").nullable(),\n color: z.string().describe(\"Hex color code for the group\").nullable(),\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.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,gCAAgC,EAAE,OAAO;CACpD,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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MD,MAAa,2BAA2B,OAAO,+BAA+B;CAC5E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAV4C,EAAE,OAAO;EACrD,OAAO,6CAA6C,SAAS,CAAC,CAAC,SAAS;EACxE,eAAe,kDAAkD,SAAS,CAAC,CAAC,SAAS;CACvF,CAOU;AACV,CAAC"}
@@ -13,27 +13,27 @@ const PlainCreateThreadInput = zod.z.object({
13
13
  }).describe("Identifier object for the customer")
14
14
  });
15
15
  const PlainCreateThread_ThreadLabelTypeSchema = zod.z.object({
16
- id: zod.z.string().describe("LabelType unique identifier"),
17
- name: zod.z.string().describe("LabelType name")
16
+ id: zod.z.string().describe("LabelType unique identifier").nullable(),
17
+ name: zod.z.string().describe("LabelType name").nullable()
18
18
  });
19
19
  const PlainCreateThread_ThreadLabelSchema = zod.z.object({
20
- id: zod.z.string().describe("Label unique identifier"),
20
+ id: zod.z.string().describe("Label unique identifier").nullable(),
21
21
  labelType: PlainCreateThread_ThreadLabelTypeSchema.nullable()
22
22
  });
23
- const PlainCreateThread_CustomerEmailSchema = zod.z.object({ email: zod.z.string().describe("Email address of the customer") });
23
+ const PlainCreateThread_CustomerEmailSchema = zod.z.object({ email: zod.z.string().describe("Email address of the customer").nullable() });
24
24
  const PlainCreateThread_CustomerSchema = zod.z.object({
25
- id: zod.z.string().describe("Customer unique identifier"),
25
+ id: zod.z.string().describe("Customer unique identifier").nullable(),
26
26
  email: PlainCreateThread_CustomerEmailSchema.nullable(),
27
- fullName: zod.z.string().describe("Full name of the customer")
27
+ fullName: zod.z.string().describe("Full name of the customer").nullable()
28
28
  });
29
- const PlainCreateThread_StatusChangedAtSchema = zod.z.object({ iso8601: zod.z.string().describe("Timestamp of last status change in ISO8601 format") });
29
+ const PlainCreateThread_StatusChangedAtSchema = zod.z.object({ iso8601: zod.z.string().describe("Timestamp of last status change in ISO8601 format").nullable() });
30
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"),
31
+ id: zod.z.string().describe("Thread unique identifier").nullable(),
32
+ title: zod.z.string().describe("Title of the thread").nullable(),
33
33
  labels: zod.z.array(PlainCreateThread_ThreadLabelSchema).describe("Labels assigned to the thread"),
34
- status: zod.z.string().describe("Current status of the thread"),
34
+ status: zod.z.string().describe("Current status of the thread").nullable(),
35
35
  customer: PlainCreateThread_CustomerSchema.nullable(),
36
- priority: zod.z.number().int().describe("Priority level of the thread"),
36
+ priority: zod.z.number().int().describe("Priority level of the thread").nullable(),
37
37
  statusChangedAt: PlainCreateThread_StatusChangedAtSchema.nullable()
38
38
  });
39
39
  const PlainCreateThread_CreateThreadDataSchema = zod.z.object({ thread: PlainCreateThread_ThreadSchema.nullable().optional() });
@@ -1 +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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D,CAAC;AACD,MAAM,mCAAiDA,IAAAA,EAAE,OAAO;CAC9D,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B;CACpD,OAAO,sCAAsC,SAAS;CACtD,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B;AAC3D,CAAC;AACD,MAAM,0CAAwDA,IAAAA,EAAE,OAAO,EACrE,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD,EAClF,CAAC;AACD,MAAM,iCAA+CA,IAAAA,EAAE,OAAO;CAC5D,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B;CAClD,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB;CAChD,QAAQA,IAAAA,EAAE,MAAM,mCAAmC,CAAC,CAAC,SAAS,+BAA+B;CAC7F,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B;CAC1D,UAAU,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"}
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.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.object({\n id: z.string().describe(\"LabelType unique identifier\").nullable(),\n name: z.string().describe(\"LabelType name\").nullable(),\n});\nconst PlainCreateThread_ThreadLabelSchema = z.object({\n id: z.string().describe(\"Label unique identifier\").nullable(),\n labelType: PlainCreateThread_ThreadLabelTypeSchema.nullable(),\n});\nconst PlainCreateThread_CustomerEmailSchema = z.object({\n email: z.string().describe(\"Email address of the customer\").nullable(),\n});\nconst PlainCreateThread_CustomerSchema = z.object({\n id: z.string().describe(\"Customer unique identifier\").nullable(),\n email: PlainCreateThread_CustomerEmailSchema.nullable(),\n fullName: z.string().describe(\"Full name of the customer\").nullable(),\n});\nconst PlainCreateThread_StatusChangedAtSchema = z.object({\n iso8601: z.string().describe(\"Timestamp of last status change in ISO8601 format\").nullable(),\n});\nconst PlainCreateThread_ThreadSchema = z.object({\n id: z.string().describe(\"Thread unique identifier\").nullable(),\n title: z.string().describe(\"Title of the thread\").nullable(),\n labels: z.array(PlainCreateThread_ThreadLabelSchema).describe(\"Labels assigned to the thread\"),\n status: z.string().describe(\"Current status of the thread\").nullable(),\n customer: PlainCreateThread_CustomerSchema.nullable(),\n priority: z.number().int().describe(\"Priority level of the thread\").nullable(),\n statusChangedAt: PlainCreateThread_StatusChangedAtSchema.nullable(),\n});\nconst PlainCreateThread_CreateThreadDataSchema = z.object({\n thread: PlainCreateThread_ThreadSchema.nullable().optional(),\n});\nconst PlainCreateThread_CreateThreadPayloadSchema = z.object({\n createThread: PlainCreateThread_CreateThreadDataSchema.nullable(),\n});\nexport const PlainCreateThreadOutput = 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,yBAAyBA,IAAAA,EAAE,OAAO;CAC7C,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;EACvF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAA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