store-scrapper-js-common 1.0.138 → 1.0.141
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/entities/store.d.ts +11 -0
- package/dist/entities/store.js +16 -1
- package/dist/entities/store.js.map +1 -1
- package/package.json +1 -1
- package/src/entities/store.ts +14 -0
package/dist/entities/store.d.ts
CHANGED
|
@@ -10,6 +10,16 @@ export interface StoreQueueConfig {
|
|
|
10
10
|
duration: number;
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
+
export declare enum PlatformEnum {
|
|
14
|
+
VTEX = "vtex",
|
|
15
|
+
CUSTOM_VTEX = "custom_vtex",
|
|
16
|
+
COMMERCE = "commerce",
|
|
17
|
+
MYBCAPPS = "mybcapps",
|
|
18
|
+
JUMPSELLER = "jumpseller",
|
|
19
|
+
MAGENTO = "magento",
|
|
20
|
+
SHOPIFY = "shopify",
|
|
21
|
+
ALGOLIA = "algolia"
|
|
22
|
+
}
|
|
13
23
|
export declare enum CountryEnum {
|
|
14
24
|
CHILE = "chile",
|
|
15
25
|
ARGENTINA = "argentina",
|
|
@@ -49,4 +59,5 @@ export declare class Store extends AbstractBase {
|
|
|
49
59
|
country?: CountryEnum | string;
|
|
50
60
|
defaultCurrency?: CurrencyEnum | string;
|
|
51
61
|
configs?: StoreConfig[];
|
|
62
|
+
platforms?: PlatformEnum[];
|
|
52
63
|
}
|
package/dist/entities/store.js
CHANGED
|
@@ -9,10 +9,21 @@ 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.Store = exports.PriorityEnum = exports.CountryEnum = void 0;
|
|
12
|
+
exports.Store = exports.PriorityEnum = exports.CountryEnum = exports.PlatformEnum = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const abstract_base_1 = require("./abstract-base");
|
|
16
|
+
var PlatformEnum;
|
|
17
|
+
(function (PlatformEnum) {
|
|
18
|
+
PlatformEnum["VTEX"] = "vtex";
|
|
19
|
+
PlatformEnum["CUSTOM_VTEX"] = "custom_vtex";
|
|
20
|
+
PlatformEnum["COMMERCE"] = "commerce";
|
|
21
|
+
PlatformEnum["MYBCAPPS"] = "mybcapps";
|
|
22
|
+
PlatformEnum["JUMPSELLER"] = "jumpseller";
|
|
23
|
+
PlatformEnum["MAGENTO"] = "magento";
|
|
24
|
+
PlatformEnum["SHOPIFY"] = "shopify";
|
|
25
|
+
PlatformEnum["ALGOLIA"] = "algolia";
|
|
26
|
+
})(PlatformEnum = exports.PlatformEnum || (exports.PlatformEnum = {}));
|
|
16
27
|
var CountryEnum;
|
|
17
28
|
(function (CountryEnum) {
|
|
18
29
|
CountryEnum["CHILE"] = "chile";
|
|
@@ -104,6 +115,10 @@ __decorate([
|
|
|
104
115
|
typeorm_1.Column(),
|
|
105
116
|
__metadata("design:type", Array)
|
|
106
117
|
], Store.prototype, "configs", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
typeorm_1.Column(),
|
|
120
|
+
__metadata("design:type", Array)
|
|
121
|
+
], Store.prototype, "platforms", void 0);
|
|
107
122
|
Store = __decorate([
|
|
108
123
|
typeorm_1.Entity({ name: 'stores' }),
|
|
109
124
|
typeorm_1.Unique(['url'])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"/","sources":["entities/store.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAEiB;AACjB,qDAA6C;AAC7C,mDAA+C;AAgB/C,IAAY,WAQX;AARD,WAAY,WAAW;IACnB,8BAAe,CAAA;IACf,sCAAuB,CAAA;IACvB,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,gCAAiB,CAAA;IACjB,0BAAW,CAAA;IACX,8BAAe,CAAA;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\n Column, Entity, Index, Unique,\n} from 'typeorm';\nimport { IsNotEmpty } from 'class-validator';\nimport { AbstractBase } from './abstract-base';\nimport { CATEGORY_ENUM } from './keyword';\nimport { CurrencyEnum } from './product';\nimport { StoreConfig } from '../dto/store-config.dto';\n\nexport interface StoreQueueConfig {\n name?: string;\n concurrency?: number;\n rateLimiter?: {\n /** Max numbers of jobs processed */\n max: number,\n /** Per duration in milliseconds */\n duration: number\n }\n}\n\nexport enum PlatformEnum {\n VTEX = 'vtex',\n CUSTOM_VTEX = 'custom_vtex',\n COMMERCE = 'commerce',\n MYBCAPPS = 'mybcapps',\n JUMPSELLER = 'jumpseller',\n MAGENTO = 'magento',\n SHOPIFY = 'shopify',\n ALGOLIA = 'algolia',\n}\n\nexport enum CountryEnum {\n CHILE = 'chile',\n ARGENTINA = 'argentina',\n URUGUAY = 'uruguay',\n PERU = 'peru',\n BRAZIL = 'brazil',\n USA = 'usa',\n SPAIN = 'spain',\n}\n\nexport enum PriorityEnum {\n VERY_HIGH = 'very_high',\n HIGH = 'high',\n MEDIUM = 'medium',\n LOW = 'low',\n\n SHOES_HIGH = 'shoes_high',\n SHOES_MEDIUM = 'shoes_medium',\n SHOES_LOW = 'shoes_low',\n\n TECNO_HIGH = 'tecno_high',\n TECNO_MEDIUM = 'tecno_medium',\n TECNO_LOW = 'tecno_low',\n\n ELECTRO_HIGH = 'electro_high',\n ELECTRO_MEDIUM = 'electro_medium',\n ELECTRO_LOW = 'electro_low',\n}\n\n@Entity({ name: 'stores' })\n@Unique(['url'])\nexport class Store extends AbstractBase {\n @Column({ nullable: false })\n @Index()\n @IsNotEmpty()\n name: string;\n\n @Column()\n displayName?: string;\n\n @Column({ nullable: false })\n @IsNotEmpty()\n url: string;\n\n @Column()\n categories?: CATEGORY_ENUM[];\n\n @Column()\n priority?: PriorityEnum | string;\n\n @Column()\n type: string;\n\n @Column()\n parentStoreRef?: string;\n\n @Column({ default: true, type: 'boolean' })\n enabled = true;\n\n @Column()\n queue: string;\n\n @Column()\n persistQueue: string;\n\n @Column()\n storeQueueConfig?: StoreQueueConfig[];\n\n @Column()\n country?: CountryEnum | string;\n\n @Column()\n defaultCurrency?: CurrencyEnum | string;\n\n @Column()\n configs?: StoreConfig[];\n\n @Column()\n platforms?: PlatformEnum[];\n}\n"]}
|
package/package.json
CHANGED
package/src/entities/store.ts
CHANGED
|
@@ -18,6 +18,17 @@ export interface StoreQueueConfig {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
export enum PlatformEnum {
|
|
22
|
+
VTEX = 'vtex',
|
|
23
|
+
CUSTOM_VTEX = 'custom_vtex',
|
|
24
|
+
COMMERCE = 'commerce',
|
|
25
|
+
MYBCAPPS = 'mybcapps',
|
|
26
|
+
JUMPSELLER = 'jumpseller',
|
|
27
|
+
MAGENTO = 'magento',
|
|
28
|
+
SHOPIFY = 'shopify',
|
|
29
|
+
ALGOLIA = 'algolia',
|
|
30
|
+
}
|
|
31
|
+
|
|
21
32
|
export enum CountryEnum {
|
|
22
33
|
CHILE = 'chile',
|
|
23
34
|
ARGENTINA = 'argentina',
|
|
@@ -94,4 +105,7 @@ export class Store extends AbstractBase {
|
|
|
94
105
|
|
|
95
106
|
@Column()
|
|
96
107
|
configs?: StoreConfig[];
|
|
108
|
+
|
|
109
|
+
@Column()
|
|
110
|
+
platforms?: PlatformEnum[];
|
|
97
111
|
}
|