@frogbotai/piece-dropbox 0.31.0 → 0.32.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.
- package/README.md +8 -0
- package/dist/actions/customApiCall.d.ts +1 -65
- package/dist/actions/customApiCall.d.ts.map +1 -1
- package/dist/actions/customApiCall.js +5 -150
- package/dist/actions/customApiCall.js.map +1 -1
- package/dist/actions/list.d.ts +1 -1
- package/dist/client.d.ts +1 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +6 -3
- package/dist/client.js.map +1 -1
- package/dist/define.d.ts +1 -1
- package/dist/define.d.ts.map +1 -1
- package/dist/define.js +1 -1
- package/dist/define.js.map +1 -1
- package/dist/index.d.ts +59 -68
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -7
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -15,6 +15,14 @@ export const dropbox = createDropbox({
|
|
|
15
15
|
});
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
## OAuth scopes
|
|
19
|
+
|
|
20
|
+
Change the requested scopes with the factory's `scopes` option: `createDropbox({ oauth, scopes: ({ defaultScopes }) => [...defaultScopes, 'sharing.read'] })` adds one, and an array replaces the defaults. `dropboxScopes` maps each name to the provider's scope string.
|
|
21
|
+
|
|
22
|
+
- Always requested: none.
|
|
23
|
+
- Defaults: `files.metadata.write`, `files.metadata.read`, `files.content.write`, `files.content.read`.
|
|
24
|
+
- Also available: `account_info.read`, `account_info.write`, `file_requests.read`, `file_requests.write`, `sharing.read`, `sharing.write`, `contacts.read`, `contacts.write`, `openid`, `email`, `profile`.
|
|
25
|
+
|
|
18
26
|
## Actions
|
|
19
27
|
|
|
20
28
|
| Upstream action slug | Previous wrapper export | Native action | Notes |
|
|
@@ -1,66 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const customApiCall: import("frogbot").PieceActionDefinition<z.ZodObject<{
|
|
3
|
-
method: z.ZodEnum<{
|
|
4
|
-
POST: "POST";
|
|
5
|
-
GET: "GET";
|
|
6
|
-
PATCH: "PATCH";
|
|
7
|
-
PUT: "PUT";
|
|
8
|
-
DELETE: "DELETE";
|
|
9
|
-
HEAD: "HEAD";
|
|
10
|
-
}>;
|
|
11
|
-
path: z.ZodString;
|
|
12
|
-
headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
13
|
-
query: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
14
|
-
body: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
15
|
-
type: z.ZodLiteral<"json">;
|
|
16
|
-
value: z.ZodJSONSchema;
|
|
17
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
18
|
-
type: z.ZodLiteral<"raw">;
|
|
19
|
-
value: z.ZodString;
|
|
20
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
-
type: z.ZodLiteral<"formData">;
|
|
22
|
-
fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
23
|
-
type: z.ZodLiteral<"text">;
|
|
24
|
-
name: z.ZodString;
|
|
25
|
-
value: z.ZodString;
|
|
26
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
27
|
-
type: z.ZodLiteral<"file">;
|
|
28
|
-
name: z.ZodString;
|
|
29
|
-
file: z.ZodObject<{
|
|
30
|
-
fileId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
31
|
-
name: z.ZodOptional<z.ZodString>;
|
|
32
|
-
}, z.core.$strip>;
|
|
33
|
-
}, z.core.$strip>], "type">>;
|
|
34
|
-
}, z.core.$strip>], "type">>;
|
|
35
|
-
responseType: z.ZodDefault<z.ZodEnum<{
|
|
36
|
-
json: "json";
|
|
37
|
-
text: "text";
|
|
38
|
-
binary: "binary";
|
|
39
|
-
}>>;
|
|
40
|
-
fileName: z.ZodDefault<z.ZodString>;
|
|
41
|
-
failsafe: z.ZodDefault<z.ZodBoolean>;
|
|
42
|
-
timeoutSeconds: z.ZodDefault<z.ZodNumber>;
|
|
43
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
44
|
-
status: z.ZodNumber;
|
|
45
|
-
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
46
|
-
body: z.ZodUnion<readonly [z.ZodJSONSchema, z.ZodObject<{
|
|
47
|
-
id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
48
|
-
name: z.ZodString;
|
|
49
|
-
mimeType: z.ZodString;
|
|
50
|
-
size: z.ZodNumber;
|
|
51
|
-
url: z.ZodOptional<z.ZodString>;
|
|
52
|
-
}, z.core.$strip>]>;
|
|
53
|
-
}, z.core.$strip>, Record<string, never>, import("../client.js").DropboxClient, {
|
|
54
|
-
status: number;
|
|
55
|
-
headers: Record<string, string>;
|
|
56
|
-
body: {
|
|
57
|
-
id: string | number;
|
|
58
|
-
name: string;
|
|
59
|
-
mimeType: string;
|
|
60
|
-
size: number;
|
|
61
|
-
url?: string | undefined;
|
|
62
|
-
} | z.core.util.JSONType;
|
|
63
|
-
}> & {
|
|
64
|
-
slug: "customApiCall";
|
|
65
|
-
};
|
|
1
|
+
export declare const customApiCall: import("frogbot/pieces").CustomApiCallAction<Record<string, never>, import("../client.js").DropboxClient>;
|
|
66
2
|
//# sourceMappingURL=customApiCall.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customApiCall.d.ts","sourceRoot":"","sources":["../../src/actions/customApiCall.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"customApiCall.d.ts","sourceRoot":"","sources":["../../src/actions/customApiCall.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,2GAIxB,CAAC"}
|
|
@@ -1,153 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const inputSchema = z.object({
|
|
7
|
-
method: z.enum([
|
|
8
|
-
'GET',
|
|
9
|
-
'POST',
|
|
10
|
-
'PATCH',
|
|
11
|
-
'PUT',
|
|
12
|
-
'DELETE',
|
|
13
|
-
'HEAD'
|
|
14
|
-
]),
|
|
15
|
-
path: z.string().min(1),
|
|
16
|
-
headers: z.record(z.string(), z.string()).default({}),
|
|
17
|
-
query: z.record(z.string(), z.union([
|
|
18
|
-
z.string(),
|
|
19
|
-
z.number(),
|
|
20
|
-
z.boolean()
|
|
21
|
-
])).default({}),
|
|
22
|
-
body: z.discriminatedUnion('type', [
|
|
23
|
-
z.object({
|
|
24
|
-
type: z.literal('json'),
|
|
25
|
-
value: z.json()
|
|
26
|
-
}),
|
|
27
|
-
z.object({
|
|
28
|
-
type: z.literal('raw'),
|
|
29
|
-
value: z.string()
|
|
30
|
-
}),
|
|
31
|
-
z.object({
|
|
32
|
-
type: z.literal('formData'),
|
|
33
|
-
fields: z.array(z.discriminatedUnion('type', [
|
|
34
|
-
z.object({
|
|
35
|
-
type: z.literal('text'),
|
|
36
|
-
name: z.string().min(1),
|
|
37
|
-
value: z.string()
|
|
38
|
-
}),
|
|
39
|
-
z.object({
|
|
40
|
-
type: z.literal('file'),
|
|
41
|
-
name: z.string().min(1),
|
|
42
|
-
file: fileReference
|
|
43
|
-
})
|
|
44
|
-
]))
|
|
45
|
-
})
|
|
46
|
-
]).optional(),
|
|
47
|
-
responseType: z.enum([
|
|
48
|
-
'json',
|
|
49
|
-
'text',
|
|
50
|
-
'binary'
|
|
51
|
-
]).default('json'),
|
|
52
|
-
fileName: z.string().min(1).default('output.bin'),
|
|
53
|
-
failsafe: z.boolean().default(false),
|
|
54
|
-
timeoutSeconds: z.number().min(0.001).max(3600).default(30)
|
|
55
|
-
}).refine((input)=>![
|
|
56
|
-
'GET',
|
|
57
|
-
'HEAD'
|
|
58
|
-
].includes(input.method) || input.body === undefined, {
|
|
59
|
-
path: [
|
|
60
|
-
'body'
|
|
61
|
-
],
|
|
62
|
-
message: 'GET and HEAD requests cannot have a body.'
|
|
63
|
-
});
|
|
64
|
-
const outputSchema = z.object({
|
|
65
|
-
status: z.number().int(),
|
|
66
|
-
headers: z.record(z.string(), z.string()),
|
|
67
|
-
body: z.union([
|
|
68
|
-
z.json(),
|
|
69
|
-
savedFile
|
|
70
|
-
])
|
|
71
|
-
});
|
|
72
|
-
function dropboxUrl(path) {
|
|
73
|
-
let decodedPath;
|
|
74
|
-
try {
|
|
75
|
-
decodedPath = decodeURIComponent(path);
|
|
76
|
-
} catch {
|
|
77
|
-
throw new Error('[frogbot] Custom API calls require a Dropbox API URL.');
|
|
78
|
-
}
|
|
79
|
-
if (path.trim() !== path || path.includes('\\') || path.startsWith('//') || /(^|\/)\.\.(\/|$)/.test(decodedPath)) {
|
|
80
|
-
throw new Error('[frogbot] Custom API calls require a Dropbox API URL.');
|
|
81
|
-
}
|
|
82
|
-
const url = new URL(path.startsWith('/') ? path.slice(1) : path, 'https://api.dropboxapi.com/2/');
|
|
83
|
-
if (url.protocol !== 'https:' || url.hostname !== 'api.dropboxapi.com' || url.port || url.username || url.password || url.hash || !url.pathname.startsWith('/2/')) {
|
|
84
|
-
throw new Error('[frogbot] Custom API calls require a Dropbox API URL.');
|
|
85
|
-
}
|
|
86
|
-
return url;
|
|
87
|
-
}
|
|
88
|
-
export const customApiCall = defineAction({
|
|
89
|
-
slug: 'customApiCall',
|
|
90
|
-
description: 'Call a Dropbox RPC API endpoint. Redirects and credential overrides are denied.',
|
|
91
|
-
input: inputSchema,
|
|
92
|
-
output: outputSchema,
|
|
93
|
-
idempotent: false,
|
|
94
|
-
async run ({ client, input, req }) {
|
|
95
|
-
const url = dropboxUrl(input.path);
|
|
96
|
-
for (const [name, value] of Object.entries(input.query)){
|
|
97
|
-
url.searchParams.set(name, String(value));
|
|
98
|
-
}
|
|
99
|
-
const headers = new Headers(input.headers);
|
|
100
|
-
for (const name of [
|
|
101
|
-
'authorization',
|
|
102
|
-
'proxy-authorization',
|
|
103
|
-
'cookie',
|
|
104
|
-
'host'
|
|
105
|
-
]){
|
|
106
|
-
if (headers.has(name)) throw new Error(`[frogbot] Custom API header '${name}' is reserved.`);
|
|
107
|
-
}
|
|
108
|
-
let body;
|
|
109
|
-
if (input.body?.type === 'json') {
|
|
110
|
-
headers.set('content-type', 'application/json');
|
|
111
|
-
body = JSON.stringify(input.body.value);
|
|
112
|
-
} else if (input.body?.type === 'raw') {
|
|
113
|
-
body = input.body.value;
|
|
114
|
-
} else if (input.body?.type === 'formData') {
|
|
115
|
-
const form = new FormData();
|
|
116
|
-
for (const field of input.body.fields){
|
|
117
|
-
if (field.type === 'text') {
|
|
118
|
-
form.append(field.name, field.value);
|
|
119
|
-
} else {
|
|
120
|
-
const data = await loadFile({
|
|
121
|
-
req,
|
|
122
|
-
file: field.file
|
|
123
|
-
});
|
|
124
|
-
form.append(field.name, new Blob([
|
|
125
|
-
new Uint8Array(data)
|
|
126
|
-
]), field.file.name ?? 'file');
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
headers.delete('content-type');
|
|
130
|
-
body = form;
|
|
131
|
-
}
|
|
132
|
-
const response = await client.request(url.href, {
|
|
133
|
-
method: input.method,
|
|
134
|
-
headers,
|
|
135
|
-
body,
|
|
136
|
-
signal: requestSignal(req),
|
|
137
|
-
timeout: Math.ceil(input.timeoutSeconds * 1000),
|
|
138
|
-
failsafe: input.failsafe
|
|
139
|
-
});
|
|
140
|
-
const responseBody = input.responseType === 'binary' ? await saveFile({
|
|
141
|
-
req,
|
|
142
|
-
data: responseBytes(response.body),
|
|
143
|
-
name: input.fileName,
|
|
144
|
-
mimeType: response.headers['content-type']?.split(';')[0] ?? 'application/octet-stream'
|
|
145
|
-
}) : input.responseType === 'text' ? new TextDecoder().decode(responseBytes(response.body)) : response.body;
|
|
146
|
-
return outputSchema.parse({
|
|
147
|
-
...response,
|
|
148
|
-
body: responseBody
|
|
149
|
-
});
|
|
150
|
-
}
|
|
1
|
+
import { defineCustomApiCall } from '../define.js';
|
|
2
|
+
export const customApiCall = defineCustomApiCall({
|
|
3
|
+
name: 'Dropbox',
|
|
4
|
+
baseUrl: 'https://api.dropboxapi.com/2',
|
|
5
|
+
authorize: ({ client, headers })=>client.authorize(headers)
|
|
151
6
|
});
|
|
152
7
|
|
|
153
8
|
//# sourceMappingURL=customApiCall.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/actions/customApiCall.ts"],"names":["
|
|
1
|
+
{"version":3,"sources":["../../src/actions/customApiCall.ts"],"names":["defineCustomApiCall","customApiCall","name","baseUrl","authorize","client","headers"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,eAAe;AAEnD,OAAO,MAAMC,gBAAgBD,oBAAoB;IAC/CE,MAAM;IACNC,SAAS;IACTC,WAAW,CAAC,EAAEC,MAAM,EAAEC,OAAO,EAAE,GAAKD,OAAOD,SAAS,CAACE;AACvD,GAAG","file":"customApiCall.js"}
|
package/dist/actions/list.d.ts
CHANGED
|
@@ -66,8 +66,8 @@ export declare const searchFiles: import("frogbot").PieceActionDefinition<z.ZodO
|
|
|
66
66
|
modified_time: "modified_time";
|
|
67
67
|
}>>;
|
|
68
68
|
fileStatus: z.ZodDefault<z.ZodEnum<{
|
|
69
|
-
deleted: "deleted";
|
|
70
69
|
active: "active";
|
|
70
|
+
deleted: "deleted";
|
|
71
71
|
}>>;
|
|
72
72
|
filenameOnly: z.ZodDefault<z.ZodBoolean>;
|
|
73
73
|
fileExtensions: z.ZodOptional<z.ZodString>;
|
package/dist/client.d.ts
CHANGED
|
@@ -10,8 +10,6 @@ type RequestOptions = {
|
|
|
10
10
|
headers?: HeadersInit;
|
|
11
11
|
body?: BodyInit;
|
|
12
12
|
signal?: AbortSignal;
|
|
13
|
-
timeout?: number;
|
|
14
|
-
failsafe?: boolean;
|
|
15
13
|
};
|
|
16
14
|
export type DropboxResponse = {
|
|
17
15
|
status: number;
|
|
@@ -22,6 +20,7 @@ export declare class DropboxClient {
|
|
|
22
20
|
readonly accessToken: string;
|
|
23
21
|
constructor(auth: DropboxAuth);
|
|
24
22
|
request(path: string, options?: RequestOptions): Promise<DropboxResponse>;
|
|
23
|
+
authorize(headers: Headers): void;
|
|
25
24
|
rpc<T>(path: string, body: unknown, schema: z.ZodType<T>, signal?: AbortSignal): Promise<T>;
|
|
26
25
|
content<T>({ path, args, body, schema, signal, }: {
|
|
27
26
|
path: string;
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,WAAW;;;iBAGtB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,WAAW,CAAC,CAAC;AAEvD,KAAK,cAAc,GAAG;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,MAAM,CAAC,EAAE,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,WAAW;;;iBAGtB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,WAAW,CAAC,CAAC;AAEvD,KAAK,cAAc,GAAG;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB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this.accessToken = auth.accessToken;
|
|
21
21
|
}
|
|
22
22
|
async request(path, options = {}) {
|
|
23
|
-
const timeout = AbortSignal.timeout(
|
|
23
|
+
const timeout = AbortSignal.timeout(30_000);
|
|
24
24
|
const signal = options.signal ? AbortSignal.any([
|
|
25
25
|
options.signal,
|
|
26
26
|
timeout
|
|
27
27
|
]) : timeout;
|
|
28
28
|
const headers = new Headers(options.headers);
|
|
29
|
-
|
|
29
|
+
this.authorize(headers);
|
|
30
30
|
signal.throwIfAborted();
|
|
31
31
|
const response = await fetch(path, {
|
|
32
32
|
method: options.method ?? 'POST',
|
|
@@ -37,13 +37,16 @@ export class DropboxClient {
|
|
|
37
37
|
});
|
|
38
38
|
const contentType = response.headers.get('content-type') ?? '';
|
|
39
39
|
const body = contentType.includes('application/json') ? await response.json() : await response.arrayBuffer();
|
|
40
|
-
if (!response.ok
|
|
40
|
+
if (!response.ok) throw new Error(errorMessage(body, response.status));
|
|
41
41
|
return {
|
|
42
42
|
status: response.status,
|
|
43
43
|
headers: Object.fromEntries(response.headers.entries()),
|
|
44
44
|
body
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
+
authorize(headers) {
|
|
48
|
+
headers.set('authorization', `Bearer ${this.accessToken}`);
|
|
49
|
+
}
|
|
47
50
|
async rpc(path, body, schema, signal) {
|
|
48
51
|
const response = await this.request(`https://api.dropboxapi.com/2/${path}`, {
|
|
49
52
|
headers: {
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/client.ts"],"names":["z","dropboxAuth","object","accessToken","string","min","meta","secret","refreshToken","optional","errorMessage","body","status","summary","error_summary","DropboxClient","auth","request","path","options","timeout","AbortSignal","signal","any","headers","Headers","
|
|
1
|
+
{"version":3,"sources":["../src/client.ts"],"names":["z","dropboxAuth","object","accessToken","string","min","meta","secret","refreshToken","optional","errorMessage","body","status","summary","error_summary","DropboxClient","auth","request","path","options","timeout","AbortSignal","signal","any","headers","Headers","authorize","throwIfAborted","response","fetch","method","redirect","contentType","get","includes","json","arrayBuffer","ok","Error","Object","fromEntries","entries","set","rpc","schema","JSON","stringify","parse","content","args","asciiJson","value","replace","character","charCodeAt","toString","padStart","createDropboxClient","requestSignal","req","undefined"],"mappings":"AACA,SAASA,CAAC,QAAQ,MAAM;AAExB,OAAO,MAAMC,cAAcD,EAAEE,MAAM,CAAC;IAClCC,aAAaH,EAAEI,MAAM,GAAGC,GAAG,CAAC,GAAGC,IAAI,CAAC;QAAEC,QAAQ;IAAK;IACnDC,cAAcR,EAAEI,MAAM,GAAGC,GAAG,CAAC,GAAGI,QAAQ,GAAGH,IAAI,CAAC;QAAEC,QAAQ;IAAK;AACjE,GAAG;AAiBH,SAASG,aAAaC,IAAa,EAAEC,MAAc;IACjD,IAAID,QAAQ,OAAOA,SAAS,YAAY,mBAAmBA,MAAM;QAC/D,MAAME,UAAUF,KAAKG,aAAa;QAElC,IAAI,OAAOD,YAAY,UAAU,OAAOA;IAC1C;IAEA,OAAO,CAAC,wBAAwB,EAAED,OAAO,EAAE,CAAC;AAC9C;AAEA,OAAO,MAAMG;IACFZ,YAAoB;IAE7B,YAAYa,IAAiB,CAAE;QAC7B,IAAI,CAACb,WAAW,GAAGa,KAAKb,WAAW;IACrC;IAEA,MAAMc,QAAQC,IAAY,EAAEC,UAA0B,CAAC,CAAC,EAA4B;QAClF,MAAMC,UAAUC,YAAYD,OAAO,CAAC;QACpC,MAAME,SAASH,QAAQG,MAAM,GAAGD,YAAYE,GAAG,CAAC;YAACJ,QAAQG,MAAM;YAAEF;SAAQ,IAAIA;QAC7E,MAAMI,UAAU,IAAIC,QAAQN,QAAQK,OAAO;QAE3C,IAAI,CAACE,SAAS,CAACF;QACfF,OAAOK,cAAc;QAErB,MAAMC,WAAW,MAAMC,MAAMX,MAAM;YACjCY,QAAQX,QAAQW,MAAM,IAAI;YAC1BN;YACAb,MAAMQ,QAAQR,IAAI;YAClBoB,UAAU;YACVT;QACF;QAEA,MAAMU,c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AC,GAAGC,QAAQ,CAAC,IAAIC,QAAQ,CAAC,GAAG,MAAM;IACtE;AACF;AAEA,OAAO,SAASC,oBAAoB,EAAEzC,IAAI,EAAqB;IAC7D,OAAO,IAAID,cAAcd,YAAY8C,KAAK,CAAC/B;AAC7C;AAEA,OAAO,SAAS0C,cAAcC,GAAmB;IAC/CA,IAAIrC,MAAM,EAAEK;IAEZ,OAAOgC,IAAIrC,MAAM,IAAIsC;AACvB","file":"client.js"}
|
package/dist/define.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare const defineAction: <const TSlug extends string, TInput extends i
|
|
|
3
3
|
slug: TSlug;
|
|
4
4
|
} : never) => import("frogbot").PieceActionDefinition<TInput, TOutput, Record<string, never>, DropboxClient, TOutput extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? import("zod").infer<TOutput> : TResult> & {
|
|
5
5
|
slug: TSlug;
|
|
6
|
-
}, definePollingTrigger: <const TSlug extends string, TInput extends import("zod").ZodType, TOutput extends import("zod").ZodType | undefined = undefined>(trigger: TOutput extends unknown ? {
|
|
6
|
+
}, defineCustomApiCall: (config: import("frogbot/pieces").CustomApiCallConfig<DropboxClient>) => import("frogbot/pieces").CustomApiCallAction<Record<string, never>, DropboxClient>, definePollingTrigger: <const TSlug extends string, TInput extends import("zod").ZodType, TOutput extends import("zod").ZodType | undefined = undefined>(trigger: TOutput extends unknown ? {
|
|
7
7
|
slug: string;
|
|
8
8
|
label?: string;
|
|
9
9
|
description: string;
|
package/dist/define.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,eAAO,MAAQ,YAAY;;;;GAAE,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,eAAO,MAAQ,YAAY;;;;GAAE,mBAAmB,+JAAE,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACjC,CAAC"}
|
package/dist/define.js
CHANGED
package/dist/define.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/define.ts"],"names":["createPieceHelpers","defineAction","definePollingTrigger"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,iBAAiB;AAIpD,OAAO,MAAM,EAAEC,YAAY,EAAEC,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"sources":["../src/define.ts"],"names":["createPieceHelpers","defineAction","defineCustomApiCall","definePollingTrigger"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,iBAAiB;AAIpD,OAAO,MAAM,EAAEC,YAAY,EAAEC,mBAAmB,EAAEC,oBAAoB,EAAE,GACtEH,qBAAoC","file":"define.js"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,11 +3,46 @@ import { createDropboxClient, type DropboxClient } from './client.js';
|
|
|
3
3
|
export type { DropboxAuth, DropboxClient } from './client.js';
|
|
4
4
|
export { dropboxAuth } from './client.js';
|
|
5
5
|
export declare const dropboxActions: string[];
|
|
6
|
-
export declare const dropboxScopes:
|
|
6
|
+
export declare const dropboxScopes: {
|
|
7
|
+
readonly 'account_info.read': "account_info.read";
|
|
8
|
+
readonly 'account_info.write': "account_info.write";
|
|
9
|
+
readonly 'files.metadata.read': "files.metadata.read";
|
|
10
|
+
readonly 'files.metadata.write': "files.metadata.write";
|
|
11
|
+
readonly 'files.content.read': "files.content.read";
|
|
12
|
+
readonly 'files.content.write': "files.content.write";
|
|
13
|
+
readonly 'file_requests.read': "file_requests.read";
|
|
14
|
+
readonly 'file_requests.write': "file_requests.write";
|
|
15
|
+
readonly 'sharing.read': "sharing.read";
|
|
16
|
+
readonly 'sharing.write': "sharing.write";
|
|
17
|
+
readonly 'contacts.read': "contacts.read";
|
|
18
|
+
readonly 'contacts.write': "contacts.write";
|
|
19
|
+
readonly openid: "openid";
|
|
20
|
+
readonly email: "email";
|
|
21
|
+
readonly profile: "profile";
|
|
22
|
+
};
|
|
7
23
|
export declare const dropboxOAuth: {
|
|
8
24
|
authorizationUrl: string;
|
|
9
25
|
tokenUrl: string;
|
|
10
|
-
scopes:
|
|
26
|
+
scopes: {
|
|
27
|
+
catalog: {
|
|
28
|
+
readonly 'account_info.read': "account_info.read";
|
|
29
|
+
readonly 'account_info.write': "account_info.write";
|
|
30
|
+
readonly 'files.metadata.read': "files.metadata.read";
|
|
31
|
+
readonly 'files.metadata.write': "files.metadata.write";
|
|
32
|
+
readonly 'files.content.read': "files.content.read";
|
|
33
|
+
readonly 'files.content.write': "files.content.write";
|
|
34
|
+
readonly 'file_requests.read': "file_requests.read";
|
|
35
|
+
readonly 'file_requests.write': "file_requests.write";
|
|
36
|
+
readonly 'sharing.read': "sharing.read";
|
|
37
|
+
readonly 'sharing.write': "sharing.write";
|
|
38
|
+
readonly 'contacts.read': "contacts.read";
|
|
39
|
+
readonly 'contacts.write': "contacts.write";
|
|
40
|
+
readonly openid: "openid";
|
|
41
|
+
readonly email: "email";
|
|
42
|
+
readonly profile: "profile";
|
|
43
|
+
};
|
|
44
|
+
defaults: ("files.metadata.read" | "files.metadata.write" | "files.content.read" | "files.content.write")[];
|
|
45
|
+
};
|
|
11
46
|
pkce: true;
|
|
12
47
|
params: {
|
|
13
48
|
token_access_type: string;
|
|
@@ -43,7 +78,26 @@ export declare const createDropbox: import("frogbot").PieceFactory<{
|
|
|
43
78
|
readonly oauth: {
|
|
44
79
|
authorizationUrl: string;
|
|
45
80
|
tokenUrl: string;
|
|
46
|
-
scopes:
|
|
81
|
+
scopes: {
|
|
82
|
+
catalog: {
|
|
83
|
+
readonly 'account_info.read': "account_info.read";
|
|
84
|
+
readonly 'account_info.write': "account_info.write";
|
|
85
|
+
readonly 'files.metadata.read': "files.metadata.read";
|
|
86
|
+
readonly 'files.metadata.write': "files.metadata.write";
|
|
87
|
+
readonly 'files.content.read': "files.content.read";
|
|
88
|
+
readonly 'files.content.write': "files.content.write";
|
|
89
|
+
readonly 'file_requests.read': "file_requests.read";
|
|
90
|
+
readonly 'file_requests.write': "file_requests.write";
|
|
91
|
+
readonly 'sharing.read': "sharing.read";
|
|
92
|
+
readonly 'sharing.write': "sharing.write";
|
|
93
|
+
readonly 'contacts.read': "contacts.read";
|
|
94
|
+
readonly 'contacts.write': "contacts.write";
|
|
95
|
+
readonly openid: "openid";
|
|
96
|
+
readonly email: "email";
|
|
97
|
+
readonly profile: "profile";
|
|
98
|
+
};
|
|
99
|
+
defaults: ("files.metadata.read" | "files.metadata.write" | "files.content.read" | "files.content.write")[];
|
|
100
|
+
};
|
|
47
101
|
pkce: true;
|
|
48
102
|
params: {
|
|
49
103
|
token_access_type: string;
|
|
@@ -73,8 +127,8 @@ export declare const createDropbox: import("frogbot").PieceFactory<{
|
|
|
73
127
|
modified_time: "modified_time";
|
|
74
128
|
}>>;
|
|
75
129
|
fileStatus: z.ZodDefault<z.ZodEnum<{
|
|
76
|
-
deleted: "deleted";
|
|
77
130
|
active: "active";
|
|
131
|
+
deleted: "deleted";
|
|
78
132
|
}>>;
|
|
79
133
|
filenameOnly: z.ZodDefault<z.ZodBoolean>;
|
|
80
134
|
fileExtensions: z.ZodOptional<z.ZodString>;
|
|
@@ -831,70 +885,7 @@ export declare const createDropbox: import("frogbot").PieceFactory<{
|
|
|
831
885
|
cursor: string;
|
|
832
886
|
}> & {
|
|
833
887
|
slug: "listFolder";
|
|
834
|
-
}, import("frogbot").
|
|
835
|
-
method: z.ZodEnum<{
|
|
836
|
-
POST: "POST";
|
|
837
|
-
GET: "GET";
|
|
838
|
-
PATCH: "PATCH";
|
|
839
|
-
PUT: "PUT";
|
|
840
|
-
DELETE: "DELETE";
|
|
841
|
-
HEAD: "HEAD";
|
|
842
|
-
}>;
|
|
843
|
-
path: z.ZodString;
|
|
844
|
-
headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
845
|
-
query: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
846
|
-
body: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
847
|
-
type: z.ZodLiteral<"json">;
|
|
848
|
-
value: z.ZodJSONSchema;
|
|
849
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
850
|
-
type: z.ZodLiteral<"raw">;
|
|
851
|
-
value: z.ZodString;
|
|
852
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
853
|
-
type: z.ZodLiteral<"formData">;
|
|
854
|
-
fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
855
|
-
type: z.ZodLiteral<"text">;
|
|
856
|
-
name: z.ZodString;
|
|
857
|
-
value: z.ZodString;
|
|
858
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
859
|
-
type: z.ZodLiteral<"file">;
|
|
860
|
-
name: z.ZodString;
|
|
861
|
-
file: z.ZodObject<{
|
|
862
|
-
fileId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
863
|
-
name: z.ZodOptional<z.ZodString>;
|
|
864
|
-
}, z.core.$strip>;
|
|
865
|
-
}, z.core.$strip>], "type">>;
|
|
866
|
-
}, z.core.$strip>], "type">>;
|
|
867
|
-
responseType: z.ZodDefault<z.ZodEnum<{
|
|
868
|
-
json: "json";
|
|
869
|
-
text: "text";
|
|
870
|
-
binary: "binary";
|
|
871
|
-
}>>;
|
|
872
|
-
fileName: z.ZodDefault<z.ZodString>;
|
|
873
|
-
failsafe: z.ZodDefault<z.ZodBoolean>;
|
|
874
|
-
timeoutSeconds: z.ZodDefault<z.ZodNumber>;
|
|
875
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
876
|
-
status: z.ZodNumber;
|
|
877
|
-
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
878
|
-
body: z.ZodUnion<readonly [z.ZodJSONSchema, z.ZodObject<{
|
|
879
|
-
id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
880
|
-
name: z.ZodString;
|
|
881
|
-
mimeType: z.ZodString;
|
|
882
|
-
size: z.ZodNumber;
|
|
883
|
-
url: z.ZodOptional<z.ZodString>;
|
|
884
|
-
}, z.core.$strip>]>;
|
|
885
|
-
}, z.core.$strip>, Record<string, never>, DropboxClient, {
|
|
886
|
-
status: number;
|
|
887
|
-
headers: Record<string, string>;
|
|
888
|
-
body: {
|
|
889
|
-
id: string | number;
|
|
890
|
-
name: string;
|
|
891
|
-
mimeType: string;
|
|
892
|
-
size: number;
|
|
893
|
-
url?: string | undefined;
|
|
894
|
-
} | z.core.util.JSONType;
|
|
895
|
-
}> & {
|
|
896
|
-
slug: "customApiCall";
|
|
897
|
-
}];
|
|
888
|
+
}, import("frogbot/pieces").CustomApiCallAction<Record<string, never>, DropboxClient>];
|
|
898
889
|
readonly triggers: readonly [{
|
|
899
890
|
slug: string;
|
|
900
891
|
label?: string;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,OAAO,EACL,mBAAmB,EAGnB,KAAK,aAAa,EACnB,MAAM,aAAa,CAAC;AAGrB,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,eAAO,MAAM,cAAc,UAe1B,CAAC;AACF,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BxB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -22,12 +22,23 @@ export const dropboxActions = [
|
|
|
22
22
|
'listFolder',
|
|
23
23
|
'customApiCall'
|
|
24
24
|
];
|
|
25
|
-
export const dropboxScopes =
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
'files.
|
|
29
|
-
'files.
|
|
30
|
-
|
|
25
|
+
export const dropboxScopes = {
|
|
26
|
+
'account_info.read': 'account_info.read',
|
|
27
|
+
'account_info.write': 'account_info.write',
|
|
28
|
+
'files.metadata.read': 'files.metadata.read',
|
|
29
|
+
'files.metadata.write': 'files.metadata.write',
|
|
30
|
+
'files.content.read': 'files.content.read',
|
|
31
|
+
'files.content.write': 'files.content.write',
|
|
32
|
+
'file_requests.read': 'file_requests.read',
|
|
33
|
+
'file_requests.write': 'file_requests.write',
|
|
34
|
+
'sharing.read': 'sharing.read',
|
|
35
|
+
'sharing.write': 'sharing.write',
|
|
36
|
+
'contacts.read': 'contacts.read',
|
|
37
|
+
'contacts.write': 'contacts.write',
|
|
38
|
+
openid: 'openid',
|
|
39
|
+
email: 'email',
|
|
40
|
+
profile: 'profile'
|
|
41
|
+
};
|
|
31
42
|
const accountSchema = z.object({
|
|
32
43
|
account_id: z.string().min(1),
|
|
33
44
|
name: z.object({
|
|
@@ -38,7 +49,15 @@ const accountSchema = z.object({
|
|
|
38
49
|
export const dropboxOAuth = {
|
|
39
50
|
authorizationUrl: 'https://www.dropbox.com/oauth2/authorize',
|
|
40
51
|
tokenUrl: 'https://api.dropboxapi.com/oauth2/token',
|
|
41
|
-
scopes:
|
|
52
|
+
scopes: {
|
|
53
|
+
catalog: dropboxScopes,
|
|
54
|
+
defaults: [
|
|
55
|
+
'files.metadata.write',
|
|
56
|
+
'files.metadata.read',
|
|
57
|
+
'files.content.write',
|
|
58
|
+
'files.content.read'
|
|
59
|
+
]
|
|
60
|
+
},
|
|
42
61
|
pkce: true,
|
|
43
62
|
params: {
|
|
44
63
|
token_access_type: 'offline'
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":["definePiece","z","customApiCall","copyFile","copyFolder","createFolder","createTextFile","deleteFile","deleteFolder","downloadFile","getTemporaryLink","moveFile","moveFolder","uploadFile","listFolder","searchFiles","createDropboxClient","dropboxAuth","newFolder","dropboxActions","dropboxScopes","accountSchema","object","account_id","string","min","name","display_name","
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":["definePiece","z","customApiCall","copyFile","copyFolder","createFolder","createTextFile","deleteFile","deleteFolder","downloadFile","getTemporaryLink","moveFile","moveFolder","uploadFile","listFolder","searchFiles","createDropboxClient","dropboxAuth","newFolder","dropboxActions","dropboxScopes","openid","email","profile","accountSchema","object","account_id","string","min","name","display_name","dropboxOAuth","authorizationUrl","tokenUrl","scopes","catalog","defaults","pkce","params","token_access_type","toAuth","tokens","accessToken","access_token","refreshToken","refresh_token","account","client","req","rpc","signal","undefined","id","label","createDropbox","slug","admin","description","group","auth","oauth","actions","triggers"],"mappings":"AAAA,SAASA,WAAW,QAAuD,iBAAiB;AAC5F,SAASC,CAAC,QAAQ,MAAM;AAExB,SAASC,aAAa,QAAQ,6BAA6B;AAC3D,SACEC,QAAQ,EACRC,UAAU,EACVC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,YAAY,EACZC,YAAY,EACZC,gBAAgB,EAChBC,QAAQ,EACRC,UAAU,EACVC,UAAU,QACL,qBAAqB;AAC5B,SAASC,UAAU,EAAEC,WAAW,QAAQ,oBAAoB;AAC5D,SACEC,mBAAmB,EAEnBC,WAAW,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1F;AACF,EAKE;AAEF,OAAO,MAAMgC,gBAAgBtD,YAAY;IACvCuD,MAAM;IACNF,OAAO;IACPG,OAAO;QACLC,aAAa;QACbC,OAAO;IACT;IACAC,MAAM1C;IACN8B,QAAQ/B;IACR4C,OAAO7B;IACP8B,SAAS;QACP9C;QACAT;QACAO;QACAJ;QACAC;QACAH;QACAI;QACAR;QACAE;QACAG;QACAI;QACAR;QACAU;QACAZ;KACD;IACD4D,UAAU;QAAC5C;KAAU;AACvB,GAAG","file":"index.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frogbotai/piece-dropbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"description": "Dropbox tools for FrogBot.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Colby Gilbert",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"frogbot": "0.
|
|
25
|
+
"frogbot": "0.32.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"typescript": "5.6.2",
|
|
29
|
-
"frogbot": "0.
|
|
29
|
+
"frogbot": "0.32.0"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|