store-scrapper-js-common 1.0.140 → 1.0.143
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/dto/store-config.dto.d.ts +11 -0
- package/dist/dto/store-config.dto.js.map +1 -1
- package/dist/entities/store.d.ts +2 -1
- package/dist/entities/store.js +1 -0
- package/dist/entities/store.js.map +1 -1
- package/package.json +1 -1
- package/src/dto/store-config.dto.ts +14 -0
- package/src/entities/store.ts +1 -0
|
@@ -3,11 +3,22 @@ export declare class StoreConfig {
|
|
|
3
3
|
filterCategories?: string[];
|
|
4
4
|
skipCategories?: string[];
|
|
5
5
|
cacheMenu?: boolean;
|
|
6
|
+
cacheKey?: string;
|
|
7
|
+
cacheTTL?: number;
|
|
6
8
|
headers?: {
|
|
7
9
|
[key: string]: any;
|
|
8
10
|
};
|
|
9
11
|
includeProductsWithoutStock?: boolean;
|
|
10
12
|
queue?: string;
|
|
11
13
|
persistQueue?: string;
|
|
14
|
+
proxy?: {
|
|
15
|
+
host: string;
|
|
16
|
+
port: number;
|
|
17
|
+
auth?: {
|
|
18
|
+
username: string;
|
|
19
|
+
password: string;
|
|
20
|
+
};
|
|
21
|
+
protocol?: string;
|
|
22
|
+
};
|
|
12
23
|
[key: string]: any;
|
|
13
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-config.dto.js","sourceRoot":"/","sources":["dto/store-config.dto.ts"],"names":[],"mappings":";;;AAAA,MAAa,WAAW;
|
|
1
|
+
{"version":3,"file":"store-config.dto.js","sourceRoot":"/","sources":["dto/store-config.dto.ts"],"names":[],"mappings":";;;AAAA,MAAa,WAAW;CAgCvB;AAhCD,kCAgCC","sourcesContent":["export class StoreConfig {\n name: string;\n\n filterCategories?: string[];\n\n skipCategories?: string[];\n\n cacheMenu?: boolean;\n\n cacheKey?: string;\n\n cacheTTL?: number;\n\n headers?: {[key: string]: any};\n\n includeProductsWithoutStock?: boolean;\n\n queue?: string;\n\n persistQueue?: string;\n\n proxy?: {\n host: string;\n port: number;\n auth?: {\n username: string;\n password: string;\n };\n protocol?: string;\n }\n\n [key: string]: any\n}\n"]}
|
package/dist/entities/store.d.ts
CHANGED
package/dist/entities/store.js
CHANGED
|
@@ -22,6 +22,7 @@ var PlatformEnum;
|
|
|
22
22
|
PlatformEnum["JUMPSELLER"] = "jumpseller";
|
|
23
23
|
PlatformEnum["MAGENTO"] = "magento";
|
|
24
24
|
PlatformEnum["SHOPIFY"] = "shopify";
|
|
25
|
+
PlatformEnum["ALGOLIA"] = "algolia";
|
|
25
26
|
})(PlatformEnum = exports.PlatformEnum || (exports.PlatformEnum = {}));
|
|
26
27
|
var CountryEnum;
|
|
27
28
|
(function (CountryEnum) {
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"/","sources":["entities/store.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAEiB;AACjB,qDAA6C;AAC7C,mDAA+C;AAgB/C,IAAY,YASX;AATD,WAAY,YAAY;IACpB,6BAAa,CAAA;IACb,2CAA2B,CAAA;IAC3B,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;IACrB,yCAAyB,CAAA;IACzB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;AACvB,CAAC,EATW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QASvB;AAED,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;AACnB,CAAC,EARW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QA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,QAAQ,EAAE,CAAC;IAC1B,gBAAM,CAAC,CAAC,KAAK,CAAC,CAAC;GACH,KAAK,CAgDjB;AAhDY,sBAAK","sourcesContent":["import {\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
|
@@ -7,6 +7,10 @@ export class StoreConfig {
|
|
|
7
7
|
|
|
8
8
|
cacheMenu?: boolean;
|
|
9
9
|
|
|
10
|
+
cacheKey?: string;
|
|
11
|
+
|
|
12
|
+
cacheTTL?: number;
|
|
13
|
+
|
|
10
14
|
headers?: {[key: string]: any};
|
|
11
15
|
|
|
12
16
|
includeProductsWithoutStock?: boolean;
|
|
@@ -15,5 +19,15 @@ export class StoreConfig {
|
|
|
15
19
|
|
|
16
20
|
persistQueue?: string;
|
|
17
21
|
|
|
22
|
+
proxy?: {
|
|
23
|
+
host: string;
|
|
24
|
+
port: number;
|
|
25
|
+
auth?: {
|
|
26
|
+
username: string;
|
|
27
|
+
password: string;
|
|
28
|
+
};
|
|
29
|
+
protocol?: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
18
32
|
[key: string]: any
|
|
19
33
|
}
|