@zeyos/cli 0.4.0 → 0.6.0

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/lib/resources.mjs CHANGED
@@ -45,6 +45,8 @@ const REGISTRY = {
45
45
  update: 'updateAccount',
46
46
  delete: 'deleteAccount',
47
47
  fields: ['ID', 'customernum', 'lastname', 'firstname', 'type', 'assigneduser', 'lastmodified'],
48
+ fieldAliases: { name: 'lastname' },
49
+ filterAliases: { name: 'lastname' },
48
50
  },
49
51
  contact: {
50
52
  list: 'listContacts',
@@ -54,6 +56,14 @@ const REGISTRY = {
54
56
  delete: 'deleteContact',
55
57
  fields: ['ID', 'firstname', 'lastname', 'email', 'phone', 'account'],
56
58
  },
59
+ address: {
60
+ list: 'listAddresses',
61
+ get: 'getAddress',
62
+ create: 'createAddress',
63
+ update: 'updateAddress',
64
+ delete: 'deleteAddress',
65
+ fields: ['ID', 'account', 'contact', 'type', 'default'],
66
+ },
57
67
  project: {
58
68
  list: 'listProjects',
59
69
  get: 'getProject',
@@ -112,6 +122,11 @@ const REGISTRY = {
112
122
  get: 'getGroup',
113
123
  fields: ['ID', 'name', 'description'],
114
124
  },
125
+ groupuser: {
126
+ list: 'listGroupsToUsers',
127
+ get: 'getGroupToUser',
128
+ fields: ['ID', 'group', 'user'],
129
+ },
115
130
  event: {
116
131
  list: 'listEvents',
117
132
  get: 'getEvent',
@@ -152,6 +167,62 @@ const REGISTRY = {
152
167
  delete: 'deleteCampaign',
153
168
  fields: ['ID', 'name', 'status', 'startdate', 'enddate'],
154
169
  },
170
+ mailinglist: {
171
+ list: 'listMailingLists',
172
+ get: 'getMailingList',
173
+ create: 'createMailingList',
174
+ update: 'updateMailingList',
175
+ delete: 'deleteMailingList',
176
+ fields: ['ID', 'name', 'description', 'status', 'lastmodified'],
177
+ },
178
+ mailingrecipient: {
179
+ list: 'listMailingRecipients',
180
+ get: 'getMailingRecipient',
181
+ create: 'createMailingRecipient',
182
+ update: 'updateMailingRecipient',
183
+ delete: 'deleteMailingRecipient',
184
+ fields: ['ID', 'message', 'mailinglist', 'campaign', 'email', 'recipientuser', 'recipientgroup'],
185
+ },
186
+ dunning: {
187
+ list: 'listDunningNotices',
188
+ get: 'getDunningNotice',
189
+ create: 'createDunningNotice',
190
+ update: 'updateDunningNotice',
191
+ delete: 'deleteDunningNotice',
192
+ fields: ['ID', 'dunningnum', 'type', 'status', 'date', 'duedate', 'account', 'recipient', 'fee'],
193
+ },
194
+ dunningtransaction: {
195
+ list: 'listDunningToTransactions',
196
+ get: 'getDunningToTransaction',
197
+ create: 'createDunningToTransaction',
198
+ update: 'updateDunningToTransaction',
199
+ delete: 'deleteDunningToTransaction',
200
+ fields: ['ID', 'dunning', 'transaction'],
201
+ },
202
+ pricelist: {
203
+ list: 'listPriceLists',
204
+ get: 'getPriceList',
205
+ create: 'createPriceList',
206
+ update: 'updatePriceList',
207
+ delete: 'deletePriceList',
208
+ fields: ['ID', 'name', 'type', 'discount', 'allaccounts'],
209
+ },
210
+ pricelistaccount: {
211
+ list: 'listPriceListsToAccounts',
212
+ get: 'getPriceListToAccount',
213
+ create: 'createPriceListToAccount',
214
+ update: 'updatePriceListToAccount',
215
+ delete: 'deletePriceListToAccount',
216
+ fields: ['ID', 'pricelist', 'account'],
217
+ },
218
+ price: {
219
+ list: 'listPrices',
220
+ get: 'getPrice',
221
+ create: 'createPrice',
222
+ update: 'updatePrice',
223
+ delete: 'deletePrice',
224
+ fields: ['ID', 'pricelist', 'item', 'price', 'rebate', 'discount'],
225
+ },
155
226
  customfield: {
156
227
  list: 'listCustomFields',
157
228
  get: 'getCustomField',
@@ -198,6 +269,7 @@ const ALIASES = {
198
269
  tasks: 'task',
199
270
  accounts: 'account',
200
271
  contacts: 'contact',
272
+ addresses: 'address',
201
273
  projects: 'project',
202
274
  appointments: 'appointment',
203
275
  documents: 'document',
@@ -208,11 +280,46 @@ const ALIASES = {
208
280
  items: 'item',
209
281
  users: 'user',
210
282
  groups: 'group',
283
+ groupuser: 'groupuser',
284
+ groupusers: 'groupuser',
285
+ groups2user: 'groupuser',
286
+ groups2users: 'groupuser',
287
+ 'group-user': 'groupuser',
288
+ 'group-users': 'groupuser',
289
+ 'groups-to-user': 'groupuser',
290
+ 'groups-to-users': 'groupuser',
211
291
  events: 'event',
212
292
  transactions: 'transaction',
213
293
  payments: 'payment',
214
294
  opportunities:'opportunity',
215
295
  campaigns: 'campaign',
296
+ mailinglists: 'mailinglist',
297
+ 'mailing-list': 'mailinglist',
298
+ 'mailing-lists': 'mailinglist',
299
+ mailingrecipients: 'mailingrecipient',
300
+ 'mailing-recipient': 'mailingrecipient',
301
+ 'mailing-recipients': 'mailingrecipient',
302
+ dunnings: 'dunning',
303
+ 'dunning-notice': 'dunning',
304
+ 'dunning-notices': 'dunning',
305
+ dunningnotice: 'dunning',
306
+ dunningnotices: 'dunning',
307
+ dunning2transaction: 'dunningtransaction',
308
+ dunning2transactions: 'dunningtransaction',
309
+ 'dunning-transaction': 'dunningtransaction',
310
+ 'dunning-transactions': 'dunningtransaction',
311
+ 'dunning-to-transaction': 'dunningtransaction',
312
+ 'dunning-to-transactions': 'dunningtransaction',
313
+ pricelists: 'pricelist',
314
+ 'price-list': 'pricelist',
315
+ 'price-lists': 'pricelist',
316
+ pricelistaccount: 'pricelistaccount',
317
+ pricelistaccounts: 'pricelistaccount',
318
+ pricelists2account: 'pricelistaccount',
319
+ pricelists2accounts: 'pricelistaccount',
320
+ 'price-list-account': 'pricelistaccount',
321
+ 'price-list-accounts': 'pricelistaccount',
322
+ prices: 'price',
216
323
  customfields: 'customfield',
217
324
  custom_fields: 'customfield',
218
325
  'custom-fields': 'customfield',
package/lib/types.mjs CHANGED
@@ -18,7 +18,9 @@
18
18
  * update?: string,
19
19
  * delete?: string,
20
20
  * fields: string[],
21
- * idField?: string
21
+ * idField?: string,
22
+ * fieldAliases?: Record<string,string>,
23
+ * filterAliases?: Record<string,string>
22
24
  * }} ResourceDef
23
25
  */
24
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeyos/cli",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Command-line interface for the ZeyOS API",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -39,7 +39,7 @@
39
39
  "node": ">=18.3"
40
40
  },
41
41
  "dependencies": {
42
- "@zeyos/client": "^0.4.0"
42
+ "@zeyos/client": "^0.6.0"
43
43
  },
44
44
  "scripts": {
45
45
  "test": "node --test test/offline.mjs"