@activepieces/piece-dropbox 0.7.2 → 0.7.4

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 (65) hide show
  1. package/package.json +7 -12
  2. package/src/index.js +13 -63
  3. package/src/index.d.ts +0 -2
  4. package/src/index.d.ts.map +0 -1
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/copy-file.d.ts +0 -7
  7. package/src/lib/actions/copy-file.d.ts.map +0 -1
  8. package/src/lib/actions/copy-file.js +0 -63
  9. package/src/lib/actions/copy-file.js.map +0 -1
  10. package/src/lib/actions/copy-folder.d.ts +0 -7
  11. package/src/lib/actions/copy-folder.d.ts.map +0 -1
  12. package/src/lib/actions/copy-folder.js +0 -63
  13. package/src/lib/actions/copy-folder.js.map +0 -1
  14. package/src/lib/actions/create-new-folder.d.ts +0 -5
  15. package/src/lib/actions/create-new-folder.d.ts.map +0 -1
  16. package/src/lib/actions/create-new-folder.js +0 -53
  17. package/src/lib/actions/create-new-folder.js.map +0 -1
  18. package/src/lib/actions/create-new-text-file.d.ts +0 -8
  19. package/src/lib/actions/create-new-text-file.d.ts.map +0 -1
  20. package/src/lib/actions/create-new-text-file.js +0 -75
  21. package/src/lib/actions/create-new-text-file.js.map +0 -1
  22. package/src/lib/actions/delete-file.d.ts +0 -4
  23. package/src/lib/actions/delete-file.d.ts.map +0 -1
  24. package/src/lib/actions/delete-file.js +0 -43
  25. package/src/lib/actions/delete-file.js.map +0 -1
  26. package/src/lib/actions/delete-folder.d.ts +0 -4
  27. package/src/lib/actions/delete-folder.d.ts.map +0 -1
  28. package/src/lib/actions/delete-folder.js +0 -43
  29. package/src/lib/actions/delete-folder.js.map +0 -1
  30. package/src/lib/actions/download-file.d.ts +0 -4
  31. package/src/lib/actions/download-file.d.ts.map +0 -1
  32. package/src/lib/actions/download-file.js +0 -51
  33. package/src/lib/actions/download-file.js.map +0 -1
  34. package/src/lib/actions/get-file-link.d.ts +0 -4
  35. package/src/lib/actions/get-file-link.d.ts.map +0 -1
  36. package/src/lib/actions/get-file-link.js +0 -43
  37. package/src/lib/actions/get-file-link.js.map +0 -1
  38. package/src/lib/actions/list-a-folder.d.ts +0 -6
  39. package/src/lib/actions/list-a-folder.d.ts.map +0 -1
  40. package/src/lib/actions/list-a-folder.js +0 -56
  41. package/src/lib/actions/list-a-folder.js.map +0 -1
  42. package/src/lib/actions/move-file.d.ts +0 -7
  43. package/src/lib/actions/move-file.d.ts.map +0 -1
  44. package/src/lib/actions/move-file.js +0 -63
  45. package/src/lib/actions/move-file.js.map +0 -1
  46. package/src/lib/actions/move-folder.d.ts +0 -7
  47. package/src/lib/actions/move-folder.d.ts.map +0 -1
  48. package/src/lib/actions/move-folder.js +0 -63
  49. package/src/lib/actions/move-folder.js.map +0 -1
  50. package/src/lib/actions/search.d.ts +0 -12
  51. package/src/lib/actions/search.d.ts.map +0 -1
  52. package/src/lib/actions/search.js +0 -112
  53. package/src/lib/actions/search.js.map +0 -1
  54. package/src/lib/actions/upload-file.d.ts +0 -8
  55. package/src/lib/actions/upload-file.d.ts.map +0 -1
  56. package/src/lib/actions/upload-file.js +0 -73
  57. package/src/lib/actions/upload-file.js.map +0 -1
  58. package/src/lib/auth.d.ts +0 -2
  59. package/src/lib/auth.d.ts.map +0 -1
  60. package/src/lib/auth.js +0 -19
  61. package/src/lib/auth.js.map +0 -1
  62. package/src/lib/triggers/new-folder.d.ts +0 -15
  63. package/src/lib/triggers/new-folder.d.ts.map +0 -1
  64. package/src/lib/triggers/new-folder.js +0 -112
  65. package/src/lib/triggers/new-folder.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"copy-folder.js","sourceRoot":"","sources":["../../../../src/lib/actions/copy-folder.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,kCAAsC;AAEzB,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,kBAAW;IACjB,IAAI,EAAE,qB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c,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY;iBACjC;aACF,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC,IAAI,CAAC;QACrB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare const dropboxCreateNewFolder: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
- path: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- autorename: import("@activepieces/pieces-framework").CheckboxProperty<false>;
4
- }>;
5
- //# sourceMappingURL=create-new-folder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-new-folder.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-new-folder.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,sBAAsB;;;EA6CjC,CAAC"}
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dropboxCreateNewFolder = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const auth_1 = require("../auth");
8
- exports.dropboxCreateNewFolder = (0, pieces_framework_1.createAction)({
9
- auth: auth_1.dropboxAuth,
10
- name: 'create_new_dropbox_folder',
11
- description: 'Create a new empty folder',
12
- audience: 'both',
13
- aiMetadata: { description: 'Creates a new empty folder at the given Dropbox path; optionally autorenames on conflict. Use to set up a destination directory before placing files. Not idempotent: a repeat call for an existing path errors (or, with autorename, creates a differently named folder).', idempotent: false },
14
- displayName: 'Create New Folder',
15
- props: {
16
- path: pieces_framework_1.Property.ShortText({
17
- displayName: 'Path',
18
- description: 'The path of the new folder e.g. /Homework/math',
19
- required: true,
20
- }),
21
- autorename: pieces_framework_1.Property.Checkbox({
22
- displayName: 'Auto Rename',
23
- description: "If there's a conflict, have the Dropbox server try to autorename the folder to avoid the conflict. The default for this field is False.",
24
- required: false,
25
- }),
26
- },
27
- run(context) {
28
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
29
- const body = {
30
- autorename: context.propsValue.autorename ? true : false,
31
- path: context.propsValue.path,
32
- };
33
- const request = {
34
- method: pieces_common_1.HttpMethod.POST,
35
- url: `https://api.dropboxapi.com/2/files/create_folder_v2`,
36
- body,
37
- authentication: {
38
- type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
39
- token: context.auth.access_token,
40
- },
41
- };
42
- const result = yield pieces_common_1.httpClient.sendRequest(request);
43
- console.debug('Folder creation response', result);
44
- if (result.status == 200) {
45
- return result.body;
46
- }
47
- else {
48
- return result;
49
- }
50
- });
51
- },
52
- });
53
- //# sourceMappingURL=create-new-folder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-new-folder.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-new-folder.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAKqC;AACrC,kCAAsC;AAEzB,QAAA,sBAAsB,GAAG,IAAA,+BAAY,EAAC;IACjD,IAAI,EAAE,kBAAW;IACjB,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE,2BAA2B;IACxC,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,4QAA4Q,EAAE,UAAU,EAAE,KAAK,EAAE;IAC5T,WAAW,EAAE,mBAAmB;IAChC,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,gDAAgD;YAC7D,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC5B,WAAW,EAAE,aAAa;YAC1B,WAAW,EACT,yIAAyI;YAC3I,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,IAAI,GAAG;gBACX,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;gBACxD,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;aAC9B,CAAC;YAEF,MAAM,OAAO,GAAgB;gBAC3B,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,qDAAqD;gBAC1D,IAAI;gBACJ,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY;iBACjC;aACF,CAAC;YAEF,MAAM,MAAM,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;YACrD,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,MAAM,CAAC,CAAC;YAElD,IAAI,MAAM,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;gBACzB,OAAO,MAAM,CAAC,IAAI,CAAC;YACrB,CAAC;iBAAM,CAAC;gBACN,OAAO,MAAM,CAAC;YAChB,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,8 +0,0 @@
1
- export declare const dropboxCreateNewTextFile: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
- path: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- text: import("@activepieces/pieces-framework").LongTextProperty<true>;
4
- autorename: import("@activepieces/pieces-framework").CheckboxProperty<false>;
5
- mute: import("@activepieces/pieces-framework").CheckboxProperty<false>;
6
- strict_conflict: import("@activepieces/pieces-framework").CheckboxProperty<false>;
7
- }>;
8
- //# sourceMappingURL=create-new-text-file.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-new-text-file.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-new-text-file.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,wBAAwB;;;;;;EAqEnC,CAAC"}
@@ -1,75 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dropboxCreateNewTextFile = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const auth_1 = require("../auth");
8
- exports.dropboxCreateNewTextFile = (0, pieces_framework_1.createAction)({
9
- auth: auth_1.dropboxAuth,
10
- name: 'create_new_dropbox_text_file',
11
- description: 'Create a new text file from text input',
12
- audience: 'both',
13
- aiMetadata: { description: 'Writes the provided text content to a new file at the given Dropbox path (upload in add mode). Use when an agent needs to persist generated or supplied text directly as a file without first producing a file object. Not idempotent: each call uploads, so repeating it can create autorenamed duplicates rather than overwriting.', idempotent: false },
14
- displayName: 'Create New Text File',
15
- props: {
16
- path: pieces_framework_1.Property.ShortText({
17
- displayName: 'Path',
18
- description: 'The path of the new folder e.g. /Homework/math',
19
- required: true,
20
- }),
21
- text: pieces_framework_1.Property.LongText({
22
- displayName: 'Text',
23
- description: 'The text to write into the file.',
24
- required: true,
25
- }),
26
- autorename: pieces_framework_1.Property.Checkbox({
27
- displayName: 'Autorename',
28
- description: "If there's a conflict, have the Dropbox server try to autorename the folder to avoid the conflict. The default for this field is False.",
29
- required: false,
30
- }),
31
- mute: pieces_framework_1.Property.Checkbox({
32
- displayName: 'Mute',
33
- description: "Normally, users are made aware of any file modifications in their Dropbox account via notifications in the client software. If true, this tells the clients that this modification shouldn't result in a user notification.",
34
- required: false,
35
- }),
36
- strict_conflict: pieces_framework_1.Property.Checkbox({
37
- displayName: 'Strict conflict',
38
- description: 'Be more strict about how each WriteMode detects conflict. For example, always return a conflict error when mode = WriteMode.update and the given "rev" doesn\'t match the existing file\'s "rev", even if the existing file has been deleted.',
39
- required: false,
40
- }),
41
- },
42
- run(context) {
43
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
44
- const params = {
45
- autorename: context.propsValue.autorename,
46
- path: context.propsValue.path,
47
- mode: 'add',
48
- mute: context.propsValue.mute,
49
- strict_conflict: context.propsValue.strict_conflict,
50
- };
51
- const request = {
52
- method: pieces_common_1.HttpMethod.POST,
53
- url: `https://content.dropboxapi.com/2/files/upload`,
54
- body: Buffer.from(context.propsValue.text, 'utf-8'),
55
- authentication: {
56
- type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
57
- token: context.auth.access_token,
58
- },
59
- headers: {
60
- 'Dropbox-API-Arg': JSON.stringify(params),
61
- 'Content-Type': 'application/octet-stream',
62
- },
63
- };
64
- const result = yield pieces_common_1.httpClient.sendRequest(request);
65
- console.debug('Folder creation response', result);
66
- if (result.status == 200) {
67
- return result.body;
68
- }
69
- else {
70
- return result;
71
- }
72
- });
73
- },
74
- });
75
- //# sourceMappingURL=create-new-text-file.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-new-text-file.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-new-text-file.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAKqC;AACrC,kCAAsC;AAEzB,QAAA,wBAAwB,GAAG,IAAA,+BAAY,EAAC;IACnD,IAAI,EAAE,kBAAW;IACjB,IAAI,EAAE,8BAA8B;IACpC,WAAW,EAAE,wCAAwC;IACrD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,sUAAsU,EAAE,UAAU,EAAE,KAAK,EAAE;IACtX,WAAW,EAAE,sBAAsB;IACnC,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,gDAAgD;YAC7D,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,kCAAkC;YAC/C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,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AC,MAAM,IAAI,GAAG,EAAE,CAAC;gBACzB,OAAO,MAAM,CAAC,IAAI,CAAC;YACrB,CAAC;iBAAM,CAAC;gBACN,OAAO,MAAM,CAAC;YAChB,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare const dropboxDeleteFile: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
- path: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- }>;
4
- //# sourceMappingURL=delete-file.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete-file.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/delete-file.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,iBAAiB;;EAmC5B,CAAC"}
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dropboxDeleteFile = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const auth_1 = require("../auth");
8
- exports.dropboxDeleteFile = (0, pieces_framework_1.createAction)({
9
- auth: auth_1.dropboxAuth,
10
- name: 'delete_dropbox_file',
11
- description: 'Delete a file',
12
- audience: 'both',
13
- aiMetadata: { description: 'Permanently deletes the file at the given Dropbox path. Use to remove a specific file an agent has resolved the path for. Effectively idempotent on the end state once the path is gone, but a repeat call fails because the path no longer exists; treat as a destructive, non-recoverable mutation.', idempotent: false },
14
- displayName: 'Delete file',
15
- props: {
16
- path: pieces_framework_1.Property.ShortText({
17
- displayName: 'Path',
18
- description: 'The path of the file to be deleted (e.g. /folder1/file.txt)',
19
- required: true,
20
- }),
21
- },
22
- run(context) {
23
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
24
- const params = {
25
- path: context.propsValue.path,
26
- };
27
- const result = yield pieces_common_1.httpClient.sendRequest({
28
- method: pieces_common_1.HttpMethod.POST,
29
- url: `https://api.dropboxapi.com/2/files/delete_v2`,
30
- headers: {
31
- 'Content-Type': 'application/json',
32
- },
33
- body: { path: context.propsValue.path },
34
- authentication: {
35
- type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
36
- token: context.auth.access_token,
37
- },
38
- });
39
- return result.body;
40
- });
41
- },
42
- });
43
- //# sourceMappingURL=delete-file.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete-file.js","sourceRoot":"","sources":["../../../../src/lib/actions/delete-file.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,kCAAsC;AAEzB,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,kBAAW;IACjB,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,eAAe;IAC5B,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,uSAAuS,EAAE,UAAU,EAAE,KAAK,EAAE;IACvV,WAAW,EAAE,aAAa;IAC1B,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,WAAW,EACT,6DAA6D;YAC/D,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,MAAM,GAAG;gBACb,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;aAC9B,CAAC;YAEF,MAAM,MAAM,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC1C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,8CAA8C;gBACnD,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE;gBACvC,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY;iBACjC;aACF,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC,IAAI,CAAC;QACrB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare const dropboxDeleteFolder: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
- path: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- }>;
4
- //# sourceMappingURL=delete-folder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete-folder.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/delete-folder.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,mBAAmB;;EAkC9B,CAAC"}
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dropboxDeleteFolder = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const auth_1 = require("../auth");
8
- exports.dropboxDeleteFolder = (0, pieces_framework_1.createAction)({
9
- auth: auth_1.dropboxAuth,
10
- name: 'delete_dropbox_folder',
11
- description: 'Delete a folder',
12
- audience: 'both',
13
- aiMetadata: { description: 'Permanently deletes the folder at the given Dropbox path along with all of its contents. Use to remove an entire directory. Effectively idempotent on the end state once the path is gone, but a repeat call fails because the path no longer exists; treat as a destructive, non-recoverable mutation.', idempotent: false },
14
- displayName: 'Delete folder',
15
- props: {
16
- path: pieces_framework_1.Property.ShortText({
17
- displayName: 'Path',
18
- description: 'The path of the folder to be deleted (e.g. /folder1)',
19
- required: true,
20
- }),
21
- },
22
- run(context) {
23
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
24
- const params = {
25
- path: context.propsValue.path,
26
- };
27
- const result = yield pieces_common_1.httpClient.sendRequest({
28
- method: pieces_common_1.HttpMethod.POST,
29
- url: `https://api.dropboxapi.com/2/files/delete_v2`,
30
- headers: {
31
- 'Content-Type': 'application/json',
32
- },
33
- body: params,
34
- authentication: {
35
- type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
36
- token: context.auth.access_token,
37
- },
38
- });
39
- return result.body;
40
- });
41
- },
42
- });
43
- //# sourceMappingURL=delete-folder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete-folder.js","sourceRoot":"","sources":["../../../../src/lib/actions/delete-folder.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,kCAAsC;AAEzB,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC9C,IAAI,EAAE,kBAAW;IACjB,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,iBAAiB;IAC9B,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,ySAAyS,EAAE,UAAU,EAAE,KAAK,EAAE;IACzV,WAAW,EAAE,eAAe;IAC5B,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,sDAAsD;YACnE,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,MAAM,GAAG;gBACb,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;aAC9B,CAAC;YAEF,MAAM,MAAM,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC1C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,8CAA8C;gBACnD,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI,EAAE,MAAM;gBACZ,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY;iBACjC;aACF,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC,IAAI,CAAC;QACrB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare const dropboxDownloadFile: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
- path: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- }>;
4
- //# sourceMappingURL=download-file.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"download-file.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/download-file.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,mBAAmB;;EA0C9B,CAAC"}
@@ -1,51 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dropboxDownloadFile = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const auth_1 = require("../auth");
8
- exports.dropboxDownloadFile = (0, pieces_framework_1.createAction)({
9
- auth: auth_1.dropboxAuth,
10
- name: 'downloadFile',
11
- displayName: 'Download File',
12
- description: 'Download a File from Dropbox',
13
- audience: 'both',
14
- aiMetadata: { description: 'Downloads the file at the given Dropbox path and returns it as a file object for use by later steps. Use to retrieve file contents into a flow. Read-only on Dropbox; repeating the call with the same path is safe and yields the same file.', idempotent: true },
15
- props: {
16
- path: pieces_framework_1.Property.ShortText({
17
- displayName: "Path",
18
- description: "The path of the file (e.g. /folder1/file.txt)",
19
- required: true
20
- })
21
- },
22
- run(context) {
23
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
24
- var _a;
25
- // Capture file name, if unsuccesfull default to output.pdf
26
- const fileName = ((_a = context.propsValue.path.match(/[^/]+$/)) !== null && _a !== void 0 ? _a : ['output.pdf'])[0];
27
- // For information about Dropbox JSON encoding, see https://www.dropbox.com/developers/reference/json-encoding
28
- const dropboxApiArg = JSON.stringify({ path: context.propsValue.path }).replace(/[\u007f-\uffff]/g, (c) => '\\u' + ('000' + c.charCodeAt(0).toString(16)).slice(-4));
29
- const result = yield pieces_common_1.httpClient.sendRequest({
30
- method: pieces_common_1.HttpMethod.POST,
31
- url: `https://content.dropboxapi.com/2/files/download`,
32
- headers: {
33
- 'Content-Type': 'application/octet-stream',
34
- 'Dropbox-API-Arg': dropboxApiArg
35
- },
36
- authentication: {
37
- type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
38
- token: context.auth.access_token,
39
- },
40
- responseType: 'arraybuffer'
41
- });
42
- return {
43
- file: yield context.files.write({
44
- fileName: fileName,
45
- data: Buffer.from(result.body)
46
- })
47
- };
48
- });
49
- },
50
- });
51
- //# sourceMappingURL=download-file.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"download-file.js","sourceRoot":"","sources":["../../../../src/lib/actions/download-file.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,kCAAsC;AAEzB,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC9C,IAAI,EAAE,kBAAW;IACjB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,8BAA8B;IAC3C,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,+OAA+O,EAAE,UAAU,EAAE,IAAI,EAAE;IAC9R,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,+CAA+C;YAC5D,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;;YACf,2DAA2D;YAC3D,MAAM,QAAQ,GAAG,CAAC,MAAA,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,mCAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;YAE9E,8GAA8G;YAC/G,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,EAAC,IAAI,EAAC,OAAO,CAAC,UAAU,CAAC,IAAI,EAAC,CAAC,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,GAAC,CAAC,KAAK,GAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAE9J,MAAM,MAAM,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC1C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,iDAAiD;gBACtD,OAAO,EAAE;oBACP,cAAc,EAAE,0BAA0B;oBAC1C,iBAAiB,EAAE,aAAa;iBACjC;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY;iBACjC;gBACD,YAAY,EAAC,aAAa;aAC3B,CAAC,CAAC;YAEH,OAAO;gBACL,IAAI,EAAE,MAAM,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;oBAC9B,QAAQ,EAAE,QAAQ;oBAClB,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;iBAC/B,CAAC;aACH,CAAA;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare const dropboxGetFileLink: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
- path: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- }>;
4
- //# sourceMappingURL=get-file-link.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-file-link.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-file-link.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,kBAAkB;;EAkC7B,CAAC"}
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dropboxGetFileLink = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const auth_1 = require("../auth");
8
- exports.dropboxGetFileLink = (0, pieces_framework_1.createAction)({
9
- auth: auth_1.dropboxAuth,
10
- name: 'get_dropbox_file_link',
11
- description: 'Get a temporary file link',
12
- audience: 'both',
13
- aiMetadata: { description: 'Returns a temporary, directly downloadable URL for the file at the given Dropbox path. Use when an agent needs a shareable or fetchable link to file contents rather than downloading the bytes into the flow. Read-only lookup; safe to repeat, though the returned URL is short-lived.', idempotent: true },
14
- displayName: 'Get temporary file link',
15
- props: {
16
- path: pieces_framework_1.Property.ShortText({
17
- displayName: 'Path',
18
- description: 'The path of the file (e.g. /folder1/file.txt)',
19
- required: true,
20
- }),
21
- },
22
- run(context) {
23
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
24
- const params = {
25
- path: context.propsValue.path,
26
- };
27
- const result = yield pieces_common_1.httpClient.sendRequest({
28
- method: pieces_common_1.HttpMethod.POST,
29
- url: `https://api.dropboxapi.com/2/files/get_temporary_link`,
30
- headers: {
31
- 'Content-Type': 'application/json',
32
- },
33
- body: { path: context.propsValue.path },
34
- authentication: {
35
- type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
36
- token: context.auth.access_token,
37
- },
38
- });
39
- return result.body;
40
- });
41
- },
42
- });
43
- //# sourceMappingURL=get-file-link.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-file-link.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-file-link.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,kCAAsC;AAEzB,QAAA,kBAAkB,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,kBAAW;IACjB,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,2BAA2B;IACxC,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,0RAA0R,EAAE,UAAU,EAAE,IAAI,EAAE;IACzU,WAAW,EAAE,yBAAyB;IACtC,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,+CAA+C;YAC5D,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,MAAM,GAAG;gBACb,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;aAC9B,CAAC;YAEF,MAAM,MAAM,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC1C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,uDAAuD;gBAC5D,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE;gBACvC,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY;iBACjC;aACF,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC,IAAI,CAAC;QACrB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,6 +0,0 @@
1
- export declare const dropboxListAFolder: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
- path: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- recursive: import("@activepieces/pieces-framework").CheckboxProperty<false>;
4
- limit: import("@activepieces/pieces-framework").NumberProperty<false>;
5
- }>;
6
- //# sourceMappingURL=list-a-folder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-a-folder.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-a-folder.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,kBAAkB;;;;EAkD7B,CAAC"}
@@ -1,56 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dropboxListAFolder = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const auth_1 = require("../auth");
8
- exports.dropboxListAFolder = (0, pieces_framework_1.createAction)({
9
- auth: auth_1.dropboxAuth,
10
- name: 'list_dropbox_folder',
11
- description: 'List the contents of a folder',
12
- audience: 'both',
13
- aiMetadata: { description: 'Lists the files and subfolders within the given Dropbox folder path (use an empty string for the root), optionally recursing into all subfolders. Use to enumerate folder contents and discover item paths/IDs. Read-only; safe to repeat and returns the same listing for unchanged folders.', idempotent: true },
14
- displayName: 'List a folder',
15
- props: {
16
- path: pieces_framework_1.Property.ShortText({
17
- displayName: 'Path',
18
- description: 'The path of the folder to be listed (e.g. /folder1). Use an empty string for the root folder.',
19
- required: true,
20
- }),
21
- recursive: pieces_framework_1.Property.Checkbox({
22
- displayName: 'Recursive',
23
- description: 'If set to true, the list folder operation will be applied recursively to all subfolders and the response will contain contents of all subfolders.',
24
- defaultValue: false,
25
- required: false,
26
- }),
27
- limit: pieces_framework_1.Property.Number({
28
- displayName: 'Limit',
29
- description: 'The maximum number of results to return (between 1 and 2000). Default is 2000 if not specified.',
30
- required: false,
31
- }),
32
- },
33
- run(context) {
34
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
35
- const params = {
36
- path: context.propsValue.path,
37
- recursive: context.propsValue.recursive,
38
- limit: context.propsValue.limit || 2000,
39
- };
40
- const result = yield pieces_common_1.httpClient.sendRequest({
41
- method: pieces_common_1.HttpMethod.POST,
42
- url: `https://api.dropboxapi.com/2/files/list_folder`,
43
- headers: {
44
- 'Content-Type': 'application/json',
45
- },
46
- body: params,
47
- authentication: {
48
- type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
49
- token: context.auth.access_token,
50
- },
51
- });
52
- return result.body;
53
- });
54
- },
55
- });
56
- //# sourceMappingURL=list-a-folder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-a-folder.js","sourceRoot":"","sources":["../../../../src/lib/actions/list-a-folder.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,kCAAsC;AAEzB,QAAA,kBAAkB,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,kBAAW;IACjB,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,+BAA+B;IAC5C,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,+RAA+R,EAAE,UAAU,EAAE,IAAI,EAAE;IAC9U,WAAW,EAAE,eAAe;IAC5B,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,WAAW,EACT,+FAA+F;YACjG,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC3B,WAAW,EAAE,WAAW;YACxB,WAAW,EACT,mJAAmJ;YACrJ,YAAY,EAAE,KAAK;YACnB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACrB,WAAW,EAAE,OAAO;YACpB,WAAW,EACT,iGAAiG;YACnG,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,MAAM,GAAG;gBACb,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;gBAC7B,SAAS,EAAE,OAAO,CAAC,UAAU,CAAC,SAAS;gBACvC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,IAAI;aACxC,CAAC;YAEF,MAAM,MAAM,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC1C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,gDAAgD;gBACrD,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI,EAAE,MAAM;gBACZ,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY;iBACjC;aACF,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC,IAAI,CAAC;QACrB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- export declare const dropboxMoveFile: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
- from_path: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- to_path: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- autorename: import("@activepieces/pieces-framework").CheckboxProperty<false>;
5
- allow_ownership_transfer: import("@activepieces/pieces-framework").CheckboxProperty<false>;
6
- }>;
7
- //# sourceMappingURL=move-file.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"move-file.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/move-file.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe;;;;;EAwD1B,CAAC"}
@@ -1,63 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dropboxMoveFile = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const auth_1 = require("../auth");
8
- exports.dropboxMoveFile = (0, pieces_framework_1.createAction)({
9
- auth: auth_1.dropboxAuth,
10
- name: 'move_dropbox_file',
11
- description: 'Move a file',
12
- audience: 'both',
13
- aiMetadata: { description: 'Moves (or renames) the file at the source path to a new destination path within Dropbox; optionally autorenames on conflict. Use to relocate or rename a single file. Not idempotent: after a successful move the source no longer exists, so repeating the call fails or, with autorename, can produce a differently named copy.', idempotent: false },
14
- displayName: 'Move file',
15
- props: {
16
- from_path: pieces_framework_1.Property.ShortText({
17
- displayName: 'From Path',
18
- description: 'The current path of the file (e.g. /folder1/oldfile.txt)',
19
- required: true,
20
- }),
21
- to_path: pieces_framework_1.Property.ShortText({
22
- displayName: 'To Path',
23
- description: 'The new path for the file (e.g. /folder2/newfile.txt)',
24
- required: true,
25
- }),
26
- autorename: pieces_framework_1.Property.Checkbox({
27
- displayName: 'Auto Rename',
28
- description: "If there's a conflict, have the Dropbox server try to autorename the file to avoid conflict.",
29
- defaultValue: false,
30
- required: false,
31
- }),
32
- allow_ownership_transfer: pieces_framework_1.Property.Checkbox({
33
- displayName: 'Allow Ownership Transfer',
34
- description: 'Allows moves by owner even if it would result in an ownership transfer.',
35
- defaultValue: false,
36
- required: false,
37
- }),
38
- },
39
- run(context) {
40
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
41
- const params = {
42
- from_path: context.propsValue.from_path,
43
- to_path: context.propsValue.to_path,
44
- autorename: context.propsValue.autorename,
45
- allow_ownership_transfer: context.propsValue.allow_ownership_transfer,
46
- };
47
- const result = yield pieces_common_1.httpClient.sendRequest({
48
- method: pieces_common_1.HttpMethod.POST,
49
- url: `https://api.dropboxapi.com/2/files/move_v2`,
50
- headers: {
51
- 'Content-Type': 'application/json',
52
- },
53
- body: params,
54
- authentication: {
55
- type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
56
- token: context.auth.access_token,
57
- },
58
- });
59
- return result.body;
60
- });
61
- },
62
- });
63
- //# sourceMappingURL=move-file.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"move-file.js","sourceRoot":"","sources":["../../../../src/lib/actions/move-file.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,kCAAsC;AAEzB,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,kBAAW;IACjB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,aAAa;IAC1B,Q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,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY;iBACjC;aACF,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC,IAAI,CAAC;QACrB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- export declare const dropboxMoveFolder: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
- from_path: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- to_path: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- autorename: import("@activepieces/pieces-framework").CheckboxProperty<false>;
5
- allow_ownership_transfer: import("@activepieces/pieces-framework").CheckboxProperty<false>;
6
- }>;
7
- //# sourceMappingURL=move-folder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"move-folder.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/move-folder.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,iBAAiB;;;;;EA0D5B,CAAC"}