new BaseObjects(token, org, processName, objType)
Parameters:
Name | Type | Description |
---|---|---|
token |
string | GitHub API token |
org |
string | GitHub organization name |
processName |
string | Process name for locking |
objType |
string | Object type |
- Source:
Methods
-
<private> _createError(message, data, statusCode)
-
Creates a standardized error response
Parameters:
Name Type Default Description message
String Error message
data
Object null Error data
statusCode
Number 400 HTTP status code
- Source:
Returns:
Standardized error response
- Type
- Array
-
<private> _createSuccess(message, data, statusCode)
-
Creates a standardized success response
Parameters:
Name Type Default Description message
String Success message
data
Object null Response data
statusCode
Number 200 HTTP status code
- Source:
Returns:
Standardized success response
- Type
- Array
-
<async, private> _executeTransaction(operations, transactionName)
-
Executes a series of operations as a transaction
Parameters:
Name Type Description operations
Array.<function()> Array of async functions to execute
transactionName
String Name of the transaction for logging
- Source:
Returns:
Result of the transaction
- Type
- Promise.<Array>
-
<private> _invalidateCache()
-
Invalidate cache entries when data is modified
- Source:
-
<private> _validateParams(params, expectedTypes)
-
Validates parameters against expected types
Parameters:
Name Type Description params
Object Parameters to validate
expectedTypes
Object Expected types for each parameter
- Source:
Returns:
Error response or null if valid
- Type
- Array | null
-
<async> batchUpdate(updates)
-
Perform batch updates on multiple objects
Parameters:
Name Type Description updates
Array Array of update operations
- Source:
Returns:
Results of the update operations
- Type
- Promise.<Array>
-
<async> checkForLock()
-
Check if a container is locked
- Source:
Returns:
Lock status
- Type
- Promise.<Array>
-
<async> checkForUpdates(lastKnownCommitSha, branchName, repo)
-
Check if the branch has been updated since a specific commit
Parameters:
Name Type Default Description lastKnownCommitSha
string The last known commit SHA
branchName
string main Name of the branch to check (default: 'main')
repo
string MegaRoast_discovery Name of the repository (default: 'MegaRoast_discovery')
- Source:
Returns:
Status indicating if an update is needed
- Type
- Promise.<Array>
-
<async> getBranchStatus(branchName, repo)
-
Get the latest commit status for a branch
Parameters:
Name Type Default Description branchName
string main Name of branch to check (default: 'main')
repo
string MegaRoast_discovery Name of the repository (default: 'Megaroast_discovery')
- Source:
Returns:
Latest commit information
- Type
- Promise.<Array>
-
<async> search(filters, options)
-
Enhanced search functionality with better filtering options
Parameters:
Name Type Description filters
Object Filter criteria
options
Object Search options (limit, sort, etc)
- Source:
Returns:
Search results
- Type
- Promise.<Array>