@activepieces/piece-microsoft-outlook 0.2.7 → 0.2.9
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 +8 -21
- package/src/lib/common/auth.js +14 -27
- package/src/lib/common/auth.js.map +1 -1
- package/README.md +0 -7
package/package.json
CHANGED
|
@@ -1,30 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-microsoft-outlook",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@microsoft/microsoft-graph-client": "3.0.7",
|
|
6
|
-
"@microsoft/microsoft-graph-types": "2.40.0",
|
|
7
|
-
"@sinclair/typebox": "0.34.11",
|
|
8
|
-
"ai": "^6.0.0",
|
|
9
|
-
"axios": "1.13.5",
|
|
10
|
-
"axios-retry": "4.4.1",
|
|
11
|
-
"dayjs": "1.11.9",
|
|
12
|
-
"deepmerge-ts": "7.1.0",
|
|
13
|
-
"form-data": "4.0.4",
|
|
14
|
-
"mime-types": "2.1.35",
|
|
15
|
-
"nanoid": "3.3.8",
|
|
16
|
-
"semver": "7.6.0",
|
|
17
|
-
"socket.io-client": "4.8.1",
|
|
18
|
-
"zod": "4.1.13",
|
|
19
5
|
"@activepieces/pieces-common": "0.11.6",
|
|
20
6
|
"@activepieces/pieces-framework": "0.25.4",
|
|
21
7
|
"@activepieces/shared": "0.37.0",
|
|
8
|
+
"@microsoft/microsoft-graph-client": "3.0.7",
|
|
9
|
+
"@microsoft/microsoft-graph-types": "2.40.0",
|
|
10
|
+
"dayjs": "1.11.9",
|
|
22
11
|
"tslib": "2.6.2"
|
|
23
12
|
},
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"main": "./src/index.js",
|
|
29
|
-
"type": "commonjs"
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc -p tsconfig.lib.json",
|
|
15
|
+
"lint": "eslint 'src/**/*.ts'"
|
|
16
|
+
}
|
|
30
17
|
}
|
package/src/lib/common/auth.js
CHANGED
|
@@ -5,39 +5,26 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
6
|
const microsoft_graph_client_1 = require("@microsoft/microsoft-graph-client");
|
|
7
7
|
const authDesc = `
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- Or select based on your requirement.
|
|
16
|
-
7. In **Redirect URI**, select **Web** and add the given URL.
|
|
17
|
-
8. Click **Register**.
|
|
18
|
-
9. After registration, you’ll be redirected to the app’s overview page. Copy the **Application (client) ID**.
|
|
19
|
-
10. From the left menu, go to **Certificates & secrets**.
|
|
20
|
-
- Under **Client secrets**, click **New client secret**.
|
|
21
|
-
- Provide a description, set an expiry, and click **Add**.
|
|
22
|
-
- Copy the **Value** of the client secret (this will not be shown again).
|
|
23
|
-
11. Go to **API permissions** from the left menu.
|
|
24
|
-
- Click **Add a permission**.
|
|
25
|
-
- Select **Microsoft Graph** → **Delegated permissions**.
|
|
26
|
-
- Add the following scopes:
|
|
27
|
-
- Mail.ReadWrite
|
|
28
|
-
- Mail.Send
|
|
29
|
-
- Calendars.Read
|
|
30
|
-
- offline_access
|
|
31
|
-
- User.Read
|
|
32
|
-
- Click **Add permissions**.
|
|
33
|
-
12. Copy your **Client ID** and **Client Secret**.
|
|
8
|
+
If you’d like to use your own custom Azure app instead of the default Activepieces app, follow the [Azure app creation guide](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#register-an-application),
|
|
9
|
+
set the **Redirect URI** to {{redirectUrl}} and add the following **Microsoft Graph (Delegated) permissions** under **API permissions**:
|
|
10
|
+
- User.Read
|
|
11
|
+
- Mail.ReadWrite
|
|
12
|
+
- Mail.Send
|
|
13
|
+
- Calendars.Read
|
|
14
|
+
- offline_access
|
|
34
15
|
`;
|
|
35
16
|
exports.microsoftOutlookAuth = pieces_framework_1.PieceAuth.OAuth2({
|
|
36
17
|
description: authDesc,
|
|
37
18
|
authUrl: 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize',
|
|
38
19
|
tokenUrl: 'https://login.microsoftonline.com/common/oauth2/v2.0/token',
|
|
39
20
|
required: true,
|
|
40
|
-
scope: [
|
|
21
|
+
scope: [
|
|
22
|
+
'Mail.ReadWrite',
|
|
23
|
+
'Mail.Send',
|
|
24
|
+
'Calendars.Read',
|
|
25
|
+
'offline_access',
|
|
26
|
+
'User.Read',
|
|
27
|
+
],
|
|
41
28
|
prompt: 'omit',
|
|
42
29
|
validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
43
30
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/microsoft-outlook/src/lib/common/auth.ts"],"names":[],"mappings":";;;;AAAA,qEAAgF;AAChF,8EAA2D;AAE3D,MAAM,QAAQ,GAAG
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/microsoft-outlook/src/lib/common/auth.ts"],"names":[],"mappings":";;;;AAAA,qEAAgF;AAChF,8EAA2D;AAE3D,MAAM,QAAQ,GAAG;;;;;;;;CAQhB,CAAC;AAEW,QAAA,oBAAoB,GAAG,4BAAS,CAAC,MAAM,CAAC;IACnD,WAAW,EAAE,QAAQ;IACrB,OAAO,EAAE,gEAAgE;IACzE,QAAQ,EAAE,4DAA4D;IACtE,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE;QACL,gBAAgB;QAChB,WAAW;QACX,gBAAgB;QAChB,gBAAgB;QAChB,WAAW;KACZ;IACD,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACvB,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,IAA2B,CAAC;YAC9C,MAAM,MAAM,GAAG,+BAAM,CAAC,kBAAkB,CAAC;gBACvC,YAAY,EAAE;oBACZ,cAAc,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,YAAY,CAAC;iBAC9D;aACF,CAAC,CAAC;YACH,MAAM,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC;YAC9B,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QACzB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,sBAAsB,EAAE,CAAC;QACzD,CAAC;IACH,CAAC,CAAA;CACF,CAAC,CAAC"}
|