nextemos 5.0.34 → 5.0.35

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.
@@ -10,3 +10,10 @@ export interface IGetCampaignBadgesResponse extends IResponse {
10
10
  badgeUrl: string;
11
11
  }[];
12
12
  }
13
+ export interface IGetCampaignsResponse extends IResponse {
14
+ campaigns: {
15
+ id: number;
16
+ name: string;
17
+ explanation: string;
18
+ }[];
19
+ }
@@ -1,7 +1,13 @@
1
- import { IApiResponse, IGetCampaignBadgesResponse, IRequestBase, IRequestInit, IService } from "../..";
1
+ import { IApiResponse, IGetCampaignBadgesResponse, IGetCampaignsResponse, IRequestBase, IRequestInit, IService } from "../..";
2
2
  export interface IGetCampaignBadgesRequest extends IRequestBase {
3
3
  productIds: number[];
4
4
  }
5
+ export interface IGetCampaignsRequest extends IRequestBase {
6
+ id: number;
7
+ culture: string;
8
+ environmentPredicates: number[];
9
+ }
5
10
  export interface ICampaignService extends IService {
6
11
  GetCampaignBadges: (data: IGetCampaignBadgesRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCampaignBadgesResponse>>;
12
+ GetCampaigns: (data: IGetCampaignsRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCampaignsResponse>>;
7
13
  }
@@ -54,4 +54,7 @@ exports.CampaignService = {
54
54
  GetCampaignBadges: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
55
55
  return (0, __1.fetchRequest)().post(exports.CampaignService.Url(urls_1.default.Campaign.GetCampaignBadges, options, data === null || data === void 0 ? void 0 : data.language), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
56
56
  }),
57
+ GetCampaigns: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
58
+ return (0, __1.fetchRequest)().post(exports.CampaignService.Url(urls_1.default.Campaign.GetCampaigns, options, data === null || data === void 0 ? void 0 : data.language), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
59
+ }),
57
60
  };
@@ -138,6 +138,7 @@ declare const _default: {
138
138
  };
139
139
  Campaign: {
140
140
  GetCampaignBadges: string;
141
+ GetCampaigns: string;
141
142
  };
142
143
  };
143
144
  export default _default;
@@ -149,6 +149,7 @@ exports.default = {
149
149
  },
150
150
  Campaign: {
151
151
  GetCampaignBadges: "/{language}/CampaignGateway/v1/GetCampaignBadges",
152
+ GetCampaigns: "/{language}/CampaignGateway/v1/GetCampaigns",
152
153
  },
153
154
  };
154
155
  const getUrl = ({ isClient = false, language = DEFAULT_LANGUAGE || "tr", methodName, serviceUrl, prefix, id = "", }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextemos",
3
- "version": "5.0.34",
3
+ "version": "5.0.35",
4
4
  "description": "For helpers and hooks used in NextJS projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",