@keystrokehq/nano_nets 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 (122) 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/create-model.cjs +29 -0
  7. package/dist/actions/create-model.cjs.map +1 -0
  8. package/dist/actions/create-model.d.cts +9 -0
  9. package/dist/actions/create-model.d.cts.map +1 -0
  10. package/dist/actions/create-model.d.mts +9 -0
  11. package/dist/actions/create-model.d.mts.map +1 -0
  12. package/dist/actions/create-model.mjs +28 -0
  13. package/dist/actions/create-model.mjs.map +1 -0
  14. package/dist/actions/delete-model.cjs +19 -0
  15. package/dist/actions/delete-model.cjs.map +1 -0
  16. package/dist/actions/delete-model.d.cts +9 -0
  17. package/dist/actions/delete-model.d.cts.map +1 -0
  18. package/dist/actions/delete-model.d.mts +9 -0
  19. package/dist/actions/delete-model.d.mts.map +1 -0
  20. package/dist/actions/delete-model.mjs +16 -0
  21. package/dist/actions/delete-model.mjs.map +1 -0
  22. package/dist/actions/get-all-models.cjs +35 -0
  23. package/dist/actions/get-all-models.cjs.map +1 -0
  24. package/dist/actions/get-all-models.d.cts +9 -0
  25. package/dist/actions/get-all-models.d.cts.map +1 -0
  26. package/dist/actions/get-all-models.d.mts +9 -0
  27. package/dist/actions/get-all-models.d.mts.map +1 -0
  28. package/dist/actions/get-all-models.mjs +34 -0
  29. package/dist/actions/get-all-models.mjs.map +1 -0
  30. package/dist/actions/get-all-prediction-files.cjs +46 -0
  31. package/dist/actions/get-all-prediction-files.cjs.map +1 -0
  32. package/dist/actions/get-all-prediction-files.d.cts +9 -0
  33. package/dist/actions/get-all-prediction-files.d.cts.map +1 -0
  34. package/dist/actions/get-all-prediction-files.d.mts +9 -0
  35. package/dist/actions/get-all-prediction-files.d.mts.map +1 -0
  36. package/dist/actions/get-all-prediction-files.mjs +45 -0
  37. package/dist/actions/get-all-prediction-files.mjs.map +1 -0
  38. package/dist/actions/get-model-details.cjs +34 -0
  39. package/dist/actions/get-model-details.cjs.map +1 -0
  40. package/dist/actions/get-model-details.d.cts +9 -0
  41. package/dist/actions/get-model-details.d.cts.map +1 -0
  42. package/dist/actions/get-model-details.d.mts +9 -0
  43. package/dist/actions/get-model-details.d.mts.map +1 -0
  44. package/dist/actions/get-model-details.mjs +33 -0
  45. package/dist/actions/get-model-details.mjs.map +1 -0
  46. package/dist/actions/get-training-images.cjs +40 -0
  47. package/dist/actions/get-training-images.cjs.map +1 -0
  48. package/dist/actions/get-training-images.d.cts +9 -0
  49. package/dist/actions/get-training-images.d.cts.map +1 -0
  50. package/dist/actions/get-training-images.d.mts +9 -0
  51. package/dist/actions/get-training-images.d.mts.map +1 -0
  52. package/dist/actions/get-training-images.mjs +39 -0
  53. package/dist/actions/get-training-images.mjs.map +1 -0
  54. package/dist/actions/get-workflows.cjs +29 -0
  55. package/dist/actions/get-workflows.cjs.map +1 -0
  56. package/dist/actions/get-workflows.d.cts +9 -0
  57. package/dist/actions/get-workflows.d.cts.map +1 -0
  58. package/dist/actions/get-workflows.d.mts +9 -0
  59. package/dist/actions/get-workflows.d.mts.map +1 -0
  60. package/dist/actions/get-workflows.mjs +28 -0
  61. package/dist/actions/get-workflows.mjs.map +1 -0
  62. package/dist/actions/index.cjs +23 -0
  63. package/dist/actions/index.d.cts +12 -0
  64. package/dist/actions/index.d.mts +12 -0
  65. package/dist/actions/index.mjs +12 -0
  66. package/dist/actions/list-documents.cjs +47 -0
  67. package/dist/actions/list-documents.cjs.map +1 -0
  68. package/dist/actions/list-documents.d.cts +9 -0
  69. package/dist/actions/list-documents.d.cts.map +1 -0
  70. package/dist/actions/list-documents.d.mts +9 -0
  71. package/dist/actions/list-documents.d.mts.map +1 -0
  72. package/dist/actions/list-documents.mjs +46 -0
  73. package/dist/actions/list-documents.mjs.map +1 -0
  74. package/dist/actions/update-model.cjs +23 -0
  75. package/dist/actions/update-model.cjs.map +1 -0
  76. package/dist/actions/update-model.d.cts +9 -0
  77. package/dist/actions/update-model.d.cts.map +1 -0
  78. package/dist/actions/update-model.d.mts +9 -0
  79. package/dist/actions/update-model.d.mts.map +1 -0
  80. package/dist/actions/update-model.mjs +20 -0
  81. package/dist/actions/update-model.mjs.map +1 -0
  82. package/dist/actions/upload-training-images-by-file.cjs +33 -0
  83. package/dist/actions/upload-training-images-by-file.cjs.map +1 -0
  84. package/dist/actions/upload-training-images-by-file.d.cts +9 -0
  85. package/dist/actions/upload-training-images-by-file.d.cts.map +1 -0
  86. package/dist/actions/upload-training-images-by-file.d.mts +9 -0
  87. package/dist/actions/upload-training-images-by-file.d.mts.map +1 -0
  88. package/dist/actions/upload-training-images-by-file.mjs +32 -0
  89. package/dist/actions/upload-training-images-by-file.mjs.map +1 -0
  90. package/dist/actions/upload-training-images-by-url.cjs +32 -0
  91. package/dist/actions/upload-training-images-by-url.cjs.map +1 -0
  92. package/dist/actions/upload-training-images-by-url.d.cts +9 -0
  93. package/dist/actions/upload-training-images-by-url.d.cts.map +1 -0
  94. package/dist/actions/upload-training-images-by-url.d.mts +9 -0
  95. package/dist/actions/upload-training-images-by-url.d.mts.map +1 -0
  96. package/dist/actions/upload-training-images-by-url.mjs +31 -0
  97. package/dist/actions/upload-training-images-by-url.mjs.map +1 -0
  98. package/dist/app.cjs +9 -0
  99. package/dist/app.cjs.map +1 -0
  100. package/dist/app.d.cts +5 -0
  101. package/dist/app.d.cts.map +1 -0
  102. package/dist/app.d.mts +5 -0
  103. package/dist/app.d.mts.map +1 -0
  104. package/dist/app.mjs +10 -0
  105. package/dist/app.mjs.map +1 -0
  106. package/dist/catalog.cjs +15 -0
  107. package/dist/catalog.cjs.map +1 -0
  108. package/dist/catalog.d.cts +14 -0
  109. package/dist/catalog.d.cts.map +1 -0
  110. package/dist/catalog.d.mts +14 -0
  111. package/dist/catalog.d.mts.map +1 -0
  112. package/dist/catalog.mjs +15 -0
  113. package/dist/catalog.mjs.map +1 -0
  114. package/dist/execute.cjs +18 -0
  115. package/dist/execute.cjs.map +1 -0
  116. package/dist/execute.mjs +18 -0
  117. package/dist/execute.mjs.map +1 -0
  118. package/dist/index.cjs +28 -0
  119. package/dist/index.d.cts +14 -0
  120. package/dist/index.d.mts +14 -0
  121. package/dist/index.mjs +15 -0
  122. package/package.json +49 -0
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # @keystrokehq/nano_nets
2
+
3
+ Keystroke-managed integration.
4
+
5
+ **App:** `nano_nets`
6
+ **Version:** `20260615_00`
7
+ **Actions:** 11
8
+
9
+ ```ts
10
+ import { defineAgent } from "@keystrokehq/keystroke/agent";
11
+ import { nanoNetsCreateModel } from "@keystrokehq/nano_nets/actions";
12
+
13
+ export default defineAgent({
14
+ key: "nano_nets-agent",
15
+ tools: [nanoNetsCreateModel],
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.nanoNets.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.executeNanoNetsTool(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":["nanoNets","executeNanoNetsTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { nanoNets } from \"./app\";\nimport { executeNanoNetsTool } 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 nanoNets.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 executeNanoNetsTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAOA,YAAAA,SAAS,OAAO;EACrB,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,oBAAoB,MAAM,KAAgC,CAAC;EAC3F;CACF,CAAC;AACH"}
@@ -0,0 +1,21 @@
1
+ import { nanoNets } from "./app.mjs";
2
+ import { executeNanoNetsTool } 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 nanoNets.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 executeNanoNetsTool(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 { nanoNets } from \"./app\";\nimport { executeNanoNetsTool } 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 nanoNets.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 executeNanoNetsTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAO,SAAS,OAAO;EACrB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,oBAAoB,MAAM,KAAgC,CAAC;EAC3F;CACF,CAAC;AACH"}
@@ -0,0 +1,29 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/create-model.ts
4
+ const NanoNetsCreateModelInput = zod.z.object({ categories: zod.z.array(zod.z.string()).describe("List of category/class names for the model to identify. For image classification, provide labels like ['cat', 'dog']. For OCR extraction, provide field names to extract like ['invoice_number', 'date', 'total'].") }).describe("Request schema for creating a new image classification or OCR model.");
5
+ const NanoNetsCreateModel_CategoryInfoSchema = zod.z.object({
6
+ id: zod.z.string().default("").describe("Unique identifier for the category.").nullable().optional(),
7
+ name: zod.z.string().describe("Name of the category/field."),
8
+ count: zod.z.number().int().default(0).describe("Number of training examples for this category.").nullable().optional(),
9
+ data_type: zod.z.string().default("").describe("Data type of the field.").nullable().optional(),
10
+ description: zod.z.string().default("").describe("Description of the category.").nullable().optional()
11
+ }).describe("Information about a category/field in the model.");
12
+ const NanoNetsCreateModelOutput = zod.z.object({
13
+ state: zod.z.number().int().describe("Current state of the model (0=created, 5=hosted)."),
14
+ status: zod.z.string().describe("Human-readable status message."),
15
+ model_id: zod.z.string().describe("Unique identifier for the created model."),
16
+ categories: zod.z.array(NanoNetsCreateModel_CategoryInfoSchema).describe("List of categories/fields configured for the model."),
17
+ model_type: zod.z.string().describe("Type of the model (e.g., 'ocr').")
18
+ }).describe("Response schema for a newly created model.");
19
+ const nanoNetsCreateModel = require_action.action("NANO_NETS_CREATE_MODEL", {
20
+ slug: "nano_nets-create-model",
21
+ name: "Create Model",
22
+ description: "Tool to create a new image classification or OCR model. Use when you need to initialize a model before uploading training images. Provide a list of categories/classes that the model should learn to identify or extract.",
23
+ input: NanoNetsCreateModelInput,
24
+ output: NanoNetsCreateModelOutput
25
+ });
26
+ //#endregion
27
+ exports.nanoNetsCreateModel = nanoNetsCreateModel;
28
+
29
+ //# sourceMappingURL=create-model.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-model.cjs","names":["z","action"],"sources":["../../src/actions/create-model.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NanoNetsCreateModelInput: z.ZodTypeAny = z.object({\n categories: z.array(z.string()).describe(\"List of category/class names for the model to identify. For image classification, provide labels like ['cat', 'dog']. For OCR extraction, provide field names to extract like ['invoice_number', 'date', 'total'].\"),\n}).describe(\"Request schema for creating a new image classification or OCR model.\");\nconst NanoNetsCreateModel_CategoryInfoSchema: z.ZodTypeAny = z.object({\n id: z.string().default(\"\").describe(\"Unique identifier for the category.\").nullable().optional(),\n name: z.string().describe(\"Name of the category/field.\"),\n count: z.number().int().default(0).describe(\"Number of training examples for this category.\").nullable().optional(),\n data_type: z.string().default(\"\").describe(\"Data type of the field.\").nullable().optional(),\n description: z.string().default(\"\").describe(\"Description of the category.\").nullable().optional(),\n}).describe(\"Information about a category/field in the model.\");\nexport const NanoNetsCreateModelOutput: z.ZodTypeAny = z.object({\n state: z.number().int().describe(\"Current state of the model (0=created, 5=hosted).\"),\n status: z.string().describe(\"Human-readable status message.\"),\n model_id: z.string().describe(\"Unique identifier for the created model.\"),\n categories: z.array(NanoNetsCreateModel_CategoryInfoSchema).describe(\"List of categories/fields configured for the model.\"),\n model_type: z.string().describe(\"Type of the model (e.g., 'ocr').\"),\n}).describe(\"Response schema for a newly created model.\");\n\nexport const nanoNetsCreateModel = action(\"NANO_NETS_CREATE_MODEL\", {\n slug: \"nano_nets-create-model\",\n name: \"Create Model\",\n description: \"Tool to create a new image classification or OCR model. Use when you need to initialize a model before uploading training images. Provide a list of categories/classes that the model should learn to identify or extract.\",\n input: NanoNetsCreateModelIn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AC,CAAC,SAAS,4CAA4C;AAExD,MAAa,sBAAsBC,eAAAA,OAAO,0BAA0B;CAClE,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-model.d.ts
4
+ declare const NanoNetsCreateModelInput: z.ZodTypeAny;
5
+ declare const NanoNetsCreateModelOutput: z.ZodTypeAny;
6
+ declare const nanoNetsCreateModel: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { nanoNetsCreateModel };
9
+ //# sourceMappingURL=create-model.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-model.d.cts","names":[],"sources":["../../src/actions/create-model.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UAE0C;AAAA,cAQtE,yBAAA,EAA2B,CAAA,CAAE,UAMe;AAAA,cAE5C,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/create-model.d.ts
4
+ declare const NanoNetsCreateModelInput: z.ZodTypeAny;
5
+ declare const NanoNetsCreateModelOutput: z.ZodTypeAny;
6
+ declare const nanoNetsCreateModel: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { nanoNetsCreateModel };
9
+ //# sourceMappingURL=create-model.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-model.d.mts","names":[],"sources":["../../src/actions/create-model.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UAE0C;AAAA,cAQtE,yBAAA,EAA2B,CAAA,CAAE,UAMe;AAAA,cAE5C,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,28 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ //#region src/actions/create-model.ts
4
+ const NanoNetsCreateModelInput = z.object({ categories: z.array(z.string()).describe("List of category/class names for the model to identify. For image classification, provide labels like ['cat', 'dog']. For OCR extraction, provide field names to extract like ['invoice_number', 'date', 'total'].") }).describe("Request schema for creating a new image classification or OCR model.");
5
+ const NanoNetsCreateModel_CategoryInfoSchema = z.object({
6
+ id: z.string().default("").describe("Unique identifier for the category.").nullable().optional(),
7
+ name: z.string().describe("Name of the category/field."),
8
+ count: z.number().int().default(0).describe("Number of training examples for this category.").nullable().optional(),
9
+ data_type: z.string().default("").describe("Data type of the field.").nullable().optional(),
10
+ description: z.string().default("").describe("Description of the category.").nullable().optional()
11
+ }).describe("Information about a category/field in the model.");
12
+ const nanoNetsCreateModel = action("NANO_NETS_CREATE_MODEL", {
13
+ slug: "nano_nets-create-model",
14
+ name: "Create Model",
15
+ description: "Tool to create a new image classification or OCR model. Use when you need to initialize a model before uploading training images. Provide a list of categories/classes that the model should learn to identify or extract.",
16
+ input: NanoNetsCreateModelInput,
17
+ output: z.object({
18
+ state: z.number().int().describe("Current state of the model (0=created, 5=hosted)."),
19
+ status: z.string().describe("Human-readable status message."),
20
+ model_id: z.string().describe("Unique identifier for the created model."),
21
+ categories: z.array(NanoNetsCreateModel_CategoryInfoSchema).describe("List of categories/fields configured for the model."),
22
+ model_type: z.string().describe("Type of the model (e.g., 'ocr').")
23
+ }).describe("Response schema for a newly created model.")
24
+ });
25
+ //#endregion
26
+ export { nanoNetsCreateModel };
27
+
28
+ //# sourceMappingURL=create-model.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-model.mjs","names":[],"sources":["../../src/actions/create-model.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NanoNetsCreateModelInput: z.ZodTypeAny = z.object({\n categories: z.array(z.string()).describe(\"List of category/class names for the model to identify. For image classification, provide labels like ['cat', 'dog']. For OCR extraction, provide field names to extract like ['invoice_number', 'date', 'total'].\"),\n}).describe(\"Request schema for creating a new image classification or OCR model.\");\nconst NanoNetsCreateModel_CategoryInfoSchema: z.ZodTypeAny = z.object({\n id: z.string().default(\"\").describe(\"Unique identifier for the category.\").nullable().optional(),\n name: z.string().describe(\"Name of the category/field.\"),\n count: z.number().int().default(0).describe(\"Number of training examples for this category.\").nullable().optional(),\n data_type: z.string().default(\"\").describe(\"Data type of the field.\").nullable().optional(),\n description: z.string().default(\"\").describe(\"Description of the category.\").nullable().optional(),\n}).describe(\"Information about a category/field in the model.\");\nexport const NanoNetsCreateModelOutput: z.ZodTypeAny = z.object({\n state: z.number().int().describe(\"Current state of the model (0=created, 5=hosted).\"),\n status: z.string().describe(\"Human-readable status message.\"),\n model_id: z.string().describe(\"Unique identifier for the created model.\"),\n categories: z.array(NanoNetsCreateModel_CategoryInfoSchema).describe(\"List of categories/fields configured for the model.\"),\n model_type: z.string().describe(\"Type of the model (e.g., 'ocr').\"),\n}).describe(\"Response schema for a newly created model.\");\n\nexport const nanoNetsCreateModel = action(\"NANO_NETS_CREATE_MODEL\", {\n slug: \"nano_nets-create-model\",\n name: \"Create Model\",\n description: \"Tool to create a new image classification or OCR model. Use when you need to initialize a model before uploading training images. Provide a list of categories/classes that the model should learn to identify or extract.\",\n input: NanoNetsCreateModelInput,\n output: NanoNetsCreateModelOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAAyC,EAAE,OAAO,EAC7D,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,oNAAoN,EAC/P,CAAC,CAAC,CAAC,SAAS,sEAAsE;AAClF,MAAM,yCAAuD,EAAE,OAAO;CACpE,IAAI,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/F,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B;CACvD,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClH,WAAW,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,yBAAyB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1F,aAAa,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACnG,CAAC,CAAC,CAAC,SAAS,kDAAkD;AAS9D,MAAa,sBAAsB,OAAO,0BAA0B;CAClE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAbqD,EAAE,OAAO;EAC9D,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mDAAmD;EACpF,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC;EAC5D,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;EACxE,YAAY,EAAE,MAAM,sCAAsC,CAAC,CAAC,SAAS,qDAAqD;EAC1H,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC;CACpE,CAAC,CAAC,CAAC,SAAS,4CAOF;AACV,CAAC"}
@@ -0,0 +1,19 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/delete-model.ts
4
+ const NanoNetsDeleteModelInput = zod.z.object({ model_id: zod.z.string().describe("The unique identifier (UUID) of the OCR model to delete. Get this from the 'Get all OCR models' action.") });
5
+ const NanoNetsDeleteModelOutput = zod.z.object({
6
+ message: zod.z.string().describe("Confirmation message indicating the model was deleted successfully."),
7
+ model_id: zod.z.string().describe("The ID of the deleted model, if returned by the API.").nullable().optional()
8
+ });
9
+ const nanoNetsDeleteModel = require_action.action("NANO_NETS_DELETE_MODEL", {
10
+ slug: "nano_nets-delete-model",
11
+ name: "Delete OCR Model",
12
+ description: "Permanently deletes an OCR model from Nanonets. Use this action when you need to remove a trained model that is no longer needed. This action is irreversible - once deleted, the model and all its training data cannot be recovered. Prerequisites: Obtain the model_id from the 'Get all OCR models' action first.",
13
+ input: NanoNetsDeleteModelInput,
14
+ output: NanoNetsDeleteModelOutput
15
+ });
16
+ //#endregion
17
+ exports.nanoNetsDeleteModel = nanoNetsDeleteModel;
18
+
19
+ //# sourceMappingURL=delete-model.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-model.cjs","names":["z","action"],"sources":["../../src/actions/delete-model.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NanoNetsDeleteModelInput: z.ZodTypeAny = z.object({\n model_id: z.string().describe(\"The unique identifier (UUID) of the OCR model to delete. Get this from the 'Get all OCR models' action.\"),\n});\nexport const NanoNetsDeleteModelOutput: z.ZodTypeAny = z.object({\n message: z.string().describe(\"Confirmation message indicating the model was deleted successfully.\"),\n model_id: z.string().describe(\"The ID of the deleted model, if returned by the API.\").nullable().optional(),\n});\n\nexport const nanoNetsDeleteModel = action(\"NANO_NETS_DELETE_MODEL\", {\n slug: \"nano_nets-delete-model\",\n name: \"Delete OCR Model\",\n description: \"Permanently deletes an OCR model from Nanonets. Use this action when you need to remove a trained model that is no longer needed. This action is irreversible - once deleted, the model and all its training data cannot be recovered. Prerequisites: Obtain the model_id from the 'Get all OCR models' action first.\",\n input: NanoNetsDeleteModelInput,\n output: NanoNetsDeleteModelOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAAyCA,IAAAA,EAAE,OAAO,EAC7D,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yGAAyG,EACzI,CAAC;AACD,MAAa,4BAA0CA,IAAAA,EAAE,OAAO;CAC9D,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qEAAqE;CAClG,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sDAAsD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC5G,CAAC;AAED,MAAa,sBAAsBC,eAAAA,OAAO,0BAA0B;CAClE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/delete-model.d.ts
4
+ declare const NanoNetsDeleteModelInput: z.ZodTypeAny;
5
+ declare const NanoNetsDeleteModelOutput: z.ZodTypeAny;
6
+ declare const nanoNetsDeleteModel: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { nanoNetsDeleteModel };
9
+ //# sourceMappingURL=delete-model.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-model.d.cts","names":[],"sources":["../../src/actions/delete-model.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UAEvC;AAAA,cACW,yBAAA,EAA2B,CAAA,CAAE,UAGxC;AAAA,cAEW,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/delete-model.d.ts
4
+ declare const NanoNetsDeleteModelInput: z.ZodTypeAny;
5
+ declare const NanoNetsDeleteModelOutput: z.ZodTypeAny;
6
+ declare const nanoNetsDeleteModel: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { nanoNetsDeleteModel };
9
+ //# sourceMappingURL=delete-model.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-model.d.mts","names":[],"sources":["../../src/actions/delete-model.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UAEvC;AAAA,cACW,yBAAA,EAA2B,CAAA,CAAE,UAGxC;AAAA,cAEW,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,16 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ const nanoNetsDeleteModel = action("NANO_NETS_DELETE_MODEL", {
4
+ slug: "nano_nets-delete-model",
5
+ name: "Delete OCR Model",
6
+ description: "Permanently deletes an OCR model from Nanonets. Use this action when you need to remove a trained model that is no longer needed. This action is irreversible - once deleted, the model and all its training data cannot be recovered. Prerequisites: Obtain the model_id from the 'Get all OCR models' action first.",
7
+ input: z.object({ model_id: z.string().describe("The unique identifier (UUID) of the OCR model to delete. Get this from the 'Get all OCR models' action.") }),
8
+ output: z.object({
9
+ message: z.string().describe("Confirmation message indicating the model was deleted successfully."),
10
+ model_id: z.string().describe("The ID of the deleted model, if returned by the API.").nullable().optional()
11
+ })
12
+ });
13
+ //#endregion
14
+ export { nanoNetsDeleteModel };
15
+
16
+ //# sourceMappingURL=delete-model.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-model.mjs","names":[],"sources":["../../src/actions/delete-model.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NanoNetsDeleteModelInput: z.ZodTypeAny = z.object({\n model_id: z.string().describe(\"The unique identifier (UUID) of the OCR model to delete. Get this from the 'Get all OCR models' action.\"),\n});\nexport const NanoNetsDeleteModelOutput: z.ZodTypeAny = z.object({\n message: z.string().describe(\"Confirmation message indicating the model was deleted successfully.\"),\n model_id: z.string().describe(\"The ID of the deleted model, if returned by the API.\").nullable().optional(),\n});\n\nexport const nanoNetsDeleteModel = action(\"NANO_NETS_DELETE_MODEL\", {\n slug: \"nano_nets-delete-model\",\n name: \"Delete OCR Model\",\n description: \"Permanently deletes an OCR model from Nanonets. Use this action when you need to remove a trained model that is no longer needed. This action is irreversible - once deleted, the model and all its training data cannot be recovered. Prerequisites: Obtain the model_id from the 'Get all OCR models' action first.\",\n input: NanoNetsDeleteModelInput,\n output: NanoNetsDeleteModelOutput,\n});\n"],"mappings":";;AAYA,MAAa,sBAAsB,OAAO,0BAA0B;CAClE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAZoD,EAAE,OAAO,EAC7D,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,yGAAyG,EACzI,CAUS;CACP,QAVqD,EAAE,OAAO;EAC9D,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,qEAAqE;EAClG,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,sDAAsD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5G,CAOU;AACV,CAAC"}
@@ -0,0 +1,35 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/get-all-models.ts
4
+ const NanoNetsGetAllModelsInput = zod.z.object({}).describe("Request parameters to list all models in the NanoNets account.\nAll parameters are optional; omit for default behavior.");
5
+ const NanoNetsGetAllModels_CategoryInfoSchema = zod.z.object({
6
+ id: zod.z.string().describe("Unique identifier for the category."),
7
+ name: zod.z.string().describe("Name of the category/field."),
8
+ count: zod.z.number().int().describe("Count of training examples for this category.").nullable().optional(),
9
+ data_type: zod.z.string().describe("Data type of the category.").nullable().optional(),
10
+ description: zod.z.string().describe("Description of the category.").nullable().optional()
11
+ }).passthrough().describe("Schema for a category/field associated with a model.");
12
+ const NanoNetsGetAllModels_ModelInfoSchema = zod.z.object({
13
+ email: zod.z.string().describe("Email address associated with the model for uploads.").nullable().optional(),
14
+ state: zod.z.number().int().describe("Current model state as integer (e.g., 5 for 'Model hosted')."),
15
+ status: zod.z.string().describe("Human-readable status of the model (e.g., 'Model hosted').").nullable().optional(),
16
+ is_paid: zod.z.boolean().describe("Whether this is a paid model.").nullable().optional(),
17
+ accuracy: zod.z.number().describe("Model accuracy percentage (0-100).").nullable().optional(),
18
+ model_id: zod.z.string().describe("Unique identifier for the model."),
19
+ is_public: zod.z.boolean().describe("Whether the model is publicly accessible.").nullable().optional(),
20
+ categories: zod.z.array(NanoNetsGetAllModels_CategoryInfoSchema).describe("List of categories/fields that this model can extract.").nullable().optional(),
21
+ is_deleted: zod.z.boolean().describe("Whether the model has been deleted.").nullable().optional(),
22
+ model_type: zod.z.string().describe("Type of the model (e.g., 'ocr').")
23
+ }).passthrough().describe("Schema for an individual model in NanoNets.");
24
+ const NanoNetsGetAllModelsOutput = zod.z.object({ models: zod.z.array(NanoNetsGetAllModels_ModelInfoSchema).describe("List of model details.") }).describe("Response from listing models. Contains an array of model details.");
25
+ const nanoNetsGetAllModels = require_action.action("NANO_NETS_GET_ALL_MODELS", {
26
+ slug: "nano_nets-get-all-models",
27
+ name: "Get All Models",
28
+ description: "Retrieves all models (OCR and Image Classification) in the user's NanoNets account. Returns model details including ID, type, status, accuracy, and extractable fields/categories. Use to discover available models before performing predictions or training operations.",
29
+ input: NanoNetsGetAllModelsInput,
30
+ output: NanoNetsGetAllModelsOutput
31
+ });
32
+ //#endregion
33
+ exports.nanoNetsGetAllModels = nanoNetsGetAllModels;
34
+
35
+ //# sourceMappingURL=get-all-models.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-all-models.cjs","names":["z","action"],"sources":["../../src/actions/get-all-models.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NanoNetsGetAllModelsInput: z.ZodTypeAny = z.object({}).describe(\"Request parameters to list all models in the NanoNets account.\\nAll parameters are optional; omit for default behavior.\");\nconst NanoNetsGetAllModels_CategoryInfoSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for the category.\"),\n name: z.string().describe(\"Name of the category/field.\"),\n count: z.number().int().describe(\"Count of training examples for this category.\").nullable().optional(),\n data_type: z.string().describe(\"Data type of the category.\").nullable().optional(),\n description: z.string().describe(\"Description of the category.\").nullable().optional(),\n}).passthrough().describe(\"Schema for a category/field associated with a model.\");\nconst NanoNetsGetAllModels_ModelInfoSchema: z.ZodTypeAny = z.object({\n email: z.string().describe(\"Email address associated with the model for uploads.\").nullable().optional(),\n state: z.number().int().describe(\"Current model state as integer (e.g., 5 for 'Model hosted').\"),\n status: z.string().describe(\"Human-readable status of the model (e.g., 'Model hosted').\").nullable().optional(),\n is_paid: z.boolean().describe(\"Whether this is a paid model.\").nullable().optional(),\n accuracy: z.number().describe(\"Model accuracy percentage (0-100).\").nullable().optional(),\n model_id: z.string().describe(\"Unique identifier for the model.\"),\n is_public: z.boolean().describe(\"Whether the model is publicly accessible.\").nullable().optional(),\n categories: z.array(NanoNetsGetAllModels_CategoryInfoSchema).describe(\"List of categories/fields that this model can extract.\").nullable().optional(),\n is_deleted: z.boolean().describe(\"Whether the model has been deleted.\").nullable().optional(),\n model_type: z.string().describe(\"Type of the model (e.g., 'ocr').\"),\n}).passthrough().describe(\"Schema for an individual model in NanoNets.\");\nexport const NanoNetsGetAllModelsOutput: z.ZodTypeAny = z.object({\n models: z.array(NanoNetsGetAllModels_ModelInfoSchema).describe(\"List of model details.\"),\n}).describe(\"Response from listing models. Contains an array of model details.\");\n\nexport const nanoNetsGetAllModels = action(\"NANO_NETS_GET_ALL_MODELS\", {\n slug: \"nano_nets-get-all-models\",\n name: \"Get All Models\",\n description: \"Retrieves all models (OCR and Image Classification) in the user's NanoNets account. Returns model details including ID, type, status, accuracy, and extractable fields/categories. Use to discover available models before performing predictions or training operations.\",\n input: NanoNetsGetAllModelsInput,\n output: NanoNetsGetAllModelsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,4BAA0CA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,yHAAyH;AACtM,MAAM,0CAAwDA,IAAAA,EAAE,OAAO;CACrE,IAAIA,IAAAA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,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5F,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC;AACpE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,6CAA6C;AACvE,MAAa,6BAA2CA,IAAAA,EAAE,OAAO,EAC/D,QAAQA,IAAAA,EAAE,MAAM,oCAAoC,CAAC,CAAC,SAAS,wBAAwB,EACzF,CAAC,CAAC,CAAC,SAAS,mEAAmE;AAE/E,MAAa,uBAAuBC,eAAAA,OAAO,4BAA4B;CACrE,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/get-all-models.d.ts
4
+ declare const NanoNetsGetAllModelsInput: z.ZodTypeAny;
5
+ declare const NanoNetsGetAllModelsOutput: z.ZodTypeAny;
6
+ declare const nanoNetsGetAllModels: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { nanoNetsGetAllModels };
9
+ //# sourceMappingURL=get-all-models.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-all-models.d.cts","names":[],"sources":["../../src/actions/get-all-models.ts"],"mappings":";;;cAIa,yBAAA,EAA2B,CAAA,CAAE,UAA6J;AAAA,cAoB1L,0BAAA,EAA4B,CAAA,CAAE,UAEqC;AAAA,cAEnE,oBAAA,gCAAoB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/get-all-models.d.ts
4
+ declare const NanoNetsGetAllModelsInput: z.ZodTypeAny;
5
+ declare const NanoNetsGetAllModelsOutput: z.ZodTypeAny;
6
+ declare const nanoNetsGetAllModels: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { nanoNetsGetAllModels };
9
+ //# sourceMappingURL=get-all-models.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-all-models.d.mts","names":[],"sources":["../../src/actions/get-all-models.ts"],"mappings":";;;cAIa,yBAAA,EAA2B,CAAA,CAAE,UAA6J;AAAA,cAoB1L,0BAAA,EAA4B,CAAA,CAAE,UAEqC;AAAA,cAEnE,oBAAA,gCAAoB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,34 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ //#region src/actions/get-all-models.ts
4
+ const NanoNetsGetAllModelsInput = z.object({}).describe("Request parameters to list all models in the NanoNets account.\nAll parameters are optional; omit for default behavior.");
5
+ const NanoNetsGetAllModels_CategoryInfoSchema = z.object({
6
+ id: z.string().describe("Unique identifier for the category."),
7
+ name: z.string().describe("Name of the category/field."),
8
+ count: z.number().int().describe("Count of training examples for this category.").nullable().optional(),
9
+ data_type: z.string().describe("Data type of the category.").nullable().optional(),
10
+ description: z.string().describe("Description of the category.").nullable().optional()
11
+ }).passthrough().describe("Schema for a category/field associated with a model.");
12
+ const NanoNetsGetAllModels_ModelInfoSchema = z.object({
13
+ email: z.string().describe("Email address associated with the model for uploads.").nullable().optional(),
14
+ state: z.number().int().describe("Current model state as integer (e.g., 5 for 'Model hosted')."),
15
+ status: z.string().describe("Human-readable status of the model (e.g., 'Model hosted').").nullable().optional(),
16
+ is_paid: z.boolean().describe("Whether this is a paid model.").nullable().optional(),
17
+ accuracy: z.number().describe("Model accuracy percentage (0-100).").nullable().optional(),
18
+ model_id: z.string().describe("Unique identifier for the model."),
19
+ is_public: z.boolean().describe("Whether the model is publicly accessible.").nullable().optional(),
20
+ categories: z.array(NanoNetsGetAllModels_CategoryInfoSchema).describe("List of categories/fields that this model can extract.").nullable().optional(),
21
+ is_deleted: z.boolean().describe("Whether the model has been deleted.").nullable().optional(),
22
+ model_type: z.string().describe("Type of the model (e.g., 'ocr').")
23
+ }).passthrough().describe("Schema for an individual model in NanoNets.");
24
+ const nanoNetsGetAllModels = action("NANO_NETS_GET_ALL_MODELS", {
25
+ slug: "nano_nets-get-all-models",
26
+ name: "Get All Models",
27
+ description: "Retrieves all models (OCR and Image Classification) in the user's NanoNets account. Returns model details including ID, type, status, accuracy, and extractable fields/categories. Use to discover available models before performing predictions or training operations.",
28
+ input: NanoNetsGetAllModelsInput,
29
+ output: z.object({ models: z.array(NanoNetsGetAllModels_ModelInfoSchema).describe("List of model details.") }).describe("Response from listing models. Contains an array of model details.")
30
+ });
31
+ //#endregion
32
+ export { nanoNetsGetAllModels };
33
+
34
+ //# sourceMappingURL=get-all-models.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-all-models.mjs","names":[],"sources":["../../src/actions/get-all-models.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NanoNetsGetAllModelsInput: z.ZodTypeAny = z.object({}).describe(\"Request parameters to list all models in the NanoNets account.\\nAll parameters are optional; omit for default behavior.\");\nconst NanoNetsGetAllModels_CategoryInfoSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for the category.\"),\n name: z.string().describe(\"Name of the category/field.\"),\n count: z.number().int().describe(\"Count of training examples for this category.\").nullable().optional(),\n data_type: z.string().describe(\"Data type of the category.\").nullable().optional(),\n description: z.string().describe(\"Description of the category.\").nullable().optional(),\n}).passthrough().describe(\"Schema for a category/field associated with a model.\");\nconst NanoNetsGetAllModels_ModelInfoSchema: z.ZodTypeAny = z.object({\n email: z.string().describe(\"Email address associated with the model for uploads.\").nullable().optional(),\n state: z.number().int().describe(\"Current model state as integer (e.g., 5 for 'Model hosted').\"),\n status: z.string().describe(\"Human-readable status of the model (e.g., 'Model hosted').\").nullable().optional(),\n is_paid: z.boolean().describe(\"Whether this is a paid model.\").nullable().optional(),\n accuracy: z.number().describe(\"Model accuracy percentage (0-100).\").nullable().optional(),\n model_id: z.string().describe(\"Unique identifier for the model.\"),\n is_public: z.boolean().describe(\"Whether the model is publicly accessible.\").nullable().optional(),\n categories: z.array(NanoNetsGetAllModels_CategoryInfoSchema).describe(\"List of categories/fields that this model can extract.\").nullable().optional(),\n is_deleted: z.boolean().describe(\"Whether the model has been deleted.\").nullable().optional(),\n model_type: z.string().describe(\"Type of the model (e.g., 'ocr').\"),\n}).passthrough().describe(\"Schema for an individual model in NanoNets.\");\nexport const NanoNetsGetAllModelsOutput: z.ZodTypeAny = z.object({\n models: z.array(NanoNetsGetAllModels_ModelInfoSchema).describe(\"List of model details.\"),\n}).describe(\"Response from listing models. Contains an array of model details.\");\n\nexport const nanoNetsGetAllModels = action(\"NANO_NETS_GET_ALL_MODELS\", {\n slug: \"nano_nets-get-all-models\",\n name: \"Get All Models\",\n description: \"Retrieves all models (OCR and Image Classification) in the user's NanoNets account. Returns model details including ID, type, status, accuracy, and extractable fields/categories. Use to discover available models before performing predictions or training operations.\",\n input: NanoNetsGetAllModelsInput,\n output: NanoNetsGetAllModelsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,4BAA0C,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,yHAAyH;AACtM,MAAM,0CAAwD,EAAE,OAAO;CACrE,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC;CAC7D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B;CACvD,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtG,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS,CAAC,CAAC,SAA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ACV,CAAC"}
@@ -0,0 +1,46 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/get-all-prediction-files.ts
4
+ const NanoNetsGetAllPredictionFilesInput = zod.z.object({
5
+ page: zod.z.number().int().default(1).describe("Page number for pagination (must be >= 1)").optional(),
6
+ model_id: zod.z.string().describe("Unique identifier of the NanoNets OCR model to fetch prediction files from"),
7
+ page_size: zod.z.number().int().default(50).describe("Number of prediction files per page (1-500)").optional()
8
+ }).describe("Request parameters for fetching all prediction files (inference results) from a NanoNets OCR model.");
9
+ const NanoNetsGetAllPredictionFiles_PredictionLabelSchema = zod.z.object({
10
+ id: zod.z.string().default("").describe("Unique identifier for the prediction").nullable().optional(),
11
+ type: zod.z.string().default("field").describe("Type of prediction ('field' or 'table')").nullable().optional(),
12
+ xmax: zod.z.number().int().default(0).describe("Right x-coordinate of bounding box").nullable().optional(),
13
+ xmin: zod.z.number().int().default(0).describe("Left x-coordinate of bounding box").nullable().optional(),
14
+ ymax: zod.z.number().int().default(0).describe("Bottom y-coordinate of bounding box").nullable().optional(),
15
+ ymin: zod.z.number().int().default(0).describe("Top y-coordinate of bounding box").nullable().optional(),
16
+ label: zod.z.string().default("").describe("Label/category name of the predicted field").nullable().optional(),
17
+ score: zod.z.number().default(0).describe("Confidence score of the prediction (0-1)").nullable().optional(),
18
+ status: zod.z.string().default("").describe("Verification status").nullable().optional(),
19
+ ocr_text: zod.z.string().default("").describe("Extracted text from OCR").nullable().optional()
20
+ }).passthrough().describe("Represents a predicted label with OCR extraction details.");
21
+ const NanoNetsGetAllPredictionFiles_PredictionFileSchema = zod.z.object({
22
+ id: zod.z.string().default("").describe("Unique identifier for the prediction file").nullable().optional(),
23
+ page: zod.z.number().int().default(0).describe("Page number within the document").nullable().optional(),
24
+ status: zod.z.string().default("").describe("Processing status of the file").nullable().optional(),
25
+ file_url: zod.z.string().default("").describe("URL of the processed file/image").nullable().optional(),
26
+ prediction: zod.z.array(NanoNetsGetAllPredictionFiles_PredictionLabelSchema).describe("List of predicted labels with extracted OCR data").nullable().optional(),
27
+ request_file_id: zod.z.string().default("").describe("Request file ID for reference").nullable().optional(),
28
+ original_file_url: zod.z.string().default("").describe("URL of the original uploaded file").nullable().optional()
29
+ }).passthrough().describe("Represents a single prediction file with its OCR results.");
30
+ const NanoNetsGetAllPredictionFilesOutput = zod.z.object({
31
+ next: zod.z.string().describe("URL for the next page of results (if available)").nullable().optional(),
32
+ count: zod.z.number().int().default(0).describe("Total number of prediction files available").nullable().optional(),
33
+ result: zod.z.array(NanoNetsGetAllPredictionFiles_PredictionFileSchema).describe("List of prediction files with their OCR results").nullable().optional(),
34
+ previous: zod.z.string().describe("URL for the previous page of results (if available)").nullable().optional()
35
+ }).passthrough().describe("Response model containing all prediction files for the model.");
36
+ const nanoNetsGetAllPredictionFiles = require_action.action("NANO_NETS_GET_ALL_PREDICTION_FILES", {
37
+ slug: "nano_nets-get-all-prediction-files",
38
+ name: "Get All Prediction Files",
39
+ description: "Retrieve all prediction files (OCR results) for a NanoNets model. Use this tool to: - List all documents/images that have been processed by an OCR model - Get prediction results including extracted text and field values - Access file URLs and processing status for each prediction The response includes prediction labels with extracted text, confidence scores, and bounding box coordinates for each processed file.",
40
+ input: NanoNetsGetAllPredictionFilesInput,
41
+ output: NanoNetsGetAllPredictionFilesOutput
42
+ });
43
+ //#endregion
44
+ exports.nanoNetsGetAllPredictionFiles = nanoNetsGetAllPredictionFiles;
45
+
46
+ //# sourceMappingURL=get-all-prediction-files.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-all-prediction-files.cjs","names":["z","action"],"sources":["../../src/actions/get-all-prediction-files.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NanoNetsGetAllPredictionFilesInput: z.ZodTypeAny = z.object({\n page: z.number().int().default(1).describe(\"Page number for pagination (must be >= 1)\").optional(),\n model_id: z.string().describe(\"Unique identifier of the NanoNets OCR model to fetch prediction files from\"),\n page_size: z.number().int().default(50).describe(\"Number of prediction files per page (1-500)\").optional(),\n}).describe(\"Request parameters for fetching all prediction files (inference results) from a NanoNets OCR model.\");\nconst NanoNetsGetAllPredictionFiles_PredictionLabelSchema: z.ZodTypeAny = z.object({\n id: z.string().default(\"\").describe(\"Unique identifier for the prediction\").nullable().optional(),\n type: z.string().default(\"field\").describe(\"Type of prediction ('field' or 'table')\").nullable().optional(),\n xmax: z.number().int().default(0).describe(\"Right x-coordinate of bounding box\").nullable().optional(),\n xmin: z.number().int().default(0).describe(\"Left x-coordinate of bounding box\").nullable().optional(),\n ymax: z.number().int().default(0).describe(\"Bottom y-coordinate of bounding box\").nullable().optional(),\n ymin: z.number().int().default(0).describe(\"Top y-coordinate of bounding box\").nullable().optional(),\n label: z.string().default(\"\").describe(\"Label/category name of the predicted field\").nullable().optional(),\n score: z.number().default(0).describe(\"Confidence score of the prediction (0-1)\").nullable().optional(),\n status: z.string().default(\"\").describe(\"Verification status\").nullable().optional(),\n ocr_text: z.string().default(\"\").describe(\"Extracted text from OCR\").nullable().optional(),\n}).passthrough().describe(\"Represents a predicted label with OCR extraction details.\");\nconst NanoNetsGetAllPredictionFiles_PredictionFileSchema: z.ZodTypeAny = z.object({\n id: z.string().default(\"\").describe(\"Unique identifier for the prediction file\").nullable().optional(),\n page: z.number().int().default(0).describe(\"Page number within the document\").nullable().optional(),\n status: z.string().default(\"\").describe(\"Processing status of the file\").nullable().optional(),\n file_url: z.string().default(\"\").describe(\"URL of the processed file/image\").nullable().optional(),\n prediction: z.array(NanoNetsGetAllPredictionFiles_PredictionLabelSchema).describe(\"List of predicted labels with extracted OCR data\").nullable().optional(),\n request_file_id: z.string().default(\"\").describe(\"Request file ID for reference\").nullable().optional(),\n original_file_url: z.string().default(\"\").describe(\"URL of the original uploaded file\").nullable().optional(),\n}).passthrough().describe(\"Represents a single prediction file with its OCR results.\");\nexport const NanoNetsGetAllPredictionFilesOutput: z.ZodTypeAny = z.object({\n next: z.string().describe(\"URL for the next page of results (if available)\").nullable().optional(),\n count: z.number().int().default(0).describe(\"Total number of prediction files available\").nullable().optional(),\n result: z.array(NanoNetsGetAllPredictionFiles_PredictionFileSchema).describe(\"List of prediction files with their OCR results\").nullable().optional(),\n previous: z.string().describe(\"URL for the previous page of results (if available)\").nullable().optional(),\n}).passthrough().describe(\"Response model containing all prediction files for the model.\");\n\nexport const nanoNetsGetAllPredictionFiles = action(\"NANO_NETS_GET_ALL_PREDICTION_FILES\", {\n slug: \"nano_nets-get-all-prediction-files\",\n name: \"Get All Prediction Files\",\n description: \"Retrieve all prediction files (OCR results) for a NanoNets model. Use this tool to: - List all documents/images that have been processed by an OCR model - Get prediction results including extracted text and field values - Access file URLs and processing status for each prediction The response includes prediction labels with extracted text, confidence scores, and bounding box coordinates for each processed file.\",\n input: NanoNetsGetAllPredictionFilesInput,\n output: NanoNetsGetAllPredictionFilesOutput,\n});\n"],"mappings":";;;AAIA,MAAa,qCAAmDA,IAAAA,EAAE,OAAO;CACvE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CACjG,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4EAA4E;CAC1G,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS;AAC3G,CAAC,CAAC,CAAC,SAAS,qGAAqG;AACjH,MAAM,sDAAoEA,IAAAA,EAAE,OAAO;CACjF,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChG,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,QAAQ,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;C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C,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC3G,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,+DAA+D;AAEzF,MAAa,gCAAgCC,eAAAA,OAAO,sCAAsC;CACxF,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/get-all-prediction-files.d.ts
4
+ declare const NanoNetsGetAllPredictionFilesInput: z.ZodTypeAny;
5
+ declare const NanoNetsGetAllPredictionFilesOutput: z.ZodTypeAny;
6
+ declare const nanoNetsGetAllPredictionFiles: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { nanoNetsGetAllPredictionFiles };
9
+ //# sourceMappingURL=get-all-prediction-files.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-all-prediction-files.d.cts","names":[],"sources":["../../src/actions/get-all-prediction-files.ts"],"mappings":";;;cAIa,kCAAA,EAAoC,CAAA,CAAE,UAI+D;AAAA,cAsBrG,mCAAA,EAAqC,CAAA,CAAE,UAKsC;AAAA,cAE7E,6BAAA,gCAA6B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/get-all-prediction-files.d.ts
4
+ declare const NanoNetsGetAllPredictionFilesInput: z.ZodTypeAny;
5
+ declare const NanoNetsGetAllPredictionFilesOutput: z.ZodTypeAny;
6
+ declare const nanoNetsGetAllPredictionFiles: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { nanoNetsGetAllPredictionFiles };
9
+ //# sourceMappingURL=get-all-prediction-files.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-all-prediction-files.d.mts","names":[],"sources":["../../src/actions/get-all-prediction-files.ts"],"mappings":";;;cAIa,kCAAA,EAAoC,CAAA,CAAE,UAI+D;AAAA,cAsBrG,mCAAA,EAAqC,CAAA,CAAE,UAKsC;AAAA,cAE7E,6BAAA,gCAA6B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,45 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ //#region src/actions/get-all-prediction-files.ts
4
+ const NanoNetsGetAllPredictionFilesInput = z.object({
5
+ page: z.number().int().default(1).describe("Page number for pagination (must be >= 1)").optional(),
6
+ model_id: z.string().describe("Unique identifier of the NanoNets OCR model to fetch prediction files from"),
7
+ page_size: z.number().int().default(50).describe("Number of prediction files per page (1-500)").optional()
8
+ }).describe("Request parameters for fetching all prediction files (inference results) from a NanoNets OCR model.");
9
+ const NanoNetsGetAllPredictionFiles_PredictionLabelSchema = z.object({
10
+ id: z.string().default("").describe("Unique identifier for the prediction").nullable().optional(),
11
+ type: z.string().default("field").describe("Type of prediction ('field' or 'table')").nullable().optional(),
12
+ xmax: z.number().int().default(0).describe("Right x-coordinate of bounding box").nullable().optional(),
13
+ xmin: z.number().int().default(0).describe("Left x-coordinate of bounding box").nullable().optional(),
14
+ ymax: z.number().int().default(0).describe("Bottom y-coordinate of bounding box").nullable().optional(),
15
+ ymin: z.number().int().default(0).describe("Top y-coordinate of bounding box").nullable().optional(),
16
+ label: z.string().default("").describe("Label/category name of the predicted field").nullable().optional(),
17
+ score: z.number().default(0).describe("Confidence score of the prediction (0-1)").nullable().optional(),
18
+ status: z.string().default("").describe("Verification status").nullable().optional(),
19
+ ocr_text: z.string().default("").describe("Extracted text from OCR").nullable().optional()
20
+ }).passthrough().describe("Represents a predicted label with OCR extraction details.");
21
+ const NanoNetsGetAllPredictionFiles_PredictionFileSchema = z.object({
22
+ id: z.string().default("").describe("Unique identifier for the prediction file").nullable().optional(),
23
+ page: z.number().int().default(0).describe("Page number within the document").nullable().optional(),
24
+ status: z.string().default("").describe("Processing status of the file").nullable().optional(),
25
+ file_url: z.string().default("").describe("URL of the processed file/image").nullable().optional(),
26
+ prediction: z.array(NanoNetsGetAllPredictionFiles_PredictionLabelSchema).describe("List of predicted labels with extracted OCR data").nullable().optional(),
27
+ request_file_id: z.string().default("").describe("Request file ID for reference").nullable().optional(),
28
+ original_file_url: z.string().default("").describe("URL of the original uploaded file").nullable().optional()
29
+ }).passthrough().describe("Represents a single prediction file with its OCR results.");
30
+ const nanoNetsGetAllPredictionFiles = action("NANO_NETS_GET_ALL_PREDICTION_FILES", {
31
+ slug: "nano_nets-get-all-prediction-files",
32
+ name: "Get All Prediction Files",
33
+ description: "Retrieve all prediction files (OCR results) for a NanoNets model. Use this tool to: - List all documents/images that have been processed by an OCR model - Get prediction results including extracted text and field values - Access file URLs and processing status for each prediction The response includes prediction labels with extracted text, confidence scores, and bounding box coordinates for each processed file.",
34
+ input: NanoNetsGetAllPredictionFilesInput,
35
+ output: z.object({
36
+ next: z.string().describe("URL for the next page of results (if available)").nullable().optional(),
37
+ count: z.number().int().default(0).describe("Total number of prediction files available").nullable().optional(),
38
+ result: z.array(NanoNetsGetAllPredictionFiles_PredictionFileSchema).describe("List of prediction files with their OCR results").nullable().optional(),
39
+ previous: z.string().describe("URL for the previous page of results (if available)").nullable().optional()
40
+ }).passthrough().describe("Response model containing all prediction files for the model.")
41
+ });
42
+ //#endregion
43
+ export { nanoNetsGetAllPredictionFiles };
44
+
45
+ //# sourceMappingURL=get-all-prediction-files.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-all-prediction-files.mjs","names":[],"sources":["../../src/actions/get-all-prediction-files.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NanoNetsGetAllPredictionFilesInput: z.ZodTypeAny = z.object({\n page: z.number().int().default(1).describe(\"Page number for pagination (must be >= 1)\").optional(),\n model_id: z.string().describe(\"Unique identifier of the NanoNets OCR model to fetch prediction files from\"),\n page_size: z.number().int().default(50).describe(\"Number of prediction files per page (1-500)\").optional(),\n}).describe(\"Request parameters for fetching all prediction files (inference results) from a NanoNets OCR model.\");\nconst NanoNetsGetAllPredictionFiles_PredictionLabelSchema: z.ZodTypeAny = z.object({\n id: z.string().default(\"\").describe(\"Unique identifier for the prediction\").nullable().optional(),\n type: z.string().default(\"field\").describe(\"Type of prediction ('field' or 'table')\").nullable().optional(),\n xmax: z.number().int().default(0).describe(\"Right x-coordinate of bounding box\").nullable().optional(),\n xmin: z.number().int().default(0).describe(\"Left x-coordinate of bounding box\").nullable().optional(),\n ymax: z.number().int().default(0).describe(\"Bottom y-coordinate of bounding box\").nullable().optional(),\n ymin: z.number().int().default(0).describe(\"Top y-coordinate of bounding box\").nullable().optional(),\n label: z.string().default(\"\").describe(\"Label/category name of the predicted field\").nullable().optional(),\n score: z.number().default(0).describe(\"Confidence score of the prediction (0-1)\").nullable().optional(),\n status: z.string().default(\"\").describe(\"Verification status\").nullable().optional(),\n ocr_text: z.string().default(\"\").describe(\"Extracted text from OCR\").nullable().optional(),\n}).passthrough().describe(\"Represents a predicted label with OCR extraction details.\");\nconst NanoNetsGetAllPredictionFiles_PredictionFileSchema: z.ZodTypeAny = z.object({\n id: z.string().default(\"\").describe(\"Unique identifier for the prediction file\").nullable().optional(),\n page: z.number().int().default(0).describe(\"Page number within the document\").nullable().optional(),\n status: z.string().default(\"\").describe(\"Processing status of the file\").nullable().optional(),\n file_url: z.string().default(\"\").describe(\"URL of the processed file/image\").nullable().optional(),\n prediction: z.array(NanoNetsGetAllPredictionFiles_PredictionLabelSchema).describe(\"List of predicted labels with extracted OCR data\").nullable().optional(),\n request_file_id: z.string().default(\"\").describe(\"Request file ID for reference\").nullable().optional(),\n original_file_url: z.string().default(\"\").describe(\"URL of the original uploaded file\").nullable().optional(),\n}).passthrough().describe(\"Represents a single prediction file with its OCR results.\");\nexport const NanoNetsGetAllPredictionFilesOutput: z.ZodTypeAny = z.object({\n next: z.string().describe(\"URL for the next page of results (if available)\").nullable().optional(),\n count: z.number().int().default(0).describe(\"Total number of prediction files available\").nullable().optional(),\n result: z.array(NanoNetsGetAllPredictionFiles_PredictionFileSchema).describe(\"List of prediction files with their OCR results\").nullable().optional(),\n previous: z.string().describe(\"URL for the previous page of results (if available)\").nullable().optional(),\n}).passthrough().describe(\"Response model containing all prediction files for the model.\");\n\nexport const nanoNetsGetAllPredictionFiles = action(\"NANO_NETS_GET_ALL_PREDICTION_FILES\", {\n slug: \"nano_nets-get-all-prediction-files\",\n name: \"Get All Prediction Files\",\n description: \"Retrieve all prediction files (OCR results) for a NanoNets model. Use this tool to: - List all documents/images that have been processed by an OCR model - Get prediction results including extracted text and field values - Access file URLs and processing status for each prediction The response includes prediction labels with extracted text, confidence scores, and bounding box coordinates for each processed file.\",\n input: NanoNetsGetAllPredictionFilesInput,\n output: NanoNetsGetAllPredictionFilesOutput,\n});\n"],"mappings":";;;AAIA,MAAa,qCAAmD,EAAE,OAAO;CACvE,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CACjG,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,4EAA4E;CAC1G,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS;AAC3G,CAAC,CAAC,CAAC,SAAS,qGAAqG;AACjH,MAAM,sDAAoE,EAAE,OAAO;CACjF,IAAI,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChG,MAAM,EAAE,OAAO,CAAC,CAAC,QAAQ,OAAO,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AAC,CAAC,SAAS;CAC3G,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,+DAOhB;AACV,CAAC"}
@@ -0,0 +1,34 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/get-model-details.ts
4
+ const NanoNetsGetModelDetailsInput = zod.z.object({ model_id: zod.z.string().describe("Unique identifier of the OCR model to retrieve details.") }).describe("Request parameters for retrieving OCR model details.");
5
+ const NanoNetsGetModelDetails_CategoryInfoSchema = zod.z.object({
6
+ id: zod.z.string().describe("Unique identifier for the category."),
7
+ name: zod.z.string().describe("Name of the category/field."),
8
+ count: zod.z.number().int().describe("Count of training examples for this category.").nullable().optional(),
9
+ data_type: zod.z.string().describe("Data type of the category.").nullable().optional(),
10
+ description: zod.z.string().describe("Description of the category.").nullable().optional()
11
+ }).passthrough().describe("Schema for a category/field associated with a model.");
12
+ const NanoNetsGetModelDetailsOutput = zod.z.object({
13
+ email: zod.z.string().describe("Email address associated with the model for uploads.").nullable().optional(),
14
+ state: zod.z.number().int().describe("Current model state as integer (e.g., 5 for 'Model hosted')."),
15
+ status: zod.z.string().describe("Human-readable status of the model (e.g., 'Model hosted').").nullable().optional(),
16
+ is_paid: zod.z.boolean().describe("Whether this is a paid model.").nullable().optional(),
17
+ accuracy: zod.z.number().describe("Model accuracy percentage (0-100).").nullable().optional(),
18
+ model_id: zod.z.string().describe("Unique identifier of the model."),
19
+ is_public: zod.z.boolean().describe("Whether the model is publicly accessible.").nullable().optional(),
20
+ categories: zod.z.array(NanoNetsGetModelDetails_CategoryInfoSchema).describe("List of categories/fields that this model can extract.").nullable().optional(),
21
+ is_deleted: zod.z.boolean().describe("Whether the model has been deleted.").nullable().optional(),
22
+ model_type: zod.z.string().describe("Type of the model (e.g., 'ocr').")
23
+ }).passthrough().describe("Response schema for OCR model details.\nContains comprehensive model information including ID, type, status, categories, and metadata.");
24
+ const nanoNetsGetModelDetails = require_action.action("NANO_NETS_GET_MODEL_DETAILS", {
25
+ slug: "nano_nets-get-model-details",
26
+ name: "Get OCR Model Details",
27
+ description: "Tool to retrieve details of an OCR model. Use when you need full metadata of a model by its ID.",
28
+ input: NanoNetsGetModelDetailsInput,
29
+ output: NanoNetsGetModelDetailsOutput
30
+ });
31
+ //#endregion
32
+ exports.nanoNetsGetModelDetails = nanoNetsGetModelDetails;
33
+
34
+ //# sourceMappingURL=get-model-details.cjs.map