@suprsend/web-sdk 1.2.4 → 1.2.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suprsend/web-sdk",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "This is sdk used to integrate suprsend functionality in javascript applications",
5
5
  "main": "dist/cjs_bundle.js",
6
6
  "scripts": {
package/src/index.d.ts CHANGED
@@ -72,17 +72,17 @@ interface GetOverAllChannelPreferencesResponse extends PreferenceErrorData {
72
72
  interface Preferences {
73
73
  data: PreferenceData;
74
74
 
75
- get_preferences(args?: { brand_id?: string }): Promise<PreferencesResponse>;
75
+ get_preferences(args?: { tenant_id?: string }): Promise<PreferencesResponse>;
76
76
 
77
77
  get_categories(args?: {
78
- brand_id?: string;
78
+ tenant_id?: string;
79
79
  limit?: number;
80
80
  offset?: number;
81
81
  }): Promise<GetCategoriesResponse>;
82
82
 
83
83
  get_category(
84
84
  category: string,
85
- args?: { brand_id?: string }
85
+ args?: { tenant_id?: string }
86
86
  ): Promise<Category>;
87
87
 
88
88
  get_overall_channel_preferences(): Promise<GetOverAllChannelPreferencesResponse>;
@@ -91,7 +91,7 @@ interface Preferences {
91
91
  category: string,
92
92
  preference: PreferenceOptions,
93
93
  args?: {
94
- brand_id?: string;
94
+ tenant_id?: string;
95
95
  }
96
96
  ): PreferencesResponse;
97
97
 
@@ -100,7 +100,7 @@ interface Preferences {
100
100
  preference: PreferenceOptions,
101
101
  category: string,
102
102
  args?: {
103
- brand_id?: string;
103
+ tenant_id?: string;
104
104
  }
105
105
  ): PreferencesResponse;
106
106
 
@@ -181,7 +181,7 @@ class Preferences {
181
181
 
182
182
  async get_preferences(args = {}) {
183
183
  let url_path = "full_preference";
184
- let query_params = { brand_id: args?.brand_id };
184
+ let query_params = { tenant_id: args?.tenant_id };
185
185
 
186
186
  const response = await this._get_request(url_path, query_params);
187
187
  if (!response?.error) {
@@ -193,7 +193,7 @@ class Preferences {
193
193
  async get_categories(args = {}) {
194
194
  let url_path = "category";
195
195
  const query_params = {
196
- brand_id: args?.brand_id,
196
+ tenant_id: args?.tenant_id,
197
197
  limit: args?.limit,
198
198
  offset: args?.offset,
199
199
  };
@@ -211,7 +211,7 @@ class Preferences {
211
211
  }
212
212
 
213
213
  let url_path = `category/${category}`;
214
- let query_params = { brand_id: args?.brand_id };
214
+ let query_params = { tenant_id: args?.tenant_id };
215
215
 
216
216
  const response = await this._get_request(url_path, query_params);
217
217
  return response;
@@ -302,7 +302,7 @@ class Preferences {
302
302
  category,
303
303
  request_payload,
304
304
  category_data,
305
- { brand_id: args?.brand_id }
305
+ { tenant_id: args?.tenant_id }
306
306
  );
307
307
 
308
308
  return this.data;
@@ -413,7 +413,7 @@ class Preferences {
413
413
  category,
414
414
  request_payload,
415
415
  category_data,
416
- { brand_id: args?.brand_id }
416
+ { tenant_id: args?.tenant_id }
417
417
  );
418
418
 
419
419
  return this.data;