@aviaryhq/cloudglue-js 0.0.9 → 0.0.10

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.
@@ -1,9 +1,9 @@
1
1
  import { type ZodiosOptions } from "@zodios/core";
2
2
  import { z } from "zod";
3
- import { File } from "./common";
3
+ import { File as CloudglueFile } from "./common";
4
4
  type FileList = {
5
5
  object: "list";
6
- data: Array<File>;
6
+ data: Array<CloudglueFile>;
7
7
  total: number;
8
8
  limit: number;
9
9
  offset: number;
@@ -12,13 +12,13 @@ declare const FileList: z.ZodType<FileList>;
12
12
  export declare const schemas: {
13
13
  FileList: z.ZodType<FileList, z.ZodTypeDef, FileList>;
14
14
  FileUpload: z.ZodObject<{
15
- file: z.ZodType<globalThis.File, z.ZodTypeDef, globalThis.File>;
15
+ file: z.ZodType<File, z.ZodTypeDef, File>;
16
16
  metadata: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
17
17
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
18
- file: z.ZodType<globalThis.File, z.ZodTypeDef, globalThis.File>;
18
+ file: z.ZodType<File, z.ZodTypeDef, File>;
19
19
  metadata: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
20
20
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
21
- file: z.ZodType<globalThis.File, z.ZodTypeDef, globalThis.File>;
21
+ file: z.ZodType<File, z.ZodTypeDef, File>;
22
22
  metadata: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
23
23
  }, z.ZodTypeAny, "passthrough">>;
24
24
  FileDelete: z.ZodObject<{
@@ -43,13 +43,13 @@ export declare const FilesApi: import("@zodios/core").ZodiosInstance<[{
43
43
  description: string;
44
44
  type: "Body";
45
45
  schema: z.ZodObject<{
46
- file: z.ZodType<globalThis.File, z.ZodTypeDef, globalThis.File>;
46
+ file: z.ZodType<File, z.ZodTypeDef, File>;
47
47
  metadata: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
48
48
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
49
- file: z.ZodType<globalThis.File, z.ZodTypeDef, globalThis.File>;
49
+ file: z.ZodType<File, z.ZodTypeDef, File>;
50
50
  metadata: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
51
51
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
52
- file: z.ZodType<globalThis.File, z.ZodTypeDef, globalThis.File>;
52
+ file: z.ZodType<File, z.ZodTypeDef, File>;
53
53
  metadata: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
54
54
  }, z.ZodTypeAny, "passthrough">>;
55
55
  }];
@@ -393,13 +393,13 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
393
393
  description: string;
394
394
  type: "Body";
395
395
  schema: z.ZodObject<{
396
- file: z.ZodType<globalThis.File, z.ZodTypeDef, globalThis.File>;
396
+ file: z.ZodType<File, z.ZodTypeDef, File>;
397
397
  metadata: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
398
398
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
399
- file: z.ZodType<globalThis.File, z.ZodTypeDef, globalThis.File>;
399
+ file: z.ZodType<File, z.ZodTypeDef, File>;
400
400
  metadata: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
401
401
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
402
- file: z.ZodType<globalThis.File, z.ZodTypeDef, globalThis.File>;
402
+ file: z.ZodType<File, z.ZodTypeDef, File>;
403
403
  metadata: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
404
404
  }, z.ZodTypeAny, "passthrough">>;
405
405
  }];
@@ -4,6 +4,7 @@ exports.FilesApi = exports.schemas = void 0;
4
4
  exports.createApiClient = createApiClient;
5
5
  const core_1 = require("@zodios/core");
6
6
  const zod_1 = require("zod");
7
+ // TODO: this needs to be manually added to the generated file
7
8
  const common_1 = require("./common");
8
9
  const FileList = zod_1.z
9
10
  .object({
@@ -17,7 +18,8 @@ const FileList = zod_1.z
17
18
  .passthrough();
18
19
  const FileUpload = zod_1.z
19
20
  .object({
20
- file: zod_1.z.instanceof(globalThis.File),
21
+ // This should actually be referencing the file primitive from node
22
+ file: zod_1.z.instanceof(File),
21
23
  metadata: zod_1.z.object({}).partial().strict().passthrough().optional(),
22
24
  })
23
25
  .strict()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aviaryhq/cloudglue-js",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "CloudGlue API client for Node.js",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  ],
10
10
  "scripts": {
11
11
  "clean": "rimraf dist",
12
- "generate": "openapi-zod-client spec/spec/openapi.json --group-strategy=tag-file -o generated --export-schemas=true --export-types=true --base-url=https://api.cloudglue.dev/v1 --strict-objects && sed -i '' 's/z.instanceof(File)/z.instanceof(globalThis.File)/' generated/Files.ts",
12
+ "generate": "openapi-zod-client spec/spec/openapi.json --group-strategy=tag-file -o generated --export-schemas=true --export-types=true --base-url=https://api.cloudglue.dev/v1 --strict-objects ",
13
13
  "build": "tsc",
14
14
  "watch": "tsc --watch",
15
15
  "prepare": "npm run build"