forked from rowyio/rowy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rowyio#1124 from rowyio/develop
Develop
- Loading branch information
Showing
41 changed files
with
1,417 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,10 @@ export const triggerTypes: ExtensionTrigger[] = ["create", "update", "delete"]; | |
const extensionBodyTemplate = { | ||
task: `const extensionBody: TaskBody = async({row, db, change, ref, logging}) => { | ||
// WRITE YOUR CODE ONLY BELOW THIS LINE. DO NOT WRITE CODE/COMMENTS OUTSIDE THE FUNCTION BODY | ||
logging.log("extensionBody started") | ||
// Import any NPM package needed | ||
// const vision = require('@google-cloud/vision'); | ||
// Task Extension is very flexible, you can do anything. | ||
// From updating other documents in your database, to making an api request to 3rd party service. | ||
|
@@ -90,7 +94,8 @@ const extensionBodyTemplate = { | |
}`, | ||
docSync: `const extensionBody: DocSyncBody = async({row, db, change, ref, logging}) => { | ||
// WRITE YOUR CODE ONLY BELOW THIS LINE. DO NOT WRITE CODE/COMMENTS OUTSIDE THE FUNCTION BODY | ||
logging.log("extensionBody started") | ||
return ({ | ||
fieldsToSync: [], // a list of string of column names | ||
row: row, // object of data to sync, usually the row itself | ||
|
@@ -100,6 +105,7 @@ const extensionBodyTemplate = { | |
}`, | ||
historySnapshot: `const extensionBody: HistorySnapshotBody = async({row, db, change, ref, logging}) => { | ||
// WRITE YOUR CODE ONLY BELOW THIS LINE. DO NOT WRITE CODE/COMMENTS OUTSIDE THE FUNCTION BODY | ||
logging.log("extensionBody started") | ||
return ({ | ||
trackedFields: [], // a list of string of column names | ||
|
@@ -109,6 +115,7 @@ const extensionBodyTemplate = { | |
}`, | ||
algoliaIndex: `const extensionBody: AlgoliaIndexBody = async({row, db, change, ref, logging}) => { | ||
// WRITE YOUR CODE ONLY BELOW THIS LINE. DO NOT WRITE CODE/COMMENTS OUTSIDE THE FUNCTION BODY | ||
logging.log("extensionBody started") | ||
return ({ | ||
fieldsToSync: [], // a list of string of column names | ||
|
@@ -120,7 +127,8 @@ const extensionBodyTemplate = { | |
}`, | ||
meiliIndex: `const extensionBody: MeiliIndexBody = async({row, db, change, ref, logging}) => { | ||
// WRITE YOUR CODE ONLY BELOW THIS LINE. DO NOT WRITE CODE/COMMENTS OUTSIDE THE FUNCTION BODY | ||
logging.log("extensionBody started") | ||
return({ | ||
fieldsToSync: [], // a list of string of column names | ||
row: row, // object of data to sync, usually the row itself | ||
|
@@ -131,7 +139,8 @@ const extensionBodyTemplate = { | |
}`, | ||
bigqueryIndex: `const extensionBody: BigqueryIndexBody = async({row, db, change, ref, logging}) => { | ||
// WRITE YOUR CODE ONLY BELOW THIS LINE. DO NOT WRITE CODE/COMMENTS OUTSIDE THE FUNCTION BODY | ||
logging.log("extensionBody started") | ||
return ({ | ||
fieldsToSync: [], // a list of string of column names | ||
row: row, // object of data to sync, usually the row itself | ||
|
@@ -142,6 +151,10 @@ const extensionBodyTemplate = { | |
}`, | ||
slackMessage: `const extensionBody: SlackMessageBody = async({row, db, change, ref, logging}) => { | ||
// WRITE YOUR CODE ONLY BELOW THIS LINE. DO NOT WRITE CODE/COMMENTS OUTSIDE THE FUNCTION BODY | ||
logging.log("extensionBody started") | ||
// Import any NPM package needed | ||
// const lodash = require('lodash'); | ||
return ({ | ||
channels: [], // a list of slack channel IDs in string | ||
|
@@ -153,6 +166,10 @@ const extensionBodyTemplate = { | |
}`, | ||
sendgridEmail: `const extensionBody: SendgridEmailBody = async({row, db, change, ref, logging}) => { | ||
// WRITE YOUR CODE ONLY BELOW THIS LINE. DO NOT WRITE CODE/COMMENTS OUTSIDE THE FUNCTION BODY | ||
logging.log("extensionBody started") | ||
// Import any NPM package needed | ||
// const lodash = require('lodash'); | ||
return ({ | ||
from: "Name<[email protected]>", // send from field | ||
|
@@ -174,6 +191,10 @@ const extensionBodyTemplate = { | |
}`, | ||
apiCall: `const extensionBody: ApiCallBody = async({row, db, change, ref, logging}) => { | ||
// WRITE YOUR CODE ONLY BELOW THIS LINE. DO NOT WRITE CODE/COMMENTS OUTSIDE THE FUNCTION BODY | ||
logging.log("extensionBody started") | ||
// Import any NPM package needed | ||
// const lodash = require('lodash'); | ||
return ({ | ||
body: "", | ||
|
@@ -185,6 +206,10 @@ const extensionBodyTemplate = { | |
}`, | ||
twilioMessage: `const extensionBody: TwilioMessageBody = async({row, db, change, ref, logging}) => { | ||
// WRITE YOUR CODE ONLY BELOW THIS LINE. DO NOT WRITE CODE/COMMENTS OUTSIDE THE FUNCTION BODY | ||
logging.log("extensionBody started") | ||
// Import any NPM package needed | ||
// const lodash = require('lodash'); | ||
// Setup twilio secret key: https://docs.rowy.io/extensions/twilio-message#secret-manager-setup | ||
// Add any code here to customize your message or dynamically get the from/to numbers | ||
|
@@ -197,6 +222,10 @@ const extensionBodyTemplate = { | |
}`, | ||
pushNotification: `const extensionBody: PushNotificationBody = async({row, db, change, ref, logging}) => { | ||
// WRITE YOUR CODE ONLY BELOW THIS LINE. DO NOT WRITE CODE/COMMENTS OUTSIDE THE FUNCTION BODY | ||
logging.log("extensionBody started") | ||
// Import any NPM package needed | ||
// const lodash = require('lodash'); | ||
// You can use FCM token from the row or from the user document in the database | ||
// const FCMtoken = row.FCMtoken | ||
|
@@ -248,6 +277,7 @@ export function emptyExtensionObject( | |
trackedFields: [], | ||
conditions: `const condition: Condition = async({row, change, logging}) => { | ||
// WRITE YOUR CODE ONLY BELOW THIS LINE. DO NOT WRITE CODE/COMMENTS OUTSIDE THE FUNCTION BODY | ||
logging.log("condition started") | ||
return true; | ||
// WRITE YOUR CODE ONLY ABOVE THIS LINE. DO NOT WRITE CODE/COMMENTS OUTSIDE THE FUNCTION BODY | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.