piper-utils 1.1.70 → 1.1.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/main.js +73 -3
- package/bin/main.js.map +1 -1
- package/nul +82 -0
- package/package.json +1 -1
- package/src/contract/contract.js +42 -0
- package/src/contract/contract.test.js +36 -0
- package/src/database/dbUtils/partnerAccess/accessScope.test.js +287 -287
- package/src/database/dbUtils/queryStringUtils/getPagination.js +29 -0
- package/src/database/dbUtils/queryStringUtils/getPagination.test.js +83 -0
- package/src/eventManager/handleFile.js +129 -115
- package/src/eventManager/handleFile.test.js +463 -460
- package/src/index.js +8 -0
package/bin/main.js
CHANGED
|
@@ -42,6 +42,27 @@ function resolveAccess(event){if((0,_accessRightsUtils.isSuperUser)(event))retur
|
|
|
42
42
|
*/
|
|
43
43
|
async function get(params){return _libDynamodb.DynamoDBDocument.from(new _clientDynamodb.DynamoDB).get(params)}(params)};exports.default=dynamoUtil;
|
|
44
44
|
/***/},
|
|
45
|
+
/***/87(__unused_webpack_module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.MAX_LIMIT=exports.DEFAULT_LIMIT=void 0,exports.getPagination=
|
|
46
|
+
/**
|
|
47
|
+
* Read a sanitized limit/offset out of a request's query string.
|
|
48
|
+
*
|
|
49
|
+
* Every consuming repo was hand-rolling `parseInt(qsp.limit ?? '10')`, which has
|
|
50
|
+
* a sharp edge: parseInt('abc') and parseInt('') are NaN, and findAll() below
|
|
51
|
+
* does `options.limit || 0` -> Sequelize `limit: 1`. So `?limit=abc` silently
|
|
52
|
+
* returned exactly one row instead of a page. This clamps instead, and bounds
|
|
53
|
+
* the upper end so `?limit=100000` can't be used to pull a whole table.
|
|
54
|
+
*
|
|
55
|
+
* The cap is deliberately loose — it exists to stop abuse, not to be a tight
|
|
56
|
+
* page size. Pass maxLimit when a route needs a different ceiling.
|
|
57
|
+
*
|
|
58
|
+
* @param {object} event - The lambda event passed in by a validated api request.
|
|
59
|
+
* @param {object} [options] - Overrides.
|
|
60
|
+
* @param {number} [options.defaultLimit] - Limit when none is supplied (default 10).
|
|
61
|
+
* @param {number} [options.maxLimit] - Upper bound for limit (default 500).
|
|
62
|
+
* @returns {{limit: number, offset: number}} Sanitized pagination.
|
|
63
|
+
*/
|
|
64
|
+
function getPagination(event,{defaultLimit=DEFAULT_LIMIT,maxLimit=MAX_LIMIT}={}){const query=event?.queryStringParameters||{},limit=Math.max(1,Math.min(parseInt(query.limit,10)||defaultLimit,maxLimit)),offset=Math.max(0,parseInt(query.offset,10)||0);return{limit,offset}}
|
|
65
|
+
/***/;const DEFAULT_LIMIT=exports.DEFAULT_LIMIT=10,MAX_LIMIT=exports.MAX_LIMIT=500},
|
|
45
66
|
/***/95(__unused_webpack_module,exports,__webpack_require__){Object.defineProperty(exports,"__esModule",{value:!0}),exports.handleDirectS3WriteEvent=function handleDirectS3WriteEvent(event,transformer,errorHandlerPerFile,shouldSkipFailedFolders=!1,userImportTypes){if(!event||!event.Records)return _bluebird.default.resolve();let hasErrors=!1;return _bluebird.default.map(event.Records,record=>{const s3Bucket=record.s3.bucket.name,file=record.s3.object.key||[];let path=decodeURIComponent(file);if(path)return(0,_handleFile.handleFile)(path,s3Bucket,transformer,{shouldSkipFailedFolders,userImportTypes}).catch(err=>{errorHandlerPerFile&&!errorHandlerPerFile(err,path)&&(console.error("HANDLE-FILE-CATCH:",err),hasErrors=!0)})}).then(()=>{if(hasErrors)throw new Error("ERROR: HANDLE-FILE (DIRECT S3 EVENT)")})}
|
|
46
67
|
/***/,exports.handleEvents=function handleEvents(event,transformer,errorHandlerPerFile,shouldSkipFailedFolders=!1,userImportTypes){if(!event||!event.Records)return _bluebird.default.resolve();let hasErrors=!1;return _bluebird.default.map(event.Records,record=>{const snsInfo=JSON.parse(_lodash.default.get(record,"Sns.Message","{}")),s3Bucket=snsInfo.bucket,files=snsInfo.files||[];return _bluebird.default.map(files,file=>{let path=decodeURIComponent(file);if(path)return(0,_handleFile.handleFile)(path,s3Bucket,transformer,{shouldSkipFailedFolders,userImportTypes}).catch(err=>{errorHandlerPerFile&&!errorHandlerPerFile(err,path)&&(console.error("HANDLE-FILE-CATCH: ",err),hasErrors=!0)})})}).then(()=>{if(hasErrors)throw new Error("ERROR: HANDLE-FILE")})};var _handleFile=__webpack_require__(876),_lodash=_interopRequireDefault(__webpack_require__(825)),_bluebird=_interopRequireDefault(__webpack_require__(564));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},
|
|
47
68
|
/***/137(module){module.exports=require("dayjs/plugin/utc.js");
|
|
@@ -409,6 +430,37 @@ return itemType instanceof _sequelize.default.STRING||itemType instanceof _seque
|
|
|
409
430
|
//these are automatically part of the models, so add them always
|
|
410
431
|
acc.createdAt={type:_sequelize.default.DATE,filterType:_sequelize.default.Op.between},acc.updatedAt={type:_sequelize.default.DATE,filterType:_sequelize.default.Op.between},acc.id={type:_sequelize.default.INTEGER,filterType:_sequelize.default.Op.eq},acc},filters)}
|
|
411
432
|
/***/},
|
|
433
|
+
/***/269(__unused_webpack_module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.contractStatuses=exports.contractChoices=void 0,exports.isContractChoice=
|
|
434
|
+
/*
|
|
435
|
+
* True when value is a choice the signing page is allowed to send. The gateway
|
|
436
|
+
* gates on this before selecting which of the two server-side amounts to charge,
|
|
437
|
+
* so an unrecognized choice is a 400 rather than a wrong amount.
|
|
438
|
+
*
|
|
439
|
+
* @param {string} value
|
|
440
|
+
* @returns {boolean}
|
|
441
|
+
*/
|
|
442
|
+
function isContractChoice(value){return Object.values(contractChoices).includes(value)}
|
|
443
|
+
/***/;
|
|
444
|
+
/*
|
|
445
|
+
* Financing contract constants shared by the ERP (piper) and the payment
|
|
446
|
+
* gateway (piper-gateway). Both sides put these strings on the wire — the ERP
|
|
447
|
+
* writes them onto the order and the prepare payload, the gateway reads them
|
|
448
|
+
* back off the checkout page and echoes them home on the webhook — so they must
|
|
449
|
+
* agree exactly. Keeping them here is what stops a 'down' / 'Down' drift from
|
|
450
|
+
* becoming a silent mischarge.
|
|
451
|
+
*/
|
|
452
|
+
/*
|
|
453
|
+
* What the customer chose on the signing page.
|
|
454
|
+
* - full: pay the whole order total now; no financing, so no contract to sign
|
|
455
|
+
* - down: pay the down payment now and sign the financing contract for the rest
|
|
456
|
+
*/
|
|
457
|
+
const contractChoices=exports.contractChoices={full:"full",down:"down"};
|
|
458
|
+
/*
|
|
459
|
+
* Lifecycle of the contract attached to an order.
|
|
460
|
+
* - draft: order is still an estimate; nothing rendered yet
|
|
461
|
+
* - sent: contract body frozen and hashed, link is out with the customer
|
|
462
|
+
* - signed: customer consented and signed; signature + audit trail persisted
|
|
463
|
+
*/exports.contractStatuses={draft:"Draft",sent:"Sent",signed:"Signed"}},
|
|
412
464
|
/***/288(__unused_webpack_module,exports,__webpack_require__){Object.defineProperty(exports,"__esModule",{value:!0}),exports.createFilters=void 0;var _lodash=_interopRequireDefault(__webpack_require__(825)),_sequelize=_interopRequireDefault(__webpack_require__(31)),_dayjs=_interopRequireDefault(__webpack_require__(293)),_utc=_interopRequireDefault(__webpack_require__(137)),_errorCodes=__webpack_require__(953),_accessRightsUtils=__webpack_require__(673);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}_dayjs.default.extend(_utc.default);exports.createFilters=function(event,objectFilters){let query=_lodash.default.get(event,"queryStringParameters",{})||{};
|
|
413
465
|
// Extract the three convenience params before iterating.
|
|
414
466
|
// These are handled separately from the per-field filter logic below.
|
|
@@ -829,13 +881,31 @@ async function runMigrations(databaseName,sequelizeInstance,initializeModels,pat
|
|
|
829
881
|
// The tables are still initiated by being passed in to run migrations
|
|
830
882
|
await initializeModels()}
|
|
831
883
|
/***/;var _lodash=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(__webpack_require__(825)),_umzug=__webpack_require__(920)},
|
|
832
|
-
/***/876(__unused_webpack_module,exports,__webpack_require__){Object.defineProperty(exports,"__esModule",{value:!0}),exports.
|
|
884
|
+
/***/876(__unused_webpack_module,exports,__webpack_require__){Object.defineProperty(exports,"__esModule",{value:!0}),exports.handleFile=async function handleFile(path,s3Bucket,transformer,options){const shouldSkipFailedFolders=_lodash.default.get(options,"shouldSkipFailedFolders"),userImportTypes=_lodash.default.get(options,"userImportTypes"),params={Bucket:s3Bucket,Key:path};let body;try{body=await _S3Utils.default.getObject(params)}catch(e){if("NoSuchKey"===e.Code||"NoSuchKey"===e.code||"NoSuchKey"===e.name)return;throw console.error("S3 getObject error:",e),e}try{
|
|
833
885
|
// exit early for null/undefined or blank string bodies
|
|
834
886
|
if(_lodash.default.isNil(body)||_lodash.default.isString(body)&&_lodash.default.isEmpty(body.trim()))return void await _S3Utils.default.deleteObject(params);const parsedBody=JSON.parse(body);
|
|
835
887
|
// exit early for objects like {} or []
|
|
836
888
|
if(_lodash.default.isEmpty(parsedBody))return void await _S3Utils.default.deleteObject(params);const returnedValue=await transformer(parsedBody);return await _S3Utils.default.deleteObject(params),returnedValue}catch(error){if(console.error("HANDLE-FILE-ERROR",error),!body)return;let newPath="";if(userImportTypes){console.log("USER IMPORT");
|
|
837
889
|
// look for items in the userImportTypes
|
|
838
|
-
const usersImports=Object.values(userImportTypes),items=path.split("/"),fileName=_lodash.default.last(items),folderName=_lodash.default.first(items);newPath=usersImports.indexOf(folderName)>-1?shouldSkipFailedFolders?`${folderName}/error/${fileName}`:_lodash.default.startsWith(path,`${folderName}/failed-once/`)?_lodash.default.replace(path,`${folderName}/failed-once/`,`${folderName}/failed-twice/`):_lodash.default.startsWith(path,`${folderName}/failed-twice/`)?_lodash.default.replace(path,`${folderName}/failed-twice/`,`${folderName}/error/`):`${folderName}/failed-once/${fileName}`:`pathAndEventMisMatchError/${path}`}else shouldSkipFailedFolders?newPath=`error/${path}`:_lodash.default.startsWith(path,"failed-once/")?newPath=_lodash.default.replace(path,"failed-once/","failed-twice/"):_lodash.default.startsWith(path,"failed-twice/")?newPath=_lodash.default.replace(path,"failed-twice/","error/"):(_lodash.default.includes(path,"delayUntil/")&&(path=_lodash.default.last(path.split("/"))),newPath=`failed-once/${path}`);const newParams={Bucket:s3Bucket,Key:newPath,Body:body};
|
|
890
|
+
const usersImports=Object.values(userImportTypes),items=path.split("/"),fileName=_lodash.default.last(items),folderName=_lodash.default.first(items);newPath=usersImports.indexOf(folderName)>-1?shouldSkipFailedFolders?`${folderName}/error/${fileName}`:_lodash.default.startsWith(path,`${folderName}/failed-once/`)?_lodash.default.replace(path,`${folderName}/failed-once/`,`${folderName}/failed-twice/`):_lodash.default.startsWith(path,`${folderName}/failed-twice/`)?_lodash.default.replace(path,`${folderName}/failed-twice/`,`${folderName}/error/`):`${folderName}/failed-once/${fileName}`:`pathAndEventMisMatchError/${path}`}else shouldSkipFailedFolders?newPath=`error/${path}`:_lodash.default.startsWith(path,"failed-once/")?newPath=_lodash.default.replace(path,"failed-once/","failed-twice/"):_lodash.default.startsWith(path,"failed-twice/")?newPath=_lodash.default.replace(path,"failed-twice/","error/"):(_lodash.default.includes(path,"delayUntil/")&&(path=_lodash.default.last(path.split("/"))),newPath=`failed-once/${path}`);const newParams={Bucket:s3Bucket,Key:newPath,Body:body};
|
|
891
|
+
// Guard against genuine prefix nesting (e.g. `failed-once/error/<file>`) — a file that has
|
|
892
|
+
// already traversed the failure ladder. Detect this on the FOLDER SEGMENTS only, never the
|
|
893
|
+
// filename, so a user-uploaded file named e.g. `errors.csv` or `failed-once-list.csv` is
|
|
894
|
+
// not mistaken for a nested path. The previous check counted the token anywhere in the key
|
|
895
|
+
// (including the filename) and threw BEFORE the move/delete below, so the file was neither
|
|
896
|
+
// dead-lettered nor removed — publishEvents.loop() then re-listed it every tick, an
|
|
897
|
+
// infinite reprocess loop. If the destination really is nested, still DELETE the source so
|
|
898
|
+
// it dead-letters instead of looping forever. See audit finding #8.
|
|
899
|
+
if(isNestedFailurePath(newPath))throw await _S3Utils.default.deleteObject(params),new Error("NESTING ERROR");throw await _S3Utils.default.putObject(newParams),await _S3Utils.default.deleteObject(params),error}}
|
|
900
|
+
/**
|
|
901
|
+
* True when a key has already traversed the failure ladder more than once, i.e. its FOLDER
|
|
902
|
+
* portion contains more than one of the ladder stages (failed-once / failed-twice / error).
|
|
903
|
+
* Only whole path SEGMENTS are considered, never the filename, so a file literally named
|
|
904
|
+
* `errors.csv` is not treated as nested.
|
|
905
|
+
*
|
|
906
|
+
* @param {string} key - The destination S3 key
|
|
907
|
+
* @returns {boolean}
|
|
908
|
+
*/,exports.isNestedFailurePath=isNestedFailurePath;var _lodash=_interopRequireDefault(__webpack_require__(825)),_S3Utils=_interopRequireDefault(__webpack_require__(908));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isNestedFailurePath(key){const ladderStages=["failed-once","failed-twice","error"];return String(key).split("/").slice(0,-1).filter(segment=>ladderStages.includes(segment)).length>1}
|
|
839
909
|
/***/},
|
|
840
910
|
/***/908(__unused_webpack_module,exports,__webpack_require__){Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,exports.s3Utils=s3Utils;var _clientS=__webpack_require__(43);function s3Utils(action,params){return(new _clientS.S3)[action](params)}const S3Util={getObject:params=>async function getS3(params){const s3=new _clientS.S3,response=await s3.getObject(params);return response?.Body.transformToString("utf-8")}
|
|
841
911
|
/***/(params),deleteObject:params=>s3Utils("deleteObject",params),putObject:params=>s3Utils("putObject",params),listObjectsV2:params=>s3Utils("listObjectsV2",params)};exports.default=S3Util},
|
|
@@ -897,6 +967,6 @@ function createIncludes(event,objectFilters){const query=_lodash.default.get(eve
|
|
|
897
967
|
/******/
|
|
898
968
|
/************************************************************************/var __webpack_exports__={};
|
|
899
969
|
// This entry needs to be wrapped in an IIFE because it uses a non-standard name for the exports (exports).
|
|
900
|
-
(()=>{var exports=__webpack_exports__;Object.defineProperty(exports,"__esModule",{value:!0}),exports.watchBucket=exports.userDefaultBid=exports.successHtml=exports.success=exports.stampOwnBusinessId=exports.scopeToPartnerBook=exports.scopeToOwnBusiness=exports.scopeToBookUnionOwn=exports.runMigrations=exports.resolveAccess=exports.requireTicketAccess=exports.requireSuper=exports.requireCrmAccess=exports.publishEvents=exports.parseEvent=exports.parseBody=exports.isSystemUser=exports.isSuperUser=exports.isPartnerUser=exports.incrementWithAudit=exports.handleFile=exports.getModuleInfo=exports.getEffectivePartnerId=exports.getDefaultBusinessIDInfo=exports.getCurrentUserNameFromCognitoEvent=exports.getCurrentUser=exports.getCompanySettings=exports.getBusinessesInfo=exports.getBelongsToPartnerId=exports.getAuditModel=exports.getAuditFilter=exports.getAccessRightsInfo=exports.findAll=exports.failure=exports.ensurePartnerScope=exports.enrichEventWithPartnerAccess=exports.defaultFilters=exports.decrementWithAudit=exports.createSort=exports.createIncludes=exports.createFilters=exports.createAccessHelpers=exports.checkWriteAccess=exports.checkModule=exports.checkIsSuper=exports.bindAuditRequestForUser=exports.bindAuditRequest=exports.attachAudit=exports.assertCanWriteOwnBusiness=exports.assertCanWriteBookUnionOwn=exports.assertCanWriteBookBusiness=exports.accessRightsUtils=void 0;var _handleFile=__webpack_require__(876),_watchBucket=__webpack_require__(183),_publishEvents=__webpack_require__(864),_createIncludes=__webpack_require__(982),_createFilters=__webpack_require__(288),_createSort=__webpack_require__(835),_findAll=__webpack_require__(981),_accessRightsUtils=__webpack_require__(673),_requestResponse=__webpack_require__(859),_migrations=__webpack_require__(871),_defaultFilters=__webpack_require__(207),_accessContext=__webpack_require__(62),_accessGates=__webpack_require__(189),_accessScope=__webpack_require__(513),_accessWrites=__webpack_require__(165),_createAccessHelpers=__webpack_require__(539),_audit=__webpack_require__(179);exports.handleFile=_handleFile.handleFile,exports.watchBucket=_watchBucket.watchBucket,exports.publishEvents=_publishEvents.publishEvents,exports.createFilters=_createFilters.createFilters,exports.createIncludes=_createIncludes.createIncludes,exports.createSort=_createSort.createSort,exports.findAll=_findAll.findAll,exports.checkModule=_accessRightsUtils.checkModule,exports.checkIsSuper=_accessRightsUtils.checkIsSuper,exports.getAccessRightsInfo=_accessRightsUtils.getAccessRightsInfo,exports.getDefaultBusinessIDInfo=_accessRightsUtils.getDefaultBusinessIDInfo,exports.getModuleInfo=_accessRightsUtils.getModuleInfo,exports.failure=_requestResponse.failure,exports.success=_requestResponse.success,exports.runMigrations=_migrations.runMigrations,exports.getCurrentUser=_requestResponse.getCurrentUser,exports.successHtml=_requestResponse.successHtml,exports.getCurrentUserNameFromCognitoEvent=_requestResponse.getCurrentUserNameFromCognitoEvent,exports.defaultFilters=_defaultFilters.defaultFilters,exports.accessRightsUtils=_accessRightsUtils.accessRightsUtils,exports.parseBody=_requestResponse.parseBody,exports.parseEvent=_requestResponse.parseEvent,exports.getBusinessesInfo=_accessRightsUtils.getBusinessesInfo,exports.userDefaultBid=_accessRightsUtils.userDefaultBid,exports.checkWriteAccess=_accessRightsUtils.checkWriteAccess,exports.isSystemUser=_accessRightsUtils.isSystemUser,exports.isSuperUser=_accessRightsUtils.isSuperUser,exports.isPartnerUser=_accessRightsUtils.isPartnerUser,exports.getBelongsToPartnerId=_accessRightsUtils.getBelongsToPartnerId,exports.getEffectivePartnerId=_accessRightsUtils.getEffectivePartnerId,exports.enrichEventWithPartnerAccess=_accessRightsUtils.enrichEventWithPartnerAccess,exports.getCompanySettings=_accessRightsUtils.getCompanySettings,exports.resolveAccess=_accessContext.resolveAccess,exports.ensurePartnerScope=_accessContext.ensurePartnerScope,exports.requireCrmAccess=_accessGates.requireCrmAccess,exports.requireTicketAccess=_accessGates.requireTicketAccess,exports.requireSuper=_accessGates.requireSuper,exports.scopeToOwnBusiness=_accessScope.scopeToOwnBusiness,exports.scopeToPartnerBook=_accessScope.scopeToPartnerBook,exports.scopeToBookUnionOwn=_accessScope.scopeToBookUnionOwn,exports.assertCanWriteOwnBusiness=_accessWrites.assertCanWriteOwnBusiness,exports.assertCanWriteBookBusiness=_accessWrites.assertCanWriteBookBusiness,exports.assertCanWriteBookUnionOwn=_accessWrites.assertCanWriteBookUnionOwn,exports.stampOwnBusinessId=_accessWrites.stampOwnBusinessId,exports.createAccessHelpers=_createAccessHelpers.createAccessHelpers,exports.attachAudit=_audit.attachAudit,exports.bindAuditRequest=_audit.bindAuditRequest,exports.bindAuditRequestForUser=_audit.bindAuditRequestForUser,exports.decrementWithAudit=_audit.decrementWithAudit,exports.getAuditFilter=_audit.getAuditFilter,exports.getAuditModel=_audit.getAuditModel,exports.incrementWithAudit=_audit.incrementWithAudit})();var __webpack_export_target__=exports;for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__]=__webpack_exports__[__webpack_i__];__webpack_exports__.__esModule&&Object.defineProperty(__webpack_export_target__,"__esModule",{value:!0})
|
|
970
|
+
(()=>{var exports=__webpack_exports__;Object.defineProperty(exports,"__esModule",{value:!0}),exports.watchBucket=exports.userDefaultBid=exports.successHtml=exports.success=exports.stampOwnBusinessId=exports.scopeToPartnerBook=exports.scopeToOwnBusiness=exports.scopeToBookUnionOwn=exports.runMigrations=exports.resolveAccess=exports.requireTicketAccess=exports.requireSuper=exports.requireCrmAccess=exports.publishEvents=exports.parseEvent=exports.parseBody=exports.isSystemUser=exports.isSuperUser=exports.isPartnerUser=exports.isContractChoice=exports.incrementWithAudit=exports.handleFile=exports.getRequestedBusinessIds=exports.getPagination=exports.getModuleInfo=exports.getEffectivePartnerId=exports.getDefaultBusinessIDInfo=exports.getCurrentUserNameFromCognitoEvent=exports.getCurrentUser=exports.getCompanySettings=exports.getBusinessesInfo=exports.getBelongsToPartnerId=exports.getAuditModel=exports.getAuditFilter=exports.getAccessRightsInfo=exports.findAll=exports.failure=exports.ensurePartnerScope=exports.enrichEventWithPartnerAccess=exports.defaultFilters=exports.decrementWithAudit=exports.createSort=exports.createIncludes=exports.createFilters=exports.createAccessHelpers=exports.contractStatuses=exports.contractChoices=exports.checkWriteAccess=exports.checkModule=exports.checkIsSuper=exports.bindAuditRequestForUser=exports.bindAuditRequest=exports.attachAudit=exports.assertCanWriteOwnBusiness=exports.assertCanWriteBookUnionOwn=exports.assertCanWriteBookBusiness=exports.accessRightsUtils=void 0;var _handleFile=__webpack_require__(876),_watchBucket=__webpack_require__(183),_publishEvents=__webpack_require__(864),_createIncludes=__webpack_require__(982),_createFilters=__webpack_require__(288),_createSort=__webpack_require__(835),_findAll=__webpack_require__(981),_accessRightsUtils=__webpack_require__(673),_requestResponse=__webpack_require__(859),_migrations=__webpack_require__(871),_defaultFilters=__webpack_require__(207),_getPagination=__webpack_require__(87),_accessContext=__webpack_require__(62),_accessGates=__webpack_require__(189),_accessScope=__webpack_require__(513),_accessWrites=__webpack_require__(165),_createAccessHelpers=__webpack_require__(539),_contract=__webpack_require__(269),_audit=__webpack_require__(179);exports.handleFile=_handleFile.handleFile,exports.watchBucket=_watchBucket.watchBucket,exports.publishEvents=_publishEvents.publishEvents,exports.createFilters=_createFilters.createFilters,exports.createIncludes=_createIncludes.createIncludes,exports.createSort=_createSort.createSort,exports.findAll=_findAll.findAll,exports.getPagination=_getPagination.getPagination,exports.getRequestedBusinessIds=_accessRightsUtils.getRequestedBusinessIds,exports.checkModule=_accessRightsUtils.checkModule,exports.checkIsSuper=_accessRightsUtils.checkIsSuper,exports.getAccessRightsInfo=_accessRightsUtils.getAccessRightsInfo,exports.getDefaultBusinessIDInfo=_accessRightsUtils.getDefaultBusinessIDInfo,exports.getModuleInfo=_accessRightsUtils.getModuleInfo,exports.failure=_requestResponse.failure,exports.success=_requestResponse.success,exports.runMigrations=_migrations.runMigrations,exports.getCurrentUser=_requestResponse.getCurrentUser,exports.successHtml=_requestResponse.successHtml,exports.getCurrentUserNameFromCognitoEvent=_requestResponse.getCurrentUserNameFromCognitoEvent,exports.defaultFilters=_defaultFilters.defaultFilters,exports.accessRightsUtils=_accessRightsUtils.accessRightsUtils,exports.parseBody=_requestResponse.parseBody,exports.parseEvent=_requestResponse.parseEvent,exports.getBusinessesInfo=_accessRightsUtils.getBusinessesInfo,exports.userDefaultBid=_accessRightsUtils.userDefaultBid,exports.checkWriteAccess=_accessRightsUtils.checkWriteAccess,exports.isSystemUser=_accessRightsUtils.isSystemUser,exports.isSuperUser=_accessRightsUtils.isSuperUser,exports.isPartnerUser=_accessRightsUtils.isPartnerUser,exports.getBelongsToPartnerId=_accessRightsUtils.getBelongsToPartnerId,exports.getEffectivePartnerId=_accessRightsUtils.getEffectivePartnerId,exports.enrichEventWithPartnerAccess=_accessRightsUtils.enrichEventWithPartnerAccess,exports.getCompanySettings=_accessRightsUtils.getCompanySettings,exports.resolveAccess=_accessContext.resolveAccess,exports.ensurePartnerScope=_accessContext.ensurePartnerScope,exports.requireCrmAccess=_accessGates.requireCrmAccess,exports.requireTicketAccess=_accessGates.requireTicketAccess,exports.requireSuper=_accessGates.requireSuper,exports.scopeToOwnBusiness=_accessScope.scopeToOwnBusiness,exports.scopeToPartnerBook=_accessScope.scopeToPartnerBook,exports.scopeToBookUnionOwn=_accessScope.scopeToBookUnionOwn,exports.assertCanWriteOwnBusiness=_accessWrites.assertCanWriteOwnBusiness,exports.assertCanWriteBookBusiness=_accessWrites.assertCanWriteBookBusiness,exports.assertCanWriteBookUnionOwn=_accessWrites.assertCanWriteBookUnionOwn,exports.stampOwnBusinessId=_accessWrites.stampOwnBusinessId,exports.createAccessHelpers=_createAccessHelpers.createAccessHelpers,exports.attachAudit=_audit.attachAudit,exports.bindAuditRequest=_audit.bindAuditRequest,exports.bindAuditRequestForUser=_audit.bindAuditRequestForUser,exports.decrementWithAudit=_audit.decrementWithAudit,exports.getAuditFilter=_audit.getAuditFilter,exports.getAuditModel=_audit.getAuditModel,exports.incrementWithAudit=_audit.incrementWithAudit,exports.contractChoices=_contract.contractChoices,exports.contractStatuses=_contract.contractStatuses,exports.isContractChoice=_contract.isContractChoice})();var __webpack_export_target__=exports;for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__]=__webpack_exports__[__webpack_i__];__webpack_exports__.__esModule&&Object.defineProperty(__webpack_export_target__,"__esModule",{value:!0})
|
|
901
971
|
/******/})();
|
|
902
972
|
//# sourceMappingURL=main.js.map
|