@grapadigital/shared-schemas 1.0.216 → 1.0.217
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.
|
@@ -27,6 +27,12 @@ import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
|
|
|
27
27
|
import { Party } from './party.schema';
|
|
28
28
|
import { Profile } from './profile.schema';
|
|
29
29
|
export type ClientDocument = HydratedDocument<Client>;
|
|
30
|
+
/**
|
|
31
|
+
* Personalizações de cliente: ligam telas e regras que valem só para ele.
|
|
32
|
+
* Ver GD-683.
|
|
33
|
+
*/
|
|
34
|
+
export declare const CLIENT_CUSTOMIZATION_VALUES: readonly ["samsung"];
|
|
35
|
+
export type ClientCustomization = (typeof CLIENT_CUSTOMIZATION_VALUES)[number];
|
|
30
36
|
export declare class Cluster {
|
|
31
37
|
key: string;
|
|
32
38
|
label: string;
|
|
@@ -132,6 +138,13 @@ export declare class Client extends Party {
|
|
|
132
138
|
* (Antigo `hasReport`.)
|
|
133
139
|
*/
|
|
134
140
|
hasGenIAAnalysis: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Personalização do cliente (ex.: `samsung`): liga as telas e regras
|
|
143
|
+
* específicas dele no Flow e no Hub. Ausente ou `null` = comportamento
|
|
144
|
+
* padrão. Nunca comparar id de cliente no código, sempre este campo.
|
|
145
|
+
* Ver GD-683.
|
|
146
|
+
*/
|
|
147
|
+
customization?: ClientCustomization | null;
|
|
135
148
|
/**
|
|
136
149
|
* Client de organização (ex.: "Oma Creators"): representa a organização
|
|
137
150
|
* inteira, não uma marca. No hub, mostra todas as actions dessa organização
|
|
@@ -9,11 +9,16 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ClientModel = exports.ClientSchema = exports.Client = exports.ClientResponsibleSchema = exports.ClientResponsible = exports.NicheItemSchema = exports.NicheItem = exports.AgencyCommissionPeriodSchema = exports.AgencyCommissionPeriod = exports.CommissionRangeSchema = exports.CommissionRange = exports.CompanySchema = exports.Company = exports.ClusterSchema = exports.Cluster = void 0;
|
|
12
|
+
exports.ClientModel = exports.ClientSchema = exports.Client = exports.ClientResponsibleSchema = exports.ClientResponsible = exports.NicheItemSchema = exports.NicheItem = exports.AgencyCommissionPeriodSchema = exports.AgencyCommissionPeriod = exports.CommissionRangeSchema = exports.CommissionRange = exports.CompanySchema = exports.Company = exports.ClusterSchema = exports.Cluster = exports.CLIENT_CUSTOMIZATION_VALUES = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const swagger_1 = require("@nestjs/swagger");
|
|
15
15
|
const mongoose_2 = require("mongoose");
|
|
16
16
|
const party_schema_1 = require("./party.schema");
|
|
17
|
+
/**
|
|
18
|
+
* Personalizações de cliente: ligam telas e regras que valem só para ele.
|
|
19
|
+
* Ver GD-683.
|
|
20
|
+
*/
|
|
21
|
+
exports.CLIENT_CUSTOMIZATION_VALUES = ['samsung'];
|
|
17
22
|
let Cluster = class Cluster {
|
|
18
23
|
};
|
|
19
24
|
__decorate([
|
|
@@ -169,6 +174,10 @@ __decorate([
|
|
|
169
174
|
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
170
175
|
__metadata("design:type", Boolean)
|
|
171
176
|
], Client.prototype, "hasGenIAAnalysis", void 0);
|
|
177
|
+
__decorate([
|
|
178
|
+
(0, mongoose_1.Prop)({ type: String, enum: exports.CLIENT_CUSTOMIZATION_VALUES, required: false, default: null }),
|
|
179
|
+
__metadata("design:type", Object)
|
|
180
|
+
], Client.prototype, "customization", void 0);
|
|
172
181
|
__decorate([
|
|
173
182
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Organization', required: false }),
|
|
174
183
|
__metadata("design:type", mongoose_2.Types.ObjectId)
|
package/package.json
CHANGED
|
@@ -11,6 +11,13 @@ import { Profile } from './profile.schema';
|
|
|
11
11
|
|
|
12
12
|
export type ClientDocument = HydratedDocument<Client>;
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Personalizações de cliente: ligam telas e regras que valem só para ele.
|
|
16
|
+
* Ver GD-683.
|
|
17
|
+
*/
|
|
18
|
+
export const CLIENT_CUSTOMIZATION_VALUES = ['samsung'] as const;
|
|
19
|
+
export type ClientCustomization = (typeof CLIENT_CUSTOMIZATION_VALUES)[number];
|
|
20
|
+
|
|
14
21
|
@Schema({ _id: false })
|
|
15
22
|
export class Cluster {
|
|
16
23
|
@Prop({ required: true })
|
|
@@ -140,6 +147,15 @@ export class Client extends Party {
|
|
|
140
147
|
@Prop({ type: Boolean, default: false })
|
|
141
148
|
hasGenIAAnalysis: boolean;
|
|
142
149
|
|
|
150
|
+
/**
|
|
151
|
+
* Personalização do cliente (ex.: `samsung`): liga as telas e regras
|
|
152
|
+
* específicas dele no Flow e no Hub. Ausente ou `null` = comportamento
|
|
153
|
+
* padrão. Nunca comparar id de cliente no código, sempre este campo.
|
|
154
|
+
* Ver GD-683.
|
|
155
|
+
*/
|
|
156
|
+
@Prop({ type: String, enum: CLIENT_CUSTOMIZATION_VALUES, required: false, default: null })
|
|
157
|
+
customization?: ClientCustomization | null;
|
|
158
|
+
|
|
143
159
|
/**
|
|
144
160
|
* Client de organização (ex.: "Oma Creators"): representa a organização
|
|
145
161
|
* inteira, não uma marca. No hub, mostra todas as actions dessa organização
|