@unchainedshop/utils 3.0.0-alpha2 → 3.0.0-alpha3

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.
Files changed (71) hide show
  1. package/lib/calculation.d.ts +1 -1
  2. package/lib/calculation.d.ts.map +1 -1
  3. package/lib/director/BaseAdapter.d.ts +10 -1
  4. package/lib/director/BaseAdapter.d.ts.map +1 -1
  5. package/lib/director/BaseAdapter.js.map +1 -1
  6. package/lib/director/BaseDirector.d.ts +9 -1
  7. package/lib/director/BaseDirector.d.ts.map +1 -1
  8. package/lib/director/BaseDirector.js.map +1 -1
  9. package/lib/director/BaseDiscountAdapter.d.ts +36 -1
  10. package/lib/director/BaseDiscountAdapter.d.ts.map +1 -1
  11. package/lib/director/BaseDiscountAdapter.js.map +1 -1
  12. package/lib/director/BaseDiscountDirector.d.ts +11 -1
  13. package/lib/director/BaseDiscountDirector.d.ts.map +1 -1
  14. package/lib/director/BaseDiscountDirector.js.map +1 -1
  15. package/lib/director/BasePricingAdapter.d.ts +45 -2
  16. package/lib/director/BasePricingAdapter.d.ts.map +1 -1
  17. package/lib/director/BasePricingAdapter.js.map +1 -1
  18. package/lib/director/BasePricingDirector.d.ts +14 -1
  19. package/lib/director/BasePricingDirector.d.ts.map +1 -1
  20. package/lib/director/BasePricingDirector.js.map +1 -1
  21. package/lib/director/BasePricingSheet.d.ts +45 -1
  22. package/lib/director/BasePricingSheet.d.ts.map +1 -1
  23. package/lib/director/BasePricingSheet.js.map +1 -1
  24. package/lib/locale-helpers.d.ts +6 -6
  25. package/lib/locale-helpers.d.ts.map +1 -1
  26. package/lib/locale-helpers.js +8 -10
  27. package/lib/locale-helpers.js.map +1 -1
  28. package/lib/object-invert.d.ts +1 -1
  29. package/lib/object-invert.d.ts.map +1 -1
  30. package/lib/object-invert.js.map +1 -1
  31. package/lib/utils-index.d.ts +17 -8
  32. package/lib/utils-index.d.ts.map +1 -1
  33. package/lib/utils-index.js +12 -8
  34. package/lib/utils-index.js.map +1 -1
  35. package/package.json +5 -7
  36. package/src/calculation.ts +1 -1
  37. package/src/director/BaseAdapter.ts +13 -1
  38. package/src/director/BaseDirector.ts +8 -1
  39. package/src/director/BaseDiscountAdapter.ts +32 -1
  40. package/src/director/BaseDiscountDirector.ts +15 -2
  41. package/src/director/BasePricingAdapter.ts +59 -11
  42. package/src/director/BasePricingDirector.ts +36 -9
  43. package/src/director/BasePricingSheet.ts +45 -5
  44. package/src/locale-helpers.ts +19 -16
  45. package/src/object-invert.ts +1 -1
  46. package/src/utils-index.ts +20 -8
  47. package/lib/schemas/AddressSchema.d.ts +0 -3
  48. package/lib/schemas/AddressSchema.d.ts.map +0 -1
  49. package/lib/schemas/AddressSchema.js +0 -13
  50. package/lib/schemas/AddressSchema.js.map +0 -1
  51. package/lib/schemas/ContactSchema.d.ts +0 -3
  52. package/lib/schemas/ContactSchema.d.ts.map +0 -1
  53. package/lib/schemas/ContactSchema.js +0 -6
  54. package/lib/schemas/ContactSchema.js.map +0 -1
  55. package/lib/schemas/UsersSchema.d.ts +0 -5
  56. package/lib/schemas/UsersSchema.d.ts.map +0 -1
  57. package/lib/schemas/UsersSchema.js +0 -52
  58. package/lib/schemas/UsersSchema.js.map +0 -1
  59. package/lib/schemas/commonSchemaFields.d.ts +0 -35
  60. package/lib/schemas/commonSchemaFields.d.ts.map +0 -1
  61. package/lib/schemas/commonSchemaFields.js +0 -28
  62. package/lib/schemas/commonSchemaFields.js.map +0 -1
  63. package/lib/schemas/index.d.ts +0 -43
  64. package/lib/schemas/index.d.ts.map +0 -1
  65. package/lib/schemas/index.js +0 -14
  66. package/lib/schemas/index.js.map +0 -1
  67. package/src/schemas/AddressSchema.ts +0 -16
  68. package/src/schemas/ContactSchema.ts +0 -9
  69. package/src/schemas/UsersSchema.ts +0 -67
  70. package/src/schemas/commonSchemaFields.ts +0 -29
  71. package/src/schemas/index.ts +0 -18
@@ -1,67 +0,0 @@
1
- import SimpleSchema from 'simpl-schema';
2
- import { AddressSchema } from './AddressSchema.js';
3
- import { timestampFields } from './commonSchemaFields.js';
4
-
5
- const ProfileSchema = new SimpleSchema(
6
- {
7
- displayName: String,
8
- birthday: Date,
9
- phoneMobile: String,
10
- gender: String,
11
- address: AddressSchema,
12
- },
13
- { requiredByDefault: false },
14
- );
15
-
16
- export const LastLoginSchema = new SimpleSchema(
17
- {
18
- timestamp: Date,
19
- locale: String,
20
- countryCode: String,
21
- remoteAddress: String,
22
- remotePort: String,
23
- userAgent: String,
24
- },
25
- { requiredByDefault: false },
26
- );
27
-
28
- export const LastContactSchema = new SimpleSchema(
29
- {
30
- telNumber: String,
31
- emailAddress: String,
32
- },
33
- { requiredByDefault: false },
34
- );
35
-
36
- export const UserSchema = new SimpleSchema(
37
- {
38
- emails: Array,
39
- 'emails.$': Object,
40
- 'emails.$.address': String,
41
- 'emails.$.verified': Boolean,
42
- username: String,
43
- lastLogin: LastLoginSchema,
44
- profile: ProfileSchema,
45
- lastBillingAddress: AddressSchema,
46
- lastContact: LastContactSchema,
47
- guest: Boolean,
48
- initialPassword: Boolean,
49
- tags: Array,
50
- 'tags.$': String,
51
- avatarId: String,
52
- meta: {
53
- type: Object,
54
- optional: true,
55
- blackbox: true,
56
- },
57
- services: {
58
- type: Object,
59
- optional: true,
60
- blackbox: true,
61
- },
62
- roles: Array,
63
- 'roles.$': String,
64
- ...timestampFields,
65
- },
66
- { requiredByDefault: false },
67
- );
@@ -1,29 +0,0 @@
1
- export const contextFields = {
2
- context: {
3
- type: Object,
4
- blackbox: true,
5
- required: false,
6
- },
7
- };
8
-
9
- export const logFields = {
10
- log: Array,
11
- 'log.$': {
12
- type: Object,
13
- },
14
- 'log.$.date': {
15
- type: Date,
16
- },
17
- 'log.$.status': {
18
- type: String,
19
- },
20
- 'log.$.info': {
21
- type: String,
22
- },
23
- };
24
-
25
- export const timestampFields = {
26
- created: { type: Date, required: true },
27
- updated: { type: Date },
28
- deleted: { type: Date },
29
- };
@@ -1,18 +0,0 @@
1
- import SimpleSchema from 'simpl-schema';
2
- import { timestampFields, contextFields, logFields } from './commonSchemaFields.js';
3
- import { AddressSchema } from './AddressSchema.js';
4
- import { ContactSchema } from './ContactSchema.js';
5
- import { UserSchema } from './UsersSchema.js';
6
-
7
- const Schemas = {
8
- timestampFields,
9
- contextFields,
10
- logFields,
11
- Address: AddressSchema,
12
- Contact: ContactSchema,
13
- User: UserSchema,
14
- };
15
-
16
- export { Schemas };
17
-
18
- export type { SimpleSchema };