@keystrokehq/payhere 0.1.5 → 0.1.6
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.
- package/dist/action.cjs.map +1 -1
- package/dist/action.mjs.map +1 -1
- package/dist/actions/create-hook.cjs +1 -0
- package/dist/actions/create-hook.cjs.map +1 -1
- package/dist/actions/create-hook.d.cts +3 -19
- package/dist/actions/create-hook.d.cts.map +1 -1
- package/dist/actions/create-hook.d.mts +3 -19
- package/dist/actions/create-hook.d.mts.map +1 -1
- package/dist/actions/create-hook.mjs +1 -0
- package/dist/actions/create-hook.mjs.map +1 -1
- package/dist/actions/create-plan.cjs +1 -0
- package/dist/actions/create-plan.cjs.map +1 -1
- package/dist/actions/create-plan.d.cts +3 -33
- package/dist/actions/create-plan.d.cts.map +1 -1
- package/dist/actions/create-plan.d.mts +3 -33
- package/dist/actions/create-plan.d.mts.map +1 -1
- package/dist/actions/create-plan.mjs +1 -0
- package/dist/actions/create-plan.mjs.map +1 -1
- package/dist/actions/delete-hook.cjs +1 -0
- package/dist/actions/delete-hook.cjs.map +1 -1
- package/dist/actions/delete-hook.d.cts +3 -17
- package/dist/actions/delete-hook.d.cts.map +1 -1
- package/dist/actions/delete-hook.d.mts +3 -17
- package/dist/actions/delete-hook.d.mts.map +1 -1
- package/dist/actions/delete-hook.mjs +1 -0
- package/dist/actions/delete-hook.mjs.map +1 -1
- package/dist/actions/get-current-company-stats.cjs +1 -0
- package/dist/actions/get-current-company-stats.cjs.map +1 -1
- package/dist/actions/get-current-company-stats.d.cts +3 -15
- package/dist/actions/get-current-company-stats.d.cts.map +1 -1
- package/dist/actions/get-current-company-stats.d.mts +3 -15
- package/dist/actions/get-current-company-stats.d.mts.map +1 -1
- package/dist/actions/get-current-company-stats.mjs +1 -0
- package/dist/actions/get-current-company-stats.mjs.map +1 -1
- package/dist/actions/get-current-company.cjs +1 -0
- package/dist/actions/get-current-company.cjs.map +1 -1
- package/dist/actions/get-current-company.d.cts +3 -15
- package/dist/actions/get-current-company.d.cts.map +1 -1
- package/dist/actions/get-current-company.d.mts +3 -15
- package/dist/actions/get-current-company.d.mts.map +1 -1
- package/dist/actions/get-current-company.mjs +1 -0
- package/dist/actions/get-current-company.mjs.map +1 -1
- package/dist/actions/get-user.cjs +1 -0
- package/dist/actions/get-user.cjs.map +1 -1
- package/dist/actions/get-user.d.cts +3 -15
- package/dist/actions/get-user.d.cts.map +1 -1
- package/dist/actions/get-user.d.mts +3 -15
- package/dist/actions/get-user.d.mts.map +1 -1
- package/dist/actions/get-user.mjs +1 -0
- package/dist/actions/get-user.mjs.map +1 -1
- package/dist/actions/list-customers.cjs +1 -0
- package/dist/actions/list-customers.cjs.map +1 -1
- package/dist/actions/list-customers.d.cts +3 -18
- package/dist/actions/list-customers.d.cts.map +1 -1
- package/dist/actions/list-customers.d.mts +3 -18
- package/dist/actions/list-customers.d.mts.map +1 -1
- package/dist/actions/list-customers.mjs +1 -0
- package/dist/actions/list-customers.mjs.map +1 -1
- package/dist/actions/list-hooks.cjs +1 -0
- package/dist/actions/list-hooks.cjs.map +1 -1
- package/dist/actions/list-hooks.d.cts +3 -15
- package/dist/actions/list-hooks.d.cts.map +1 -1
- package/dist/actions/list-hooks.d.mts +3 -15
- package/dist/actions/list-hooks.d.mts.map +1 -1
- package/dist/actions/list-hooks.mjs +1 -0
- package/dist/actions/list-hooks.mjs.map +1 -1
- package/dist/actions/list-payments.cjs +1 -0
- package/dist/actions/list-payments.cjs.map +1 -1
- package/dist/actions/list-payments.d.cts +3 -18
- package/dist/actions/list-payments.d.cts.map +1 -1
- package/dist/actions/list-payments.d.mts +3 -18
- package/dist/actions/list-payments.d.mts.map +1 -1
- package/dist/actions/list-payments.mjs +1 -0
- package/dist/actions/list-payments.mjs.map +1 -1
- package/dist/actions/list-plans.cjs +1 -0
- package/dist/actions/list-plans.cjs.map +1 -1
- package/dist/actions/list-plans.d.cts +3 -18
- package/dist/actions/list-plans.d.cts.map +1 -1
- package/dist/actions/list-plans.d.mts +3 -18
- package/dist/actions/list-plans.d.mts.map +1 -1
- package/dist/actions/list-plans.mjs +1 -0
- package/dist/actions/list-plans.mjs.map +1 -1
- package/dist/actions/list-subscriptions.cjs +1 -0
- package/dist/actions/list-subscriptions.cjs.map +1 -1
- package/dist/actions/list-subscriptions.d.cts +3 -18
- package/dist/actions/list-subscriptions.d.cts.map +1 -1
- package/dist/actions/list-subscriptions.d.mts +3 -18
- package/dist/actions/list-subscriptions.d.mts.map +1 -1
- package/dist/actions/list-subscriptions.mjs +1 -0
- package/dist/actions/list-subscriptions.mjs.map +1 -1
- package/dist/actions/update-current-company.cjs +1 -0
- package/dist/actions/update-current-company.cjs.map +1 -1
- package/dist/actions/update-current-company.d.cts +3 -28
- package/dist/actions/update-current-company.d.cts.map +1 -1
- package/dist/actions/update-current-company.d.mts +3 -28
- package/dist/actions/update-current-company.d.mts.map +1 -1
- package/dist/actions/update-current-company.mjs +1 -0
- package/dist/actions/update-current-company.mjs.map +1 -1
- package/dist/actions/update-plan.cjs +1 -0
- package/dist/actions/update-plan.cjs.map +1 -1
- package/dist/actions/update-plan.d.cts +3 -31
- package/dist/actions/update-plan.d.cts.map +1 -1
- package/dist/actions/update-plan.d.mts +3 -31
- package/dist/actions/update-plan.d.mts.map +1 -1
- package/dist/actions/update-plan.mjs +1 -0
- package/dist/actions/update-plan.mjs.map +1 -1
- package/dist/app.cjs +5 -4
- package/dist/app.cjs.map +1 -1
- package/dist/app.d.cts +4 -6
- package/dist/app.d.cts.map +1 -1
- package/dist/app.d.mts +4 -6
- package/dist/app.d.mts.map +1 -1
- package/dist/app.mjs +0 -1
- package/dist/app.mjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/package.json +2 -2
package/dist/action.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.cjs","names":["payhere","executePayhereTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { payhere } from \"./app\";\nimport { executePayhereTool } 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:
|
|
1
|
+
{"version":3,"file":"action.cjs","names":["payhere","executePayhereTool"],"sources":["../src/action.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { payhere } from \"./app\";\nimport { executePayhereTool } 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, TOutput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: TOutput;\n },\n): AppAction<TInput, TOutput, typeof payhere.credential> {\n return payhere.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 executePayhereTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAOA,SAAgB,OACd,MACA,KAOuD;CACvD,OAAOA,YAAAA,QAAQ,OAAO;EACpB,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,mBAAmB,MAAM,KAAgC,CAAC;EAC1F;CACF,CAAC;AACH"}
|
package/dist/action.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { payhere } from \"./app\";\nimport { executePayhereTool } 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:
|
|
1
|
+
{"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { payhere } from \"./app\";\nimport { executePayhereTool } 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, TOutput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: TOutput;\n },\n): AppAction<TInput, TOutput, typeof payhere.credential> {\n return payhere.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 executePayhereTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAOA,SAAgB,OACd,MACA,KAOuD;CACvD,OAAO,QAAQ,OAAO;EACpB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,mBAAmB,MAAM,KAAgC,CAAC;EAC1F;CACF,CAAC;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-hook.cjs","names":["z","action"],"sources":["../../src/actions/create-hook.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhereCreateHookInput = z.object({\n post_url: z.string().describe(\"Your platform's endpoint URL that will receive POST requests when events trigger.\"),\n resource: z.enum([\"payment_received\", \"subscription_cancelled\", \"subscription_created\"]).describe(\"Event type to monitor. Must be one of: 'payment_received', 'subscription_cancelled', or 'subscription_created'.\"),\n integration: z.string().describe(\"Friendly name of your platform. Helps with metrics and debugging.\"),\n}).describe(\"Request model for creating a webhook subscription to receive real-time events from PayHere.\");\nconst PayhereCreateHook_HookDataSchema = z.object({\n id: z.number().int().describe(\"Unique identifier for the hook.\").nullable(),\n type: z.string().describe(\"Hook type, always 'rest_hooks'.\").nullable(),\n post_url: z.string().describe(\"The registered webhook URL.\").nullable(),\n resource: z.string().describe(\"The event type being monitored.\").nullable(),\n company_id: z.number().int().describe(\"Associated company identifier.\").nullable(),\n created_at: z.string().describe(\"Hook creation timestamp in ISO 8601 format.\").nullable(),\n updated_at: z.string().describe(\"Last update timestamp in ISO 8601 format.\").nullable(),\n integration: z.string().describe(\"The integration name.\").nullable(),\n}).passthrough().describe(\"Schema for the hook data returned in the response.\");\nexport const PayhereCreateHookOutput = z.object({\n data: PayhereCreateHook_HookDataSchema.nullable(),\n}).passthrough().describe(\"Response schema for creating a webhook subscription.\");\n\nexport const payhereCreateHook = action(\"PAYHERE_CREATE_HOOK\", {\n slug: \"payhere-create-hook\",\n name: \"Create Hook\",\n description: \"Tool to subscribe to a REST hook for receiving webhook events. Use when you need to register a webhook endpoint to receive real-time notifications for payment_received, subscription_cancelled, or subscription_created events.\",\n input: PayhereCreateHookInput,\n output: PayhereCreateHookOutput,\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-hook.cjs","names":["z","action"],"sources":["../../src/actions/create-hook.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { payhere } from \"../app\";\n\nexport const PayhereCreateHookInput = z.object({\n post_url: z.string().describe(\"Your platform's endpoint URL that will receive POST requests when events trigger.\"),\n resource: z.enum([\"payment_received\", \"subscription_cancelled\", \"subscription_created\"]).describe(\"Event type to monitor. Must be one of: 'payment_received', 'subscription_cancelled', or 'subscription_created'.\"),\n integration: z.string().describe(\"Friendly name of your platform. Helps with metrics and debugging.\"),\n}).describe(\"Request model for creating a webhook subscription to receive real-time events from PayHere.\");\nconst PayhereCreateHook_HookDataSchema = z.object({\n id: z.number().int().describe(\"Unique identifier for the hook.\").nullable(),\n type: z.string().describe(\"Hook type, always 'rest_hooks'.\").nullable(),\n post_url: z.string().describe(\"The registered webhook URL.\").nullable(),\n resource: z.string().describe(\"The event type being monitored.\").nullable(),\n company_id: z.number().int().describe(\"Associated company identifier.\").nullable(),\n created_at: z.string().describe(\"Hook creation timestamp in ISO 8601 format.\").nullable(),\n updated_at: z.string().describe(\"Last update timestamp in ISO 8601 format.\").nullable(),\n integration: z.string().describe(\"The integration name.\").nullable(),\n}).passthrough().describe(\"Schema for the hook data returned in the response.\");\nexport const PayhereCreateHookOutput = z.object({\n data: PayhereCreateHook_HookDataSchema.nullable(),\n}).passthrough().describe(\"Response schema for creating a webhook subscription.\");\n\nexport const payhereCreateHook: AppAction<\n typeof PayhereCreateHookInput,\n typeof PayhereCreateHookOutput,\n typeof payhere.credential\n> = action(\"PAYHERE_CREATE_HOOK\", {\n slug: \"payhere-create-hook\",\n name: \"Create Hook\",\n description: \"Tool to subscribe to a REST hook for receiving webhook events. Use when you need to register a webhook endpoint to receive real-time notifications for payment_received, subscription_cancelled, or subscription_created events.\",\n input: PayhereCreateHookInput,\n output: PayhereCreateHookOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,yBAAyBA,IAAAA,EAAE,OAAO;CAC7C,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF;CACjH,UAAUA,IAAAA,EAAE,KAAK;EAAC;EAAoB;EAA0B;CAAsB,CAAC,CAAC,CAAC,SAAS,iHAAiH;CACnN,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mEAAmE;AACtG,CAAC,CAAC,CAAC,SAAS,6FAA6F;AACzG,MAAM,mCAAmCA,IAAAA,EAAE,OAAO;CAChD,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS;CAC1E,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS;CACtE,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS;CACtE,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS;CAC1E,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS;CACjF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS;CACxF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CACtF,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB,CAAC,CAAC,SAAS;AACrE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oDAAoD;AAC9E,MAAa,0BAA0BA,IAAAA,EAAE,OAAO,EAC9C,MAAM,iCAAiC,SAAS,EAClD,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,sDAAsD;AAEhF,MAAa,oBAITC,eAAAA,OAAO,uBAAuB;CAChC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { payhere } from "../app.cjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/create-hook.d.ts
|
|
@@ -22,25 +24,7 @@ declare const PayhereCreateHookOutput: z.ZodObject<{
|
|
|
22
24
|
integration: z.ZodNullable<z.ZodString>;
|
|
23
25
|
}, z.core.$loose>>;
|
|
24
26
|
}, z.core.$loose>;
|
|
25
|
-
declare const payhereCreateHook:
|
|
26
|
-
post_url: string;
|
|
27
|
-
resource: "payment_received" | "subscription_cancelled" | "subscription_created";
|
|
28
|
-
integration: string;
|
|
29
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"payhere", z.ZodObject<{
|
|
30
|
-
connectionId: z.ZodString;
|
|
31
|
-
entityId: z.ZodString;
|
|
32
|
-
instanceId: z.ZodString;
|
|
33
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
34
|
-
subdomain: z.ZodString;
|
|
35
|
-
generic_api_key: z.ZodString;
|
|
36
|
-
}, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"payhere", z.ZodObject<{
|
|
37
|
-
connectionId: z.ZodString;
|
|
38
|
-
entityId: z.ZodString;
|
|
39
|
-
instanceId: z.ZodString;
|
|
40
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
41
|
-
subdomain: z.ZodString;
|
|
42
|
-
generic_api_key: z.ZodString;
|
|
43
|
-
}, z.core.$strip>>]>;
|
|
27
|
+
declare const payhereCreateHook: AppAction<typeof PayhereCreateHookInput, typeof PayhereCreateHookOutput, typeof payhere.credential>;
|
|
44
28
|
//#endregion
|
|
45
29
|
export { payhereCreateHook };
|
|
46
30
|
//# sourceMappingURL=create-hook.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-hook.d.cts","names":[],"sources":["../../src/actions/create-hook.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-hook.d.cts","names":[],"sources":["../../src/actions/create-hook.ts"],"mappings":";;;;;cAMa,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;;;;;;;cAetB,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;cAIvB,iBAAA,EAAmB,SAAA,QACvB,sBAAA,SACA,uBAAA,SACA,OAAA,CAAQ,UAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { payhere } from "../app.mjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/create-hook.d.ts
|
|
@@ -22,25 +24,7 @@ declare const PayhereCreateHookOutput: z.ZodObject<{
|
|
|
22
24
|
integration: z.ZodNullable<z.ZodString>;
|
|
23
25
|
}, z.core.$loose>>;
|
|
24
26
|
}, z.core.$loose>;
|
|
25
|
-
declare const payhereCreateHook:
|
|
26
|
-
post_url: string;
|
|
27
|
-
resource: "payment_received" | "subscription_cancelled" | "subscription_created";
|
|
28
|
-
integration: string;
|
|
29
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"payhere", z.ZodObject<{
|
|
30
|
-
connectionId: z.ZodString;
|
|
31
|
-
entityId: z.ZodString;
|
|
32
|
-
instanceId: z.ZodString;
|
|
33
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
34
|
-
subdomain: z.ZodString;
|
|
35
|
-
generic_api_key: z.ZodString;
|
|
36
|
-
}, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"payhere", z.ZodObject<{
|
|
37
|
-
connectionId: z.ZodString;
|
|
38
|
-
entityId: z.ZodString;
|
|
39
|
-
instanceId: z.ZodString;
|
|
40
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
41
|
-
subdomain: z.ZodString;
|
|
42
|
-
generic_api_key: z.ZodString;
|
|
43
|
-
}, z.core.$strip>>]>;
|
|
27
|
+
declare const payhereCreateHook: AppAction<typeof PayhereCreateHookInput, typeof PayhereCreateHookOutput, typeof payhere.credential>;
|
|
44
28
|
//#endregion
|
|
45
29
|
export { payhereCreateHook };
|
|
46
30
|
//# sourceMappingURL=create-hook.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-hook.d.mts","names":[],"sources":["../../src/actions/create-hook.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-hook.d.mts","names":[],"sources":["../../src/actions/create-hook.ts"],"mappings":";;;;;cAMa,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;;;;;;;cAetB,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;cAIvB,iBAAA,EAAmB,SAAA,QACvB,sBAAA,SACA,uBAAA,SACA,OAAA,CAAQ,UAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-hook.mjs","names":[],"sources":["../../src/actions/create-hook.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhereCreateHookInput = z.object({\n post_url: z.string().describe(\"Your platform's endpoint URL that will receive POST requests when events trigger.\"),\n resource: z.enum([\"payment_received\", \"subscription_cancelled\", \"subscription_created\"]).describe(\"Event type to monitor. Must be one of: 'payment_received', 'subscription_cancelled', or 'subscription_created'.\"),\n integration: z.string().describe(\"Friendly name of your platform. Helps with metrics and debugging.\"),\n}).describe(\"Request model for creating a webhook subscription to receive real-time events from PayHere.\");\nconst PayhereCreateHook_HookDataSchema = z.object({\n id: z.number().int().describe(\"Unique identifier for the hook.\").nullable(),\n type: z.string().describe(\"Hook type, always 'rest_hooks'.\").nullable(),\n post_url: z.string().describe(\"The registered webhook URL.\").nullable(),\n resource: z.string().describe(\"The event type being monitored.\").nullable(),\n company_id: z.number().int().describe(\"Associated company identifier.\").nullable(),\n created_at: z.string().describe(\"Hook creation timestamp in ISO 8601 format.\").nullable(),\n updated_at: z.string().describe(\"Last update timestamp in ISO 8601 format.\").nullable(),\n integration: z.string().describe(\"The integration name.\").nullable(),\n}).passthrough().describe(\"Schema for the hook data returned in the response.\");\nexport const PayhereCreateHookOutput = z.object({\n data: PayhereCreateHook_HookDataSchema.nullable(),\n}).passthrough().describe(\"Response schema for creating a webhook subscription.\");\n\nexport const payhereCreateHook = action(\"PAYHERE_CREATE_HOOK\", {\n slug: \"payhere-create-hook\",\n name: \"Create Hook\",\n description: \"Tool to subscribe to a REST hook for receiving webhook events. Use when you need to register a webhook endpoint to receive real-time notifications for payment_received, subscription_cancelled, or subscription_created events.\",\n input: PayhereCreateHookInput,\n output: PayhereCreateHookOutput,\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-hook.mjs","names":[],"sources":["../../src/actions/create-hook.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { payhere } from \"../app\";\n\nexport const PayhereCreateHookInput = z.object({\n post_url: z.string().describe(\"Your platform's endpoint URL that will receive POST requests when events trigger.\"),\n resource: z.enum([\"payment_received\", \"subscription_cancelled\", \"subscription_created\"]).describe(\"Event type to monitor. Must be one of: 'payment_received', 'subscription_cancelled', or 'subscription_created'.\"),\n integration: z.string().describe(\"Friendly name of your platform. Helps with metrics and debugging.\"),\n}).describe(\"Request model for creating a webhook subscription to receive real-time events from PayHere.\");\nconst PayhereCreateHook_HookDataSchema = z.object({\n id: z.number().int().describe(\"Unique identifier for the hook.\").nullable(),\n type: z.string().describe(\"Hook type, always 'rest_hooks'.\").nullable(),\n post_url: z.string().describe(\"The registered webhook URL.\").nullable(),\n resource: z.string().describe(\"The event type being monitored.\").nullable(),\n company_id: z.number().int().describe(\"Associated company identifier.\").nullable(),\n created_at: z.string().describe(\"Hook creation timestamp in ISO 8601 format.\").nullable(),\n updated_at: z.string().describe(\"Last update timestamp in ISO 8601 format.\").nullable(),\n integration: z.string().describe(\"The integration name.\").nullable(),\n}).passthrough().describe(\"Schema for the hook data returned in the response.\");\nexport const PayhereCreateHookOutput = z.object({\n data: PayhereCreateHook_HookDataSchema.nullable(),\n}).passthrough().describe(\"Response schema for creating a webhook subscription.\");\n\nexport const payhereCreateHook: AppAction<\n typeof PayhereCreateHookInput,\n typeof PayhereCreateHookOutput,\n typeof payhere.credential\n> = action(\"PAYHERE_CREATE_HOOK\", {\n slug: \"payhere-create-hook\",\n name: \"Create Hook\",\n description: \"Tool to subscribe to a REST hook for receiving webhook events. Use when you need to register a webhook endpoint to receive real-time notifications for payment_received, subscription_cancelled, or subscription_created events.\",\n input: PayhereCreateHookInput,\n output: PayhereCreateHookOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,yBAAyB,EAAE,OAAO;CAC7C,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF;CACjH,UAAU,EAAE,KAAK;EAAC;EAAoB;EAA0B;CAAsB,CAAC,CAAC,CAAC,SAAS,iHAAiH;CACnN,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,mEAAmE;AACtG,CAAC,CAAC,CAAC,SAAS,6FAA6F;AACzG,MAAM,mCAAmC,EAAE,OAAO;CAChD,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS;CAC1E,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS;CACtE,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS;CACtE,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS;CAC1E,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS;CACjF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS;CACxF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CACtF,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB,CAAC,CAAC,SAAS;AACrE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oDAAoD;AAK9E,MAAa,oBAIT,OAAO,uBAAuB;CAChC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAbqC,EAAE,OAAO,EAC9C,MAAM,iCAAiC,SAAS,EAClD,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,sDAWhB;AACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-plan.cjs","names":["z","action"],"sources":["../../src/actions/create-plan.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhereCreatePlanInput = z.object({\n name: z.string().describe(\"Display name for the plan shown to customers.\"),\n price: z.number().describe(\"Plan pricing. Omit for donation plans where user_selects_amount is true.\").optional(),\n hidden: z.boolean().describe(\"Hide plan from landing page if true.\").optional(),\n currency: z.string().describe(\"Three-letter currency code (e.g., 'usd', 'gbp', 'eur').\"),\n show_qty: z.boolean().describe(\"Enable quantity selection field. Only applies to one-off plans.\").optional(),\n setup_fee: z.number().describe(\"Initial one-time charge amount for recurring plans.\").optional(),\n billing_day: z.number().int().describe(\"Day of month for monthly charges (1-31) for recurring plans.\").optional(),\n description: z.string().describe(\"Product or service description shown to customers.\").optional(),\n success_url: z.string().describe(\"URL to redirect customers after successful payment.\").optional(),\n webhook_url: z.string().describe(\"Endpoint URL for receiving payment status notifications.\").optional(),\n cancel_after: z.number().int().describe(\"Auto-cancel subscription after N payments for recurring plans.\").optional(),\n payment_type: z.enum([\"recurring\", \"one_off\"]).describe(\"Type of plan: \\\"recurring\\\" for subscriptions or \\\"one_off\\\" for one-time payments.\"),\n receipt_text: z.string().describe(\"Custom message displayed on payment receipts.\").optional(),\n pay_button_text: z.string().describe(\"Custom label for payment button. Defaults to \\\"Pay\\\".\").optional(),\n billing_interval: z.enum([\"week\", \"month\", \"year\"]).describe(\"Billing frequency for recurring plans: \\\"week\\\", \\\"month\\\", or \\\"year\\\". Required for recurring plans.\").optional(),\n min_billing_cycles: z.number().int().describe(\"Minimum billing cycles before cancellation is allowed for recurring plans.\").optional(),\n user_selects_amount: z.boolean().describe(\"Enable donation functionality where users choose the payment amount. When true, omit the price field.\").optional(),\n}).describe(\"Request model for creating a new plan in PayHere.\\n\\nRequired fields vary by plan type:\\n- For one_off plans: name, price, currency, payment_type\\n- For recurring plans: name, price, currency, payment_type, billing_interval\\n- For donation plans: name, currency, payment_type, user_selects_amount=true (price should be omitted)\\n\\nThe payment_type determines whether this is a recurring subscription or one-time payment.\");\nconst PayhereCreatePlan_CustomFieldSchema = z.object({\n name: z.string().describe(\"Name of the custom field.\").nullable().optional(),\n required: z.boolean().describe(\"Whether the field is required.\").nullable().optional(),\n field_type: z.string().describe(\"Type of the custom field.\").nullable().optional(),\n}).passthrough().describe(\"Custom form field definition.\");\nexport const PayhereCreatePlanOutput = z.object({\n id: z.number().int().describe(\"Unique plan identifier.\").nullable().optional(),\n qty: z.number().int().describe(\"Available quantity.\").nullable().optional(),\n name: z.string().describe(\"Plan name.\").nullable().optional(),\n slug: z.string().describe(\"URL-friendly plan identifier.\").nullable().optional(),\n type: z.string().describe(\"Plan type.\").nullable().optional(),\n price: z.number().describe(\"Plan price.\").nullable().optional(),\n hidden: z.boolean().describe(\"Whether plan is hidden from landing page.\").nullable().optional(),\n currency: z.string().describe(\"Three-letter currency code (e.g., 'usd', 'gbp').\").nullable().optional(),\n show_qty: z.boolean().describe(\"Whether to show quantity selector.\").nullable().optional(),\n setup_fee: z.number().describe(\"Setup fee amount.\").nullable().optional(),\n created_at: z.string().describe(\"Creation timestamp.\").nullable().optional(),\n updated_at: z.string().describe(\"Last update timestamp.\").nullable().optional(),\n billing_day: z.number().int().describe(\"Day of month for billing.\").nullable().optional(),\n description: z.string().describe(\"Plan description.\").nullable().optional(),\n limited_qty: z.boolean().describe(\"Whether quantity is limited.\").nullable().optional(),\n success_url: z.string().describe(\"Success redirect URL.\").nullable().optional(),\n webhook_url: z.string().describe(\"Webhook URL.\").nullable().optional(),\n cancel_after: z.number().int().describe(\"Auto-cancel after N payments.\").nullable().optional(),\n payment_type: z.string().describe(\"Type of plan: \\\"recurring\\\" or \\\"one_off\\\".\").nullable().optional(),\n receipt_text: z.string().describe(\"Receipt text.\").nullable().optional(),\n custom_fields: z.array(PayhereCreatePlan_CustomFieldSchema).describe(\"Custom form fields.\").nullable().optional(),\n has_setup_fee: z.boolean().describe(\"Whether plan has setup fee.\").nullable().optional(),\n price_in_cents: z.number().int().describe(\"Price in smallest currency unit (e.g., cents).\").nullable().optional(),\n pay_button_text: z.string().describe(\"Payment button text.\").nullable().optional(),\n billing_interval: z.string().describe(\"Billing frequency for recurring plans.\").nullable().optional(),\n trial_period_days: z.number().int().describe(\"Trial period length in days.\").nullable().optional(),\n min_billing_cycles: z.number().int().describe(\"Minimum billing cycles before cancellation allowed.\").nullable().optional(),\n user_selects_amount: z.boolean().describe(\"Whether user selects the payment amount.\").nullable().optional(),\n billing_interval_count: z.number().int().describe(\"Number of intervals between billings.\").nullable().optional(),\n}).passthrough().describe(\"Response schema for creating a new plan.\");\n\nexport const payhereCreatePlan = action(\"PAYHERE_CREATE_PLAN\", {\n slug: \"payhere-create-plan\",\n name: \"Create Plan\",\n description: \"Tool to create a new payment plan in PayHere. Use when you need to set up either a recurring subscription or one-off payment plan for accepting payments.\",\n input: PayhereCreatePlanInput,\n output: PayhereCreatePlanOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yBAAyBA,IAAAA,EAAE,OAAO;CAC7C,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C;CACzE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;CAChH,QAAQA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;CAC9E,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD;CACvF,UAAUA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CAC3G,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS;CAC/F,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS;CAChH,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;CAChG,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS;CACjG,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,S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AAS;CACjG,oBAAoBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzH,qBAAqBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1G,wBAAwBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACjH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,0CAA0C;AAEpE,MAAa,oBAAoBC,eAAAA,OAAO,uBAAuB;CAC7D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
1
|
+
{"version":3,"file":"create-plan.cjs","names":["z","action"],"sources":["../../src/actions/create-plan.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { payhere } from \"../app\";\n\nexport const PayhereCreatePlanInput = z.object({\n name: z.string().describe(\"Display name for the plan shown to customers.\"),\n price: z.number().describe(\"Plan pricing. Omit for donation plans where user_selects_amount is true.\").optional(),\n hidden: z.boolean().describe(\"Hide plan from landing page if true.\").optional(),\n currency: z.string().describe(\"Three-letter currency code (e.g., 'usd', 'gbp', 'eur').\"),\n show_qty: z.boolean().describe(\"Enable quantity selection field. Only applies to one-off plans.\").optional(),\n setup_fee: z.number().describe(\"Initial one-time charge amount for recurring plans.\").optional(),\n billing_day: z.number().int().describe(\"Day of month for monthly charges (1-31) for recurring plans.\").optional(),\n description: z.string().describe(\"Product or service description shown to customers.\").optional(),\n success_url: z.string().describe(\"URL to redirect customers after successful payment.\").optional(),\n webhook_url: z.string().describe(\"Endpoint URL for receiving payment status notifications.\").optional(),\n cancel_after: z.number().int().describe(\"Auto-cancel subscription after N payments for recurring plans.\").optional(),\n payment_type: z.enum([\"recurring\", \"one_off\"]).describe(\"Type of plan: \\\"recurring\\\" for subscriptions or \\\"one_off\\\" for one-time payments.\"),\n receipt_text: z.string().describe(\"Custom message displayed on payment receipts.\").optional(),\n pay_button_text: z.string().describe(\"Custom label for payment button. Defaults to \\\"Pay\\\".\").optional(),\n billing_interval: z.enum([\"week\", \"month\", \"year\"]).describe(\"Billing frequency for recurring plans: \\\"week\\\", \\\"month\\\", or \\\"year\\\". Required for recurring plans.\").optional(),\n min_billing_cycles: z.number().int().describe(\"Minimum billing cycles before cancellation is allowed for recurring plans.\").optional(),\n user_selects_amount: z.boolean().describe(\"Enable donation functionality where users choose the payment amount. When true, omit the price field.\").optional(),\n}).describe(\"Request model for creating a new plan in PayHere.\\n\\nRequired fields vary by plan type:\\n- For one_off plans: name, price, currency, payment_type\\n- For recurring plans: name, price, currency, payment_type, billing_interval\\n- For donation plans: name, currency, payment_type, user_selects_amount=true (price should be omitted)\\n\\nThe payment_type determines whether this is a recurring subscription or one-time payment.\");\nconst PayhereCreatePlan_CustomFieldSchema = z.object({\n name: z.string().describe(\"Name of the custom field.\").nullable().optional(),\n required: z.boolean().describe(\"Whether the field is required.\").nullable().optional(),\n field_type: z.string().describe(\"Type of the custom field.\").nullable().optional(),\n}).passthrough().describe(\"Custom form field definition.\");\nexport const PayhereCreatePlanOutput = z.object({\n id: z.number().int().describe(\"Unique plan identifier.\").nullable().optional(),\n qty: z.number().int().describe(\"Available quantity.\").nullable().optional(),\n name: z.string().describe(\"Plan name.\").nullable().optional(),\n slug: z.string().describe(\"URL-friendly plan identifier.\").nullable().optional(),\n type: z.string().describe(\"Plan type.\").nullable().optional(),\n price: z.number().describe(\"Plan price.\").nullable().optional(),\n hidden: z.boolean().describe(\"Whether plan is hidden from landing page.\").nullable().optional(),\n currency: z.string().describe(\"Three-letter currency code (e.g., 'usd', 'gbp').\").nullable().optional(),\n show_qty: z.boolean().describe(\"Whether to show quantity selector.\").nullable().optional(),\n setup_fee: z.number().describe(\"Setup fee amount.\").nullable().optional(),\n created_at: z.string().describe(\"Creation timestamp.\").nullable().optional(),\n updated_at: z.string().describe(\"Last update timestamp.\").nullable().optional(),\n billing_day: z.number().int().describe(\"Day of month for billing.\").nullable().optional(),\n description: z.string().describe(\"Plan description.\").nullable().optional(),\n limited_qty: z.boolean().describe(\"Whether quantity is limited.\").nullable().optional(),\n success_url: z.string().describe(\"Success redirect URL.\").nullable().optional(),\n webhook_url: z.string().describe(\"Webhook URL.\").nullable().optional(),\n cancel_after: z.number().int().describe(\"Auto-cancel after N payments.\").nullable().optional(),\n payment_type: z.string().describe(\"Type of plan: \\\"recurring\\\" or \\\"one_off\\\".\").nullable().optional(),\n receipt_text: z.string().describe(\"Receipt text.\").nullable().optional(),\n custom_fields: z.array(PayhereCreatePlan_CustomFieldSchema).describe(\"Custom form fields.\").nullable().optional(),\n has_setup_fee: z.boolean().describe(\"Whether plan has setup fee.\").nullable().optional(),\n price_in_cents: z.number().int().describe(\"Price in smallest currency unit (e.g., cents).\").nullable().optional(),\n pay_button_text: z.string().describe(\"Payment button text.\").nullable().optional(),\n billing_interval: z.string().describe(\"Billing frequency for recurring plans.\").nullable().optional(),\n trial_period_days: z.number().int().describe(\"Trial period length in days.\").nullable().optional(),\n min_billing_cycles: z.number().int().describe(\"Minimum billing cycles before cancellation allowed.\").nullable().optional(),\n user_selects_amount: z.boolean().describe(\"Whether user selects the payment amount.\").nullable().optional(),\n billing_interval_count: z.number().int().describe(\"Number of intervals between billings.\").nullable().optional(),\n}).passthrough().describe(\"Response schema for creating a new plan.\");\n\nexport const payhereCreatePlan: AppAction<\n typeof PayhereCreatePlanInput,\n typeof PayhereCreatePlanOutput,\n typeof payhere.credential\n> = action(\"PAYHERE_CREATE_PLAN\", {\n slug: \"payhere-create-plan\",\n name: \"Create Plan\",\n description: \"Tool to create a new payment plan in PayHere. Use when you need to set up either a recurring subscription or one-off payment plan for accepting payments.\",\n input: PayhereCreatePlanInput,\n output: PayhereCreatePlanO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AAAA,OAAO,uBAAuB;CAChC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { payhere } from "../app.cjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/create-plan.d.ts
|
|
@@ -62,39 +64,7 @@ declare const PayhereCreatePlanOutput: z.ZodObject<{
|
|
|
62
64
|
user_selects_amount: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
63
65
|
billing_interval_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
64
66
|
}, z.core.$loose>;
|
|
65
|
-
declare const payhereCreatePlan:
|
|
66
|
-
name: string;
|
|
67
|
-
currency: string;
|
|
68
|
-
payment_type: "recurring" | "one_off";
|
|
69
|
-
price?: number | undefined;
|
|
70
|
-
hidden?: boolean | undefined;
|
|
71
|
-
show_qty?: boolean | undefined;
|
|
72
|
-
setup_fee?: number | undefined;
|
|
73
|
-
billing_day?: number | undefined;
|
|
74
|
-
description?: string | undefined;
|
|
75
|
-
success_url?: string | undefined;
|
|
76
|
-
webhook_url?: string | undefined;
|
|
77
|
-
cancel_after?: number | undefined;
|
|
78
|
-
receipt_text?: string | undefined;
|
|
79
|
-
pay_button_text?: string | undefined;
|
|
80
|
-
billing_interval?: "week" | "month" | "year" | undefined;
|
|
81
|
-
min_billing_cycles?: number | undefined;
|
|
82
|
-
user_selects_amount?: boolean | undefined;
|
|
83
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"payhere", z.ZodObject<{
|
|
84
|
-
connectionId: z.ZodString;
|
|
85
|
-
entityId: z.ZodString;
|
|
86
|
-
instanceId: z.ZodString;
|
|
87
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
88
|
-
subdomain: z.ZodString;
|
|
89
|
-
generic_api_key: z.ZodString;
|
|
90
|
-
}, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"payhere", z.ZodObject<{
|
|
91
|
-
connectionId: z.ZodString;
|
|
92
|
-
entityId: z.ZodString;
|
|
93
|
-
instanceId: z.ZodString;
|
|
94
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
95
|
-
subdomain: z.ZodString;
|
|
96
|
-
generic_api_key: z.ZodString;
|
|
97
|
-
}, z.core.$strip>>]>;
|
|
67
|
+
declare const payhereCreatePlan: AppAction<typeof PayhereCreatePlanInput, typeof PayhereCreatePlanOutput, typeof payhere.credential>;
|
|
98
68
|
//#endregion
|
|
99
69
|
export { payhereCreatePlan };
|
|
100
70
|
//# sourceMappingURL=create-plan.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-plan.d.cts","names":[],"sources":["../../src/actions/create-plan.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-plan.d.cts","names":[],"sources":["../../src/actions/create-plan.ts"],"mappings":";;;;;cAMa,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;cAwBtB,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgCvB,iBAAA,EAAmB,SAAA,QACvB,sBAAA,SACA,uBAAA,SACA,OAAA,CAAQ,UAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { payhere } from "../app.mjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/create-plan.d.ts
|
|
@@ -62,39 +64,7 @@ declare const PayhereCreatePlanOutput: z.ZodObject<{
|
|
|
62
64
|
user_selects_amount: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
63
65
|
billing_interval_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
64
66
|
}, z.core.$loose>;
|
|
65
|
-
declare const payhereCreatePlan:
|
|
66
|
-
name: string;
|
|
67
|
-
currency: string;
|
|
68
|
-
payment_type: "recurring" | "one_off";
|
|
69
|
-
price?: number | undefined;
|
|
70
|
-
hidden?: boolean | undefined;
|
|
71
|
-
show_qty?: boolean | undefined;
|
|
72
|
-
setup_fee?: number | undefined;
|
|
73
|
-
billing_day?: number | undefined;
|
|
74
|
-
description?: string | undefined;
|
|
75
|
-
success_url?: string | undefined;
|
|
76
|
-
webhook_url?: string | undefined;
|
|
77
|
-
cancel_after?: number | undefined;
|
|
78
|
-
receipt_text?: string | undefined;
|
|
79
|
-
pay_button_text?: string | undefined;
|
|
80
|
-
billing_interval?: "week" | "month" | "year" | undefined;
|
|
81
|
-
min_billing_cycles?: number | undefined;
|
|
82
|
-
user_selects_amount?: boolean | undefined;
|
|
83
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"payhere", z.ZodObject<{
|
|
84
|
-
connectionId: z.ZodString;
|
|
85
|
-
entityId: z.ZodString;
|
|
86
|
-
instanceId: z.ZodString;
|
|
87
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
88
|
-
subdomain: z.ZodString;
|
|
89
|
-
generic_api_key: z.ZodString;
|
|
90
|
-
}, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"payhere", z.ZodObject<{
|
|
91
|
-
connectionId: z.ZodString;
|
|
92
|
-
entityId: z.ZodString;
|
|
93
|
-
instanceId: z.ZodString;
|
|
94
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
95
|
-
subdomain: z.ZodString;
|
|
96
|
-
generic_api_key: z.ZodString;
|
|
97
|
-
}, z.core.$strip>>]>;
|
|
67
|
+
declare const payhereCreatePlan: AppAction<typeof PayhereCreatePlanInput, typeof PayhereCreatePlanOutput, typeof payhere.credential>;
|
|
98
68
|
//#endregion
|
|
99
69
|
export { payhereCreatePlan };
|
|
100
70
|
//# sourceMappingURL=create-plan.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-plan.d.mts","names":[],"sources":["../../src/actions/create-plan.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-plan.d.mts","names":[],"sources":["../../src/actions/create-plan.ts"],"mappings":";;;;;cAMa,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;cAwBtB,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgCvB,iBAAA,EAAmB,SAAA,QACvB,sBAAA,SACA,uBAAA,SACA,OAAA,CAAQ,UAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-plan.mjs","names":[],"sources":["../../src/actions/create-plan.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhereCreatePlanInput = z.object({\n name: z.string().describe(\"Display name for the plan shown to customers.\"),\n price: z.number().describe(\"Plan pricing. Omit for donation plans where user_selects_amount is true.\").optional(),\n hidden: z.boolean().describe(\"Hide plan from landing page if true.\").optional(),\n currency: z.string().describe(\"Three-letter currency code (e.g., 'usd', 'gbp', 'eur').\"),\n show_qty: z.boolean().describe(\"Enable quantity selection field. Only applies to one-off plans.\").optional(),\n setup_fee: z.number().describe(\"Initial one-time charge amount for recurring plans.\").optional(),\n billing_day: z.number().int().describe(\"Day of month for monthly charges (1-31) for recurring plans.\").optional(),\n description: z.string().describe(\"Product or service description shown to customers.\").optional(),\n success_url: z.string().describe(\"URL to redirect customers after successful payment.\").optional(),\n webhook_url: z.string().describe(\"Endpoint URL for receiving payment status notifications.\").optional(),\n cancel_after: z.number().int().describe(\"Auto-cancel subscription after N payments for recurring plans.\").optional(),\n payment_type: z.enum([\"recurring\", \"one_off\"]).describe(\"Type of plan: \\\"recurring\\\" for subscriptions or \\\"one_off\\\" for one-time payments.\"),\n receipt_text: z.string().describe(\"Custom message displayed on payment receipts.\").optional(),\n pay_button_text: z.string().describe(\"Custom label for payment button. Defaults to \\\"Pay\\\".\").optional(),\n billing_interval: z.enum([\"week\", \"month\", \"year\"]).describe(\"Billing frequency for recurring plans: \\\"week\\\", \\\"month\\\", or \\\"year\\\". Required for recurring plans.\").optional(),\n min_billing_cycles: z.number().int().describe(\"Minimum billing cycles before cancellation is allowed for recurring plans.\").optional(),\n user_selects_amount: z.boolean().describe(\"Enable donation functionality where users choose the payment amount. When true, omit the price field.\").optional(),\n}).describe(\"Request model for creating a new plan in PayHere.\\n\\nRequired fields vary by plan type:\\n- For one_off plans: name, price, currency, payment_type\\n- For recurring plans: name, price, currency, payment_type, billing_interval\\n- For donation plans: name, currency, payment_type, user_selects_amount=true (price should be omitted)\\n\\nThe payment_type determines whether this is a recurring subscription or one-time payment.\");\nconst PayhereCreatePlan_CustomFieldSchema = z.object({\n name: z.string().describe(\"Name of the custom field.\").nullable().optional(),\n required: z.boolean().describe(\"Whether the field is required.\").nullable().optional(),\n field_type: z.string().describe(\"Type of the custom field.\").nullable().optional(),\n}).passthrough().describe(\"Custom form field definition.\");\nexport const PayhereCreatePlanOutput = z.object({\n id: z.number().int().describe(\"Unique plan identifier.\").nullable().optional(),\n qty: z.number().int().describe(\"Available quantity.\").nullable().optional(),\n name: z.string().describe(\"Plan name.\").nullable().optional(),\n slug: z.string().describe(\"URL-friendly plan identifier.\").nullable().optional(),\n type: z.string().describe(\"Plan type.\").nullable().optional(),\n price: z.number().describe(\"Plan price.\").nullable().optional(),\n hidden: z.boolean().describe(\"Whether plan is hidden from landing page.\").nullable().optional(),\n currency: z.string().describe(\"Three-letter currency code (e.g., 'usd', 'gbp').\").nullable().optional(),\n show_qty: z.boolean().describe(\"Whether to show quantity selector.\").nullable().optional(),\n setup_fee: z.number().describe(\"Setup fee amount.\").nullable().optional(),\n created_at: z.string().describe(\"Creation timestamp.\").nullable().optional(),\n updated_at: z.string().describe(\"Last update timestamp.\").nullable().optional(),\n billing_day: z.number().int().describe(\"Day of month for billing.\").nullable().optional(),\n description: z.string().describe(\"Plan description.\").nullable().optional(),\n limited_qty: z.boolean().describe(\"Whether quantity is limited.\").nullable().optional(),\n success_url: z.string().describe(\"Success redirect URL.\").nullable().optional(),\n webhook_url: z.string().describe(\"Webhook URL.\").nullable().optional(),\n cancel_after: z.number().int().describe(\"Auto-cancel after N payments.\").nullable().optional(),\n payment_type: z.string().describe(\"Type of plan: \\\"recurring\\\" or \\\"one_off\\\".\").nullable().optional(),\n receipt_text: z.string().describe(\"Receipt text.\").nullable().optional(),\n custom_fields: z.array(PayhereCreatePlan_CustomFieldSchema).describe(\"Custom form fields.\").nullable().optional(),\n has_setup_fee: z.boolean().describe(\"Whether plan has setup fee.\").nullable().optional(),\n price_in_cents: z.number().int().describe(\"Price in smallest currency unit (e.g., cents).\").nullable().optional(),\n pay_button_text: z.string().describe(\"Payment button text.\").nullable().optional(),\n billing_interval: z.string().describe(\"Billing frequency for recurring plans.\").nullable().optional(),\n trial_period_days: z.number().int().describe(\"Trial period length in days.\").nullable().optional(),\n min_billing_cycles: z.number().int().describe(\"Minimum billing cycles before cancellation allowed.\").nullable().optional(),\n user_selects_amount: z.boolean().describe(\"Whether user selects the payment amount.\").nullable().optional(),\n billing_interval_count: z.number().int().describe(\"Number of intervals between billings.\").nullable().optional(),\n}).passthrough().describe(\"Response schema for creating a new plan.\");\n\nexport const payhereCreatePlan = action(\"PAYHERE_CREATE_PLAN\", {\n slug: \"payhere-create-plan\",\n name: \"Create Plan\",\n description: \"Tool to create a new payment plan in PayHere. Use when you need to set up either a recurring subscription or one-off payment plan for accepting payments.\",\n input: PayhereCreatePlanInput,\n output: PayhereCreatePlanOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yBAAyB,EAAE,OAAO;CAC7C,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C;CACzE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;CAChH,QAAQ,EAAE,QAAQ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;EAChH,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,sBAAsB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACjF,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACpG,mBAAmB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACjG,oBAAoB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACzH,qBAAqB,EAAE,QAAQ,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC1G,wBAAwB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,0CAOhB;AACV,CAAC"}
|
|
1
|
+
{"version":3,"file":"create-plan.mjs","names":[],"sources":["../../src/actions/create-plan.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { payhere } from \"../app\";\n\nexport const PayhereCreatePlanInput = z.object({\n name: z.string().describe(\"Display name for the plan shown to customers.\"),\n price: z.number().describe(\"Plan pricing. Omit for donation plans where user_selects_amount is true.\").optional(),\n hidden: z.boolean().describe(\"Hide plan from landing page if true.\").optional(),\n currency: z.string().describe(\"Three-letter currency code (e.g., 'usd', 'gbp', 'eur').\"),\n show_qty: z.boolean().describe(\"Enable quantity selection field. Only applies to one-off plans.\").optional(),\n setup_fee: z.number().describe(\"Initial one-time charge amount for recurring plans.\").optional(),\n billing_day: z.number().int().describe(\"Day of month for monthly charges (1-31) for recurring plans.\").optional(),\n description: z.string().describe(\"Product or service description shown to customers.\").optional(),\n success_url: z.string().describe(\"URL to redirect customers after successful payment.\").optional(),\n webhook_url: z.string().describe(\"Endpoint URL for receiving payment status notifications.\").optional(),\n cancel_after: z.number().int().describe(\"Auto-cancel subscription after N payments for recurring plans.\").optional(),\n payment_type: z.enum([\"recurring\", \"one_off\"]).describe(\"Type of plan: \\\"recurring\\\" for subscriptions or \\\"one_off\\\" for one-time payments.\"),\n receipt_text: z.string().describe(\"Custom message displayed on payment receipts.\").optional(),\n pay_button_text: z.string().describe(\"Custom label for payment button. Defaults to \\\"Pay\\\".\").optional(),\n billing_interval: z.enum([\"week\", \"month\", \"year\"]).describe(\"Billing frequency for recurring plans: \\\"week\\\", \\\"month\\\", or \\\"year\\\". Required for recurring plans.\").optional(),\n min_billing_cycles: z.number().int().describe(\"Minimum billing cycles before cancellation is allowed for recurring plans.\").optional(),\n user_selects_amount: z.boolean().describe(\"Enable donation functionality where users choose the payment amount. When true, omit the price field.\").optional(),\n}).describe(\"Request model for creating a new plan in PayHere.\\n\\nRequired fields vary by plan type:\\n- For one_off plans: name, price, currency, payment_type\\n- For recurring plans: name, price, currency, payment_type, billing_interval\\n- For donation plans: name, currency, payment_type, user_selects_amount=true (price should be omitted)\\n\\nThe payment_type determines whether this is a recurring subscription or one-time payment.\");\nconst PayhereCreatePlan_CustomFieldSchema = z.object({\n name: z.string().describe(\"Name of the custom field.\").nullable().optional(),\n required: z.boolean().describe(\"Whether the field is required.\").nullable().optional(),\n field_type: z.string().describe(\"Type of the custom field.\").nullable().optional(),\n}).passthrough().describe(\"Custom form field definition.\");\nexport const PayhereCreatePlanOutput = z.object({\n id: z.number().int().describe(\"Unique plan identifier.\").nullable().optional(),\n qty: z.number().int().describe(\"Available quantity.\").nullable().optional(),\n name: z.string().describe(\"Plan name.\").nullable().optional(),\n slug: z.string().describe(\"URL-friendly plan identifier.\").nullable().optional(),\n type: z.string().describe(\"Plan type.\").nullable().optional(),\n price: z.number().describe(\"Plan price.\").nullable().optional(),\n hidden: z.boolean().describe(\"Whether plan is hidden from landing page.\").nullable().optional(),\n currency: z.string().describe(\"Three-letter currency code (e.g., 'usd', 'gbp').\").nullable().optional(),\n show_qty: z.boolean().describe(\"Whether to show quantity selector.\").nullable().optional(),\n setup_fee: z.number().describe(\"Setup fee amount.\").nullable().optional(),\n created_at: z.string().describe(\"Creation timestamp.\").nullable().optional(),\n updated_at: z.string().describe(\"Last update timestamp.\").nullable().optional(),\n billing_day: z.number().int().describe(\"Day of month for billing.\").nullable().optional(),\n description: z.string().describe(\"Plan description.\").nullable().optional(),\n limited_qty: z.boolean().describe(\"Whether quantity is limited.\").nullable().optional(),\n success_url: z.string().describe(\"Success redirect URL.\").nullable().optional(),\n webhook_url: z.string().describe(\"Webhook URL.\").nullable().optional(),\n cancel_after: z.number().int().describe(\"Auto-cancel after N payments.\").nullable().optional(),\n payment_type: z.string().describe(\"Type of plan: \\\"recurring\\\" or \\\"one_off\\\".\").nullable().optional(),\n receipt_text: z.string().describe(\"Receipt text.\").nullable().optional(),\n custom_fields: z.array(PayhereCreatePlan_CustomFieldSchema).describe(\"Custom form fields.\").nullable().optional(),\n has_setup_fee: z.boolean().describe(\"Whether plan has setup fee.\").nullable().optional(),\n price_in_cents: z.number().int().describe(\"Price in smallest currency unit (e.g., cents).\").nullable().optional(),\n pay_button_text: z.string().describe(\"Payment button text.\").nullable().optional(),\n billing_interval: z.string().describe(\"Billing frequency for recurring plans.\").nullable().optional(),\n trial_period_days: z.number().int().describe(\"Trial period length in days.\").nullable().optional(),\n min_billing_cycles: z.number().int().describe(\"Minimum billing cycles before cancellation allowed.\").nullable().optional(),\n user_selects_amount: z.boolean().describe(\"Whether user selects the payment amount.\").nullable().optional(),\n billing_interval_count: z.number().int().describe(\"Number of intervals between billings.\").nullable().optional(),\n}).passthrough().describe(\"Response schema for creating a new plan.\");\n\nexport const payhereCreatePlan: AppAction<\n typeof PayhereCreatePlanInput,\n typeof PayhereCreatePlanOutput,\n typeof payhere.credential\n> = action(\"PAYHERE_CREATE_PLAN\", {\n slug: \"payhere-create-plan\",\n name: \"Create Plan\",\n description: \"Tool to create a new payment plan in PayHere. Use when you need to set up either a recurring subscription or one-off payment plan for accepting payments.\",\n input: PayhereCreatePlanInput,\n output: PayhereCreatePlanOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,yBAAyB,EAAE,OAAO;CAC7C,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C;CACzE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;CAChH,QAAQ,EAAE,QAAQ,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;CAC9E,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD;CACvF,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CAC3G,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS;CAC/F,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS;CAChH,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;CAChG,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS;CACjG,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;CACtG,cAAc,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;CACnH,cAAc,EAAE,KAAK,CAAC,aAAa,SAAS,CAAC,CAAC,CAAC,SAAS,qFAAqF;CAC7I,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS;CAC5F,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;CACvG,kBAAkB,EAAE,KAAK;EAAC;EAAQ;EAAS;CA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CAAC,CAAC,SAAS,eAAe,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACvE,eAAe,EAAE,MAAM,mCAAmC,CAAC,CAAC,SAAS,qBAAqB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAChH,eAAe,EAAE,QAAQ,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACvF,gBAAgB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAChH,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,sBAAsB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACjF,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACpG,mBAAmB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACjG,oBAAoB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACzH,qBAAqB,EAAE,QAAQ,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC1G,wBAAwB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,0CAWhB;AACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-hook.cjs","names":["z","action"],"sources":["../../src/actions/delete-hook.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhereDeleteHookInput = z.object({\n id: z.number().int().describe(\"The unique identifier of the REST hook to delete\"),\n}).describe(\"Request parameters for deleting a REST hook listener.\");\nexport const PayhereDeleteHookOutput = z.object({\n id: z.number().int().describe(\"The identifier of the REST hook that was deleted\").nullable(),\n message: z.string().describe(\"Confirmation message indicating the hook was successfully deleted\").nullable(),\n}).passthrough().describe(\"Response schema for deleting a REST hook.\");\n\nexport const payhereDeleteHook = action(\"PAYHERE_DELETE_HOOK\", {\n slug: \"payhere-delete-hook\",\n name: \"Delete Hook\",\n description: \"Tool to remove a REST hook listener subscription. Use when you need to stop receiving webhook events for a specific hook.\",\n input: PayhereDeleteHookInput,\n output: PayhereDeleteHookOutput,\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete-hook.cjs","names":["z","action"],"sources":["../../src/actions/delete-hook.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { payhere } from \"../app\";\n\nexport const PayhereDeleteHookInput = z.object({\n id: z.number().int().describe(\"The unique identifier of the REST hook to delete\"),\n}).describe(\"Request parameters for deleting a REST hook listener.\");\nexport const PayhereDeleteHookOutput = z.object({\n id: z.number().int().describe(\"The identifier of the REST hook that was deleted\").nullable(),\n message: z.string().describe(\"Confirmation message indicating the hook was successfully deleted\").nullable(),\n}).passthrough().describe(\"Response schema for deleting a REST hook.\");\n\nexport const payhereDeleteHook: AppAction<\n typeof PayhereDeleteHookInput,\n typeof PayhereDeleteHookOutput,\n typeof payhere.credential\n> = action(\"PAYHERE_DELETE_HOOK\", {\n slug: \"payhere-delete-hook\",\n name: \"Delete Hook\",\n description: \"Tool to remove a REST hook listener subscription. Use when you need to stop receiving webhook events for a specific hook.\",\n input: PayhereDeleteHookInput,\n output: PayhereDeleteHookOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,yBAAyBA,IAAAA,EAAE,OAAO,EAC7C,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kDAAkD,EAClF,CAAC,CAAC,CAAC,SAAS,uDAAuD;AACnE,MAAa,0BAA0BA,IAAAA,EAAE,OAAO;CAC9C,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;CAC3F,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS;AAC7G,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,2CAA2C;AAErE,MAAa,oBAITC,eAAAA,OAAO,uBAAuB;CAChC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { payhere } from "../app.cjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/delete-hook.d.ts
|
|
@@ -8,23 +10,7 @@ declare const PayhereDeleteHookOutput: z.ZodObject<{
|
|
|
8
10
|
id: z.ZodNullable<z.ZodNumber>;
|
|
9
11
|
message: z.ZodNullable<z.ZodString>;
|
|
10
12
|
}, z.core.$loose>;
|
|
11
|
-
declare const payhereDeleteHook:
|
|
12
|
-
id: number;
|
|
13
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"payhere", z.ZodObject<{
|
|
14
|
-
connectionId: z.ZodString;
|
|
15
|
-
entityId: z.ZodString;
|
|
16
|
-
instanceId: z.ZodString;
|
|
17
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
18
|
-
subdomain: z.ZodString;
|
|
19
|
-
generic_api_key: z.ZodString;
|
|
20
|
-
}, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"payhere", z.ZodObject<{
|
|
21
|
-
connectionId: z.ZodString;
|
|
22
|
-
entityId: z.ZodString;
|
|
23
|
-
instanceId: z.ZodString;
|
|
24
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
-
subdomain: z.ZodString;
|
|
26
|
-
generic_api_key: z.ZodString;
|
|
27
|
-
}, z.core.$strip>>]>;
|
|
13
|
+
declare const payhereDeleteHook: AppAction<typeof PayhereDeleteHookInput, typeof PayhereDeleteHookOutput, typeof payhere.credential>;
|
|
28
14
|
//#endregion
|
|
29
15
|
export { payhereDeleteHook };
|
|
30
16
|
//# sourceMappingURL=delete-hook.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-hook.d.cts","names":[],"sources":["../../src/actions/delete-hook.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete-hook.d.cts","names":[],"sources":["../../src/actions/delete-hook.ts"],"mappings":";;;;;cAMa,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;cAGtB,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;cAKvB,iBAAA,EAAmB,SAAA,QACvB,sBAAA,SACA,uBAAA,SACA,OAAA,CAAQ,UAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { payhere } from "../app.mjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/delete-hook.d.ts
|
|
@@ -8,23 +10,7 @@ declare const PayhereDeleteHookOutput: z.ZodObject<{
|
|
|
8
10
|
id: z.ZodNullable<z.ZodNumber>;
|
|
9
11
|
message: z.ZodNullable<z.ZodString>;
|
|
10
12
|
}, z.core.$loose>;
|
|
11
|
-
declare const payhereDeleteHook:
|
|
12
|
-
id: number;
|
|
13
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"payhere", z.ZodObject<{
|
|
14
|
-
connectionId: z.ZodString;
|
|
15
|
-
entityId: z.ZodString;
|
|
16
|
-
instanceId: z.ZodString;
|
|
17
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
18
|
-
subdomain: z.ZodString;
|
|
19
|
-
generic_api_key: z.ZodString;
|
|
20
|
-
}, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"payhere", z.ZodObject<{
|
|
21
|
-
connectionId: z.ZodString;
|
|
22
|
-
entityId: z.ZodString;
|
|
23
|
-
instanceId: z.ZodString;
|
|
24
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
-
subdomain: z.ZodString;
|
|
26
|
-
generic_api_key: z.ZodString;
|
|
27
|
-
}, z.core.$strip>>]>;
|
|
13
|
+
declare const payhereDeleteHook: AppAction<typeof PayhereDeleteHookInput, typeof PayhereDeleteHookOutput, typeof payhere.credential>;
|
|
28
14
|
//#endregion
|
|
29
15
|
export { payhereDeleteHook };
|
|
30
16
|
//# sourceMappingURL=delete-hook.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-hook.d.mts","names":[],"sources":["../../src/actions/delete-hook.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete-hook.d.mts","names":[],"sources":["../../src/actions/delete-hook.ts"],"mappings":";;;;;cAMa,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;cAGtB,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;cAKvB,iBAAA,EAAmB,SAAA,QACvB,sBAAA,SACA,uBAAA,SACA,OAAA,CAAQ,UAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-hook.mjs","names":[],"sources":["../../src/actions/delete-hook.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhereDeleteHookInput = z.object({\n id: z.number().int().describe(\"The unique identifier of the REST hook to delete\"),\n}).describe(\"Request parameters for deleting a REST hook listener.\");\nexport const PayhereDeleteHookOutput = z.object({\n id: z.number().int().describe(\"The identifier of the REST hook that was deleted\").nullable(),\n message: z.string().describe(\"Confirmation message indicating the hook was successfully deleted\").nullable(),\n}).passthrough().describe(\"Response schema for deleting a REST hook.\");\n\nexport const payhereDeleteHook = action(\"PAYHERE_DELETE_HOOK\", {\n slug: \"payhere-delete-hook\",\n name: \"Delete Hook\",\n description: \"Tool to remove a REST hook listener subscription. Use when you need to stop receiving webhook events for a specific hook.\",\n input: PayhereDeleteHookInput,\n output: PayhereDeleteHookOutput,\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete-hook.mjs","names":[],"sources":["../../src/actions/delete-hook.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { payhere } from \"../app\";\n\nexport const PayhereDeleteHookInput = z.object({\n id: z.number().int().describe(\"The unique identifier of the REST hook to delete\"),\n}).describe(\"Request parameters for deleting a REST hook listener.\");\nexport const PayhereDeleteHookOutput = z.object({\n id: z.number().int().describe(\"The identifier of the REST hook that was deleted\").nullable(),\n message: z.string().describe(\"Confirmation message indicating the hook was successfully deleted\").nullable(),\n}).passthrough().describe(\"Response schema for deleting a REST hook.\");\n\nexport const payhereDeleteHook: AppAction<\n typeof PayhereDeleteHookInput,\n typeof PayhereDeleteHookOutput,\n typeof payhere.credential\n> = action(\"PAYHERE_DELETE_HOOK\", {\n slug: \"payhere-delete-hook\",\n name: \"Delete Hook\",\n description: \"Tool to remove a REST hook listener subscription. Use when you need to stop receiving webhook events for a specific hook.\",\n input: PayhereDeleteHookInput,\n output: PayhereDeleteHookOutput,\n});\n"],"mappings":";;;AAcA,MAAa,oBAIT,OAAO,uBAAuB;CAChC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAhBoC,EAAE,OAAO,EAC7C,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kDAAkD,EAClF,CAAC,CAAC,CAAC,SAAS,uDAcH;CACP,QAdqC,EAAE,OAAO;EAC9C,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;EAC3F,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS;CAC7G,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,2CAWhB;AACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-current-company-stats.cjs","names":["z","action"],"sources":["../../src/actions/get-current-company-stats.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhereGetCurrentCompanyStatsInput = z.object({}).describe(\"Request model for retrieving current company payment statistics. No parameters are required.\");\nexport const PayhereGetCurrentCompanyStatsOutput = z.object({\n currency: z.string().describe(\"Currency code for all monetary amounts (e.g., 'gbp', 'usd').\").nullable(),\n payments_last_30: z.number().describe(\"Total payment amount received in the last 30 days.\").nullable(),\n payments_all_time: z.number().describe(\"Total payment amount received across all time.\").nullable(),\n payments_comparison: z.number().describe(\"Total payment amount from 30-60 days prior, used for comparison.\").nullable(),\n subscribers_last_30: z.number().int().describe(\"Number of new subscribers acquired in the last 30 days.\").nullable(),\n subscribers_comparison: z.number().int().describe(\"Number of new subscribers from the preceding 30-day period (30-60 days ago).\").nullable(),\n}).passthrough().describe(\"Response model for company payment statistics from the last 30 days with comparison to the preceding 30-day period.\");\n\nexport const payhereGetCurrentCompanyStats = action(\"PAYHERE_GET_CURRENT_COMPANY_STATS\", {\n slug: \"payhere-get-current-company-stats\",\n name: \"Get Current Company Stats\",\n description: \"Tool to fetch payment statistics for the last 30 days with comparison data from the preceding 30-day period (30-60 days ago). Use when you need to analyze recent payment trends, subscriber growth, or compare current performance against the previous month.\",\n input: PayhereGetCurrentCompanyStatsInput,\n output: PayhereGetCurrentCompanyStatsOutput,\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-current-company-stats.cjs","names":["z","action"],"sources":["../../src/actions/get-current-company-stats.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { payhere } from \"../app\";\n\nexport const PayhereGetCurrentCompanyStatsInput = z.object({}).describe(\"Request model for retrieving current company payment statistics. No parameters are required.\");\nexport const PayhereGetCurrentCompanyStatsOutput = z.object({\n currency: z.string().describe(\"Currency code for all monetary amounts (e.g., 'gbp', 'usd').\").nullable(),\n payments_last_30: z.number().describe(\"Total payment amount received in the last 30 days.\").nullable(),\n payments_all_time: z.number().describe(\"Total payment amount received across all time.\").nullable(),\n payments_comparison: z.number().describe(\"Total payment amount from 30-60 days prior, used for comparison.\").nullable(),\n subscribers_last_30: z.number().int().describe(\"Number of new subscribers acquired in the last 30 days.\").nullable(),\n subscribers_comparison: z.number().int().describe(\"Number of new subscribers from the preceding 30-day period (30-60 days ago).\").nullable(),\n}).passthrough().describe(\"Response model for company payment statistics from the last 30 days with comparison to the preceding 30-day period.\");\n\nexport const payhereGetCurrentCompanyStats: AppAction<\n typeof PayhereGetCurrentCompanyStatsInput,\n typeof PayhereGetCurrentCompanyStatsOutput,\n typeof payhere.credential\n> = action(\"PAYHERE_GET_CURRENT_COMPANY_STATS\", {\n slug: \"payhere-get-current-company-stats\",\n name: \"Get Current Company Stats\",\n description: \"Tool to fetch payment statistics for the last 30 days with comparison data from the preceding 30-day period (30-60 days ago). Use when you need to analyze recent payment trends, subscriber growth, or compare current performance against the previous month.\",\n input: PayhereGetCurrentCompanyStatsInput,\n output: PayhereGetCurrentCompanyStatsOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,qCAAqCA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,8FAA8F;AACtK,MAAa,sCAAsCA,IAAAA,EAAE,OAAO;CAC1D,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS;CACvG,kBAAkBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;CACrG,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CAClG,qBAAqBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kEAAkE,CAAC,CAAC,SAAS;CACtH,qBAAqBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;CACnH,wBAAwBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,8EAA8E,CAAC,CAAC,SAAS;AAC7I,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,qHAAqH;AAE/I,MAAa,gCAITC,eAAAA,OAAO,qCAAqC;CAC9C,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { payhere } from "../app.cjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/get-current-company-stats.d.ts
|
|
@@ -10,21 +12,7 @@ declare const PayhereGetCurrentCompanyStatsOutput: z.ZodObject<{
|
|
|
10
12
|
subscribers_last_30: z.ZodNullable<z.ZodNumber>;
|
|
11
13
|
subscribers_comparison: z.ZodNullable<z.ZodNumber>;
|
|
12
14
|
}, z.core.$loose>;
|
|
13
|
-
declare const payhereGetCurrentCompanyStats:
|
|
14
|
-
connectionId: z.ZodString;
|
|
15
|
-
entityId: z.ZodString;
|
|
16
|
-
instanceId: z.ZodString;
|
|
17
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
18
|
-
subdomain: z.ZodString;
|
|
19
|
-
generic_api_key: z.ZodString;
|
|
20
|
-
}, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"payhere", z.ZodObject<{
|
|
21
|
-
connectionId: z.ZodString;
|
|
22
|
-
entityId: z.ZodString;
|
|
23
|
-
instanceId: z.ZodString;
|
|
24
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
-
subdomain: z.ZodString;
|
|
26
|
-
generic_api_key: z.ZodString;
|
|
27
|
-
}, z.core.$strip>>]>;
|
|
15
|
+
declare const payhereGetCurrentCompanyStats: AppAction<typeof PayhereGetCurrentCompanyStatsInput, typeof PayhereGetCurrentCompanyStatsOutput, typeof payhere.credential>;
|
|
28
16
|
//#endregion
|
|
29
17
|
export { payhereGetCurrentCompanyStats };
|
|
30
18
|
//# sourceMappingURL=get-current-company-stats.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-current-company-stats.d.cts","names":[],"sources":["../../src/actions/get-current-company-stats.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-current-company-stats.d.cts","names":[],"sources":["../../src/actions/get-current-company-stats.ts"],"mappings":";;;;;cAMa,kCAAA,EAAkC,CAAA,CAAA,SAAA,KAAA,CAAA,CAAA,IAAA,CAAA,MAAA;AAAA,cAClC,mCAAA,EAAmC,CAAA,CAAA,SAAA;;;;;;;;cASnC,6BAAA,EAA+B,SAAA,QACnC,kCAAA,SACA,mCAAA,SACA,OAAA,CAAQ,UAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { payhere } from "../app.mjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/get-current-company-stats.d.ts
|
|
@@ -10,21 +12,7 @@ declare const PayhereGetCurrentCompanyStatsOutput: z.ZodObject<{
|
|
|
10
12
|
subscribers_last_30: z.ZodNullable<z.ZodNumber>;
|
|
11
13
|
subscribers_comparison: z.ZodNullable<z.ZodNumber>;
|
|
12
14
|
}, z.core.$loose>;
|
|
13
|
-
declare const payhereGetCurrentCompanyStats:
|
|
14
|
-
connectionId: z.ZodString;
|
|
15
|
-
entityId: z.ZodString;
|
|
16
|
-
instanceId: z.ZodString;
|
|
17
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
18
|
-
subdomain: z.ZodString;
|
|
19
|
-
generic_api_key: z.ZodString;
|
|
20
|
-
}, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"payhere", z.ZodObject<{
|
|
21
|
-
connectionId: z.ZodString;
|
|
22
|
-
entityId: z.ZodString;
|
|
23
|
-
instanceId: z.ZodString;
|
|
24
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
-
subdomain: z.ZodString;
|
|
26
|
-
generic_api_key: z.ZodString;
|
|
27
|
-
}, z.core.$strip>>]>;
|
|
15
|
+
declare const payhereGetCurrentCompanyStats: AppAction<typeof PayhereGetCurrentCompanyStatsInput, typeof PayhereGetCurrentCompanyStatsOutput, typeof payhere.credential>;
|
|
28
16
|
//#endregion
|
|
29
17
|
export { payhereGetCurrentCompanyStats };
|
|
30
18
|
//# sourceMappingURL=get-current-company-stats.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-current-company-stats.d.mts","names":[],"sources":["../../src/actions/get-current-company-stats.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-current-company-stats.d.mts","names":[],"sources":["../../src/actions/get-current-company-stats.ts"],"mappings":";;;;;cAMa,kCAAA,EAAkC,CAAA,CAAA,SAAA,KAAA,CAAA,CAAA,IAAA,CAAA,MAAA;AAAA,cAClC,mCAAA,EAAmC,CAAA,CAAA,SAAA;;;;;;;;cASnC,6BAAA,EAA+B,SAAA,QACnC,kCAAA,SACA,mCAAA,SACA,OAAA,CAAQ,UAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-current-company-stats.mjs","names":[],"sources":["../../src/actions/get-current-company-stats.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhereGetCurrentCompanyStatsInput = z.object({}).describe(\"Request model for retrieving current company payment statistics. No parameters are required.\");\nexport const PayhereGetCurrentCompanyStatsOutput = z.object({\n currency: z.string().describe(\"Currency code for all monetary amounts (e.g., 'gbp', 'usd').\").nullable(),\n payments_last_30: z.number().describe(\"Total payment amount received in the last 30 days.\").nullable(),\n payments_all_time: z.number().describe(\"Total payment amount received across all time.\").nullable(),\n payments_comparison: z.number().describe(\"Total payment amount from 30-60 days prior, used for comparison.\").nullable(),\n subscribers_last_30: z.number().int().describe(\"Number of new subscribers acquired in the last 30 days.\").nullable(),\n subscribers_comparison: z.number().int().describe(\"Number of new subscribers from the preceding 30-day period (30-60 days ago).\").nullable(),\n}).passthrough().describe(\"Response model for company payment statistics from the last 30 days with comparison to the preceding 30-day period.\");\n\nexport const payhereGetCurrentCompanyStats = action(\"PAYHERE_GET_CURRENT_COMPANY_STATS\", {\n slug: \"payhere-get-current-company-stats\",\n name: \"Get Current Company Stats\",\n description: \"Tool to fetch payment statistics for the last 30 days with comparison data from the preceding 30-day period (30-60 days ago). Use when you need to analyze recent payment trends, subscriber growth, or compare current performance against the previous month.\",\n input: PayhereGetCurrentCompanyStatsInput,\n output: PayhereGetCurrentCompanyStatsOutput,\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-current-company-stats.mjs","names":[],"sources":["../../src/actions/get-current-company-stats.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { payhere } from \"../app\";\n\nexport const PayhereGetCurrentCompanyStatsInput = z.object({}).describe(\"Request model for retrieving current company payment statistics. No parameters are required.\");\nexport const PayhereGetCurrentCompanyStatsOutput = z.object({\n currency: z.string().describe(\"Currency code for all monetary amounts (e.g., 'gbp', 'usd').\").nullable(),\n payments_last_30: z.number().describe(\"Total payment amount received in the last 30 days.\").nullable(),\n payments_all_time: z.number().describe(\"Total payment amount received across all time.\").nullable(),\n payments_comparison: z.number().describe(\"Total payment amount from 30-60 days prior, used for comparison.\").nullable(),\n subscribers_last_30: z.number().int().describe(\"Number of new subscribers acquired in the last 30 days.\").nullable(),\n subscribers_comparison: z.number().int().describe(\"Number of new subscribers from the preceding 30-day period (30-60 days ago).\").nullable(),\n}).passthrough().describe(\"Response model for company payment statistics from the last 30 days with comparison to the preceding 30-day period.\");\n\nexport const payhereGetCurrentCompanyStats: AppAction<\n typeof PayhereGetCurrentCompanyStatsInput,\n typeof PayhereGetCurrentCompanyStatsOutput,\n typeof payhere.credential\n> = action(\"PAYHERE_GET_CURRENT_COMPANY_STATS\", {\n slug: \"payhere-get-current-company-stats\",\n name: \"Get Current Company Stats\",\n description: \"Tool to fetch payment statistics for the last 30 days with comparison data from the preceding 30-day period (30-60 days ago). Use when you need to analyze recent payment trends, subscriber growth, or compare current performance against the previous month.\",\n input: PayhereGetCurrentCompanyStatsInput,\n output: PayhereGetCurrentCompanyStatsOutput,\n});\n"],"mappings":";;;AAgBA,MAAa,gCAIT,OAAO,qCAAqC;CAC9C,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAlBgD,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,8FAkB/D;CACP,QAlBiD,EAAE,OAAO;EAC1D,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS;EACvG,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;EACrG,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;EAClG,qBAAqB,EAAE,OAAO,CAAC,CAAC,SAAS,kEAAkE,CAAC,CAAC,SAAS;EACtH,qBAAqB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;EACnH,wBAAwB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,8EAA8E,CAAC,CAAC,SAAS;CAC7I,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,qHAWhB;AACV,CAAC"}
|