agrs-sequelize-sdk 1.3.51 → 1.3.54

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.
@@ -101,7 +101,12 @@ module.exports = (sequelize, DataTypes) => {
101
101
  comment: "Media buyer assigned to this rule for permissions",
102
102
  },
103
103
  dateRangeType: {
104
- type: DataTypes.ENUM("LAST_N_DAYS", "CUSTOM_RANGE", "CURRENT_MONTH", "LAST_MONTH"),
104
+ type: DataTypes.ENUM(
105
+ "LAST_N_DAYS",
106
+ "CUSTOM_RANGE",
107
+ "CURRENT_MONTH",
108
+ "LAST_MONTH"
109
+ ),
105
110
  allowNull: true,
106
111
  defaultValue: "LAST_N_DAYS",
107
112
  comment: "Type of date range for rule evaluation",
@@ -14,14 +14,6 @@ module.exports = (sequelize, DataTypes) => {
14
14
  autoIncrement: true,
15
15
  comment: "Auto-incremented primary key",
16
16
  },
17
- templateId: {
18
- type: DataTypes.INTEGER,
19
- allowNull: true, // ✅ Made nullable - user-uploaded templates won't have a template_id
20
- unique: true,
21
- field: "template_id",
22
- comment:
23
- "Reference to templateConfig.json ID (1-59), null for user-uploaded templates",
24
- },
25
17
  name: {
26
18
  type: DataTypes.STRING(255),
27
19
  allowNull: false,
@@ -195,6 +187,14 @@ module.exports = (sequelize, DataTypes) => {
195
187
  comment: "HTML/CSS preview generated by Gemini AI",
196
188
  },
197
189
 
190
+ // ===== Template Specification (JSON) =====
191
+ templateSpec: {
192
+ type: DataTypes.JSON,
193
+ allowNull: true,
194
+ field: "template_spec",
195
+ comment: "Detailed JSON specification for template reproduction (imageStyle, layout, positions)",
196
+ },
197
+
198
198
  // ===== Legacy Grid Config (for backward compatibility) =====
199
199
  legacyGridConfig: {
200
200
  type: DataTypes.JSON,
@@ -228,11 +228,6 @@ module.exports = (sequelize, DataTypes) => {
228
228
  timestamps: true,
229
229
  underscored: true,
230
230
  indexes: [
231
- {
232
- name: "idx_template_metadata_template_id",
233
- fields: ["template_id"],
234
- unique: true,
235
- },
236
231
  {
237
232
  name: "idx_template_metadata_status",
238
233
  fields: ["status"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agrs-sequelize-sdk",
3
- "version": "1.3.51",
3
+ "version": "1.3.54",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "start": "node index.js",