@cakemail-org/ui-components-v2 2.1.23 → 2.1.24

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.
@@ -2,5 +2,8 @@ import { TGenericListParams, TGenericListReturn } from "../../types/services";
2
2
  import { TTag } from "./types";
3
3
  export declare class TagsFactory {
4
4
  static list({ ...options }: TGenericListParams): Promise<TGenericListReturn<TTag>>;
5
+ static create({ tag }: {
6
+ tag: string;
7
+ }): Promise<TTag>;
5
8
  }
6
9
  export * from "./types";
package/dist/cjs/index.js CHANGED
@@ -17768,6 +17768,22 @@ function listTags(options) {
17768
17768
  });
17769
17769
  });
17770
17770
  }
17771
+ function CreateTag(_a) {
17772
+ return __awaiter(this, arguments, void 0, function (_b) {
17773
+ var tag = _b.tag;
17774
+ return __generator(this, function (_c) {
17775
+ return [2 /*return*/, callApi({
17776
+ url: uiKitConfig.GATEWAY_PROXY + "/tags",
17777
+ fetchOptions: {
17778
+ method: exports.EMethods.post,
17779
+ body: {
17780
+ tag: tag
17781
+ }
17782
+ }
17783
+ })];
17784
+ });
17785
+ });
17786
+ }
17771
17787
 
17772
17788
  var TagsFactory = /** @class */ (function () {
17773
17789
  function TagsFactory() {
@@ -17780,6 +17796,16 @@ var TagsFactory = /** @class */ (function () {
17780
17796
  });
17781
17797
  });
17782
17798
  };
17799
+ TagsFactory.create = function (_a) {
17800
+ return __awaiter(this, arguments, void 0, function (_b) {
17801
+ var tag = _b.tag;
17802
+ return __generator(this, function (_c) {
17803
+ return [2 /*return*/, CreateTag({ tag: tag }).then(function (data) {
17804
+ return data.data;
17805
+ })];
17806
+ });
17807
+ });
17808
+ };
17783
17809
  return TagsFactory;
17784
17810
  }());
17785
17811
 
@@ -1,3 +1,6 @@
1
1
  import { TTag } from "../../factories/tags";
2
- import { TGenericListParams, TGenericListReturn } from "../../types";
2
+ import { TCreateApiResource, TGenericListParams, TGenericListReturn } from "../../types";
3
3
  export declare function listTags(options: TGenericListParams): Promise<TGenericListReturn<TTag>>;
4
+ export declare function CreateTag({ tag }: {
5
+ tag: string;
6
+ }): Promise<TCreateApiResource<TTag>>;
@@ -2,5 +2,8 @@ import { TGenericListParams, TGenericListReturn } from "../../types/services";
2
2
  import { TTag } from "./types";
3
3
  export declare class TagsFactory {
4
4
  static list({ ...options }: TGenericListParams): Promise<TGenericListReturn<TTag>>;
5
+ static create({ tag }: {
6
+ tag: string;
7
+ }): Promise<TTag>;
5
8
  }
6
9
  export * from "./types";
package/dist/esm/index.js CHANGED
@@ -17748,6 +17748,22 @@ function listTags(options) {
17748
17748
  });
17749
17749
  });
17750
17750
  }
17751
+ function CreateTag(_a) {
17752
+ return __awaiter(this, arguments, void 0, function (_b) {
17753
+ var tag = _b.tag;
17754
+ return __generator(this, function (_c) {
17755
+ return [2 /*return*/, callApi({
17756
+ url: uiKitConfig.GATEWAY_PROXY + "/tags",
17757
+ fetchOptions: {
17758
+ method: EMethods.post,
17759
+ body: {
17760
+ tag: tag
17761
+ }
17762
+ }
17763
+ })];
17764
+ });
17765
+ });
17766
+ }
17751
17767
 
17752
17768
  var TagsFactory = /** @class */ (function () {
17753
17769
  function TagsFactory() {
@@ -17760,6 +17776,16 @@ var TagsFactory = /** @class */ (function () {
17760
17776
  });
17761
17777
  });
17762
17778
  };
17779
+ TagsFactory.create = function (_a) {
17780
+ return __awaiter(this, arguments, void 0, function (_b) {
17781
+ var tag = _b.tag;
17782
+ return __generator(this, function (_c) {
17783
+ return [2 /*return*/, CreateTag({ tag: tag }).then(function (data) {
17784
+ return data.data;
17785
+ })];
17786
+ });
17787
+ });
17788
+ };
17763
17789
  return TagsFactory;
17764
17790
  }());
17765
17791
 
@@ -1,3 +1,6 @@
1
1
  import { TTag } from "../../factories/tags";
2
- import { TGenericListParams, TGenericListReturn } from "../../types";
2
+ import { TCreateApiResource, TGenericListParams, TGenericListReturn } from "../../types";
3
3
  export declare function listTags(options: TGenericListParams): Promise<TGenericListReturn<TTag>>;
4
+ export declare function CreateTag({ tag }: {
5
+ tag: string;
6
+ }): Promise<TCreateApiResource<TTag>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cakemail-org/ui-components-v2",
3
- "version": "2.1.23",
3
+ "version": "2.1.24",
4
4
  "description": "ui library kit made with material UI",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",