@rankwrangler/http-client 0.14.0 → 0.16.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/app-router.d.ts +46 -32
- package/package.json +1 -1
package/dist/app-router.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
+
export type ServiceAccessErrorCode = "access_denied" | "access_unavailable" | "insufficient_scope" | "unauthenticated" | "unknown_service";
|
|
3
4
|
export type AmazonListingStatus = "active" | "deleted";
|
|
4
5
|
declare const rankwranglerServiceAccounts: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
5
6
|
name: "rankwrangler_service_accounts";
|
|
@@ -184,7 +185,8 @@ declare const rankwranglerServiceAccounts: import("drizzle-orm/pg-core").PgTable
|
|
|
184
185
|
};
|
|
185
186
|
dialect: "pg";
|
|
186
187
|
}>;
|
|
187
|
-
|
|
188
|
+
/** The immutable identity of a user's service account; usage is read fresh where it is metered. */
|
|
189
|
+
export type RankWranglerServicePrincipal = Pick<typeof rankwranglerServiceAccounts.$inferSelect, "id" | "service"> & {
|
|
188
190
|
merchbaseUserId: string;
|
|
189
191
|
};
|
|
190
192
|
export interface MerchbaseUser {
|
|
@@ -212,6 +214,16 @@ declare const keywordFreshness: readonly [
|
|
|
212
214
|
"needsSync",
|
|
213
215
|
"syncing"
|
|
214
216
|
];
|
|
217
|
+
export interface ProductVariations {
|
|
218
|
+
parentAsin: string;
|
|
219
|
+
theme: string[];
|
|
220
|
+
defaultChildAsin: string;
|
|
221
|
+
children: Array<{
|
|
222
|
+
asin: string;
|
|
223
|
+
attributes: Record<string, string>;
|
|
224
|
+
}>;
|
|
225
|
+
fetchedAt: string;
|
|
226
|
+
}
|
|
215
227
|
export type PublicCutoutThumbnail = {
|
|
216
228
|
status: "available";
|
|
217
229
|
url: string;
|
|
@@ -234,9 +246,10 @@ export interface Product {
|
|
|
234
246
|
} | {
|
|
235
247
|
status: "unavailable";
|
|
236
248
|
};
|
|
237
|
-
isMerchListing: boolean
|
|
249
|
+
isMerchListing: boolean;
|
|
238
250
|
amazonListingStatus: AmazonListingStatus;
|
|
239
251
|
};
|
|
252
|
+
variations: ProductVariations | null;
|
|
240
253
|
category: {
|
|
241
254
|
id: number;
|
|
242
255
|
name: string | null;
|
|
@@ -273,7 +286,7 @@ export interface KeywordResultsProduct {
|
|
|
273
286
|
} | {
|
|
274
287
|
status: "unavailable";
|
|
275
288
|
};
|
|
276
|
-
isMerchListing: boolean
|
|
289
|
+
isMerchListing: boolean;
|
|
277
290
|
amazonListingStatus: AmazonListingStatus;
|
|
278
291
|
category: {
|
|
279
292
|
id: number;
|
|
@@ -352,7 +365,7 @@ export declare const publicAppRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
352
365
|
credentialKind: null;
|
|
353
366
|
authExpiresAtMs: null;
|
|
354
367
|
accessPrincipal: null;
|
|
355
|
-
accessError:
|
|
368
|
+
accessError: ServiceAccessErrorCode | null;
|
|
356
369
|
request: ContextRequest;
|
|
357
370
|
} | {
|
|
358
371
|
user: MerchbaseUser;
|
|
@@ -376,7 +389,7 @@ export declare const publicAppRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
376
389
|
credentialKind: null;
|
|
377
390
|
authExpiresAtMs: null;
|
|
378
391
|
accessPrincipal: null;
|
|
379
|
-
accessError:
|
|
392
|
+
accessError: ServiceAccessErrorCode | null;
|
|
380
393
|
request: ContextRequest;
|
|
381
394
|
} | {
|
|
382
395
|
user: MerchbaseUser;
|
|
@@ -400,7 +413,7 @@ export declare const publicAppRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
400
413
|
credentialKind: null;
|
|
401
414
|
authExpiresAtMs: null;
|
|
402
415
|
accessPrincipal: null;
|
|
403
|
-
accessError:
|
|
416
|
+
accessError: ServiceAccessErrorCode | null;
|
|
404
417
|
request: ContextRequest;
|
|
405
418
|
} | {
|
|
406
419
|
user: MerchbaseUser;
|
|
@@ -424,7 +437,7 @@ export declare const publicAppRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
424
437
|
credentialKind: null;
|
|
425
438
|
authExpiresAtMs: null;
|
|
426
439
|
accessPrincipal: null;
|
|
427
|
-
accessError:
|
|
440
|
+
accessError: ServiceAccessErrorCode | null;
|
|
428
441
|
request: ContextRequest;
|
|
429
442
|
} | {
|
|
430
443
|
user: MerchbaseUser;
|
|
@@ -447,22 +460,22 @@ export declare const publicAppRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
447
460
|
output: {
|
|
448
461
|
keyword: string;
|
|
449
462
|
data: {
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
nextCheckAt: string | null;
|
|
463
|
+
freshness: (typeof keywordFreshness)[number] | null;
|
|
464
|
+
products: number;
|
|
453
465
|
id: string;
|
|
466
|
+
createdAt: string;
|
|
467
|
+
searchFrequencyRank: number | null;
|
|
468
|
+
intervalDays: number | null;
|
|
454
469
|
queryId: string;
|
|
455
|
-
|
|
470
|
+
nextCheckAt: string | null;
|
|
456
471
|
stage: (typeof keywordStages)[number];
|
|
457
|
-
freshness: (typeof keywordFreshness)[number] | null;
|
|
458
|
-
retryScheduled: boolean;
|
|
459
472
|
heat: string;
|
|
460
473
|
score: number | null;
|
|
461
|
-
searchFrequencyRank: number | null;
|
|
462
|
-
sources: string[];
|
|
463
|
-
products: number;
|
|
464
474
|
merch: number;
|
|
465
|
-
|
|
475
|
+
term: string;
|
|
476
|
+
retryScheduled: boolean;
|
|
477
|
+
sources: string[];
|
|
478
|
+
lastCheckedAt: string | null;
|
|
466
479
|
};
|
|
467
480
|
};
|
|
468
481
|
meta: object;
|
|
@@ -479,8 +492,8 @@ export declare const publicAppRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
479
492
|
input: {
|
|
480
493
|
text: string;
|
|
481
494
|
freshness?: "live" | "needsSync" | "syncing" | "all" | undefined;
|
|
482
|
-
sort?: "work" | "newest" | undefined;
|
|
483
495
|
limit?: number | undefined;
|
|
496
|
+
sort?: "work" | "newest" | undefined;
|
|
484
497
|
stage?: "trial" | "dropped" | "graduated" | "untracked" | "all" | undefined;
|
|
485
498
|
heat?: "unrated" | "hot" | "warm" | "cold" | "all" | undefined;
|
|
486
499
|
cursor?: {
|
|
@@ -499,22 +512,22 @@ export declare const publicAppRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
499
512
|
};
|
|
500
513
|
output: {
|
|
501
514
|
items: {
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
nextCheckAt: string | null;
|
|
515
|
+
freshness: (typeof keywordFreshness)[number] | null;
|
|
516
|
+
products: number;
|
|
505
517
|
id: string;
|
|
518
|
+
createdAt: string;
|
|
519
|
+
searchFrequencyRank: number | null;
|
|
520
|
+
intervalDays: number | null;
|
|
506
521
|
queryId: string;
|
|
507
|
-
|
|
522
|
+
nextCheckAt: string | null;
|
|
508
523
|
stage: (typeof keywordStages)[number];
|
|
509
|
-
freshness: (typeof keywordFreshness)[number] | null;
|
|
510
|
-
retryScheduled: boolean;
|
|
511
524
|
heat: string;
|
|
512
525
|
score: number | null;
|
|
513
|
-
searchFrequencyRank: number | null;
|
|
514
|
-
sources: string[];
|
|
515
|
-
products: number;
|
|
516
526
|
merch: number;
|
|
517
|
-
|
|
527
|
+
term: string;
|
|
528
|
+
retryScheduled: boolean;
|
|
529
|
+
sources: string[];
|
|
530
|
+
lastCheckedAt: string | null;
|
|
518
531
|
}[];
|
|
519
532
|
nextCursor: {
|
|
520
533
|
sort: "fresh" | "work" | "newest" | "score" | "medianBsr" | "merch";
|
|
@@ -541,7 +554,7 @@ export declare const publicAppRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
541
554
|
credentialKind: null;
|
|
542
555
|
authExpiresAtMs: null;
|
|
543
556
|
accessPrincipal: null;
|
|
544
|
-
accessError:
|
|
557
|
+
accessError: ServiceAccessErrorCode | null;
|
|
545
558
|
request: ContextRequest;
|
|
546
559
|
} | {
|
|
547
560
|
user: MerchbaseUser;
|
|
@@ -561,7 +574,7 @@ export declare const publicAppRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
561
574
|
input: {
|
|
562
575
|
marketplaceId: string;
|
|
563
576
|
asin: string;
|
|
564
|
-
include?: ("shortName" | "marketData" | "cutoutThumbnail")[] | undefined;
|
|
577
|
+
include?: ("shortName" | "marketData" | "cutoutThumbnail" | "variations")[] | undefined;
|
|
565
578
|
};
|
|
566
579
|
output: Product;
|
|
567
580
|
meta: object;
|
|
@@ -596,7 +609,7 @@ export declare const publicAppRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
596
609
|
textFields?: "title" | "all" | undefined;
|
|
597
610
|
excludeWords?: string[] | undefined;
|
|
598
611
|
marketplaceIds?: string[] | undefined;
|
|
599
|
-
isMerchListing?: boolean | "
|
|
612
|
+
isMerchListing?: boolean | "all" | undefined;
|
|
600
613
|
amazonListingStatus?: "active" | "deleted" | "all" | undefined;
|
|
601
614
|
brands?: string[] | undefined;
|
|
602
615
|
excludeBrands?: string[] | undefined;
|
|
@@ -646,6 +659,7 @@ export declare const publicAppRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
646
659
|
} | null;
|
|
647
660
|
} | null;
|
|
648
661
|
items: {
|
|
662
|
+
extra?: undefined;
|
|
649
663
|
marketplaceId: string;
|
|
650
664
|
asin: string;
|
|
651
665
|
title: string | null;
|
|
@@ -659,7 +673,7 @@ export declare const publicAppRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
659
673
|
status: "unavailable";
|
|
660
674
|
url?: undefined;
|
|
661
675
|
};
|
|
662
|
-
isMerchListing: boolean
|
|
676
|
+
isMerchListing: boolean;
|
|
663
677
|
amazonListingStatus: AmazonListingStatus;
|
|
664
678
|
categoryId: number | null;
|
|
665
679
|
salesRank: number | null;
|