@maxzima/wa-communicator 1.0.22 → 1.0.23
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/dist/engine/Communicator/Public/Communicator.js +5 -0
- package/dist/types/TCommunicator.d.ts +10 -0
- package/package.json +1 -1
- package/src/engine/Communicator/Public/Communicator.ts +5 -0
- package/src/types/TCommunicator.ts +10 -0
- package/test/__snapshots__/communicator.spec.ts.snap +1 -1
- package/test/testunits/communicator/general.ts +5 -0
- package/test/testunits/communicator/requests.ts +5 -0
|
@@ -141,6 +141,11 @@ export class Communicator {
|
|
|
141
141
|
device_type: data.deviceType,
|
|
142
142
|
ga_id: data.gaId,
|
|
143
143
|
origin: data.origin,
|
|
144
|
+
gc_id: data.gcId,
|
|
145
|
+
utm_source: data.utmSource,
|
|
146
|
+
utm_medium: data.utmMedium,
|
|
147
|
+
utm_campaign: data.utmCampaign,
|
|
148
|
+
utm_term: data.utmTerm,
|
|
144
149
|
} }));
|
|
145
150
|
return yield this.send({
|
|
146
151
|
method: 'POST',
|
|
@@ -103,6 +103,11 @@ declare type TRegistrationRequestBodySource = {
|
|
|
103
103
|
device_type: TRegistrationRequestBodySourceDeviceType;
|
|
104
104
|
ga_id: string;
|
|
105
105
|
origin: string;
|
|
106
|
+
gc_id: string;
|
|
107
|
+
utm_source: string;
|
|
108
|
+
utm_medium: string;
|
|
109
|
+
utm_campaign: string;
|
|
110
|
+
utm_term: string;
|
|
106
111
|
};
|
|
107
112
|
declare type TRegistrationRequestBody = {
|
|
108
113
|
name: string;
|
|
@@ -120,6 +125,11 @@ declare type TRegistrationRequestData = {
|
|
|
120
125
|
hash: TRegistrationRequestBodySource['hash'];
|
|
121
126
|
gaId: TRegistrationRequestBodySource['ga_id'];
|
|
122
127
|
origin: TRegistrationRequestBodySource['origin'];
|
|
128
|
+
gcId: TRegistrationRequestBodySource['gc_id'];
|
|
129
|
+
utmSource: TRegistrationRequestBodySource['utm_source'];
|
|
130
|
+
utmMedium: TRegistrationRequestBodySource['utm_medium'];
|
|
131
|
+
utmCampaign: TRegistrationRequestBodySource['utm_campaign'];
|
|
132
|
+
utmTerm: TRegistrationRequestBodySource['utm_term'];
|
|
123
133
|
};
|
|
124
134
|
declare type TStorageRequestData = {
|
|
125
135
|
accessToken: string;
|
package/package.json
CHANGED
|
@@ -137,6 +137,11 @@ export class Communicator {
|
|
|
137
137
|
device_type: data.deviceType,
|
|
138
138
|
ga_id: data.gaId,
|
|
139
139
|
origin: data.origin,
|
|
140
|
+
gc_id: data.gcId,
|
|
141
|
+
utm_source: data.utmSource,
|
|
142
|
+
utm_medium: data.utmMedium,
|
|
143
|
+
utm_campaign: data.utmCampaign,
|
|
144
|
+
utm_term: data.utmTerm,
|
|
140
145
|
}
|
|
141
146
|
});
|
|
142
147
|
|
|
@@ -147,6 +147,11 @@ type TRegistrationRequestBodySource = {
|
|
|
147
147
|
device_type: TRegistrationRequestBodySourceDeviceType,
|
|
148
148
|
ga_id: string,
|
|
149
149
|
origin: string,
|
|
150
|
+
gc_id: string,
|
|
151
|
+
utm_source: string,
|
|
152
|
+
utm_medium: string,
|
|
153
|
+
utm_campaign: string,
|
|
154
|
+
utm_term: string,
|
|
150
155
|
}
|
|
151
156
|
|
|
152
157
|
type TRegistrationRequestBody = {
|
|
@@ -167,6 +172,11 @@ type TRegistrationRequestData = {
|
|
|
167
172
|
hash: TRegistrationRequestBodySource['hash'],
|
|
168
173
|
gaId: TRegistrationRequestBodySource['ga_id'],
|
|
169
174
|
origin: TRegistrationRequestBodySource['origin'],
|
|
175
|
+
gcId: TRegistrationRequestBodySource['gc_id'],
|
|
176
|
+
utmSource: TRegistrationRequestBodySource['utm_source'],
|
|
177
|
+
utmMedium: TRegistrationRequestBodySource['utm_medium'],
|
|
178
|
+
utmCampaign: TRegistrationRequestBodySource['utm_campaign'],
|
|
179
|
+
utmTerm: TRegistrationRequestBodySource['utm_term'],
|
|
170
180
|
}
|
|
171
181
|
/* endregion registration */
|
|
172
182
|
|
|
@@ -84,7 +84,7 @@ Object {
|
|
|
84
84
|
|
|
85
85
|
exports[`Communicator requests registration 1`] = `
|
|
86
86
|
Object {
|
|
87
|
-
"body": "{\\"name\\":\\"_companyName_\\",\\"country_code\\":\\"CAN\\",\\"source\\":{\\"hash\\":\\"_hash_\\",\\"device_type\\":\\"mobile\\",\\"ga_id\\":\\"_gaId_\\",\\"origin\\":\\"_origin_\\"}}",
|
|
87
|
+
"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_\\"}}",
|
|
88
88
|
"headers": Object {
|
|
89
89
|
"Accept": "application/json, text/plain, */*",
|
|
90
90
|
"Authorization": "Bearer _accessToken_",
|
|
@@ -57,6 +57,11 @@ const registrationData: TRegistrationRequestData = {
|
|
|
57
57
|
hash: communicatorTestData.hash,
|
|
58
58
|
gaId: communicatorTestData.gaId,
|
|
59
59
|
origin: communicatorTestData.origin,
|
|
60
|
+
gcId: communicatorTestData.gcId,
|
|
61
|
+
utmSource: communicatorTestData.utmSource,
|
|
62
|
+
utmMedium: communicatorTestData.utmMedium,
|
|
63
|
+
utmCampaign: communicatorTestData.utmCampaign,
|
|
64
|
+
utmTerm: communicatorTestData.utmTerm,
|
|
60
65
|
};
|
|
61
66
|
|
|
62
67
|
const setStorageValuesData: TStorageRequestData = {
|