@merkaly/api 0.2.5-2 → 0.2.5-4

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,8 +1,12 @@
1
1
  import { AbstractEntity } from '../../../abstract/abstract.entity';
2
2
  import { OrganizationMetadataAddress, OrganizationMetadataInformation, OrganizationMetadataLocalization, OrganizationMetadataSocial } from "./organization.types";
3
- interface OrganizationMetadata {
3
+ import { Organization } from 'auth0';
4
+ export interface OrganizationMetadata {
4
5
  address?: OrganizationMetadataAddress;
5
- domain: string;
6
+ domain: {
7
+ name: string;
8
+ forceRedirect?: boolean;
9
+ };
6
10
  information?: OrganizationMetadataInformation;
7
11
  localization?: OrganizationMetadataLocalization;
8
12
  social?: OrganizationMetadataSocial[];
@@ -10,6 +14,8 @@ interface OrganizationMetadata {
10
14
  }
11
15
  export declare class OrganizationEntity extends AbstractEntity {
12
16
  static readonly $index = "config_organization";
17
+ name: string;
18
+ display_name: string;
13
19
  metadata: OrganizationMetadata;
20
+ branding: Organization['branding'];
14
21
  }
15
- export {};
@@ -1,7 +1,10 @@
1
1
  import { PropertyEntity } from '../../properties/property.entity';
2
- import { AbstractEntity } from '../../../../abstract/abstract.entity';
3
- export declare class VariantEntity extends AbstractEntity {
4
- property: PropertyEntity;
5
- price: number;
6
- stock: number;
2
+ export declare class VariantEntity {
3
+ title?: string;
4
+ price?: number;
5
+ stock?: number;
6
+ combinations: {
7
+ property: PropertyEntity;
8
+ value: string;
9
+ }[];
7
10
  }
@@ -3,10 +3,11 @@ import { ProductCodeValidator } from './validators/code.validator';
3
3
  import { ProductDimensionValidator } from './validators/dimension.validator';
4
4
  import { ProductSeoValidator } from './validators/seo.validator';
5
5
  import { AbstractValidator } from '../../../abstract/abstract.validator';
6
+ import { ProductVariantValidator } from "./validators/variant.validator";
7
+ import { ProductEntity } from "./product.entity";
6
8
  export declare class CreateProductValidator extends AbstractValidator {
7
9
  name: string;
8
10
  description: string;
9
- measurement: string;
10
11
  active: boolean;
11
12
  category?: string;
12
13
  brand?: string;
@@ -17,7 +18,21 @@ export declare class CreateProductValidator extends AbstractValidator {
17
18
  dimension: ProductDimensionValidator;
18
19
  code: ProductCodeValidator;
19
20
  stock: number | null;
21
+ variants?: ProductVariantValidator[];
20
22
  }
21
- export declare class UpdateProductValidator extends CreateProductValidator {
22
- name: string;
23
+ export declare class UpdateProductValidator {
24
+ constructor(product?: ProductEntity);
25
+ name?: string;
26
+ description?: string;
27
+ active?: boolean;
28
+ category?: string;
29
+ brand?: string;
30
+ files?: string[];
31
+ hashtags?: string[];
32
+ price?: number;
33
+ seo: ProductSeoValidator;
34
+ dimension: ProductDimensionValidator;
35
+ code?: ProductCodeValidator;
36
+ stock?: number;
37
+ variants?: ProductVariantValidator[];
23
38
  }
@@ -32,14 +32,13 @@ var code_validator_1 = require("./validators/code.validator");
32
32
  var dimension_validator_1 = require("./validators/dimension.validator");
33
33
  var seo_validator_1 = require("./validators/seo.validator");
34
34
  var abstract_validator_1 = require("../../../abstract/abstract.validator");
35
+ var variant_validator_1 = require("./validators/variant.validator");
35
36
  var CreateProductValidator = (function (_super) {
36
37
  __extends(CreateProductValidator, _super);
37
38
  function CreateProductValidator() {
38
39
  var _this = _super !== null && _super.apply(this, arguments) || this;
39
40
  _this.name = String();
40
41
  _this.description = String();
41
- _this.measurement = String();
42
- _this.active = Boolean(1);
43
42
  _this.category = null;
44
43
  _this.brand = null;
45
44
  _this.files = [];
@@ -48,6 +47,7 @@ var CreateProductValidator = (function (_super) {
48
47
  _this.dimension = new dimension_validator_1.ProductDimensionValidator();
49
48
  _this.code = new code_validator_1.ProductCodeValidator();
50
49
  _this.stock = null;
50
+ _this.variants = [];
51
51
  return _this;
52
52
  }
53
53
  __decorate([
@@ -60,14 +60,10 @@ var CreateProductValidator = (function (_super) {
60
60
  (0, class_validator_1.IsOptional)(),
61
61
  __metadata("design:type", Object)
62
62
  ], CreateProductValidator.prototype, "description", void 0);
63
- __decorate([
64
- (0, class_validator_1.IsString)(),
65
- __metadata("design:type", Object)
66
- ], CreateProductValidator.prototype, "measurement", void 0);
67
63
  __decorate([
68
64
  (0, class_validator_1.IsBoolean)(),
69
65
  (0, class_validator_1.IsOptional)(),
70
- __metadata("design:type", Object)
66
+ __metadata("design:type", Boolean)
71
67
  ], CreateProductValidator.prototype, "active", void 0);
72
68
  __decorate([
73
69
  (0, class_validator_1.IsOptional)(),
@@ -113,19 +109,127 @@ var CreateProductValidator = (function (_super) {
113
109
  (0, class_validator_1.Min)(0),
114
110
  __metadata("design:type", Number)
115
111
  ], CreateProductValidator.prototype, "stock", void 0);
112
+ __decorate([
113
+ (0, class_validator_1.ValidateNested)(),
114
+ (0, class_transformer_1.Type)(function () { return variant_validator_1.ProductVariantValidator; }),
115
+ (0, class_validator_1.IsOptional)(),
116
+ __metadata("design:type", Array)
117
+ ], CreateProductValidator.prototype, "variants", void 0);
116
118
  return CreateProductValidator;
117
119
  }(abstract_validator_1.AbstractValidator));
118
120
  exports.CreateProductValidator = CreateProductValidator;
119
- var UpdateProductValidator = (function (_super) {
120
- __extends(UpdateProductValidator, _super);
121
- function UpdateProductValidator() {
122
- return _super !== null && _super.apply(this, arguments) || this;
121
+ var UpdateProductValidator = (function () {
122
+ function UpdateProductValidator(product) {
123
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
124
+ this.seo = new seo_validator_1.ProductSeoValidator();
125
+ this.dimension = new dimension_validator_1.ProductDimensionValidator();
126
+ this.code = new code_validator_1.ProductCodeValidator();
127
+ this.variants = [];
128
+ if (!product) {
129
+ return;
130
+ }
131
+ this.name = product.name;
132
+ this.description = product.description;
133
+ this.active = product.active;
134
+ this.category = (_a = product.category) === null || _a === void 0 ? void 0 : _a._id;
135
+ this.brand = (_b = product.brand) === null || _b === void 0 ? void 0 : _b._id;
136
+ this.files = product.files.map(function (file) { return file._id; });
137
+ this.hashtags = product.hashtags;
138
+ this.price = product.price;
139
+ this.seo.title = (_c = product.seo) === null || _c === void 0 ? void 0 : _c.title;
140
+ this.seo.slug = (_d = product.seo) === null || _d === void 0 ? void 0 : _d.slug;
141
+ this.seo.description = (_e = product.seo) === null || _e === void 0 ? void 0 : _e.description;
142
+ this.dimension.depth = (_f = product.dimension) === null || _f === void 0 ? void 0 : _f.depth;
143
+ this.dimension.height = (_g = product.dimension) === null || _g === void 0 ? void 0 : _g.height;
144
+ this.dimension.weight = (_h = product.dimension) === null || _h === void 0 ? void 0 : _h.weight;
145
+ this.dimension.width = (_j = product.dimension) === null || _j === void 0 ? void 0 : _j.width;
146
+ this.code.gtin = (_k = product.code) === null || _k === void 0 ? void 0 : _k.gtin;
147
+ this.code.mpn = (_l = product.code) === null || _l === void 0 ? void 0 : _l.mpn;
148
+ this.code.sku = (_m = product.code) === null || _m === void 0 ? void 0 : _m.sku;
149
+ this.dimension.height = (_o = product.dimension) === null || _o === void 0 ? void 0 : _o.height;
150
+ this.dimension.weight = (_p = product.dimension) === null || _p === void 0 ? void 0 : _p.weight;
151
+ this.dimension.width = (_q = product.dimension) === null || _q === void 0 ? void 0 : _q.width;
152
+ this.variants = product.variants.map(function (variant) { return ({
153
+ price: variant.price,
154
+ stock: variant.stock,
155
+ title: variant.title,
156
+ combinations: variant.combinations.map(function (combination) { return ({
157
+ property: combination.property._id,
158
+ value: combination.value
159
+ }); }),
160
+ }); });
123
161
  }
124
162
  __decorate([
125
163
  (0, class_validator_1.IsString)(),
164
+ (0, class_validator_1.IsNotEmpty)(),
126
165
  (0, class_validator_1.IsOptional)(),
127
166
  __metadata("design:type", String)
128
167
  ], UpdateProductValidator.prototype, "name", void 0);
168
+ __decorate([
169
+ (0, class_validator_1.IsString)(),
170
+ (0, class_validator_1.IsOptional)(),
171
+ __metadata("design:type", String)
172
+ ], UpdateProductValidator.prototype, "description", void 0);
173
+ __decorate([
174
+ (0, class_validator_1.IsBoolean)(),
175
+ (0, class_validator_1.IsOptional)(),
176
+ __metadata("design:type", Boolean)
177
+ ], UpdateProductValidator.prototype, "active", void 0);
178
+ __decorate([
179
+ (0, class_validator_1.IsOptional)(),
180
+ (0, class_validator_1.IsMongoId)(),
181
+ __metadata("design:type", String)
182
+ ], UpdateProductValidator.prototype, "category", void 0);
183
+ __decorate([
184
+ (0, class_validator_1.IsOptional)(),
185
+ (0, class_validator_1.IsMongoId)(),
186
+ __metadata("design:type", String)
187
+ ], UpdateProductValidator.prototype, "brand", void 0);
188
+ __decorate([
189
+ (0, class_validator_1.IsMongoId)({ each: true }),
190
+ (0, class_validator_1.IsOptional)(),
191
+ __metadata("design:type", Array)
192
+ ], UpdateProductValidator.prototype, "files", void 0);
193
+ __decorate([
194
+ (0, class_validator_1.IsString)({ each: true }),
195
+ (0, class_validator_1.IsOptional)(),
196
+ __metadata("design:type", Array)
197
+ ], UpdateProductValidator.prototype, "hashtags", void 0);
198
+ __decorate([
199
+ (0, class_validator_1.IsNumber)(),
200
+ (0, class_validator_1.IsOptional)(),
201
+ __metadata("design:type", Number)
202
+ ], UpdateProductValidator.prototype, "price", void 0);
203
+ __decorate([
204
+ (0, class_validator_1.ValidateNested)(),
205
+ (0, class_transformer_1.Type)(function () { return seo_validator_1.ProductSeoValidator; }),
206
+ (0, class_validator_1.IsOptional)(),
207
+ __metadata("design:type", Object)
208
+ ], UpdateProductValidator.prototype, "seo", void 0);
209
+ __decorate([
210
+ (0, class_validator_1.ValidateNested)(),
211
+ (0, class_transformer_1.Type)(function () { return dimension_validator_1.ProductDimensionValidator; }),
212
+ (0, class_validator_1.IsOptional)(),
213
+ __metadata("design:type", Object)
214
+ ], UpdateProductValidator.prototype, "dimension", void 0);
215
+ __decorate([
216
+ (0, class_validator_1.ValidateNested)(),
217
+ (0, class_transformer_1.Type)(function () { return code_validator_1.ProductCodeValidator; }),
218
+ (0, class_validator_1.IsOptional)(),
219
+ __metadata("design:type", Object)
220
+ ], UpdateProductValidator.prototype, "code", void 0);
221
+ __decorate([
222
+ (0, class_validator_1.IsNumber)(),
223
+ (0, class_validator_1.IsOptional)(),
224
+ (0, class_validator_1.Min)(0),
225
+ __metadata("design:type", Number)
226
+ ], UpdateProductValidator.prototype, "stock", void 0);
227
+ __decorate([
228
+ (0, class_validator_1.ValidateNested)(),
229
+ (0, class_transformer_1.Type)(function () { return variant_validator_1.ProductVariantValidator; }),
230
+ (0, class_validator_1.IsOptional)(),
231
+ __metadata("design:type", Array)
232
+ ], UpdateProductValidator.prototype, "variants", void 0);
129
233
  return UpdateProductValidator;
130
- }(CreateProductValidator));
234
+ }());
131
235
  exports.UpdateProductValidator = UpdateProductValidator;
@@ -13,24 +13,21 @@ exports.ProductSeoValidator = void 0;
13
13
  var class_validator_1 = require("class-validator");
14
14
  var ProductSeoValidator = (function () {
15
15
  function ProductSeoValidator() {
16
- this.title = String();
17
- this.slug = String();
18
- this.description = String();
19
16
  }
20
17
  __decorate([
21
18
  (0, class_validator_1.IsString)(),
22
19
  (0, class_validator_1.IsOptional)(),
23
- __metadata("design:type", Object)
20
+ __metadata("design:type", String)
24
21
  ], ProductSeoValidator.prototype, "title", void 0);
25
22
  __decorate([
26
23
  (0, class_validator_1.IsString)(),
27
24
  (0, class_validator_1.IsOptional)(),
28
- __metadata("design:type", Object)
25
+ __metadata("design:type", String)
29
26
  ], ProductSeoValidator.prototype, "slug", void 0);
30
27
  __decorate([
31
28
  (0, class_validator_1.IsString)(),
32
29
  (0, class_validator_1.IsOptional)(),
33
- __metadata("design:type", Object)
30
+ __metadata("design:type", String)
34
31
  ], ProductSeoValidator.prototype, "description", void 0);
35
32
  return ProductSeoValidator;
36
33
  }());
@@ -0,0 +1,9 @@
1
+ export declare class ProductVariantValidator {
2
+ title?: string;
3
+ stock?: number;
4
+ price?: number;
5
+ combinations: {
6
+ property: string;
7
+ value: string;
8
+ }[];
9
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ProductVariantValidator = void 0;
13
+ var class_validator_1 = require("class-validator");
14
+ var ProductVariantValidator = (function () {
15
+ function ProductVariantValidator() {
16
+ }
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ (0, class_validator_1.IsOptional)(),
20
+ __metadata("design:type", String)
21
+ ], ProductVariantValidator.prototype, "title", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsNumber)(),
24
+ (0, class_validator_1.IsOptional)(),
25
+ __metadata("design:type", Number)
26
+ ], ProductVariantValidator.prototype, "stock", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsNumber)(),
29
+ (0, class_validator_1.IsOptional)(),
30
+ __metadata("design:type", Number)
31
+ ], ProductVariantValidator.prototype, "price", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsOptional)(),
34
+ (0, class_validator_1.IsObject)({ each: true }),
35
+ __metadata("design:type", Array)
36
+ ], ProductVariantValidator.prototype, "combinations", void 0);
37
+ return ProductVariantValidator;
38
+ }());
39
+ exports.ProductVariantValidator = ProductVariantValidator;
@@ -3,5 +3,6 @@ export declare class PropertyEntity extends AbstractEntity {
3
3
  static readonly $index = "inventory_properties";
4
4
  name: string;
5
5
  title: string;
6
+ values: string[];
6
7
  type: string;
7
8
  }
@@ -2,10 +2,11 @@ import { AbstractValidator } from "../../../abstract/abstract.validator";
2
2
  import { PropertyType } from './property.types';
3
3
  export declare class CreatePropertyValidator extends AbstractValidator {
4
4
  name: string;
5
- title: string;
5
+ title?: string;
6
6
  type: PropertyType;
7
+ values: string[];
7
8
  }
8
9
  export declare class UpdatePropertyValidator extends AbstractValidator {
9
10
  name?: string;
10
- title?: string;
11
+ values?: string[];
11
12
  }
@@ -31,7 +31,10 @@ var property_types_1 = require("./property.types");
31
31
  var CreatePropertyValidator = (function (_super) {
32
32
  __extends(CreatePropertyValidator, _super);
33
33
  function CreatePropertyValidator() {
34
- return _super !== null && _super.apply(this, arguments) || this;
34
+ var _this = _super !== null && _super.apply(this, arguments) || this;
35
+ _this.type = property_types_1.PropertyType.TEXT;
36
+ _this.values = [];
37
+ return _this;
35
38
  }
36
39
  __decorate([
37
40
  (0, class_validator_1.IsString)(),
@@ -39,20 +42,27 @@ var CreatePropertyValidator = (function (_super) {
39
42
  ], CreatePropertyValidator.prototype, "name", void 0);
40
43
  __decorate([
41
44
  (0, class_validator_1.IsString)(),
45
+ (0, class_validator_1.IsOptional)(),
42
46
  __metadata("design:type", String)
43
47
  ], CreatePropertyValidator.prototype, "title", void 0);
44
48
  __decorate([
45
- (0, class_validator_1.IsString)(),
46
49
  (0, class_validator_1.IsEnum)(property_types_1.PropertyType),
50
+ (0, class_validator_1.IsOptional)(),
47
51
  __metadata("design:type", String)
48
52
  ], CreatePropertyValidator.prototype, "type", void 0);
53
+ __decorate([
54
+ (0, class_validator_1.IsString)({ each: true }),
55
+ __metadata("design:type", Array)
56
+ ], CreatePropertyValidator.prototype, "values", void 0);
49
57
  return CreatePropertyValidator;
50
58
  }(abstract_validator_1.AbstractValidator));
51
59
  exports.CreatePropertyValidator = CreatePropertyValidator;
52
60
  var UpdatePropertyValidator = (function (_super) {
53
61
  __extends(UpdatePropertyValidator, _super);
54
62
  function UpdatePropertyValidator() {
55
- return _super !== null && _super.apply(this, arguments) || this;
63
+ var _this = _super !== null && _super.apply(this, arguments) || this;
64
+ _this.values = [];
65
+ return _this;
56
66
  }
57
67
  __decorate([
58
68
  (0, class_validator_1.IsString)(),
@@ -60,10 +70,10 @@ var UpdatePropertyValidator = (function (_super) {
60
70
  __metadata("design:type", String)
61
71
  ], UpdatePropertyValidator.prototype, "name", void 0);
62
72
  __decorate([
63
- (0, class_validator_1.IsString)(),
73
+ (0, class_validator_1.IsString)({ each: true }),
64
74
  (0, class_validator_1.IsOptional)(),
65
- __metadata("design:type", String)
66
- ], UpdatePropertyValidator.prototype, "title", void 0);
75
+ __metadata("design:type", Array)
76
+ ], UpdatePropertyValidator.prototype, "values", void 0);
67
77
  return UpdatePropertyValidator;
68
78
  }(abstract_validator_1.AbstractValidator));
69
79
  exports.UpdatePropertyValidator = UpdatePropertyValidator;
@@ -11,7 +11,7 @@ export declare class OrderEntity extends AbstractEntity {
11
11
  items: ItemEntity[];
12
12
  billing: BillingEntity;
13
13
  shipping: ShippingEntity;
14
- customer: CustomerEntity;
14
+ customer?: CustomerEntity;
15
15
  notes: string;
16
16
  createdBy: string;
17
17
  readonly fullNumber: string;
@@ -2,9 +2,13 @@ import { CreateBillingValidator } from './billing/billing.validator';
2
2
  import { CreateItemValidator } from './item/item.validator';
3
3
  import { CreateShippingValidator } from './shipping/shipping.validator';
4
4
  import { StatusType } from './status/status.validator';
5
- import { AbstractValidator } from "../../../abstract/abstract.validator";
5
+ import { AbstractValidator, FindValidator } from "../../../abstract/abstract.validator";
6
+ import { OrderEntity } from './order.entity';
7
+ export declare class FindOrdersValidator extends FindValidator<OrderEntity> {
8
+ showInactives: boolean;
9
+ }
6
10
  export declare class CreateOrderValidator extends AbstractValidator {
7
- customer: string;
11
+ customer?: string;
8
12
  items: CreateItemValidator[];
9
13
  billing: CreateBillingValidator;
10
14
  shipping: CreateShippingValidator;
@@ -24,7 +24,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
24
24
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
25
  };
26
26
  Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.GetByStatus = exports.RefundOrderItemsValidator = exports.ChangeOrderStatusValidator = exports.UpdateOrderValidator = exports.CreateOrderValidator = void 0;
27
+ exports.GetByStatus = exports.RefundOrderItemsValidator = exports.ChangeOrderStatusValidator = exports.UpdateOrderValidator = exports.CreateOrderValidator = exports.FindOrdersValidator = void 0;
28
28
  var class_transformer_1 = require("class-transformer");
29
29
  var class_validator_1 = require("class-validator");
30
30
  var billing_validator_1 = require("./billing/billing.validator");
@@ -32,6 +32,24 @@ var item_validator_1 = require("./item/item.validator");
32
32
  var shipping_validator_1 = require("./shipping/shipping.validator");
33
33
  var status_validator_1 = require("./status/status.validator");
34
34
  var abstract_validator_1 = require("../../../abstract/abstract.validator");
35
+ var FindOrdersValidator = (function (_super) {
36
+ __extends(FindOrdersValidator, _super);
37
+ function FindOrdersValidator() {
38
+ var _this = _super !== null && _super.apply(this, arguments) || this;
39
+ _this.showInactives = false;
40
+ return _this;
41
+ }
42
+ __decorate([
43
+ (0, class_validator_1.IsBoolean)(),
44
+ (0, class_transformer_1.Transform)(function (_a) {
45
+ var value = _a.value;
46
+ return value === 'true';
47
+ }),
48
+ __metadata("design:type", Object)
49
+ ], FindOrdersValidator.prototype, "showInactives", void 0);
50
+ return FindOrdersValidator;
51
+ }(abstract_validator_1.FindValidator));
52
+ exports.FindOrdersValidator = FindOrdersValidator;
35
53
  var CreateOrderValidator = (function (_super) {
36
54
  __extends(CreateOrderValidator, _super);
37
55
  function CreateOrderValidator() {
@@ -43,6 +61,7 @@ var CreateOrderValidator = (function (_super) {
43
61
  }
44
62
  __decorate([
45
63
  (0, class_validator_1.IsMongoId)(),
64
+ (0, class_validator_1.IsOptional)(),
46
65
  __metadata("design:type", String)
47
66
  ], CreateOrderValidator.prototype, "customer", void 0);
48
67
  __decorate([
@@ -2,7 +2,7 @@ import { LoggerService as NestLogger } from '@nestjs/common';
2
2
  import { Request } from 'express';
3
3
  export declare class LoggerService implements NestLogger {
4
4
  protected readonly $request: Request;
5
- protected get organization(): any;
5
+ protected get organization(): string | string[];
6
6
  log(message: string): void;
7
7
  error(reason: Error): void;
8
8
  warn(message: string, scope?: string): void;
@@ -17,12 +17,8 @@ var LoggerService = (function () {
17
17
  }
18
18
  Object.defineProperty(LoggerService.prototype, "organization", {
19
19
  get: function () {
20
- var _a;
21
- var session = this.$request.session;
22
- if (!session) {
23
- return;
24
- }
25
- return ((_a = session.organization) === null || _a === void 0 ? void 0 : _a.name) || '';
20
+ var identity = this.$request.headers.identity;
21
+ return identity;
26
22
  },
27
23
  enumerable: false,
28
24
  configurable: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merkaly/api",
3
- "version": "0.2.5-2",
3
+ "version": "0.2.5-4",
4
4
  "description": "NestJS Backend ApiRest Service",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,6 +36,7 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@nestjs/common": "^9.0.11",
39
+ "@nestjs/swagger": "^6.1.0",
39
40
  "@types/auth0": "^3.3.1",
40
41
  "class-transformer": "^0.5.1",
41
42
  "class-validator": "^0.14.0",
@@ -44,7 +45,7 @@
44
45
  },
45
46
  "devDependencies": {
46
47
  "@commitlint/config-conventional": "^17.0.0",
47
- "@faker-js/faker": "^7.5.0",
48
+ "@faker-js/faker": "^8.0.0",
48
49
  "@google-cloud/storage": "^6.4.1",
49
50
  "@nestjs/axios": "^2.0.0",
50
51
  "@nestjs/cli": "^9.1.1",
@@ -57,12 +58,10 @@
57
58
  "@nestjs/platform-express": "^9.0.11",
58
59
  "@nestjs/platform-socket.io": "^9.4.0",
59
60
  "@nestjs/schematics": "^9.0.1",
60
- "@nestjs/swagger": "^6.1.0",
61
61
  "@nestjs/testing": "^9.0.11",
62
62
  "@nestjs/websockets": "^9.4.0",
63
63
  "@types/cache-manager": "^4.0.1",
64
64
  "@types/express": "^4.17.12",
65
- "@types/express-session": "^1.17.5",
66
65
  "@types/jest": "^27.0.0",
67
66
  "@types/multer": "^1.4.7",
68
67
  "@types/node": "^20.1.0",
@@ -78,7 +77,6 @@
78
77
  "eslint": "7.32.0",
79
78
  "eslint-plugin-import": "^2.23.4",
80
79
  "express": "^4.17.3",
81
- "express-session": "^1.17.3",
82
80
  "husky": "^8.0.1",
83
81
  "jest": "27.5.1",
84
82
  "lint-staged": "^13.0.3",