@keystrokehq/piggy 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 (146) 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/claim-anonymous-contact.cjs +26 -0
  7. package/dist/actions/claim-anonymous-contact.cjs.map +1 -0
  8. package/dist/actions/claim-anonymous-contact.d.cts +9 -0
  9. package/dist/actions/claim-anonymous-contact.d.cts.map +1 -0
  10. package/dist/actions/claim-anonymous-contact.d.mts +9 -0
  11. package/dist/actions/claim-anonymous-contact.d.mts.map +1 -0
  12. package/dist/actions/claim-anonymous-contact.mjs +25 -0
  13. package/dist/actions/claim-anonymous-contact.mjs.map +1 -0
  14. package/dist/actions/create-contact-attribute.cjs +65 -0
  15. package/dist/actions/create-contact-attribute.cjs.map +1 -0
  16. package/dist/actions/create-contact-attribute.d.cts +9 -0
  17. package/dist/actions/create-contact-attribute.d.cts.map +1 -0
  18. package/dist/actions/create-contact-attribute.d.mts +9 -0
  19. package/dist/actions/create-contact-attribute.d.mts.map +1 -0
  20. package/dist/actions/create-contact-attribute.mjs +64 -0
  21. package/dist/actions/create-contact-attribute.mjs.map +1 -0
  22. package/dist/actions/create-credit-reception.cjs +24 -0
  23. package/dist/actions/create-credit-reception.cjs.map +1 -0
  24. package/dist/actions/create-credit-reception.d.cts +9 -0
  25. package/dist/actions/create-credit-reception.d.cts.map +1 -0
  26. package/dist/actions/create-credit-reception.d.mts +9 -0
  27. package/dist/actions/create-credit-reception.d.mts.map +1 -0
  28. package/dist/actions/create-credit-reception.mjs +21 -0
  29. package/dist/actions/create-credit-reception.mjs.map +1 -0
  30. package/dist/actions/create-vouchers-batch.cjs +36 -0
  31. package/dist/actions/create-vouchers-batch.cjs.map +1 -0
  32. package/dist/actions/create-vouchers-batch.d.cts +9 -0
  33. package/dist/actions/create-vouchers-batch.d.cts.map +1 -0
  34. package/dist/actions/create-vouchers-batch.d.mts +9 -0
  35. package/dist/actions/create-vouchers-batch.d.mts.map +1 -0
  36. package/dist/actions/create-vouchers-batch.mjs +35 -0
  37. package/dist/actions/create-vouchers-batch.mjs.map +1 -0
  38. package/dist/actions/find-or-create-products.cjs +38 -0
  39. package/dist/actions/find-or-create-products.cjs.map +1 -0
  40. package/dist/actions/find-or-create-products.d.cts +9 -0
  41. package/dist/actions/find-or-create-products.d.cts.map +1 -0
  42. package/dist/actions/find-or-create-products.d.mts +9 -0
  43. package/dist/actions/find-or-create-products.d.mts.map +1 -0
  44. package/dist/actions/find-or-create-products.mjs +37 -0
  45. package/dist/actions/find-or-create-products.mjs.map +1 -0
  46. package/dist/actions/find-voucher-by-code.cjs +45 -0
  47. package/dist/actions/find-voucher-by-code.cjs.map +1 -0
  48. package/dist/actions/find-voucher-by-code.d.cts +9 -0
  49. package/dist/actions/find-voucher-by-code.d.cts.map +1 -0
  50. package/dist/actions/find-voucher-by-code.d.mts +9 -0
  51. package/dist/actions/find-voucher-by-code.d.mts.map +1 -0
  52. package/dist/actions/find-voucher-by-code.mjs +44 -0
  53. package/dist/actions/find-voucher-by-code.mjs.map +1 -0
  54. package/dist/actions/get-contact-auth-token.cjs +20 -0
  55. package/dist/actions/get-contact-auth-token.cjs.map +1 -0
  56. package/dist/actions/get-contact-auth-token.d.cts +9 -0
  57. package/dist/actions/get-contact-auth-token.d.cts.map +1 -0
  58. package/dist/actions/get-contact-auth-token.d.mts +9 -0
  59. package/dist/actions/get-contact-auth-token.d.mts.map +1 -0
  60. package/dist/actions/get-contact-auth-token.mjs +19 -0
  61. package/dist/actions/get-contact-auth-token.mjs.map +1 -0
  62. package/dist/actions/get-contacts-credit-balance.cjs +20 -0
  63. package/dist/actions/get-contacts-credit-balance.cjs.map +1 -0
  64. package/dist/actions/get-contacts-credit-balance.d.cts +9 -0
  65. package/dist/actions/get-contacts-credit-balance.d.cts.map +1 -0
  66. package/dist/actions/get-contacts-credit-balance.d.mts +9 -0
  67. package/dist/actions/get-contacts-credit-balance.d.mts.map +1 -0
  68. package/dist/actions/get-contacts-credit-balance.mjs +19 -0
  69. package/dist/actions/get-contacts-credit-balance.mjs.map +1 -0
  70. package/dist/actions/index.cjs +29 -0
  71. package/dist/actions/index.d.cts +15 -0
  72. package/dist/actions/index.d.mts +15 -0
  73. package/dist/actions/index.mjs +15 -0
  74. package/dist/actions/list-forms.cjs +26 -0
  75. package/dist/actions/list-forms.cjs.map +1 -0
  76. package/dist/actions/list-forms.d.cts +9 -0
  77. package/dist/actions/list-forms.d.cts.map +1 -0
  78. package/dist/actions/list-forms.d.mts +9 -0
  79. package/dist/actions/list-forms.d.mts.map +1 -0
  80. package/dist/actions/list-forms.mjs +25 -0
  81. package/dist/actions/list-forms.mjs.map +1 -0
  82. package/dist/actions/list-perks.cjs +26 -0
  83. package/dist/actions/list-perks.cjs.map +1 -0
  84. package/dist/actions/list-perks.d.cts +9 -0
  85. package/dist/actions/list-perks.d.cts.map +1 -0
  86. package/dist/actions/list-perks.d.mts +9 -0
  87. package/dist/actions/list-perks.d.mts.map +1 -0
  88. package/dist/actions/list-perks.mjs +25 -0
  89. package/dist/actions/list-perks.mjs.map +1 -0
  90. package/dist/actions/merge-contacts.cjs +22 -0
  91. package/dist/actions/merge-contacts.cjs.map +1 -0
  92. package/dist/actions/merge-contacts.d.cts +9 -0
  93. package/dist/actions/merge-contacts.d.cts.map +1 -0
  94. package/dist/actions/merge-contacts.d.mts +9 -0
  95. package/dist/actions/merge-contacts.d.mts.map +1 -0
  96. package/dist/actions/merge-contacts.mjs +19 -0
  97. package/dist/actions/merge-contacts.mjs.map +1 -0
  98. package/dist/actions/send-contact-verification-email.cjs +23 -0
  99. package/dist/actions/send-contact-verification-email.cjs.map +1 -0
  100. package/dist/actions/send-contact-verification-email.d.cts +9 -0
  101. package/dist/actions/send-contact-verification-email.d.cts.map +1 -0
  102. package/dist/actions/send-contact-verification-email.d.mts +9 -0
  103. package/dist/actions/send-contact-verification-email.d.mts.map +1 -0
  104. package/dist/actions/send-contact-verification-email.mjs +22 -0
  105. package/dist/actions/send-contact-verification-email.mjs.map +1 -0
  106. package/dist/actions/update-bookings.cjs +35 -0
  107. package/dist/actions/update-bookings.cjs.map +1 -0
  108. package/dist/actions/update-bookings.d.cts +9 -0
  109. package/dist/actions/update-bookings.d.cts.map +1 -0
  110. package/dist/actions/update-bookings.d.mts +9 -0
  111. package/dist/actions/update-bookings.d.mts.map +1 -0
  112. package/dist/actions/update-bookings.mjs +32 -0
  113. package/dist/actions/update-bookings.mjs.map +1 -0
  114. package/dist/actions/update-contact-identifiers.cjs +30 -0
  115. package/dist/actions/update-contact-identifiers.cjs.map +1 -0
  116. package/dist/actions/update-contact-identifiers.d.cts +9 -0
  117. package/dist/actions/update-contact-identifiers.d.cts.map +1 -0
  118. package/dist/actions/update-contact-identifiers.d.mts +9 -0
  119. package/dist/actions/update-contact-identifiers.d.mts.map +1 -0
  120. package/dist/actions/update-contact-identifiers.mjs +29 -0
  121. package/dist/actions/update-contact-identifiers.mjs.map +1 -0
  122. package/dist/app.cjs +9 -0
  123. package/dist/app.cjs.map +1 -0
  124. package/dist/app.d.cts +5 -0
  125. package/dist/app.d.cts.map +1 -0
  126. package/dist/app.d.mts +5 -0
  127. package/dist/app.d.mts.map +1 -0
  128. package/dist/app.mjs +10 -0
  129. package/dist/app.mjs.map +1 -0
  130. package/dist/catalog.cjs +15 -0
  131. package/dist/catalog.cjs.map +1 -0
  132. package/dist/catalog.d.cts +14 -0
  133. package/dist/catalog.d.cts.map +1 -0
  134. package/dist/catalog.d.mts +14 -0
  135. package/dist/catalog.d.mts.map +1 -0
  136. package/dist/catalog.mjs +15 -0
  137. package/dist/catalog.mjs.map +1 -0
  138. package/dist/execute.cjs +18 -0
  139. package/dist/execute.cjs.map +1 -0
  140. package/dist/execute.mjs +18 -0
  141. package/dist/execute.mjs.map +1 -0
  142. package/dist/index.cjs +34 -0
  143. package/dist/index.d.cts +17 -0
  144. package/dist/index.d.mts +17 -0
  145. package/dist/index.mjs +18 -0
  146. package/package.json +49 -0
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # @keystrokehq/piggy
2
+
3
+ Keystroke-managed integration.
4
+
5
+ **App:** `piggy`
6
+ **Version:** `20260615_00`
7
+ **Actions:** 14
8
+
9
+ ```ts
10
+ import { defineAgent } from "@keystrokehq/keystroke/agent";
11
+ import { piggyClaimAnonymousContact } from "@keystrokehq/piggy/actions";
12
+
13
+ export default defineAgent({
14
+ key: "piggy-agent",
15
+ tools: [piggyClaimAnonymousContact],
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.piggy.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.executePiggyTool(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":["piggy","executePiggyTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { piggy } from \"./app\";\nimport { executePiggyTool } 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 piggy.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 executePiggyTool(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 { piggy } from "./app.mjs";
2
+ import { executePiggyTool } 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 piggy.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 executePiggyTool(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 { piggy } from \"./app\";\nimport { executePiggyTool } 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 piggy.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 executePiggyTool(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,26 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/claim-anonymous-contact.ts
4
+ const PiggyClaimAnonymousContactInput = zod.z.object({
5
+ email: zod.z.string().describe("The real email address for the Contact that is about to be not anonymous anymore").optional(),
6
+ anonymous_contact_uuid: zod.z.string().describe("The anonymous Contact's UUID containing the fictional email address")
7
+ }).describe("Request model for claiming an anonymous contact.");
8
+ const PiggyClaimAnonymousContact_ClaimAnonymousContactDataSchema = zod.z.object({
9
+ type: zod.z.string().describe("Result type indicating operation status").nullable().optional(),
10
+ message: zod.z.string().describe("Human-readable message about the claim operation result").nullable().optional()
11
+ }).describe("Data returned after claiming an anonymous contact.");
12
+ const PiggyClaimAnonymousContactOutput = zod.z.object({
13
+ data: PiggyClaimAnonymousContact_ClaimAnonymousContactDataSchema.nullable().optional(),
14
+ meta: zod.z.array(zod.z.unknown()).describe("Metadata array; typically empty for this endpoint.").nullable().optional()
15
+ }).describe("Response model for claiming an anonymous contact.");
16
+ const piggyClaimAnonymousContact = require_action.action("PIGGY_CLAIM_ANONYMOUS_CONTACT", {
17
+ slug: "piggy-claim-anonymous-contact",
18
+ name: "Claim Anonymous Contact",
19
+ description: "Tool to claim an anonymous contact by associating it with a real email address. Use when converting an anonymous contact (with a fictional email) into a verified contact with a real email address.",
20
+ input: PiggyClaimAnonymousContactInput,
21
+ output: PiggyClaimAnonymousContactOutput
22
+ });
23
+ //#endregion
24
+ exports.piggyClaimAnonymousContact = piggyClaimAnonymousContact;
25
+
26
+ //# sourceMappingURL=claim-anonymous-contact.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claim-anonymous-contact.cjs","names":["z","action"],"sources":["../../src/actions/claim-anonymous-contact.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PiggyClaimAnonymousContactInput: z.ZodTypeAny = z.object({\n email: z.string().describe(\"The real email address for the Contact that is about to be not anonymous anymore\").optional(),\n anonymous_contact_uuid: z.string().describe(\"The anonymous Contact's UUID containing the fictional email address\"),\n}).describe(\"Request model for claiming an anonymous contact.\");\nconst PiggyClaimAnonymousContact_ClaimAnonymousContactDataSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Result type indicating operation status\").nullable().optional(),\n message: z.string().describe(\"Human-readable message about the claim operation result\").nullable().optional(),\n}).describe(\"Data returned after claiming an anonymous contact.\");\nexport const PiggyClaimAnonymousContactOutput: z.ZodTypeAny = z.object({\n data: PiggyClaimAnonymousContact_ClaimAnonymousContactDataSchema.nullable().optional(),\n meta: z.array(z.unknown()).describe(\"Metadata array; typically empty for this endpoint.\").nullable().optional(),\n}).describe(\"Response model for claiming an anonymous contact.\");\n\nexport const piggyClaimAnonymousContact = action(\"PIGGY_CLAIM_ANONYMOUS_CONTACT\", {\n slug: \"piggy-claim-anonymous-contact\",\n name: \"Claim Anonymous Contact\",\n description: \"Tool to claim an anonymous contact by associating it with a real email address. Use when converting an anonymous contact (with a fictional email) into a verified contact with a real email address.\",\n input: PiggyClaimAnonymousContactInput,\n output: PiggyClaimAnonymousContactOutput,\n});\n"],"mappings":";;;AAIA,MAAa,kCAAgDA,IAAAA,EAAE,OAAO;CACpE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kFAAkF,CAAC,CAAC,SAAS;CACxH,wBAAwBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qEAAqE;AACnH,CAAC,CAAC,CAAC,SAAS,kDAAkD;AAC9D,MAAM,6DAA2EA,IAAAA,EAAE,OAAO;CACxF,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzF,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC9G,CAAC,CAAC,CAAC,SAAS,oDAAoD;AAChE,MAAa,mCAAiDA,IAAAA,EAAE,OAAO;CACrE,MAAM,2DAA2D,SAAS,CAAC,CAAC,SAAS;CACrF,MAAMA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAChH,CAAC,CAAC,CAAC,SAAS,mDAAmD;AAE/D,MAAa,6BAA6BC,eAAAA,OAAO,iCAAiC;CAChF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/claim-anonymous-contact.d.ts
4
+ declare const PiggyClaimAnonymousContactInput: z.ZodTypeAny;
5
+ declare const PiggyClaimAnonymousContactOutput: z.ZodTypeAny;
6
+ declare const piggyClaimAnonymousContact: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { piggyClaimAnonymousContact };
9
+ //# sourceMappingURL=claim-anonymous-contact.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claim-anonymous-contact.d.cts","names":[],"sources":["../../src/actions/claim-anonymous-contact.ts"],"mappings":";;;cAIa,+BAAA,EAAiC,CAAA,CAAE,UAGe;AAAA,cAKlD,gCAAA,EAAkC,CAAA,CAAE,UAGe;AAAA,cAEnD,0BAAA,gCAA0B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/claim-anonymous-contact.d.ts
4
+ declare const PiggyClaimAnonymousContactInput: z.ZodTypeAny;
5
+ declare const PiggyClaimAnonymousContactOutput: z.ZodTypeAny;
6
+ declare const piggyClaimAnonymousContact: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { piggyClaimAnonymousContact };
9
+ //# sourceMappingURL=claim-anonymous-contact.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claim-anonymous-contact.d.mts","names":[],"sources":["../../src/actions/claim-anonymous-contact.ts"],"mappings":";;;cAIa,+BAAA,EAAiC,CAAA,CAAE,UAGe;AAAA,cAKlD,gCAAA,EAAkC,CAAA,CAAE,UAGe;AAAA,cAEnD,0BAAA,gCAA0B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,25 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ //#region src/actions/claim-anonymous-contact.ts
4
+ const PiggyClaimAnonymousContactInput = z.object({
5
+ email: z.string().describe("The real email address for the Contact that is about to be not anonymous anymore").optional(),
6
+ anonymous_contact_uuid: z.string().describe("The anonymous Contact's UUID containing the fictional email address")
7
+ }).describe("Request model for claiming an anonymous contact.");
8
+ const PiggyClaimAnonymousContact_ClaimAnonymousContactDataSchema = z.object({
9
+ type: z.string().describe("Result type indicating operation status").nullable().optional(),
10
+ message: z.string().describe("Human-readable message about the claim operation result").nullable().optional()
11
+ }).describe("Data returned after claiming an anonymous contact.");
12
+ const piggyClaimAnonymousContact = action("PIGGY_CLAIM_ANONYMOUS_CONTACT", {
13
+ slug: "piggy-claim-anonymous-contact",
14
+ name: "Claim Anonymous Contact",
15
+ description: "Tool to claim an anonymous contact by associating it with a real email address. Use when converting an anonymous contact (with a fictional email) into a verified contact with a real email address.",
16
+ input: PiggyClaimAnonymousContactInput,
17
+ output: z.object({
18
+ data: PiggyClaimAnonymousContact_ClaimAnonymousContactDataSchema.nullable().optional(),
19
+ meta: z.array(z.unknown()).describe("Metadata array; typically empty for this endpoint.").nullable().optional()
20
+ }).describe("Response model for claiming an anonymous contact.")
21
+ });
22
+ //#endregion
23
+ export { piggyClaimAnonymousContact };
24
+
25
+ //# sourceMappingURL=claim-anonymous-contact.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claim-anonymous-contact.mjs","names":[],"sources":["../../src/actions/claim-anonymous-contact.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PiggyClaimAnonymousContactInput: z.ZodTypeAny = z.object({\n email: z.string().describe(\"The real email address for the Contact that is about to be not anonymous anymore\").optional(),\n anonymous_contact_uuid: z.string().describe(\"The anonymous Contact's UUID containing the fictional email address\"),\n}).describe(\"Request model for claiming an anonymous contact.\");\nconst PiggyClaimAnonymousContact_ClaimAnonymousContactDataSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Result type indicating operation status\").nullable().optional(),\n message: z.string().describe(\"Human-readable message about the claim operation result\").nullable().optional(),\n}).describe(\"Data returned after claiming an anonymous contact.\");\nexport const PiggyClaimAnonymousContactOutput: z.ZodTypeAny = z.object({\n data: PiggyClaimAnonymousContact_ClaimAnonymousContactDataSchema.nullable().optional(),\n meta: z.array(z.unknown()).describe(\"Metadata array; typically empty for this endpoint.\").nullable().optional(),\n}).describe(\"Response model for claiming an anonymous contact.\");\n\nexport const piggyClaimAnonymousContact = action(\"PIGGY_CLAIM_ANONYMOUS_CONTACT\", {\n slug: \"piggy-claim-anonymous-contact\",\n name: \"Claim Anonymous Contact\",\n description: \"Tool to claim an anonymous contact by associating it with a real email address. Use when converting an anonymous contact (with a fictional email) into a verified contact with a real email address.\",\n input: PiggyClaimAnonymousContactInput,\n output: PiggyClaimAnonymousContactOutput,\n});\n"],"mappings":";;;AAIA,MAAa,kCAAgD,EAAE,OAAO;CACpE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,kFAAkF,CAAC,CAAC,SAAS;CACxH,wBAAwB,EAAE,OAAO,CAAC,CAAC,SAAS,qEAAqE;AACnH,CAAC,CAAC,CAAC,SAAS,kDAAkD;AAC9D,MAAM,6DAA2E,EAAE,OAAO;CACxF,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzF,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC9G,CAAC,CAAC,CAAC,SAAS,oDAAoD;AAMhE,MAAa,6BAA6B,OAAO,iCAAiC;CAChF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAV4D,EAAE,OAAO;EACrE,MAAM,2DAA2D,SAAS,CAAC,CAAC,SAAS;EACrF,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChH,CAAC,CAAC,CAAC,SAAS,mDAOF;AACV,CAAC"}
@@ -0,0 +1,65 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/create-contact-attribute.ts
4
+ const PiggyCreateContactAttributeInput = zod.z.object({
5
+ name: zod.z.string().describe("Unique internal identifier for the Contact Attribute"),
6
+ label: zod.z.string().describe("Display label for the Contact Attribute").optional(),
7
+ options: zod.z.array(zod.z.object({
8
+ label: zod.z.string().describe("Option label for select or multi_select types"),
9
+ value: zod.z.string().describe("Option value for select or multi_select types")
10
+ })).describe("List of options for select or multi_select types. Each option has label and value").optional(),
11
+ data_type: zod.z.enum([
12
+ "url",
13
+ "text",
14
+ "date",
15
+ "phone",
16
+ "float",
17
+ "color",
18
+ "email",
19
+ "number",
20
+ "select",
21
+ "boolean",
22
+ "rich_text",
23
+ "date_time",
24
+ "long_text",
25
+ "date_range",
26
+ "time_range",
27
+ "identifier",
28
+ "birth_date",
29
+ "file_upload",
30
+ "media_upload",
31
+ "multi_select",
32
+ "license_plate"
33
+ ]).describe("Data type of the attribute. Determines how values are validated and rendered"),
34
+ description: zod.z.string().describe("Human-readable description of the Contact Attribute").optional()
35
+ });
36
+ const PiggyCreateContactAttribute_ContactAttributeOptionResponseSchema = zod.z.object({
37
+ label: zod.z.string().describe("Option label"),
38
+ value: zod.z.string().describe("Option value")
39
+ });
40
+ const PiggyCreateContactAttribute_ContactAttributeDataSchema = zod.z.object({
41
+ name: zod.z.string().describe("Internal name of the attribute"),
42
+ type: zod.z.string().describe("Attribute data type"),
43
+ label: zod.z.string().describe("Display label of the attribute").nullable().optional(),
44
+ options: zod.z.array(PiggyCreateContactAttribute_ContactAttributeOptionResponseSchema).describe("Available options for select or multi_select types").nullable().optional(),
45
+ field_type: zod.z.string().describe("Field rendering type in UI"),
46
+ description: zod.z.string().describe("Description of the attribute").nullable().optional(),
47
+ is_piggy_defined: zod.z.boolean().describe("True if attribute is defined by Piggy"),
48
+ is_hard_read_only: zod.z.boolean().describe("Indicates if attribute is hard read-only"),
49
+ is_soft_read_only: zod.z.boolean().describe("Indicates if attribute is soft read-only")
50
+ });
51
+ const PiggyCreateContactAttributeOutput = zod.z.object({
52
+ data: PiggyCreateContactAttribute_ContactAttributeDataSchema.nullable(),
53
+ meta: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Metadata about the response")
54
+ });
55
+ const piggyCreateContactAttribute = require_action.action("PIGGY_CREATE_CONTACT_ATTRIBUTE", {
56
+ slug: "piggy-create-contact-attribute",
57
+ name: "Create Contact Attribute",
58
+ description: "Tool to create a custom Contact Attribute. Use when you need to define new fields for contacts after initial setup.",
59
+ input: PiggyCreateContactAttributeInput,
60
+ output: PiggyCreateContactAttributeOutput
61
+ });
62
+ //#endregion
63
+ exports.piggyCreateContactAttribute = piggyCreateContactAttribute;
64
+
65
+ //# sourceMappingURL=create-contact-attribute.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-contact-attribute.cjs","names":["z","action"],"sources":["../../src/actions/create-contact-attribute.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PiggyCreateContactAttributeInput: z.ZodTypeAny = z.object({\n name: z.string().describe(\"Unique internal identifier for the Contact Attribute\"),\n label: z.string().describe(\"Display label for the Contact Attribute\").optional(),\n options: z.array(z.object({\n label: z.string().describe(\"Option label for select or multi_select types\"),\n value: z.string().describe(\"Option value for select or multi_select types\"),\n})).describe(\"List of options for select or multi_select types. Each option has label and value\").optional(),\n data_type: z.enum([\"url\", \"text\", \"date\", \"phone\", \"float\", \"color\", \"email\", \"number\", \"select\", \"boolean\", \"rich_text\", \"date_time\", \"long_text\", \"date_range\", \"time_range\", \"identifier\", \"birth_date\", \"file_upload\", \"media_upload\", \"multi_select\", \"license_plate\"]).describe(\"Data type of the attribute. Determines how values are validated and rendered\"),\n description: z.string().describe(\"Human-readable description of the Contact Attribute\").optional(),\n});\nconst PiggyCreateContactAttribute_ContactAttributeOptionResponseSchema: z.ZodTypeAny = z.object({\n label: z.string().describe(\"Option label\"),\n value: z.string().describe(\"Option value\"),\n});\nconst PiggyCreateContactAttribute_ContactAttributeDataSchema: z.ZodTypeAny = z.object({\n name: z.string().describe(\"Internal name of the attribute\"),\n type: z.string().describe(\"Attribute data type\"),\n label: z.string().describe(\"Display label of the attribute\").nullable().optional(),\n options: z.array(PiggyCreateContactAttribute_ContactAttributeOptionResponseSchema).describe(\"Available options for select or multi_select types\").nullable().optional(),\n field_type: z.string().describe(\"Field rendering type in UI\"),\n description: z.string().describe(\"Description of the attribute\").nullable().optional(),\n is_piggy_defined: z.boolean().describe(\"True if attribute is defined by Piggy\"),\n is_hard_read_only: z.boolean().describe(\"Indicates if attribute is hard read-only\"),\n is_soft_read_only: z.boolean().describe(\"Indicates if attribute is soft read-only\"),\n});\nexport const PiggyCreateContactAttributeOutput: z.ZodTypeAny = z.object({\n data: PiggyCreateContactAttribute_ContactAttributeDataSchema.nullable(),\n meta: z.record(z.string(), z.unknown()).describe(\"Metadata about the response\"),\n});\n\nexport const piggyCreateContactAttribute = action(\"PIGGY_CREATE_CONTACT_ATTRIBUTE\", {\n slug: \"piggy-create-contact-attribute\",\n name: \"Create Contact Attribute\",\n description: \"Tool to create a custom Contact Attribute. Use when you need to define new fields for contacts after initial setup.\",\n input: PiggyCreateContactAttributeInput,\n output: PiggyCreateContactAttributeOutput,\n});\n"],"mappings":";;;AAIA,MAAa,mCAAiDA,IAAAA,EAAE,OAAO;CACrE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sDAAsD;CAChF,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CAC/E,SAASA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EAC1B,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C;EAC1E,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C;CAC5E,CAAC,CAAC,CAAC,CAAC,SAAS,mFAAmF,CAAC,CAAC,SAAS;CACzG,WAAWA,IAAAA,EAAE,KAAK;EAAC;EAAO;EAAQ;EAAQ;EAAS;EAAS;EAAS;EAAS;EAAU;EAAU;EAAW;EAAa;EAAa;EAAa;EAAc;EAAc;EAAc;EAAc;EAAe;EAAgB;EAAgB;CAAe,CAAC,CAAC,CAAC,SAAS,8EAA8E;CACpW,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS;AACnG,CAAC;AACD,MAAM,mEAAiFA,IAAAA,EAAE,OAAO;CAC9F,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,cAAc;CACzC,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,cAAc;AAC3C,CAAC;AACD,MAAM,yDAAuEA,IAAAA,EAAE,OAAO;CACpF,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC;CAC1D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB;CAC/C,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjF,SAASA,IAAAA,EAAE,MAAM,gEAAgE,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtK,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B;CAC5D,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACrF,kBAAkBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,uCAAuC;CAC9E,mBAAmBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,0CAA0C;CAClF,mBAAmBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,0CAA0C;AACpF,CAAC;AACD,MAAa,oCAAkDA,IAAAA,EAAE,OAAO;CACtE,MAAM,uDAAuD,SAAS;CACtE,MAAMA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,6BAA6B;AAChF,CAAC;AAED,MAAa,8BAA8BC,eAAAA,OAAO,kCAAkC;CAClF,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-contact-attribute.d.ts
4
+ declare const PiggyCreateContactAttributeInput: z.ZodTypeAny;
5
+ declare const PiggyCreateContactAttributeOutput: z.ZodTypeAny;
6
+ declare const piggyCreateContactAttribute: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { piggyCreateContactAttribute };
9
+ //# sourceMappingURL=create-contact-attribute.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-contact-attribute.d.cts","names":[],"sources":["../../src/actions/create-contact-attribute.ts"],"mappings":";;;cAIa,gCAAA,EAAkC,CAAA,CAAE,UAS/C;AAAA,cAgBW,iCAAA,EAAmC,CAAA,CAAE,UAGhD;AAAA,cAEW,2BAAA,gCAA2B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/create-contact-attribute.d.ts
4
+ declare const PiggyCreateContactAttributeInput: z.ZodTypeAny;
5
+ declare const PiggyCreateContactAttributeOutput: z.ZodTypeAny;
6
+ declare const piggyCreateContactAttribute: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { piggyCreateContactAttribute };
9
+ //# sourceMappingURL=create-contact-attribute.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-contact-attribute.d.mts","names":[],"sources":["../../src/actions/create-contact-attribute.ts"],"mappings":";;;cAIa,gCAAA,EAAkC,CAAA,CAAE,UAS/C;AAAA,cAgBW,iCAAA,EAAmC,CAAA,CAAE,UAGhD;AAAA,cAEW,2BAAA,gCAA2B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,64 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ //#region src/actions/create-contact-attribute.ts
4
+ const PiggyCreateContactAttributeInput = z.object({
5
+ name: z.string().describe("Unique internal identifier for the Contact Attribute"),
6
+ label: z.string().describe("Display label for the Contact Attribute").optional(),
7
+ options: z.array(z.object({
8
+ label: z.string().describe("Option label for select or multi_select types"),
9
+ value: z.string().describe("Option value for select or multi_select types")
10
+ })).describe("List of options for select or multi_select types. Each option has label and value").optional(),
11
+ data_type: z.enum([
12
+ "url",
13
+ "text",
14
+ "date",
15
+ "phone",
16
+ "float",
17
+ "color",
18
+ "email",
19
+ "number",
20
+ "select",
21
+ "boolean",
22
+ "rich_text",
23
+ "date_time",
24
+ "long_text",
25
+ "date_range",
26
+ "time_range",
27
+ "identifier",
28
+ "birth_date",
29
+ "file_upload",
30
+ "media_upload",
31
+ "multi_select",
32
+ "license_plate"
33
+ ]).describe("Data type of the attribute. Determines how values are validated and rendered"),
34
+ description: z.string().describe("Human-readable description of the Contact Attribute").optional()
35
+ });
36
+ const PiggyCreateContactAttribute_ContactAttributeOptionResponseSchema = z.object({
37
+ label: z.string().describe("Option label"),
38
+ value: z.string().describe("Option value")
39
+ });
40
+ const PiggyCreateContactAttribute_ContactAttributeDataSchema = z.object({
41
+ name: z.string().describe("Internal name of the attribute"),
42
+ type: z.string().describe("Attribute data type"),
43
+ label: z.string().describe("Display label of the attribute").nullable().optional(),
44
+ options: z.array(PiggyCreateContactAttribute_ContactAttributeOptionResponseSchema).describe("Available options for select or multi_select types").nullable().optional(),
45
+ field_type: z.string().describe("Field rendering type in UI"),
46
+ description: z.string().describe("Description of the attribute").nullable().optional(),
47
+ is_piggy_defined: z.boolean().describe("True if attribute is defined by Piggy"),
48
+ is_hard_read_only: z.boolean().describe("Indicates if attribute is hard read-only"),
49
+ is_soft_read_only: z.boolean().describe("Indicates if attribute is soft read-only")
50
+ });
51
+ const piggyCreateContactAttribute = action("PIGGY_CREATE_CONTACT_ATTRIBUTE", {
52
+ slug: "piggy-create-contact-attribute",
53
+ name: "Create Contact Attribute",
54
+ description: "Tool to create a custom Contact Attribute. Use when you need to define new fields for contacts after initial setup.",
55
+ input: PiggyCreateContactAttributeInput,
56
+ output: z.object({
57
+ data: PiggyCreateContactAttribute_ContactAttributeDataSchema.nullable(),
58
+ meta: z.record(z.string(), z.unknown()).describe("Metadata about the response")
59
+ })
60
+ });
61
+ //#endregion
62
+ export { piggyCreateContactAttribute };
63
+
64
+ //# sourceMappingURL=create-contact-attribute.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-contact-attribute.mjs","names":[],"sources":["../../src/actions/create-contact-attribute.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PiggyCreateContactAttributeInput: z.ZodTypeAny = z.object({\n name: z.string().describe(\"Unique internal identifier for the Contact Attribute\"),\n label: z.string().describe(\"Display label for the Contact Attribute\").optional(),\n options: z.array(z.object({\n label: z.string().describe(\"Option label for select or multi_select types\"),\n value: z.string().describe(\"Option value for select or multi_select types\"),\n})).describe(\"List of options for select or multi_select types. Each option has label and value\").optional(),\n data_type: z.enum([\"url\", \"text\", \"date\", \"phone\", \"float\", \"color\", \"email\", \"number\", \"select\", \"boolean\", \"rich_text\", \"date_time\", \"long_text\", \"date_range\", \"time_range\", \"identifier\", \"birth_date\", \"file_upload\", \"media_upload\", \"multi_select\", \"license_plate\"]).describe(\"Data type of the attribute. Determines how values are validated and rendered\"),\n description: z.string().describe(\"Human-readable description of the Contact Attribute\").optional(),\n});\nconst PiggyCreateContactAttribute_ContactAttributeOptionResponseSchema: z.ZodTypeAny = z.object({\n label: z.string().describe(\"Option label\"),\n value: z.string().describe(\"Option value\"),\n});\nconst PiggyCreateContactAttribute_ContactAttributeDataSchema: z.ZodTypeAny = z.object({\n name: z.string().describe(\"Internal name of the attribute\"),\n type: z.string().describe(\"Attribute data type\"),\n label: z.string().describe(\"Display label of the attribute\").nullable().optional(),\n options: z.array(PiggyCreateContactAttribute_ContactAttributeOptionResponseSchema).describe(\"Available options for select or multi_select types\").nullable().optional(),\n field_type: z.string().describe(\"Field rendering type in UI\"),\n description: z.string().describe(\"Description of the attribute\").nullable().optional(),\n is_piggy_defined: z.boolean().describe(\"True if attribute is defined by Piggy\"),\n is_hard_read_only: z.boolean().describe(\"Indicates if attribute is hard read-only\"),\n is_soft_read_only: z.boolean().describe(\"Indicates if attribute is soft read-only\"),\n});\nexport const PiggyCreateContactAttributeOutput: z.ZodTypeAny = z.object({\n data: PiggyCreateContactAttribute_ContactAttributeDataSchema.nullable(),\n meta: z.record(z.string(), z.unknown()).describe(\"Metadata about the response\"),\n});\n\nexport const piggyCreateContactAttribute = action(\"PIGGY_CREATE_CONTACT_ATTRIBUTE\", {\n slug: \"piggy-create-contact-attribute\",\n name: \"Create Contact Attribute\",\n description: \"Tool to create a custom Contact Attribute. Use when you need to define new fields for contacts after initial setup.\",\n input: PiggyCreateContactAttributeInput,\n output: PiggyCreateContactAttributeOutput,\n});\n"],"mappings":";;;AAIA,MAAa,mCAAiD,EAAE,OAAO;CACrE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,sDAAsD;CAChF,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CAC/E,SAAS,EAAE,MAAM,EAAE,OAAO;EAC1B,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C;EAC1E,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C;CAC5E,CAAC,CAAC,CAAC,CAAC,SAAS,mFAAmF,CAAC,CAAC,SAAS;CACzG,WAAW,EAAE,KAAK;EAAC;EAAO;EAAQ;EAAQ;EAAS;EAAS;EAAS;EAAS;EAAU;EAAU;EAAW;EAAa;EAAa;EAAa;EAAc;EAAc;EAAc;EAAc;EAAe;EAAgB;EAAgB;CAAe,CAAC,CAAC,CAAC,SAAS,8EAA8E;CACpW,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS;AACnG,CAAC;AACD,MAAM,mEAAiF,EAAE,OAAO;CAC9F,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,cAAc;CACzC,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,cAAc;AAC3C,CAAC;AACD,MAAM,yDAAuE,EAAE,OAAO;CACpF,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC;CAC1D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB;CAC/C,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjF,SAAS,EAAE,MAAM,gEAAgE,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtK,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B;CAC5D,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACrF,kBAAkB,EAAE,QAAQ,CAAC,CAAC,SAAS,uCAAuC;CAC9E,mBAAmB,EAAE,QAAQ,CAAC,CAAC,SAAS,0CAA0C;CAClF,mBAAmB,EAAE,QAAQ,CAAC,CAAC,SAAS,0CAA0C;AACpF,CAAC;AAMD,MAAa,8BAA8B,OAAO,kCAAkC;CAClF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAV6D,EAAE,OAAO;EACtE,MAAM,uDAAuD,SAAS;EACtE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,6BAA6B;CAChF,CAOU;AACV,CAAC"}
@@ -0,0 +1,24 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/create-credit-reception.ts
4
+ const PiggyCreateCreditReceptionInput = zod.z.object({
5
+ credits: zod.z.number().int().describe("Fixed number of credits to award. Either unit_value or credits must be provided").optional(),
6
+ shop_uuid: zod.z.string().describe("UUID of the shop where the transaction occurred"),
7
+ unit_value: zod.z.number().int().describe("Unit value (e.g., purchase amount in cents) for calculating credits. Either unit_value or credits must be provided").optional(),
8
+ contact_uuid: zod.z.string().describe("UUID of the contact to receive credits")
9
+ }).describe("Request schema for creating a credit reception.");
10
+ const PiggyCreateCreditReceptionOutput = zod.z.object({
11
+ data: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Created credit reception data"),
12
+ meta: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Response metadata")
13
+ }).describe("Response schema for credit reception creation.");
14
+ const piggyCreateCreditReception = require_action.action("PIGGY_CREATE_CREDIT_RECEPTION", {
15
+ slug: "piggy-create-credit-reception",
16
+ name: "Create Credit Reception",
17
+ description: "Tool to create a credit reception for a contact. Use when awarding credits to customers based on purchases or fixed amounts.",
18
+ input: PiggyCreateCreditReceptionInput,
19
+ output: PiggyCreateCreditReceptionOutput
20
+ });
21
+ //#endregion
22
+ exports.piggyCreateCreditReception = piggyCreateCreditReception;
23
+
24
+ //# sourceMappingURL=create-credit-reception.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-credit-reception.cjs","names":["z","action"],"sources":["../../src/actions/create-credit-reception.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PiggyCreateCreditReceptionInput: z.ZodTypeAny = z.object({\n credits: z.number().int().describe(\"Fixed number of credits to award. Either unit_value or credits must be provided\").optional(),\n shop_uuid: z.string().describe(\"UUID of the shop where the transaction occurred\"),\n unit_value: z.number().int().describe(\"Unit value (e.g., purchase amount in cents) for calculating credits. Either unit_value or credits must be provided\").optional(),\n contact_uuid: z.string().describe(\"UUID of the contact to receive credits\"),\n}).describe(\"Request schema for creating a credit reception.\");\nexport const PiggyCreateCreditReceptionOutput: z.ZodTypeAny = z.object({\n data: z.record(z.string(), z.unknown()).describe(\"Created credit reception data\"),\n meta: z.record(z.string(), z.unknown()).describe(\"Response metadata\"),\n}).describe(\"Response schema for credit reception creation.\");\n\nexport const piggyCreateCreditReception = action(\"PIGGY_CREATE_CREDIT_RECEPTION\", {\n slug: \"piggy-create-credit-reception\",\n name: \"Create Credit Reception\",\n description: \"Tool to create a credit reception for a contact. Use when awarding credits to customers based on purchases or fixed amounts.\",\n input: PiggyCreateCreditReceptionInput,\n output: PiggyCreateCreditReceptionOutput,\n});\n"],"mappings":";;;AAIA,MAAa,kCAAgDA,IAAAA,EAAE,OAAO;CACpE,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS;CAC/H,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD;CAChF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oHAAoH,CAAC,CAAC,SAAS;CACrK,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC;AAC5E,CAAC,CAAC,CAAC,SAAS,iDAAiD;AAC7D,MAAa,mCAAiDA,IAAAA,EAAE,OAAO;CACrE,MAAMA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,+BAA+B;CAChF,MAAMA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,mBAAmB;AACtE,CAAC,CAAC,CAAC,SAAS,gDAAgD;AAE5D,MAAa,6BAA6BC,eAAAA,OAAO,iCAAiC;CAChF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/create-credit-reception.d.ts
4
+ declare const PiggyCreateCreditReceptionInput: z.ZodTypeAny;
5
+ declare const PiggyCreateCreditReceptionOutput: z.ZodTypeAny;
6
+ declare const piggyCreateCreditReception: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { piggyCreateCreditReception };
9
+ //# sourceMappingURL=create-credit-reception.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-credit-reception.d.cts","names":[],"sources":["../../src/actions/create-credit-reception.ts"],"mappings":";;;cAIa,+BAAA,EAAiC,CAAA,CAAE,UAKc;AAAA,cACjD,gCAAA,EAAkC,CAAA,CAAE,UAGY;AAAA,cAEhD,0BAAA,gCAA0B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/create-credit-reception.d.ts
4
+ declare const PiggyCreateCreditReceptionInput: z.ZodTypeAny;
5
+ declare const PiggyCreateCreditReceptionOutput: z.ZodTypeAny;
6
+ declare const piggyCreateCreditReception: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { piggyCreateCreditReception };
9
+ //# sourceMappingURL=create-credit-reception.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-credit-reception.d.mts","names":[],"sources":["../../src/actions/create-credit-reception.ts"],"mappings":";;;cAIa,+BAAA,EAAiC,CAAA,CAAE,UAKc;AAAA,cACjD,gCAAA,EAAkC,CAAA,CAAE,UAGY;AAAA,cAEhD,0BAAA,gCAA0B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,21 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ const piggyCreateCreditReception = action("PIGGY_CREATE_CREDIT_RECEPTION", {
4
+ slug: "piggy-create-credit-reception",
5
+ name: "Create Credit Reception",
6
+ description: "Tool to create a credit reception for a contact. Use when awarding credits to customers based on purchases or fixed amounts.",
7
+ input: z.object({
8
+ credits: z.number().int().describe("Fixed number of credits to award. Either unit_value or credits must be provided").optional(),
9
+ shop_uuid: z.string().describe("UUID of the shop where the transaction occurred"),
10
+ unit_value: z.number().int().describe("Unit value (e.g., purchase amount in cents) for calculating credits. Either unit_value or credits must be provided").optional(),
11
+ contact_uuid: z.string().describe("UUID of the contact to receive credits")
12
+ }).describe("Request schema for creating a credit reception."),
13
+ output: z.object({
14
+ data: z.record(z.string(), z.unknown()).describe("Created credit reception data"),
15
+ meta: z.record(z.string(), z.unknown()).describe("Response metadata")
16
+ }).describe("Response schema for credit reception creation.")
17
+ });
18
+ //#endregion
19
+ export { piggyCreateCreditReception };
20
+
21
+ //# sourceMappingURL=create-credit-reception.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-credit-reception.mjs","names":[],"sources":["../../src/actions/create-credit-reception.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PiggyCreateCreditReceptionInput: z.ZodTypeAny = z.object({\n credits: z.number().int().describe(\"Fixed number of credits to award. Either unit_value or credits must be provided\").optional(),\n shop_uuid: z.string().describe(\"UUID of the shop where the transaction occurred\"),\n unit_value: z.number().int().describe(\"Unit value (e.g., purchase amount in cents) for calculating credits. Either unit_value or credits must be provided\").optional(),\n contact_uuid: z.string().describe(\"UUID of the contact to receive credits\"),\n}).describe(\"Request schema for creating a credit reception.\");\nexport const PiggyCreateCreditReceptionOutput: z.ZodTypeAny = z.object({\n data: z.record(z.string(), z.unknown()).describe(\"Created credit reception data\"),\n meta: z.record(z.string(), z.unknown()).describe(\"Response metadata\"),\n}).describe(\"Response schema for credit reception creation.\");\n\nexport const piggyCreateCreditReception = action(\"PIGGY_CREATE_CREDIT_RECEPTION\", {\n slug: \"piggy-create-credit-reception\",\n name: \"Create Credit Reception\",\n description: \"Tool to create a credit reception for a contact. Use when awarding credits to customers based on purchases or fixed amounts.\",\n input: PiggyCreateCreditReceptionInput,\n output: PiggyCreateCreditReceptionOutput,\n});\n"],"mappings":";;AAeA,MAAa,6BAA6B,OAAO,iCAAiC;CAChF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAf2D,EAAE,OAAO;EACpE,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS;EAC/H,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD;EAChF,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oHAAoH,CAAC,CAAC,SAAS;EACrK,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC;CAC5E,CAAC,CAAC,CAAC,SAAS,iDAUH;CACP,QAV4D,EAAE,OAAO;EACrE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,+BAA+B;EAChF,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,mBAAmB;CACtE,CAAC,CAAC,CAAC,SAAS,gDAOF;AACV,CAAC"}
@@ -0,0 +1,36 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/create-vouchers-batch.ts
4
+ const PiggyCreateVouchersBatchInput = zod.z.object({
5
+ quantity: zod.z.number().int().describe("The number of Vouchers you want to generate (min: 1, max: 500)"),
6
+ contact_uuid: zod.z.string().describe("The Contact's UUID to be linked to the batch of Vouchers").optional(),
7
+ promotion_uuid: zod.z.string().describe("UUID of the Promotion for which the Vouchers are to be created"),
8
+ activation_date: zod.z.string().describe("The activation date for the batch of Vouchers in ISO 8601 format").optional(),
9
+ expiration_date: zod.z.string().describe("The expiration date for the batch of Vouchers in ISO 8601 format").optional(),
10
+ custom_attributes: zod.z.array(zod.z.object({
11
+ key: zod.z.string().describe("Attribute key"),
12
+ value: zod.z.string().describe("Attribute value")
13
+ }).describe("Custom attribute for vouchers.")).describe("Additional Custom Attributes for the Vouchers").optional()
14
+ }).describe("Request schema for batch voucher creation.");
15
+ const PiggyCreateVouchersBatch_VoucherBatchDataSchema = zod.z.object({
16
+ type: zod.z.string().describe("Resource type, always 'vouchers' for this endpoint"),
17
+ uuid: zod.z.string().describe("Unique identifier for the batch operation"),
18
+ status: zod.z.string().describe("Current batch status (e.g., 'PENDING', 'COMPLETED'). Batch creation is asynchronous"),
19
+ quantity: zod.z.number().int().describe("The number of vouchers generated in this batch"),
20
+ created_at: zod.z.string().describe("Timestamp when batch was created")
21
+ }).describe("Batch voucher creation data.");
22
+ const PiggyCreateVouchersBatchOutput = zod.z.object({
23
+ data: PiggyCreateVouchersBatch_VoucherBatchDataSchema.nullable(),
24
+ meta: zod.z.array(zod.z.record(zod.z.string(), zod.z.unknown())).describe("Response metadata (usually empty)")
25
+ }).describe("Response schema for batch voucher creation.");
26
+ const piggyCreateVouchersBatch = require_action.action("PIGGY_CREATE_VOUCHERS_BATCH", {
27
+ slug: "piggy-create-vouchers-batch",
28
+ name: "Create Vouchers Batch",
29
+ description: "Tool to create a batch of vouchers for a promotion. Use when you need to generate multiple vouchers at once for a specific promotion. Batch processing is asynchronous and returns a PENDING status initially.",
30
+ input: PiggyCreateVouchersBatchInput,
31
+ output: PiggyCreateVouchersBatchOutput
32
+ });
33
+ //#endregion
34
+ exports.piggyCreateVouchersBatch = piggyCreateVouchersBatch;
35
+
36
+ //# sourceMappingURL=create-vouchers-batch.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-vouchers-batch.cjs","names":["z","action"],"sources":["../../src/actions/create-vouchers-batch.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PiggyCreateVouchersBatchInput: z.ZodTypeAny = z.object({\n quantity: z.number().int().describe(\"The number of Vouchers you want to generate (min: 1, max: 500)\"),\n contact_uuid: z.string().describe(\"The Contact's UUID to be linked to the batch of Vouchers\").optional(),\n promotion_uuid: z.string().describe(\"UUID of the Promotion for which the Vouchers are to be created\"),\n activation_date: z.string().describe(\"The activation date for the batch of Vouchers in ISO 8601 format\").optional(),\n expiration_date: z.string().describe(\"The expiration date for the batch of Vouchers in ISO 8601 format\").optional(),\n custom_attributes: z.array(z.object({\n key: z.string().describe(\"Attribute key\"),\n value: z.string().describe(\"Attribute value\"),\n}).describe(\"Custom attribute for vouchers.\")).describe(\"Additional Custom Attributes for the Vouchers\").optional(),\n}).describe(\"Request schema for batch voucher creation.\");\nconst PiggyCreateVouchersBatch_VoucherBatchDataSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Resource type, always 'vouchers' for this endpoint\"),\n uuid: z.string().describe(\"Unique identifier for the batch operation\"),\n status: z.string().describe(\"Current batch status (e.g., 'PENDING', 'COMPLETED'). Batch creation is asynchronous\"),\n quantity: z.number().int().describe(\"The number of vouchers generated in this batch\"),\n created_at: z.string().describe(\"Timestamp when batch was created\"),\n}).describe(\"Batch voucher creation data.\");\nexport const PiggyCreateVouchersBatchOutput: z.ZodTypeAny = z.object({\n data: PiggyCreateVouchersBatch_VoucherBatchDataSchema.nullable(),\n meta: z.array(z.record(z.string(), z.unknown())).describe(\"Response metadata (usually empty)\"),\n}).describe(\"Response schema for batch voucher creation.\");\n\nexport const piggyCreateVouchersBatch = action(\"PIGGY_CREATE_VOUCHERS_BATCH\", {\n slug: \"piggy-create-vouchers-batch\",\n name: \"Create Vouchers Batch\",\n description: \"Tool to create a batch of vouchers for a promotion. Use when you need to generate multiple vouchers at once for a specific promotion. Batch processing is asynchronous and returns a PENDING status initially.\",\n input: PiggyCreateVouchersBatchInput,\n output: PiggyCreateVouchersBatchOutput,\n});\n"],"mappings":";;;AAIA,MAAa,gCAA8CA,IAAAA,EAAE,OAAO;CAClE,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,gEAAgE;CACpG,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;CACvG,gBAAgBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gEAAgE;CACpG,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kEAAkE,CAAC,CAAC,SAAS;CAClH,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kEAAkE,CAAC,CAAC,SAAS;CAClH,mBAAmBA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EACpC,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,eAAe;EACxC,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iBAAiB;CAC9C,CAAC,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS;AAClH,CAAC,CAAC,CAAC,SAAS,4CAA4C;AACxD,MAAM,kDAAgEA,IAAAA,EAAE,OAAO;CAC7E,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD;CAC9E,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C;CACrE,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qFAAqF;CACjH,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,gDAAgD;CACpF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC;AACpE,CAAC,CAAC,CAAC,SAAS,8BAA8B;AAC1C,MAAa,iCAA+CA,IAAAA,EAAE,OAAO;CACnE,MAAM,gDAAgD,SAAS;CAC/D,MAAMA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,mCAAmC;AAC/F,CAAC,CAAC,CAAC,SAAS,6CAA6C;AAEzD,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-vouchers-batch.d.ts
4
+ declare const PiggyCreateVouchersBatchInput: z.ZodTypeAny;
5
+ declare const PiggyCreateVouchersBatchOutput: z.ZodTypeAny;
6
+ declare const piggyCreateVouchersBatch: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { piggyCreateVouchersBatch };
9
+ //# sourceMappingURL=create-vouchers-batch.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-vouchers-batch.d.cts","names":[],"sources":["../../src/actions/create-vouchers-batch.ts"],"mappings":";;;cAIa,6BAAA,EAA+B,CAAA,CAAE,UAUW;AAAA,cAQ5C,8BAAA,EAAgC,CAAA,CAAE,UAGW;AAAA,cAE7C,wBAAA,gCAAwB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/create-vouchers-batch.d.ts
4
+ declare const PiggyCreateVouchersBatchInput: z.ZodTypeAny;
5
+ declare const PiggyCreateVouchersBatchOutput: z.ZodTypeAny;
6
+ declare const piggyCreateVouchersBatch: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { piggyCreateVouchersBatch };
9
+ //# sourceMappingURL=create-vouchers-batch.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-vouchers-batch.d.mts","names":[],"sources":["../../src/actions/create-vouchers-batch.ts"],"mappings":";;;cAIa,6BAAA,EAA+B,CAAA,CAAE,UAUW;AAAA,cAQ5C,8BAAA,EAAgC,CAAA,CAAE,UAGW;AAAA,cAE7C,wBAAA,gCAAwB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,35 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ //#region src/actions/create-vouchers-batch.ts
4
+ const PiggyCreateVouchersBatchInput = z.object({
5
+ quantity: z.number().int().describe("The number of Vouchers you want to generate (min: 1, max: 500)"),
6
+ contact_uuid: z.string().describe("The Contact's UUID to be linked to the batch of Vouchers").optional(),
7
+ promotion_uuid: z.string().describe("UUID of the Promotion for which the Vouchers are to be created"),
8
+ activation_date: z.string().describe("The activation date for the batch of Vouchers in ISO 8601 format").optional(),
9
+ expiration_date: z.string().describe("The expiration date for the batch of Vouchers in ISO 8601 format").optional(),
10
+ custom_attributes: z.array(z.object({
11
+ key: z.string().describe("Attribute key"),
12
+ value: z.string().describe("Attribute value")
13
+ }).describe("Custom attribute for vouchers.")).describe("Additional Custom Attributes for the Vouchers").optional()
14
+ }).describe("Request schema for batch voucher creation.");
15
+ const PiggyCreateVouchersBatch_VoucherBatchDataSchema = z.object({
16
+ type: z.string().describe("Resource type, always 'vouchers' for this endpoint"),
17
+ uuid: z.string().describe("Unique identifier for the batch operation"),
18
+ status: z.string().describe("Current batch status (e.g., 'PENDING', 'COMPLETED'). Batch creation is asynchronous"),
19
+ quantity: z.number().int().describe("The number of vouchers generated in this batch"),
20
+ created_at: z.string().describe("Timestamp when batch was created")
21
+ }).describe("Batch voucher creation data.");
22
+ const piggyCreateVouchersBatch = action("PIGGY_CREATE_VOUCHERS_BATCH", {
23
+ slug: "piggy-create-vouchers-batch",
24
+ name: "Create Vouchers Batch",
25
+ description: "Tool to create a batch of vouchers for a promotion. Use when you need to generate multiple vouchers at once for a specific promotion. Batch processing is asynchronous and returns a PENDING status initially.",
26
+ input: PiggyCreateVouchersBatchInput,
27
+ output: z.object({
28
+ data: PiggyCreateVouchersBatch_VoucherBatchDataSchema.nullable(),
29
+ meta: z.array(z.record(z.string(), z.unknown())).describe("Response metadata (usually empty)")
30
+ }).describe("Response schema for batch voucher creation.")
31
+ });
32
+ //#endregion
33
+ export { piggyCreateVouchersBatch };
34
+
35
+ //# sourceMappingURL=create-vouchers-batch.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-vouchers-batch.mjs","names":[],"sources":["../../src/actions/create-vouchers-batch.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PiggyCreateVouchersBatchInput: z.ZodTypeAny = z.object({\n quantity: z.number().int().describe(\"The number of Vouchers you want to generate (min: 1, max: 500)\"),\n contact_uuid: z.string().describe(\"The Contact's UUID to be linked to the batch of Vouchers\").optional(),\n promotion_uuid: z.string().describe(\"UUID of the Promotion for which the Vouchers are to be created\"),\n activation_date: z.string().describe(\"The activation date for the batch of Vouchers in ISO 8601 format\").optional(),\n expiration_date: z.string().describe(\"The expiration date for the batch of Vouchers in ISO 8601 format\").optional(),\n custom_attributes: z.array(z.object({\n key: z.string().describe(\"Attribute key\"),\n value: z.string().describe(\"Attribute value\"),\n}).describe(\"Custom attribute for vouchers.\")).describe(\"Additional Custom Attributes for the Vouchers\").optional(),\n}).describe(\"Request schema for batch voucher creation.\");\nconst PiggyCreateVouchersBatch_VoucherBatchDataSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Resource type, always 'vouchers' for this endpoint\"),\n uuid: z.string().describe(\"Unique identifier for the batch operation\"),\n status: z.string().describe(\"Current batch status (e.g., 'PENDING', 'COMPLETED'). Batch creation is asynchronous\"),\n quantity: z.number().int().describe(\"The number of vouchers generated in this batch\"),\n created_at: z.string().describe(\"Timestamp when batch was created\"),\n}).describe(\"Batch voucher creation data.\");\nexport const PiggyCreateVouchersBatchOutput: z.ZodTypeAny = z.object({\n data: PiggyCreateVouchersBatch_VoucherBatchDataSchema.nullable(),\n meta: z.array(z.record(z.string(), z.unknown())).describe(\"Response metadata (usually empty)\"),\n}).describe(\"Response schema for batch voucher creation.\");\n\nexport const piggyCreateVouchersBatch = action(\"PIGGY_CREATE_VOUCHERS_BATCH\", {\n slug: \"piggy-create-vouchers-batch\",\n name: \"Create Vouchers Batch\",\n description: \"Tool to create a batch of vouchers for a promotion. Use when you need to generate multiple vouchers at once for a specific promotion. Batch processing is asynchronous and returns a PENDING status initially.\",\n input: PiggyCreateVouchersBatchInput,\n output: PiggyCreateVouchersBatchOutput,\n});\n"],"mappings":";;;AAIA,MAAa,gCAA8C,EAAE,OAAO;CAClE,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,gEAAgE;CACpG,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;CACvG,gBAAgB,EAAE,OAAO,CAAC,CAAC,SAAS,gEAAgE;CACpG,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,kEAAkE,CAAC,CAAC,SAAS;CAClH,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,kEAAkE,CAAC,CAAC,SAAS;CAClH,mBAAmB,EAAE,MAAM,EAAE,OAAO;EACpC,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,eAAe;EACxC,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,iBAAiB;CAC9C,CAAC,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS;AAClH,CAAC,CAAC,CAAC,SAAS,4CAA4C;AACxD,MAAM,kDAAgE,EAAE,OAAO;CAC7E,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD;CAC9E,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C;CACrE,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,qFAAqF;CACjH,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,gDAAgD;CACpF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC;AACpE,CAAC,CAAC,CAAC,SAAS,8BAA8B;AAM1C,MAAa,2BAA2B,OAAO,+BAA+B;CAC5E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAV0D,EAAE,OAAO;EACnE,MAAM,gDAAgD,SAAS;EAC/D,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,mCAAmC;CAC/F,CAAC,CAAC,CAAC,SAAS,6CAOF;AACV,CAAC"}