drapcode-developer-sdk 1.0.13 → 1.0.15-preview

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/build/index.d.ts CHANGED
@@ -99,6 +99,7 @@ export declare class DrapcodeApis {
99
99
  addReferenceItem(collectionName: string, body: any): Promise<unknown>;
100
100
  getItemsByids(collectionName: string, body: any): Promise<unknown>;
101
101
  sendEmail(templateId: string, sendTo: string): Promise<unknown>;
102
+ aboutMe(body: any): Promise<unknown>;
102
103
  }
103
104
  export * from "./utils/index";
104
105
  export * from "./utils/crypt";
package/build/index.js CHANGED
@@ -177,9 +177,9 @@ var DrapcodeApis = /** @class */ (function () {
177
177
  DrapcodeApis.prototype.getBaseUrl = function () {
178
178
  var envSub = this.getEnvSubdomain();
179
179
  if (envSub) {
180
- return "".concat(this.protocol, "://").concat(this.seoName, ".api.").concat(envSub, ".").concat(this.API_PATH, "/v").concat(this.version, "/developer");
180
+ return "".concat(this.protocol, "://").concat(this.seoName, ".").concat(envSub, ".").concat(this.API_PATH, "/v").concat(this.version, "/developer");
181
181
  }
182
- return "".concat(this.protocol, "://").concat(this.seoName, ".api.").concat(this.API_PATH, "/v").concat(this.version, "/developer");
182
+ return "".concat(this.protocol, "://").concat(this.seoName, ".").concat(this.API_PATH, "/v").concat(this.version, "/developer");
183
183
  };
184
184
  DrapcodeApis.prototype.getHeaders = function () {
185
185
  var headers = {
@@ -352,6 +352,13 @@ var DrapcodeApis = /** @class */ (function () {
352
352
  });
353
353
  });
354
354
  };
355
+ DrapcodeApis.prototype.aboutMe = function (body) {
356
+ return __awaiter(this, void 0, void 0, function () {
357
+ return __generator(this, function (_a) {
358
+ return [2 /*return*/, this.callApi(methods_1.aboutMe, body)];
359
+ });
360
+ });
361
+ };
355
362
  return DrapcodeApis;
356
363
  }());
357
364
  exports.DrapcodeApis = DrapcodeApis;
@@ -72,3 +72,4 @@ export declare const deleteFieldItem: (baseurl: string, headers: Record<string,
72
72
  * EMAIL
73
73
  */
74
74
  export declare const sendEmail: (baseurl: string, headers: Record<string, string>, version: number, templateId: string, sendTo: any) => Promise<unknown>;
75
+ export declare const aboutMe: (baseurl: string, headers: Record<string, string>, version: number, body: any) => Promise<unknown>;
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  }
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.sendEmail = exports.deleteFieldItem = exports.clearItem = exports.deleteItemWithUuid = exports.updateItemWithUuid = exports.lastItem = exports.getItemWithUuid = exports.getItemsByids = exports.getAllItems = exports.getItemsCountWithFilter = exports.getItemsWithFilter = exports.createItem = exports.getItemOnly = exports.removeReferenceItem = exports.addReferenceItem = exports.bulkDeleteItems = exports.validateItem = exports.saveCSVData = exports.countItemByValue = exports.bulkCreateItems = void 0;
39
+ exports.aboutMe = exports.sendEmail = exports.deleteFieldItem = exports.clearItem = exports.deleteItemWithUuid = exports.updateItemWithUuid = exports.lastItem = exports.getItemWithUuid = exports.getItemsByids = exports.getAllItems = exports.getItemsCountWithFilter = exports.getItemsWithFilter = exports.createItem = exports.getItemOnly = exports.removeReferenceItem = exports.addReferenceItem = exports.bulkDeleteItems = exports.validateItem = exports.saveCSVData = exports.countItemByValue = exports.bulkCreateItems = void 0;
40
40
  var constants_1 = require("../utils/constants");
41
41
  var util_1 = require("../utils/util");
42
42
  var request = function (version, url, options, process) {
@@ -285,6 +285,10 @@ var getAllItems = function (baseurl, headers, version, collectionName, reqQuery,
285
285
  queryParams.append("sortField", reqQuery.sortField);
286
286
  if (reqQuery === null || reqQuery === void 0 ? void 0 : reqQuery.sortOrder)
287
287
  queryParams.append("sortOrder", reqQuery.sortOrder);
288
+ if (reqQuery === null || reqQuery === void 0 ? void 0 : reqQuery.includeFields)
289
+ queryParams.append("includeFields", reqQuery.includeFields);
290
+ if (reqQuery === null || reqQuery === void 0 ? void 0 : reqQuery.excludeFields)
291
+ queryParams.append("excludeFields", reqQuery.excludeFields);
288
292
  if (reqQuery === null || reqQuery === void 0 ? void 0 : reqQuery.searchTerm)
289
293
  queryParams.append("searchTerm", reqQuery.searchTerm);
290
294
  if (reqQuery === null || reqQuery === void 0 ? void 0 : reqQuery.isPagination) {
@@ -419,3 +423,15 @@ var sendEmail = function (baseurl, headers, version, templateId, sendTo) { retur
419
423
  });
420
424
  }); };
421
425
  exports.sendEmail = sendEmail;
426
+ var aboutMe = function (baseurl, headers, version, body) { return __awaiter(void 0, void 0, void 0, function () {
427
+ var url;
428
+ return __generator(this, function (_a) {
429
+ url = "".concat(baseurl, "/user/me");
430
+ return [2 /*return*/, request(version, url, {
431
+ method: "POST",
432
+ headers: headers,
433
+ body: JSON.stringify(body),
434
+ })];
435
+ });
436
+ }); };
437
+ exports.aboutMe = aboutMe;
@@ -22,4 +22,6 @@ export type SearchPaginate = {
22
22
  isPagination?: boolean;
23
23
  page?: number | string | any;
24
24
  limit?: number | string | any;
25
+ includeFields?: string | any;
26
+ excludeFields?: string | any;
25
27
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drapcode-developer-sdk",
3
- "version": "1.0.13",
3
+ "version": "1.0.15-preview",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "files": [