mintly-lib 2.0.0-preview → 2.2.3-preview

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.
@@ -1 +1 @@
1
- {"version":3,"file":"financial-account-schema.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-account-schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAK/C,oBAAY,oBAAoB;IAC9B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,aAAa,kBAAkB;IAC/B,QAAQ,aAAa;CACtB;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GASjC,CAAA"}
1
+ {"version":3,"file":"financial-account-schema.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-account-schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAK/C,oBAAY,oBAAoB;IAC9B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,aAAa,kBAAkB;IAC/B,QAAQ,aAAa;CACtB;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgB5B,CAAA;AAuBF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGjC,CAAA;AAaF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;GAM7B,CAAA"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.financialAccountSchema = exports.FinancialAccountType = void 0;
3
+ exports.financialAccountUpdateSchema = exports.financialAccountSchema = exports.baseAccountSchema = exports.FinancialAccountType = void 0;
4
4
  const sapphire_core_1 = require("@ascendance-hub/sapphire-core");
5
5
  const status_1 = require("../common/status");
6
6
  const audit_1 = require("../common/audit");
@@ -12,14 +12,61 @@ var FinancialAccountType;
12
12
  FinancialAccountType["DigitalWallet"] = "digitalWallet";
13
13
  FinancialAccountType["Platform"] = "platform";
14
14
  })(FinancialAccountType || (exports.FinancialAccountType = FinancialAccountType = {}));
15
- exports.financialAccountSchema = s.object({
15
+ exports.baseAccountSchema = s.object({
16
16
  restaurantId: s.string(),
17
17
  name: s.string(),
18
- type: s.type().enum(FinancialAccountType),
19
18
  status: s.type().enum(status_1.RecordStatus),
20
19
  isDefault: s.boolean(),
21
- feePercent: s.number().optional(),
22
- settlementDays: s.number().optional(),
20
+ availableBalance: s.number().default(0),
21
+ predictedBalance: s.number().default(0),
22
+ history: s.array(s.object({
23
+ at: s.date(), // Date real (preenchido pelo sistema), não string ISO
24
+ by: s.string(),
25
+ action: s.string(),
26
+ detail: s.string().optional(),
27
+ })).default([]),
23
28
  audit: audit_1.auditSchema,
24
29
  });
30
+ // validação condicional
31
+ // 2. A CONTA PLATAFORMA (Exige type platform + taxas obrigatórias)
32
+ // O .extend() sobrescreve a base adicionando essas regras estritas
33
+ const platformAccountSchema = exports.baseAccountSchema.extend({
34
+ type: s.type().literal(FinancialAccountType.Platform), // Força a ser 'platform'
35
+ feePercent: s.number().int().min(0), // Obrigatório
36
+ settlementDays: s.number().int().min(0), // Obrigatório
37
+ });
38
+ // 3. AS OUTRAS CONTAS (Proíbem as taxas)
39
+ const standardAccountSchema = exports.baseAccountSchema.extend({
40
+ type: s.type().enum([
41
+ FinancialAccountType.Bank,
42
+ FinancialAccountType.Cash,
43
+ FinancialAccountType.DigitalWallet,
44
+ ]),
45
+ // Não colocamos feePercent e settlementDays aqui.
46
+ // Se o usuário enviar, o Sapphire vai recusar.
47
+ });
48
+ // 4. A EXPORTAÇÃO FINAL (CRIAÇÃO)
49
+ // Dizemos para a API: "A conta tem que ser OU plataforma OU padrão" - união discriminada
50
+ exports.financialAccountSchema = s.type().union([
51
+ platformAccountSchema,
52
+ standardAccountSchema,
53
+ ]);
54
+ // 5. SCHEMA DE EDIÇÃO PARCIAL (PATCH / update)
55
+ // Por que um schema separado em vez de reaproveitar o de cima:
56
+ // - O de criação é uma UNIÃO discriminada; união não tem .partial() no Sapphire,
57
+ // e num PATCH o `type` pode nem vir, então a regra cruzada (platform exige
58
+ // fee/prazo) não é verificável aqui — ela continua valendo só na criação.
59
+ // - Aqui usamos um OBJETO achatado + .partial(): todo campo vira opcional, mas
60
+ // o que for enviado é validado (ex.: feePercent inteiro e >= 0).
61
+ // - Listamos APENAS os campos editáveis. restaurantId, isDefault, saldos
62
+ // (availableBalance/predictedBalance), history e audit ficam de fora de
63
+ // propósito: como o objeto é estrito, enviá-los num PATCH é rejeitado
64
+ // (protege tenant e os valores computados pelo sistema).
65
+ exports.financialAccountUpdateSchema = s.object({
66
+ name: s.string(),
67
+ status: s.type().enum(status_1.RecordStatus),
68
+ type: s.type().enum(FinancialAccountType),
69
+ feePercent: s.number().int().min(0),
70
+ settlementDays: s.number().int().min(0),
71
+ }).partial();
25
72
  //# sourceMappingURL=financial-account-schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"financial-account-schema.js","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-account-schema.ts"],"names":[],"mappings":";;;AAAA,iEAAwD;AACxD,6CAA+C;AAC/C,2CAA6C;AAE7C,MAAM,CAAC,GAAG,IAAI,wBAAQ,EAAE,CAAA;AAExB,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,qCAAa,CAAA;IACb,uDAA+B,CAAA;IAC/B,6CAAqB,CAAA;AACvB,CAAC,EALW,oBAAoB,oCAApB,oBAAoB,QAK/B;AAEY,QAAA,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,oBAAoB,CAAC;IACzC,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,qBAAY,CAAC;IACnC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,KAAK,EAAE,mBAAW;CACnB,CAAC,CAAA"}
1
+ {"version":3,"file":"financial-account-schema.js","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-account-schema.ts"],"names":[],"mappings":"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"}
@@ -20,18 +20,18 @@ export declare const financialCategorySchema: import("@ascendance-hub/sapphire-c
20
20
  status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
21
21
  isSystem: import("@ascendance-hub/sapphire-core").BooleanField<boolean, boolean>;
22
22
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
23
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
24
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
23
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
24
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
25
25
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
26
26
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
27
27
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
28
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
29
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
28
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
29
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
30
30
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
31
31
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
32
32
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
33
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
34
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
33
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
34
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
35
35
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
36
36
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
37
37
  }>>;
@@ -44,18 +44,18 @@ export declare const financialCategorySchema: import("@ascendance-hub/sapphire-c
44
44
  status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
45
45
  isSystem: import("@ascendance-hub/sapphire-core").BooleanField<boolean, boolean>;
46
46
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
47
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
48
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
47
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
48
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
49
49
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
50
50
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
51
51
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
52
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
53
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
52
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
53
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
54
54
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
55
55
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
56
56
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
57
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
58
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
57
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
58
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
59
59
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
60
60
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
61
61
  }>>;
@@ -68,18 +68,18 @@ export declare const financialCategorySchema: import("@ascendance-hub/sapphire-c
68
68
  status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
69
69
  isSystem: import("@ascendance-hub/sapphire-core").BooleanField<boolean, boolean>;
70
70
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
71
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
72
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
71
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
72
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
73
73
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
74
74
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
75
75
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
76
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
77
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
76
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
77
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
78
78
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
79
79
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
80
80
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
81
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
82
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
81
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
82
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
83
83
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
84
84
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
85
85
  }>>;
@@ -1,5 +1,6 @@
1
1
  export { FinancialAccount } from './financial-account-entity';
2
2
  export { financialAccountSchema, FinancialAccountType } from './financial-account-schema';
3
+ export { financialAccountUpdateSchema } from './financial-account-schema';
3
4
  export { FinancialCategory } from './financial-category-entity';
4
5
  export { financialCategorySchema, CategoryType, CategoryBehavior, OperationalNature, } from './financial-category-schema';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAEzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EACL,uBAAuB,EACvB,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,6BAA6B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACzF,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAA;AAEzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EACL,uBAAuB,EACvB,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,6BAA6B,CAAA"}
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OperationalNature = exports.CategoryBehavior = exports.CategoryType = exports.financialCategorySchema = exports.FinancialAccountType = exports.financialAccountSchema = void 0;
3
+ exports.OperationalNature = exports.CategoryBehavior = exports.CategoryType = exports.financialCategorySchema = exports.financialAccountUpdateSchema = exports.FinancialAccountType = exports.financialAccountSchema = void 0;
4
4
  var financial_account_schema_1 = require("./financial-account-schema");
5
5
  Object.defineProperty(exports, "financialAccountSchema", { enumerable: true, get: function () { return financial_account_schema_1.financialAccountSchema; } });
6
6
  Object.defineProperty(exports, "FinancialAccountType", { enumerable: true, get: function () { return financial_account_schema_1.FinancialAccountType; } });
7
+ var financial_account_schema_2 = require("./financial-account-schema");
8
+ Object.defineProperty(exports, "financialAccountUpdateSchema", { enumerable: true, get: function () { return financial_account_schema_2.financialAccountUpdateSchema; } });
7
9
  var financial_category_schema_1 = require("./financial-category-schema");
8
10
  Object.defineProperty(exports, "financialCategorySchema", { enumerable: true, get: function () { return financial_category_schema_1.financialCategorySchema; } });
9
11
  Object.defineProperty(exports, "CategoryType", { enumerable: true, get: function () { return financial_category_schema_1.CategoryType; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/data/financial/index.ts"],"names":[],"mappings":";;;AACA,uEAAyF;AAAhF,kIAAA,sBAAsB,OAAA;AAAE,gIAAA,oBAAoB,OAAA;AAGrD,yEAKoC;AAJlC,oIAAA,uBAAuB,OAAA;AACvB,yHAAA,YAAY,OAAA;AACZ,6HAAA,gBAAgB,OAAA;AAChB,8HAAA,iBAAiB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/data/financial/index.ts"],"names":[],"mappings":";;;AACA,uEAAyF;AAAhF,kIAAA,sBAAsB,OAAA;AAAE,gIAAA,oBAAoB,OAAA;AACrD,uEAAyE;AAAhE,wIAAA,4BAA4B,OAAA;AAGrC,yEAKoC;AAJlC,oIAAA,uBAAuB,OAAA;AACvB,yHAAA,YAAY,OAAA;AACZ,6HAAA,gBAAgB,OAAA;AAChB,8HAAA,iBAAiB,OAAA"}
@@ -2,18 +2,18 @@ export declare const personSchema: import("@ascendance-hub/sapphire-core").Objec
2
2
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
3
3
  phone: import("@ascendance-hub/sapphire-core").StringField<string, string>;
4
4
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
5
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
6
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
5
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
6
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
7
7
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
8
8
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
9
9
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
10
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
11
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
10
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
11
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
12
12
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
13
13
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
14
14
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
15
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
16
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
15
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
16
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
17
17
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
18
18
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
19
19
  }>>;
@@ -21,18 +21,18 @@ export declare const personSchema: import("@ascendance-hub/sapphire-core").Objec
21
21
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
22
22
  phone: import("@ascendance-hub/sapphire-core").StringField<string, string>;
23
23
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
24
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
25
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
24
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
25
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
26
26
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
27
27
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
28
28
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
29
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
30
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
29
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
30
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
31
31
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
32
32
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
33
33
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
34
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
35
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
34
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
35
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
36
36
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
37
37
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
38
38
  }>>;
@@ -40,18 +40,18 @@ export declare const personSchema: import("@ascendance-hub/sapphire-core").Objec
40
40
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
41
41
  phone: import("@ascendance-hub/sapphire-core").StringField<string, string>;
42
42
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
43
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
44
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
43
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
44
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
45
45
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
46
46
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
47
47
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
48
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
49
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
48
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
49
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
50
50
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
51
51
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
52
52
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
53
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
54
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
53
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
54
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
55
55
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
56
56
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
57
57
  }>>;
@@ -1,54 +1,54 @@
1
1
  export declare const restaurantSchema: import("@ascendance-hub/sapphire-core").ObjectField<{
2
2
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
3
3
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
4
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
5
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
4
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
5
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
6
6
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
7
7
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
8
8
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
9
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
10
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
9
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
10
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
11
11
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
12
12
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
13
13
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
14
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
15
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
14
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
15
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
16
16
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
17
17
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
18
18
  }>>;
19
19
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
20
20
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
21
21
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
22
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
23
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
22
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
23
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
24
24
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
25
25
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
26
26
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
27
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
28
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
27
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
28
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
29
29
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
30
30
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
31
31
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
32
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
33
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
32
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
33
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
34
34
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
35
35
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
36
36
  }>>;
37
37
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
38
38
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
39
39
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
40
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
41
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
40
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
41
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
42
42
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
43
43
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
44
44
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
45
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
46
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
45
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
46
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
47
47
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
48
48
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
49
49
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
50
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
51
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
50
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
51
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
52
52
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
53
53
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
54
54
  }>>;
@@ -31,18 +31,18 @@ export declare const userSchema: import("@ascendance-hub/sapphire-core").ObjectF
31
31
  termsAcceptedAt: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
32
32
  lastAccessAt: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
33
33
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
34
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
35
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
34
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
35
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
36
36
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
37
37
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
38
38
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
39
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
40
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
39
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
40
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
41
41
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
42
42
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
43
43
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
44
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
45
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
44
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
45
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
46
46
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
47
47
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
48
48
  }>>;
@@ -65,18 +65,18 @@ export declare const userSchema: import("@ascendance-hub/sapphire-core").ObjectF
65
65
  termsAcceptedAt: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
66
66
  lastAccessAt: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
67
67
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
68
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
69
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
68
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
69
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
70
70
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
71
71
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
72
72
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
73
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
74
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
73
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
74
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
75
75
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
76
76
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
77
77
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
78
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
79
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
78
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
79
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
80
80
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
81
81
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
82
82
  }>>;
@@ -99,18 +99,18 @@ export declare const userSchema: import("@ascendance-hub/sapphire-core").ObjectF
99
99
  termsAcceptedAt: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
100
100
  lastAccessAt: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
101
101
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
102
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
103
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
102
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
103
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
104
104
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
105
105
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
106
106
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
107
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
108
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
107
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
108
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
109
109
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
110
110
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
111
111
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
112
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
113
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
112
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
113
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
114
114
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
115
115
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
116
116
  }>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mintly-lib",
3
- "version": "2.0.0-preview",
3
+ "version": "2.2.3-preview",
4
4
  "description": "Mintly Library",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -46,6 +46,7 @@
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/http-status-codes": "^1.2.0",
49
+ "@types/jest": "^30.0.0",
49
50
  "@types/node": "^20.11.5",
50
51
  "@typescript-eslint/eslint-plugin": "6.4.0",
51
52
  "dotenv": "^16.4.5",
@@ -56,7 +57,9 @@
56
57
  "eslint-plugin-n": "15.0.0 || 16.0.0 ",
57
58
  "eslint-plugin-prettier": "5.1.3",
58
59
  "eslint-plugin-promise": "6.0.0",
60
+ "jest": "^30.4.2",
59
61
  "rimraf": "^5.0.5",
62
+ "ts-jest": "^29.4.11",
60
63
  "ts-node": "10.9.2",
61
64
  "tsup": "^6.5.0",
62
65
  "tsx": "^4.16.2",