drapcode-developer-sdk 1.0.0 → 1.0.1-dev
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/README.md +77 -17
- package/build/index.d.ts +133 -10
- package/build/index.js +33 -16
- package/build/methods/methods.d.ts +132 -11
- package/build/methods/methods.js +211 -94
- package/build/utils/crypt.d.ts +2 -0
- package/build/utils/crypt.js +99 -0
- package/build/utils/index.d.ts +26 -0
- package/build/utils/index.js +112 -0
- package/package.json +13 -11
package/README.md
CHANGED
|
@@ -11,9 +11,14 @@ npm install drapcode-developer-sdk
|
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import { DrapcodeApis } from
|
|
14
|
+
import { DrapcodeApis } from "drapcode-developer-sdk";
|
|
15
15
|
|
|
16
|
-
const api = new DrapcodeApis(
|
|
16
|
+
const api = new DrapcodeApis(
|
|
17
|
+
project_seo_name,
|
|
18
|
+
xApiKey,
|
|
19
|
+
authorization,
|
|
20
|
+
environment
|
|
21
|
+
);
|
|
17
22
|
```
|
|
18
23
|
|
|
19
24
|
**project_seo_name (Required):** The SEO name of your Drapcode project.
|
|
@@ -22,18 +27,24 @@ const api = new DrapcodeApis(project_seo_name, xApiKey, authorization, environme
|
|
|
22
27
|
|
|
23
28
|
**authorization (Optional)**: Authorization token for authentication, if applicable.
|
|
24
29
|
|
|
25
|
-
**environment (Optional)**: The environment (PRODUCTION, PREVIEW,
|
|
26
|
-
|
|
30
|
+
**environment (Optional)**: The environment (PRODUCTION, PREVIEW, SANDBOX, UAT). Defaults to PRODUCTION if not provided.
|
|
31
|
+
|
|
32
|
+
### Example:
|
|
33
|
+
|
|
27
34
|
```
|
|
28
|
-
const drapcodeApi = new DrapcodeApis("
|
|
35
|
+
const drapcodeApi = new DrapcodeApis("test-project-7138",xApiKey, authorization, environment);
|
|
29
36
|
```
|
|
37
|
+
|
|
30
38
|
# Methods
|
|
31
39
|
|
|
32
40
|
## getAllItems(collectionName: string)
|
|
33
|
-
Retrieves all items from a specified collection.
|
|
34
41
|
|
|
35
|
-
|
|
36
|
-
|
|
42
|
+
Retrieves all items from a specified collection. The items will come under 'data' JSON path.
|
|
43
|
+
|
|
44
|
+
**collectionName:** The name of the collection to retrieve items from
|
|
45
|
+
|
|
46
|
+
### Example:
|
|
47
|
+
|
|
37
48
|
```
|
|
38
49
|
const items = await drapcodeApi.getAllItems("users");
|
|
39
50
|
```
|
|
@@ -41,17 +52,21 @@ const items = await drapcodeApi.getAllItems("users");
|
|
|
41
52
|
Retrieves items from the "users" collection.
|
|
42
53
|
|
|
43
54
|
## createItem(collectionName: string, body: JSON)
|
|
55
|
+
|
|
44
56
|
Creates a new item in the specified collection.
|
|
45
57
|
|
|
46
58
|
**collectionName:** The name of the collection to create the item in.
|
|
47
59
|
**body:** The data of the item to be created.
|
|
48
|
-
|
|
60
|
+
|
|
61
|
+
### Example:
|
|
62
|
+
|
|
49
63
|
```
|
|
50
64
|
await drapcodeApi.createItem("users", {
|
|
51
|
-
"name": "
|
|
52
|
-
"age":
|
|
65
|
+
"name": "John Doe",
|
|
66
|
+
"age": 25
|
|
53
67
|
});
|
|
54
68
|
```
|
|
69
|
+
|
|
55
70
|
Creates a new item in the "users" collection with the provided data.
|
|
56
71
|
|
|
57
72
|
## getItemsWithFilter(collectionName: string, filterUuid: string)
|
|
@@ -61,7 +76,8 @@ Retrieves items from a collection based on a filter UUID.
|
|
|
61
76
|
**collectionName:** The name of the collection to retrieve items from.
|
|
62
77
|
**filterUuid:** The UUID of the filter to apply.
|
|
63
78
|
|
|
64
|
-
### Example:
|
|
79
|
+
### Example:
|
|
80
|
+
|
|
65
81
|
```
|
|
66
82
|
const filteredItems = await drapcodeApi.getItemsWithFilter("users", "15263");
|
|
67
83
|
```
|
|
@@ -69,60 +85,104 @@ const filteredItems = await drapcodeApi.getItemsWithFilter("users", "15263");
|
|
|
69
85
|
Retrieves items from the "users" collection based on the filter UUID "15263".
|
|
70
86
|
|
|
71
87
|
## getItemsCountWithFilter(collectionName: string, filterUuid: string)
|
|
88
|
+
|
|
72
89
|
Retrieves the count of items from a collection based on a filter UUID.
|
|
73
90
|
|
|
74
91
|
**collectionName:** The name of the collection to retrieve items from.
|
|
75
92
|
**filterUuid:** The UUID of the filter to apply.
|
|
76
93
|
|
|
77
|
-
### Example:
|
|
94
|
+
### Example:
|
|
95
|
+
|
|
78
96
|
```
|
|
79
97
|
const itemCount = await drapcodeApi.getItemsCountWithFilter("users", "15263");
|
|
80
98
|
```
|
|
99
|
+
|
|
81
100
|
Retrieves the count of items from the "users" collection based on the filter UUID "15263".
|
|
82
101
|
|
|
83
102
|
## getItemWithUuid(collectionName: string, itemUuid: string)
|
|
103
|
+
|
|
84
104
|
Retrieves a specific item from a collection based on its UUID.
|
|
85
105
|
|
|
86
106
|
**collectionName:** The name of the collection to retrieve the item from.
|
|
87
107
|
**itemUuid:** The UUID of the item to retrieve.
|
|
88
|
-
|
|
108
|
+
|
|
109
|
+
### Example:
|
|
110
|
+
|
|
89
111
|
```
|
|
90
112
|
const item = await drapcodeApi.getItemWithUuid("users", "3487-383");
|
|
91
113
|
```
|
|
114
|
+
|
|
92
115
|
Retrieves a specific item from the "users" collection with the UUID "3487-383".
|
|
93
116
|
|
|
94
117
|
## updateItemWithUuid(collectionName: string, itemUuid: string, body: any)
|
|
118
|
+
|
|
95
119
|
Updates a specific item in a collection based on its UUID.
|
|
96
120
|
|
|
97
121
|
**collectionName:** The name of the collection containing the item.
|
|
98
122
|
**itemUuid:** The UUID of the item to update.
|
|
99
123
|
**body:** The updated data for the item.
|
|
100
|
-
|
|
124
|
+
|
|
125
|
+
### Example:
|
|
126
|
+
|
|
101
127
|
```
|
|
102
128
|
await drapcodeApi.updateItemWithUuid("users", "3487-383", {"name": "Drapcode"});
|
|
103
129
|
```
|
|
130
|
+
|
|
104
131
|
Updates the item in the "users" collection with the UUID "3487-383" with the provided data.
|
|
105
132
|
|
|
106
133
|
## deleteItemWithUuid(collectionName: string, itemUuid: string)
|
|
134
|
+
|
|
107
135
|
Deletes a specific item from a collection based on its UUID.
|
|
108
136
|
|
|
109
137
|
**collectionName:** The name of the collection containing the item.
|
|
110
138
|
**itemUuid:** The UUID of the item to delete.
|
|
111
|
-
|
|
139
|
+
|
|
140
|
+
### Example:
|
|
141
|
+
|
|
112
142
|
```
|
|
113
143
|
await drapcodeApi.deleteItemWithUuid("users", "3487-383");
|
|
114
144
|
```
|
|
145
|
+
|
|
115
146
|
Deletes the item with the UUID "3487-383" from the "users" collection.
|
|
116
147
|
|
|
117
148
|
## sendEmail(templateId: string, sendTo: string)
|
|
149
|
+
|
|
118
150
|
Sends an email using the specified email template ID.
|
|
119
151
|
|
|
120
152
|
**templateId:** The ID of the email template to use.
|
|
121
153
|
**sendTo:** The email address to send the email to.
|
|
122
|
-
|
|
154
|
+
|
|
155
|
+
### Example:
|
|
156
|
+
|
|
123
157
|
```
|
|
124
158
|
await drapcodeApi.sendEmail("345-678", "support@drapcode.com");
|
|
125
159
|
```
|
|
160
|
+
|
|
126
161
|
Sends an email using the template ID "345-678" to the email address "support@drapcode.com".
|
|
127
162
|
|
|
128
163
|
For better experience, utilize async/await syntax when using these methods.
|
|
164
|
+
|
|
165
|
+
## Encryption Related
|
|
166
|
+
|
|
167
|
+
We have two methods related to encryption.
|
|
168
|
+
|
|
169
|
+
1. encryptData
|
|
170
|
+
2. decryptData
|
|
171
|
+
|
|
172
|
+
### Encrypt Data
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
await encryptData(content, publicKey)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**content:** Content/Text you want to encrypt.
|
|
179
|
+
**publicKey:** Public key, which will be used to encrypt data.
|
|
180
|
+
|
|
181
|
+
### Decrypt Data
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
await decryptData(content, publicKey)
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**content:** Content/Text you want to decrypt.
|
|
188
|
+
**publicKey:** Public key, which was used to decrypt data.
|
package/build/index.d.ts
CHANGED
|
@@ -7,14 +7,137 @@ export declare class DrapcodeApis {
|
|
|
7
7
|
constructor(project_seo_name: string, xApiKey?: string, authorization?: string, environment?: string);
|
|
8
8
|
private getBaseUrl;
|
|
9
9
|
private getHeaders;
|
|
10
|
-
getAllItems(collectionName: string): Promise<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
getAllItems(collectionName: string, reqQuery: any): Promise<{
|
|
11
|
+
code: any;
|
|
12
|
+
success: boolean;
|
|
13
|
+
data: any;
|
|
14
|
+
error: string;
|
|
15
|
+
message: string;
|
|
16
|
+
} | {
|
|
17
|
+
code: any;
|
|
18
|
+
success: boolean;
|
|
19
|
+
error: any;
|
|
20
|
+
message: any;
|
|
21
|
+
data: string;
|
|
22
|
+
totalItems?: undefined;
|
|
23
|
+
totalPages?: undefined;
|
|
24
|
+
}>;
|
|
25
|
+
createItem(collectionName: string, body: any): Promise<{
|
|
26
|
+
success: boolean;
|
|
27
|
+
data: string;
|
|
28
|
+
error: string;
|
|
29
|
+
message: string;
|
|
30
|
+
code?: undefined;
|
|
31
|
+
} | {
|
|
32
|
+
code: any;
|
|
33
|
+
success: boolean;
|
|
34
|
+
data: any;
|
|
35
|
+
error: string;
|
|
36
|
+
message: any;
|
|
37
|
+
}>;
|
|
38
|
+
getItemsWithFilter(collectionName: string, filterUuid: string): Promise<{
|
|
39
|
+
code: any;
|
|
40
|
+
success: boolean;
|
|
41
|
+
data: any;
|
|
42
|
+
error: string;
|
|
43
|
+
message: string;
|
|
44
|
+
} | {
|
|
45
|
+
code: any;
|
|
46
|
+
success: boolean;
|
|
47
|
+
error: any;
|
|
48
|
+
message: any;
|
|
49
|
+
data: string;
|
|
50
|
+
totalItems?: undefined;
|
|
51
|
+
totalPages?: undefined;
|
|
52
|
+
}>;
|
|
53
|
+
getItemsCountWithFilter(collectionName: string, filterUuid: string): Promise<{
|
|
54
|
+
code: any;
|
|
55
|
+
success: boolean;
|
|
56
|
+
data: any;
|
|
57
|
+
error: string;
|
|
58
|
+
message: string;
|
|
59
|
+
} | {
|
|
60
|
+
code: any;
|
|
61
|
+
success: boolean;
|
|
62
|
+
error: any;
|
|
63
|
+
message: any;
|
|
64
|
+
data: string;
|
|
65
|
+
totalItems?: undefined;
|
|
66
|
+
totalPages?: undefined;
|
|
67
|
+
}>;
|
|
68
|
+
getItemWithUuid(collectionName: string, itemUuid: string): Promise<{
|
|
69
|
+
code: any;
|
|
70
|
+
success: boolean;
|
|
71
|
+
data: any;
|
|
72
|
+
error: string;
|
|
73
|
+
message: string;
|
|
74
|
+
} | {
|
|
75
|
+
code: any;
|
|
76
|
+
success: boolean;
|
|
77
|
+
error: any;
|
|
78
|
+
message: any;
|
|
79
|
+
data: string;
|
|
80
|
+
totalItems?: undefined;
|
|
81
|
+
totalPages?: undefined;
|
|
82
|
+
}>;
|
|
83
|
+
updateItemWithUuid(collectionName: string, itemUuid: string, body: any): Promise<{
|
|
84
|
+
code: any;
|
|
85
|
+
success: boolean;
|
|
86
|
+
data: any;
|
|
87
|
+
error: string;
|
|
88
|
+
message: string;
|
|
89
|
+
} | {
|
|
90
|
+
code: any;
|
|
91
|
+
success: boolean;
|
|
92
|
+
error: any;
|
|
93
|
+
message: any;
|
|
94
|
+
data: string;
|
|
95
|
+
totalItems?: undefined;
|
|
96
|
+
totalPages?: undefined;
|
|
97
|
+
}>;
|
|
98
|
+
deleteItemWithUuid(collectionName: string, itemUuid: string): Promise<{
|
|
99
|
+
code: any;
|
|
100
|
+
success: boolean;
|
|
101
|
+
data: any;
|
|
102
|
+
error: string;
|
|
103
|
+
message: string;
|
|
104
|
+
}>;
|
|
105
|
+
bulkDeleteItems(collectionName: string, body: any): Promise<{
|
|
106
|
+
code: any;
|
|
107
|
+
success: boolean;
|
|
108
|
+
data: any;
|
|
109
|
+
error: string;
|
|
110
|
+
message: string;
|
|
111
|
+
} | {
|
|
112
|
+
success: boolean;
|
|
113
|
+
data: any;
|
|
114
|
+
error: string;
|
|
115
|
+
message: string;
|
|
116
|
+
}>;
|
|
117
|
+
getItemsByids(collectionName: string, body: any): Promise<{
|
|
118
|
+
code: any;
|
|
119
|
+
success: boolean;
|
|
120
|
+
data: any;
|
|
121
|
+
error: string;
|
|
122
|
+
message: string;
|
|
123
|
+
} | {
|
|
124
|
+
success: boolean;
|
|
125
|
+
data: any;
|
|
126
|
+
error: string;
|
|
127
|
+
message: string;
|
|
128
|
+
}>;
|
|
129
|
+
sendEmail(templateId: string, sendTo: string): Promise<{
|
|
130
|
+
code: any;
|
|
131
|
+
success: boolean;
|
|
132
|
+
data: any;
|
|
133
|
+
error: string;
|
|
134
|
+
message: string;
|
|
135
|
+
} | {
|
|
136
|
+
success: boolean;
|
|
137
|
+
data: any;
|
|
138
|
+
error: string;
|
|
139
|
+
message: string;
|
|
140
|
+
}>;
|
|
20
141
|
}
|
|
142
|
+
export * from "./utils/index";
|
|
143
|
+
export * from "./utils/crypt";
|
package/build/index.js
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
17
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
18
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -42,44 +56,45 @@ var DrapcodeApis = /** @class */ (function () {
|
|
|
42
56
|
function DrapcodeApis(project_seo_name, xApiKey, authorization, environment) {
|
|
43
57
|
if (xApiKey === void 0) { xApiKey = ""; }
|
|
44
58
|
if (authorization === void 0) { authorization = ""; }
|
|
45
|
-
if (environment === void 0) { environment =
|
|
46
|
-
this.API_PATH =
|
|
59
|
+
if (environment === void 0) { environment = "PRODUCTION"; }
|
|
60
|
+
this.API_PATH = "webkonnect.site/api/v1/developer";
|
|
47
61
|
this.project_seo_name = project_seo_name;
|
|
48
62
|
this.xApiKey = xApiKey;
|
|
49
63
|
this.authorization = authorization;
|
|
50
64
|
this.environment = environment;
|
|
51
65
|
}
|
|
52
66
|
DrapcodeApis.prototype.getBaseUrl = function () {
|
|
53
|
-
switch (this.environment) {
|
|
54
|
-
case
|
|
67
|
+
switch (this.environment.toUpperCase()) {
|
|
68
|
+
case "PRODUCTION":
|
|
55
69
|
return "https://".concat(this.project_seo_name, ".api.").concat(this.API_PATH);
|
|
56
|
-
case
|
|
57
|
-
return "https://".concat(this.project_seo_name, ".preview.").concat(this.API_PATH);
|
|
58
|
-
case
|
|
59
|
-
return "https://".concat(this.project_seo_name, ".
|
|
60
|
-
case
|
|
61
|
-
return "https://".concat(this.project_seo_name, ".
|
|
70
|
+
case "PREVIEW":
|
|
71
|
+
return "https://".concat(this.project_seo_name, ".api.preview.").concat(this.API_PATH);
|
|
72
|
+
case "BETA":
|
|
73
|
+
return "https://".concat(this.project_seo_name, ".api.sandbox.").concat(this.API_PATH);
|
|
74
|
+
case "ALPHA":
|
|
75
|
+
return "https://".concat(this.project_seo_name, ".api.uat.").concat(this.API_PATH);
|
|
62
76
|
default:
|
|
63
77
|
return "https://".concat(this.project_seo_name, ".api.").concat(this.API_PATH);
|
|
64
78
|
}
|
|
65
79
|
};
|
|
66
80
|
DrapcodeApis.prototype.getHeaders = function () {
|
|
67
81
|
var headers = {
|
|
68
|
-
|
|
69
|
-
|
|
82
|
+
"Content-Type": "application/json",
|
|
83
|
+
Accept: "application/json",
|
|
70
84
|
};
|
|
71
85
|
if (this.xApiKey) {
|
|
72
|
-
headers[
|
|
86
|
+
headers["x-api-key"] = this.xApiKey;
|
|
73
87
|
}
|
|
74
88
|
if (this.authorization) {
|
|
75
|
-
headers[
|
|
89
|
+
headers["Authorization"] = this.authorization;
|
|
76
90
|
}
|
|
91
|
+
console.log("here is header", headers);
|
|
77
92
|
return headers;
|
|
78
93
|
};
|
|
79
|
-
DrapcodeApis.prototype.getAllItems = function (collectionName) {
|
|
94
|
+
DrapcodeApis.prototype.getAllItems = function (collectionName, reqQuery) {
|
|
80
95
|
return __awaiter(this, void 0, void 0, function () {
|
|
81
96
|
return __generator(this, function (_a) {
|
|
82
|
-
return [2 /*return*/, (0, methods_1.getAllItems)(this.getBaseUrl(), this.getHeaders(), collectionName)];
|
|
97
|
+
return [2 /*return*/, (0, methods_1.getAllItems)(this.getBaseUrl(), this.getHeaders(), collectionName, reqQuery)];
|
|
83
98
|
});
|
|
84
99
|
});
|
|
85
100
|
};
|
|
@@ -149,3 +164,5 @@ var DrapcodeApis = /** @class */ (function () {
|
|
|
149
164
|
return DrapcodeApis;
|
|
150
165
|
}());
|
|
151
166
|
exports.DrapcodeApis = DrapcodeApis;
|
|
167
|
+
__exportStar(require("./utils/index"), exports);
|
|
168
|
+
__exportStar(require("./utils/crypt"), exports);
|
|
@@ -1,13 +1,134 @@
|
|
|
1
|
-
export declare const getAllItems: (baseurl: string, headers: Record<string, string>, collectionName: string) => Promise<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
export declare const getAllItems: (baseurl: string, headers: Record<string, string>, collectionName: string, reqQuery: any) => Promise<{
|
|
2
|
+
code: any;
|
|
3
|
+
success: boolean;
|
|
4
|
+
data: any;
|
|
5
|
+
error: string;
|
|
6
|
+
message: string;
|
|
7
|
+
} | {
|
|
8
|
+
code: any;
|
|
9
|
+
success: boolean;
|
|
10
|
+
error: any;
|
|
11
|
+
message: any;
|
|
12
|
+
data: string;
|
|
13
|
+
totalItems?: undefined;
|
|
14
|
+
totalPages?: undefined;
|
|
15
|
+
}>;
|
|
16
|
+
export declare const createItem: (baseurl: string, headers: Record<string, string>, collectionName: string, body: any) => Promise<{
|
|
17
|
+
success: boolean;
|
|
18
|
+
data: string;
|
|
19
|
+
error: string;
|
|
20
|
+
message: string;
|
|
21
|
+
code?: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
code: any;
|
|
24
|
+
success: boolean;
|
|
25
|
+
data: any;
|
|
26
|
+
error: string;
|
|
27
|
+
message: any;
|
|
28
|
+
}>;
|
|
29
|
+
export declare const getItemsWithFilter: (baseurl: string, headers: Record<string, string>, collectionName: string, filterUuid: string) => Promise<{
|
|
30
|
+
code: any;
|
|
31
|
+
success: boolean;
|
|
32
|
+
data: any;
|
|
33
|
+
error: string;
|
|
34
|
+
message: string;
|
|
35
|
+
} | {
|
|
36
|
+
code: any;
|
|
37
|
+
success: boolean;
|
|
38
|
+
error: any;
|
|
39
|
+
message: any;
|
|
40
|
+
data: string;
|
|
41
|
+
totalItems?: undefined;
|
|
42
|
+
totalPages?: undefined;
|
|
43
|
+
}>;
|
|
44
|
+
export declare const getItemsCountWithFilter: (baseurl: string, headers: Record<string, string>, collectionName: string, filterUuid: string) => Promise<{
|
|
45
|
+
code: any;
|
|
46
|
+
success: boolean;
|
|
47
|
+
data: any;
|
|
48
|
+
error: string;
|
|
49
|
+
message: string;
|
|
50
|
+
} | {
|
|
51
|
+
code: any;
|
|
52
|
+
success: boolean;
|
|
53
|
+
error: any;
|
|
54
|
+
message: any;
|
|
55
|
+
data: string;
|
|
56
|
+
totalItems?: undefined;
|
|
57
|
+
totalPages?: undefined;
|
|
58
|
+
}>;
|
|
59
|
+
export declare const getItemWithUuid: (baseurl: string, headers: Record<string, string>, collectionName: string, itemUuid: string) => Promise<{
|
|
60
|
+
code: any;
|
|
61
|
+
success: boolean;
|
|
62
|
+
data: any;
|
|
63
|
+
error: string;
|
|
64
|
+
message: string;
|
|
65
|
+
} | {
|
|
66
|
+
code: any;
|
|
67
|
+
success: boolean;
|
|
68
|
+
error: any;
|
|
69
|
+
message: any;
|
|
70
|
+
data: string;
|
|
71
|
+
totalItems?: undefined;
|
|
72
|
+
totalPages?: undefined;
|
|
73
|
+
}>;
|
|
74
|
+
export declare const updateItemWithUuid: (baseurl: string, headers: Record<string, string>, collectionName: string, itemUuid: string, body: any) => Promise<{
|
|
75
|
+
code: any;
|
|
76
|
+
success: boolean;
|
|
77
|
+
data: any;
|
|
78
|
+
error: string;
|
|
79
|
+
message: string;
|
|
80
|
+
} | {
|
|
81
|
+
code: any;
|
|
82
|
+
success: boolean;
|
|
83
|
+
error: any;
|
|
84
|
+
message: any;
|
|
85
|
+
data: string;
|
|
86
|
+
totalItems?: undefined;
|
|
87
|
+
totalPages?: undefined;
|
|
88
|
+
}>;
|
|
89
|
+
export declare const deleteItemWithUuid: (baseurl: string, headers: Record<string, string>, collectionName: string, itemUuid: string) => Promise<{
|
|
90
|
+
code: any;
|
|
91
|
+
success: boolean;
|
|
92
|
+
data: any;
|
|
93
|
+
error: string;
|
|
94
|
+
message: string;
|
|
95
|
+
}>;
|
|
96
|
+
export declare const bulkDeleteItems: (baseurl: string, headers: Record<string, string>, collectionName: string, body: any) => Promise<{
|
|
97
|
+
code: any;
|
|
98
|
+
success: boolean;
|
|
99
|
+
data: any;
|
|
100
|
+
error: string;
|
|
101
|
+
message: string;
|
|
102
|
+
} | {
|
|
103
|
+
success: boolean;
|
|
104
|
+
data: any;
|
|
105
|
+
error: string;
|
|
106
|
+
message: string;
|
|
107
|
+
}>;
|
|
108
|
+
export declare const getItemsByids: (baseurl: string, headers: Record<string, string>, collectionName: string, body: any) => Promise<{
|
|
109
|
+
code: any;
|
|
110
|
+
success: boolean;
|
|
111
|
+
data: any;
|
|
112
|
+
error: string;
|
|
113
|
+
message: string;
|
|
114
|
+
} | {
|
|
115
|
+
success: boolean;
|
|
116
|
+
data: any;
|
|
117
|
+
error: string;
|
|
118
|
+
message: string;
|
|
119
|
+
}>;
|
|
120
|
+
export declare const sendEmail: (baseurl: string, headers: Record<string, string>, templateId: string, sendTo: any) => Promise<{
|
|
121
|
+
code: any;
|
|
122
|
+
success: boolean;
|
|
123
|
+
data: any;
|
|
124
|
+
error: string;
|
|
125
|
+
message: string;
|
|
126
|
+
} | {
|
|
127
|
+
success: boolean;
|
|
128
|
+
data: any;
|
|
129
|
+
error: string;
|
|
130
|
+
message: string;
|
|
131
|
+
}>;
|
|
11
132
|
/**
|
|
12
133
|
* {
|
|
13
134
|
* code,
|
|
@@ -16,4 +137,4 @@ export declare const sendEmail: (baseurl: string, headers: Record<string, string
|
|
|
16
137
|
* error,
|
|
17
138
|
* message,
|
|
18
139
|
* }
|
|
19
|
-
*/
|
|
140
|
+
*/
|