@thinkerchain/flipper-entities 1.8.0 → 2.1.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 +14 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/types/banned-seller.types.d.ts +2 -1
- package/dist/types/banned-seller.types.d.ts.map +1 -1
- package/dist/types/billing-options.types.d.ts +14 -0
- package/dist/types/billing-options.types.d.ts.map +1 -0
- package/dist/types/billing-options.types.js +3 -0
- package/dist/types/billing-options.types.js.map +1 -0
- package/dist/types/engine.types.d.ts +8 -7
- package/dist/types/engine.types.d.ts.map +1 -1
- package/dist/types/item-check.types.d.ts +4 -36
- package/dist/types/item-check.types.d.ts.map +1 -1
- package/dist/types/item-filter.types.d.ts +2 -2
- package/dist/types/item-filter.types.d.ts.map +1 -1
- package/dist/types/item.types.d.ts +6 -9
- package/dist/types/item.types.d.ts.map +1 -1
- package/dist/types/option.types.d.ts +2 -1
- package/dist/types/option.types.d.ts.map +1 -1
- package/dist/types/plan.types.d.ts +47 -0
- package/dist/types/plan.types.d.ts.map +1 -0
- package/dist/types/plan.types.js +3 -0
- package/dist/types/plan.types.js.map +1 -0
- package/dist/types/scrape.types.d.ts +40 -0
- package/dist/types/scrape.types.d.ts.map +1 -0
- package/dist/types/scrape.types.js +3 -0
- package/dist/types/scrape.types.js.map +1 -0
- package/dist/types/search.types.d.ts +8 -4
- package/dist/types/search.types.d.ts.map +1 -1
- package/dist/types/subscription.types.d.ts +39 -0
- package/dist/types/subscription.types.d.ts.map +1 -0
- package/dist/types/subscription.types.js +3 -0
- package/dist/types/subscription.types.js.map +1 -0
- package/dist/types/usage.types.d.ts +21 -0
- package/dist/types/usage.types.d.ts.map +1 -0
- package/dist/types/usage.types.js +3 -0
- package/dist/types/usage.types.js.map +1 -0
- package/dist/types/user-channel.types.d.ts +4 -1
- package/dist/types/user-channel.types.d.ts.map +1 -1
- package/dist/types/user-item.types.d.ts +3 -2
- package/dist/types/user-item.types.d.ts.map +1 -1
- package/dist/types/user.types.d.ts +8 -7
- package/dist/types/user.types.d.ts.map +1 -1
- package/package.json +22 -22
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export type {
|
|
3
|
-
export type {
|
|
1
|
+
export type { UserEntity, UserWithRelations } from './types/user.types';
|
|
2
|
+
export type { ItemEntity, ItemWithSearch } from './types/item.types';
|
|
3
|
+
export type { ScrapedItem, SearchWithItems } from './types/scrape.types';
|
|
4
|
+
export type { ItemFilterKey, InvalidFilterReason, ItemCheckStatus, CheckItemsRequest, } from './types/item-check.types';
|
|
4
5
|
export type { ItemFilterResult, ItemFilterContext, } from './types/item-filter.types';
|
|
5
|
-
export type {
|
|
6
|
-
export type {
|
|
7
|
-
export type {
|
|
8
|
-
export type { EngineSearchRequest, EngineEnv, EngineChildInput, EngineScrapeInput, ScrapeTotals, ScrapeStatus, ScrapeIpcMessage, ScrapeDetailData, } from './types/engine.types';
|
|
9
|
-
export type { ChannelEntity, TelegramChannelEntity,
|
|
6
|
+
export type { UserItemEntity, RichNoteJSONB } from './types/user-item.types';
|
|
7
|
+
export type { BannedSellerEntity } from './types/banned-seller.types';
|
|
8
|
+
export type { SearchEntity, SearchWithUser } from './types/search.types';
|
|
9
|
+
export type { EngineSearchRequest, EngineEnv, EngineChildInput, EngineScrapeInput, ScrapeTotals, ScrapeStatus, ScrapeIpcData, ScrapeIpcMessage, ScrapeDetailData, } from './types/engine.types';
|
|
10
|
+
export type { ChannelEntity, TelegramChannelEntity, UserChannelEntity, } from './types/user-channel.types';
|
|
10
11
|
export type { CoreEntity, DefaultValueEntity, StringMatchAlgorithm, StringMatcherType, DefaultItemFilterEntity, MarketPlacePropEntity, FacebookMarketPlacePropEntity, EngineEntity, EngineOptions, OrchestratorOptions, ProxyOptions, } from './types/core-options.types';
|
|
11
|
-
export type {
|
|
12
|
+
export type { OptionEntity } from './types/option.types';
|
|
13
|
+
export type { PlanKind, PlanLimits, PlanFeature, PlanEntity, } from './types/plan.types';
|
|
14
|
+
export type { SubscriptionStatus, SubscriptionSource, SubscriptionSnapshot, SubscriptionEntity, SubscriptionWithPlan, } from './types/subscription.types';
|
|
15
|
+
export type { BillingValueJSONB } from './types/billing-options.types';
|
|
16
|
+
export type { UsageMetric, PlanUsageSummary } from './types/usage.types';
|
|
12
17
|
export type { LocationJSONB, MarketPlacePropJSONB, ItemFilterImage, ItemFilterLink, ItemFilterLocation, ItemFilterName, ItemFilterPrice, ItemFilterYear, ItemFilterDescription, ItemFilterRating, ItemFilterScam, ItemFilterJSONB, CoreValueJSONB, } from './types/search-jsonb.types';
|
|
13
18
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAExE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAErE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEzE,YAAY,EACV,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAElC,YAAY,EACV,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AAEnC,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7E,YAAY,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEzE,YAAY,EACV,mBAAmB,EACnB,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACV,aAAa,EACb,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,4BAA4B,CAAC;AAEpC,YAAY,EACV,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACrB,6BAA6B,EAC7B,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,YAAY,GACb,MAAM,4BAA4B,CAAC;AAEpC,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,YAAY,EACV,QAAQ,EACR,UAAU,EACV,WAAW,EACX,UAAU,GACX,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AAEpC,YAAY,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEzE,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banned-seller.types.d.ts","sourceRoot":"","sources":["../../src/types/banned-seller.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"banned-seller.types.d.ts","sourceRoot":"","sources":["../../src/types/banned-seller.types.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Nilai kolom `Option.value` untuk `name='billing'` (konfigurasi trial & enforcement). */
|
|
2
|
+
export interface BillingValueJSONB {
|
|
3
|
+
/** Plan yang dipakai untuk trial. */
|
|
4
|
+
trialPlanKey: string;
|
|
5
|
+
/** Lama trial dalam hari. */
|
|
6
|
+
trialDays: number;
|
|
7
|
+
/** Toleransi hari setelah periode habis sebelum langganan dianggap mati. */
|
|
8
|
+
graceDays: number;
|
|
9
|
+
/** true = user tanpa langganan otomatis dapat trial saat register / pertama diakses. */
|
|
10
|
+
autoTrial: boolean;
|
|
11
|
+
/** true = kuota ditegakkan (create-time + runtime). false = mode aman/dry-run. */
|
|
12
|
+
enforcementEnabled: boolean;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=billing-options.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-options.types.d.ts","sourceRoot":"","sources":["../../src/types/billing-options.types.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,MAAM,WAAW,iBAAiB;IAChC,qCAAqC;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,6BAA6B;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,SAAS,EAAE,MAAM,CAAC;IAClB,wFAAwF;IACxF,SAAS,EAAE,OAAO,CAAC;IACnB,kFAAkF;IAClF,kBAAkB,EAAE,OAAO,CAAC;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-options.types.js","sourceRoot":"","sources":["../../src/types/billing-options.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { CoreEntity, ProxyOptions } from './core-options.types';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
/** Payload RMQ `engine.search`: orchestrator core -> engine. */
|
|
2
|
+
import type { SearchWithItems } from './scrape.types';
|
|
3
|
+
import type { SearchWithUser } from './search.types';
|
|
4
|
+
/** Payload RMQ `engine.search`: orchestrator core -> engine. Search saja, tanpa item. */
|
|
5
5
|
export type EngineSearchRequest = {
|
|
6
6
|
option: CoreEntity;
|
|
7
|
-
|
|
7
|
+
searches: SearchWithUser[];
|
|
8
8
|
};
|
|
9
9
|
/** Env yang di-inject ke child process engine (via JSON argv). */
|
|
10
10
|
export type EngineEnv = {
|
|
@@ -22,12 +22,12 @@ export type EngineEnv = {
|
|
|
22
22
|
/** Input child process engine (`main.ts` -> scraper). */
|
|
23
23
|
export type EngineChildInput = {
|
|
24
24
|
option: CoreEntity;
|
|
25
|
-
|
|
25
|
+
searches: SearchWithUser[];
|
|
26
26
|
env: EngineEnv;
|
|
27
27
|
};
|
|
28
28
|
/** Input use case scraping di child process. */
|
|
29
29
|
export type EngineScrapeInput = {
|
|
30
|
-
|
|
30
|
+
searches: SearchWithUser[];
|
|
31
31
|
env: EngineEnv;
|
|
32
32
|
proxy: ProxyOptions;
|
|
33
33
|
};
|
|
@@ -45,10 +45,11 @@ export type ScrapeStatus = {
|
|
|
45
45
|
durationMs?: number;
|
|
46
46
|
};
|
|
47
47
|
/** Envelope IPC parent <-> child process engine. */
|
|
48
|
+
export type ScrapeIpcData = boolean | ScrapeStatus | SearchWithItems | SearchWithItems[];
|
|
48
49
|
export type ScrapeIpcMessage = {
|
|
49
50
|
type: string;
|
|
50
51
|
id: number;
|
|
51
|
-
data:
|
|
52
|
+
data: ScrapeIpcData;
|
|
52
53
|
};
|
|
53
54
|
/** Hasil detail scraping (obscura) untuk satu listing. */
|
|
54
55
|
export type ScrapeDetailData = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.types.d.ts","sourceRoot":"","sources":["../../src/types/engine.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"engine.types.d.ts","sourceRoot":"","sources":["../../src/types/engine.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,yFAAyF;AACzF,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC5B,CAAC;AAEF,kEAAkE;AAClE,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,uBAAuB,EAAE,MAAM,CAAC;IAChC,kCAAkC,EAAE,MAAM,CAAC;IAC3C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,yDAAyD;AACzD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,GAAG,EAAE,SAAS,CAAC;CAChB,CAAC;AAEF,gDAAgD;AAChD,MA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|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { SearchDataWithUser } from './search.types';
|
|
1
|
+
import type { SearchWithItems } from './scrape.types';
|
|
3
2
|
export type ItemFilterKey = 'name' | 'price' | 'year' | 'description' | 'rating' | 'seller' | 'geofencing';
|
|
4
3
|
export type InvalidFilterReason = {
|
|
5
4
|
key: ItemFilterKey;
|
|
@@ -8,40 +7,9 @@ export type InvalidFilterReason = {
|
|
|
8
7
|
reason: string;
|
|
9
8
|
};
|
|
10
9
|
export type ItemCheckStatus = 'new' | 'new-but-duplicate-with-other-search' | 'already-exist';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
userId: number;
|
|
14
|
-
marketPlaceId: string;
|
|
15
|
-
marketPlaceName?: string | null;
|
|
16
|
-
sellerKey?: string | null;
|
|
17
|
-
sellerName?: string | null;
|
|
18
|
-
name?: string | null;
|
|
19
|
-
image?: string | null;
|
|
20
|
-
link?: string | null;
|
|
21
|
-
price?: number | null;
|
|
22
|
-
location?: string | null;
|
|
23
|
-
year?: number | null;
|
|
24
|
-
description?: string | null;
|
|
25
|
-
other?: Record<string, unknown> | null;
|
|
26
|
-
};
|
|
27
|
-
/** Satu search lengkap (search + user + bans) beserta item yang dicek. */
|
|
28
|
-
export type ItemCheckSearch = SearchDataWithUser & {
|
|
29
|
-
items: ItemCheckItem[];
|
|
30
|
-
};
|
|
31
|
-
export type ItemCheckRequest = {
|
|
10
|
+
/** Payload RMQ `core.item.checkItems`: filter mana yang dijalankan untuk satu search. */
|
|
11
|
+
export type CheckItemsRequest = {
|
|
32
12
|
filterKeys: ItemFilterKey[];
|
|
33
|
-
search:
|
|
34
|
-
};
|
|
35
|
-
export type ItemCheckResult = {
|
|
36
|
-
status: ItemCheckStatus;
|
|
37
|
-
item: ItemCheckItem;
|
|
38
|
-
isValid: boolean;
|
|
39
|
-
filters: InvalidFilterReason[];
|
|
40
|
-
};
|
|
41
|
-
export type ScrapeResultData = {
|
|
42
|
-
type: ItemCheckStatus;
|
|
43
|
-
item: ScrapeItemData;
|
|
44
|
-
isValid: boolean;
|
|
45
|
-
filters: InvalidFilterReason[];
|
|
13
|
+
search: SearchWithItems;
|
|
46
14
|
};
|
|
47
15
|
//# sourceMappingURL=item-check.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item-check.types.d.ts","sourceRoot":"","sources":["../../src/types/item-check.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"item-check.types.d.ts","sourceRoot":"","sources":["../../src/types/item-check.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,OAAO,GACP,MAAM,GACN,aAAa,GACb,QAAQ,GACR,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,yFAAyF;AACzF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,MAAM,EAAE,eAAe,CAAC;CACzB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ItemFilterKey } from './item-check.types';
|
|
2
|
-
import type {
|
|
2
|
+
import type { UserWithRelations } from './user.types';
|
|
3
3
|
export type ItemFilterResult = {
|
|
4
4
|
valid: boolean;
|
|
5
5
|
key?: ItemFilterKey;
|
|
@@ -9,7 +9,7 @@ export type ItemFilterResult = {
|
|
|
9
9
|
info?: string;
|
|
10
10
|
};
|
|
11
11
|
export type ItemFilterContext = {
|
|
12
|
-
user?:
|
|
12
|
+
user?: UserWithRelations;
|
|
13
13
|
bannedSellerKeys: ReadonlySet<string>;
|
|
14
14
|
};
|
|
15
15
|
//# sourceMappingURL=item-filter.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item-filter.types.d.ts","sourceRoot":"","sources":["../../src/types/item-filter.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"item-filter.types.d.ts","sourceRoot":"","sources":["../../src/types/item-filter.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACvC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { SearchWithUser } from './search.types';
|
|
2
|
+
/** Representasi tabel `Item`. */
|
|
3
|
+
export type ItemEntity = {
|
|
3
4
|
id: number;
|
|
4
5
|
searchId: number;
|
|
5
6
|
userId: number;
|
|
@@ -24,12 +25,8 @@ export type ItemData = {
|
|
|
24
25
|
updatedAt: string;
|
|
25
26
|
updatedBy: string | null;
|
|
26
27
|
};
|
|
27
|
-
/** Item + search
|
|
28
|
-
export type
|
|
29
|
-
search:
|
|
30
|
-
};
|
|
31
|
-
/** Item + search wajib (hasil scrape siap simpan / publish). */
|
|
32
|
-
export type ScrapeItemData = ItemData & {
|
|
33
|
-
search: SearchDataWithUser;
|
|
28
|
+
/** Item + search pemiliknya (dipakai filter core). */
|
|
29
|
+
export type ItemWithSearch = ItemEntity & {
|
|
30
|
+
search: SearchWithUser | null;
|
|
34
31
|
};
|
|
35
32
|
//# sourceMappingURL=item.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item.types.d.ts","sourceRoot":"","sources":["../../src/types/item.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"item.types.d.ts","sourceRoot":"","sources":["../../src/types/item.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,iCAAiC;AACjC,MAAM,MAAM,UAAU,GAAG;IACvB,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,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,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;AAEF,sDAAsD;AACtD,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG;IACxC,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;CAC/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option.types.d.ts","sourceRoot":"","sources":["../../src/types/option.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"option.types.d.ts","sourceRoot":"","sources":["../../src/types/option.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,mCAAmC;AACnC,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,cAAc,GAAG,IAAI,CAAC;IAC7B,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"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/** Katalog plan: `base` = langganan utama, `addon` = paket tambahan (mis. Extra Search). */
|
|
2
|
+
export type PlanKind = 'base' | 'addon';
|
|
3
|
+
/** Nilai limit per plan (kolom jsonb `Plan.limits`). */
|
|
4
|
+
export interface PlanLimits {
|
|
5
|
+
/** Jumlah search aktif maksimum untuk satu langganan. */
|
|
6
|
+
maxActiveSearches: number;
|
|
7
|
+
/** Jumlah user channel maksimum untuk satu langganan. */
|
|
8
|
+
maxChannels: number;
|
|
9
|
+
/** Delay minimum antar-scrape (ms) yang boleh dipakai search plan ini. */
|
|
10
|
+
minDelayMilis: number;
|
|
11
|
+
/** Jumlah marketplace maksimum per search. */
|
|
12
|
+
maxMarketplacesPerSearch: number;
|
|
13
|
+
/** Jumlah item maksimum yang disimpan per search. */
|
|
14
|
+
maxItemsPerSearch: number;
|
|
15
|
+
/** Slot search tambahan per unit, dipakai plan `kind='addon'`. */
|
|
16
|
+
addonSearchSlots?: number;
|
|
17
|
+
/** true = limit tidak dibatasi; menang atas angka lain. */
|
|
18
|
+
isUnlimited?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** Benefit marketing untuk kartu pricing. */
|
|
21
|
+
export interface PlanFeature {
|
|
22
|
+
key: string;
|
|
23
|
+
label: string;
|
|
24
|
+
included: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** Representasi tabel `Plan`. */
|
|
27
|
+
export type PlanEntity = {
|
|
28
|
+
id: number;
|
|
29
|
+
key: string;
|
|
30
|
+
name: string;
|
|
31
|
+
description: string | null;
|
|
32
|
+
kind: PlanKind;
|
|
33
|
+
priceCents: number;
|
|
34
|
+
currency: string;
|
|
35
|
+
/** 'month' | 'year' | null (null = paket sekali beli seperti addon). */
|
|
36
|
+
interval: string | null;
|
|
37
|
+
sortOrder: number;
|
|
38
|
+
isActive: boolean;
|
|
39
|
+
features: PlanFeature[] | null;
|
|
40
|
+
limits: PlanLimits;
|
|
41
|
+
deleted: boolean;
|
|
42
|
+
createdAt: string;
|
|
43
|
+
createdBy: string | null;
|
|
44
|
+
updatedAt: string;
|
|
45
|
+
updatedBy: string | null;
|
|
46
|
+
};
|
|
47
|
+
//# sourceM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,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.types.js","sourceRoot":"","sources":["../../src/types/plan.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { InvalidFilterReason, ItemCheckStatus } from './item-check.types';
|
|
2
|
+
import type { SearchWithUser } from './search.types';
|
|
3
|
+
/**
|
|
4
|
+
* Item hasil scrape yang belum tentu ada di DB (`id` null sampai core simpan).
|
|
5
|
+
* Satu-satunya bentuk item yang lalu-lalang di RMQ/IPC.
|
|
6
|
+
*
|
|
7
|
+
* `status`/`isValid`/`filters` diisi core: `status` oleh checkExist,
|
|
8
|
+
* `isValid` + `filters` oleh checkItems.
|
|
9
|
+
*/
|
|
10
|
+
export type ScrapedItem = {
|
|
11
|
+
id?: number | null;
|
|
12
|
+
searchId: number;
|
|
13
|
+
userId: number;
|
|
14
|
+
marketPlaceId: string;
|
|
15
|
+
marketPlaceName?: string | null;
|
|
16
|
+
sellerKey?: string | null;
|
|
17
|
+
sellerName?: string | null;
|
|
18
|
+
type?: string | null;
|
|
19
|
+
name?: string | null;
|
|
20
|
+
image?: string | null;
|
|
21
|
+
link?: string | null;
|
|
22
|
+
price?: number | null;
|
|
23
|
+
formattedAmount?: string | null;
|
|
24
|
+
location?: string | null;
|
|
25
|
+
year?: number | null;
|
|
26
|
+
description?: string | null;
|
|
27
|
+
other?: Record<string, unknown> | null;
|
|
28
|
+
status?: ItemCheckStatus;
|
|
29
|
+
isValid?: boolean;
|
|
30
|
+
filters?: InvalidFilterReason[];
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Envelope tunggal semua koneksi RMQ: search pemilik + item-itemnya.
|
|
34
|
+
* `engine.search` mengisi `searches` tanpa `items`; balikannya membawa `items`.
|
|
35
|
+
* Untuk AI, `items` selalu berisi tepat 1 item.
|
|
36
|
+
*/
|
|
37
|
+
export type SearchWithItems = SearchWithUser & {
|
|
38
|
+
items: ScrapedItem[];
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=scrape.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrape.types.d.ts","sourceRoot":"","sources":["../../src/types/scrape.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,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,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,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;IACvC,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACjC,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,cAAc,GAAG;IAC7C,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrape.types.js","sourceRoot":"","sources":["../../src/types/scrape.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { LocationJSONB, MarketPlacePropJSONB, ItemFilterJSONB } from './search-jsonb.types';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
2
|
+
import type { UserWithRelations } from './user.types';
|
|
3
|
+
/** Representasi tabel `Search`. */
|
|
4
|
+
export type SearchEntity = {
|
|
4
5
|
id: number;
|
|
5
6
|
userId: number;
|
|
6
7
|
title: string;
|
|
@@ -12,13 +13,16 @@ export type SearchData = {
|
|
|
12
13
|
delayMilis: number;
|
|
13
14
|
lastScrappedEpoch: string | null;
|
|
14
15
|
filter: ItemFilterJSONB | null;
|
|
16
|
+
/** Langganan yang membayar search ini; null = search lama, tidak dieksekusi. */
|
|
17
|
+
subscriptionId?: number | null;
|
|
15
18
|
deleted: boolean;
|
|
16
19
|
createdAt: string;
|
|
17
20
|
createdBy: string | null;
|
|
18
21
|
updatedAt: string;
|
|
19
22
|
updatedBy: string | null;
|
|
20
23
|
};
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
/** Search + user pemiliknya. */
|
|
25
|
+
export type SearchWithUser = SearchEntity & {
|
|
26
|
+
user?: UserWithRelations;
|
|
23
27
|
};
|
|
24
28
|
//# sourceMappingURL=search.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.types.d.ts","sourceRoot":"","sources":["../../src/types/search.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACpB,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"search.types.d.ts","sourceRoot":"","sources":["../../src/types/search.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACpB,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,mCAAmC;AACnC,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAC7C,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IAC/B,gFAAgF;IAChF,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,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;AAEF,gCAAgC;AAChC,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG;IAC1C,IAAI,CAAC,EAAE,iBAAiB,CAAC;CAC1B,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { PlanEntity, PlanLimits } from './plan.types';
|
|
2
|
+
export type SubscriptionStatus = 'trialing' | 'active' | 'past_due' | 'canceled' | 'expired';
|
|
3
|
+
export type SubscriptionSource = 'manual' | 'trial' | 'payment';
|
|
4
|
+
/** Snapshot plan saat langganan dibuat: edit katalog tidak mengubah langganan lama. */
|
|
5
|
+
export interface SubscriptionSnapshot {
|
|
6
|
+
planKey: string;
|
|
7
|
+
planName: string;
|
|
8
|
+
priceCents: number;
|
|
9
|
+
limits: PlanLimits;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Representasi tabel `Subscription`.
|
|
13
|
+
* `parentSubscriptionId` null = langganan utama; terisi = baris paket addon
|
|
14
|
+
* milik langganan utama tersebut (satu baris per paket yang dibeli).
|
|
15
|
+
*/
|
|
16
|
+
export type SubscriptionEntity = {
|
|
17
|
+
id: number;
|
|
18
|
+
userId: number;
|
|
19
|
+
planId: number;
|
|
20
|
+
parentSubscriptionId: number | null;
|
|
21
|
+
status: SubscriptionStatus;
|
|
22
|
+
currentPeriodStart: string;
|
|
23
|
+
currentPeriodEnd: string;
|
|
24
|
+
cancelAtPeriodEnd: boolean;
|
|
25
|
+
source: SubscriptionSource;
|
|
26
|
+
snapshot: SubscriptionSnapshot | null;
|
|
27
|
+
assignedBy: string | null;
|
|
28
|
+
deleted: boolean;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
createdBy: string | null;
|
|
31
|
+
updatedAt: string;
|
|
32
|
+
updatedBy: string | null;
|
|
33
|
+
};
|
|
34
|
+
/** Langganan + plan-nya, plus daftar addon bila langganan utama. */
|
|
35
|
+
export type SubscriptionWithPlan = SubscriptionEntity & {
|
|
36
|
+
plan?: PlanEntity;
|
|
37
|
+
addOns?: SubscriptionEntity[];
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=subscription.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription.types.d.ts","sourceRoot":"","sources":["../../src/types/subscription.types.ts"],"names":[],"mappings":"AAAA,OAAO,KA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ources":["../../src/types/subscription.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { SubscriptionStatus } from './subscription.types';
|
|
2
|
+
/** Satu metrik pemakaian: terpakai vs limit plan. */
|
|
3
|
+
export interface UsageMetric {
|
|
4
|
+
used: number;
|
|
5
|
+
limit: number;
|
|
6
|
+
isUnlimited: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** Respons `GET /usage`: langganan aktif + pemakaian berjalan. */
|
|
9
|
+
export interface PlanUsageSummary {
|
|
10
|
+
planKey: string;
|
|
11
|
+
planName: string;
|
|
12
|
+
status: SubscriptionStatus;
|
|
13
|
+
currentPeriodStart: string;
|
|
14
|
+
currentPeriodEnd: string;
|
|
15
|
+
remainingDays: number;
|
|
16
|
+
/** Total slot search tambahan dari addon aktif. */
|
|
17
|
+
addOnSlots: number;
|
|
18
|
+
searches: UsageMetric;
|
|
19
|
+
channels: UsageMetric;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=usage.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage.types.d.ts","sourceRoot":"","sources":["../../src/types/usage.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,qDAAqD;AACrD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,kEAAkE;AAClE,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,WAAW,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage.types.js","sourceRoot":"","sources":["../../src/types/usage.types.ts"],"names":[],"mappings":""}
|
|
@@ -5,11 +5,14 @@ export interface TelegramChannelEntity extends ChannelEntity {
|
|
|
5
5
|
chatId: string;
|
|
6
6
|
disableNotification: boolean;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
/** Representasi tabel `UserChannel`. */
|
|
9
|
+
export type UserChannelEntity = {
|
|
9
10
|
id: number;
|
|
10
11
|
userId: number;
|
|
11
12
|
name: string;
|
|
12
13
|
other: Record<string, unknown> | null;
|
|
14
|
+
/** Langganan yang membayar channel ini; null = channel lama, tidak dipakai kirim notifikasi. */
|
|
15
|
+
subscriptionId?: number | null;
|
|
13
16
|
deleted: boolean;
|
|
14
17
|
createdAt: string;
|
|
15
18
|
createdBy: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-channel.types.d.ts","sourceRoot":"","sources":["../../src/types/user-channel.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,qBAAsB,SAAQ,aAAa;IAC1D,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"user-channel.types.d.ts","sourceRoot":"","sources":["../../src/types/user-channel.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,qBAAsB,SAAQ,aAAa;IAC1D,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED,wCAAwC;AACxC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACtC,gGAAgG;IAChG,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,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,7 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ItemEntity } from './item.types';
|
|
2
2
|
/** ProseMirror/Tiptap JSON document (output of `editor.getJSON()`). */
|
|
3
3
|
export type RichNoteJSONB = Record<string, unknown>;
|
|
4
|
-
|
|
4
|
+
/** Representasi tabel `UserItem` (item + state milik user). */
|
|
5
|
+
export type UserItemEntity = ItemEntity & {
|
|
5
6
|
readedAt: string | null;
|
|
6
7
|
favoritedAt: string | null;
|
|
7
8
|
richNote: RichNoteJSONB | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-item.types.d.ts","sourceRoot":"","sources":["../../src/types/user-item.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"user-item.types.d.ts","sourceRoot":"","sources":["../../src/types/user-item.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,uEAAuE;AACvE,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEpD,+DAA+D;AAC/D,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG;IACxC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;CAChC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
|
|
1
|
+
import type { BannedSellerEntity } from './banned-seller.types';
|
|
2
|
+
import type { UserChannelEntity } from './user-channel.types';
|
|
3
|
+
/** Representasi tabel `User`. */
|
|
4
|
+
export type UserEntity = {
|
|
4
5
|
id: number;
|
|
5
6
|
username: string;
|
|
6
7
|
name: string | null;
|
|
@@ -15,10 +16,10 @@ export type UserData = {
|
|
|
15
16
|
updatedAt: string;
|
|
16
17
|
updatedBy: string | null;
|
|
17
18
|
};
|
|
18
|
-
/** User + channel + ban seller: payload `search.user` dari orchestrator ke engine
|
|
19
|
-
export type
|
|
20
|
-
userChannels:
|
|
19
|
+
/** User + channel + ban seller: payload `search.user` dari orchestrator ke engine. */
|
|
20
|
+
export type UserWithRelations = UserEntity & {
|
|
21
|
+
userChannels: UserChannelEntity[];
|
|
21
22
|
/** Banned seller milik user ini; diisi orchestrator sekali per siklus. */
|
|
22
|
-
bans?:
|
|
23
|
+
bans?: BannedSellerEntity[];
|
|
23
24
|
};
|
|
24
25
|
//# sourceMappingURL=user.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.types.d.ts","sourceRoot":"","sources":["../../src/types/user.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"user.types.d.ts","sourceRoot":"","sources":["../../src/types/user.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,iCAAiC;AACjC,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACvC,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;AAEF,sFAAsF;AACtF,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG;IAC3C,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAClC,0EAA0E;IAC1E,IAAI,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAC7B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@thinkerchain/flipper-entities",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"private": false,
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
"dist",
|
|
9
|
-
"README.md"
|
|
10
|
-
],
|
|
11
|
-
"scripts": {
|
|
12
|
-
"build": "tsc",
|
|
13
|
-
"prepublishOnly": "tsc"
|
|
14
|
-
},
|
|
15
|
-
"publishConfig": {
|
|
16
|
-
"access": "public"
|
|
17
|
-
},
|
|
18
|
-
"devDependencies": {
|
|
19
|
-
"typescript": "^5.0.0"
|
|
20
|
-
},
|
|
21
|
-
"license": "UNLICENSED"
|
|
22
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@thinkerchain/flipper-entities",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"prepublishOnly": "tsc"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"typescript": "^5.0.0"
|
|
20
|
+
},
|
|
21
|
+
"license": "UNLICENSED"
|
|
22
|
+
}
|