@thinkerchain/flipper-entities 1.3.0 → 1.5.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 CHANGED
@@ -1,5 +1,6 @@
1
1
  export type { UserData, } from './types/user.types';
2
2
  export type { ItemData, } from './types/item.types';
3
+ export type { ItemFilterKey, InvalidFilterReason, ItemCheckStatus, ItemCheckItem, ItemCheckRequest, ItemCheckResult, SearchDataWithUser, ScrapeResultData, } from './types/item-check.types';
3
4
  export type { UserItemData, } from './types/user-item.types';
4
5
  export type { SearchData, } from './types/search.types';
5
6
  export type { UserChannelData, } from './types/user-channel.types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,QAAQ,GACT,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACV,QAAQ,GACT,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACV,YAAY,GACb,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EACV,UAAU,GACX,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACV,eAAe,GAChB,MAAM,4BAA4B,CAAC;AAEpC,YAAY,EACV,UAAU,GACX,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACV,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,cAAc,GACf,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,QAAQ,GACT,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACV,QAAQ,GACT,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACV,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAElC,YAAY,EACV,YAAY,GACb,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EACV,UAAU,GACX,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACV,eAAe,GAChB,MAAM,4BAA4B,CAAC;AAEpC,YAAY,EACV,UAAU,GACX,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACV,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,cAAc,GACf,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,49 @@
1
+ import type { ItemData } from './item.types';
2
+ import type { SearchData } from './search.types';
3
+ import type { UserData } from './user.types';
4
+ import type { UserChannelData } from './user-channel.types';
5
+ export type ItemFilterKey = 'name' | 'price' | 'year' | 'description' | 'rating' | 'geofencing';
6
+ export type InvalidFilterReason = {
7
+ key: ItemFilterKey;
8
+ condition?: string;
9
+ value?: unknown;
10
+ reason: string;
11
+ };
12
+ export type ItemCheckStatus = 'new' | 'new-but-duplicate-with-other-search' | 'already-exist';
13
+ export type ItemCheckItem = {
14
+ searchId: number;
15
+ userId: number;
16
+ marketPlaceId: string;
17
+ name?: string | null;
18
+ image?: string | null;
19
+ link?: string | null;
20
+ price?: number | null;
21
+ location?: string | null;
22
+ year?: number | null;
23
+ description?: string | null;
24
+ other?: Record<string, unknown> | null;
25
+ };
26
+ export type ItemCheckRequest = {
27
+ filterKeys: ItemFilterKey[];
28
+ items: ItemCheckItem[];
29
+ };
30
+ export type ItemCheckResult = {
31
+ status: ItemCheckStatus;
32
+ item: ItemCheckItem;
33
+ isValid: boolean;
34
+ filters: InvalidFilterReason[];
35
+ };
36
+ export type SearchDataWithUser = SearchData & {
37
+ user?: UserData & {
38
+ userChannels: UserChannelData[];
39
+ };
40
+ };
41
+ export type ScrapeResultData = {
42
+ type: ItemCheckStatus;
43
+ item: ItemData & {
44
+ search: SearchDataWithUser;
45
+ };
46
+ isValid: boolean;
47
+ filters: InvalidFilterReason[];
48
+ };
49
+ //# sourceMappingURL=item-check.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-check.types.d.ts","sourceRoot":"","sources":["../../src/types/item-check.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,OAAO,GACP,MAAM,GACN,aAAa,GACb,QAAQ,GACR,YAAY,CAAC;AAEjB,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,EAAE,aAAa,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,eAAe,GACvB,KAAK,GACL,qCAAqC,GACrC,eAAe,CAAC;AAEpB,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,KAAK,EAAE,aAAa,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,eAAe,CAAC;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG;IAC5C,IAAI,CAAC,EAAE,QAAQ,GAAG;QAAE,YAAY,EAAE,eAAe,EAAE,CAAA;KAAE,CAAC;CACvD,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,QAAQ,GAAG;QAAE,MAAM,EAAE,kBAAkB,CAAA;KAAE,CAAC;IAChD,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAChC,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=item-check.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-check.types.js","sourceRoot":"","sources":["../../src/types/item-check.types.ts"],"names":[],"mappings":""}
@@ -9,11 +9,12 @@ export type ItemData = {
9
9
  image: string | null;
10
10
  link: string | null;
11
11
  price: number | null;
12
+ formattedAmount: string | null;
12
13
  location: string | null;
13
14
  year: number | null;
14
15
  other: Record<string, unknown> | null;
15
- textContent: string | null;
16
16
  description: string | null;
17
+ isValid: boolean;
17
18
  deleted: boolean;
18
19
  createdAt: string;
19
20
  createdBy: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"item.types.d.ts","sourceRoot":"","sources":["../../src/types/item.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACtC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC"}
1
+ {"version":3,"file":"item.types.d.ts","sourceRoot":"","sources":["../../src/types/item.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACtC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkerchain/flipper-entities",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",