@12-apps/marketplace 1.16.0 → 1.18.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 +185 -0
- package/dist/99food/index.d.ts +2 -2
- package/dist/99food/index.js +2 -2
- package/dist/{adapter-CjVdMhZ2.d.ts → adapter-ZpAWKoCk.d.ts} +300 -3
- package/dist/{chunk-TRUK5ZBE.js → chunk-3B5EULS6.js} +2 -2
- package/dist/{chunk-DJIMUEHT.js → chunk-BLHZ3MRB.js} +79 -7
- package/dist/chunk-BLHZ3MRB.js.map +1 -0
- package/dist/{chunk-SGOTN5PX.js → chunk-LO7OKO6V.js} +45 -4
- package/dist/chunk-LO7OKO6V.js.map +1 -0
- package/dist/{chunk-TICWLBSA.js → chunk-MDEIRGNL.js} +1372 -823
- package/dist/chunk-MDEIRGNL.js.map +1 -0
- package/dist/{chunk-H2VQRD3B.js → chunk-Q5RMVNU5.js} +1 -1
- package/dist/chunk-Q5RMVNU5.js.map +1 -0
- package/dist/{chunk-BTKVZAJI.js → chunk-ZT6TZTLD.js} +1 -1
- package/dist/chunk-ZT6TZTLD.js.map +1 -0
- package/dist/{client-DgzCkl8u.d.ts → client-DpEq0yXb.d.ts} +1 -1
- package/dist/{engine-DSRj7qnC.d.ts → engine-DRRhAjZK.d.ts} +566 -293
- package/dist/hono/index.d.ts +2 -2
- package/dist/hono/index.js +4 -4
- package/dist/ifood/index.d.ts +14 -2
- package/dist/ifood/index.js +406 -120
- package/dist/ifood/index.js.map +1 -1
- package/dist/index.d.ts +21 -4
- package/dist/index.js +453 -43
- package/dist/index.js.map +1 -1
- package/dist/keeta/index.d.ts +2 -2
- package/dist/keeta/index.js +2 -2
- package/dist/manifest/index.d.ts +78 -0
- package/dist/manifest/index.js +1 -1
- package/dist/manifest/server.d.ts +6 -2
- package/dist/manifest/server.js +4 -4
- package/dist/rappi/index.d.ts +1 -1
- package/dist/rappi/index.js +1 -1
- package/dist/server/index.d.ts +93 -7
- package/dist/server/index.js +4 -4
- package/package.json +1 -1
- package/prisma/marketplace.prisma +70 -2
- package/prisma/migrations/20261203180000_marketplace_app_link_check/migration.sql +14 -0
- package/prisma/migrations/20261203190000_marketplace_disputes/migration.sql +96 -0
- package/prisma/migrations/20261203200000_marketplace_status_logistics_steps/migration.sql +12 -0
- package/src/core/adapter.ts +14 -2
- package/src/core/app-linking.ts +396 -0
- package/src/core/delivery-code.ts +119 -0
- package/src/core/dispute-engine.ts +32 -0
- package/src/core/dispute-job.ts +142 -0
- package/src/core/dispute-port.ts +133 -0
- package/src/core/dispute-store.ts +203 -0
- package/src/core/disputes.ts +263 -0
- package/src/core/engine.ts +12 -55
- package/src/core/integration.ts +3 -1
- package/src/core/link-engine.ts +176 -0
- package/src/core/link-store.ts +15 -0
- package/src/core/linking-port.ts +35 -1
- package/src/core/linking.ts +8 -0
- package/src/core/logistics.ts +388 -0
- package/src/core/outbound-queue.ts +6 -1
- package/src/core/outbound-sweep.ts +19 -6
- package/src/core/outbound.ts +4 -5
- package/src/core/pipeline.ts +14 -4
- package/src/core/ports.ts +20 -2
- package/src/core/status-job.ts +3 -0
- package/src/core/status-store.ts +2 -1
- package/src/core/types.ts +10 -0
- package/src/ifood/app-linking.ts +119 -0
- package/src/ifood/disputes.ts +209 -0
- package/src/ifood/index.ts +15 -1
- package/src/ifood/logistics.ts +38 -0
- package/src/ifood/normalize.ts +14 -1
- package/src/index.ts +44 -0
- package/src/server/jobs.ts +51 -3
- package/src/server/link-routes.ts +56 -4
- package/src/server/mcp-link.ts +44 -2
- package/src/server/mcp.ts +2 -1
- package/dist/chunk-BTKVZAJI.js.map +0 -1
- package/dist/chunk-DJIMUEHT.js.map +0 -1
- package/dist/chunk-H2VQRD3B.js.map +0 -1
- package/dist/chunk-SGOTN5PX.js.map +0 -1
- package/dist/chunk-TICWLBSA.js.map +0 -1
- /package/dist/{chunk-TRUK5ZBE.js.map → chunk-3B5EULS6.js.map} +0 -0
package/dist/hono/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Hono, Context } from 'hono';
|
|
2
2
|
import { ApiMarketplace, MarketplaceApiConfig, MarketplaceActor } from '../server/index.js';
|
|
3
|
-
import '../engine-
|
|
4
|
-
import '../adapter-
|
|
3
|
+
import '../engine-DRRhAjZK.js';
|
|
4
|
+
import '../adapter-ZpAWKoCk.js';
|
|
5
5
|
import '@12-apps/wiring';
|
|
6
6
|
import 'zod';
|
|
7
7
|
|
package/dist/hono/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApiMarketplace
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-BLHZ3MRB.js";
|
|
4
|
+
import "../chunk-LO7OKO6V.js";
|
|
5
|
+
import "../chunk-MDEIRGNL.js";
|
|
6
|
+
import "../chunk-Q5RMVNU5.js";
|
|
7
7
|
import {
|
|
8
8
|
__name
|
|
9
9
|
} from "../chunk-7QVYU63E.js";
|
package/dist/ifood/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NormalizedEvent, a as NormalizedMarketplaceOrder, A as AdapterCallContext, F as FetchOrderResult, d as PushCatalogue, e as CatalogueItemOut, f as CatalogueReader, g as MarketplaceLinking, h as
|
|
1
|
+
import { N as NormalizedEvent, a as NormalizedMarketplaceOrder, A as AdapterCallContext, F as FetchOrderResult, d as PushCatalogue, e as CatalogueItemOut, f as CatalogueReader, g as MarketplaceLinking, h as MarketplaceAppLinking, i as MarketplaceCourierApi, j as NormalizedCourierEvent, M as MarketplaceAvailability, S as StorePauseRequest, k as StorePauseResult, l as StorePauseRef, O as OutboundResult, m as MarketplaceLogistics, c as MarketplaceAdapter } from '../adapter-ZpAWKoCk.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* The words the iFood adapter needs from its host, and nothing else.
|
|
@@ -76,6 +76,13 @@ declare const IFOOD_CATALOGUE_READER: CatalogueReader;
|
|
|
76
76
|
/** The iFood adapter's linking half. */
|
|
77
77
|
declare const IFOOD_LINKING: MarketplaceLinking;
|
|
78
78
|
|
|
79
|
+
/** Where a store authorizes the software's app: the Portal do Parceiro's apps page. */
|
|
80
|
+
declare const IFOOD_APPS_PORTAL_URL = "https://portal.ifood.com.br/apps";
|
|
81
|
+
/** "Rua Pernambuco, 1000 · Savassi": the street and number, then the district; null when the detail carries no street. */
|
|
82
|
+
declare function ifoodAddressLine(body: unknown): string | null;
|
|
83
|
+
/** The iFood adapter's centralized linking half. */
|
|
84
|
+
declare const IFOOD_APP_LINKING: MarketplaceAppLinking;
|
|
85
|
+
|
|
79
86
|
/** The courier step an iFood event names, or null. */
|
|
80
87
|
declare function readIfoodCourierEvent(payload: unknown, eventType: string): NormalizedCourierEvent | null;
|
|
81
88
|
/** iFood's courier calls, for the adapter's `courier`. */
|
|
@@ -175,6 +182,11 @@ type IfoodDeliveryCodeResult = {
|
|
|
175
182
|
* no result carries iFood's answer body, so nothing here puts it in a log.
|
|
176
183
|
*/
|
|
177
184
|
declare function ifoodLogisticsVerifyDeliveryCode(ctx: AdapterCallContext, externalOrderId: string, code: string): Promise<IfoodDeliveryCodeResult>;
|
|
185
|
+
/**
|
|
186
|
+
* The adapter's Logistics half (FUT-6166): the engine's steps on iFood's
|
|
187
|
+
* wire. An invalid driver is answered as the engine's `invalid`.
|
|
188
|
+
*/
|
|
189
|
+
declare const IFOOD_LOGISTICS: MarketplaceLogistics;
|
|
178
190
|
|
|
179
191
|
/**
|
|
180
192
|
* `@12-apps/marketplace/ifood` — iFood, as one adapter on the engine.
|
|
@@ -205,4 +217,4 @@ interface IfoodAdapterConfig {
|
|
|
205
217
|
*/
|
|
206
218
|
declare function createIfoodAdapter(config: IfoodAdapterConfig): MarketplaceAdapter;
|
|
207
219
|
|
|
208
|
-
export { IFOOD_AVAILABILITY, IFOOD_CANCELLATION_ANSWER_WINDOW_MS, IFOOD_CATALOGUE, IFOOD_CATALOGUE_READER, IFOOD_COURIER, IFOOD_IMAGE_BASE_URL, IFOOD_LINKING, IFOOD_LOGISTICS_STEPS, IFOOD_LOGISTICS_VEHICLES, IFOOD_PROVIDER, IFOOD_REASON_CODES, type IfoodAdapterConfig, type IfoodAdapterCopy, type IfoodDeliveryCodeResult, type IfoodLogisticsDriver, type IfoodLogisticsInvalid, type IfoodLogisticsStep, type IfoodLogisticsVehicle, type IfoodReasonCode, createIfoodAdapter, ifoodFetchOrder, ifoodItemBody, ifoodItemId, ifoodLocalTime, ifoodLogisticsAssignDriver, ifoodLogisticsStep, ifoodLogisticsStepsTo, ifoodLogisticsVerifyDeliveryCode, ifoodPause, ifoodProductId, ifoodResume, normalizeIfoodEvent, readIfoodCourierEvent, readIfoodOrder, readIfoodPresence, verifyIfoodSignature };
|
|
220
|
+
export { IFOOD_APPS_PORTAL_URL, IFOOD_APP_LINKING, IFOOD_AVAILABILITY, IFOOD_CANCELLATION_ANSWER_WINDOW_MS, IFOOD_CATALOGUE, IFOOD_CATALOGUE_READER, IFOOD_COURIER, IFOOD_IMAGE_BASE_URL, IFOOD_LINKING, IFOOD_LOGISTICS, IFOOD_LOGISTICS_STEPS, IFOOD_LOGISTICS_VEHICLES, IFOOD_PROVIDER, IFOOD_REASON_CODES, type IfoodAdapterConfig, type IfoodAdapterCopy, type IfoodDeliveryCodeResult, type IfoodLogisticsDriver, type IfoodLogisticsInvalid, type IfoodLogisticsStep, type IfoodLogisticsVehicle, type IfoodReasonCode, createIfoodAdapter, ifoodAddressLine, ifoodFetchOrder, ifoodItemBody, ifoodItemId, ifoodLocalTime, ifoodLogisticsAssignDriver, ifoodLogisticsStep, ifoodLogisticsStepsTo, ifoodLogisticsVerifyDeliveryCode, ifoodPause, ifoodProductId, ifoodResume, normalizeIfoodEvent, readIfoodCourierEvent, readIfoodOrder, readIfoodPresence, verifyIfoodSignature };
|