payservedb 9.9.0 → 9.9.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payservedb",
3
- "version": "9.9.0",
3
+ "version": "9.9.2",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -17,6 +17,10 @@ const CustomerSchema = new mongoose.Schema({
17
17
  type: String,
18
18
  required: true,
19
19
  },
20
+ companyName: {
21
+ type: String,
22
+ required: false,
23
+ },
20
24
  displayName: {
21
25
  type: String,
22
26
  required: false,
@@ -107,6 +107,34 @@ const LevyContractSchema = new Schema(
107
107
  default: null
108
108
  // Format: "2025-09", "2025-10", etc.
109
109
  },
110
+ // Zoho Books retainer invoice sync tracking
111
+ zohoSync: {
112
+ retainerInvoiceId: {
113
+ type: String,
114
+ default: null
115
+ },
116
+ retainerInvoiceNumber: {
117
+ type: String,
118
+ default: null
119
+ },
120
+ retainerSynced: {
121
+ type: Boolean,
122
+ default: false
123
+ },
124
+ retainerSyncStatus: {
125
+ type: String,
126
+ enum: ['pending', 'synced', 'failed', 'not-applicable'],
127
+ default: 'not-applicable'
128
+ },
129
+ retainerSyncedAt: {
130
+ type: Date,
131
+ default: null
132
+ },
133
+ lastRetainerSyncError: {
134
+ type: String,
135
+ default: null
136
+ }
137
+ },
110
138
  // Upfront payment fields
111
139
  upfrontPayment: {
112
140
  enabled: {
@@ -135,6 +163,15 @@ const LevyContractSchema = new Schema(
135
163
  type: [String],
136
164
  default: []
137
165
  },
166
+ numberOfMonths: {
167
+ type: Number,
168
+ default: 0
169
+ },
170
+ calculationMode: {
171
+ type: String,
172
+ enum: ['auto', 'custom'],
173
+ default: 'auto'
174
+ },
138
175
  createdAt: {
139
176
  type: Date,
140
177
  default: Date.now