UNPKG

synctos

Version:

The Syncmaker. A tool to build comprehensive sync functions for Couchbase Sync Gateway.

38 lines (37 loc) 1.16 kB
{ channels: toDefaultSyncChannels(doc, oldDoc, 'INVOICE_PAYMENT_REQUISITIONS'), authorizedRoles: defaultAuthorizedRoles, authorizedUsers: defaultAuthorizedUsers, typeFilter: function(doc, oldDoc) { // Note that this regex uses double quotes rather than single quotes as a workaround to https://github.com/Kashoo/synctos/issues/116 return createBusinessEntityRegex("invoice\\.[A-Za-z0-9_-]+.paymentRequisitions$").test(doc._id); }, propertyValidators: { paymentProcessorId: { // The ID of the payment processor to use type: 'string', required: true, mustNotBeEmpty: true }, paymentRequisitionIds: { // A list of payment requisitions that were issued for the invoice type: 'array', required: true, mustNotBeEmpty: true, arrayElementsValidator: { type: 'string', required: true, mustNotBeEmpty: true } }, paymentAttemptIds: { // A list of payment attempts that were made for the invoice type: 'array', arrayElementsValidator: { type: 'string', required: true, mustNotBeEmpty: true } } } }