@brytdesigns/shopify-utils 1.2.22 → 3.0.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/dist/effect/Actions/bridge.js +71 -0
- package/dist/effect/Actions/bridge.js.map +1 -0
- package/dist/effect/Actions/errors.js +46 -0
- package/dist/effect/Actions/errors.js.map +1 -0
- package/dist/effect/Actions/index.js +23 -0
- package/dist/effect/Actions/index.js.map +1 -0
- package/dist/effect/Actions/service.js +127 -0
- package/dist/effect/Actions/service.js.map +1 -0
- package/dist/effect/Actions/trampoline.js +26 -0
- package/dist/effect/Actions/trampoline.js.map +1 -0
- package/dist/effect/Ajax/Sections/index.js +2 -4
- package/dist/effect/Ajax/Sections/schema.js +28 -39
- package/dist/effect/Ajax/Sections/schema.js.map +1 -1
- package/dist/effect/Ajax/Window/data/AllowedRouteOrigins.js +75 -0
- package/dist/effect/Ajax/Window/data/AllowedRouteOrigins.js.map +1 -0
- package/dist/effect/Ajax/Window/data/ShopifyRoutes.js +86 -37
- package/dist/effect/Ajax/Window/data/ShopifyRoutes.js.map +1 -1
- package/dist/effect/Ajax/Window/data/StorefrontClientConfig.js +14 -13
- package/dist/effect/Ajax/Window/data/StorefrontClientConfig.js.map +1 -1
- package/dist/effect/Ajax/Window/data/StorefrontOrigin.js +32 -0
- package/dist/effect/Ajax/Window/data/StorefrontOrigin.js.map +1 -0
- package/dist/effect/Ajax/Window/data/index.js +15 -5
- package/dist/effect/Ajax/Window/data/index.js.map +1 -1
- package/dist/effect/Ajax/Window/index.js +2 -4
- package/dist/effect/Ajax/index.js +13 -3
- package/dist/effect/Ajax/index.js.map +1 -1
- package/dist/effect/Logging/index.js +13 -10
- package/dist/effect/Logging/index.js.map +1 -1
- package/dist/effect/Resource/data.js +20 -30
- package/dist/effect/Resource/data.js.map +1 -1
- package/dist/effect/Resource/index.js +14 -3
- package/dist/effect/Resource/index.js.map +1 -1
- package/dist/effect/Resource/schema.js +45 -45
- package/dist/effect/Resource/schema.js.map +1 -1
- package/dist/effect/_virtual/_rolldown/runtime.js +13 -0
- package/dist/effect/index.d.ts +383 -65
- package/dist/effect/index.js +5 -8
- package/dist/main/_virtual/_rolldown/runtime.js +13 -0
- package/dist/main/actions.js +78 -0
- package/dist/main/actions.js.map +1 -0
- package/dist/main/effect/Actions/bridge.js +65 -0
- package/dist/main/effect/Actions/bridge.js.map +1 -0
- package/dist/main/effect/Actions/errors.js +46 -0
- package/dist/main/effect/Actions/errors.js.map +1 -0
- package/dist/main/effect/Actions/index.js +4 -0
- package/dist/main/effect/Actions/service.js +127 -0
- package/dist/main/effect/Actions/service.js.map +1 -0
- package/dist/main/effect/Actions/trampoline.js +26 -0
- package/dist/main/effect/Actions/trampoline.js.map +1 -0
- package/dist/main/effect/Ajax/Sections/index.js +1 -4
- package/dist/main/effect/Ajax/Sections/schema.js +11 -41
- package/dist/main/effect/Ajax/Sections/schema.js.map +1 -1
- package/dist/main/effect/Ajax/Window/data/AllowedRouteOrigins.js +18 -0
- package/dist/main/effect/Ajax/Window/data/AllowedRouteOrigins.js.map +1 -0
- package/dist/main/effect/Ajax/Window/data/ShopifyRoutes.js +37 -37
- package/dist/main/effect/Ajax/Window/data/ShopifyRoutes.js.map +1 -1
- package/dist/main/effect/Ajax/Window/data/StorefrontClientConfig.js +3 -14
- package/dist/main/effect/Ajax/Window/data/StorefrontClientConfig.js.map +1 -1
- package/dist/main/effect/Ajax/Window/data/StorefrontOrigin.js +6 -0
- package/dist/main/effect/Ajax/Window/data/StorefrontOrigin.js.map +1 -0
- package/dist/main/effect/Ajax/Window/data/index.js +4 -6
- package/dist/main/effect/Ajax/Window/index.js +1 -4
- package/dist/main/effect/Ajax/index.js +2 -4
- package/dist/main/effect/Logging/index.js +2 -13
- package/dist/main/effect/Resource/data.js +20 -30
- package/dist/main/effect/Resource/data.js.map +1 -1
- package/dist/main/effect/Resource/index.js +3 -4
- package/dist/main/effect/Resource/schema.js +45 -45
- package/dist/main/effect/Resource/schema.js.map +1 -1
- package/dist/main/effect/index.js +4 -8
- package/dist/main/index.d.ts +351 -11
- package/dist/main/index.js +3 -3
- package/dist/main/resources/index.js +8 -7
- package/dist/main/resources/index.js.map +1 -1
- package/package.json +9 -9
- package/dist/effect/Ajax/Sections/index.js.map +0 -1
- package/dist/effect/Ajax/Window/data/types.js +0 -3
- package/dist/effect/Ajax/Window/data/types.js.map +0 -1
- package/dist/effect/Ajax/Window/index.js.map +0 -1
- package/dist/effect/index.js.map +0 -1
- package/dist/index.d.ts +0 -77
- package/dist/jsdelivr/effect/Ajax/Sections/index.js +0 -4
- package/dist/jsdelivr/effect/Ajax/Sections/index.js.map +0 -1
- package/dist/jsdelivr/effect/Ajax/Sections/schema.js +0 -20
- package/dist/jsdelivr/effect/Ajax/Sections/schema.js.map +0 -1
- package/dist/jsdelivr/effect/Ajax/Window/data/ShopifyRoutes.js +0 -38
- package/dist/jsdelivr/effect/Ajax/Window/data/ShopifyRoutes.js.map +0 -1
- package/dist/jsdelivr/effect/Ajax/Window/data/StorefrontClientConfig.js +0 -16
- package/dist/jsdelivr/effect/Ajax/Window/data/StorefrontClientConfig.js.map +0 -1
- package/dist/jsdelivr/effect/Ajax/Window/data/index.js +0 -6
- package/dist/jsdelivr/effect/Ajax/Window/data/index.js.map +0 -1
- package/dist/jsdelivr/effect/Ajax/Window/data/types.js +0 -3
- package/dist/jsdelivr/effect/Ajax/Window/data/types.js.map +0 -1
- package/dist/jsdelivr/effect/Ajax/Window/index.js +0 -4
- package/dist/jsdelivr/effect/Ajax/Window/index.js.map +0 -1
- package/dist/jsdelivr/effect/Ajax/index.js +0 -4
- package/dist/jsdelivr/effect/Ajax/index.js.map +0 -1
- package/dist/jsdelivr/effect/Logging/index.js +0 -13
- package/dist/jsdelivr/effect/Logging/index.js.map +0 -1
- package/dist/jsdelivr/effect/Resource/data.js +0 -17
- package/dist/jsdelivr/effect/Resource/data.js.map +0 -1
- package/dist/jsdelivr/effect/Resource/index.js +0 -4
- package/dist/jsdelivr/effect/Resource/index.js.map +0 -1
- package/dist/jsdelivr/effect/Resource/schema.js +0 -47
- package/dist/jsdelivr/effect/Resource/schema.js.map +0 -1
- package/dist/jsdelivr/effect/index.js +0 -8
- package/dist/jsdelivr/effect/index.js.map +0 -1
- package/dist/jsdelivr/index.js +0 -3
- package/dist/jsdelivr/index.js.map +0 -1
- package/dist/jsdelivr/resources/index.js +0 -9
- package/dist/jsdelivr/resources/index.js.map +0 -1
- package/dist/main/effect/Ajax/Sections/index.js.map +0 -1
- package/dist/main/effect/Ajax/Window/data/index.js.map +0 -1
- package/dist/main/effect/Ajax/Window/data/types.js +0 -3
- package/dist/main/effect/Ajax/Window/data/types.js.map +0 -1
- package/dist/main/effect/Ajax/Window/index.js.map +0 -1
- package/dist/main/effect/Ajax/index.js.map +0 -1
- package/dist/main/effect/Logging/index.js.map +0 -1
- package/dist/main/effect/Resource/index.js.map +0 -1
- package/dist/main/effect/index.js.map +0 -1
- package/dist/main/index.js.map +0 -1
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import 'effect/LogLevel';
|
|
4
|
-
|
|
5
|
-
const filterLevelOrNever = (level, effect) => Effect.gen(function* () {
|
|
6
|
-
const logLevel = yield* FiberRef.get(FiberRef.currentMinimumLogLevel);
|
|
7
|
-
if (logLevel._tag !== level._tag) return yield* effect;
|
|
8
|
-
});
|
|
9
|
-
const makeNamespacedLogSpan = (prefix) => (label) => Effect.withLogSpan(`${prefix}:${label}`);
|
|
10
|
-
|
|
11
|
-
export { filterLevelOrNever, makeNamespacedLogSpan };
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import "effect/Effect";
|
|
2
|
+
import "effect/References";
|
|
@@ -1,33 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}) => Effect.gen(function* () {
|
|
10
|
-
const [actualId, actualType] = yield* Effect.all(
|
|
11
|
-
[Schema.decode(ID)(id), Schema.decode(Type)(type)],
|
|
12
|
-
{
|
|
13
|
-
concurrency: "unbounded"
|
|
14
|
-
}
|
|
15
|
-
);
|
|
16
|
-
return `gid://shopify/${actualType}/${actualId}`;
|
|
1
|
+
import { GID, ID, Type } from "./schema.js";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import * as Schema from "effect/Schema";
|
|
4
|
+
import * as SchemaGetter from "effect/SchemaGetter";
|
|
5
|
+
//#region src/effect/Resource/data.ts
|
|
6
|
+
var format = ({ id, type }) => Effect.gen(function* () {
|
|
7
|
+
const [actualId, actualType] = yield* Effect.all([Schema.decodeEffect(ID)(id), Schema.decodeEffect(Type)(type)], { concurrency: "unbounded" });
|
|
8
|
+
return `gid://shopify/${actualType}/${actualId}`;
|
|
17
9
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
)(input);
|
|
30
|
-
|
|
10
|
+
/**
|
|
11
|
+
* v4 replaces `Schema.transformOrFail` with `decodeTo` plus `SchemaGetter`
|
|
12
|
+
* transformations. The decode direction never fails, so it is a plain
|
|
13
|
+
* `transform`; the encode direction is refused outright, which `forbidden`
|
|
14
|
+
* expresses directly rather than by constructing an issue by hand.
|
|
15
|
+
*/
|
|
16
|
+
var parse = (input) => Schema.decodeEffect(GID.pipe(Schema.decodeTo(ID, {
|
|
17
|
+
decode: SchemaGetter.transform((value) => `${value}`.split("/").pop()),
|
|
18
|
+
encode: SchemaGetter.forbidden(() => "Encoding an ID to a GID is not allowed. Use the format function to convert IDs to GIDs.")
|
|
19
|
+
})))(input);
|
|
20
|
+
//#endregion
|
|
31
21
|
export { format, parse };
|
|
32
|
-
|
|
22
|
+
|
|
33
23
|
//# sourceMappingURL=data.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"data.js","names":[],"sources":["../../../../src/effect/Resource/data.ts"],"sourcesContent":["import * as Effect from \"effect/Effect\";\nimport * as Schema from \"effect/Schema\";\nimport * as SchemaGetter from \"effect/SchemaGetter\";\nimport { GID, ID, Type } from \"./schema.js\";\n\ntype FormatOptions<T extends ID, R extends Type> = {\n\tid: T;\n\ttype: R;\n};\n\nexport const format = <const T extends ID, const R extends Type>({\n\tid,\n\ttype,\n}: FormatOptions<T, R>) =>\n\tEffect.gen(function* () {\n\t\tconst [actualId, actualType] = yield* Effect.all(\n\t\t\t[Schema.decodeEffect(ID)(id), Schema.decodeEffect(Type)(type)],\n\t\t\t{\n\t\t\t\tconcurrency: \"unbounded\",\n\t\t\t},\n\t\t);\n\t\treturn `gid://shopify/${actualType}/${actualId}` as `gid://shopify/${R}/${T}`;\n\t});\n\n/**\n * v4 replaces `Schema.transformOrFail` with `decodeTo` plus `SchemaGetter`\n * transformations. The decode direction never fails, so it is a plain\n * `transform`; the encode direction is refused outright, which `forbidden`\n * expresses directly rather than by constructing an issue by hand.\n */\nexport const parse = (input: string) =>\n\tSchema.decodeEffect(\n\t\tGID.pipe(\n\t\t\tSchema.decodeTo(ID, {\n\t\t\t\tdecode: SchemaGetter.transform(\n\t\t\t\t\t(value: string) => `${value}`.split(\"/\").pop() as ID,\n\t\t\t\t),\n\t\t\t\tencode: SchemaGetter.forbidden(\n\t\t\t\t\t() =>\n\t\t\t\t\t\t\"Encoding an ID to a GID is not allowed. Use the format function to convert IDs to GIDs.\",\n\t\t\t\t),\n\t\t\t}),\n\t\t),\n\t)(input);\n"],"mappings":";;;;;AAUA,IAAa,UAAoD,EAChE,IACA,WAEA,OAAO,IAAI,aAAa;CACvB,MAAM,CAAC,UAAU,cAAc,OAAO,OAAO,IAC5C,CAAC,OAAO,aAAa,EAAE,CAAC,CAAC,EAAE,GAAG,OAAO,aAAa,IAAI,CAAC,CAAC,IAAI,CAAC,GAC7D,EACC,aAAa,YACd,CACD;CACA,OAAO,iBAAiB,WAAW,GAAG;AACvC,CAAC;;;;;;;AAQF,IAAa,SAAS,UACrB,OAAO,aACN,IAAI,KACH,OAAO,SAAS,IAAI;CACnB,QAAQ,aAAa,WACnB,UAAkB,GAAG,QAAQ,MAAM,GAAG,CAAC,CAAC,IAAI,CAC9C;CACA,QAAQ,aAAa,gBAEnB,yFACF;AACD,CAAC,CACF,CACD,CAAC,CAAC,KAAK"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import "./schema.js";
|
|
2
|
+
import { format, parse } from "./data.js";
|
|
3
|
+
export { format, parse };
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import * as Schema from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
);
|
|
44
|
-
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
//#region src/effect/Resource/schema.ts
|
|
3
|
+
var Type = Schema.Literals([
|
|
4
|
+
"Cart",
|
|
5
|
+
"Collection",
|
|
6
|
+
"Customer",
|
|
7
|
+
"DeliveryCarrierService",
|
|
8
|
+
"DeliveryLocationGroup",
|
|
9
|
+
"DeliveryProfile",
|
|
10
|
+
"DeliveryZone",
|
|
11
|
+
"DraftOrder",
|
|
12
|
+
"DraftOrderLineItem",
|
|
13
|
+
"Duty",
|
|
14
|
+
"EmailTemplate",
|
|
15
|
+
"Fulfillment",
|
|
16
|
+
"FulfullmentEvent",
|
|
17
|
+
"FullfullmentService",
|
|
18
|
+
"InventoryItem",
|
|
19
|
+
"InventoryLevel",
|
|
20
|
+
"LineItem",
|
|
21
|
+
"Location",
|
|
22
|
+
"MarketingEvent",
|
|
23
|
+
"MediaImage",
|
|
24
|
+
"Metafield",
|
|
25
|
+
"OnlineStoreArticle",
|
|
26
|
+
"OnlineStoreBlog",
|
|
27
|
+
"OnlineStorePage",
|
|
28
|
+
"Order",
|
|
29
|
+
"OrderTransaction",
|
|
30
|
+
"Product",
|
|
31
|
+
"ProductImage",
|
|
32
|
+
"ProductVariant",
|
|
33
|
+
"Refund",
|
|
34
|
+
"Shop",
|
|
35
|
+
"StaffMember",
|
|
36
|
+
"Theme"
|
|
37
|
+
]);
|
|
38
|
+
var GID = Schema.String.check(Schema.isStartingWith("gid://shopify/"));
|
|
39
|
+
var ID = Schema.Union([
|
|
40
|
+
Schema.Number,
|
|
41
|
+
Schema.NumberFromString,
|
|
42
|
+
Schema.String
|
|
43
|
+
]);
|
|
44
|
+
//#endregion
|
|
45
45
|
export { GID, ID, Type };
|
|
46
|
-
|
|
46
|
+
|
|
47
47
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"schema.js","names":[],"sources":["../../../../src/effect/Resource/schema.ts"],"sourcesContent":["import * as Schema from \"effect/Schema\";\n\nexport type Type = Schema.Schema.Type<typeof Type>;\nexport const Type = Schema.Literals([\n\t\"Cart\",\n\t\"Collection\",\n\t\"Customer\",\n\t\"DeliveryCarrierService\",\n\t\"DeliveryLocationGroup\",\n\t\"DeliveryProfile\",\n\t\"DeliveryZone\",\n\t\"DraftOrder\",\n\t\"DraftOrderLineItem\",\n\t\"Duty\",\n\t\"EmailTemplate\",\n\t\"Fulfillment\",\n\t\"FulfullmentEvent\",\n\t\"FullfullmentService\",\n\t\"InventoryItem\",\n\t\"InventoryLevel\",\n\t\"LineItem\",\n\t\"Location\",\n\t\"MarketingEvent\",\n\t\"MediaImage\",\n\t\"Metafield\",\n\t\"OnlineStoreArticle\",\n\t\"OnlineStoreBlog\",\n\t\"OnlineStorePage\",\n\t\"Order\",\n\t\"OrderTransaction\",\n\t\"Product\",\n\t\"ProductImage\",\n\t\"ProductVariant\",\n\t\"Refund\",\n\t\"Shop\",\n\t\"StaffMember\",\n\t\"Theme\",\n]);\n\nexport type GID = Schema.Codec.Encoded<typeof GID>;\nexport const GID = Schema.String.check(Schema.isStartingWith(\"gid://shopify/\"));\n\nexport type ID = Schema.Codec.Encoded<typeof ID>;\nexport const ID = Schema.Union([\n\tSchema.Number,\n\tSchema.NumberFromString,\n\tSchema.String,\n]);\n"],"mappings":";;AAGA,IAAa,OAAO,OAAO,SAAS;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AAGD,IAAa,MAAM,OAAO,OAAO,MAAM,OAAO,eAAe,gBAAgB,CAAC;AAG9E,IAAa,KAAK,OAAO,MAAM;CAC9B,OAAO;CACP,OAAO;CACP,OAAO;AACR,CAAC"}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import * as index_js$1 from './Logging/index.js';
|
|
6
|
-
export { index_js$1 as Logging };
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import "./Actions/index.js";
|
|
2
|
+
import "./Ajax/index.js";
|
|
3
|
+
import "./Logging/index.js";
|
|
4
|
+
import "./Resource/index.js";
|
package/dist/main/index.d.ts
CHANGED
|
@@ -1,12 +1,311 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
+
import * as Cause from 'effect/Cause';
|
|
4
|
+
import * as Context from 'effect/Context';
|
|
3
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Layer from 'effect/Layer';
|
|
4
7
|
import * as LogLevel from 'effect/LogLevel';
|
|
5
|
-
import { ParseError } from 'effect/ParseResult';
|
|
6
8
|
import * as Schema from 'effect/Schema';
|
|
9
|
+
import * as Scope from 'effect/Scope';
|
|
7
10
|
|
|
11
|
+
declare const toAsyncCallback: <Args extends ReadonlyArray<unknown>, A, E, R>(services: Context.Context<R>, f: (...args: Args) => Effect.Effect<A, E, R>) => (...args: Args) => Promise<A>;
|
|
12
|
+
declare const toSyncCallback: <Args extends ReadonlyArray<unknown>, A, R>(services: Context.Context<R>, f: (...args: Args) => Effect.Effect<A, never, R>, onAbnormal: (cause: Cause.Cause<never>) => A) => (...args: Args) => A;
|
|
13
|
+
declare const fromPromiseThunk: <A, E>(thunk: () => Promise<A>, onReject: (cause: unknown) => E) => Effect.Effect<A, E>;
|
|
14
|
+
/** Every action exposed on `window.Shopify.actions`. */
|
|
15
|
+
export type ActionName = "getCart" | "updateCart" | "openCart";
|
|
16
|
+
/**
|
|
17
|
+
* Only `updateCart` and `openCart` are `ActionFunction`s — `getCart` is a bare
|
|
18
|
+
* callable with no `configure()` / `isDefault()`.
|
|
19
|
+
*/
|
|
20
|
+
export type ConfigurableActionName = Exclude<ActionName, "getCart">;
|
|
21
|
+
declare const ActionsUnavailableError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{
|
|
22
|
+
readonly [P in keyof A as P extends "_tag" ? never : P]: A[P];
|
|
23
|
+
}>) => import("effect/Cause").YieldableError & {
|
|
24
|
+
readonly _tag: "@brytdesigns/shopify-utils/ActionsUnavailableError";
|
|
25
|
+
} & Readonly<A>;
|
|
26
|
+
declare class ActionsUnavailableError extends ActionsUnavailableError_base<{
|
|
27
|
+
readonly action: ActionName;
|
|
28
|
+
readonly message: string;
|
|
29
|
+
}> {
|
|
30
|
+
constructor(options: {
|
|
31
|
+
readonly action: ActionName;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
declare const ActionConfigurationRejectedError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{
|
|
35
|
+
readonly [P in keyof A as P extends "_tag" ? never : P]: A[P];
|
|
36
|
+
}>) => import("effect/Cause").YieldableError & {
|
|
37
|
+
readonly _tag: "@brytdesigns/shopify-utils/ActionConfigurationRejectedError";
|
|
38
|
+
} & Readonly<A>;
|
|
39
|
+
declare class ActionConfigurationRejectedError extends ActionConfigurationRejectedError_base<{
|
|
40
|
+
readonly action: ConfigurableActionName;
|
|
41
|
+
readonly message: string;
|
|
42
|
+
}> {
|
|
43
|
+
constructor(options: {
|
|
44
|
+
readonly action: ConfigurableActionName;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
declare const ActionInvocationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{
|
|
48
|
+
readonly [P in keyof A as P extends "_tag" ? never : P]: A[P];
|
|
49
|
+
}>) => import("effect/Cause").YieldableError & {
|
|
50
|
+
readonly _tag: "@brytdesigns/shopify-utils/ActionInvocationError";
|
|
51
|
+
} & Readonly<A>;
|
|
52
|
+
declare class ActionInvocationError extends ActionInvocationError_base<{
|
|
53
|
+
readonly action: ActionName;
|
|
54
|
+
readonly cause: unknown;
|
|
55
|
+
readonly message: string;
|
|
56
|
+
}> {
|
|
57
|
+
constructor(options: {
|
|
58
|
+
readonly action: ActionName;
|
|
59
|
+
readonly cause: unknown;
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
// -----------------------------------------------------------------------------
|
|
63
|
+
// VENDORED FILE — DO NOT EDIT BY HAND.
|
|
64
|
+
//
|
|
65
|
+
// Source: https://cdn.shopify.com/storefront/standard-actions.d.ts
|
|
66
|
+
// Vendored: 2026-08-13
|
|
67
|
+
// Upstream version (see `// version:` line below): 977e4f914dd2b3eca85ad01dee81c2c96eb1b2e5
|
|
68
|
+
// sha256 (upstream body only, i.e. everything below this header):
|
|
69
|
+
// 2f0fc044f35999cd09550b8b68620077601d1409817edae16745e600417788e7
|
|
70
|
+
//
|
|
71
|
+
// Everything below this header is the upstream file byte-for-byte. To diff
|
|
72
|
+
// against a future revision:
|
|
73
|
+
//
|
|
74
|
+
// curl -sSL https://cdn.shopify.com/storefront/standard-actions.d.ts \
|
|
75
|
+
// | diff - <(tail -n +25 shopify/utils/src/types/standard-actions.d.ts)
|
|
76
|
+
//
|
|
77
|
+
// There is NO npm package for this. Shopify injects the runtime on every Liquid
|
|
78
|
+
// storefront as `window.Shopify.actions`; a module build for import maps lives
|
|
79
|
+
// at https://cdn.shopify.com/storefront/standard-actions.js. Do not add a
|
|
80
|
+
// dependency — import types via the `@theme/standard-actions` alias
|
|
81
|
+
// (see tsconfig.json `paths`), which is marked `external` in tsup.config.ts.
|
|
82
|
+
//
|
|
83
|
+
// This file is excluded from Biome in the root biome.json so formatting/lint
|
|
84
|
+
// never rewrites upstream content and pollutes the diff.
|
|
85
|
+
// -----------------------------------------------------------------------------
|
|
86
|
+
// version: 977e4f914dd2b3eca85ad01dee81c2c96eb1b2e5
|
|
87
|
+
export interface Price {
|
|
88
|
+
amount: string;
|
|
89
|
+
currencyCode: string;
|
|
90
|
+
}
|
|
91
|
+
export interface CartDiscountCode {
|
|
92
|
+
applicable: boolean;
|
|
93
|
+
code: string;
|
|
94
|
+
}
|
|
95
|
+
export interface CartCost {
|
|
96
|
+
totalAmount: Price;
|
|
97
|
+
}
|
|
98
|
+
export interface CartLine {
|
|
99
|
+
id: string;
|
|
100
|
+
quantity: number;
|
|
101
|
+
cost: CartCost;
|
|
102
|
+
}
|
|
103
|
+
export interface CartMutationUserError {
|
|
104
|
+
code?: string;
|
|
105
|
+
field?: string[];
|
|
106
|
+
message: string;
|
|
107
|
+
}
|
|
108
|
+
export interface CartMutationWarning {
|
|
109
|
+
code?: string;
|
|
110
|
+
message: string;
|
|
111
|
+
target?: string;
|
|
112
|
+
}
|
|
113
|
+
declare const CART_UPDATE_CONTEXTS: readonly [
|
|
114
|
+
"product",
|
|
115
|
+
"cart",
|
|
116
|
+
"dialog",
|
|
117
|
+
"standard-action"
|
|
118
|
+
];
|
|
119
|
+
export type CartUpdateContext = (typeof CART_UPDATE_CONTEXTS)[number];
|
|
120
|
+
declare const CART_UPDATE_ACTIONS: readonly [
|
|
121
|
+
"add",
|
|
122
|
+
"remove",
|
|
123
|
+
"update"
|
|
124
|
+
];
|
|
125
|
+
export type CartUpdateAction = (typeof CART_UPDATE_ACTIONS)[number];
|
|
126
|
+
export type ActionArgs<P, O = void> = [
|
|
127
|
+
P
|
|
128
|
+
] extends [
|
|
129
|
+
void
|
|
130
|
+
] ? [
|
|
131
|
+
options?: O
|
|
132
|
+
] : [
|
|
133
|
+
Extract<P, void>
|
|
134
|
+
] extends [
|
|
135
|
+
never
|
|
136
|
+
] ? [
|
|
137
|
+
payload: P,
|
|
138
|
+
options?: O
|
|
139
|
+
] : [
|
|
140
|
+
payload?: Exclude<P, void>,
|
|
141
|
+
options?: O
|
|
142
|
+
];
|
|
143
|
+
export type UpdateCartUserError = CartMutationUserError;
|
|
144
|
+
export type UpdateCartWarning = CartMutationWarning;
|
|
145
|
+
export interface CartAttributeInput {
|
|
146
|
+
key: string;
|
|
147
|
+
value: string;
|
|
148
|
+
}
|
|
149
|
+
export interface StorefrontCartLinesConnection {
|
|
150
|
+
nodes: CartLine[];
|
|
151
|
+
}
|
|
152
|
+
export interface StorefrontCartSummary {
|
|
153
|
+
id: string;
|
|
154
|
+
totalQuantity: number;
|
|
155
|
+
cost: CartCost;
|
|
156
|
+
lines: StorefrontCartLinesConnection;
|
|
157
|
+
discountCodes: CartDiscountCode[];
|
|
158
|
+
}
|
|
159
|
+
export type UpdateCartEventTargetMeta = {
|
|
160
|
+
type: "shopify:cart:lines-update";
|
|
161
|
+
action: CartUpdateAction;
|
|
162
|
+
} | {
|
|
163
|
+
type: "shopify:cart:note-update" | "shopify:cart:attributes-update" | "shopify:cart:discount-update" | "shopify:cart:error";
|
|
164
|
+
};
|
|
165
|
+
export interface CartLineInput {
|
|
166
|
+
/**
|
|
167
|
+
* Existing-line id from SFAPI or the AJAX cart API.
|
|
168
|
+
* CartLine GIDs keep or receive a `?cart=` suffix automatically when the cart id is known.
|
|
169
|
+
* Present = update/remove; absent = add.
|
|
170
|
+
*/
|
|
171
|
+
id?: string;
|
|
172
|
+
/** ProductVariant GID or raw variant id. Required for add. */
|
|
173
|
+
merchandiseId?: string;
|
|
174
|
+
/** Set to 0 to remove. */
|
|
175
|
+
quantity: number;
|
|
176
|
+
/** Line item-level custom attributes */
|
|
177
|
+
attributes?: CartAttributeInput[];
|
|
178
|
+
/** Selling plan GID or raw selling plan id. */
|
|
179
|
+
sellingPlanId?: string;
|
|
180
|
+
}
|
|
181
|
+
export interface UpdateCartPayload {
|
|
182
|
+
/** Cart GID or raw cart token. If omitted, discovered from the cart cookie. */
|
|
183
|
+
cartId?: string;
|
|
184
|
+
lines?: CartLineInput[];
|
|
185
|
+
note?: string;
|
|
186
|
+
discountCodes?: string[];
|
|
187
|
+
/** Cart-level custom attributes */
|
|
188
|
+
attributes?: CartAttributeInput[];
|
|
189
|
+
}
|
|
190
|
+
export interface UpdateCartResult {
|
|
191
|
+
cart: StorefrontCartSummary;
|
|
192
|
+
userErrors?: UpdateCartUserError[];
|
|
193
|
+
warnings?: UpdateCartWarning[];
|
|
194
|
+
detail?: Record<string, any>;
|
|
195
|
+
}
|
|
196
|
+
export interface UpdateCartOptions {
|
|
197
|
+
signal?: AbortSignal;
|
|
198
|
+
event?: {
|
|
199
|
+
detail?: Record<string, any>;
|
|
200
|
+
context?: CartUpdateContext;
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
export interface GetCartPayload {
|
|
204
|
+
/** Cart GID or raw cart token. If omitted, discovered from the browser cookie. */
|
|
205
|
+
cartId?: string;
|
|
206
|
+
}
|
|
207
|
+
export interface GetCartResult {
|
|
208
|
+
cart: StorefrontCartSummary | null;
|
|
209
|
+
detail?: Record<string, any>;
|
|
210
|
+
}
|
|
211
|
+
export interface GetCartOptions {
|
|
212
|
+
signal?: AbortSignal;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* The default handler, lifted into Effect-land.
|
|
216
|
+
*
|
|
217
|
+
* Handlers receive this rather than a pre-computed result so they keep the full
|
|
218
|
+
* range of the upstream contract: run the default, wrap it, retry it, race it,
|
|
219
|
+
* or skip it entirely and synthesise a result.
|
|
220
|
+
*/
|
|
221
|
+
export type DefaultHandler<A> = Effect.Effect<A, ActionInvocationError>;
|
|
222
|
+
/**
|
|
223
|
+
* An action handler written in Effect.
|
|
224
|
+
*
|
|
225
|
+
* The returned Effect's success value is what the action resolves with, and its
|
|
226
|
+
* failure becomes a rejected promise for Shopify.
|
|
227
|
+
*
|
|
228
|
+
* Note that `E` is checked but never surfaces to the fiber that called
|
|
229
|
+
* `configure` — the handler runs long afterwards, when a shopper triggers the
|
|
230
|
+
* action, so its failure has nowhere to go but the promise Shopify awaits. If
|
|
231
|
+
* you want handler failures observed, observe them inside the handler.
|
|
232
|
+
*/
|
|
233
|
+
export type Handler<P, A, O, E, R> = (defaultHandler: DefaultHandler<A>, ...args: ActionArgs<P, O>) => Effect.Effect<A, E, R>;
|
|
234
|
+
/**
|
|
235
|
+
* Resolves the element that `shopify:cart:*` events are dispatched from.
|
|
236
|
+
*
|
|
237
|
+
* The error channel is `never` on purpose. Shopify calls this synchronously and
|
|
238
|
+
* uses the return value immediately, so there is nowhere for a failure to go —
|
|
239
|
+
* handle errors inside the Effect and fall back to an element or `null`.
|
|
240
|
+
*
|
|
241
|
+
* For the same reason this Effect must complete synchronously. Anything that
|
|
242
|
+
* suspends (`Effect.sleep`, an HTTP call, an async service) cannot produce a
|
|
243
|
+
* value in time and is reported as `null` with a logged defect, which makes
|
|
244
|
+
* Shopify dispatch on `document`. If you need async work, resolve it ahead of
|
|
245
|
+
* time into a `Ref` and read the `Ref` here.
|
|
246
|
+
*/
|
|
247
|
+
export type EventTargetResolver<R> = (meta: UpdateCartEventTargetMeta) => Effect.Effect<EventTarget | null, never, R>;
|
|
248
|
+
export interface UpdateCartConfiguration<E, R> {
|
|
249
|
+
readonly eventTarget: EventTargetResolver<R>;
|
|
250
|
+
/** Optional: routing events without changing cart behaviour is valid. */
|
|
251
|
+
readonly handler?: Handler<UpdateCartPayload, UpdateCartResult, UpdateCartOptions, E, R>;
|
|
252
|
+
}
|
|
253
|
+
export interface OpenCartConfiguration<E, R> {
|
|
254
|
+
/**
|
|
255
|
+
* Required, unlike `updateCart`'s. `openCart` has no event target, so a
|
|
256
|
+
* configuration without a handler would claim the one-shot upstream slot
|
|
257
|
+
* while contributing nothing — locking everyone else out for the life of
|
|
258
|
+
* the page in exchange for default behaviour.
|
|
259
|
+
*/
|
|
260
|
+
readonly handler: Handler<void, void, void, E, R>;
|
|
261
|
+
}
|
|
262
|
+
export interface ShopifyStorefrontActionsImpl {
|
|
263
|
+
/**
|
|
264
|
+
* Read the current cart. `getCart` is a bare callable upstream — it has no
|
|
265
|
+
* `configure()`, so there is no `configureGetCart`.
|
|
266
|
+
*/
|
|
267
|
+
readonly getCart: (payload?: GetCartPayload, options?: GetCartOptions) => Effect.Effect<GetCartResult, ActionsUnavailableError | ActionInvocationError>;
|
|
268
|
+
readonly updateCart: (payload: UpdateCartPayload, options?: UpdateCartOptions) => Effect.Effect<UpdateCartResult, ActionsUnavailableError | ActionInvocationError>;
|
|
269
|
+
readonly openCart: Effect.Effect<void, ActionsUnavailableError | ActionInvocationError>;
|
|
270
|
+
/**
|
|
271
|
+
* Install an Effect-based `updateCart` configuration for the lifetime of the
|
|
272
|
+
* enclosing `Scope`.
|
|
273
|
+
*
|
|
274
|
+
* The `R` of the supplied Effects flows out into the returned Effect's
|
|
275
|
+
* requirements, so the services your handler needs stay explicit and must be
|
|
276
|
+
* provided before this runs — they are captured, not smuggled.
|
|
277
|
+
*
|
|
278
|
+
* Calling this more than once rebinds rather than failing: we claim the
|
|
279
|
+
* upstream slot once and swap our own configuration behind it. A
|
|
280
|
+
* `ActionConfigurationRejectedError` therefore means one specific thing —
|
|
281
|
+
* something outside this library claimed the action first.
|
|
282
|
+
*
|
|
283
|
+
* For page-lifetime registration, build it into a layer with
|
|
284
|
+
* `Layer.effectDiscard(Actions.configureUpdateCart({ ... }))` so the
|
|
285
|
+
* registration lives exactly as long as the runtime does.
|
|
286
|
+
*/
|
|
287
|
+
readonly configureUpdateCart: <E, R>(config: UpdateCartConfiguration<E, R>) => Effect.Effect<void, ActionsUnavailableError | ActionConfigurationRejectedError, R | Scope.Scope>;
|
|
288
|
+
readonly configureOpenCart: <E, R>(config: OpenCartConfiguration<E, R>) => Effect.Effect<void, ActionsUnavailableError | ActionConfigurationRejectedError, R | Scope.Scope>;
|
|
289
|
+
/**
|
|
290
|
+
* Upstream's own notion: `true` until the action's slot is claimed.
|
|
291
|
+
*
|
|
292
|
+
* Because the slot can never be released, this stays `false` once we have
|
|
293
|
+
* claimed it, even after every configuration has been deactivated.
|
|
294
|
+
*/
|
|
295
|
+
readonly isDefault: (action: ConfigurableActionName) => Effect.Effect<boolean, ActionsUnavailableError>;
|
|
296
|
+
}
|
|
297
|
+
declare const ShopifyStorefrontActions_base: Context.ServiceClass<ShopifyStorefrontActions, "@brytdesigns/shopify-utils/ShopifyStorefrontActions", ShopifyStorefrontActionsImpl>;
|
|
298
|
+
declare class ShopifyStorefrontActions extends ShopifyStorefrontActions_base {
|
|
299
|
+
}
|
|
300
|
+
declare const layer: Layer.Layer<ShopifyStorefrontActions, never, never>;
|
|
301
|
+
declare const getCart: (payload?: GetCartPayload, options?: GetCartOptions) => Effect.Effect<GetCartResult, ActionsUnavailableError | ActionInvocationError, ShopifyStorefrontActions>;
|
|
302
|
+
declare const updateCart: (payload: UpdateCartPayload, options?: UpdateCartOptions) => Effect.Effect<UpdateCartResult, ActionsUnavailableError | ActionInvocationError, ShopifyStorefrontActions>;
|
|
303
|
+
declare const openCart: Effect.Effect<void, ActionsUnavailableError | ActionInvocationError, ShopifyStorefrontActions>;
|
|
304
|
+
declare const configureUpdateCart: <E, R>(config: UpdateCartConfiguration<E, R>) => Effect.Effect<void, ActionsUnavailableError | ActionConfigurationRejectedError, Scope.Scope | ShopifyStorefrontActions | R>;
|
|
305
|
+
declare const configureOpenCart: <E, R>(config: OpenCartConfiguration<E, R>) => Effect.Effect<void, ActionsUnavailableError | ActionConfigurationRejectedError, Scope.Scope | ShopifyStorefrontActions | R>;
|
|
306
|
+
declare const isDefault: (action: ConfigurableActionName) => Effect.Effect<boolean, ActionsUnavailableError, ShopifyStorefrontActions>;
|
|
8
307
|
export type Type = Schema.Schema.Type<typeof Type>;
|
|
9
|
-
declare const Type: Schema.
|
|
308
|
+
declare const Type: Schema.Literals<readonly [
|
|
10
309
|
"Cart",
|
|
11
310
|
"Collection",
|
|
12
311
|
"Customer",
|
|
@@ -41,20 +340,54 @@ declare const Type: Schema.Literal<[
|
|
|
41
340
|
"StaffMember",
|
|
42
341
|
"Theme"
|
|
43
342
|
]>;
|
|
44
|
-
export type GID = Schema.
|
|
45
|
-
declare const GID: Schema.
|
|
46
|
-
export type ID = Schema.
|
|
47
|
-
declare const ID: Schema.Union<[
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
343
|
+
export type GID = Schema.Codec.Encoded<typeof GID>;
|
|
344
|
+
declare const GID: Schema.String;
|
|
345
|
+
export type ID = Schema.Codec.Encoded<typeof ID>;
|
|
346
|
+
declare const ID: Schema.Union<readonly [
|
|
347
|
+
Schema.Number,
|
|
348
|
+
Schema.NumberFromString,
|
|
349
|
+
Schema.String
|
|
51
350
|
]>;
|
|
52
351
|
export type FormatOptions<T extends ID, R extends Type> = {
|
|
53
352
|
id: T;
|
|
54
353
|
type: R;
|
|
55
354
|
};
|
|
56
|
-
declare const format: <const T extends ID, const R extends Type>({ id, type, }: FormatOptions<T, R>) => Effect.Effect<`gid://shopify/${R}/${T}`,
|
|
57
|
-
declare const parse: (input: string) => Effect.Effect<string | number,
|
|
355
|
+
declare const format: <const T extends ID, const R extends Type>({ id, type, }: FormatOptions<T, R>) => Effect.Effect<`gid://shopify/${R}/${T}`, Schema.SchemaError, never>;
|
|
356
|
+
declare const parse: (input: string) => Effect.Effect<string | number, Schema.SchemaError, never>;
|
|
357
|
+
/**
|
|
358
|
+
* Promise-based access to Shopify's storefront cart actions, for consumers that
|
|
359
|
+
* are not written in Effect.
|
|
360
|
+
*
|
|
361
|
+
* This is a facade over `./effect`'s `Actions`, not a reimplementation, so it
|
|
362
|
+
* inherits the behaviour that matters: the one-shot upstream `configure()` slot
|
|
363
|
+
* is claimed once and rebound thereafter, a missing runtime is distinguishable
|
|
364
|
+
* from a refused configuration, and a configuration can be torn down.
|
|
365
|
+
*
|
|
366
|
+
* Errors arrive as rejections carrying the same tagged error instances the
|
|
367
|
+
* Effect API fails with, so `instanceof ActionsUnavailableError` still works.
|
|
368
|
+
*/
|
|
369
|
+
export type Dispose = () => Promise<void>;
|
|
370
|
+
export type UpdateCartHandler = (defaultHandler: () => Promise<UpdateCartResult>, payload: UpdateCartPayload, options?: UpdateCartOptions) => Promise<UpdateCartResult>;
|
|
371
|
+
export type OpenCartHandler = (defaultHandler: () => Promise<void>) => Promise<void>;
|
|
372
|
+
interface UpdateCartConfiguration$1 {
|
|
373
|
+
/**
|
|
374
|
+
* Chooses the element `shopify:cart:*` events dispatch from. Returning
|
|
375
|
+
* `null` — the default — leaves Shopify dispatching on `document`.
|
|
376
|
+
*
|
|
377
|
+
* Must be synchronous: Shopify uses the return value immediately.
|
|
378
|
+
*/
|
|
379
|
+
readonly eventTarget?: (meta: UpdateCartEventTargetMeta) => EventTarget | null;
|
|
380
|
+
readonly handler?: UpdateCartHandler;
|
|
381
|
+
}
|
|
382
|
+
interface OpenCartConfiguration$1 {
|
|
383
|
+
readonly handler: OpenCartHandler;
|
|
384
|
+
}
|
|
385
|
+
declare const getCart$1: (payload?: GetCartPayload, options?: GetCartOptions) => Promise<GetCartResult>;
|
|
386
|
+
declare const updateCart$1: (payload: UpdateCartPayload, options?: UpdateCartOptions) => Promise<UpdateCartResult>;
|
|
387
|
+
declare const openCart$1: () => Promise<void>;
|
|
388
|
+
declare const isDefault$1: (action: ConfigurableActionName) => Promise<boolean>;
|
|
389
|
+
declare const configureUpdateCart$1: (config?: UpdateCartConfiguration$1) => Promise<Dispose>;
|
|
390
|
+
declare const configureOpenCart$1: (config: OpenCartConfiguration$1) => Promise<Dispose>;
|
|
58
391
|
export declare const parseResource: (gid: Resource.GID) => string | number;
|
|
59
392
|
export type FormatResourceOptions<T extends Resource.ID, R extends Resource.Type> = {
|
|
60
393
|
id: T;
|
|
@@ -65,11 +398,18 @@ type ID$1 = Resource.ID;
|
|
|
65
398
|
type GID$1 = Resource.GID;
|
|
66
399
|
type Type$1 = Resource.Type;
|
|
67
400
|
|
|
401
|
+
declare namespace Bridge {
|
|
402
|
+
export { fromPromiseThunk, toAsyncCallback, toSyncCallback };
|
|
403
|
+
}
|
|
68
404
|
declare namespace Resource {
|
|
69
405
|
export { GID, ID, Type, format, parse };
|
|
70
406
|
}
|
|
407
|
+
declare namespace Actions {
|
|
408
|
+
export { ActionConfigurationRejectedError, ActionInvocationError, ActionName, ActionsUnavailableError, ConfigurableActionName, Dispose, GetCartOptions, GetCartPayload, GetCartResult, OpenCartConfiguration$1 as OpenCartConfiguration, OpenCartHandler, UpdateCartConfiguration$1 as UpdateCartConfiguration, UpdateCartEventTargetMeta, UpdateCartHandler, UpdateCartOptions, UpdateCartPayload, UpdateCartResult, configureOpenCart$1 as configureOpenCart, configureUpdateCart$1 as configureUpdateCart, getCart$1 as getCart, isDefault$1 as isDefault, openCart$1 as openCart, updateCart$1 as updateCart };
|
|
409
|
+
}
|
|
71
410
|
|
|
72
411
|
export {
|
|
412
|
+
Actions,
|
|
73
413
|
GID$1 as GID,
|
|
74
414
|
ID$1 as ID,
|
|
75
415
|
Type$1 as Type,
|
package/dist/main/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { actions_exports } from "./actions.js";
|
|
2
|
+
import { formatResource, parseResource } from "./resources/index.js";
|
|
3
|
+
export { actions_exports as Actions, formatResource, parseResource };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { format, parse } from "../effect/Resource/data.js";
|
|
2
|
+
import "../effect/index.js";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
//#region src/resources/index.ts
|
|
5
|
+
var parseResource = (gid) => Effect.runSync(parse(gid));
|
|
6
|
+
var formatResource = (options) => Effect.runSync(format(options));
|
|
7
|
+
//#endregion
|
|
7
8
|
export { formatResource, parseResource };
|
|
8
|
-
|
|
9
|
+
|
|
9
10
|
//# sourceMappingURL=index.js.map
|