arky-sdk 0.3.63 → 0.3.64
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.cjs +38 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.js +38 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -22,7 +22,19 @@ interface HttpClientConfig {
|
|
|
22
22
|
isAuthenticated?: () => boolean;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
interface ScanDataParams {
|
|
26
|
+
key: string;
|
|
27
|
+
}
|
|
28
|
+
interface PutDataParams {
|
|
29
|
+
key: string;
|
|
30
|
+
value: any;
|
|
31
|
+
oldKey?: string;
|
|
32
|
+
}
|
|
33
|
+
interface DeleteDataParams {
|
|
34
|
+
key: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare const SDK_VERSION = "0.3.64";
|
|
26
38
|
declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
|
|
27
39
|
interface ApiConfig {
|
|
28
40
|
httpClient: any;
|
|
@@ -154,6 +166,11 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
154
166
|
getProviders(params: GetProvidersParams, options?: RequestOptions): Promise<any>;
|
|
155
167
|
getProviderWorkingTime(params: GetBusinessServiceWorkingTimeParams, options?: RequestOptions): Promise<any>;
|
|
156
168
|
};
|
|
169
|
+
database: {
|
|
170
|
+
scanData(params: ScanDataParams, options?: RequestOptions): Promise<any[]>;
|
|
171
|
+
putData(params: PutDataParams, options?: RequestOptions): Promise<void>;
|
|
172
|
+
deleteData(params: DeleteDataParams, options?: RequestOptions): Promise<void>;
|
|
173
|
+
};
|
|
157
174
|
setBusinessId: (businessId: string) => void;
|
|
158
175
|
getBusinessId: () => string;
|
|
159
176
|
setMarket: (market: string) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -22,7 +22,19 @@ interface HttpClientConfig {
|
|
|
22
22
|
isAuthenticated?: () => boolean;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
interface ScanDataParams {
|
|
26
|
+
key: string;
|
|
27
|
+
}
|
|
28
|
+
interface PutDataParams {
|
|
29
|
+
key: string;
|
|
30
|
+
value: any;
|
|
31
|
+
oldKey?: string;
|
|
32
|
+
}
|
|
33
|
+
interface DeleteDataParams {
|
|
34
|
+
key: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare const SDK_VERSION = "0.3.64";
|
|
26
38
|
declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
|
|
27
39
|
interface ApiConfig {
|
|
28
40
|
httpClient: any;
|
|
@@ -154,6 +166,11 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
154
166
|
getProviders(params: GetProvidersParams, options?: RequestOptions): Promise<any>;
|
|
155
167
|
getProviderWorkingTime(params: GetBusinessServiceWorkingTimeParams, options?: RequestOptions): Promise<any>;
|
|
156
168
|
};
|
|
169
|
+
database: {
|
|
170
|
+
scanData(params: ScanDataParams, options?: RequestOptions): Promise<any[]>;
|
|
171
|
+
putData(params: PutDataParams, options?: RequestOptions): Promise<void>;
|
|
172
|
+
deleteData(params: DeleteDataParams, options?: RequestOptions): Promise<void>;
|
|
173
|
+
};
|
|
157
174
|
setBusinessId: (businessId: string) => void;
|
|
158
175
|
getBusinessId: () => string;
|
|
159
176
|
setMarket: (market: string) => void;
|
package/dist/index.js
CHANGED
|
@@ -1157,6 +1157,42 @@ var createReservationApi = (apiConfig) => {
|
|
|
1157
1157
|
};
|
|
1158
1158
|
};
|
|
1159
1159
|
|
|
1160
|
+
// src/api/database.ts
|
|
1161
|
+
var createDatabaseApi = (apiConfig) => {
|
|
1162
|
+
return {
|
|
1163
|
+
async scanData(params, options) {
|
|
1164
|
+
const response = await apiConfig.httpClient.get(
|
|
1165
|
+
`/v1/operations/data`,
|
|
1166
|
+
{
|
|
1167
|
+
...options,
|
|
1168
|
+
params: {
|
|
1169
|
+
key: params.key
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
);
|
|
1173
|
+
return response.value || [];
|
|
1174
|
+
},
|
|
1175
|
+
async putData(params, options) {
|
|
1176
|
+
return apiConfig.httpClient.post(
|
|
1177
|
+
`/v1/operations/data`,
|
|
1178
|
+
params,
|
|
1179
|
+
options
|
|
1180
|
+
);
|
|
1181
|
+
},
|
|
1182
|
+
async deleteData(params, options) {
|
|
1183
|
+
return apiConfig.httpClient.delete(
|
|
1184
|
+
`/v1/operations/data`,
|
|
1185
|
+
{
|
|
1186
|
+
...options,
|
|
1187
|
+
params: {
|
|
1188
|
+
key: params.key
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
);
|
|
1192
|
+
}
|
|
1193
|
+
};
|
|
1194
|
+
};
|
|
1195
|
+
|
|
1160
1196
|
// src/utils/currency.ts
|
|
1161
1197
|
function getCurrencySymbol(currency) {
|
|
1162
1198
|
const currencySymbols = {
|
|
@@ -1512,7 +1548,7 @@ async function injectSvgIntoElement(mediaObject, targetElement, className) {
|
|
|
1512
1548
|
}
|
|
1513
1549
|
|
|
1514
1550
|
// src/index.ts
|
|
1515
|
-
var SDK_VERSION = "0.3.
|
|
1551
|
+
var SDK_VERSION = "0.3.64";
|
|
1516
1552
|
var SUPPORTED_FRAMEWORKS = [
|
|
1517
1553
|
"astro",
|
|
1518
1554
|
"react",
|
|
@@ -1548,6 +1584,7 @@ function createArkySDK(config) {
|
|
|
1548
1584
|
cms: createCmsApi(apiConfig),
|
|
1549
1585
|
eshop: createEshopApi(apiConfig),
|
|
1550
1586
|
reservation: createReservationApi(apiConfig),
|
|
1587
|
+
database: createDatabaseApi(apiConfig),
|
|
1551
1588
|
setBusinessId: (businessId) => {
|
|
1552
1589
|
apiConfig.businessId = businessId;
|
|
1553
1590
|
},
|