@activepieces/piece-google-drive 0.5.41 → 0.5.43
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/package.json +6 -6
- package/src/i18n/ca.json +125 -0
- package/src/i18n/de.json +125 -0
- package/src/i18n/es.json +125 -0
- package/src/i18n/fr.json +125 -0
- package/src/i18n/hi.json +125 -0
- package/src/i18n/id.json +125 -0
- package/src/i18n/ja.json +125 -0
- package/src/i18n/nl.json +125 -0
- package/src/i18n/pt.json +125 -0
- package/src/i18n/ru.json +125 -0
- package/src/i18n/translation.json +125 -0
- package/src/i18n/vi.json +125 -0
- package/src/i18n/zh.json +125 -0
- package/src/lib/action/add-permission.action.d.ts +1 -0
- package/src/lib/action/add-permission.action.js +5 -2
- package/src/lib/action/add-permission.action.js.map +1 -1
package/src/i18n/zh.json
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Google Drive": "Google 雲端硬碟",
|
|
3
|
+
"Cloud storage and file backup": "雲端儲存和文件備份",
|
|
4
|
+
"Create new folder": "創建新資料夾",
|
|
5
|
+
"Create new file": "創建新文件",
|
|
6
|
+
"Upload file": "上傳文件",
|
|
7
|
+
"Read file": "讀取文件",
|
|
8
|
+
"Get File": "獲取文件",
|
|
9
|
+
"List files": "列出文件",
|
|
10
|
+
"Search": "搜索",
|
|
11
|
+
"Duplicate File": "複製文件",
|
|
12
|
+
"Save Document as PDF": "將文檔保存為 PDF",
|
|
13
|
+
"Update permissions": "更新權限",
|
|
14
|
+
"Delete permissions": "刪除權限",
|
|
15
|
+
"Set public access": "設置公共訪問",
|
|
16
|
+
"Move File": "移動文件",
|
|
17
|
+
"Delete file": "刪除文件",
|
|
18
|
+
"Trash file": "垃圾文件",
|
|
19
|
+
"Custom API Call": "自定义 API 呼叫",
|
|
20
|
+
"Create a new empty folder in your Google Drive": "在您的 Google 雲端硬碟中創建一個新的空文件夾",
|
|
21
|
+
"Create a new text file in your Google Drive from text": "從文本在您的 Google 雲端硬碟中创建一个新的文本文件",
|
|
22
|
+
"Upload a file in your Google Drive": "在您的 Google 雲端硬碟中上傳文件",
|
|
23
|
+
"Read a selected file from google drive file": "從谷歌驅動文件中讀取選定的文件",
|
|
24
|
+
"Get a file folder for files/sub-folders": "獲取文件/子文件夾的文件夾",
|
|
25
|
+
"List files from a Google Drive folder": "列出Google雲端硬碟文件夾中的文件",
|
|
26
|
+
"Search a Google Drive folder for files/sub-folders": "在Google雲端硬碟文件夾中搜索文件/子文件夾",
|
|
27
|
+
"Duplicate a file from Google Drive. Returns the new file ID.": "從Google雲端硬碟中重複一個文件,返回新的文件ID。",
|
|
28
|
+
"Save a document as PDF in a Google Drive folder": "將文件保存為PDF到Google雲端硬碟文件夾",
|
|
29
|
+
"Update permissions for a file or folder": "更新文件或文件夾的權限",
|
|
30
|
+
"Removes a role from an user for a file or folder": "從用戶文件或文件夾中移除角色",
|
|
31
|
+
"Set public access for a file or folder": "設置文件或文件夾的公共訪問",
|
|
32
|
+
"Moves a file from one folder to another.": "將文件從一個文件夾移到另一個文件夾。",
|
|
33
|
+
"Delete permanently a file from your Google Drive": "從您的Google雲端硬碟永久刪除文件",
|
|
34
|
+
"Move a file to the trash in your Google Drive": "將文件移到您的Google雲端硬碟的垃圾箱中",
|
|
35
|
+
"Make a custom API call to a specific endpoint": "將一個自定義 API 調用到一個特定的終點",
|
|
36
|
+
"Folder name": "文件夹名称",
|
|
37
|
+
"Parent Folder": "父文件夹",
|
|
38
|
+
"Include Team Drives": "包含团队云端硬碟",
|
|
39
|
+
"File name": "文件名",
|
|
40
|
+
"Text": "文本",
|
|
41
|
+
"Content type": "內容類型",
|
|
42
|
+
"File": "文件",
|
|
43
|
+
"File ID": "文件 ID",
|
|
44
|
+
"Destination File name": "目標文件名",
|
|
45
|
+
"File / Folder Id": "文件/文件夾ID",
|
|
46
|
+
"Folder ID": "文件夾ID",
|
|
47
|
+
"Include Trashed": "包含已刪除",
|
|
48
|
+
"Download Files": "下載文件",
|
|
49
|
+
"Query Term": "查詢詞",
|
|
50
|
+
"Operator": "運算符",
|
|
51
|
+
"Value": "值",
|
|
52
|
+
"File Type": "文件類型",
|
|
53
|
+
"Name": "名稱",
|
|
54
|
+
"Duplicate as": "複製為",
|
|
55
|
+
"Document ID": "文檔 ID",
|
|
56
|
+
"File or Folder ID": "文件或文件夾 ID",
|
|
57
|
+
"User email": "用戶電子郵件",
|
|
58
|
+
"Role": "作用",
|
|
59
|
+
"Send invitation email": "發送邀請郵件",
|
|
60
|
+
"Method": "方法",
|
|
61
|
+
"Headers": "信头",
|
|
62
|
+
"Query Parameters": "查询参数",
|
|
63
|
+
"Body": "正文內容",
|
|
64
|
+
"No Error on Failure": "失敗時無錯誤",
|
|
65
|
+
"Timeout (in seconds)": "超時(秒)",
|
|
66
|
+
"The name of the new folder": "新文件夾的名稱",
|
|
67
|
+
"Determines if folders from Team Drives should be included in the results.": "確定是否應在結果中包含團隊雲端硬碟中的資料夾。",
|
|
68
|
+
"The name of the new text file": "新文本文件的名稱",
|
|
69
|
+
"The text content to add to file": "要添加到文件的文本內容",
|
|
70
|
+
"Select file type": "選擇文件類型",
|
|
71
|
+
"The name of the file": "文件的名稱",
|
|
72
|
+
"The file URL or base64 to upload": "要上傳的文件 URL 或 base64",
|
|
73
|
+
"File ID coming from | New File -> id |": "文件 ID 來源於 | 新文件 -> id |",
|
|
74
|
+
"The Id of the file/folder to search for.": "要查找的文件/文件夾的 ID。",
|
|
75
|
+
"Folder ID coming from | New Folder -> id | (or any other source)": "文件夾 ID 來源於 | 新文件夾 -> id | (或任何其他來源)",
|
|
76
|
+
"Include new files that have been trashed.": "包括被刪除的新的文件。",
|
|
77
|
+
"Download all file contents in a list": "下載列表中所有文件內容",
|
|
78
|
+
"The Query term or field of file/folder to search upon.": "要搜索的文件/文件夾的查詢詞或字段。",
|
|
79
|
+
"The operator to create criteria.": "創建標準的運算符。",
|
|
80
|
+
"Value of the field of file/folder to search for.": "文件/文件夾要搜索的字段的值。",
|
|
81
|
+
"(Optional) Choose between files and folders.": "(可選)在文件和文件夾之間選擇。",
|
|
82
|
+
"The ID of the file to duplicate": "要複製的文件的 ID",
|
|
83
|
+
"The name of the new file": "新文件的名稱",
|
|
84
|
+
"The ID of the folder where the file will be duplicated": "要重複文件所在的文件夾ID",
|
|
85
|
+
"If left unselected the file will be duplicated as it is": "如果未選擇,文件將被重複為原樣",
|
|
86
|
+
"The ID of the document to export": "要導出的文檔ID",
|
|
87
|
+
"The ID of the folder where the file will be exported": "要導出文件的文件夾 ID",
|
|
88
|
+
"The name of the new file (do not include the extension)": "新文件的名稱(不包括擴展名)",
|
|
89
|
+
"The ID of the file or folder to update permissions for": "要更新權限的文件或文件夾的ID",
|
|
90
|
+
"The email address of the user to update permissions for": "要更新權限的用戶電子郵件地址",
|
|
91
|
+
"The role to grant to user. See more at: https://developers.google.com/drive/api/guides/ref-roles": "授予用戶的角色。查看更多: https://developers.google.com/drive/api/guides/ref-roles",
|
|
92
|
+
"Send an email to the user to notify them of the new permissions": "發送郵件通知用戶新權限",
|
|
93
|
+
"The role to remove from user.": "從用戶移除的角色。",
|
|
94
|
+
"You can use **Search Folder/File** action to retrieve ID.": "您可以使用**搜索文件夾/文件**操作來檢索ID。",
|
|
95
|
+
"The ID of the file to delete": "要刪除的文件ID",
|
|
96
|
+
"The ID of the file to trash": "要移到垃圾箱的文件ID",
|
|
97
|
+
"Authorization headers are injected automatically from your connection.": "授權標頭會自動從您的連接中注入。",
|
|
98
|
+
"CSV": "CSV",
|
|
99
|
+
"XML": "XML",
|
|
100
|
+
"Full text search": "全文搜索",
|
|
101
|
+
"Contains": "包含",
|
|
102
|
+
"Equals": "等於",
|
|
103
|
+
"All": "所有的",
|
|
104
|
+
"Files": "文件",
|
|
105
|
+
"Folders": "文件夹",
|
|
106
|
+
"Google Sheets": "谷歌試算表",
|
|
107
|
+
"Google Docs": "谷歌文檔",
|
|
108
|
+
"Organizer": "組織者",
|
|
109
|
+
"File Organizer": "文件整理員",
|
|
110
|
+
"Writer": "作家",
|
|
111
|
+
"Commenter": "評論家",
|
|
112
|
+
"Reader": "讀者",
|
|
113
|
+
"GET": "獲取",
|
|
114
|
+
"POST": "郵件",
|
|
115
|
+
"PATCH": "修補",
|
|
116
|
+
"PUT": "彈出",
|
|
117
|
+
"DELETE": "刪除",
|
|
118
|
+
"HEAD": "首篇",
|
|
119
|
+
"New File": "新文件",
|
|
120
|
+
"New Folder": "新建文件夾",
|
|
121
|
+
"Trigger when a new file is uploaded.": "上傳新文件時觸發。",
|
|
122
|
+
"Trigger when a new folder is created or uploaded.": "創建或上傳新文件夾時觸發。",
|
|
123
|
+
"Include File Content": "包括文件內容",
|
|
124
|
+
"Include the file content in the output. This will increase the time taken to fetch the files and might cause issues with large files.": "在輸出中包含文件內容。這將增加提取文件所需的時間,並可能導致大文件的問題。"
|
|
125
|
+
}
|
|
@@ -2,5 +2,6 @@ export declare const addPermission: import("@activepieces/pieces-framework").IAc
|
|
|
2
2
|
fileId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
3
|
user_email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
4
|
permission_name: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
5
|
+
include_team_drives: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
5
6
|
send_invitation_email: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
6
7
|
}>;
|
|
@@ -6,6 +6,7 @@ const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
|
6
6
|
const __1 = require("../../");
|
|
7
7
|
const googleapis_1 = require("googleapis");
|
|
8
8
|
const googleapis_common_1 = require("googleapis-common");
|
|
9
|
+
const common_1 = require("../common");
|
|
9
10
|
exports.addPermission = (0, pieces_framework_1.createAction)({
|
|
10
11
|
auth: __1.googleDriveAuth,
|
|
11
12
|
name: 'update_permissions',
|
|
@@ -51,6 +52,7 @@ exports.addPermission = (0, pieces_framework_1.createAction)({
|
|
|
51
52
|
]
|
|
52
53
|
}
|
|
53
54
|
}),
|
|
55
|
+
include_team_drives: common_1.common.properties.include_team_drives,
|
|
54
56
|
send_invitation_email: pieces_framework_1.Property.Checkbox({
|
|
55
57
|
displayName: 'Send invitation email',
|
|
56
58
|
description: 'Send an email to the user to notify them of the new permissions',
|
|
@@ -59,7 +61,7 @@ exports.addPermission = (0, pieces_framework_1.createAction)({
|
|
|
59
61
|
},
|
|
60
62
|
run(context) {
|
|
61
63
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
62
|
-
const
|
|
64
|
+
const { fileId, user_email, permission_name, send_invitation_email, include_team_drives } = context.propsValue;
|
|
63
65
|
const authClient = new googleapis_common_1.OAuth2Client();
|
|
64
66
|
authClient.setCredentials(context.auth);
|
|
65
67
|
const drive = googleapis_1.google.drive({ version: 'v3', auth: authClient });
|
|
@@ -67,7 +69,8 @@ exports.addPermission = (0, pieces_framework_1.createAction)({
|
|
|
67
69
|
const result = yield drive.permissions.create({
|
|
68
70
|
requestBody: permission,
|
|
69
71
|
fileId: fileId,
|
|
70
|
-
sendNotificationEmail: send_invitation_email
|
|
72
|
+
sendNotificationEmail: send_invitation_email,
|
|
73
|
+
supportsAllDrives: include_team_drives,
|
|
71
74
|
});
|
|
72
75
|
return result.data;
|
|
73
76
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-permission.action.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/google-drive/src/lib/action/add-permission.action.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,8BAAyC;AACzC,2CAAoC;AACpC,yDAAiD;
|
|
1
|
+
{"version":3,"file":"add-permission.action.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/google-drive/src/lib/action/add-permission.action.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,8BAAyC;AACzC,2CAAoC;AACpC,yDAAiD;AACjD,sCAAmC;AAEtB,QAAA,aAAa,GAAG,IAAA,+BA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