@jsdev_ninja/core 0.8.31 → 0.8.33
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/index.html +1 -1
- package/lib/firebase-api/index.ts +31 -11
- package/lib/index.tsx +1 -0
- package/package.json +3 -3
package/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>Vite
|
|
7
|
+
<title>Vite check + TS</title>
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
10
10
|
<div id="root"></div>
|
|
@@ -1,13 +1,33 @@
|
|
|
1
|
-
const
|
|
2
|
-
products:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
export const collections = {
|
|
2
|
+
products: "products",
|
|
3
|
+
profiles: "profiles",
|
|
4
|
+
cart: "cart",
|
|
5
|
+
clients: "clients",
|
|
6
|
+
orders: "orders",
|
|
7
|
+
categories: "categories",
|
|
8
|
+
favorites: "favorites",
|
|
9
|
+
stores: "stores",
|
|
10
|
+
companies: "companies",
|
|
11
|
+
payments: "payments",
|
|
12
|
+
} as const;
|
|
13
|
+
|
|
14
|
+
export const FirestoreApi = {
|
|
15
|
+
getPath: ({
|
|
16
|
+
companyId,
|
|
17
|
+
storeId,
|
|
18
|
+
collectionName,
|
|
19
|
+
}: {
|
|
20
|
+
companyId: string;
|
|
21
|
+
storeId: string;
|
|
22
|
+
collectionName: string;
|
|
23
|
+
}) => {
|
|
24
|
+
return `${companyId}/${storeId}/${collectionName}`;
|
|
25
|
+
},
|
|
26
|
+
getProductsPath: ({ companyId, storeId }: { companyId: string; storeId: string }) => {
|
|
27
|
+
return FirestoreApi.getPath({ companyId, storeId, collectionName: collections.products });
|
|
28
|
+
},
|
|
11
29
|
};
|
|
12
30
|
|
|
13
|
-
export const FirebaseAPI = {
|
|
31
|
+
export const FirebaseAPI = {
|
|
32
|
+
firestore: FirestoreApi,
|
|
33
|
+
};
|
package/lib/index.tsx
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsdev_ninja/core",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.33",
|
|
4
4
|
"main": "dist/core.cjs.js",
|
|
5
5
|
"module": "dist/core.es.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"publish_core": "yarn publish --non-interactive"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"react": "^18.3.1",
|
|
19
|
-
"react-dom": "^18.3.1",
|
|
20
18
|
"zod": "^3.23.8"
|
|
21
19
|
},
|
|
22
20
|
"devDependencies": {
|
|
21
|
+
"react": "^18.3.1",
|
|
22
|
+
"react-dom": "^18.3.1",
|
|
23
23
|
"@eslint/js": "^9.9.0",
|
|
24
24
|
"@types/react": "^18.3.3",
|
|
25
25
|
"@types/react-dom": "^18.3.0",
|