needle-cloud 0.4.0-alpha.33 → 0.4.0-alpha.35

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.
@@ -0,0 +1 @@
1
+ export const program: any;
@@ -0,0 +1 @@
1
+ export * from "./web/index.js";
@@ -0,0 +1,105 @@
1
+ /**
2
+ * import("@needle-tools/cloud-sdk/types").FileLike
3
+ */
4
+ /**
5
+ * @typedef {{ token: string, endpoint?:string }} AuthData
6
+ * @typedef {{ name: string, mimetype: string, buffer:Buffer }} Filelike
7
+ */
8
+ /**
9
+ * @param {Array<Filelike>} files
10
+ * @param {AuthData & {
11
+ * name?:string,
12
+ * abort?:AbortSignal,
13
+ * }} opts
14
+ * @returns {Promise<{error:string} | {job_id:string, view_id:string, url?:string, skipped?:boolean}>}
15
+ */
16
+ export function uploadFiles(files: Array<Filelike>, opts: AuthData & {
17
+ name?: string;
18
+ abort?: AbortSignal;
19
+ }): Promise<{
20
+ error: string;
21
+ } | {
22
+ job_id: string;
23
+ view_id: string;
24
+ url?: string;
25
+ skipped?: boolean;
26
+ }>;
27
+ /**
28
+ * Unfortunately this doesnt get properly bundles in the final output so we have to write the types below directly
29
+ * @typedef {import("@needle-tools/cloud-sdk/types").JobType} JobType
30
+ * @typedef {import("@needle-tools/cloud-sdk/types").JobStatus} JobStatus
31
+ */
32
+ /**
33
+ * @typedef {{
34
+ * name: string,
35
+ * thumbnail_url?: string,
36
+ * created_at: string,
37
+ * updated_at: string,
38
+ * files: Array<{
39
+ * type: "upload" | "conversion" | "optimization" | "deployment",
40
+ * status: "failed" | "completed" | (string & {}),
41
+ * created_at: string,
42
+ * updated_at: string,
43
+ * name? :string,
44
+ * url:string,
45
+ * size: number,
46
+ * additional_size?: number,
47
+ * }>}} Upload
48
+ */
49
+ /**
50
+ * @param {AuthData & ({ name?: string, view_id?:string } | { page: number, limit: number })} opts
51
+ * @returns {Promise<Array<Upload>>}
52
+ */
53
+ export function getUploads(opts: AuthData & ({
54
+ name?: string;
55
+ view_id?: string;
56
+ } | {
57
+ page: number;
58
+ limit: number;
59
+ })): Promise<Array<Upload>>;
60
+ /**
61
+ * @param {AuthData & { offset?:number, limit?: number }} opts
62
+ * @returns {Promise<Array<Deployment>>}
63
+ * @typedef {{ name: string, url: string }} Deployment
64
+ */
65
+ export function getDeployments(opts: AuthData & {
66
+ offset?: number;
67
+ limit?: number;
68
+ }): Promise<Array<Deployment>>;
69
+ export type AuthData = {
70
+ token: string;
71
+ endpoint?: string;
72
+ };
73
+ export type Filelike = {
74
+ name: string;
75
+ mimetype: string;
76
+ buffer: Buffer;
77
+ };
78
+ /**
79
+ * Unfortunately this doesnt get properly bundles in the final output so we have to write the types below directly
80
+ */
81
+ export type JobType = import("@needle-tools/cloud-sdk/types").JobType;
82
+ /**
83
+ * Unfortunately this doesnt get properly bundles in the final output so we have to write the types below directly
84
+ */
85
+ export type JobStatus = import("@needle-tools/cloud-sdk/types").JobStatus;
86
+ export type Upload = {
87
+ name: string;
88
+ thumbnail_url?: string;
89
+ created_at: string;
90
+ updated_at: string;
91
+ files: Array<{
92
+ type: "upload" | "conversion" | "optimization" | "deployment";
93
+ status: "failed" | "completed" | (string & {});
94
+ created_at: string;
95
+ updated_at: string;
96
+ name?: string;
97
+ url: string;
98
+ size: number;
99
+ additional_size?: number;
100
+ }>;
101
+ };
102
+ export type Deployment = {
103
+ name: string;
104
+ url: string;
105
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,105 @@
1
+ /**
2
+ * import("@needle-tools/cloud-sdk/types").FileLike
3
+ */
4
+ /**
5
+ * @typedef {{ token: string, endpoint?:string }} AuthData
6
+ * @typedef {{ name: string, mimetype: string, buffer:Buffer }} Filelike
7
+ */
8
+ /**
9
+ * @param {Array<Filelike>} files
10
+ * @param {AuthData & {
11
+ * name?:string,
12
+ * abort?:AbortSignal,
13
+ * }} opts
14
+ * @returns {Promise<{error:string} | {job_id:string, view_id:string, url?:string, skipped?:boolean}>}
15
+ */
16
+ export function uploadFiles(files: Array<Filelike>, opts: AuthData & {
17
+ name?: string;
18
+ abort?: AbortSignal;
19
+ }): Promise<{
20
+ error: string;
21
+ } | {
22
+ job_id: string;
23
+ view_id: string;
24
+ url?: string;
25
+ skipped?: boolean;
26
+ }>;
27
+ /**
28
+ * Unfortunately this doesnt get properly bundles in the final output so we have to write the types below directly
29
+ * @typedef {import("@needle-tools/cloud-sdk/types").JobType} JobType
30
+ * @typedef {import("@needle-tools/cloud-sdk/types").JobStatus} JobStatus
31
+ */
32
+ /**
33
+ * @typedef {{
34
+ * name: string,
35
+ * thumbnail_url?: string,
36
+ * created_at: string,
37
+ * updated_at: string,
38
+ * files: Array<{
39
+ * type: "upload" | "conversion" | "optimization" | "deployment",
40
+ * status: "failed" | "completed" | (string & {}),
41
+ * created_at: string,
42
+ * updated_at: string,
43
+ * name? :string,
44
+ * url:string,
45
+ * size: number,
46
+ * additional_size?: number,
47
+ * }>}} Upload
48
+ */
49
+ /**
50
+ * @param {AuthData & ({ name?: string, view_id?:string } | { page: number, limit: number })} opts
51
+ * @returns {Promise<Array<Upload>>}
52
+ */
53
+ export function getUploads(opts: AuthData & ({
54
+ name?: string;
55
+ view_id?: string;
56
+ } | {
57
+ page: number;
58
+ limit: number;
59
+ })): Promise<Array<Upload>>;
60
+ /**
61
+ * @param {AuthData & { offset?:number, limit?: number }} opts
62
+ * @returns {Promise<Array<Deployment>>}
63
+ * @typedef {{ name: string, url: string }} Deployment
64
+ */
65
+ export function getDeployments(opts: AuthData & {
66
+ offset?: number;
67
+ limit?: number;
68
+ }): Promise<Array<Deployment>>;
69
+ export type AuthData = {
70
+ token: string;
71
+ endpoint?: string;
72
+ };
73
+ export type Filelike = {
74
+ name: string;
75
+ mimetype: string;
76
+ buffer: Buffer;
77
+ };
78
+ /**
79
+ * Unfortunately this doesnt get properly bundles in the final output so we have to write the types below directly
80
+ */
81
+ export type JobType = import("@needle-tools/cloud-sdk/types").JobType;
82
+ /**
83
+ * Unfortunately this doesnt get properly bundles in the final output so we have to write the types below directly
84
+ */
85
+ export type JobStatus = import("@needle-tools/cloud-sdk/types").JobStatus;
86
+ export type Upload = {
87
+ name: string;
88
+ thumbnail_url?: string;
89
+ created_at: string;
90
+ updated_at: string;
91
+ files: Array<{
92
+ type: "upload" | "conversion" | "optimization" | "deployment";
93
+ status: "failed" | "completed" | (string & {});
94
+ created_at: string;
95
+ updated_at: string;
96
+ name?: string;
97
+ url: string;
98
+ size: number;
99
+ additional_size?: number;
100
+ }>;
101
+ };
102
+ export type Deployment = {
103
+ name: string;
104
+ url: string;
105
+ };
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "needle-cloud",
3
- "version": "0.4.0-alpha.33",
3
+ "version": "0.4.0-alpha.35",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "needle-cloud": "bin/cli.js"
@@ -36,7 +36,7 @@
36
36
  "test": "vitest",
37
37
  "preinstall": "cd ../needle-share-sdk && npm install",
38
38
  "deploy:main": "npm run deploy -- --tag main",
39
- "deploy": "npm run dist -- --compress & npm publish --access public",
39
+ "deploy": "npm run dist & npm publish --access public",
40
40
  "deploy:dry": "npm run deploy -- --dry-run",
41
41
  "bump:tag:main": "npm dist-tag add needle-cloud@<version> main",
42
42
  "dev": "concurrently --kill-others \"npm run dev:web\" \"npm run dev:node\"",