forked from codigoencasa/builderbot
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d46862
commit cd47cc5
Showing
16 changed files
with
118 additions
and
15 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const { generateRef } = require('../../utils/hash') | ||
|
||
const eventDocument = () => { | ||
return generateRef('_event_document_') | ||
} | ||
|
||
module.exports = { eventDocument } |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const { generateRef } = require('../../utils/hash') | ||
|
||
const eventLocation = () => { | ||
return generateRef('_event_location_') | ||
} | ||
|
||
const REGEX_EVENT_LOCATION = /^_event_location__[\w\d]{8}-(?:[\w\d]{4}-){3}[\w\d]{12}$/ | ||
|
||
module.exports = { eventLocation, REGEX_EVENT_LOCATION } |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const { generateRef } = require('../../utils/hash') | ||
|
||
const eventMedia = () => { | ||
return generateRef('_event_media_') | ||
} | ||
|
||
const REGEX_EVENT_MEDIA = /^_event_media__[\w\d]{8}-(?:[\w\d]{4}-){3}[\w\d]{12}$/ | ||
|
||
module.exports = { eventMedia, REGEX_EVENT_MEDIA } |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const { generateRef } = require('../../utils/hash') | ||
|
||
const eventVoiceNote = () => { | ||
return generateRef('_event_voice_note_') | ||
} | ||
|
||
module.exports = { eventVoiceNote } |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const { generateRef } = require('../../utils/hash') | ||
|
||
const eventWelcome = () => { | ||
return generateRef('_event_welcome_') | ||
} | ||
|
||
module.exports = { eventWelcome } |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const { eventDocument } = require('./eventDocument') | ||
const { eventLocation } = require('./eventLocation') | ||
const { eventMedia } = require('./eventMedia') | ||
const { eventVoiceNote } = require('./eventVoiceNote') | ||
const { eventWelcome } = require('./eventWelcome') | ||
|
||
const LIST_ALL = { | ||
WELCOME: eventWelcome(), | ||
MEDIA: eventMedia(), | ||
LOCATION: eventLocation(), | ||
DOCUMENT: eventDocument(), | ||
VOICE_NOTE: eventVoiceNote(), | ||
} | ||
|
||
module.exports = LIST_ALL |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const crypto = require('crypto') | ||
|
||
/** | ||
* Generamos un UUID unico con posibilidad de tener un prefijo | ||
* @param {*} prefix | ||
* @returns | ||
*/ | ||
const generateRefprovider = (prefix = false) => { | ||
const id = crypto.randomUUID() | ||
return prefix ? `${prefix}_${id}` : id | ||
} | ||
|
||
module.exports = { generateRefprovider } |
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