@12-apps/marketplace 1.10.0 → 1.12.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 +126 -1
- package/README.md +100 -1
- package/dist/99food/index.d.ts +2 -2
- package/dist/99food/index.js +2 -2
- package/dist/{adapter-CYJzu1c9.d.ts → adapter-nUyZpLzz.d.ts} +448 -173
- package/dist/{chunk-2BA2EHNF.js → chunk-45ZVN5XI.js} +316 -42
- package/dist/chunk-45ZVN5XI.js.map +1 -0
- package/dist/{chunk-PYHNM47K.js → chunk-L6FG6T4S.js} +2 -2
- package/dist/{chunk-HEXLCTOG.js → chunk-LACBT6NC.js} +1 -1
- package/dist/chunk-LACBT6NC.js.map +1 -0
- package/dist/{chunk-WVZ2IXFH.js → chunk-MIPNQ7X5.js} +190 -12
- package/dist/chunk-MIPNQ7X5.js.map +1 -0
- package/dist/chunk-SGOTN5PX.js +345 -0
- package/dist/chunk-SGOTN5PX.js.map +1 -0
- package/dist/{client-B4EQCRD_.d.ts → client-Ctas7WCS.d.ts} +1 -1
- package/dist/{engine-DK3iV_Kk.d.ts → engine-CIy9P7Cq.d.ts} +149 -8
- package/dist/hono/index.d.ts +2 -2
- package/dist/hono/index.js +3 -3
- package/dist/ifood/index.d.ts +10 -2
- package/dist/ifood/index.js +297 -25
- package/dist/ifood/index.js.map +1 -1
- package/dist/index.d.ts +23 -4
- package/dist/index.js +424 -84
- package/dist/index.js.map +1 -1
- package/dist/keeta/index.d.ts +2 -18
- package/dist/keeta/index.js +12 -3
- package/dist/keeta/index.js.map +1 -1
- package/dist/manifest/index.d.ts +219 -1
- package/dist/manifest/index.js +1 -1
- package/dist/manifest/server.d.ts +2 -2
- package/dist/manifest/server.js +3 -3
- package/dist/rappi/index.d.ts +1 -1
- package/dist/rappi/index.js +1 -1
- package/dist/server/en-US.d.ts +13 -0
- package/dist/server/en-US.js +13 -0
- package/dist/server/en-US.js.map +1 -1
- package/dist/server/index.d.ts +241 -7
- package/dist/server/index.js +3 -3
- package/dist/server/pt-BR.d.ts +13 -0
- package/dist/server/pt-BR.js +13 -0
- package/dist/server/pt-BR.js.map +1 -1
- package/package.json +1 -1
- package/prisma/marketplace.prisma +41 -0
- package/prisma/migrations/20261127090000_marketplace_app_link/migration.sql +81 -0
- package/src/core/adapter.ts +27 -0
- package/src/core/bulk.ts +43 -8
- package/src/core/courier-port.ts +100 -0
- package/src/core/courier.ts +153 -0
- package/src/core/engine.ts +63 -4
- package/src/core/integration.ts +60 -32
- package/src/core/lifecycle.ts +27 -4
- package/src/core/link-store.ts +170 -0
- package/src/core/linking-port.ts +100 -0
- package/src/core/linking.ts +363 -0
- package/src/core/merchant-claim.ts +106 -0
- package/src/core/outbound-queue.ts +24 -11
- package/src/core/outbound.ts +8 -6
- package/src/core/pickup-code.ts +136 -0
- package/src/core/pipeline.ts +15 -6
- package/src/core/ports.ts +26 -1
- package/src/core/status-store.ts +2 -3
- package/src/core/types.ts +56 -4
- package/src/ifood/courier.ts +210 -0
- package/src/ifood/index.ts +8 -0
- package/src/ifood/linking.ts +170 -0
- package/src/ifood/normalize.ts +7 -0
- package/src/ifood/outbound.ts +10 -3
- package/src/index.ts +30 -0
- package/src/keeta/normalize.ts +21 -6
- package/src/server/copy.ts +20 -2
- package/src/server/en-US.ts +13 -0
- package/src/server/index.ts +1 -1
- package/src/server/link-routes.ts +140 -0
- package/src/server/mcp-link.ts +103 -0
- package/src/server/mcp.ts +6 -2
- package/src/server/pt-BR.ts +13 -0
- package/src/server/routes.ts +5 -2
- package/src/server/webhook.ts +86 -0
- package/dist/chunk-2BA2EHNF.js.map +0 -1
- package/dist/chunk-HEXLCTOG.js.map +0 -1
- package/dist/chunk-WVZ2IXFH.js.map +0 -1
- package/dist/chunk-ZO4S3LF4.js +0 -254
- package/dist/chunk-ZO4S3LF4.js.map +0 -1
- /package/dist/{chunk-PYHNM47K.js.map → chunk-L6FG6T4S.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as AcceptanceDecision, a as AcceptanceStatus, b as AvailabilityJobPayload, c as AvailabilityOutcome, d as AvailabilityRetryError, e as AvailabilitySweepResult, B as BulkProblem, f as BulkProblemCode, g as BulkResult, C as CancellationFailureReason, h as CancellationStatus, i as CatalogueAction, j as CatalogueActionResult, k as CatalogueDocumentResult, l as CatalogueFailedAction, m as CatalogueFailureCode, n as CatalogueJobPayload, o as CatalogueOutcome, p as CataloguePublicationView, q as CataloguePublishInput, r as CatalogueRefusalCode, s as CatalogueRetryError, t as CatalogueStatus, u as CatalogueTarget, D as DecideManyResult, v as DecidedRow, w as DecisionInput, x as DecisionProblem, y as DecisionProblemCode, z as DecisionResult, E as DeliveryOutcome, F as ExpirySweepResult, G as FetchOrderJobPayload, H as FetchOrderOutcome, I as FetchOrderRetryError, J as InformStatusInput, K as IngestResult, L as IngestSettings, M as IngestionTarget, N as IntegrationRowInput, O as
|
|
2
|
-
import { c as MarketplaceAdapter,
|
|
3
|
-
export { A as AdapterCallContext,
|
|
1
|
+
export { A as AcceptanceDecision, a as AcceptanceStatus, b as AvailabilityJobPayload, c as AvailabilityOutcome, d as AvailabilityRetryError, e as AvailabilitySweepResult, B as BulkProblem, f as BulkProblemCode, g as BulkResult, C as CancellationFailureReason, h as CancellationStatus, i as CatalogueAction, j as CatalogueActionResult, k as CatalogueDocumentResult, l as CatalogueFailedAction, m as CatalogueFailureCode, n as CatalogueJobPayload, o as CatalogueOutcome, p as CataloguePublicationView, q as CataloguePublishInput, r as CatalogueRefusalCode, s as CatalogueRetryError, t as CatalogueStatus, u as CatalogueTarget, D as DecideManyResult, v as DecidedRow, w as DecisionInput, x as DecisionProblem, y as DecisionProblemCode, z as DecisionResult, E as DeliveryOutcome, F as ExpirySweepResult, G as FetchOrderJobPayload, H as FetchOrderOutcome, I as FetchOrderRetryError, J as InformStatusInput, K as IngestResult, L as IngestSettings, M as IngestionTarget, N as IntegrationRowInput, O as LinkFailure, P as LinkFinished, Q as LinkPendingView, R as LinkRefusalCode, S as MARKETPLACE_AVAILABILITY_JOB, T as MARKETPLACE_CATALOGUE_JOB, U as MARKETPLACE_FETCH_ORDER_JOB, V as MARKETPLACE_OUTBOUND_JOB, W as MarketplaceAdmission, X as MarketplaceAdmissionRequest, Y as MarketplaceAdmissionResult, Z as MarketplaceAuditEntry, _ as MarketplaceAuditPort, $ as MarketplaceAuthMode, a0 as MarketplaceCataloguePort, a1 as MarketplaceClockPort, a2 as MarketplaceDb, a3 as MarketplaceEngine, a4 as MarketplaceEngineConfig, a5 as MarketplaceEnqueuePort, a6 as MarketplaceIntegrationView, a7 as MarketplaceLifecycleAnswer, a8 as MarketplaceLifecycleFacts, a9 as MarketplaceLogger, aa as MarketplaceMenuLinkView, ab as MarketplaceOrderPort, ac as MarketplaceOrderState, ad as MarketplaceOrderSummary, ae as MarketplacePorts, af as MarketplaceRefusal, ag as MarketplaceSecretsPort, ah as MenuLinkRowInput, ai as OUTBOUND_GIVE_UP_MS, aj as OUTBOUND_STALE_MS, ak as OutboundAction, al as OutboundAttempt, am as OutboundJobPayload, an as OutboundOutcome, ao as OutboundRetryError, ap as OutboundSweepResult, aq as PauseOutcome, ar as PauseStoreInput, as as PauseStoreResult, at as PendingAcceptance, au as PendingInboxEvent, av as ResolvedOrderLine, aw as ResumeOutcome, ax as STORE_PAUSE_LEASE_MS, ay as SaveMarketplaceIntegrationInput, az as StoreAvailabilityView, aA as StorePauseFailureCode, aB as StorePauseState, aC as StorePauseWanted, aD as availabilityDedupeKey, aE as catalogueDedupeKey, aF as createMarketplaceEngine, aG as outboundDedupeKey } from './engine-CIy9P7Cq.js';
|
|
2
|
+
import { c as MarketplaceAdapter, l as MarketplaceProvider, m as CancellationReason } from './adapter-nUyZpLzz.js';
|
|
3
|
+
export { A as AdapterCallContext, n as AdapterGrant, o as AdapterTokenCache, p as CancellationOutcome, q as CancellationRequestInput, r as CatalogueCallContext, s as CatalogueFailure, t as CatalogueImage, u as CatalogueItem, e as CatalogueItemOut, v as CatalogueItemRef, C as CatalogueMenuEntry, b as CatalogueMenuOptions, w as CataloguePublishResult, x as CatalogueReadContext, y as CatalogueReadNotice, z as CatalogueReadRefusalCode, B as CatalogueReadResult, D as CatalogueReadWarning, E as CatalogueReadWarningCode, f as CatalogueReader, F as CatalogueSnapshot, G as CatalogueSnapshotCategory, H as CatalogueSnapshotItem, I as CatalogueSnapshotOption, J as CatalogueSnapshotOptionGroup, K as CatalogueStoredImage, L as CatalogueWarningCode, Q as CourierTrackingCallResult, R as CourierTrackingResult, T as FetchOrderResult, U as LinkCallContext, V as LinkCode, W as LinkGrant, X as LinkResult, Y as LinkedMerchant, Z as MarketplaceAppCredentialsPort, M as MarketplaceAvailability, _ as MarketplaceCapabilities, $ as MarketplaceCatalogue, a0 as MarketplaceCourier, a1 as MarketplaceCourierAnswer, h as MarketplaceCourierApi, a2 as MarketplaceCourierEngine, a3 as MarketplaceCourierFacts, a4 as MarketplaceCourierStep, a5 as MarketplaceCourierTracking, a6 as MarketplaceCourierVehicle, a7 as MarketplaceCredentials, a8 as MarketplaceDeliveredBy, a9 as MarketplaceDiscountSponsor, aa as MarketplaceHttp, ab as MarketplaceHttpRequest, ac as MarketplaceHttpResponse, ad as MarketplaceLifecycle, ae as MarketplaceLinkAttemptDelegate, g as MarketplaceLinking, af as MarketplaceOrderType, ag as NormalizedAddress, ah as NormalizedBuyer, i as NormalizedCourierEvent, N as NormalizedEvent, a as NormalizedMarketplaceOrder, ai as NormalizedOrderDiscount, aj as NormalizedOrderLine, ak as OutboundOrderRef, O as OutboundResult, al as PROVIDER_ID_PATTERN, am as PickupCodeCallResult, an as PickupCodeValidation, P as PullCatalogue, d as PushCatalogue, ao as StatusFacts, ap as StatusStep, k as StorePauseRef, S as StorePauseRequest, j as StorePauseResult, aq as ValidatePickupCodeInput, ar as answered, as as centsFromMajor, at as outboundResultOf, au as tokenGrantResultOf } from './adapter-nUyZpLzz.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The adapter registry: the ONE place a provider id becomes a marketplace.
|
|
@@ -54,6 +54,25 @@ declare function suggestReason(adapter: MarketplaceAdapter, input: {
|
|
|
54
54
|
*/
|
|
55
55
|
declare function stableUuid(seed: string): string;
|
|
56
56
|
|
|
57
|
+
/**
|
|
58
|
+
* One marketplace store, one live connection (FUT-5613).
|
|
59
|
+
*
|
|
60
|
+
* The app's single webhook address finds the store a delivery belongs to by
|
|
61
|
+
* the merchant id it names, so a merchant id held by two live connections of
|
|
62
|
+
* one marketplace would hand one store's orders to another. Every write that
|
|
63
|
+
* sets or revives a merchant id refuses one another store's live connection
|
|
64
|
+
* holds, and the migration's partial unique index
|
|
65
|
+
* (`marketplace_integrations_live_merchant_key`) closes the race between the
|
|
66
|
+
* check and the write: the loser's unique violation reads as the same refusal.
|
|
67
|
+
*/
|
|
68
|
+
/** Thrown by a single save whose merchant id another store's live connection holds. */
|
|
69
|
+
declare class MarketplaceMerchantTakenError extends Error {
|
|
70
|
+
readonly code: "MERCHANT_TAKEN";
|
|
71
|
+
/** The field the refusal is about, as a problem path. */
|
|
72
|
+
readonly path: readonly ["externalMerchantId"];
|
|
73
|
+
constructor(provider: string, merchantId: string);
|
|
74
|
+
}
|
|
75
|
+
|
|
57
76
|
/**
|
|
58
77
|
* The outbound sweep's catalogue half (FUT-4768): nothing the store switched
|
|
59
78
|
* on or off is lost, and nothing waits forever on "sending".
|
|
@@ -68,4 +87,4 @@ declare const CATALOGUE_STALE_MS: number;
|
|
|
68
87
|
/** Past this, the marketplace is not going to answer this ask. */
|
|
69
88
|
declare const CATALOGUE_GIVE_UP_MS: number;
|
|
70
89
|
|
|
71
|
-
export { type AdapterRegistry, CATALOGUE_GIVE_UP_MS, CATALOGUE_STALE_MS, CancellationReason, MarketplaceAdapter, MarketplaceAdapterRegistrationError, MarketplaceProvider, createAdapterRegistry, resolveReason, stableUuid, suggestReason };
|
|
90
|
+
export { type AdapterRegistry, CATALOGUE_GIVE_UP_MS, CATALOGUE_STALE_MS, CancellationReason, MarketplaceAdapter, MarketplaceAdapterRegistrationError, MarketplaceMerchantTakenError, MarketplaceProvider, createAdapterRegistry, resolveReason, stableUuid, suggestReason };
|