@swishapp/react 0.89.8 → 0.90.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/index.d.cts +7 -6
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +7 -6
- package/dist/index.d.mts.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
-
import { ApiError, ApiResponse, CreateItemSuccessResponse, DeleteItemSuccessResponse, EditItemListsSuccessResponse, EditItemVariantSuccessResponse, EventName, Intent, IntentResponse, IntentToData, Item, PageInfo, PaginatedApiResponse, SwishApp,
|
|
3
|
+
import { ApiError, ApiResponse, CreateItemSuccessResponse, DeleteItemSuccessResponse, EditItemListsSuccessResponse, EditItemVariantSuccessResponse, EventName, Intent, IntentResponse, IntentToData, Item, PageInfo, PaginatedApiResponse, SwishApp, SwishOptions } from "@swishapp/sdk";
|
|
4
4
|
import * as _swishapp_api_client0 from "@swishapp/api-client";
|
|
5
|
+
export * from "@swishapp/sdk";
|
|
5
6
|
|
|
6
7
|
//#region src/types.d.ts
|
|
7
8
|
interface SwishContextValue {
|
|
8
|
-
swish: SwishApp
|
|
9
|
+
swish: SwishApp | null;
|
|
9
10
|
isLoading: boolean;
|
|
10
11
|
error: Error | null;
|
|
11
12
|
}
|
|
@@ -13,7 +14,7 @@ interface SwishContextValue {
|
|
|
13
14
|
//#region src/context.d.ts
|
|
14
15
|
interface SwishProviderProps {
|
|
15
16
|
children: ReactNode;
|
|
16
|
-
options: SwishOptions
|
|
17
|
+
options: SwishOptions & {
|
|
17
18
|
swishSdkUrl?: string;
|
|
18
19
|
};
|
|
19
20
|
}
|
|
@@ -26,10 +27,10 @@ declare function SwishProvider({
|
|
|
26
27
|
}: SwishProviderProps): react_jsx_runtime0.JSX.Element;
|
|
27
28
|
//#endregion
|
|
28
29
|
//#region src/hooks/use-swish.d.ts
|
|
29
|
-
declare function useSwish(): SwishApp
|
|
30
|
+
declare function useSwish(): SwishApp | null;
|
|
30
31
|
//#endregion
|
|
31
32
|
//#region src/hooks/use-swish-query.d.ts
|
|
32
|
-
type FetchFn<TResponse, TVariables> = (swish: SwishApp
|
|
33
|
+
type FetchFn<TResponse, TVariables> = (swish: SwishApp["api"], variables?: TVariables) => Promise<TResponse>;
|
|
33
34
|
type DataOf<T> = T extends {
|
|
34
35
|
data: infer D;
|
|
35
36
|
} ? D : never;
|
|
@@ -115,5 +116,5 @@ declare const useSwishItemCount: () => {
|
|
|
115
116
|
error: _swishapp_api_client0.ApiError | null;
|
|
116
117
|
};
|
|
117
118
|
//#endregion
|
|
118
|
-
export {
|
|
119
|
+
export { SwishContextValue, SwishProvider, type SwishProviderProps, useSwish, useSwishIntent, useSwishItem, useSwishItemCount, useSwishItems, useSwishLists, useSwishQuery };
|
|
119
120
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/context.tsx","../src/hooks/use-swish.ts","../src/hooks/use-swish-query.ts","../src/hooks/use-swish-intent.ts","../src/hooks/use-swish-lists.ts","../src/hooks/use-swish-items.ts","../src/hooks/use-swish-item.ts","../src/hooks/use-swish-item-count.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/context.tsx","../src/hooks/use-swish.ts","../src/hooks/use-swish-query.ts","../src/hooks/use-swish-intent.ts","../src/hooks/use-swish-lists.ts","../src/hooks/use-swish-items.ts","../src/hooks/use-swish-item.ts","../src/hooks/use-swish-item-count.ts"],"sourcesContent":[],"mappings":";;;;;;;UAEiB,iBAAA;SACR;;SAEA;;;;UCKQ,kBAAA;YACL;WACD;;EDVM,CAAA;;iBCgBD,aAAA;;;;;;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
1
|
import { ReactNode } from "react";
|
|
2
2
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
-
import { ApiError, ApiResponse, CreateItemSuccessResponse, DeleteItemSuccessResponse, EditItemListsSuccessResponse, EditItemVariantSuccessResponse, EventName, Intent, IntentResponse, IntentToData, Item, PageInfo, PaginatedApiResponse, SwishApp,
|
|
3
|
+
import { ApiError, ApiResponse, CreateItemSuccessResponse, DeleteItemSuccessResponse, EditItemListsSuccessResponse, EditItemVariantSuccessResponse, EventName, Intent, IntentResponse, IntentToData, Item, PageInfo, PaginatedApiResponse, SwishApp, SwishOptions } from "@swishapp/sdk";
|
|
4
4
|
import * as _swishapp_api_client0 from "@swishapp/api-client";
|
|
5
|
+
export * from "@swishapp/sdk";
|
|
5
6
|
|
|
6
7
|
//#region src/types.d.ts
|
|
7
8
|
interface SwishContextValue {
|
|
8
|
-
swish: SwishApp
|
|
9
|
+
swish: SwishApp | null;
|
|
9
10
|
isLoading: boolean;
|
|
10
11
|
error: Error | null;
|
|
11
12
|
}
|
|
@@ -13,7 +14,7 @@ interface SwishContextValue {
|
|
|
13
14
|
//#region src/context.d.ts
|
|
14
15
|
interface SwishProviderProps {
|
|
15
16
|
children: ReactNode;
|
|
16
|
-
options: SwishOptions
|
|
17
|
+
options: SwishOptions & {
|
|
17
18
|
swishSdkUrl?: string;
|
|
18
19
|
};
|
|
19
20
|
}
|
|
@@ -26,10 +27,10 @@ declare function SwishProvider({
|
|
|
26
27
|
}: SwishProviderProps): react_jsx_runtime0.JSX.Element;
|
|
27
28
|
//#endregion
|
|
28
29
|
//#region src/hooks/use-swish.d.ts
|
|
29
|
-
declare function useSwish(): SwishApp
|
|
30
|
+
declare function useSwish(): SwishApp | null;
|
|
30
31
|
//#endregion
|
|
31
32
|
//#region src/hooks/use-swish-query.d.ts
|
|
32
|
-
type FetchFn<TResponse, TVariables> = (swish: SwishApp
|
|
33
|
+
type FetchFn<TResponse, TVariables> = (swish: SwishApp["api"], variables?: TVariables) => Promise<TResponse>;
|
|
33
34
|
type DataOf<T> = T extends {
|
|
34
35
|
data: infer D;
|
|
35
36
|
} ? D : never;
|
|
@@ -115,5 +116,5 @@ declare const useSwishItemCount: () => {
|
|
|
115
116
|
error: _swishapp_api_client0.ApiError | null;
|
|
116
117
|
};
|
|
117
118
|
//#endregion
|
|
118
|
-
export {
|
|
119
|
+
export { SwishContextValue, SwishProvider, type SwishProviderProps, useSwish, useSwishIntent, useSwishItem, useSwishItemCount, useSwishItems, useSwishLists, useSwishQuery };
|
|
119
120
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/types.ts","../src/context.tsx","../src/hooks/use-swish.ts","../src/hooks/use-swish-query.ts","../src/hooks/use-swish-intent.ts","../src/hooks/use-swish-lists.ts","../src/hooks/use-swish-items.ts","../src/hooks/use-swish-item.ts","../src/hooks/use-swish-item-count.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/types.ts","../src/context.tsx","../src/hooks/use-swish.ts","../src/hooks/use-swish-query.ts","../src/hooks/use-swish-intent.ts","../src/hooks/use-swish-lists.ts","../src/hooks/use-swish-items.ts","../src/hooks/use-swish-item.ts","../src/hooks/use-swish-item-count.ts"],"sourcesContent":[],"mappings":";;;;;;;UAEiB,iBAAA;SACR;;SAEA;;;;UCKQ,kBAAA;YACL;WACD;;EDVM,CAAA;;iBCgBD,aAAA;;;;;;GAMb,qBAAkB,kBAAA,CAAA,GAAA,CAAA;;;iBCpBL,QAAA,CAAA,GAAY;;;KCOhB,yCACH,6BACK,eACT,QAAQ;KAeR,YAAY;;IAA8B;cAElC,kCACO,mBAAmB,8CAG9B,QAAQ,WAAW;cAEZ;;EHnCC,OAAA,CAAA,EAAA,OAAA,GGqCO,SHrCU,EACzB;;;;ECOQ,KAAA,UAAA,GAAA,IAAkB;EAQnB,OAAA,EAAA,OAAa;EAC3B,KAAA,EAAA,GAAA,GAAA,IAAA;EAEE,OAAA,EAAA,GAAA,GAAA,IAAA;EAGD,UAAA,EAAA,OAAA;CAAkB;;;cGpBR,2BAA4B,SAAS,gBACxC,YACC,aAAa,sCAAsC,aAAa;gBAUpC,QAAQ,eAAe;;;;;cCTjD;;SAyBZ,qBAAA,CAAA,UAAA;SAAA,qBAAA,CAAA,QAAA;;AL9BD,CAAA;;;UMEiB,oBAAA;;;;cAKJ;;;IAGV;;;ENVc,QAAA,mCAGH,IAAA;;;;ECKG,QAAA,EAAA,GAAA,GAAA,IAAA;AAQjB,CAAA;;;UMPU,iBAAA;;;;kBAIQ;oBACE;yBACK;EPfR,eAAA,CAAA,EAAA,CAAA,IAAiB,EOgBP,8BPbb,CAAA,MAAA,CAAA,EAAA,GAAA,IAAA;;cOgBD;;;;;;;;GAQV;;ENnBc,OAAA,EAAA,OAAA;EAQD,KAAA,EMWI,qBAAA,CAAA,QAAA,GNXS,IAAA;EAC3B,IAAA,EAAA,GAAA,UAAA,CAAA,IAAA,CAAA;EAEE,MAAA,EAAA,GAAA,UAAA,CAAA,IAAA,CAAA;EAGD,WAAA,EAAA,GAAA,UAAA,CAAA,IAAA,CAAA;EAAkB,aAAA,EAAA,GAAA,UAAA,CAAA,IAAA,CAAA;EAAA,MAAA,EAAA,GAAA,UAAA,CAAA,IAAA,CAAA;;;;cOrBR;;;SAYZ,qBAAA,CAAA,QAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swishapp/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.90.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@swishapp/sdk": "^0.
|
|
47
|
+
"@swishapp/sdk": "^0.90.0",
|
|
48
48
|
"@types/react": "^19.2.6",
|
|
49
49
|
"@types/react-dom": "^19.2.3",
|
|
50
50
|
"@typescript-eslint/eslint-plugin": "^8.47.0",
|