@timardex/cluemart-server-shared 4.0.0 → 4.0.3
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/{chunk-MVQMMXGY.mjs → chunk-3ICI65FJ.mjs} +363 -240
- package/dist/chunk-3ICI65FJ.mjs.map +1 -0
- package/dist/index.cjs +554 -430
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +105 -8
- package/dist/index.d.ts +105 -8
- package/dist/index.mjs +369 -246
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +424 -300
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +101 -5
- package/dist/mongoose/index.d.ts +101 -5
- package/dist/mongoose/index.mjs +11 -3
- package/dist/service/index.cjs +541 -427
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.d.mts +4 -3
- package/dist/service/index.d.ts +4 -3
- package/dist/service/index.mjs +1 -1
- package/dist/service/index.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-MVQMMXGY.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
|
|
2
|
-
import { AdType, AdDailyPriceType, AdBookingType, AdMetricsType, BillingCatalogEntryType, BillingCatalogPriceHistoryEntry, EnumBillingPeriod, EnumUserLicence, BILLING_CATALOG_KEYS, ReportChatUser, GoogleImportedMarket, AiImportedMarket, ScrapeSite, PushTokenType, ResourceActivityType, VendorType, VendorProductList, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, EventInfoType, StallType, RefundPolicy, DateTimeType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameDocType, GameType, SchoolType, CouponType, CouponDataType, CouponParticipantUserType, EnumResourceType } from '@timardex/cluemart-shared';
|
|
2
|
+
import { AdType, AdDailyPriceType, AdBookingType, AdMetricsType, BillingCatalogEntryType, BillingCatalogPriceHistoryEntry, EnumBillingPeriod, EnumUserLicence, BILLING_CATALOG_KEYS, ReportChatUser, GoogleImportedMarket, AiImportedMarket, EnumImportedMarketDeactivationReason, EnumAiImportRunStatus, AiImportUsage, ScrapeSite, PushTokenType, ResourceActivityType, VendorType, VendorProductList, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, EventInfoType, StallType, RefundPolicy, DateTimeType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameDocType, GameType, SchoolType, CouponType, CouponDataType, CouponParticipantUserType, EnumResourceType } from '@timardex/cluemart-shared';
|
|
3
3
|
import mongoose__default from 'mongoose';
|
|
4
4
|
import { O as ObjectId } from '../index-BptxBl9x.mjs';
|
|
5
5
|
export { C as ChatModel, N as NotificationModel, S as SchemaChatMessageReactionType, a as SchemaChatMessageReplyPreviewType, b as SchemaChatMessageSeenType, c as SchemaChatMessageType, d as SchemaChatType, e as SchemaCreateBulkNotificationInput, f as SchemaNotificationType, g as SchemaParticipantType } from '../index-BptxBl9x.mjs';
|
|
@@ -104,12 +104,16 @@ type SchemaGoogleImportedMarket = Omit<GoogleImportedMarket, "eventId" | "claime
|
|
|
104
104
|
claimedByUserId?: mongoose__default.Types.ObjectId;
|
|
105
105
|
/** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
|
|
106
106
|
searchName?: string;
|
|
107
|
+
/** Indexed earliest `dateTime` start instant for chronological pagination. */
|
|
108
|
+
earliestStartDate?: Date | null;
|
|
107
109
|
};
|
|
108
110
|
declare const GoogleImportedMarketModel: mongoose__default.Model<SchemaGoogleImportedMarket, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaGoogleImportedMarket, {}, {}> & Omit<GoogleImportedMarket, "eventId" | "claimedByUserId"> & {
|
|
109
111
|
eventId?: mongoose__default.Types.ObjectId;
|
|
110
112
|
claimedByUserId?: mongoose__default.Types.ObjectId;
|
|
111
113
|
/** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
|
|
112
114
|
searchName?: string;
|
|
115
|
+
/** Indexed earliest `dateTime` start instant for chronological pagination. */
|
|
116
|
+
earliestStartDate?: Date | null;
|
|
113
117
|
} & Required<{
|
|
114
118
|
_id: string;
|
|
115
119
|
}> & {
|
|
@@ -122,6 +126,18 @@ type SchemaAiImportedMarket = Omit<AiImportedMarket, "eventId" | "claimedByUserI
|
|
|
122
126
|
reviewedByUserId?: mongoose__default.Types.ObjectId;
|
|
123
127
|
/** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
|
|
124
128
|
searchName?: string;
|
|
129
|
+
/** Indexed earliest `dateTime` start instant for chronological pagination. */
|
|
130
|
+
earliestStartDate?: Date | null;
|
|
131
|
+
/** Set to the run timestamp each time the market appears on its source. */
|
|
132
|
+
lastSeenAt?: Date | null;
|
|
133
|
+
/** Consecutive successful runs where the market did not appear. */
|
|
134
|
+
missedRuns?: number;
|
|
135
|
+
/** Hash of the raw model description used to skip unchanged re-rewrites. */
|
|
136
|
+
descriptionSourceHash?: string | null;
|
|
137
|
+
/** Why an active market was deactivated (null while active). */
|
|
138
|
+
deactivatedReason?: EnumImportedMarketDeactivationReason | null;
|
|
139
|
+
/** sourceKey of an existing AI market this one may duplicate (soft flag). */
|
|
140
|
+
duplicateHint?: string | null;
|
|
125
141
|
};
|
|
126
142
|
declare const AiImportedMarketModel: mongoose__default.Model<SchemaAiImportedMarket, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaAiImportedMarket, {}, {}> & Omit<AiImportedMarket, "eventId" | "claimedByUserId" | "reviewedByUserId"> & {
|
|
127
143
|
eventId?: mongoose__default.Types.ObjectId;
|
|
@@ -129,16 +145,96 @@ declare const AiImportedMarketModel: mongoose__default.Model<SchemaAiImportedMar
|
|
|
129
145
|
reviewedByUserId?: mongoose__default.Types.ObjectId;
|
|
130
146
|
/** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
|
|
131
147
|
searchName?: string;
|
|
148
|
+
/** Indexed earliest `dateTime` start instant for chronological pagination. */
|
|
149
|
+
earliestStartDate?: Date | null;
|
|
150
|
+
/** Set to the run timestamp each time the market appears on its source. */
|
|
151
|
+
lastSeenAt?: Date | null;
|
|
152
|
+
/** Consecutive successful runs where the market did not appear. */
|
|
153
|
+
missedRuns?: number;
|
|
154
|
+
/** Hash of the raw model description used to skip unchanged re-rewrites. */
|
|
155
|
+
descriptionSourceHash?: string | null;
|
|
156
|
+
/** Why an active market was deactivated (null while active). */
|
|
157
|
+
deactivatedReason?: EnumImportedMarketDeactivationReason | null;
|
|
158
|
+
/** sourceKey of an existing AI market this one may duplicate (soft flag). */
|
|
159
|
+
duplicateHint?: string | null;
|
|
132
160
|
} & Required<{
|
|
133
161
|
_id: string;
|
|
134
162
|
}> & {
|
|
135
163
|
__v: number;
|
|
136
164
|
}, any>;
|
|
137
165
|
|
|
138
|
-
type
|
|
139
|
-
|
|
166
|
+
type AiImportRunStatus = EnumAiImportRunStatus;
|
|
167
|
+
type AiImportSiteResult = {
|
|
168
|
+
errors: number;
|
|
169
|
+
found: number;
|
|
170
|
+
imported: number;
|
|
171
|
+
name: string;
|
|
172
|
+
skipped: number;
|
|
173
|
+
status: EnumAiImportRunStatus.SUCCESS | EnumAiImportRunStatus.ERROR;
|
|
174
|
+
usage: AiImportUsage;
|
|
175
|
+
url: string;
|
|
176
|
+
};
|
|
177
|
+
type SchemaAiImportRun = {
|
|
140
178
|
_id: mongoose__default.Types.ObjectId;
|
|
141
|
-
|
|
179
|
+
createdAt: Date;
|
|
180
|
+
updatedAt: Date;
|
|
181
|
+
error?: string | null;
|
|
182
|
+
finishedAt?: Date | null;
|
|
183
|
+
result?: {
|
|
184
|
+
errors: number;
|
|
185
|
+
totalFound: number;
|
|
186
|
+
totalImported: number;
|
|
187
|
+
totalSkipped: number;
|
|
188
|
+
} | null;
|
|
189
|
+
siteResults: AiImportSiteResult[];
|
|
190
|
+
startedAt: Date;
|
|
191
|
+
status: AiImportRunStatus;
|
|
192
|
+
triggeredByUserId?: mongoose__default.Types.ObjectId | null;
|
|
193
|
+
usage?: AiImportUsage | null;
|
|
194
|
+
};
|
|
195
|
+
declare const AiImportRunModel: mongoose__default.Model<SchemaAiImportRun, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaAiImportRun, {}, {}> & SchemaAiImportRun & Required<{
|
|
196
|
+
_id: mongoose__default.Types.ObjectId;
|
|
197
|
+
}> & {
|
|
198
|
+
__v: number;
|
|
199
|
+
}, any>;
|
|
200
|
+
|
|
201
|
+
/** Fixed `_id` of the single-document lock guarding AI import runs. */
|
|
202
|
+
declare const AI_IMPORT_RUN_LOCK_KEY = "ai-import-run";
|
|
203
|
+
declare const AiImportRunLockModel: mongoose__default.Model<{
|
|
204
|
+
_id: string;
|
|
205
|
+
lockedAt?: Date | null;
|
|
206
|
+
token?: string | null;
|
|
207
|
+
}, {}, {}, {}, mongoose__default.Document<unknown, {}, {
|
|
208
|
+
_id: string;
|
|
209
|
+
lockedAt?: Date | null;
|
|
210
|
+
token?: string | null;
|
|
211
|
+
}, {}, {}> & {
|
|
212
|
+
_id: string;
|
|
213
|
+
lockedAt?: Date | null;
|
|
214
|
+
token?: string | null;
|
|
215
|
+
} & Required<{
|
|
216
|
+
_id: string;
|
|
217
|
+
}> & {
|
|
218
|
+
__v: number;
|
|
219
|
+
}, any>;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Fixed `_id` of the single-document AI scrape-site config. Using `_id`
|
|
223
|
+
* (rather than a free-form `key` field) makes the singleton structural: the
|
|
224
|
+
* collection can only ever contain one configuration document.
|
|
225
|
+
*/
|
|
226
|
+
declare const SCRAPE_SITES_CONFIG_ID = "scrapeSites";
|
|
227
|
+
type SchemaScrapeSiteItem = Omit<ScrapeSite, "_id" | "createdAt" | "updatedAt">;
|
|
228
|
+
type SchemaScrapeSiteConfig = {
|
|
229
|
+
_id: string;
|
|
230
|
+
sites: Array<SchemaScrapeSiteItem & {
|
|
231
|
+
_id: mongoose__default.Types.ObjectId;
|
|
232
|
+
}>;
|
|
233
|
+
updatedByUserId?: mongoose__default.Types.ObjectId;
|
|
234
|
+
};
|
|
235
|
+
declare const ScrapeSiteConfigModel: mongoose__default.Model<SchemaScrapeSiteConfig, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaScrapeSiteConfig, {}, {}> & SchemaScrapeSiteConfig & Required<{
|
|
236
|
+
_id: string;
|
|
237
|
+
}> & {
|
|
142
238
|
__v: number;
|
|
143
239
|
}, any>;
|
|
144
240
|
|
|
@@ -460,4 +556,4 @@ declare const ImpersonationAuditModel: mongoose__default.Model<SchemaImpersonati
|
|
|
460
556
|
__v: number;
|
|
461
557
|
}, any>;
|
|
462
558
|
|
|
463
|
-
export { AD_BILLING_CATALOG_COLLECTION_NAME, APP_SETTINGS_ID, AdBillingCatalogModel, AdBookingModel, AdMetricsModel, AdModel, AdPurchaseModel, AiImportedMarketModel, AppSettingModel, AuthHandoffTokenModel, type AuthHandoffTokenType, BILLING_CATALOG_COLLECTION_NAME, BillingCatalogModel, ChatReportModel, type CouponDocument, CouponModel, EventDateArchiveModel, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, ImpersonationAuditModel, ImpersonationSessionModel, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, type SchemaAiImportedMarket, type SchemaAppSettingsType, type SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatReportType, type SchemaEventDateArchiveType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, type SchemaImpersonationAuditType, type SchemaImpersonationSessionType, SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type
|
|
559
|
+
export { AD_BILLING_CATALOG_COLLECTION_NAME, AI_IMPORT_RUN_LOCK_KEY, APP_SETTINGS_ID, AdBillingCatalogModel, AdBookingModel, AdMetricsModel, AdModel, AdPurchaseModel, AiImportRunLockModel, AiImportRunModel, type AiImportRunStatus, type AiImportSiteResult, AiImportedMarketModel, AppSettingModel, AuthHandoffTokenModel, type AuthHandoffTokenType, BILLING_CATALOG_COLLECTION_NAME, BillingCatalogModel, ChatReportModel, type CouponDocument, CouponModel, EventDateArchiveModel, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, ImpersonationAuditModel, ImpersonationSessionModel, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, SCRAPE_SITES_CONFIG_ID, type SchemaAiImportRun, type SchemaAiImportedMarket, type SchemaAppSettingsType, type SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatReportType, type SchemaEventDateArchiveType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, type SchemaImpersonationAuditType, type SchemaImpersonationSessionType, SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, ScrapeSiteConfigModel, StallTypeSchema, UnregisteredVendorModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, buildInitialBillingCatalogEntries, getBillingCatalogDefinition, refundPolicySchema, schemaAdresource, vendorProductTypeSchema };
|
package/dist/mongoose/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
|
|
2
|
-
import { AdType, AdDailyPriceType, AdBookingType, AdMetricsType, BillingCatalogEntryType, BillingCatalogPriceHistoryEntry, EnumBillingPeriod, EnumUserLicence, BILLING_CATALOG_KEYS, ReportChatUser, GoogleImportedMarket, AiImportedMarket, ScrapeSite, PushTokenType, ResourceActivityType, VendorType, VendorProductList, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, EventInfoType, StallType, RefundPolicy, DateTimeType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameDocType, GameType, SchoolType, CouponType, CouponDataType, CouponParticipantUserType, EnumResourceType } from '@timardex/cluemart-shared';
|
|
2
|
+
import { AdType, AdDailyPriceType, AdBookingType, AdMetricsType, BillingCatalogEntryType, BillingCatalogPriceHistoryEntry, EnumBillingPeriod, EnumUserLicence, BILLING_CATALOG_KEYS, ReportChatUser, GoogleImportedMarket, AiImportedMarket, EnumImportedMarketDeactivationReason, EnumAiImportRunStatus, AiImportUsage, ScrapeSite, PushTokenType, ResourceActivityType, VendorType, VendorProductList, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, EventInfoType, StallType, RefundPolicy, DateTimeType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameDocType, GameType, SchoolType, CouponType, CouponDataType, CouponParticipantUserType, EnumResourceType } from '@timardex/cluemart-shared';
|
|
3
3
|
import mongoose__default from 'mongoose';
|
|
4
4
|
import { O as ObjectId } from '../index-BptxBl9x.js';
|
|
5
5
|
export { C as ChatModel, N as NotificationModel, S as SchemaChatMessageReactionType, a as SchemaChatMessageReplyPreviewType, b as SchemaChatMessageSeenType, c as SchemaChatMessageType, d as SchemaChatType, e as SchemaCreateBulkNotificationInput, f as SchemaNotificationType, g as SchemaParticipantType } from '../index-BptxBl9x.js';
|
|
@@ -104,12 +104,16 @@ type SchemaGoogleImportedMarket = Omit<GoogleImportedMarket, "eventId" | "claime
|
|
|
104
104
|
claimedByUserId?: mongoose__default.Types.ObjectId;
|
|
105
105
|
/** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
|
|
106
106
|
searchName?: string;
|
|
107
|
+
/** Indexed earliest `dateTime` start instant for chronological pagination. */
|
|
108
|
+
earliestStartDate?: Date | null;
|
|
107
109
|
};
|
|
108
110
|
declare const GoogleImportedMarketModel: mongoose__default.Model<SchemaGoogleImportedMarket, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaGoogleImportedMarket, {}, {}> & Omit<GoogleImportedMarket, "eventId" | "claimedByUserId"> & {
|
|
109
111
|
eventId?: mongoose__default.Types.ObjectId;
|
|
110
112
|
claimedByUserId?: mongoose__default.Types.ObjectId;
|
|
111
113
|
/** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
|
|
112
114
|
searchName?: string;
|
|
115
|
+
/** Indexed earliest `dateTime` start instant for chronological pagination. */
|
|
116
|
+
earliestStartDate?: Date | null;
|
|
113
117
|
} & Required<{
|
|
114
118
|
_id: string;
|
|
115
119
|
}> & {
|
|
@@ -122,6 +126,18 @@ type SchemaAiImportedMarket = Omit<AiImportedMarket, "eventId" | "claimedByUserI
|
|
|
122
126
|
reviewedByUserId?: mongoose__default.Types.ObjectId;
|
|
123
127
|
/** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
|
|
124
128
|
searchName?: string;
|
|
129
|
+
/** Indexed earliest `dateTime` start instant for chronological pagination. */
|
|
130
|
+
earliestStartDate?: Date | null;
|
|
131
|
+
/** Set to the run timestamp each time the market appears on its source. */
|
|
132
|
+
lastSeenAt?: Date | null;
|
|
133
|
+
/** Consecutive successful runs where the market did not appear. */
|
|
134
|
+
missedRuns?: number;
|
|
135
|
+
/** Hash of the raw model description used to skip unchanged re-rewrites. */
|
|
136
|
+
descriptionSourceHash?: string | null;
|
|
137
|
+
/** Why an active market was deactivated (null while active). */
|
|
138
|
+
deactivatedReason?: EnumImportedMarketDeactivationReason | null;
|
|
139
|
+
/** sourceKey of an existing AI market this one may duplicate (soft flag). */
|
|
140
|
+
duplicateHint?: string | null;
|
|
125
141
|
};
|
|
126
142
|
declare const AiImportedMarketModel: mongoose__default.Model<SchemaAiImportedMarket, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaAiImportedMarket, {}, {}> & Omit<AiImportedMarket, "eventId" | "claimedByUserId" | "reviewedByUserId"> & {
|
|
127
143
|
eventId?: mongoose__default.Types.ObjectId;
|
|
@@ -129,16 +145,96 @@ declare const AiImportedMarketModel: mongoose__default.Model<SchemaAiImportedMar
|
|
|
129
145
|
reviewedByUserId?: mongoose__default.Types.ObjectId;
|
|
130
146
|
/** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
|
|
131
147
|
searchName?: string;
|
|
148
|
+
/** Indexed earliest `dateTime` start instant for chronological pagination. */
|
|
149
|
+
earliestStartDate?: Date | null;
|
|
150
|
+
/** Set to the run timestamp each time the market appears on its source. */
|
|
151
|
+
lastSeenAt?: Date | null;
|
|
152
|
+
/** Consecutive successful runs where the market did not appear. */
|
|
153
|
+
missedRuns?: number;
|
|
154
|
+
/** Hash of the raw model description used to skip unchanged re-rewrites. */
|
|
155
|
+
descriptionSourceHash?: string | null;
|
|
156
|
+
/** Why an active market was deactivated (null while active). */
|
|
157
|
+
deactivatedReason?: EnumImportedMarketDeactivationReason | null;
|
|
158
|
+
/** sourceKey of an existing AI market this one may duplicate (soft flag). */
|
|
159
|
+
duplicateHint?: string | null;
|
|
132
160
|
} & Required<{
|
|
133
161
|
_id: string;
|
|
134
162
|
}> & {
|
|
135
163
|
__v: number;
|
|
136
164
|
}, any>;
|
|
137
165
|
|
|
138
|
-
type
|
|
139
|
-
|
|
166
|
+
type AiImportRunStatus = EnumAiImportRunStatus;
|
|
167
|
+
type AiImportSiteResult = {
|
|
168
|
+
errors: number;
|
|
169
|
+
found: number;
|
|
170
|
+
imported: number;
|
|
171
|
+
name: string;
|
|
172
|
+
skipped: number;
|
|
173
|
+
status: EnumAiImportRunStatus.SUCCESS | EnumAiImportRunStatus.ERROR;
|
|
174
|
+
usage: AiImportUsage;
|
|
175
|
+
url: string;
|
|
176
|
+
};
|
|
177
|
+
type SchemaAiImportRun = {
|
|
140
178
|
_id: mongoose__default.Types.ObjectId;
|
|
141
|
-
|
|
179
|
+
createdAt: Date;
|
|
180
|
+
updatedAt: Date;
|
|
181
|
+
error?: string | null;
|
|
182
|
+
finishedAt?: Date | null;
|
|
183
|
+
result?: {
|
|
184
|
+
errors: number;
|
|
185
|
+
totalFound: number;
|
|
186
|
+
totalImported: number;
|
|
187
|
+
totalSkipped: number;
|
|
188
|
+
} | null;
|
|
189
|
+
siteResults: AiImportSiteResult[];
|
|
190
|
+
startedAt: Date;
|
|
191
|
+
status: AiImportRunStatus;
|
|
192
|
+
triggeredByUserId?: mongoose__default.Types.ObjectId | null;
|
|
193
|
+
usage?: AiImportUsage | null;
|
|
194
|
+
};
|
|
195
|
+
declare const AiImportRunModel: mongoose__default.Model<SchemaAiImportRun, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaAiImportRun, {}, {}> & SchemaAiImportRun & Required<{
|
|
196
|
+
_id: mongoose__default.Types.ObjectId;
|
|
197
|
+
}> & {
|
|
198
|
+
__v: number;
|
|
199
|
+
}, any>;
|
|
200
|
+
|
|
201
|
+
/** Fixed `_id` of the single-document lock guarding AI import runs. */
|
|
202
|
+
declare const AI_IMPORT_RUN_LOCK_KEY = "ai-import-run";
|
|
203
|
+
declare const AiImportRunLockModel: mongoose__default.Model<{
|
|
204
|
+
_id: string;
|
|
205
|
+
lockedAt?: Date | null;
|
|
206
|
+
token?: string | null;
|
|
207
|
+
}, {}, {}, {}, mongoose__default.Document<unknown, {}, {
|
|
208
|
+
_id: string;
|
|
209
|
+
lockedAt?: Date | null;
|
|
210
|
+
token?: string | null;
|
|
211
|
+
}, {}, {}> & {
|
|
212
|
+
_id: string;
|
|
213
|
+
lockedAt?: Date | null;
|
|
214
|
+
token?: string | null;
|
|
215
|
+
} & Required<{
|
|
216
|
+
_id: string;
|
|
217
|
+
}> & {
|
|
218
|
+
__v: number;
|
|
219
|
+
}, any>;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Fixed `_id` of the single-document AI scrape-site config. Using `_id`
|
|
223
|
+
* (rather than a free-form `key` field) makes the singleton structural: the
|
|
224
|
+
* collection can only ever contain one configuration document.
|
|
225
|
+
*/
|
|
226
|
+
declare const SCRAPE_SITES_CONFIG_ID = "scrapeSites";
|
|
227
|
+
type SchemaScrapeSiteItem = Omit<ScrapeSite, "_id" | "createdAt" | "updatedAt">;
|
|
228
|
+
type SchemaScrapeSiteConfig = {
|
|
229
|
+
_id: string;
|
|
230
|
+
sites: Array<SchemaScrapeSiteItem & {
|
|
231
|
+
_id: mongoose__default.Types.ObjectId;
|
|
232
|
+
}>;
|
|
233
|
+
updatedByUserId?: mongoose__default.Types.ObjectId;
|
|
234
|
+
};
|
|
235
|
+
declare const ScrapeSiteConfigModel: mongoose__default.Model<SchemaScrapeSiteConfig, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaScrapeSiteConfig, {}, {}> & SchemaScrapeSiteConfig & Required<{
|
|
236
|
+
_id: string;
|
|
237
|
+
}> & {
|
|
142
238
|
__v: number;
|
|
143
239
|
}, any>;
|
|
144
240
|
|
|
@@ -460,4 +556,4 @@ declare const ImpersonationAuditModel: mongoose__default.Model<SchemaImpersonati
|
|
|
460
556
|
__v: number;
|
|
461
557
|
}, any>;
|
|
462
558
|
|
|
463
|
-
export { AD_BILLING_CATALOG_COLLECTION_NAME, APP_SETTINGS_ID, AdBillingCatalogModel, AdBookingModel, AdMetricsModel, AdModel, AdPurchaseModel, AiImportedMarketModel, AppSettingModel, AuthHandoffTokenModel, type AuthHandoffTokenType, BILLING_CATALOG_COLLECTION_NAME, BillingCatalogModel, ChatReportModel, type CouponDocument, CouponModel, EventDateArchiveModel, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, ImpersonationAuditModel, ImpersonationSessionModel, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, type SchemaAiImportedMarket, type SchemaAppSettingsType, type SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatReportType, type SchemaEventDateArchiveType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, type SchemaImpersonationAuditType, type SchemaImpersonationSessionType, SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type
|
|
559
|
+
export { AD_BILLING_CATALOG_COLLECTION_NAME, AI_IMPORT_RUN_LOCK_KEY, APP_SETTINGS_ID, AdBillingCatalogModel, AdBookingModel, AdMetricsModel, AdModel, AdPurchaseModel, AiImportRunLockModel, AiImportRunModel, type AiImportRunStatus, type AiImportSiteResult, AiImportedMarketModel, AppSettingModel, AuthHandoffTokenModel, type AuthHandoffTokenType, BILLING_CATALOG_COLLECTION_NAME, BillingCatalogModel, ChatReportModel, type CouponDocument, CouponModel, EventDateArchiveModel, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, ImpersonationAuditModel, ImpersonationSessionModel, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, SCRAPE_SITES_CONFIG_ID, type SchemaAiImportRun, type SchemaAiImportedMarket, type SchemaAppSettingsType, type SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatReportType, type SchemaEventDateArchiveType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, type SchemaImpersonationAuditType, type SchemaImpersonationSessionType, SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, ScrapeSiteConfigModel, StallTypeSchema, UnregisteredVendorModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, buildInitialBillingCatalogEntries, getBillingCatalogDefinition, refundPolicySchema, schemaAdresource, vendorProductTypeSchema };
|
package/dist/mongoose/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AD_BILLING_CATALOG_COLLECTION_NAME,
|
|
3
|
+
AI_IMPORT_RUN_LOCK_KEY,
|
|
3
4
|
APP_SETTINGS_ID,
|
|
4
5
|
AdBillingCatalogModel,
|
|
5
6
|
AdBookingModel,
|
|
@@ -7,6 +8,8 @@ import {
|
|
|
7
8
|
AdModel,
|
|
8
9
|
AdPurchaseModel,
|
|
9
10
|
AffiliateModel,
|
|
11
|
+
AiImportRunLockModel,
|
|
12
|
+
AiImportRunModel,
|
|
10
13
|
AiImportedMarketModel,
|
|
11
14
|
AppSettingModel,
|
|
12
15
|
AuthHandoffTokenModel,
|
|
@@ -33,8 +36,9 @@ import {
|
|
|
33
36
|
RelationTypeSchema,
|
|
34
37
|
ResourceActivityModel,
|
|
35
38
|
ResourceImageTypeSchema,
|
|
39
|
+
SCRAPE_SITES_CONFIG_ID,
|
|
36
40
|
SchoolModel,
|
|
37
|
-
|
|
41
|
+
ScrapeSiteConfigModel,
|
|
38
42
|
SocialMediaTypeSchema,
|
|
39
43
|
StallTypeSchema,
|
|
40
44
|
UnregisteredVendorModel,
|
|
@@ -56,9 +60,10 @@ import {
|
|
|
56
60
|
termsAgreementSchema,
|
|
57
61
|
userLicenseSchema,
|
|
58
62
|
vendorProductTypeSchema
|
|
59
|
-
} from "../chunk-
|
|
63
|
+
} from "../chunk-3ICI65FJ.mjs";
|
|
60
64
|
export {
|
|
61
65
|
AD_BILLING_CATALOG_COLLECTION_NAME,
|
|
66
|
+
AI_IMPORT_RUN_LOCK_KEY,
|
|
62
67
|
APP_SETTINGS_ID,
|
|
63
68
|
AdBillingCatalogModel,
|
|
64
69
|
AdBookingModel,
|
|
@@ -66,6 +71,8 @@ export {
|
|
|
66
71
|
AdModel,
|
|
67
72
|
AdPurchaseModel,
|
|
68
73
|
AffiliateModel,
|
|
74
|
+
AiImportRunLockModel,
|
|
75
|
+
AiImportRunModel,
|
|
69
76
|
AiImportedMarketModel,
|
|
70
77
|
AppSettingModel,
|
|
71
78
|
AuthHandoffTokenModel,
|
|
@@ -92,8 +99,9 @@ export {
|
|
|
92
99
|
RelationTypeSchema,
|
|
93
100
|
ResourceActivityModel,
|
|
94
101
|
ResourceImageTypeSchema,
|
|
102
|
+
SCRAPE_SITES_CONFIG_ID,
|
|
95
103
|
SchoolModel,
|
|
96
|
-
|
|
104
|
+
ScrapeSiteConfigModel,
|
|
97
105
|
SocialMediaTypeSchema,
|
|
98
106
|
StallTypeSchema,
|
|
99
107
|
UnregisteredVendorModel,
|