@brytdesigns/shopify-ajax-client 1.0.7 → 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.
@@ -1,9 +0,0 @@
1
- import * as Data from 'effect/Data';
2
-
3
- class AjaxClientResponse extends Data.Class {
4
- }
5
- const make = (data) => Data.case()(data);
6
-
7
- export { AjaxClientResponse, make };
8
- //# sourceMappingURL=AjaxClientResponse.js.map
9
- //# sourceMappingURL=AjaxClientResponse.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/AjaxClientResponse.ts"],"names":[],"mappings":";;AAuCO,MAAM,kBAAA,SAAwC,KAAK,KAExD,CAAA;AAAC;AASI,MAAM,OAAO,CAClB,IAAA,KACG,IAAK,CAAA,IAAA,GAAkC,IAAI","file":"AjaxClientResponse.js","sourcesContent":["import * as Data from \"effect/Data\";\n\n/**\n * Represents a response from an AJAX client.\n *\n * @template TData - The type of data expected in the response.\n */\ninterface IAjaxClientResponse<TData = any> {\n /**\n * The data received from the server.\n */\n data?: TData;\n\n /**\n * An error object if the request failed.\n */\n error?: {\n /**\n * The HTTP status code of the error response.\n */\n status: number;\n\n /**\n * A brief description of the error.\n */\n message: string;\n\n /**\n * A more detailed description of the error.\n */\n description?: string;\n };\n}\n\n/**\n * A class representing an AJAX client response.\n *\n * @template TData - The type of data expected in the response.\n */\nexport class AjaxClientResponse<TData = any> extends Data.Class<\n IAjaxClientResponse<TData>\n> {}\n\n/**\n * Creates an instance of AjaxClientResponse.\n *\n * @template TData - The type of data expected in the response.\n * @param data - The data to initialize the response with.\n * @returns An instance of AjaxClientResponse.\n */\nexport const make = <TData = undefined>(\n data: Parameters<ReturnType<typeof Data.case<AjaxClientResponse<TData>>>>[0]\n) => Data.case<AjaxClientResponse<TData>>()(data);\n"]}