@grapadigital/shared-schemas 1.0.241 → 1.1.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.
- package/dist/index.d.ts +42 -42
- package/dist/schemas/action.schema.d.ts +13 -38
- package/dist/schemas/action.schema.js +81 -64
- package/dist/schemas/assignment.schema.d.ts +6 -31
- package/dist/schemas/assignment.schema.js +44 -44
- package/dist/schemas/benchmark.schema.d.ts +5 -30
- package/dist/schemas/benchmark.schema.js +11 -6
- package/dist/schemas/campaign.schema.d.ts +4 -29
- package/dist/schemas/campaign.schema.js +4 -4
- package/dist/schemas/client.schema.d.ts +30 -91
- package/dist/schemas/client.schema.js +73 -71
- package/dist/schemas/comment.schema.d.ts +9 -34
- package/dist/schemas/comment.schema.js +42 -37
- package/dist/schemas/commission.schema.d.ts +7 -32
- package/dist/schemas/commission.schema.js +10 -10
- package/dist/schemas/content-capture-process.schema.d.ts +12 -37
- package/dist/schemas/content-capture-process.schema.js +24 -17
- package/dist/schemas/content-draft.schema.d.ts +4 -29
- package/dist/schemas/content-draft.schema.js +5 -5
- package/dist/schemas/content.schema.d.ts +20 -45
- package/dist/schemas/content.schema.js +84 -74
- package/dist/schemas/contract.schema.d.ts +5 -30
- package/dist/schemas/contract.schema.js +5 -5
- package/dist/schemas/creative.schema.d.ts +11 -36
- package/dist/schemas/creative.schema.js +22 -31
- package/dist/schemas/export-comments-job.schema.d.ts +4 -29
- package/dist/schemas/export-comments-job.schema.js +6 -6
- package/dist/schemas/group.schema.d.ts +2 -27
- package/dist/schemas/group.schema.js +5 -5
- package/dist/schemas/influencer.schema.d.ts +12 -37
- package/dist/schemas/influencer.schema.js +16 -18
- package/dist/schemas/invoice.schema.d.ts +6 -31
- package/dist/schemas/invoice.schema.js +42 -32
- package/dist/schemas/job.schema.d.ts +4 -29
- package/dist/schemas/job.schema.js +14 -14
- package/dist/schemas/lead.schema.d.ts +15 -40
- package/dist/schemas/lead.schema.js +67 -64
- package/dist/schemas/log.schema.d.ts +3 -28
- package/dist/schemas/log.schema.js +24 -24
- package/dist/schemas/note.schema.d.ts +3 -28
- package/dist/schemas/note.schema.js +9 -9
- package/dist/schemas/notifications.schema.d.ts +3 -28
- package/dist/schemas/notifications.schema.js +8 -8
- package/dist/schemas/organization.schema.d.ts +2 -27
- package/dist/schemas/organization.schema.js +4 -4
- package/dist/schemas/party.schema.d.ts +6 -31
- package/dist/schemas/party.schema.js +11 -11
- package/dist/schemas/payment.schema.d.ts +20 -45
- package/dist/schemas/payment.schema.js +63 -54
- package/dist/schemas/profile.schema.d.ts +5 -30
- package/dist/schemas/profile.schema.js +6 -6
- package/dist/schemas/project.schema.d.ts +9 -34
- package/dist/schemas/project.schema.js +13 -13
- package/dist/schemas/prospect.schema.d.ts +6 -31
- package/dist/schemas/prospect.schema.js +9 -9
- package/dist/schemas/recruitment.schema.d.ts +19 -44
- package/dist/schemas/recruitment.schema.js +36 -36
- package/dist/schemas/responsible.schema.d.ts +1 -27
- package/dist/schemas/responsible.schema.js +6 -6
- package/dist/schemas/sale.schema.d.ts +19 -44
- package/dist/schemas/sale.schema.js +43 -51
- package/dist/schemas/script.schema.d.ts +11 -36
- package/dist/schemas/script.schema.js +21 -30
- package/dist/schemas/snapshot.schema.d.ts +5 -30
- package/dist/schemas/snapshot.schema.js +6 -6
- package/dist/schemas/store-visit.schema.d.ts +3 -28
- package/dist/schemas/store-visit.schema.js +21 -17
- package/dist/schemas/store.schema.d.ts +5 -30
- package/dist/schemas/store.schema.js +8 -8
- package/dist/schemas/supplier.schema.d.ts +4 -29
- package/dist/schemas/supplier.schema.js +3 -3
- package/dist/schemas/tag.schema.d.ts +2 -27
- package/dist/schemas/tag.schema.js +5 -5
- package/dist/schemas/task.schema.d.ts +11 -36
- package/dist/schemas/task.schema.js +67 -67
- package/dist/schemas/token.schema.d.ts +3 -28
- package/dist/schemas/token.schema.js +3 -3
- package/dist/schemas/trigger.schema.d.ts +3 -28
- package/dist/schemas/trigger.schema.js +5 -5
- package/dist/schemas/user.schema.d.ts +3 -28
- package/dist/schemas/user.schema.js +7 -7
- package/dist/schemas/webhook.schema.d.ts +6 -31
- package/dist/schemas/webhook.schema.js +10 -10
- package/dist/utils/merge-metrics-breakdown.util.d.ts +1 -1
- package/dist/utils/merge-metrics-breakdown.util.js +7 -2
- package/dist/utils/normalize-content-link.util.js +7 -7
- package/package.json +29 -16
- package/.eslintrc.json +0 -28
- package/.prettierrc +0 -4
- package/dist/schemas/profile-followers-snapshot.schema.d.ts +0 -67
- package/dist/schemas/profile-followers-snapshot.schema.js +0 -65
- package/dist/schemas/schedule.schema.d.ts +0 -73
- package/dist/schemas/schedule.schema.js +0 -116
- package/dist/utils/cost-per-impact.util.d.ts +0 -37
- package/dist/utils/cost-per-impact.util.js +0 -72
- package/dist/utils/influencer-contract.util.d.ts +0 -32
- package/dist/utils/influencer-contract.util.js +0 -77
- package/docs/code-review.md +0 -27
- package/docs/constitution.md +0 -75
- package/docs/specs/GD-692.md +0 -112
- package/docs/specs/GD-761.md +0 -94
- package/index.d.ts +0 -3
- package/src/index.ts +0 -42
- package/src/schemas/action.schema.ts +0 -328
- package/src/schemas/assignment.schema.ts +0 -154
- package/src/schemas/benchmark.schema.ts +0 -39
- package/src/schemas/campaign.schema.ts +0 -38
- package/src/schemas/client.schema.ts +0 -319
- package/src/schemas/comment.schema.ts +0 -216
- package/src/schemas/commission.schema.ts +0 -108
- package/src/schemas/content-capture-process.schema.ts +0 -195
- package/src/schemas/content-draft.schema.ts +0 -49
- package/src/schemas/content.schema.ts +0 -688
- package/src/schemas/contract.schema.ts +0 -44
- package/src/schemas/creative.schema.ts +0 -256
- package/src/schemas/export-comments-job.schema.ts +0 -59
- package/src/schemas/group.schema.ts +0 -23
- package/src/schemas/influencer.schema.ts +0 -184
- package/src/schemas/invoice.schema.ts +0 -164
- package/src/schemas/job.schema.ts +0 -111
- package/src/schemas/lead.schema.ts +0 -372
- package/src/schemas/log.schema.ts +0 -91
- package/src/schemas/note.schema.ts +0 -34
- package/src/schemas/notifications.schema.ts +0 -61
- package/src/schemas/organization.schema.ts +0 -29
- package/src/schemas/party.schema.ts +0 -65
- package/src/schemas/payment.schema.ts +0 -275
- package/src/schemas/profile.schema.ts +0 -77
- package/src/schemas/project.schema.ts +0 -116
- package/src/schemas/prospect.schema.ts +0 -62
- package/src/schemas/recruitment.schema.ts +0 -277
- package/src/schemas/responsible.schema.ts +0 -27
- package/src/schemas/sale.schema.ts +0 -297
- package/src/schemas/script.schema.ts +0 -235
- package/src/schemas/snapshot.schema.ts +0 -55
- package/src/schemas/store-visit.schema.ts +0 -68
- package/src/schemas/store.schema.ts +0 -52
- package/src/schemas/supplier.schema.ts +0 -12
- package/src/schemas/tag.schema.ts +0 -26
- package/src/schemas/task.schema.ts +0 -205
- package/src/schemas/token.schema.ts +0 -42
- package/src/schemas/trigger.schema.ts +0 -48
- package/src/schemas/user.schema.ts +0 -59
- package/src/schemas/webhook.schema.ts +0 -81
- package/src/utils/merge-metrics-breakdown.util.ts +0 -51
- package/src/utils/normalize-content-link.util.ts +0 -31
- package/tsconfig.build.json +0 -5
- package/tsconfig.json +0 -29
|
@@ -1,30 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/session" />
|
|
19
|
-
/// <reference types="mongoose/types/types" />
|
|
20
|
-
/// <reference types="mongoose/types/utility" />
|
|
21
|
-
/// <reference types="mongoose/types/validation" />
|
|
22
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
23
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
-
import { Schema as MongooseSchema, Types } from 'mongoose';
|
|
27
|
-
import { Store } from './store.schema';
|
|
1
|
+
import { Schema as MongooseSchema, Types } from "mongoose";
|
|
2
|
+
import { Store } from "./store.schema";
|
|
28
3
|
export declare const STORE_VISIT_STATUS_VALUES: readonly ["awaiting_confirmation", "confirmed", "awaiting_approval", "approved", "done", "finished"];
|
|
29
4
|
export type StoreVisitStatus = (typeof STORE_VISIT_STATUS_VALUES)[number];
|
|
30
5
|
export declare const STORE_VISIT_PERIOD_VALUES: readonly ["morning", "afternoon", "night"];
|
|
@@ -44,7 +19,7 @@ export declare const StoreVisitDataSchema: MongooseSchema<StoreVisitData, import
|
|
|
44
19
|
_id: Types.ObjectId;
|
|
45
20
|
} & {
|
|
46
21
|
__v: number;
|
|
47
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, StoreVisitData, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<StoreVisitData>, {}, import("mongoose").
|
|
22
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, StoreVisitData, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<StoreVisitData>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<StoreVisitData> & {
|
|
48
23
|
_id: Types.ObjectId;
|
|
49
24
|
} & {
|
|
50
25
|
__v: number;
|
|
@@ -15,22 +15,19 @@ const swagger_1 = require("@nestjs/swagger");
|
|
|
15
15
|
const mongoose_2 = require("mongoose");
|
|
16
16
|
const store_schema_1 = require("./store.schema");
|
|
17
17
|
exports.STORE_VISIT_STATUS_VALUES = [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
];
|
|
25
|
-
exports.STORE_VISIT_PERIOD_VALUES = [
|
|
26
|
-
'morning',
|
|
27
|
-
'afternoon',
|
|
28
|
-
'night',
|
|
18
|
+
"awaiting_confirmation", // Cadastrada pelo time, aguardando influenciadora confirmar horário e aceitar regras
|
|
19
|
+
"confirmed", // Influenciadora confirmou horário e aceite registrado
|
|
20
|
+
"awaiting_approval", // Fotos de looks e etiquetas submetidas para aprovação
|
|
21
|
+
"approved", // Looks e etiquetas aprovados pelo time
|
|
22
|
+
"done", // Visita realizada em loja
|
|
23
|
+
"finished", // Processo encerrado e notificação emitida
|
|
29
24
|
];
|
|
25
|
+
exports.STORE_VISIT_PERIOD_VALUES = ["morning", "afternoon", "night"];
|
|
30
26
|
let StoreVisitData = class StoreVisitData {
|
|
31
27
|
};
|
|
28
|
+
exports.StoreVisitData = StoreVisitData;
|
|
32
29
|
__decorate([
|
|
33
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
30
|
+
(0, swagger_1.ApiProperty)({ example: "64bfc3a78d3f1e2a12345684", description: "Loja física agendada" }),
|
|
34
31
|
(0, mongoose_1.Prop)({
|
|
35
32
|
type: mongoose_2.Schema.Types.ObjectId,
|
|
36
33
|
ref: store_schema_1.Store.name,
|
|
@@ -39,17 +36,25 @@ __decorate([
|
|
|
39
36
|
__metadata("design:type", Object)
|
|
40
37
|
], StoreVisitData.prototype, "store", void 0);
|
|
41
38
|
__decorate([
|
|
42
|
-
(0, swagger_1.ApiProperty)({
|
|
39
|
+
(0, swagger_1.ApiProperty)({
|
|
40
|
+
example: "2026-11-15T00:00:00.000Z",
|
|
41
|
+
description: "Data da visita agendada pelo time",
|
|
42
|
+
}),
|
|
43
43
|
(0, mongoose_1.Prop)({ type: Date, required: true }),
|
|
44
44
|
__metadata("design:type", Date)
|
|
45
45
|
], StoreVisitData.prototype, "scheduledDate", void 0);
|
|
46
46
|
__decorate([
|
|
47
|
-
(0, swagger_1.ApiProperty)({
|
|
47
|
+
(0, swagger_1.ApiProperty)({
|
|
48
|
+
example: "afternoon",
|
|
49
|
+
enum: exports.STORE_VISIT_PERIOD_VALUES,
|
|
50
|
+
required: false,
|
|
51
|
+
nullable: true,
|
|
52
|
+
}),
|
|
48
53
|
(0, mongoose_1.Prop)({ type: String, enum: exports.STORE_VISIT_PERIOD_VALUES, required: false, default: null }),
|
|
49
54
|
__metadata("design:type", Object)
|
|
50
55
|
], StoreVisitData.prototype, "scheduledPeriod", void 0);
|
|
51
56
|
__decorate([
|
|
52
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
57
|
+
(0, swagger_1.ApiProperty)({ example: "abcdef123456...", description: "Token de 32 bytes base64url" }),
|
|
53
58
|
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
54
59
|
__metadata("design:type", String)
|
|
55
60
|
], StoreVisitData.prototype, "token", void 0);
|
|
@@ -78,8 +83,7 @@ __decorate([
|
|
|
78
83
|
(0, mongoose_1.Prop)({ type: String, required: false, default: null }),
|
|
79
84
|
__metadata("design:type", Object)
|
|
80
85
|
], StoreVisitData.prototype, "reviewNotes", void 0);
|
|
81
|
-
StoreVisitData = __decorate([
|
|
86
|
+
exports.StoreVisitData = StoreVisitData = __decorate([
|
|
82
87
|
(0, mongoose_1.Schema)({ _id: false })
|
|
83
88
|
], StoreVisitData);
|
|
84
|
-
exports.StoreVisitData = StoreVisitData;
|
|
85
89
|
exports.StoreVisitDataSchema = mongoose_1.SchemaFactory.createForClass(StoreVisitData);
|
|
@@ -1,31 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/session" />
|
|
19
|
-
/// <reference types="mongoose/types/types" />
|
|
20
|
-
/// <reference types="mongoose/types/utility" />
|
|
21
|
-
/// <reference types="mongoose/types/validation" />
|
|
22
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
23
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
-
import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
|
|
27
|
-
import { Address } from './party.schema';
|
|
28
|
-
import { Client } from './client.schema';
|
|
1
|
+
import { HydratedDocument, Schema as MongooseSchema, Types } from "mongoose";
|
|
2
|
+
import { Address } from "./party.schema";
|
|
3
|
+
import { Client } from "./client.schema";
|
|
29
4
|
export type StoreDocument = HydratedDocument<Store>;
|
|
30
5
|
export declare class Store {
|
|
31
6
|
_id?: Types.ObjectId;
|
|
@@ -41,7 +16,7 @@ export declare const StoreSchema: MongooseSchema<Store, import("mongoose").Model
|
|
|
41
16
|
_id: Types.ObjectId;
|
|
42
17
|
}> & {
|
|
43
18
|
__v: number;
|
|
44
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Store, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Store>, {}, import("mongoose").
|
|
19
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Store, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Store>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<Store> & Required<{
|
|
45
20
|
_id: Types.ObjectId;
|
|
46
21
|
}> & {
|
|
47
22
|
__v: number;
|
|
@@ -54,7 +29,7 @@ export declare const StoreModel: import("mongoose").Model<Store, {}, {}, {}, imp
|
|
|
54
29
|
_id: Types.ObjectId;
|
|
55
30
|
}> & {
|
|
56
31
|
__v: number;
|
|
57
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Store, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Store>, {}, import("mongoose").
|
|
32
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Store, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Store>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<Store> & Required<{
|
|
58
33
|
_id: Types.ObjectId;
|
|
59
34
|
}> & {
|
|
60
35
|
__v: number;
|
|
@@ -17,13 +17,14 @@ const party_schema_1 = require("./party.schema");
|
|
|
17
17
|
const client_schema_1 = require("./client.schema");
|
|
18
18
|
let Store = class Store {
|
|
19
19
|
};
|
|
20
|
+
exports.Store = Store;
|
|
20
21
|
__decorate([
|
|
21
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
22
|
+
(0, swagger_1.ApiProperty)({ example: "64bfc3a78d3f1e2a12345670", required: false }),
|
|
22
23
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, auto: true, required: false }),
|
|
23
24
|
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
24
25
|
], Store.prototype, "_id", void 0);
|
|
25
26
|
__decorate([
|
|
26
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
27
|
+
(0, swagger_1.ApiProperty)({ example: "64bfc3a78d3f1e2a12345682" }),
|
|
27
28
|
(0, mongoose_1.Prop)({
|
|
28
29
|
type: mongoose_2.Schema.Types.ObjectId,
|
|
29
30
|
ref: client_schema_1.Client.name,
|
|
@@ -33,12 +34,12 @@ __decorate([
|
|
|
33
34
|
__metadata("design:type", Object)
|
|
34
35
|
], Store.prototype, "client", void 0);
|
|
35
36
|
__decorate([
|
|
36
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
37
|
+
(0, swagger_1.ApiProperty)({ example: "Shoulder Shopping Morumbi" }),
|
|
37
38
|
(0, mongoose_1.Prop)({ type: String, required: true, trim: true }),
|
|
38
39
|
__metadata("design:type", String)
|
|
39
40
|
], Store.prototype, "name", void 0);
|
|
40
41
|
__decorate([
|
|
41
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
42
|
+
(0, swagger_1.ApiProperty)({ example: "Morumbi Shopping", required: false }),
|
|
42
43
|
(0, mongoose_1.Prop)({ type: String, required: false, trim: true }),
|
|
43
44
|
__metadata("design:type", String)
|
|
44
45
|
], Store.prototype, "shopping", void 0);
|
|
@@ -52,10 +53,9 @@ __decorate([
|
|
|
52
53
|
(0, mongoose_1.Prop)({ type: Boolean, default: true }),
|
|
53
54
|
__metadata("design:type", Boolean)
|
|
54
55
|
], Store.prototype, "active", void 0);
|
|
55
|
-
Store = __decorate([
|
|
56
|
-
(0, mongoose_1.Schema)({ timestamps: true, collection:
|
|
56
|
+
exports.Store = Store = __decorate([
|
|
57
|
+
(0, mongoose_1.Schema)({ timestamps: true, collection: "stores" })
|
|
57
58
|
], Store);
|
|
58
|
-
exports.Store = Store;
|
|
59
59
|
exports.StoreSchema = mongoose_1.SchemaFactory.createForClass(Store);
|
|
60
60
|
exports.StoreSchema.index({ client: 1, name: 1 });
|
|
61
|
-
exports.StoreModel = (0, mongoose_2.model)(
|
|
61
|
+
exports.StoreModel = (0, mongoose_2.model)("Store", exports.StoreSchema);
|
|
@@ -1,30 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/session" />
|
|
19
|
-
/// <reference types="mongoose/types/types" />
|
|
20
|
-
/// <reference types="mongoose/types/utility" />
|
|
21
|
-
/// <reference types="mongoose/types/validation" />
|
|
22
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
23
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
-
import { HydratedDocument } from 'mongoose';
|
|
27
|
-
import { Party } from './party.schema';
|
|
1
|
+
import { HydratedDocument } from "mongoose";
|
|
2
|
+
import { Party } from "./party.schema";
|
|
28
3
|
export type SupplierDocument = HydratedDocument<Supplier>;
|
|
29
4
|
export declare class Supplier extends Party {
|
|
30
5
|
}
|
|
@@ -32,7 +7,7 @@ export declare const SupplierSchema: import("mongoose").Schema<Supplier, import(
|
|
|
32
7
|
_id: import("mongoose").Types.ObjectId;
|
|
33
8
|
}> & {
|
|
34
9
|
__v: number;
|
|
35
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Supplier, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Supplier>, {}, import("mongoose").
|
|
10
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Supplier, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Supplier>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<Supplier> & Required<{
|
|
36
11
|
_id: import("mongoose").Types.ObjectId;
|
|
37
12
|
}> & {
|
|
38
13
|
__v: number;
|
|
@@ -45,7 +20,7 @@ export declare const SupplierModel: import("mongoose").Model<Supplier, {}, {}, {
|
|
|
45
20
|
_id: import("mongoose").Types.ObjectId;
|
|
46
21
|
}> & {
|
|
47
22
|
__v: number;
|
|
48
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Supplier, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Supplier>, {}, import("mongoose").
|
|
23
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Supplier, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Supplier>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<Supplier> & Required<{
|
|
49
24
|
_id: import("mongoose").Types.ObjectId;
|
|
50
25
|
}> & {
|
|
51
26
|
__v: number;
|
|
@@ -12,9 +12,9 @@ const mongoose_2 = require("mongoose");
|
|
|
12
12
|
const party_schema_1 = require("./party.schema");
|
|
13
13
|
let Supplier = class Supplier extends party_schema_1.Party {
|
|
14
14
|
};
|
|
15
|
-
Supplier =
|
|
15
|
+
exports.Supplier = Supplier;
|
|
16
|
+
exports.Supplier = Supplier = __decorate([
|
|
16
17
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
17
18
|
], Supplier);
|
|
18
|
-
exports.Supplier = Supplier;
|
|
19
19
|
exports.SupplierSchema = mongoose_1.SchemaFactory.createForClass(Supplier);
|
|
20
|
-
exports.SupplierModel = (0, mongoose_2.model)(
|
|
20
|
+
exports.SupplierModel = (0, mongoose_2.model)("Supplier", exports.SupplierSchema);
|
|
@@ -1,29 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/session" />
|
|
19
|
-
/// <reference types="mongoose/types/types" />
|
|
20
|
-
/// <reference types="mongoose/types/utility" />
|
|
21
|
-
/// <reference types="mongoose/types/validation" />
|
|
22
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
23
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
-
import { HydratedDocument, Types } from 'mongoose';
|
|
1
|
+
import { HydratedDocument, Types } from "mongoose";
|
|
27
2
|
export type TagDocument = HydratedDocument<Tag>;
|
|
28
3
|
export declare class Tag {
|
|
29
4
|
organization: Types.ObjectId;
|
|
@@ -37,7 +12,7 @@ export declare const TagSchema: import("mongoose").Schema<Tag, import("mongoose"
|
|
|
37
12
|
_id: Types.ObjectId;
|
|
38
13
|
} & {
|
|
39
14
|
__v: number;
|
|
40
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Tag, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Tag>, {}, import("mongoose").
|
|
15
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Tag, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Tag>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<Tag> & {
|
|
41
16
|
_id: Types.ObjectId;
|
|
42
17
|
} & {
|
|
43
18
|
__v: number;
|
|
@@ -14,12 +14,13 @@ const mongoose_1 = require("@nestjs/mongoose");
|
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
15
|
let Tag = class Tag {
|
|
16
16
|
};
|
|
17
|
+
exports.Tag = Tag;
|
|
17
18
|
__decorate([
|
|
18
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Types.ObjectId, ref:
|
|
19
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Types.ObjectId, ref: "Organization", required: true, index: true }),
|
|
19
20
|
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
20
21
|
], Tag.prototype, "organization", void 0);
|
|
21
22
|
__decorate([
|
|
22
|
-
(0, mongoose_1.Prop)({ required: true, enum: [
|
|
23
|
+
(0, mongoose_1.Prop)({ required: true, enum: ["sales", "invoices", "payments", "actions"], index: true }),
|
|
23
24
|
__metadata("design:type", String)
|
|
24
25
|
], Tag.prototype, "module", void 0);
|
|
25
26
|
__decorate([
|
|
@@ -30,9 +31,8 @@ __decorate([
|
|
|
30
31
|
(0, mongoose_1.Prop)({ required: false }),
|
|
31
32
|
__metadata("design:type", String)
|
|
32
33
|
], Tag.prototype, "color", void 0);
|
|
33
|
-
Tag = __decorate([
|
|
34
|
-
(0, mongoose_1.Schema)({ timestamps: true, collection:
|
|
34
|
+
exports.Tag = Tag = __decorate([
|
|
35
|
+
(0, mongoose_1.Schema)({ timestamps: true, collection: "tag" })
|
|
35
36
|
], Tag);
|
|
36
|
-
exports.Tag = Tag;
|
|
37
37
|
exports.TagSchema = mongoose_1.SchemaFactory.createForClass(Tag);
|
|
38
38
|
exports.TagSchema.index({ organization: 1, module: 1, name: 1 }, { unique: true });
|
|
@@ -1,43 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/session" />
|
|
19
|
-
/// <reference types="mongoose/types/types" />
|
|
20
|
-
/// <reference types="mongoose/types/utility" />
|
|
21
|
-
/// <reference types="mongoose/types/validation" />
|
|
22
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
23
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
-
import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
|
|
27
|
-
import { Action, ActionBusinessUnit } from './action.schema';
|
|
28
|
-
import { Client } from './client.schema';
|
|
29
|
-
import { Content } from './content.schema';
|
|
30
|
-
import { Influencer } from './influencer.schema';
|
|
31
|
-
import { Profile } from './profile.schema';
|
|
32
|
-
import { Recruitment } from './recruitment.schema';
|
|
33
|
-
import { StoreVisitData } from './store-visit.schema';
|
|
1
|
+
import { HydratedDocument, Schema as MongooseSchema, Types } from "mongoose";
|
|
2
|
+
import { Action, ActionBusinessUnit } from "./action.schema";
|
|
3
|
+
import { Client } from "./client.schema";
|
|
4
|
+
import { Content } from "./content.schema";
|
|
5
|
+
import { Influencer } from "./influencer.schema";
|
|
6
|
+
import { Profile } from "./profile.schema";
|
|
7
|
+
import { Recruitment } from "./recruitment.schema";
|
|
8
|
+
import { StoreVisitData } from "./store-visit.schema";
|
|
34
9
|
export type TaskDocument = HydratedDocument<Task>;
|
|
35
10
|
export declare const TASK_FORMAT_VALUES: readonly ["reel", "image", "carousel", "story", "tiktok", "youtube", "linkedin", "pinterest"];
|
|
36
11
|
export type TaskFormat = (typeof TASK_FORMAT_VALUES)[number];
|
|
37
12
|
export declare const TASK_TYPE_VALUES: readonly ["briefing", "script", "production", "posting", "analytics", "diagnosis", "store_visit"];
|
|
38
13
|
export type TaskType = (typeof TASK_TYPE_VALUES)[number];
|
|
39
14
|
export declare const TASK_STATUS_BY_TYPE: Record<TaskType, string[]>;
|
|
40
|
-
export type TaskStatus =
|
|
15
|
+
export type TaskStatus = "awaiting" | "pending" | "late" | "done" | "cancelled" | "approval" | "rework" | "awaiting_confirmation" | "confirmed" | "awaiting_approval" | "approved" | "finished";
|
|
41
16
|
export declare const TASK_STATUS_VALUES: TaskStatus[];
|
|
42
17
|
export declare class Task {
|
|
43
18
|
_id?: Types.ObjectId;
|
|
@@ -65,7 +40,7 @@ export declare const TaskSchema: MongooseSchema<Task, import("mongoose").Model<T
|
|
|
65
40
|
_id: Types.ObjectId;
|
|
66
41
|
}> & {
|
|
67
42
|
__v: number;
|
|
68
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Task, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Task>, {}, import("mongoose").
|
|
43
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Task, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Task>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<Task> & Required<{
|
|
69
44
|
_id: Types.ObjectId;
|
|
70
45
|
}> & {
|
|
71
46
|
__v: number;
|
|
@@ -78,7 +53,7 @@ export declare const TaskModel: import("mongoose").Model<Task, {}, {}, {}, impor
|
|
|
78
53
|
_id: Types.ObjectId;
|
|
79
54
|
}> & {
|
|
80
55
|
__v: number;
|
|
81
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Task, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Task>, {}, import("mongoose").
|
|
56
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Task, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Task>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<Task> & Required<{
|
|
82
57
|
_id: Types.ObjectId;
|
|
83
58
|
}> & {
|
|
84
59
|
__v: number;
|