@12-apps/marketplace 1.1.0 → 1.3.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/ADOPTING.md +37 -7
- package/README.md +238 -4
- package/dist/99food/en-US.d.ts +19 -0
- package/dist/99food/en-US.js +23 -0
- package/dist/99food/en-US.js.map +1 -0
- package/dist/99food/index.d.ts +162 -0
- package/dist/99food/index.js +444 -0
- package/dist/99food/index.js.map +1 -0
- package/dist/99food/pt-BR.d.ts +23 -0
- package/dist/99food/pt-BR.js +23 -0
- package/dist/99food/pt-BR.js.map +1 -0
- package/dist/{adapter-BggtVFf9.d.ts → adapter-0l_EmuJA.d.ts} +206 -2
- package/dist/{chunk-NGNEL4HS.js → chunk-AYYBRQJV.js} +52 -4
- package/dist/chunk-AYYBRQJV.js.map +1 -0
- package/dist/chunk-BD7DS3XM.js +78 -0
- package/dist/chunk-BD7DS3XM.js.map +1 -0
- package/dist/chunk-M2V4RFMA.js +23 -0
- package/dist/chunk-M2V4RFMA.js.map +1 -0
- package/dist/{chunk-7BYVGNU5.js → chunk-RVBTARIY.js} +1 -1
- package/dist/chunk-RVBTARIY.js.map +1 -0
- package/dist/chunk-XUAFXNOH.js +1604 -0
- package/dist/chunk-XUAFXNOH.js.map +1 -0
- package/dist/{engine-KrgZ4pA4.d.ts → engine-CZsP8KWd.d.ts} +278 -2
- package/dist/hono/index.d.ts +2 -2
- package/dist/hono/index.js +2 -2
- package/dist/ifood/index.d.ts +16 -12
- package/dist/ifood/index.js +248 -121
- package/dist/ifood/index.js.map +1 -1
- package/dist/index.d.ts +30 -4
- package/dist/index.js +189 -346
- package/dist/index.js.map +1 -1
- package/dist/manifest/server.d.ts +4 -2
- package/dist/manifest/server.js +2 -2
- package/dist/rappi/en-US.d.ts +14 -0
- package/dist/rappi/en-US.js +18 -0
- package/dist/rappi/en-US.js.map +1 -0
- package/dist/rappi/index.d.ts +190 -0
- package/dist/rappi/index.js +359 -0
- package/dist/rappi/index.js.map +1 -0
- package/dist/rappi/pt-BR.d.ts +18 -0
- package/dist/rappi/pt-BR.js +18 -0
- package/dist/rappi/pt-BR.js.map +1 -0
- package/dist/server/index.d.ts +19 -8
- package/dist/server/index.js +4 -2
- package/package.json +26 -2
- package/prisma/marketplace.prisma +97 -2
- package/prisma/migrations/20261113120000_marketplace_catalogue/migration.sql +97 -0
- package/src/99food/catalogue.ts +117 -0
- package/src/99food/copy.ts +36 -0
- package/src/99food/en-US.ts +19 -0
- package/src/99food/index.ts +125 -0
- package/src/99food/normalize.ts +263 -0
- package/src/99food/outbound.ts +220 -0
- package/src/99food/pt-BR.ts +23 -0
- package/src/core/adapter.ts +27 -2
- package/src/core/catalogue-category.ts +119 -0
- package/src/core/catalogue-ids.ts +23 -0
- package/src/core/catalogue-job.ts +332 -0
- package/src/core/catalogue-port.ts +173 -0
- package/src/core/catalogue-store.ts +172 -0
- package/src/core/catalogue-sweep.ts +43 -0
- package/src/core/catalogue.ts +226 -0
- package/src/core/decisions.ts +16 -4
- package/src/core/engine.ts +54 -0
- package/src/core/fetch-order.ts +253 -0
- package/src/core/inbox.ts +8 -2
- package/src/core/ingest.ts +10 -2
- package/src/core/integration.ts +30 -1
- package/src/core/order-fetch-marks.ts +63 -0
- package/src/core/outbound-sweep.ts +7 -2
- package/src/core/outbound.ts +22 -2
- package/src/core/payload-read.ts +101 -0
- package/src/core/pipeline.ts +64 -15
- package/src/core/ports.ts +36 -0
- package/src/core/types.ts +14 -0
- package/src/ifood/catalogue.ts +273 -0
- package/src/ifood/index.ts +4 -0
- package/src/ifood/normalize.ts +15 -88
- package/src/ifood/outbound.ts +9 -6
- package/src/index.ts +49 -1
- package/src/rappi/copy.ts +39 -0
- package/src/rappi/en-US.ts +14 -0
- package/src/rappi/index.ts +161 -0
- package/src/rappi/normalize.ts +314 -0
- package/src/rappi/outbound.ts +182 -0
- package/src/rappi/pt-BR.ts +18 -0
- package/src/server/index.ts +1 -0
- package/src/server/jobs.ts +71 -8
- package/dist/chunk-7BYVGNU5.js.map +0 -1
- package/dist/chunk-DVIRN42O.js +0 -707
- package/dist/chunk-DVIRN42O.js.map +0 -1
- package/dist/chunk-NGNEL4HS.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as AcceptanceDecision, a as AcceptanceStatus, B as BulkProblem, b as BulkProblemCode, c as BulkResult, C as CancellationFailureReason, d as CancellationStatus, D as DecideManyResult,
|
|
2
|
-
import { M as MarketplaceAdapter,
|
|
3
|
-
export { A as AdapterCallContext,
|
|
1
|
+
export { A as AcceptanceDecision, a as AcceptanceStatus, B as BulkProblem, b as BulkProblemCode, c as BulkResult, C as CancellationFailureReason, d as CancellationStatus, e as CatalogueAction, f as CatalogueActionResult, g as CatalogueDocumentResult, h as CatalogueFailedAction, i as CatalogueFailureCode, j as CatalogueJobPayload, k as CatalogueOutcome, l as CataloguePublicationView, m as CataloguePublishInput, n as CatalogueRefusalCode, o as CatalogueRetryError, p as CatalogueStatus, q as CatalogueTarget, D as DecideManyResult, r as DecidedRow, s as DecisionInput, t as DecisionProblem, u as DecisionProblemCode, v as DecisionResult, w as DeliveryOutcome, E as ExpirySweepResult, F as FetchOrderJobPayload, x as FetchOrderOutcome, y as FetchOrderRetryError, I as IngestResult, z as IngestSettings, G as IngestionTarget, H as IntegrationRowInput, M as MARKETPLACE_CATALOGUE_JOB, J as MARKETPLACE_FETCH_ORDER_JOB, K as MARKETPLACE_OUTBOUND_JOB, L as MarketplaceAdmission, N as MarketplaceAdmissionRequest, O as MarketplaceAdmissionResult, P as MarketplaceAuditEntry, Q as MarketplaceAuditPort, R as MarketplaceCataloguePort, S as MarketplaceClockPort, T as MarketplaceDb, U as MarketplaceEngine, V as MarketplaceEngineConfig, W as MarketplaceEnqueuePort, X as MarketplaceIntegrationView, Y as MarketplaceLogger, Z as MarketplaceMenuLinkView, _ as MarketplaceOrderPort, $ as MarketplaceOrderState, a0 as MarketplaceOrderSummary, a1 as MarketplacePorts, a2 as MarketplaceRefusal, a3 as MarketplaceSecretsPort, a4 as MenuLinkRowInput, a5 as OUTBOUND_GIVE_UP_MS, a6 as OUTBOUND_STALE_MS, a7 as OutboundAction, a8 as OutboundAttempt, a9 as OutboundJobPayload, aa as OutboundOutcome, ab as OutboundRetryError, ac as OutboundSweepResult, ad as PendingAcceptance, ae as PendingInboxEvent, af as ResolvedOrderLine, ag as SaveMarketplaceIntegrationInput, ah as catalogueDedupeKey, ai as createMarketplaceEngine, aj as outboundDedupeKey } from './engine-CZsP8KWd.js';
|
|
2
|
+
import { M as MarketplaceAdapter, e as MarketplaceProvider, f as CancellationReason } from './adapter-0l_EmuJA.js';
|
|
3
|
+
export { A as AdapterCallContext, g as AdapterTokenCache, h as CancellationOutcome, i as CancellationRequestInput, j as CatalogueCallContext, k as CatalogueFailure, l as CatalogueImage, m as CatalogueItem, d as CatalogueItemOut, n as CatalogueItemRef, C as CatalogueMenuEntry, b as CatalogueMenuOptions, o as CataloguePublishResult, p as CatalogueStoredImage, q as CatalogueWarningCode, F as FetchOrderResult, r as MarketplaceCapabilities, s as MarketplaceCatalogue, t as MarketplaceCredentials, u as MarketplaceDeliveredBy, v as MarketplaceHttp, w as MarketplaceHttpRequest, x as MarketplaceHttpResponse, y as MarketplaceOrderType, z as NormalizedAddress, B as NormalizedBuyer, N as NormalizedEvent, a as NormalizedMarketplaceOrder, D as NormalizedOrderLine, O as OutboundOrderRef, E as OutboundResult, G as PROVIDER_ID_PATTERN, P as PullCatalogue, c as PushCatalogue, H as answered, I as outboundResultOf } from './adapter-0l_EmuJA.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The adapter registry: the ONE place a provider id becomes a marketplace.
|
|
@@ -42,4 +42,30 @@ declare function suggestReason(adapter: MarketplaceAdapter, input: {
|
|
|
42
42
|
itemUnavailable: boolean;
|
|
43
43
|
}): CancellationReason | null;
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
/**
|
|
46
|
+
* A UUID v4-shaped id derived from a seed, the same for the same seed (FUT-4768).
|
|
47
|
+
*
|
|
48
|
+
* Some marketplaces make the store's software invent the id of a catalogue
|
|
49
|
+
* entity (iFood's Catalog API v2.0 and Open Delivery both want a UUID the
|
|
50
|
+
* software generates). Deriving it from the engine's stable publication
|
|
51
|
+
* reference, instead of drawing a random one, makes a retried publish whose
|
|
52
|
+
* first answer was lost name the SAME item rather than a second one, and needs
|
|
53
|
+
* no write before the call.
|
|
54
|
+
*/
|
|
55
|
+
declare function stableUuid(seed: string): string;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The outbound sweep's catalogue half (FUT-4768): nothing the store switched
|
|
59
|
+
* on or off is lost, and nothing waits forever on "sending".
|
|
60
|
+
*
|
|
61
|
+
* A row still owed (PUBLISHING or WITHDRAWING) older than the catalogue job's
|
|
62
|
+
* own retry span is re-queued under a key of its own per pass; one older than
|
|
63
|
+
* the give-up is FAILED, with the action it failed at, so the host shows the
|
|
64
|
+
* reason and "try again" instead of a switch stuck on its way.
|
|
65
|
+
*/
|
|
66
|
+
/** Longer than the catalogue job's three attempts with their backoff. */
|
|
67
|
+
declare const CATALOGUE_STALE_MS: number;
|
|
68
|
+
/** Past this, the marketplace is not going to answer this ask. */
|
|
69
|
+
declare const CATALOGUE_GIVE_UP_MS: number;
|
|
70
|
+
|
|
71
|
+
export { type AdapterRegistry, CATALOGUE_GIVE_UP_MS, CATALOGUE_STALE_MS, CancellationReason, MarketplaceAdapter, MarketplaceAdapterRegistrationError, MarketplaceProvider, createAdapterRegistry, resolveReason, stableUuid, suggestReason };
|