@grapadigital/shared-schemas 2.3.1 → 2.5.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.
|
@@ -4,6 +4,27 @@ import { Client } from "./client.schema";
|
|
|
4
4
|
export type ProfileDocument = HydratedDocument<Profile>;
|
|
5
5
|
export declare const PROFILE_OPTIN_STATUS_VALUES: readonly ["active", "inactive"];
|
|
6
6
|
export type ProfileOptinStatus = (typeof PROFILE_OPTIN_STATUS_VALUES)[number];
|
|
7
|
+
/**
|
|
8
|
+
* @ e rede do Perfil enviados à campanha Grapa da Primetag, e o último erro
|
|
9
|
+
* definitivo do envio. Sem default: o profile-sync-worker grava o erro com
|
|
10
|
+
* `$set` em `primetagInfos.error`, que falha no Mongo se o campo for `null`.
|
|
11
|
+
* Ver GD-853.
|
|
12
|
+
*/
|
|
13
|
+
export declare class ProfilePrimetagInfos {
|
|
14
|
+
username?: string;
|
|
15
|
+
socialnetwork?: string;
|
|
16
|
+
addedAt?: Date;
|
|
17
|
+
error?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const ProfilePrimetagInfosSchema: MongooseSchema<ProfilePrimetagInfos, import("mongoose").Model<ProfilePrimetagInfos, any, any, any, import("mongoose").Document<unknown, any, ProfilePrimetagInfos, any, {}> & ProfilePrimetagInfos & {
|
|
20
|
+
_id: Types.ObjectId;
|
|
21
|
+
} & {
|
|
22
|
+
__v: number;
|
|
23
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ProfilePrimetagInfos, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<ProfilePrimetagInfos>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<ProfilePrimetagInfos> & {
|
|
24
|
+
_id: Types.ObjectId;
|
|
25
|
+
} & {
|
|
26
|
+
__v: number;
|
|
27
|
+
}>;
|
|
7
28
|
export declare class Profile {
|
|
8
29
|
_id?: Types.ObjectId;
|
|
9
30
|
username: string;
|
|
@@ -15,6 +36,8 @@ export declare class Profile {
|
|
|
15
36
|
optinStatus?: ProfileOptinStatus;
|
|
16
37
|
optinUpdatedAt?: Date;
|
|
17
38
|
optinNotifiedAt?: Date;
|
|
39
|
+
/** Estado do Perfil na campanha Grapa da Primetag; ausente = nunca enviado. Ver GD-853. */
|
|
40
|
+
primetagInfos?: ProfilePrimetagInfos;
|
|
18
41
|
socialnetwork: string;
|
|
19
42
|
type: string;
|
|
20
43
|
influencer: Types.ObjectId | Influencer;
|
|
@@ -9,10 +9,39 @@ 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.ProfileModel = exports.ProfileSchema = exports.Profile = exports.PROFILE_OPTIN_STATUS_VALUES = void 0;
|
|
12
|
+
exports.ProfileModel = exports.ProfileSchema = exports.Profile = exports.ProfilePrimetagInfosSchema = exports.ProfilePrimetagInfos = exports.PROFILE_OPTIN_STATUS_VALUES = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
15
|
exports.PROFILE_OPTIN_STATUS_VALUES = ["active", "inactive"];
|
|
16
|
+
/**
|
|
17
|
+
* @ e rede do Perfil enviados à campanha Grapa da Primetag, e o último erro
|
|
18
|
+
* definitivo do envio. Sem default: o profile-sync-worker grava o erro com
|
|
19
|
+
* `$set` em `primetagInfos.error`, que falha no Mongo se o campo for `null`.
|
|
20
|
+
* Ver GD-853.
|
|
21
|
+
*/
|
|
22
|
+
let ProfilePrimetagInfos = class ProfilePrimetagInfos {
|
|
23
|
+
};
|
|
24
|
+
exports.ProfilePrimetagInfos = ProfilePrimetagInfos;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], ProfilePrimetagInfos.prototype, "username", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], ProfilePrimetagInfos.prototype, "socialnetwork", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, mongoose_1.Prop)({ type: Date, required: false }),
|
|
35
|
+
__metadata("design:type", Date)
|
|
36
|
+
], ProfilePrimetagInfos.prototype, "addedAt", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], ProfilePrimetagInfos.prototype, "error", void 0);
|
|
41
|
+
exports.ProfilePrimetagInfos = ProfilePrimetagInfos = __decorate([
|
|
42
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
43
|
+
], ProfilePrimetagInfos);
|
|
44
|
+
exports.ProfilePrimetagInfosSchema = mongoose_1.SchemaFactory.createForClass(ProfilePrimetagInfos);
|
|
16
45
|
let Profile = class Profile {
|
|
17
46
|
};
|
|
18
47
|
exports.Profile = Profile;
|
|
@@ -56,6 +85,10 @@ __decorate([
|
|
|
56
85
|
(0, mongoose_1.Prop)({ type: Date, required: false }),
|
|
57
86
|
__metadata("design:type", Date)
|
|
58
87
|
], Profile.prototype, "optinNotifiedAt", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, mongoose_1.Prop)({ type: exports.ProfilePrimetagInfosSchema, required: false }),
|
|
90
|
+
__metadata("design:type", ProfilePrimetagInfos)
|
|
91
|
+
], Profile.prototype, "primetagInfos", void 0);
|
|
59
92
|
__decorate([
|
|
60
93
|
(0, mongoose_1.Prop)(),
|
|
61
94
|
__metadata("design:type", String)
|
|
@@ -123,7 +123,7 @@ export declare class Sale {
|
|
|
123
123
|
_id?: Types.ObjectId;
|
|
124
124
|
title: string;
|
|
125
125
|
phase: "inbox" | "strategy" | "proposal" | "negotiation" | "commission" | "formalization" | "closed" | "lost";
|
|
126
|
-
type: "campaign" | "fee" | "production" | "press_kit" | "renewal"
|
|
126
|
+
type: "campaign" | "fee" | "production" | "press_kit" | "renewal";
|
|
127
127
|
proposal?: Proposal;
|
|
128
128
|
negotiation?: Negotiation;
|
|
129
129
|
formalization?: Formalization;
|
|
@@ -409,19 +409,7 @@ __decorate([
|
|
|
409
409
|
__decorate([
|
|
410
410
|
(0, mongoose_1.Prop)({
|
|
411
411
|
type: String,
|
|
412
|
-
enum: [
|
|
413
|
-
"campaign",
|
|
414
|
-
"fee",
|
|
415
|
-
"production",
|
|
416
|
-
"press_kit",
|
|
417
|
-
"renewal",
|
|
418
|
-
// legado, sai depois da GD-826
|
|
419
|
-
"new",
|
|
420
|
-
"organic_expansion",
|
|
421
|
-
"strategic_expansion",
|
|
422
|
-
"comercial_winback",
|
|
423
|
-
"organic_winback",
|
|
424
|
-
],
|
|
412
|
+
enum: ["campaign", "fee", "production", "press_kit", "renewal"],
|
|
425
413
|
default: "campaign",
|
|
426
414
|
}),
|
|
427
415
|
__metadata("design:type", String)
|