@fire-spark/core 0.15.2 → 0.15.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.
- package/dist/index.d.ts +11 -1
- package/dist/index.js +19 -0
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Money, PaymentAdapter, PaymentCollectAt, PaymentContext, PaymentResult, PaymentReversal, PaymentStorage, PaymentUI, RedeemLike, RedeemSource, isRealPaymentMethod, orderRedeems } from "@fire-spark/payments";
|
|
2
|
-
import { AndConditions, CheckoutMode, CheckoutResolved, CmsBlock, Condition, Customer, CustomerIdentifyInput, CustomerRegisterInput, CustomerUpdateInput, Fulfillment, FulfillmentListInput, GroupDisplayType, KioskDeviceConfig, KioskDeviceOverrides, KioskHealthBatchInput, KioskHealthBatchResult, KioskHeartbeatInput, KioskHeartbeatResult, KioskRealtimeToken, MatchResult, MatchableRule, Menu, Menu as Menu$1, MenuLookup, MenuLookup as MenuLookup$1, MerchantPayment, ModifierControlType, ModifierGroup, OrConditions, Order as Order$1, Order as Order$2, OrderCancelInput, OrderCancelInput as OrderCancelInput$1, OrderCancelType, OrderCancelType as OrderCancelType$1, OrderDeviceListInput, OrderDeviceListResult, OrderFulfillment, OrderInsertInput, OrderLine, OrderListInput, OrderRecordPaymentInput, OrderRedeem, OrderRedemptionStep, OrderReorderInput, OrderTotals, OrderUpdateInput, OrderValidateInput, OrderValidateOutput, PaymentCollectAt as PaymentCollectAt$1, PaymentIntentPutInput, PaymentMethod, PaymentProvider, PaymentTender, PaymentTenderInput, PlaceOrderResult, PosCatalog, PosFloorInput, PosFloorOccupancy, PosFloorPlan, PosFloorRealtimeToken, PosHealthBatchInput, PosHealthBatchResult, PosHeartbeatInput, PosHeartbeatResult, PosKioskOrder, PosKioskSettleInput, PosKioskSettleResult, PosOrderInput, PosOrderResult, PosTableAttachOrderInput, PosTableCloseInput, PosTableJoinInput, PosTableSeatInput, PosTableSeatReservationInput, PosTableSplitInput, PricingModifier, Product, Product as Product$1, Recommendation, RecurringDateCronResult, RecurringDateCronValues, RulesEngineOrderLine, RulesEngineParams, RulesEngineRuntime, Schedule, SdkLogContext, SdkLogErrorInfo, SdkLogLevel, SdkLogOptions, Store, StoreGetInput, StoreListInput, StoreNearbyInput, StorefrontAvailability, StorefrontMenu, StorefrontMenuScope, StorefrontMenuStreamOptions, StorefrontPaymentsListInput, StorefrontPreferences, TenderRefundInput, TenderReplaceInput, TenderVoidInput, Variant, VariantGroup } from "@fire-spark/types";
|
|
2
|
+
import { AndConditions, CheckoutMode, CheckoutResolved, CmsBlock, Condition, Customer, CustomerIdentifyInput, CustomerRegisterInput, CustomerUpdateInput, Fulfillment, FulfillmentListInput, GroupDisplayType, KioskDeviceConfig, KioskDeviceOverrides, KioskHealthBatchInput, KioskHealthBatchResult, KioskHeartbeatInput, KioskHeartbeatResult, KioskRealtimeToken, MasivoTotpCode, MasivoTotpCreateInput, MasivoTotpVerification, MatchResult, MatchableRule, Menu, Menu as Menu$1, MenuLookup, MenuLookup as MenuLookup$1, MerchantPayment, ModifierControlType, ModifierGroup, OrConditions, Order as Order$1, Order as Order$2, OrderCancelInput, OrderCancelInput as OrderCancelInput$1, OrderCancelType, OrderCancelType as OrderCancelType$1, OrderDeviceListInput, OrderDeviceListResult, OrderFulfillment, OrderInsertInput, OrderLine, OrderListInput, OrderRecordPaymentInput, OrderRedeem, OrderRedemptionStep, OrderReorderInput, OrderTotals, OrderUpdateInput, OrderValidateInput, OrderValidateOutput, PaymentCollectAt as PaymentCollectAt$1, PaymentIntentPutInput, PaymentMethod, PaymentProvider, PaymentTender, PaymentTenderInput, PlaceOrderResult, PosCatalog, PosFloorInput, PosFloorOccupancy, PosFloorPlan, PosFloorRealtimeToken, PosHealthBatchInput, PosHealthBatchResult, PosHeartbeatInput, PosHeartbeatResult, PosKioskOrder, PosKioskSettleInput, PosKioskSettleResult, PosOrderInput, PosOrderResult, PosTableAttachOrderInput, PosTableCloseInput, PosTableJoinInput, PosTableSeatInput, PosTableSeatReservationInput, PosTableSplitInput, PricingModifier, Product, Product as Product$1, Recommendation, RecurringDateCronResult, RecurringDateCronValues, RulesEngineOrderLine, RulesEngineParams, RulesEngineRuntime, Schedule, SdkLogContext, SdkLogErrorInfo, SdkLogLevel, SdkLogOptions, Store, StoreGetInput, StoreListInput, StoreNearbyInput, StorefrontAvailability, StorefrontMenu, StorefrontMenuScope, StorefrontMenuStreamOptions, StorefrontPaymentsListInput, StorefrontPreferences, TenderRefundInput, TenderReplaceInput, TenderVoidInput, Variant, VariantGroup } from "@fire-spark/types";
|
|
3
3
|
import { Big } from "big.js";
|
|
4
4
|
//#region src/productCustomization/catalog.utils.d.ts
|
|
5
5
|
/** Image for a product inside one modifier group, else the product image. */
|
|
@@ -1146,6 +1146,12 @@ declare const fetchKioskRealtimeToken: (input: {
|
|
|
1146
1146
|
device_secret: string;
|
|
1147
1147
|
}, options?: ServiceHttpOptions) => Promise<KioskRealtimeToken>;
|
|
1148
1148
|
//#endregion
|
|
1149
|
+
//#region src/services/masivo.d.ts
|
|
1150
|
+
declare const verifyMasivoTotp: (input: {
|
|
1151
|
+
code: string;
|
|
1152
|
+
}, options?: ServiceHttpOptions) => Promise<MasivoTotpVerification>;
|
|
1153
|
+
declare const createMasivoTotp: (input: MasivoTotpCreateInput, options?: ServiceHttpOptions) => Promise<MasivoTotpCode>;
|
|
1154
|
+
//#endregion
|
|
1149
1155
|
//#region src/services/menus.types.d.ts
|
|
1150
1156
|
type ListMenusStreamOptions = ServiceHttpOptions & StorefrontMenuStreamOptions;
|
|
1151
1157
|
//#endregion
|
|
@@ -1339,6 +1345,10 @@ declare const services: {
|
|
|
1339
1345
|
get: typeof listMenus;
|
|
1340
1346
|
stream: typeof listMenusStream;
|
|
1341
1347
|
};
|
|
1348
|
+
masivo: {
|
|
1349
|
+
verifyTotp: typeof verifyMasivoTotp;
|
|
1350
|
+
createTotp: typeof createMasivoTotp;
|
|
1351
|
+
};
|
|
1342
1352
|
orders: {
|
|
1343
1353
|
list: typeof listOrders;
|
|
1344
1354
|
post: typeof createOrder;
|
package/dist/index.js
CHANGED
|
@@ -2565,6 +2565,21 @@ const fetchKioskRealtimeToken = async (input, options) => {
|
|
|
2565
2565
|
return (await response.json()).data;
|
|
2566
2566
|
};
|
|
2567
2567
|
//#endregion
|
|
2568
|
+
//#region src/services/masivo.ts
|
|
2569
|
+
const VERIFY_PATH = "/api/storefront/v1/masivo/totp/verify";
|
|
2570
|
+
const CREATE_PATH = "/api/storefront/v1/masivo/totp";
|
|
2571
|
+
const verifyMasivoTotp = (input, options) => {
|
|
2572
|
+
const params = new URLSearchParams({ code: input.code });
|
|
2573
|
+
return storefrontJson(`${VERIFY_PATH}?${params.toString()}`, {}, options);
|
|
2574
|
+
};
|
|
2575
|
+
const createMasivoTotp = (input, options) => {
|
|
2576
|
+
const init = {
|
|
2577
|
+
method: "POST",
|
|
2578
|
+
body: JSON.stringify({ customer_id: input.customer_id })
|
|
2579
|
+
};
|
|
2580
|
+
return storefrontJson(CREATE_PATH, init, options);
|
|
2581
|
+
};
|
|
2582
|
+
//#endregion
|
|
2568
2583
|
//#region src/services/menus.ts
|
|
2569
2584
|
const menuQuery = (scope, stream) => {
|
|
2570
2585
|
const params = new URLSearchParams();
|
|
@@ -3231,6 +3246,10 @@ const services = {
|
|
|
3231
3246
|
get: listMenus,
|
|
3232
3247
|
stream: listMenusStream
|
|
3233
3248
|
},
|
|
3249
|
+
masivo: {
|
|
3250
|
+
verifyTotp: verifyMasivoTotp,
|
|
3251
|
+
createTotp: createMasivoTotp
|
|
3252
|
+
},
|
|
3234
3253
|
orders: {
|
|
3235
3254
|
list: listOrders,
|
|
3236
3255
|
post: createOrder,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fire-spark/core",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.3",
|
|
4
4
|
"description": "Fire Spark headless SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"big.js": "6.2.1",
|
|
21
21
|
"dayjs": "1.11.9",
|
|
22
22
|
"@types/big.js": "6.2.2",
|
|
23
|
-
"@fire-spark/payments": "^0.15.
|
|
24
|
-
"@fire-spark/types": "^0.15.
|
|
23
|
+
"@fire-spark/payments": "^0.15.3",
|
|
24
|
+
"@fire-spark/types": "^0.15.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"tsdown": "^0.22.14",
|