@grapadigital/shared-schemas 1.0.224 → 1.0.225

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.
@@ -54,6 +54,16 @@ export declare const ActionPromptConfigSchema: MongooseSchema<ActionPromptConfig
54
54
  }>;
55
55
  export declare const ACTION_STATUS_VALUES: readonly ["config", "inProgress", "finished", "archived", "cancelled"];
56
56
  export type ActionStatus = (typeof ACTION_STATUS_VALUES)[number];
57
+ /**
58
+ * Tipo da Ação (Action.type). O nome evita confusão com o ACTION_TYPE_VALUES
59
+ * do shared-app-modules, que é partnership. Ver GD-711.
60
+ * - influency: Influência (antes "creator", "Creators Pago");
61
+ * - organic: Orgânicos do mês da Samsung (GD-699/GD-711);
62
+ * - annual: Ação anual da Samsung, fora da captura diária, atualizada só pelo
63
+ * modo metrics-only do content-capture-worker.
64
+ */
65
+ export declare const ACTION_KIND_VALUES: readonly ["seeding", "ugc", "influency", "organic", "annual"];
66
+ export type ActionKind = (typeof ACTION_KIND_VALUES)[number];
57
67
  /**
58
68
  * Fase da Ação (antigo briefing do genc). Com `_id` porque o Conteúdo aponta
59
69
  * para ela (`Content.phase`). Período e hashtags opcionais fazem a captura
@@ -91,8 +101,8 @@ export declare class Action {
91
101
  nps?: number;
92
102
  status: ActionStatus;
93
103
  partnership: 'partner' | 'exclusive';
94
- /** organic = Orgânicos do mês: post aprovado numa Ação de produto sai dela. Ver GD-699. */
95
- type: 'seeding' | 'ugc' | 'creator' | 'organic';
104
+ /** Ver ACTION_KIND_VALUES. organic: post aprovado numa Ação de produto sai dela (GD-699). */
105
+ type: ActionKind;
96
106
  socialnetworks?: string[];
97
107
  recruitedInfluencers?: number;
98
108
  hiredInfluencers?: number;
@@ -9,7 +9,7 @@ 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.ActionModel = exports.ActionSchema = exports.Action = exports.ActionPhaseSchema = exports.ActionPhase = exports.ACTION_STATUS_VALUES = exports.ActionPromptConfigSchema = exports.ActionPromptConfig = exports.ACTION_BUSINESS_UNIT_VALUES = void 0;
12
+ exports.ActionModel = exports.ActionSchema = exports.Action = exports.ActionPhaseSchema = exports.ActionPhase = exports.ACTION_KIND_VALUES = exports.ACTION_STATUS_VALUES = exports.ActionPromptConfigSchema = exports.ActionPromptConfig = exports.ACTION_BUSINESS_UNIT_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");
@@ -75,6 +75,15 @@ exports.ACTION_STATUS_VALUES = [
75
75
  'archived',
76
76
  'cancelled',
77
77
  ];
78
+ /**
79
+ * Tipo da Ação (Action.type). O nome evita confusão com o ACTION_TYPE_VALUES
80
+ * do shared-app-modules, que é partnership. Ver GD-711.
81
+ * - influency: Influência (antes "creator", "Creators Pago");
82
+ * - organic: Orgânicos do mês da Samsung (GD-699/GD-711);
83
+ * - annual: Ação anual da Samsung, fora da captura diária, atualizada só pelo
84
+ * modo metrics-only do content-capture-worker.
85
+ */
86
+ exports.ACTION_KIND_VALUES = ['seeding', 'ugc', 'influency', 'organic', 'annual'];
78
87
  /**
79
88
  * Fase da Ação (antigo briefing do genc). Com `_id` porque o Conteúdo aponta
80
89
  * para ela (`Content.phase`). Período e hashtags opcionais fazem a captura
@@ -170,8 +179,8 @@ __decorate([
170
179
  __metadata("design:type", String)
171
180
  ], Action.prototype, "partnership", void 0);
172
181
  __decorate([
173
- (0, swagger_1.ApiProperty)({ enum: ['seeding', 'ugc', 'creator', 'organic'], example: 'seeding' }),
174
- (0, mongoose_1.Prop)({ type: String, enum: ['seeding', 'ugc', 'creator', 'organic'], required: true }),
182
+ (0, swagger_1.ApiProperty)({ enum: exports.ACTION_KIND_VALUES, example: 'seeding' }),
183
+ (0, mongoose_1.Prop)({ type: String, enum: exports.ACTION_KIND_VALUES, required: true }),
175
184
  __metadata("design:type", String)
176
185
  ], Action.prototype, "type", void 0);
177
186
  __decorate([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grapadigital/shared-schemas",
3
- "version": "1.0.224",
3
+ "version": "1.0.225",
4
4
  "description": "Shared Mongoose Schemas",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -68,6 +68,17 @@ export const ACTION_STATUS_VALUES = [
68
68
  ] as const;
69
69
  export type ActionStatus = (typeof ACTION_STATUS_VALUES)[number];
70
70
 
71
+ /**
72
+ * Tipo da Ação (Action.type). O nome evita confusão com o ACTION_TYPE_VALUES
73
+ * do shared-app-modules, que é partnership. Ver GD-711.
74
+ * - influency: Influência (antes "creator", "Creators Pago");
75
+ * - organic: Orgânicos do mês da Samsung (GD-699/GD-711);
76
+ * - annual: Ação anual da Samsung, fora da captura diária, atualizada só pelo
77
+ * modo metrics-only do content-capture-worker.
78
+ */
79
+ export const ACTION_KIND_VALUES = ['seeding', 'ugc', 'influency', 'organic', 'annual'] as const;
80
+ export type ActionKind = (typeof ACTION_KIND_VALUES)[number];
81
+
71
82
  /**
72
83
  * Fase da Ação (antigo briefing do genc). Com `_id` porque o Conteúdo aponta
73
84
  * para ela (`Content.phase`). Período e hashtags opcionais fazem a captura
@@ -149,10 +160,10 @@ export class Action {
149
160
  @Prop({ type: String, enum: ['partner', 'exclusive'], required: true })
150
161
  partnership: 'partner' | 'exclusive';
151
162
 
152
- /** organic = Orgânicos do mês: post aprovado numa Ação de produto sai dela. Ver GD-699. */
153
- @ApiProperty({ enum: ['seeding', 'ugc', 'creator', 'organic'], example: 'seeding' })
154
- @Prop({ type: String, enum: ['seeding', 'ugc', 'creator', 'organic'], required: true })
155
- type: 'seeding' | 'ugc' | 'creator' | 'organic';
163
+ /** Ver ACTION_KIND_VALUES. organic: post aprovado numa Ação de produto sai dela (GD-699). */
164
+ @ApiProperty({ enum: ACTION_KIND_VALUES, example: 'seeding' })
165
+ @Prop({ type: String, enum: ACTION_KIND_VALUES, required: true })
166
+ type: ActionKind;
156
167
 
157
168
  @ApiProperty({ example: ['instagram', 'tiktok'], required: false })
158
169
  @Prop({ type: [String], required: false })