@fayz-ai/core 0.52.0 → 0.54.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.
@@ -1,7 +1,7 @@
1
- export { CONNECTIONS_TABLE, CONNECTOR_CATEGORIES, ConnectionSettingsError, ConnectorRuntimeTokenUnavailableError, RequestBlockedError, RequestPlaneError, SYNC_RUNS_TABLE, assertSettingsAllowed, buyerIdempotencyKey, connectionKey, connectionRuns, connectionSettings, connectionStatus, connectorDirection, connectorEntities, connectorGrantScopes, connectorPermissions, connectorPlanes, connectorRuntimeToken, connectorSettings, connectorSubscribes, connectorSubscribesTo, createConnectionStore, createRpcEffectLedger, eventKeyMatches, getConnectorRuntimeTokenSource, grants, groupedPermissions, hasRequestPlane, hasSensitivePermission, invocationPlane, isConnectorCategory, isDataPermission, isEventPermission, isSettingSet, listConnections, missingRequiredSettings, permissionActions, permissionsWrite, preferredPlane, requestPlaneSpec, runEffect, runRequest, setConnectorRuntimeTokenSource, settingsStatus, setupStatusDetail, sortedPermissions, withAfterHooks } from '../chunk-7IOAKSU2.js';
1
+ export { CONNECTIONS_TABLE, CONNECTOR_CATEGORIES, ConnectionSettingsError, ConnectorRuntimeTokenUnavailableError, RequestBlockedError, RequestPlaneError, SYNC_RUNS_TABLE, assertSettingsAllowed, buyerIdempotencyKey, connectionKey, connectionRuns, connectionSettings, connectionStatus, connectorDirection, connectorEntities, connectorGrantScopes, connectorPermissions, connectorPlanes, connectorRuntimeToken, connectorSettings, connectorSubscribes, connectorSubscribesTo, createConnectionStore, createRpcEffectLedger, eventKeyMatches, getConnectorRuntimeTokenSource, grants, groupedPermissions, hasRequestPlane, hasSensitivePermission, invocationPlane, isConnectorCategory, isDataPermission, isEventPermission, isSettingSet, listConnections, missingRequiredSettings, permissionActions, permissionsWrite, preferredPlane, requestPlaneSpec, runEffect, runRequest, setConnectorRuntimeTokenSource, settingsStatus, setupStatusDetail, sortedPermissions, withAfterHooks } from '../chunk-XXHB7ZRM.js';
2
2
  export { CONNECTOR_RUNTIME_TOKEN_HEADER, ConnectorHttpError, RateLimitExceededError, advanceWindow, backoffDelay, classify, createRateLimiter, cursorCompleteness, fetchWithRetry, isExpiring, paginate, parseRetryAfter, reconcileMirror, serializeCursor, sliceWindow, statusNeedsBody } from '../chunk-3TRR2YLM.js';
3
- import '../chunk-GP4VEOHR.js';
4
- import '../chunk-KRQ3R2OF.js';
5
- import '../chunk-F4TZJHLH.js';
3
+ import '../chunk-WJFMTCEE.js';
4
+ import '../chunk-2YIEIPMV.js';
5
+ import '../chunk-3Q7EFWGY.js';
6
6
  //# sourceMappingURL=index.js.map
7
7
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,33 @@
1
+ /**
2
+ * The complements a line carries, read from `items.metadata.options`.
3
+ *
4
+ * A marketplace order writes the customer's choices there
5
+ * (`a_marketplace_order_reaches_the_restaurant_screens`): the complements
6
+ * ("Deseja adicionar molhos?") and, inside each, the customizations iFood calls
7
+ * the third level. Prices are in centavos per ONE line unit, as the canonical
8
+ * order carries them. The line's `unit_price` is the product alone; its `total`
9
+ * counts every add-on, which is why a screen that shows only `unit_price` shows
10
+ * a smaller order than the one the customer paid.
11
+ */
12
+ export interface LineAddOn {
13
+ name: string;
14
+ group?: string;
15
+ /** 1 for a complement, 2 for a choice made inside one. */
16
+ level: 1 | 2;
17
+ /** Per one unit of the line. */
18
+ quantity: number;
19
+ /** Centavos for ONE of this add-on, when the source said. */
20
+ unitPriceCents?: number;
21
+ }
22
+ /** Complements in order, each followed by the choices made inside it. */
23
+ export declare function lineAddOns(metadata: unknown): LineAddOn[];
24
+ /** The add-on as one short label: "2× Bacon" or "Bacon". */
25
+ export declare function lineAddOnLabel(a: LineAddOn): string;
26
+ /**
27
+ * Every add-on in one line of text, the choices inside a complement in
28
+ * parentheses after it: "Molho, Sanduíche (Batata, 2× Bacon)". For the
29
+ * surfaces that have one line of room under the product: the kitchen ticket,
30
+ * the order page.
31
+ */
32
+ export declare function lineAddOnsSummary(addOns: readonly LineAddOn[]): string;
33
+ //# sourceMappingURL=lineAddOns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lineAddOns.d.ts","sourceRoot":"","sources":["../../src/orders/lineAddOns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,0DAA0D;IAC1D,KAAK,EAAE,CAAC,GAAG,CAAC,CAAA;IACZ,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,6DAA6D;IAC7D,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AA4BD,yEAAyE;AACzE,wBAAgB,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS,EAAE,CAYzD;AAED,4DAA4D;AAC5D,wBAAgB,cAAc,CAAC,CAAC,EAAE,SAAS,GAAG,MAAM,CAEnD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,GAAG,MAAM,CAiBtE"}
@@ -1,7 +1,7 @@
1
- export { PluginRuntimeProvider, definePlugin, getWidgetsForZone, resolvePluginRuntime, usePluginRuntime, usePluginRuntimeOptional } from '../chunk-KCCINM2Z.js';
1
+ export { PluginRuntimeProvider, definePlugin, getWidgetsForZone, resolvePluginRuntime, usePluginRuntime, usePluginRuntimeOptional } from '../chunk-TID5GW4V.js';
2
2
  import '../chunk-EWKX4VUM.js';
3
- import '../chunk-KRQ3R2OF.js';
3
+ import '../chunk-2YIEIPMV.js';
4
4
  import '../chunk-CU64QI4A.js';
5
- import '../chunk-F4TZJHLH.js';
5
+ import '../chunk-3Q7EFWGY.js';
6
6
  //# sourceMappingURL=index.js.map
7
7
  //# sourceMappingURL=index.js.map
@@ -1,8 +1,8 @@
1
- export { PluginContractError, assertConnectorContract, assertPluginManifestContract, bespokeConnectorTables } from '../chunk-4IOUOZ6N.js';
2
- import '../chunk-7IOAKSU2.js';
1
+ export { PluginContractError, assertConnectorContract, assertPluginManifestContract, bespokeConnectorTables } from '../chunk-37YMNSAI.js';
2
+ import '../chunk-XXHB7ZRM.js';
3
3
  import '../chunk-3TRR2YLM.js';
4
- import '../chunk-GP4VEOHR.js';
5
- import '../chunk-KRQ3R2OF.js';
6
- import '../chunk-F4TZJHLH.js';
4
+ import '../chunk-WJFMTCEE.js';
5
+ import '../chunk-2YIEIPMV.js';
6
+ import '../chunk-3Q7EFWGY.js';
7
7
  //# sourceMappingURL=index.js.map
8
8
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "fayz": {
4
4
  "status": "beta"
5
5
  },
6
- "version": "0.52.0",
6
+ "version": "0.54.3",
7
7
  "description": "Fayz SDK core — data providers, entity system, plugin runtime, i18n, routing",
8
8
  "type": "module",
9
9
  "sideEffects": false,