@maxzima/wa-communicator 1.0.38 → 1.0.39

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,5 +1,5 @@
1
1
  {
2
- "version": "1.0.38",
2
+ "version": "1.0.39",
3
3
  "name": "@maxzima/wa-communicator",
4
4
  "description": "",
5
5
  "author": "Noname",
@@ -56,6 +56,18 @@ Object {
56
56
  }
57
57
  `;
58
58
 
59
+ exports[`Communicator requests getAssignedProducts 1`] = `
60
+ Object {
61
+ "headers": Object {
62
+ "Accept": "application/json, text/plain, */*",
63
+ "Authorization": "Bearer _accessToken_",
64
+ "Content-Type": "application/json",
65
+ },
66
+ "method": "GET",
67
+ "url": "https://google.com/assigned-products",
68
+ }
69
+ `;
70
+
59
71
  exports[`Communicator requests getCurrentUserProfile 1`] = `
60
72
  Object {
61
73
  "headers": Object {
@@ -82,6 +94,18 @@ Object {
82
94
  }
83
95
  `;
84
96
 
97
+ exports[`Communicator requests profileAssign 1`] = `
98
+ Object {
99
+ "headers": Object {
100
+ "Accept": "application/json, text/plain, */*",
101
+ "Authorization": "Bearer _accessToken_",
102
+ "Content-Type": "application/json",
103
+ },
104
+ "method": "POST",
105
+ "url": "https://google.com/users/profiles/test-profile-id-123/assign",
106
+ }
107
+ `;
108
+
85
109
  exports[`Communicator requests registration 1`] = `
86
110
  Object {
87
111
  "body": "{\\"name\\":\\"_companyName_\\",\\"country_code\\":\\"CAN\\",\\"source\\":{\\"hash\\":\\"_hash_\\",\\"device_type\\":\\"mobile\\",\\"ga_id\\":\\"_gaId_\\",\\"origin\\":\\"_origin_\\",\\"gc_id\\":\\"_gcId_\\",\\"utm_source\\":\\"_utmSource_\\",\\"utm_medium\\":\\"_utmMedium_\\",\\"utm_campaign\\":\\"_utmCampaign_\\",\\"utm_term\\":\\"_utmTerm_\\"}}",
@@ -16,6 +16,8 @@ import {
16
16
  verifyChallengeData,
17
17
  setStorageValuesData,
18
18
  getRestrictedCountriesData,
19
+ getAssignedProductsData,
20
+ profileAssignData,
19
21
  } from "./testunits/communicator/requests";
20
22
  import {communicatorTestData} from "./testunits/communicator/general";
21
23
 
@@ -114,4 +116,14 @@ describe('Communicator requests', () => {
114
116
  const getRestrictedCountriesRequestData = await communicator.getRestrictedCountries(getRestrictedCountriesData);
115
117
  expect(getRestrictedCountriesRequestData).toMatchSnapshot();
116
118
  });
119
+
120
+ test('getAssignedProducts', async () => {
121
+ const getAssignedProductsRequestData = await communicator.getAssignedProducts(getAssignedProductsData);
122
+ expect(getAssignedProductsRequestData).toMatchSnapshot();
123
+ });
124
+
125
+ test('profileAssign', async () => {
126
+ const profileAssignRequestData = await communicator.profileAssign(profileAssignData);
127
+ expect(profileAssignRequestData).toMatchSnapshot();
128
+ });
117
129
  });
@@ -10,6 +10,8 @@ import type {
10
10
  TSignUpByMobileRequestData,
11
11
  TStorageRequestData,
12
12
  TVerifyChallengeRequestData,
13
+ TGetAssignedProductsRequestData,
14
+ TProfileAssignRequestData,
13
15
  } from "../../../src/types";
14
16
  import {communicatorTestData} from "./general";
15
17
  import {CountryTypeEnum} from "../../../src/enums";
@@ -81,6 +83,15 @@ const getRestrictedCountriesData: TGetRestrictedCountriesData = {
81
83
  entityType: CountryTypeEnum.GLOBAL
82
84
  };
83
85
 
86
+ const getAssignedProductsData: TGetAssignedProductsRequestData = {
87
+ accessToken: communicatorTestData.accessToken,
88
+ };
89
+
90
+ const profileAssignData: TProfileAssignRequestData = {
91
+ accessToken: communicatorTestData.accessToken,
92
+ profileId: 'test-profile-id-123',
93
+ };
94
+
84
95
  export {
85
96
  signInData,
86
97
  signInByAppData,
@@ -93,4 +104,6 @@ export {
93
104
  registrationData,
94
105
  setStorageValuesData,
95
106
  getRestrictedCountriesData,
107
+ profileAssignData,
108
+ getAssignedProductsData
96
109
  };