@lookiero/checkout 1.2.0 → 1.2.1

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.
@@ -6,9 +6,9 @@ interface FetchHttpFunctionArgs {
6
6
  interface FetchHttpPostFunction {
7
7
  (args: FetchHttpFunctionArgs): HttpPostFunction;
8
8
  }
9
+ declare const fetchHttpPost: FetchHttpPostFunction;
9
10
  interface FetchHttpGetFunction {
10
11
  (args: FetchHttpFunctionArgs): HttpGetFunction;
11
12
  }
12
- declare const fetchHttpPost: FetchHttpPostFunction;
13
13
  declare const fetchHttpGet: FetchHttpGetFunction;
14
14
  export { fetchHttpGet, fetchHttpPost };
@@ -1,22 +1,22 @@
1
- interface HttpFunctionResult {
2
- readonly error: any;
3
- readonly success: (response: any) => any;
1
+ interface HttpFunctionResult<Response, Result> {
2
+ readonly error: Result;
3
+ readonly success: (response: Response) => Result;
4
4
  }
5
- interface HttpGetFunctionArgs {
5
+ interface HttpGetFunctionArgs<Response, Result> {
6
6
  readonly endpoint: string;
7
7
  readonly signal?: AbortSignal;
8
- readonly result?: HttpFunctionResult;
8
+ readonly result?: HttpFunctionResult<Response, Result>;
9
9
  }
10
10
  interface HttpGetFunction {
11
- (args: HttpGetFunctionArgs): Promise<any>;
11
+ <Response, Result = Response>(args: HttpGetFunctionArgs<Response, Result>): Promise<Result>;
12
12
  }
13
- interface HttpPostFunctionArgs {
13
+ interface HttpPostFunctionArgs<Response, Result> {
14
14
  readonly endpoint: string;
15
15
  readonly body: Record<string, unknown>;
16
16
  readonly signal?: AbortSignal;
17
- readonly result?: HttpFunctionResult;
17
+ readonly result?: HttpFunctionResult<Response, Result>;
18
18
  }
19
19
  interface HttpPostFunction {
20
- (args: HttpPostFunctionArgs): Promise<any>;
20
+ <Response = void, Result = Response>(args: HttpPostFunctionArgs<Response, Result>): Promise<Result>;
21
21
  }
22
22
  export type { HttpGetFunction, HttpPostFunction, HttpFunctionResult };
@@ -13,4 +13,5 @@ interface ToPricingProjectionFunction {
13
13
  (pricingDto: PricingDto): PricingProjection;
14
14
  }
15
15
  declare const toPricingProjection: ToPricingProjectionFunction;
16
+ export type { PricingDto };
16
17
  export { toPricingProjection };
@@ -21,5 +21,5 @@ interface ViewFirstAvailableCheckoutByCustomerIdHandlerFunctionArgs extends Quer
21
21
  readonly view: FirstAvailableCheckoutByCustomerIdView;
22
22
  }
23
23
  declare const viewFirstAvailableCheckoutByCustomerIdHandler: QueryHandlerFunction<ViewFirstAvailableCheckoutByCustomerId, ViewFirstAvailableCheckoutByCustomerIdResult, ViewFirstAvailableCheckoutByCustomerIdHandlerFunctionArgs>;
24
- export type { FirstAvailableCheckoutByCustomerIdView };
24
+ export type { FirstAvailableCheckoutByCustomerIdView, ViewFirstAvailableCheckoutByCustomerIdResult };
25
25
  export { VIEW_FIRST_AVAILABLE_CHECKOUT_BY_CUSTOMER_ID, viewFirstAvailableCheckoutByCustomerId, viewFirstAvailableCheckoutByCustomerIdHandler, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [