Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into authMapping
Browse files Browse the repository at this point in the history
  • Loading branch information
abuaboud committed Jun 18, 2024
2 parents 77cd4ce + 20af480 commit 0ee417d
Show file tree
Hide file tree
Showing 152 changed files with 628 additions and 401 deletions.
7 changes: 3 additions & 4 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ exclude-labels:
- 'release'
- 'pre-release'
categories:
- title: "⛓️‍💥 Breaking Changes"
labels:
- "⛓️‍💥 breaking-change"
- title: "✨ Exciting New Features"
labels:
- "🌟 feature"
Expand All @@ -25,13 +28,9 @@ categories:
- title: "🧹 Maintenance & Dev Experience"
labels:
- "🧹 clean up"
- "💻 dx"
- title: "Other Changes"
labels:
- "*"
- title: "🖥️ API Changes"
labels:
- "🖥️ api"

template: |
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.0'
services:
activepieces:
image: ghcr.io/activepieces/activepieces:0.27.0
image: ghcr.io/activepieces/activepieces:0.28.0
container_name: activepieces
restart: unless-stopped
## Enable the following line if you already use AP_EXECUTION_MODE with SANDBOXED or old activepieces, checking the breaking change documentation for more info.
Expand Down
4 changes: 2 additions & 2 deletions docs/developers/piece-reference/custom-api-calls.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ actions: [
'https://api.openai.com/v1'
},
// Mapping the auth object to the needed authorization headers
authMapping: (auth) => {
authMapping: async (auth) => {
return {
'Authorization': `Bearer ${auth}`
}
Expand All @@ -44,7 +44,7 @@ actions: [
return `${(auth as JiraAuth).instanceUrl}/rest/api/3`
},
auth: jiraCloudAuth,
authMapping: (auth) => {
authMapping: async (auth) => {
const typedAuth = auth as JiraAuth
return {
'Authorization': `Basic ${typedAuth.email}:${typedAuth.apiToken}`
Expand Down
119 changes: 30 additions & 89 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "activepieces",
"version": "0.27.0",
"rcVersion": "0.27.0-rc.8",
"version": "0.28.0",
"rcVersion": "0.28.0-rc.0",
"scripts": {
"prepare": "husky install",
"serve:frontend": "nx serve ui-core",
Expand Down Expand Up @@ -121,6 +121,7 @@
"google-auth-library": "8.9.0",
"googleapis": "129.0.0",
"http-status-codes": "2.2.0",
"https-proxy-agent": "7.0.4",
"imap": "0.8.17",
"imapflow": "1.0.152",
"import-fresh": "3.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/lib/commands/scale-pieces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const convertOpenAPIToPiece = async (openAPISpec) => {
return '${baseURL}';
},
auth: ${authDisplayName},
authMapping: (auth) => {
authMapping: async (auth) => {
return {
Authorization: \`Bearer \${(auth as OAuth2PropertyValue).access_token}\`,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const microsoftDynamics365BusinessCentral = createPiece({
return `https://api.businesscentral.dynamics.com/v2.0/${(auth as OAuth2PropertyValue).props?.['environment']
}/api/v2.0`;
},
authMapping: (auth) => ({
authMapping: async (auth) => ({
Authorization: `Bearer ${(auth as OAuth2PropertyValue).access_token}`,
}),
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/ee/pieces/microsoft-dynamics-crm/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const microsoftDynamicsCrm = createPiece({
(auth as OAuth2PropertyValue).props?.['hostUrl']
}/api/data/v9.2`;
},
authMapping: (auth) => ({
authMapping: async (auth) => ({
Authorization: `Bearer ${(auth as OAuth2PropertyValue).access_token}`,
}),
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/ee/pieces/sharepoint/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const microsoftSharePoint = createPiece({
createCustomApiCallAction({
auth: microsoftSharePointAuth,
baseUrl: () => 'https://graph.microsoft.com/v1.0/sites',
authMapping: (auth) => ({
authMapping: async (auth) => ({
Authorization: `Bearer ${(auth as OAuth2PropertyValue).access_token}`,
}),
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/pieces/community/airtable/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const airtable = createPiece({
return 'https://api.airtable.com/v0';
},
auth: airtableAuth,
authMapping: (auth) => ({
authMapping: async (auth) => ({
Authorization: `Bearer ${auth}`,
}),
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/pieces/community/apitable/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const apitable = createPiece({
return (auth as { apiTableUrl: string }).apiTableUrl;
},
auth: APITableAuth,
authMapping: (auth) => ({
authMapping: async (auth) => ({
Authorization: `Bearer ${(auth as { token: string }).token}`,
}),
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/pieces/community/asana/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const asana = createPiece({
createCustomApiCallAction({
baseUrl: () => `https://app.asana.com/api/1.0`,
auth: asanaAuth,
authMapping: (auth) => ({
authMapping: async (auth) => ({
Authorization: `Bearer ${(auth as OAuth2PropertyValue).access_token}`,
}),
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/pieces/community/bannerbear/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const bannerbear = createPiece({
createCustomApiCallAction({
baseUrl: () => 'https://sync.api.bannerbear.com/v2',
auth: bannerbearAuth,
authMapping: (auth) => ({
authMapping: async (auth) => ({
Authorization: `Bearer ${auth}`,
}),
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/pieces/community/baserow/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const baserow = createPiece({
return (auth as { apiUrl: string }).apiUrl;
},
auth: baserowAuth,
authMapping: (auth) => ({
authMapping: async (auth) => ({
Authorization: `Token ${(auth as { token: string }).token}`,
}),
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/pieces/community/beamer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const beamer = createPiece({
createCustomApiCallAction({
baseUrl: () => beamerCommon.baseUrl,
auth: beamerAuth,
authMapping: (auth) => ({
authMapping: async (auth) => ({
'Beamer-Api-Key': `Bearer ${auth}`,
}),
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/pieces/community/bettermode/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const bettermode = createPiece({
createCustomApiCallAction({
baseUrl: (auth) => (auth as { region: string }).region, // replace with the actual base URL
auth: bettermodeAuth,
authMapping: (auth) => ({
authMapping: async (auth) => ({
Authorization: `Bearer ${auth}`,
}),
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/pieces/community/bonjoro/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const bonjoro = createPiece({
createCustomApiCallAction({
baseUrl: () => 'https://www.bonjoro.com/api/v2', // replace with the actual base URL
auth: bonjoroAuth,
authMapping: (auth) => ({
authMapping: async (auth) => ({
Authorization: `Bearer ${(auth as { apiKey: string }).apiKey}`,
}),
}),
Expand Down
Loading

0 comments on commit 0ee417d

Please sign in to comment.