arky-sdk 0.3.63 → 0.3.65
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 +48 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -1
- package/dist/index.d.ts +30 -1
- package/dist/index.js +48 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -22,7 +22,28 @@ interface HttpClientConfig {
|
|
|
22
22
|
isAuthenticated?: () => boolean;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
interface RunScriptParams {
|
|
26
|
+
name: string;
|
|
27
|
+
value?: string;
|
|
28
|
+
}
|
|
29
|
+
interface RunScriptResponse {
|
|
30
|
+
success: boolean;
|
|
31
|
+
message: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface ScanDataParams {
|
|
35
|
+
key: string;
|
|
36
|
+
}
|
|
37
|
+
interface PutDataParams {
|
|
38
|
+
key: string;
|
|
39
|
+
value: any;
|
|
40
|
+
oldKey?: string;
|
|
41
|
+
}
|
|
42
|
+
interface DeleteDataParams {
|
|
43
|
+
key: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
declare const SDK_VERSION = "0.3.65";
|
|
26
47
|
declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
|
|
27
48
|
interface ApiConfig {
|
|
28
49
|
httpClient: any;
|
|
@@ -154,6 +175,14 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
154
175
|
getProviders(params: GetProvidersParams, options?: RequestOptions): Promise<any>;
|
|
155
176
|
getProviderWorkingTime(params: GetBusinessServiceWorkingTimeParams, options?: RequestOptions): Promise<any>;
|
|
156
177
|
};
|
|
178
|
+
database: {
|
|
179
|
+
scanData(params: ScanDataParams, options?: RequestOptions): Promise<any[]>;
|
|
180
|
+
putData(params: PutDataParams, options?: RequestOptions): Promise<void>;
|
|
181
|
+
deleteData(params: DeleteDataParams, options?: RequestOptions): Promise<void>;
|
|
182
|
+
};
|
|
183
|
+
scripts: {
|
|
184
|
+
runScript(params: RunScriptParams, options?: RequestOptions): Promise<RunScriptResponse>;
|
|
185
|
+
};
|
|
157
186
|
setBusinessId: (businessId: string) => void;
|
|
158
187
|
getBusinessId: () => string;
|
|
159
188
|
setMarket: (market: string) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -22,7 +22,28 @@ interface HttpClientConfig {
|
|
|
22
22
|
isAuthenticated?: () => boolean;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
interface RunScriptParams {
|
|
26
|
+
name: string;
|
|
27
|
+
value?: string;
|
|
28
|
+
}
|
|
29
|
+
interface RunScriptResponse {
|
|
30
|
+
success: boolean;
|
|
31
|
+
message: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface ScanDataParams {
|
|
35
|
+
key: string;
|
|
36
|
+
}
|
|
37
|
+
interface PutDataParams {
|
|
38
|
+
key: string;
|
|
39
|
+
value: any;
|
|
40
|
+
oldKey?: string;
|
|
41
|
+
}
|
|
42
|
+
interface DeleteDataParams {
|
|
43
|
+
key: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
declare const SDK_VERSION = "0.3.65";
|
|
26
47
|
declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
|
|
27
48
|
interface ApiConfig {
|
|
28
49
|
httpClient: any;
|
|
@@ -154,6 +175,14 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
154
175
|
getProviders(params: GetProvidersParams, options?: RequestOptions): Promise<any>;
|
|
155
176
|
getProviderWorkingTime(params: GetBusinessServiceWorkingTimeParams, options?: RequestOptions): Promise<any>;
|
|
156
177
|
};
|
|
178
|
+
database: {
|
|
179
|
+
scanData(params: ScanDataParams, options?: RequestOptions): Promise<any[]>;
|
|
180
|
+
putData(params: PutDataParams, options?: RequestOptions): Promise<void>;
|
|
181
|
+
deleteData(params: DeleteDataParams, options?: RequestOptions): Promise<void>;
|
|
182
|
+
};
|
|
183
|
+
scripts: {
|
|
184
|
+
runScript(params: RunScriptParams, options?: RequestOptions): Promise<RunScriptResponse>;
|
|
185
|
+
};
|
|
157
186
|
setBusinessId: (businessId: string) => void;
|
|
158
187
|
getBusinessId: () => string;
|
|
159
188
|
setMarket: (market: string) => void;
|
package/dist/index.js
CHANGED
|
@@ -1157,6 +1157,51 @@ 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
|
+
|
|
1196
|
+
// src/api/scripts.ts
|
|
1197
|
+
var createScriptsApi = (apiConfig) => {
|
|
1198
|
+
return {
|
|
1199
|
+
async runScript(params, options) {
|
|
1200
|
+
return apiConfig.httpClient.post(`/v1/operations/scripts`, params, options);
|
|
1201
|
+
}
|
|
1202
|
+
};
|
|
1203
|
+
};
|
|
1204
|
+
|
|
1160
1205
|
// src/utils/currency.ts
|
|
1161
1206
|
function getCurrencySymbol(currency) {
|
|
1162
1207
|
const currencySymbols = {
|
|
@@ -1512,7 +1557,7 @@ async function injectSvgIntoElement(mediaObject, targetElement, className) {
|
|
|
1512
1557
|
}
|
|
1513
1558
|
|
|
1514
1559
|
// src/index.ts
|
|
1515
|
-
var SDK_VERSION = "0.3.
|
|
1560
|
+
var SDK_VERSION = "0.3.65";
|
|
1516
1561
|
var SUPPORTED_FRAMEWORKS = [
|
|
1517
1562
|
"astro",
|
|
1518
1563
|
"react",
|
|
@@ -1548,6 +1593,8 @@ function createArkySDK(config) {
|
|
|
1548
1593
|
cms: createCmsApi(apiConfig),
|
|
1549
1594
|
eshop: createEshopApi(apiConfig),
|
|
1550
1595
|
reservation: createReservationApi(apiConfig),
|
|
1596
|
+
database: createDatabaseApi(apiConfig),
|
|
1597
|
+
scripts: createScriptsApi(apiConfig),
|
|
1551
1598
|
setBusinessId: (businessId) => {
|
|
1552
1599
|
apiConfig.businessId = businessId;
|
|
1553
1600
|
},
|