0.1.0-beta.113 • Published 2 years ago

@leaddreamer/esbrowser v0.1.0-beta.113

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

view on
npm

@SaltSweetSpirits/ESBrowser

Browser functions for the Event Services system, wrapped around ESBusiness and indirectly firebase-wrapper, for the Front End.

Modules

Functions

ESBrowser

Browser functions for the Event Services system, wrapped around ESBusiness and indirectly firebase-wrapper, for the Front End.

ESBrowser.startBrowser(config) ⇒ Promise

starts the database and redux systems in the browser the client-specific firebase instance must be passed the client-specific config object must be passes Starts the database, and initiates the user authentication system

Kind: static method of ESBrowser

ParamType
configFirebaseConfigObject

ESBrowser~FirebaseConfigObject : object

only authDomain, databaseURL and storageBucket are present when called from a cloud environment

Kind: inner typedef of ESBrowser
Properties

NameTypeDescription
apiKeystringrequired api Key from Firebase Console,
appIdstringrequired app ID from Firebase Console
projectIdstringrequired Firebase projectID from Firebase console
authDomainstring(optional) auth domain from Firebase Console
databaseURLstring(optional) Firestore database URL from Firebase console
storageBucket:string(optional) URL of Firestore Storage Bucket
messagingSenderId:string(optional) ID for Messaing service from Firebase Console
measurementId:string(optional) Analytics/Measurement ID from Firebase Console
mapsAPIKeystring(optional) App ID for Google Maps API, from Google

Browser

Browser-specific Event Services business logic and database operations

Campaigns

Business and Database support functions for the Browser

Campaigns.listenCampaigns(organization, dataCallBack, errCallBack) ⇒ callback

Sets up a listener for all the Campaigns for a particular Organization

Kind: static method of Campaigns
Returns: callback - unsubscribe function

ParamType
organizationOrganiztionType
dataCallBackcallback
errCallBackcallback

CloudCustomerPayment

Customer payment account cloud functions

CloudCustomerPayment.capturePaymentMethod(personId) ⇒ Promise.secret_object

Prepares to capture a payment method for a user

Kind: static method of CloudCustomerPayment
Returns: Promise.secret_object - - client secret

ParamTypeDescription
personIdstringId of person account to create customer payment account for

CloudCustomerPayment.setFanCard(personId, PDSummary) ⇒ Promise.<void>

Securely sets the particular paymentMethod as active

Kind: static method of CloudCustomerPayment

ParamTypeDescription
personIdstringId of person owning this payment
PDSummaryPDSummarypaymentDescriptor

CloudCustomerPayment.deleteFanCard(personId, PDSummary) ⇒ Promise.<void>

Kind: static method of CloudCustomerPayment

ParamTypeDescription
personIdstringa user Id
PDSummaryPDSummarypaymentDescriptor of method to delete

CloudCustomerPayment~secret_object : object

Payment System "secret" for secure front-end

Kind: inner typedef of CloudCustomerPayment
Properties

NameType
payment_secretstring

CloudEvents

Event support Cloud Functions

CloudEvents.httpsOnCallCreateLocalEvent(event) ⇒ Promise.<void>

Creates an event from scratch by an organization

Kind: static method of CloudEvents

ParamTypeDescription
eventEventType
event.posterOrganizationType
event.poster.IdstringId of artist creating event
event.poster.namestringname of artist creating the event
event.poster.capacitynumber | stringcapacity of organization creating event
event.bidderIDstringId of artist/act for event being created
event.showDatedateStringdate/time of event being created
event.ticketPricenumber | stringticket price for event being created
event.ticketsnumber | stringnumber of pre-sold tickets for event being created

CloudEvents.confirmEvent(eventId) ⇒ Promise.<void>

This function verifies credentials (cityManager of correct region for event), calculates the correct organizations shares, then initiates the required transfers to accounts connected to organizations. Receipts (on success) will be attached to organizations by webhook. Note security checks are at SERVER/CLOUD FUNCTION. Note this function STARTS the process (marks the event) - the BACKEND executes the operation asynchronously to not delay FRONTEND

Kind: static method of CloudEvents
Returns: Promise.<void> - - does NOT necessarily mean it succeeded.

ParamTypeDescription
eventIdstringId of the event to approve for payout

CloudEvents.fixEventSummary(eventId) ⇒ Promise.<void>

This function re-calculates the summary (from pledgeTickets) for a event.

Kind: static method of CloudEvents
Returns: Promise.<void> - - does NOT necessarily mean it succeeded.

ParamTypeDescription
eventIdstringId of the event to re-calculate the summary data.

CloudEvents.cancelEvent(eventId) ⇒ Promise.<void>

This function verifies credentials (cityManager of correct region for event), marks each pledgeTicket and corresponding receipt as REFUNDING then issues a refund through the payment system on all charges. Note security checks are at SERVER/CLOUD FUNCTION Note this function STARTS the process (marks the event) - the BACKEND executes the operation asynchronously to not delay FRONTEND

Kind: static method of CloudEvents
Returns: Promise.<void> - - does NOT necessarily mean it succeeded.

ParamTypeDescription
eventIdstringId of the event to approve for paytout

CloudFunctions

Project specific Cloud functions

CloudFunctions.httpsOnCallSlipDates ⇒ Promise.boolean

Admin/Test function to push all dated object "shiftDays" forward

Kind: static constant of CloudFunctions

ParamType
shiftDaysnumber

CloudFunctions.requestCancelPledge ⇒ Promise

Request to cancel a pledgeTicket (needs payment check)

Kind: static constant of CloudFunctions

ParamType
pledgeTicketpledgeTicketObject

CloudFunctions.authClaims(user) ⇒ Promise.Credential

fetches our specific custom claim values from user Token

Kind: static method of CloudFunctions

ParamTypeDescription
userUserObjectfirebase auth user object

CloudFunctions.changeCredential(credential) ⇒ Promise.<void>

use a "credential" object to add a new server-side role to a user

Kind: static method of CloudFunctions

ParamTypeDescription
credentialCredentialthe new credential being requested. Verified and set at server-side

CloudFunctions.httpsOnCallCredentials(credential) ⇒ Promise

Cloud function to set credentials object

Kind: static method of CloudFunctions

ParamType
credentialCredential

CloudFunctions.httpsOnCallCreateAccounts(data) ⇒ Promise.PaymentAccount

Securely creates an oganization account

Kind: static method of CloudFunctions

ParamType
dataAccountRequestData

CloudFunctions.httpsOnCallOfferAccess(offer) ⇒ Promise

Cloud function for organizatin to offer user access control

Kind: static method of CloudFunctions

ParamType
offerAccessOffer

CloudFunctions.httpsOnCallCheckIn(checkin) ⇒ Promise

Cloud function to allow Organization to CheckIn a user/ticket to an event

Kind: static method of CloudFunctions

ParamType
checkincheckInObject

CloudFunctions.fixPledgeTicket(pledgeTicket) ⇒ Promise.secret_object

"Fix" a pledgeTicket - ie setup to take new payment

Kind: static method of CloudFunctions

ParamType
pledgeTicketpledgeTicketObject

CloudFunctions~Credential : object

Kind: inner typedef of CloudFunctions
Properties

NameTypeDescription
organizationstringbusiness's Id - only one at a time
adminStatusboolean
superUserboolean
employeeboolean

CloudFunctions~AccountRequestData : object

Kind: inner typedef of CloudFunctions
Properties

NameTypeDescription
accountOrganizationType
account.typestringARTISTS, VENUES, BRANDS, CITYMANAGER or OTHER

CloudPaymentProcessing

Cloud Functions to secure manage paymentProcessing accounts

CloudPaymentProcessing.accountStatus ⇒ Promise.AccountStatus

Cloud function to check PaymentProcessor account status

Kind: static constant of CloudPaymentProcessing

ParamTypeDescription
accountIdstringPaymentProcessor account ID (unique)

CloudPaymentProcessing.onboardAccount(accountObject) ⇒ Promise.AccountStatus

Cloud function to onboard a paymentProcessor account

Kind: static method of CloudPaymentProcessing

ParamType
accountObjectPaymentAccount

Events

Events.ListenEvents(campaign, dataCallBack, errCallBack) ⇒ callback

Sets up a listener for all the Events for a particular Campaign

Kind: static method of Events
Returns: callback - unsubscribe function

ParamType
campaignCampaignType
dataCallBackcallback
errCallBackcallback

Events.ListenListing(organization, dataCallback, errCallback, startDate) ⇒ callback

Listener for Organization Owner shows (after a certain date)

Kind: static method of Events
Returns: callback - unsubscribe function

ParamType
organizationOrganizationType
dataCallbackcallback
errCallbackcallback
startDatedateString

Events.ListenOrganizationEvents(organization, dataCallback, errCallback, startDate) ⇒ callback

Listener for Organization Owner events (booked or not) (after a certain date)

Kind: static method of Events
Returns: callback - unsubscribe function

ParamType
organizationOrganizationType
dataCallbackcallback
errCallbackcallback
startDatedateString

Events.ListenOrganizationShows(organization, dataCallback, errCallback) ⇒ callback

Listener for Organization Owner Shows (booked events)

Kind: static method of Events
Returns: callback - unsubscribe function

ParamType
organizationOrganizationType
dataCallbackcallback
errCallbackcallback

Events.ListenOrganizationBidderShows(organization, dataCallback, errCallback, startDate) ⇒ callback

Listener for Organization Bidder events (after a certain date) (NOTE: these are by definition booked)

Kind: static method of Events
Returns: callback - unsubscribe function

ParamType
organizationOrganizationType
dataCallbackcallback
errCallbackcallback
startDatedateString

Favorites

Intended for managing Fan favorites. Unfinished

Favorites.favoritesMapMaker(favoriteRecords) ⇒ Map

transforms array into keyed Map()

Kind: static method of Favorites

ParamType
favoriteRecordsArray.FavoriteRecord

Fundamentals

Fundamentals.ListenFundamentals() ⇒ callback

A function that returns a function to attach as a listener, that returns a function to unsubscribe This a FAKE listener - only used to load data at start-up A function that "pretends" to be a listener, to maintain consistent structure Only loads at boot-up

Kind: static method of Fundamentals

Fundamentals.ListenMCCs() ⇒ callback

A function that returns a function to attach as a listener, that returns a function to unsubscribe A function that "pretends" to be a listener, to maintain consistent structure Only loads at boot-up

Kind: static method of Fundamentals

Genres

Database handling functions for Genres

Genres.fetchGenres() ⇒ Array.GenreObject

Kind: static method of Genres

Genres.fetchGenre(genreID) ⇒ GenreObject

Fetch a single GenreObject from the store by Id

Kind: static method of Genres

ParamType
genreIDstring

Genres.fetchFormattedGenre(genreID) ⇒ GenreObject

Fetch a single GenreObject from the store by Id and returns as formatted string

Kind: static method of Genres

ParamType
genreIDstring

Genres~ListenGenres() ⇒ callback

Kind: inner method of Genres
Returns: callback - unsubscribe function

Images

basic Redux/Database functions for images

Images.setDefaultImage() ⇒ callback

Fires off an async closure to get and set image. Could be thunk?

Kind: static method of Images

Images.setDefaultBanner() ⇒ callback

Fires off an async closure to get and set image. Could be thunk?

Kind: static method of Images

Images.setDefaultLoading() ⇒ callback

Fires off an async closure to get and set loading. Could be thunk?

Kind: static method of Images

Images.pullURLFromRecord(record, key) ⇒ Promise.string

This Utility checks if a full URL needs to be built. Image data can be => a tokenized URL, by definition public => a "private", secured URL => a filename, assumed to be stored in a structure parallel to the record path

Kind: static method of Images
Fulfil: string a "private" URL to access the file.
Reject: string

ParamTypeDescription
recordRecordObjectA firestore document Record - the '/' separated collection/ document path is used as the path to the stored item.
keystringAn optional string identifying the specific field an stored item is associated with

Images.accessibleStorage(URL) ⇒ Promise.<URL>

This Utility checks if URL is Secured by Storage Security Rules If the URL carries an access token, it is simply returned. If the URL does NOT have an access token, it is fetched to local stoage with authentication, and a new URL created to point to the local copy.

Kind: static method of Images
Fulfil: string a local URL to access the downloaded data
Reject: string

ParamType
URLstring

Organizations

Browser-specific Business logic and database operations

Organizations.createOrganizationAccount(organizationForm) ⇒ Promise

Makes a call to the backend to have an organization account created. (security requires this to be done in a secure environment)

Kind: static method of Organizations

ParamType
organizationFormOrganizationFormType
organizationForm.typestring

Organizations.loginOrganization(organization_role) ⇒ Promise

"login" to control of managed organization in specified role

Kind: static method of Organizations

ParamType
organization_roleRoleType

Organizations.logoutOrganization() ⇒ Promise

Kind: static method of Organizations

Organizations.makeActiveOrganization(organization_role) ⇒ Promise.<void>

accepts the selected "organization_role" and uses it login & setup control of the indicated organization.

Kind: static method of Organizations

ParamType
organization_roleRoleType

makeActiveOrganization~posterFilter

Filter requirements: EVENTS: mostly by Ownership EXCEPT CityManagers, which is by region

Kind: inner constant of makeActiveOrganization

Organizations.retireActiveOrganization() ⇒ void

marks the current actiively managed organization to be "retired" This STARTS the action - it does not complete initial

Kind: static method of Organizations

Organizations.subscribeOrganization(organizationID) ⇒ string

Sets up a listener/subscriber object in the Store for a specified organization

Kind: static method of Organizations
Returns: string - the key where this listener was stored in the listener strcuture

ParamType
organizationIDstring

Organizations.listenOrganization(uid) ⇒ callback

Sets up a listener specifically to the Redux store returns the unsubscribe function; will be called AT LEAST ONCE with initial document

Kind: static method of Organizations
Returns: callback - an unsubscribe function

ParamTypeDescription
uidstringUID of the Organization record for the Redux store to listen too.

Organizations.disableOrganization() ⇒ void

Dispatches the action to disable management of the currently managed organization

Kind: static method of Organizations

Organizations.listenOrganizations(dataCallback, errCallback) ⇒ callback

Sets up and returns a listener object for ALL organization records. Not very useful

Kind: static method of Organizations
Returns: callback - unsubscribe function

ParamTypeDescription
dataCallbackcallbackfor Data actions
errCallbackcallbackfor error actions

Organizations.listenOrganizationsPaginated(dataCallback, errCallback, pageSize, optional) ⇒ PaginatedListener

Sets up and returns a paginated listener object for organization records. Allows paging through large number of records, while listenming for changes

Kind: static method of Organizations
Returns: PaginatedListener - Paginated Listener Class object

ParamTypeDescription
dataCallbackcallbackfor Data actions
errCallbackcallbackfor error actions
pageSizenumbersets the size of each page of results
optionalArray.FilterObjectfilters for operation

Payment

People

People.setClaims(newClaims) ⇒ ActionItem

Sets the various Redux states for all claims currently active

Kind: static method of People

ParamType
newClaimsCredentials

People.makeActivePerson(user) ⇒ Promise

takes an authenticated user and builds the appropriate ActivePeron in the Redux store

Kind: static method of People

ParamType
userUser

People.retireActivePerson() ⇒ Promise

Removes Redux records and authentication for current User

Kind: static method of People

People.ListenPerson(user) ⇒ callback

returns the unsubscribe function; will be called AT LEAST ONCE with initial document

Kind: static method of People
Returns: callback - unsubscribe function

ParamType
userUser

People.savePerson(person) ⇒ Promise

Saves an (updated) PersonObject back to Database Store

Kind: static method of People

ParamType
personPersonObject

People.savePayment(person, payment_object) ⇒ Promise

Saves an (updated) PaymentObject to a specified PersonObject back to Database Store

Kind: static method of People

ParamType
personPersonObject
payment_objectPaymentObject

People.CreateAnonymousFan() ⇒ Promise

calls authentication service. Listener (below) responds to status change

Kind: static method of People

People.InitAuthListener() ⇒ callback

Starts the authentication system with status listener

Kind: static method of People
Returns: callback - unsubscribe

People.signInSuccessWithAuthResult(authResult, redirectURL) ⇒ boolean

Dummt functin for auth UI. We use Async listeners to accomplish the related functions

Kind: static method of People

ParamType
authResultobject
redirectURLstring

Regions

Regions.fetchRegions() ⇒ Array.RegionType

returns an array of Region Objects (or err)

Kind: static method of Regions

Regions.fetchRegion() ⇒ RegionType

Returns specified RegionObject

Kind: static method of Regions

Regions.fetchFormattedRegion() ⇒ string

Returns specified RegionObject as a formatted string

Kind: static method of Regions
Returns: string - formatted Region

Regions.ListenRegions() ⇒ callback

Kind: static method of Regions

Roles

Roles.ListenRoles() ⇒ callback

Kind: static method of Roles

Roles.offerAccess(parent, offer) ⇒ Promise

Kind: static method of Roles

ParamType
parentOrganizationType
offerAccessOffer

Skills

Skills.fetchFormattedSkill ⇒ SkillObject

Fetch a single SkillObject from the store by Id and returns as formatted string

Kind: static constant of Skills

ParamType
skillIDstring

Skills.fetchSkills() ⇒ Array.SkillObject

Kind: static method of Skills

Skills.fetchSkill(skillID) ⇒ SkillObject

Fetch a single SkillObject from the store by Id

Kind: static method of Skills

ParamType
skillIDstring

Skills.ListenSkills() ⇒ callback

Kind: static method of Skills
Returns: callback - unsubscribe function

Utilities

Utility Browser support functions

Utilities.fetchLinkedItem(type, link, refPath) ⇒ Promise.RecordDocument

used generic for constructing forms for input and display

Kind: static method of Utilities

ParamTypeDescription
typestringrefers to the sub-collection name
linkstringrefers to the linking "value" - a documentID
refPathstringoptionally refers to the "/" separate path to the parent document in firebase

Utilities.fetchSubItem(type, refPath) ⇒ Promise.RecordDocument

some items are stored in the database as a single-record collection, using the same Id as the parent

Kind: static method of Utilities

ParamTypeDescription
typestringrefers to the sub-collection name
refPathstringrefers to the "/" separate path to the required parent document in firebase

Utilities.fetchType(type, refPath) ⇒ Promise.Array.RecordDocument

returns an entire sub-collection by "type" (sub-collection name). If refpath is omitted, assumes "type" is a top-level collection

Kind: static method of Utilities

ParamTypeDescription
typestringrefers to the sub-collection name
refPathstringoptionally refers to the "/" separate path to the parent document in firebase

Utilities.selectAccountData(state, type)

parameterized selector

Kind: static method of Utilities

ParamTypeDescription
stateReduxStoreRedux State/Store
typestring

Utilities.searchType(type, prompt, limit) ⇒ Promise.<HostArray>

This function is a parameterized selector

Kind: static method of Utilities
Returns: Promise.<HostArray> - - returns an array of results, up to limit

ParamTypeDescription
type"MANAGEDARTISTS" | "MANAGEDVENUES"type of list to select. Returns {null} for others
promptstring"search" string (starts-with)
limitnumberlimit results (from start)

Utilities.processTarget(target) ⇒ object

Generic synchronous form processing function - handles values and returns results as a keyed object

Kind: static method of Utilities

ParamType
targeteventTarget

Utilities.processItemType(item, type, refPath) ⇒ Promise.RecordDocument

generic form data processing for database by "type" (collection name)

Kind: static method of Utilities

ParamTypeDescription
itemRecordDocument
typestringrefers to the sub-collection name
refPathstringoptionally refers to the "/" separate path to the parent document in firebase

Utilities.formatLinkedItem(link, type, refPath) ⇒ Promise.string

fetches a sub-record from the database and returns the result as a summary string

Kind: static method of Utilities

ParamTypeDescription
linkstringrefers to the linking "value" - a documentID
typestringrefers to the sub-collection name
refPathstringrefers to the "/" separate path to the required parent document in firebase

Utilities.summarizeItem(item, type) ⇒ string

parameterized function to return string summary of an object By default, returns the "name" property of the item.

Kind: static method of Utilities

ParamTypeDescription
itemobjectdata object to summarize
typeString | "People" | "Addresses" | "accessControl"- type of the object to summarize

Utilities.findIconName(url) ⇒ string

Hacky way to match Icons to urlLowerCase

Kind: static method of Utilities

ParamType
urlstring

Utilities.typedSortArray(type) ⇒ Array.SortObject

Firebase query support - builds default sort options

Kind: static method of Utilities

ParamType
typestring

Utilities~stripDocIdFromRefPath(refPath) ⇒ string

pulls the document Id from a passed refPath string (firebase dependent)

Kind: inner method of Utilities
Returns: string - Id

ParamType
refPathstring

Utilities~HostArray : ArtistFormType | VenueType

Kind: inner typedef of Utilities

Boilerplate

Boilerplate and generic constants and functions for browser Support

Boilerplate.subscriberGenerator(sliceName, tableName, filterArray, sortArray, reference, atRoot, transformer) ⇒ string

Sets up a listener, and starts it running, in the Listener Store SYNCHRONOUS

Kind: static method of Boilerplate
Returns: string - listenerStore slot key

ParamTypeDescription
sliceNamestringname of "slice" of redux store to save subscribed data typeof
tableNamestringname of specific database table to listen to, same as Redux location to save to
filterArrayArray.FilterObject
sortArrayArray.SortObject
referencestringpath to base "tableName" from
atRootbooleansimplifies listener functions is at atRoot
transformercallbackoptional function to "transform" data results

Boilerplate~ListenGenerator(sliceName, tableName, filterArray, sortArray, transformer) ⇒ callback

Sets up a listener for the Listener Store Assumes a CollectionGroup query

Kind: inner method of Boilerplate
Returns: callback - unsubscribe function

ParamTypeDefaultDescription
sliceNamestringname of "slice" of redux store to save subscribed data typeof
tableNamestringname of specific database table to listen to, same as Redux location to save to
filterArrayArray.FilterObject
sortArrayArray.SortObject
transformercallbackoptional function to "transform" data results

Boilerplate~ListenShallowGenerator(sliceName, tableName, filterArray, sortArray, reference, transformer) ⇒ callback

Sets up a listener for the Listener Store Assumes a simple Collection query

Kind: inner method of Boilerplate
Returns: callback - unsubscribe function

ParamTypeDefaultDescription
sliceNamestringname of "slice" of redux store to save subscribed data typeof
tableNamestringname of specific database table to listen to, same as Redux location to save to
filterArrayArray.FilterObject
sortArrayArray.SortObject
referencestringpath to base "tableName" from
transformercallbackoptional function to "transform" data results

Constants

Browser access and themeing constants

Constants.COMPANY_NAME

variable for shared Company Name

Kind: static property of Constants

Constants.TWITTER_ACCOUNT

variable for shared Twitter Name

Kind: static property of Constants

Constants.FACEBOOK_ACCOUNT

variable for shared Facebook Name

Kind: static property of Constants

Constants.INSTAGRAM_ACCOUNT

variable for shared Instagram Name

Kind: static property of Constants

Constants.LINKEDIN_ACCOUNT

variable for shared LinkedIn Name

Kind: static property of Constants

Constants.EMAIL_ACCOUNT

variable for shared Email Name

Kind: static property of Constants

Constants.PAYMENT_THEME

variable for shared Payment Name

Kind: static property of Constants

Constants.CANCELED_EVENT

Kind: static constant of Constants
Default: "Show Canceled"

Constants.UNBOOKED

Kind: static constant of Constants
Default: "unbooked"

Constants.UNBOOKED_EVENT

Kind: static constant of Constants
Default: "Tour Stop"

Constants.OPEN

Kind: static constant of Constants
Default: "open"

Constants.OPEN_OFFER

Kind: static constant of Constants
Default: "open"

Constants.WORKING

Kind: static constant of Constants
Default: "working"

Constants.WORKING_OFFER

Kind: static constant of Constants
Default: "working"

Constants.BOOKED

Kind: static constant of Constants
Default: "booked"

Constants.BOOKED_EVENT

Kind: static constant of Constants
Default: "Show"

Constants.SHOWS_EVENT

Kind: static constant of Constants
Default: "Show"

Constants.TOUR

Kind: static constant of Constants
Default: "tour"

Constants.INITIAL_SHOW_COUNT

Kind: static constant of Constants
Default: 5

Constants.NATION_ZOOM

Kind: static constant of Constants
Default: 3

Constants.REGION_ZOOM

Kind: static constant of Constants
Default: 10

Constants.VENUE_ZOOM

Kind: static constant of Constants
Default: 18

Constants.LABELSTYLE

Kind: static constant of Constants

Constants.REGION_MARKER

Kind: static constant of Constants
Default: BLUE_MARKER

Constants.labelStyle

Kind: static constant of Constants

Constants.set_theme()

Sets the theme to default/current values

Kind: static method of Constants

Constants~saltsweetspirits_constants

Kind: inner constant of Constants
Default: {"company_name":"SaltSweetSpirits","twitter_account":"SaltSweetSpirits","facebook_account":"SaltSweetSpirits","instagram_account":"SaltSweetSpirits","linkedin_account":"SaltSweetSpirits","email_account":"info@SaltSweetSpirits.com","logoFont":"Roboto","titleFont":"Roboto","themeFont":"Nunito","themeBackgroundColor":"#ccbebe","themeColor":"#181818","themeAccent":"#726b6b","themeShadows":"#d7ecfa","ThemeDarkColor":"#8a8a8a","themeBorderColor":"#cacaca","themeReverse":"#fefefe","themeReverseText":"#181818","palePrimaryColor":"#d7ecfa","secondaryColor":"#767676","paleSecondaryColor":"#eaeaea","successColor":"#3adb76","paleSuccessColor":"#e1faea","warningColor":"#ffae00","paleWarningColor":"#fff3d9","alertColor":"#cc4b37","paleAlertColor":"#f9ecea","themeBooked":"goldenrod","themeUnbooked":"blue","themeOpen":"green","themeWorking":"orange","themePledge":"green","themeTicket":"FireBrick","themeTour":"black","paymentTheme":"stripe"}

Constants~saltsweetspirits_dark

Kind: inner constant of Constants
Default: {"company_name":"SaltSweetSpirits","twitter_account":"SaltSweetSpirits","facebook_account":"SaltSweetSpirits","instagram_account":"SaltSweetSpirits","linkedin_account":"SaltSweetSpirits","email_account":"info@SaltSweetSpirits.com","logoFont":"Roboto","titleFont":"Roboto","themeFont":"Nunito","themeBackgroundColor":"#181818","themeAccent":"#606060","themeColor":"#efefef","themeShadows":"#d7ecfa","ThemeDarkColor":"#8a8a8a","themeBorderColor":"#cacaca","themeReverse":"#fefefe","themeReverseText":"#181818","palePrimaryColor":"#606060","secondaryColor":"#767676","paleSecondaryColor":"#eaeaea","successColor":"#3adb76","paleSuccessColor":"#e1faea","warningColor":"#ffae00","paleWarningColor":"#fff3d9","alertColor":"#cc4b37","paleAlertColor":"#f9ecea","themeBooked":"goldenrod","themeUnbooked":"blue","themeOpen":"green","themeWorking":"orange","themePledge":"green","themeTicket":"FireBrick","themeTour":"black","paymentTheme":"night"}

Constants~themes

Kind: inner constant of Constants
Default: "saltsweetspirits_dark","saltsweetspirits_constants"

PledgeTickets

PledgeTickets.listenPledgeTickets(event, dataCallback, errCallback) ⇒ callback

Attaches a listener to the event's pledgetickets (if any) returns the unsubscribe function; will be called AT LEAST ONCE with initial document

Kind: static method of PledgeTickets
Returns: callback - a unsubscribe function to dismiss the listener

ParamTypeDescription
eventEventTypeevent record (with refPath) to get pledgeTickets from
dataCallbackcallbacka callback function to call when when there is an update event on the pledgeTickets attached to the event
errCallbackcallbacka callback function for error conditions

PledgeTickets.browserCheckIn(pledgeTicket, newCheckIn) ⇒ Promise

Calls Function Server to securely create a CheckIn

Kind: static method of PledgeTickets

ParamType
pledgeTicketPledgeTicketType
pledgeTicket.refPathstring
newCheckInobject

ConfigureStore

Customzied Redux Store and support - legacy naming

ConfigureStore.store : ReduxStore

Kind: static constant of ConfigureStore

ConfigureStore~asyncReducers : object

Initializes a dictionary to keep track of the registered async reducers

Kind: inner property of ConfigureStore

ConfigureStore~listeners : object

Initializes a dictionary to keep track of registered defered inits

Kind: inner property of ConfigureStore

ConfigureStore~injectReducer(key, asyncReducer)

Kind: inner method of ConfigureStore

ParamTypeDescription
keystringunique key/name
asyncReducercallback

ConfigureStore~injectListener(key, listener, deleteOnSub)

Kind: inner method of ConfigureStore

ParamTypeDescription
keystringunique string to identify this listener
listenerfunctionfunction that establishes a database listener; expects function to return an unsubscribe function.
deleteOnSubbooleanflag to indicate whether to delete the listener altogether when unsubscribed (removes from defers)

ConfigureStore~runListener(key)

Runs a specific listener by Key

Kind: inner method of ConfigureStore

ParamTypeDescription
keystringunique string to identify which listener to start expects the listener to return an unsubscribe function to be saved

ConfigureStore~deferred()

Runs all defered listeners

Kind: inner method of ConfigureStore

ConfigureStore~unsubscribeListeners()

Calls all listener's unsubscribe functions

Kind: inner method of ConfigureStore

ConfigureStore~createReducer(asyncReducers)

takes an array of reducers (possibly async) and returns a single reducer structure

Kind: inner method of ConfigureStore

ParamType
asyncReducersArray.callback

ConfigureStore~ReduxStore : object

Kind: inner typedef of ConfigureStore

ReduxStore

Redux Store and State modules

CampaignsRedux

Redux slice

FundamentalsRedux

GenresRedux

ImagesRedux

OrganizationRedux

Organization Redux store & actions

PaymentRedux

PeopleRedux

RegionsRedux

RolesRedux

SkillsRedux

BoilerplateRedux

Generic Redux functions and constants

BoilerplateRedux.setGeneric ⇒ ActionItem

Creates and dispatches an ActionItem based on the "slice" name, specific action type, and payload

Kind: static constant of BoilerplateRedux

ParamTypeDescription
sliceNamestring
specificstringaction type
payloadobject

BoilerplateRedux.BROWSINGDATE

Kind: static constant of BoilerplateRedux

BoilerplateRedux.genericReduxAction(sliceName, specific, payload) ⇒ ActionItem

Creates and returns an ActionItem based on the "slice" name, specific action type, and payload

Kind: static method of BoilerplateRedux

ParamTypeDescription
sliceNamestring
specificstringaction type
payloadobject

BoilerplateRedux.selectGeneric(state, sliceName, which)

gets Redux information by "slice" (really, which reducer) and "which" (table name) Synchronous to state changes

Kind: static method of BoilerplateRedux

ParamTypeDescription
stateReduxStateRedux state/store
sliceNamestringa name to identify the reducer/state segment
whichstringthe name of the sub-table ("specific type")

BoilerplateRedux.getGeneric(sliceName, which)

gets Redux information by "slice" (really, which reducer) and "which" (table name) Asynchronous to state changes

Kind: static method of BoilerplateRedux

ParamTypeDescription
sliceNamestringa name to identify the reducer/state segment
whichstringthe name of the sub-table ("specific type")

BoilerplateRedux~ActionItem : object

Kind: inner typedef of BoilerplateRedux
Properties

NameType
typestring
payloadobject

CampaignsActions

Action Support

CampaignsActions.SET_CAMPAIGNS

Kind: static constant of CampaignsActions

CampaignsActions.setCampaigns(campaigns) ⇒ ActionObject

action function to store campaigns in Reducer

Kind: static method of CampaignsActions

ParamType
campaignsArray.CampaignType

GenresActions

GenresActions.LOAD_GENRES

Kind: static constant of GenresActions
Default: "LOAD_GENRES"

GenresActions.loadGenres(genres) ⇒ ActionItem

creates a loadGenres ActionItem

Kind: static method of GenresActions

ParamType
genresArray.GenreObject

GenresActions.updateGenres(genres) ⇒ ActionItem

creates and dispatches a loadGenres ActionItem

Kind: static method of GenresActions

ParamType
genresArray.GenreObject

GenresActions.genreList() ⇒ Array.GenreObject

creates a muttable copy of Gneres from the redux sture

Kind: static method of GenresActions

GenresActions.selectGenres(state) ⇒ Array.GenreObject

Returns a state slice for lifecycle operations

Kind: static method of GenresActions

ParamType
stateReduxState

OrganizationActions

Redux actions related to Organizations

OrganizationActions.SET_ACTIVE_ORGANIZATION

Kind: static constant of OrganizationActions
Read only: true

OrganizationActions.ORG_REDUCER

Kind: static constant of OrganizationActions
Read only: true

OrganizationActions.setActiveOrganizationAction(organization) ⇒ ActionItem

creates the action item for dispatching

Kind: static method of OrganizationActions

ParamType
organizationOrganizationType

OrganizationActions.setActiveOrganization(organization) ⇒ ActionItem

Creates and dispatches the action

Kind: static method of OrganizationActions

ParamType
organizationOrganizationType

OrganizationActions.selectActiveOrganization(state) ⇒ Organization

Retrieves the item from synchronous passed (i.e. active) state

Kind: static method of OrganizationActions

ParamType
stateReduxState

OrganizationActions.getActiveOrganization() ⇒ OrganizationType

reads the item from current state. Asynchronous to state changes

Kind: static method of OrganizationActions

OrganizationActions.setOrganizationBrowsingDate(date) ⇒ ActionItem

Kind: static method of OrganizationActions

ParamType
datedateString

OrganizationActions.selectOrganizationBrowsingDate(state) ⇒ dateString

Kind: static method of OrganizationActions

ParamType
stateReduxState

OrganizationActions.setOrganizationRegionPreference(region) ⇒ ActionItem

Creates and dispatches the action item

Kind: static method of OrganizationActions

ParamType
regionstring

OrganizationActions.selectOrganizationRegionPreference(state) ⇒ RegionType

Retrieves the item from synchronous passed (i.e. active) state

Kind: static method of OrganizationActions

ParamType
stateReduxState

OrganizationActions.getOrganizationRegionPreference() ⇒ RegionType

reads the item from current state. Asynchronous to state changes

Kind: static method of OrganizationActions

OrganizationActions.setOrganizationListPreference(isList) ⇒ ActionItem

Creates and dispatches the organization listing choice

Kind: static method of OrganizationActions

ParamType
isListboolean

OrganizationActions.selectOrganizationListPreference(state) ⇒ boolean

Retrieves the item from synchronous passed (i.e. active) state

Kind: static method of OrganizationActions

ParamType
stateReduxState

OrganizationActions.getOrganizationListPreference() ⇒ boolean

reads the item from current state. Asynchronous to state changes

Kind: static method of OrganizationActions

OrganizationActions.setOrganizationCalendarView(view) ⇒ ActionItem

Creates and dispatches the organization callendar view choice

Kind: static method of OrganizationActions

ParamType
viewCalendarViewType

OrganizationActions.selectOrganizationCalendarView(state) ⇒ CalendarViewType

Retrieves the item from synchronous passed (i.e. active) state

Kind: static method of OrganizationActions

ParamType
stateReduxState

OrganizationActions.getOrganizationCalendarView() ⇒ CalendarViewType

reads the item from current state. Asynchronous to state changes

Kind: static method of OrganizationActions

OrganizationActions.setOrganizationInflight(inflight) ⇒ ActionItem

Creates and dispatches the organization update inflight choice

Kind: static method of OrganizationActions

ParamType
inflightboolean

OrganizationActions.selectOrganizationInflight(state) ⇒ boolean

Retrieves the item from synchronous passed (i.e. active) state

Kind: static method of OrganizationActions

ParamType
stateReduxState

OrganizationActions.getOrganizationInflight() ⇒ boolean

reads the item from current state. Asynchronous to state changes

Kind: static method of OrganizationActions

OrganizationActions.setOrganizationGenresPreference(genres)

sets the preferences in Redux

Kind: static method of OrganizationActions

ParamType
genresArray.GenreType

OrganizationActions.selectOrganizationGenresPreference(state)

selector from state

Kind: static method of OrganizationActions

ParamType
stateReduxState

OrganizationActions.getOrganizationGenresPreference(state)

asynchronous selector from state

Kind: static method of OrganizationActions

ParamType
stateReduxState

OrganizationActions.selectOrganizationEvents(state) ⇒ string

Retrieves the item from synchronous passed (i.e. active) state

Kind: static method of OrganizationActions

ParamType
stateReduxState

OrganizationActions.selectOrganizationSummaries(state) ⇒ string

Retrieves the item from synchronous passed (i.e. active) state

Kind: static method of OrganizationActions

ParamType
stateReduxState

OrganizationActions.selectOrganizationBookingOffers(state) ⇒ string

Retrieves the item from synchronous passed (i.e. active) state

Kind: static method of OrganizationActions

ParamType
stateReduxState

OrganizationActions.selectOrganizationBids(state) ⇒ string

Retrieves the item from synchronous passed (i.e. active) state

Kind: static method of OrganizationActions

ParamType
stateReduxState

SkillsActions

SkillsActions.LOAD_SKILLS

Kind: static constant of SkillsActions
Default: "LOAD_SKILLS"

SkillsActions.loadSkills(skills) ⇒ ActionItem

Returns an ActionItem

Kind: static method of SkillsActions

ParamType
skillsArray.SkillsObject

SkillsActions.updateSkills(skills) ⇒ ActionItem

Creates and Dispathes an ActionItem

Kind: static method of SkillsActions

ParamType
skillsArray.SkillsObject

SkillsActions.skillList() ⇒ Array.SkillObject

Kind: static method of SkillsActions

SkillsActions.selectSkills(state) ⇒ Array.SkillObject

Kind: static method of SkillsActions

ParamType
stateReduxSlice

CampaignReducer

Reducer Support

module.exports(state, action) ⇒ ReduxSlice

Campaign Reducer

Kind: Exported function

ParamTypeDescription
stateReduxSlicestate local to this slice
actionActionObject

module.exports~InitialState

Kind: inner constant of module.exports
Default: []

FundamentalsReducer

module.exports(state, action) ⇒ ReduxSlice

reducer

Kind: Exported function

ParamType
stateReduxSlice
actionActionItem

module.exports~InitialState

Kind: inner constant of module.exports
Default: {}

GenresReducer

module.exports(state, action) ⇒ ReduxSlice

reducer

Kind: Exported function

ParamType
stateReduxSlice
actionActionItem

module.exports~InitialState

Kind: inner constant of module.exports
Default: {"genres":null}

ImagesReducer

module.exports(state, action) ⇒ ReduxSlice

reducer

Kind: Exported function

ParamType
stateReduxSlice
actionActionItem

module.exports~InitialState

Kind: inner constant of module.exports
Default: {"image":null,"banner":null,"loading":null}

OrganizationReducer

module.exports(state, action) ⇒ ReduxSlice

reducer

Kind: Exported function

ParamType
stateReduxSlice
actionActionItem

PaymentReducer

module.exports(state, action) ⇒ ReduxSlice

reducer

Kind: Exported function

ParamType
stateReduxSlice
actionActionItem

PeopleReducer

module.exports(state, action) ⇒ ReduxSlice

reducer

Kind: Exported function

ParamType
stateReduxSlice
actionActionItem

RegionsReducer

module.exports(state, action) ⇒ ReduxSlice

reducer

Kind: Exported function

ParamType
stateReduxSlice
actionActionItem

RolesReducer

module.exports(state, action) ⇒ ReduxSlice

reducer

Kind: Exported function

ParamType
stateReduxSlice
actionActionItem

SkillsReducer

module.exports(state, action) ⇒ ReduxSlice

reducer

Kind: Exported function

ParamType
stateReduxSlice
actionActionItem

getRole(roleId) ⇒ Role

Kind: global function

ParamTypeDescription
roleIdstringId associated with a role

© 2020-2023 Tracy Hall

0.1.0-beta.133

2 years ago

0.1.0-beta.132

2 years ago

0.1.0-beta.130

2 years ago

0.1.0-beta.129

2 years ago

0.1.0-beta.128

2 years ago

0.1.0-beta.127

2 years ago

0.1.0-beta.126

2 years ago

0.1.0-beta.125

2 years ago

0.1.0-beta.124

2 years ago

0.1.0-beta.123

2 years ago

0.1.0-beta.122

2 years ago

0.1.0-beta.121

2 years ago

0.1.0-beta.120

2 years ago

0.1.0-beta.119

2 years ago

0.1.0-beta.118

2 years ago

0.1.0-beta.117

2 years ago

0.1.0-beta.116

2 years ago

0.1.0-beta.115

2 years ago

0.1.0-beta.114

2 years ago

0.1.0-beta.113

2 years ago

0.1.0-beta.112

2 years ago

0.1.0-beta.110

2 years ago

0.1.0-beta.109

2 years ago

0.1.0-beta.108

2 years ago

0.1.0-beta.107

2 years ago

0.1.0-beta.106

2 years ago

0.1.0-beta.105

2 years ago

0.1.0-beta.104

2 years ago

0.1.0-beta.103

2 years ago

0.1.0-beta.102

2 years ago

0.1.0-beta.101

2 years ago

0.1.0-beta.100

2 years ago

0.1.0-beta.99

2 years ago

0.1.0-beta.98

2 years ago

0.1.0-beta.97

2 years ago

0.1.0-beta.96

2 years ago

0.1.0-beta.95

2 years ago

0.1.0-beta.94

2 years ago

0.1.0-beta.93

2 years ago

0.1.0-beta.92

2 years ago

0.1.0-beta.91

2 years ago

0.1.0-beta.90

2 years ago

0.1.0-beta.89

2 years ago

0.1.0-beta.88

2 years ago

0.1.0-beta.87

2 years ago

0.1.0-beta.86

2 years ago

0.1.0-beta.85

2 years ago

0.1.0-beta.84

2 years ago

0.1.0-beta.82

2 years ago

0.1.0-beta.81

2 years ago

0.1.0-beta.80

2 years ago

0.1.0-beta.79

2 years ago

0.1.0-beta.78

2 years ago

0.1.0-beta.77

2 years ago

0.1.0-beta.76

2 years ago

0.1.0-beta.75

2 years ago

0.1.0-beta.74

2 years ago

0.1.0-beta.73

2 years ago

0.1.0-beta.72

2 years ago

0.1.0-beta.69

2 years ago

0.1.0-beta.68

2 years ago

0.1.0-beta.67

2 years ago

0.1.0-beta.66

2 years ago

0.1.0-beta.65

2 years ago

0.1.0-beta.64

2 years ago

0.1.0-beta.63

2 years ago

0.1.0-beta.62

2 years ago

0.1.0-beta.61

2 years ago

0.1.0-beta.60

2 years ago

0.1.0-beta.59

2 years ago

0.1.0-beta.58

2 years ago

0.1.0-beta.57

2 years ago

0.1.0-beta.56

2 years ago

0.1.0-beta.55

2 years ago

0.1.0-beta.54

2 years ago

0.1.0-beta.53

2 years ago

0.1.0-beta.52

2 years ago

0.1.0-beta.51

2 years ago

0.1.0-beta.50

2 years ago

0.1.0-beta.49

2 years ago

0.1.0-beta.48

2 years ago

0.1.0-beta.47

2 years ago

0.1.0-beta.46

2 years ago

0.1.0-beta.45

2 years ago

0.1.0-beta.44

2 years ago

0.1.0-beta.43

2 years ago

0.1.0-beta.42

2 years ago

0.1.0-beta.41

2 years ago

0.1.0-beta.40

2 years ago

0.1.0-beta.39

2 years ago

0.1.0-beta.38

2 years ago

0.1.0-beta.37

2 years ago

0.1.0-beta.36

2 years ago

0.1.0-beta.35

2 years ago

0.1.0-beta.34

2 years ago

0.1.0-beta.33

2 years ago

0.1.0-beta.32

2 years ago

0.1.0-beta.31

2 years ago

0.1.0-beta.30

2 years ago

0.1.0-beta.29

2 years ago

0.1.0-beta.28

2 years ago

0.1.0-beta.27

2 years ago

0.1.0-beta.26

2 years ago

0.1.0-beta.25

2 years ago

0.1.0-beta.24

2 years ago

0.1.0-beta.23

2 years ago

0.1.0-beta.22

2 years ago

0.1.0-beta.21

2 years ago

0.1.0-beta.20

2 years ago

0.1.0-beta.19

2 years ago

0.1.0-beta.18

2 years ago

0.1.0-beta.17

2 years ago

0.1.0-beta.16

2 years ago

0.1.0-beta.15

2 years ago

0.1.0-beta.14

2 years ago

0.1.0-beta.13

2 years ago

0.1.0-beta.12

2 years ago

0.1.0-beta.11

2 years ago

0.1.0-beta.10

2 years ago

0.1.0-beta.9

2 years ago

0.1.0-beta.8

2 years ago

0.1.0-beta.7

2 years ago

0.1.0-beta.6

2 years ago

0.1.0-beta.5

2 years ago

0.1.0-beta.4

2 years ago

0.1.0-beta.3

2 years ago

0.1.0-beta.2

2 years ago

0.1.0-beta.1

2 years ago

0.1.0-beta.0

2 years ago