@qite/tide-client 1.1.31 → 1.1.33

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.
@@ -7,6 +7,7 @@ export declare const DataType: {
7
7
  enum: string;
8
8
  date: string;
9
9
  dateTime: string;
10
+ dateFrom: string;
10
11
  html: string;
11
12
  list: string;
12
13
  template: string;
@@ -1,4 +1,5 @@
1
1
  export interface TideClientConfig {
2
2
  host: string;
3
3
  apiKey: string;
4
+ token?: string;
4
5
  }
@@ -2,13 +2,13 @@ export declare const post: (
2
2
  url: string,
3
3
  apiKey: string,
4
4
  body: string,
5
+ token?: string | undefined,
5
6
  signal?: AbortSignal | undefined,
6
- languageCode?: string | undefined,
7
- token?: string | undefined
7
+ languageCode?: string | undefined
8
8
  ) => Promise<Response>;
9
9
  export declare const get: (
10
10
  url: string,
11
11
  apiKey: string,
12
- signal?: AbortSignal | undefined,
13
- token?: string | undefined
12
+ token?: string | undefined,
13
+ signal?: AbortSignal | undefined
14
14
  ) => Promise<Response>;
@@ -2,6 +2,7 @@ export declare const post: <T>(
2
2
  url: string,
3
3
  apiKey: string,
4
4
  body: string,
5
+ token?: string | undefined,
5
6
  signal?: AbortSignal | undefined,
6
7
  skipReviver?: boolean | undefined,
7
8
  languageCode?: string | undefined
@@ -9,7 +10,7 @@ export declare const post: <T>(
9
10
  export declare const get: <T>(
10
11
  url: string,
11
12
  apiKey: string,
13
+ token?: string | undefined,
12
14
  signal?: AbortSignal | undefined,
13
- skipReviver?: boolean | undefined,
14
- token?: string | undefined
15
+ skipReviver?: boolean | undefined
15
16
  ) => Promise<T>;
@@ -2,6 +2,7 @@ import {
2
2
  AgentInvoiceItem,
3
3
  AgentPrintAction,
4
4
  AgentPrintActionRequest,
5
+ Column,
5
6
  CustomEntryStatusItem,
6
7
  DossierViewResult,
7
8
  EntryTotals,
@@ -33,25 +34,24 @@ export declare const getPrintActions: (
33
34
  export declare const print: (
34
35
  config: TideClientConfig,
35
36
  request: AgentPrintActionRequest,
36
- signal?: AbortSignal | undefined,
37
- token?: string | undefined
37
+ signal?: AbortSignal | undefined
38
38
  ) => Promise<Response>;
39
39
  export declare const getEntryList: (
40
40
  config: TideClientConfig,
41
41
  filterItem: FilterItem,
42
- token: string,
42
+ gridColumns?: Column[] | undefined,
43
43
  signal?: AbortSignal | undefined
44
44
  ) => Promise<PageResult<DossierViewResult>>;
45
45
  export declare const getEntryTotals: (
46
46
  config: TideClientConfig,
47
47
  filterItem: FilterItem,
48
- token: string,
48
+ gridColumns?: Column[] | undefined,
49
49
  signal?: AbortSignal | undefined
50
50
  ) => Promise<EntryTotals>;
51
51
  export declare const getInvoiceList: (
52
52
  config: TideClientConfig,
53
53
  filterItem: FilterItem,
54
- token: string,
54
+ gridColumns?: Column[] | undefined,
55
55
  signal?: AbortSignal | undefined
56
56
  ) => Promise<PageResult<AgentInvoiceItem>>;
57
57
  export declare const getCustomEntryStatus: (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qite/tide-client",
3
- "version": "1.1.31",
3
+ "version": "1.1.33",
4
4
  "description": "Frontend client for Tide",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -91,7 +91,7 @@ const getColumnFilter = (
91
91
 
92
92
  case DataType.date:
93
93
  case DataType.dateTime:
94
- const fromDate = new Date(
94
+ const startDate = new Date(
95
95
  columnValue.year,
96
96
  columnValue.month - 1,
97
97
  columnValue.day
@@ -102,8 +102,19 @@ const getColumnFilter = (
102
102
  columnValue.day + 1
103
103
  );
104
104
 
105
- if (isValidDate(fromDate) && isValidDate(tillDate)) {
106
- return `${columnName} ge ${fromDate.toISOString()} and ${columnName} le ${tillDate.toISOString()}`;
105
+ if (isValidDate(startDate) && isValidDate(tillDate)) {
106
+ return `${columnName} ge ${startDate.toISOString()} and ${columnName} le ${tillDate.toISOString()}`;
107
+ }
108
+ return "";
109
+ case DataType.dateFrom:
110
+ const fromDate = new Date(
111
+ columnValue.year,
112
+ columnValue.month - 1,
113
+ columnValue.day
114
+ );
115
+
116
+ if (isValidDate(fromDate)) {
117
+ return `${columnName} ge ${fromDate.toISOString()}`;
107
118
  }
108
119
  return "";
109
120
  case DataType.list:
@@ -7,6 +7,7 @@ export const DataType = {
7
7
  enum: "enum",
8
8
  date: "date",
9
9
  dateTime: "datetime",
10
+ dateFrom: "dateFrom",
10
11
  html: "html",
11
12
  list: "list",
12
13
  template: "template",
@@ -1,4 +1,5 @@
1
1
  export interface TideClientConfig {
2
2
  host: string;
3
3
  apiKey: string;
4
+ token?: string;
4
5
  }
package/src/utils/api.ts CHANGED
@@ -2,9 +2,9 @@ export const post = async (
2
2
  url: string,
3
3
  apiKey: string,
4
4
  body: string,
5
+ token?: string,
5
6
  signal?: AbortSignal,
6
- languageCode?: string,
7
- token?: string
7
+ languageCode?: string
8
8
  ): Promise<Response> => {
9
9
  const response = await fetch(url, {
10
10
  method: "POST",
@@ -12,7 +12,7 @@ export const post = async (
12
12
  "Content-Type": "application/json",
13
13
  "Api-Key": apiKey,
14
14
  Language: languageCode || "nl-BE",
15
- Authorization: !token ? `Bearer ${token}` : "",
15
+ Authorization: token ? `Bearer ${token}` : "",
16
16
  },
17
17
  credentials: "include",
18
18
  body,
@@ -29,15 +29,15 @@ export const post = async (
29
29
  export const get = async (
30
30
  url: string,
31
31
  apiKey: string,
32
- signal?: AbortSignal,
33
- token?: string
32
+ token?: string,
33
+ signal?: AbortSignal
34
34
  ): Promise<Response> => {
35
35
  const response = await fetch(url, {
36
36
  method: "GET",
37
37
  headers: {
38
38
  "Content-Type": "application/json",
39
39
  "Api-Key": apiKey,
40
- Authorization: !token ? `Bearer ${token}` : "",
40
+ Authorization: token ? `Bearer ${token}` : "",
41
41
  },
42
42
  credentials: "include",
43
43
  signal,
@@ -45,7 +45,7 @@ export const getAvailableProducts = (
45
45
  const apiKey = config.apiKey;
46
46
  const body = JSON.stringify(request);
47
47
 
48
- return post(url, apiKey, body, signal);
48
+ return post(url, apiKey, body, config.token, signal);
49
49
  };
50
50
 
51
51
  /**
@@ -64,7 +64,7 @@ export const searchPackages = (
64
64
  const apiKey = config.apiKey;
65
65
  const body = JSON.stringify(request);
66
66
 
67
- return post(url, apiKey, body, signal);
67
+ return post(url, apiKey, body, config.token, signal);
68
68
  };
69
69
 
70
70
  /**
@@ -83,7 +83,7 @@ export const getPackagePriceDetails = (
83
83
  const apiKey = config.apiKey;
84
84
  const body = JSON.stringify(request);
85
85
 
86
- return post(url, apiKey, body, signal);
86
+ return post(url, apiKey, body, config.token, signal);
87
87
  };
88
88
 
89
89
  /**
@@ -106,7 +106,7 @@ export const createOffer = (
106
106
  const apiKey = config.apiKey;
107
107
  const body = JSON.stringify(request);
108
108
 
109
- return post(url, apiKey, body, signal);
109
+ return post(url, apiKey, body, config.token, signal);
110
110
  };
111
111
 
112
112
  /**
@@ -129,7 +129,7 @@ export const createOfferWithShortResponse = (
129
129
  const apiKey = config.apiKey;
130
130
  const body = JSON.stringify(request, replacer);
131
131
 
132
- return post(url, apiKey, body, signal);
132
+ return post(url, apiKey, body, config.token, signal);
133
133
  };
134
134
 
135
135
  /**
@@ -152,7 +152,7 @@ export const createEntry = (
152
152
  const apiKey = config.apiKey;
153
153
  const body = JSON.stringify(request, replacer);
154
154
 
155
- return post(url, apiKey, body, signal);
155
+ return post(url, apiKey, body, config.token, signal);
156
156
  };
157
157
 
158
158
  /**
@@ -175,7 +175,7 @@ export const createEntryWithShortResponse = (
175
175
  const apiKey = config.apiKey;
176
176
  const body = JSON.stringify(request, replacer);
177
177
 
178
- return post(url, apiKey, body, signal);
178
+ return post(url, apiKey, body, config.token, signal);
179
179
  };
180
180
 
181
181
  /**
@@ -198,7 +198,7 @@ export const createPackageOffer = (
198
198
  const apiKey = config.apiKey;
199
199
  const body = JSON.stringify(request, replacer);
200
200
 
201
- return post(url, apiKey, body, signal);
201
+ return post(url, apiKey, body, config.token, signal);
202
202
  };
203
203
 
204
204
  /**
@@ -221,7 +221,7 @@ export const createPackageOfferWithShortResponse = (
221
221
  const apiKey = config.apiKey;
222
222
  const body = JSON.stringify(request, replacer);
223
223
 
224
- return post(url, apiKey, body, signal);
224
+ return post(url, apiKey, body, config.token, signal);
225
225
  };
226
226
 
227
227
  /**
@@ -244,7 +244,7 @@ export const createPackageEntry = (
244
244
  const apiKey = config.apiKey;
245
245
  const body = JSON.stringify(request, replacer);
246
246
 
247
- return post(url, apiKey, body, signal);
247
+ return post(url, apiKey, body, config.token, signal);
248
248
  };
249
249
 
250
250
  /**
@@ -267,7 +267,7 @@ export const createPackageEntryWithShortResponse = (
267
267
  const apiKey = config.apiKey;
268
268
  const body = JSON.stringify(request, replacer);
269
269
 
270
- return post(url, apiKey, body, signal);
270
+ return post(url, apiKey, body, config.token, signal);
271
271
  };
272
272
 
273
273
  /**
@@ -287,7 +287,7 @@ export const getBasePrices = (
287
287
  const apiKey = config.apiKey;
288
288
  const body = JSON.stringify(request, replacer);
289
289
 
290
- return post(url, apiKey, body, signal);
290
+ return post(url, apiKey, body, config.token, signal);
291
291
  };
292
292
 
293
293
  /**
@@ -306,5 +306,5 @@ export const getBasePricesFromDate = (
306
306
  const apiKey = config.apiKey;
307
307
  const body = JSON.stringify(request, replacer);
308
308
 
309
- return post(url, apiKey, body, signal);
309
+ return post(url, apiKey, body, config.token, signal);
310
310
  };
@@ -51,7 +51,7 @@ export const readPackageSearchList = (
51
51
  const apiKey = config.apiKey;
52
52
  const body = JSON.stringify(request);
53
53
 
54
- return post(url, apiKey, body, signal);
54
+ return post(url, apiKey, body, config.token, signal);
55
55
  };
56
56
 
57
57
  // PACKAGE SEARCH
@@ -64,7 +64,7 @@ export const search = (
64
64
  const apiKey = config.apiKey;
65
65
  const body = JSON.stringify(request);
66
66
 
67
- return post(url, apiKey, body, signal, true);
67
+ return post(url, apiKey, body, config.token, signal, true);
68
68
  };
69
69
 
70
70
  export const details = (
@@ -77,7 +77,7 @@ export const details = (
77
77
  const apiKey = config.apiKey;
78
78
  const body = JSON.stringify(request);
79
79
 
80
- return post(url, apiKey, body, signal, true, languageCode);
80
+ return post(url, apiKey, body, config.token, signal, true, languageCode);
81
81
  };
82
82
 
83
83
  export const validateVoucher = (
@@ -89,7 +89,7 @@ export const validateVoucher = (
89
89
  const apiKey = config.apiKey;
90
90
  const body = JSON.stringify(request);
91
91
 
92
- return post(url, apiKey, body, signal, true);
92
+ return post(url, apiKey, body, config.token, signal, true);
93
93
  };
94
94
 
95
95
  export const alternateHotels = (
@@ -100,7 +100,7 @@ export const alternateHotels = (
100
100
  const url = `${config.host}${ENDPOINT_DETAILS}/${transactionId}${ENDPOINT_ALTERNATE_HOTELS}`;
101
101
  const apiKey = config.apiKey;
102
102
 
103
- return get(url, apiKey, signal, true);
103
+ return get(url, apiKey, config.token, signal, true);
104
104
  };
105
105
 
106
106
  export const alternateFlights = (
@@ -111,7 +111,7 @@ export const alternateFlights = (
111
111
  const url = `${config.host}${ENDPOINT_DETAILS}/${transactionId}${ENDPOINT_ALTERNATE_FLIGHTS}`;
112
112
  const apiKey = config.apiKey;
113
113
 
114
- return get(url, apiKey, signal, true);
114
+ return get(url, apiKey, config.token, signal, true);
115
115
  };
116
116
 
117
117
  export const priceDetails = (
@@ -124,7 +124,7 @@ export const priceDetails = (
124
124
  const apiKey = config.apiKey;
125
125
  const body = JSON.stringify(request);
126
126
 
127
- return post(url, apiKey, body, signal, true, languageCode);
127
+ return post(url, apiKey, body, config.token, signal, true, languageCode);
128
128
  };
129
129
 
130
130
  export const book = (
@@ -137,7 +137,7 @@ export const book = (
137
137
  const apiKey = config.apiKey;
138
138
  const body = JSON.stringify(request);
139
139
 
140
- return post(url, apiKey, body, signal, true, languageCode);
140
+ return post(url, apiKey, body, config.token, signal, true, languageCode);
141
141
  };
142
142
 
143
143
  export const update = (
@@ -149,7 +149,7 @@ export const update = (
149
149
  const apiKey = config.apiKey;
150
150
  const body = JSON.stringify(request);
151
151
 
152
- return post(url, apiKey, body, signal, true);
152
+ return post(url, apiKey, body, config.token, signal, true);
153
153
  };
154
154
 
155
155
  export const agents = (
@@ -159,7 +159,7 @@ export const agents = (
159
159
  const url = `${config.host}${ENDPOINT_AGENTS}`;
160
160
  const apiKey = config.apiKey;
161
161
 
162
- return get(url, apiKey, signal, true);
162
+ return get(url, apiKey, config.token, signal, true);
163
163
  };
164
164
 
165
165
  export const getAllotmentAvailability = (
@@ -171,7 +171,7 @@ export const getAllotmentAvailability = (
171
171
  const url = `${config.host}${ENDPOINT_AVAILABLE_ALLOTMENTS}/${eventId}/${productCode}`;
172
172
  const apiKey = config.apiKey;
173
173
 
174
- return get(url, apiKey, signal, true);
174
+ return get(url, apiKey, config.token, signal, true);
175
175
  };
176
176
 
177
177
  export const searchFlightPool = (
@@ -183,7 +183,7 @@ export const searchFlightPool = (
183
183
  const apiKey = config.apiKey;
184
184
  const body = JSON.stringify(request);
185
185
 
186
- return post(url, apiKey, body, signal, true);
186
+ return post(url, apiKey, body, config.token, signal, true);
187
187
  };
188
188
 
189
189
  export const bookableDates = (
@@ -195,7 +195,7 @@ export const bookableDates = (
195
195
  const apiKey = config.apiKey;
196
196
  const body = JSON.stringify(request);
197
197
 
198
- return post(url, apiKey, body, signal, true);
198
+ return post(url, apiKey, body, config.token, signal, true);
199
199
  };
200
200
 
201
201
  export const tourCodes = (
@@ -207,5 +207,5 @@ export const tourCodes = (
207
207
  const apiKey = config.apiKey;
208
208
  const body = JSON.stringify(request);
209
209
 
210
- return post(url, apiKey, body, signal, true);
210
+ return post(url, apiKey, body, config.token, signal, true);
211
211
  };
@@ -5,11 +5,19 @@ export const post = async <T>(
5
5
  url: string,
6
6
  apiKey: string,
7
7
  body: string,
8
+ token?: string,
8
9
  signal?: AbortSignal,
9
10
  skipReviver?: boolean,
10
11
  languageCode?: string
11
12
  ): Promise<T> => {
12
- const response = await apiPost(url, apiKey, body, signal, languageCode);
13
+ const response = await apiPost(
14
+ url,
15
+ apiKey,
16
+ body,
17
+ token,
18
+ signal,
19
+ languageCode
20
+ );
13
21
  const responseBody = await response.text();
14
22
 
15
23
  const result: T = skipReviver
@@ -21,11 +29,11 @@ export const post = async <T>(
21
29
  export const get = async <T>(
22
30
  url: string,
23
31
  apiKey: string,
32
+ token?: string,
24
33
  signal?: AbortSignal,
25
- skipReviver?: boolean,
26
- token?: string
34
+ skipReviver?: boolean
27
35
  ): Promise<T> => {
28
- const response = await apiGet(url, apiKey, signal, token);
36
+ const response = await apiGet(url, apiKey, token, signal);
29
37
  const responseBody = await response.text();
30
38
 
31
39
  const result: T = skipReviver
@@ -25,7 +25,7 @@ export const login = (
25
25
  const apiKey = config.apiKey;
26
26
  const body = JSON.stringify(request);
27
27
 
28
- return post(url, apiKey, body, signal);
28
+ return post(url, apiKey, body, config.token, signal);
29
29
  };
30
30
 
31
31
  export const logout = (
@@ -36,7 +36,7 @@ export const logout = (
36
36
  const apiKey = config.apiKey;
37
37
  const body = "";
38
38
 
39
- return apiPost(url, apiKey, body, signal);
39
+ return apiPost(url, apiKey, body, config.token, signal);
40
40
  };
41
41
 
42
42
  export const confirm = (
@@ -48,7 +48,7 @@ export const confirm = (
48
48
  const apiKey = config.apiKey;
49
49
  const body = JSON.stringify(request);
50
50
 
51
- return apiPost(url, apiKey, body, signal);
51
+ return apiPost(url, apiKey, body, config.token, signal);
52
52
  };
53
53
 
54
54
  export const forgotPassword = (
@@ -60,7 +60,7 @@ export const forgotPassword = (
60
60
  const apiKey = config.apiKey;
61
61
  const body = JSON.stringify(request);
62
62
 
63
- return apiPost(url, apiKey, body, signal);
63
+ return apiPost(url, apiKey, body, config.token, signal);
64
64
  };
65
65
 
66
66
  export const resetPassword = (
@@ -72,5 +72,5 @@ export const resetPassword = (
72
72
  const apiKey = config.apiKey;
73
73
  const body = JSON.stringify(request);
74
74
 
75
- return apiPost(url, apiKey, body, signal);
75
+ return apiPost(url, apiKey, body, config.token, signal);
76
76
  };
@@ -23,5 +23,5 @@ export const getMolliePayment = (
23
23
  const apiKey = config.apiKey;
24
24
  const body = JSON.stringify(request);
25
25
 
26
- return post(url, apiKey, body, signal);
26
+ return post(url, apiKey, body, config.token, signal);
27
27
  };
@@ -18,5 +18,5 @@ export const getCountries = (
18
18
  const url = `${config.host}${ENDPOINT_COUNTRIES}`;
19
19
  const apiKey = config.apiKey;
20
20
 
21
- return get(url, apiKey, signal, true);
21
+ return get(url, apiKey, config.token, signal, true);
22
22
  };
@@ -3,6 +3,7 @@ import {
3
3
  AgentInvoiceItem,
4
4
  AgentPrintAction,
5
5
  AgentPrintActionRequest,
6
+ Column,
6
7
  CustomEntryStatusItem,
7
8
  DossierViewResult,
8
9
  EntryTotals,
@@ -36,7 +37,7 @@ export const getPrintActions = (
36
37
  const url = `${config.host}${ENDPOINT_GET_PRINT_ACTIONS}/${printActionGroup}`;
37
38
  const apiKey = config.apiKey;
38
39
 
39
- return get<AgentPrintAction[]>(url, apiKey, signal, true);
40
+ return get<AgentPrintAction[]>(url, apiKey, config.token, signal, true);
40
41
  };
41
42
 
42
43
  /**
@@ -49,53 +50,64 @@ export const getPrintActions = (
49
50
  export const print = (
50
51
  config: TideClientConfig,
51
52
  request: AgentPrintActionRequest,
52
- signal?: AbortSignal,
53
- token?: string
53
+ signal?: AbortSignal
54
54
  ): Promise<Response> => {
55
55
  const url = `${config.host}${ENDPOINT_PRINT}`;
56
56
  const apiKey = config.apiKey;
57
57
  const body = JSON.stringify(request);
58
58
 
59
- return post(url, apiKey, body, signal, undefined, token);
59
+ return post(url, apiKey, body, config.token, signal, undefined);
60
60
  };
61
61
 
62
62
  export const getEntryList = (
63
63
  config: TideClientConfig,
64
64
  filterItem: FilterItem,
65
- token: string,
65
+ gridColumns?: Column[],
66
66
  signal?: AbortSignal
67
67
  ): Promise<PageResult<DossierViewResult>> => {
68
- const params = createParams(filterItem, false);
68
+ const params = createParams(filterItem, false, gridColumns);
69
69
  const url = `${config.host}${ENDPOINT}/entry/list?${params}`;
70
70
  const apiKey = config.apiKey;
71
71
 
72
- return get<PageResult<DossierViewResult>>(url, apiKey, signal, true, token);
72
+ return get<PageResult<DossierViewResult>>(
73
+ url,
74
+ apiKey,
75
+ config.token,
76
+ signal,
77
+ true
78
+ );
73
79
  };
74
80
 
75
81
  export const getEntryTotals = (
76
82
  config: TideClientConfig,
77
83
  filterItem: FilterItem,
78
- token: string,
84
+ gridColumns?: Column[],
79
85
  signal?: AbortSignal
80
86
  ): Promise<EntryTotals> => {
81
- const params = createParams(filterItem, false);
87
+ const params = createParams(filterItem, false, gridColumns);
82
88
  const url = `${config.host}${ENDPOINT}/entry/total?${params}`;
83
89
  const apiKey = config.apiKey;
84
90
 
85
- return get<EntryTotals>(url, apiKey, signal, true, token);
91
+ return get<EntryTotals>(url, apiKey, config.token, signal, true);
86
92
  };
87
93
 
88
94
  export const getInvoiceList = (
89
95
  config: TideClientConfig,
90
96
  filterItem: FilterItem,
91
- token: string,
97
+ gridColumns?: Column[],
92
98
  signal?: AbortSignal
93
99
  ): Promise<PageResult<AgentInvoiceItem>> => {
94
- const params = createParams(filterItem, false);
100
+ const params = createParams(filterItem, false, gridColumns);
95
101
  const url = `${config.host}${ENDPOINT}/invoice/list?${params}`;
96
102
  const apiKey = config.apiKey;
97
103
 
98
- return get<PageResult<AgentInvoiceItem>>(url, apiKey, signal, true, token);
104
+ return get<PageResult<AgentInvoiceItem>>(
105
+ url,
106
+ apiKey,
107
+ config.token,
108
+ signal,
109
+ true
110
+ );
99
111
  };
100
112
 
101
113
  export const getCustomEntryStatus = (
@@ -105,7 +117,7 @@ export const getCustomEntryStatus = (
105
117
  const url = `${config.host}${ENDPOINT_CUSTOM_ENTRY_STATUS}`;
106
118
  const apiKey = config.apiKey;
107
119
 
108
- return get<CustomEntryStatusItem[]>(url, apiKey, signal, true);
120
+ return get<CustomEntryStatusItem[]>(url, apiKey, config.token, signal, true);
109
121
  };
110
122
 
111
123
  export const getEntryStatus = (
@@ -115,5 +127,5 @@ export const getEntryStatus = (
115
127
  const url = `${config.host}${ENDPOINT_ENUM_ENTRY_STATUS}`;
116
128
  const apiKey = config.apiKey;
117
129
 
118
- return get<NumberStringPair[]>(url, apiKey, signal, true);
130
+ return get<NumberStringPair[]>(url, apiKey, config.token, signal, true);
119
131
  };
@@ -25,7 +25,7 @@ export const createCrmContact = (
25
25
  const apiKey = config.apiKey;
26
26
  const body = JSON.stringify(request);
27
27
 
28
- return post(url, apiKey, body, signal);
28
+ return post(url, apiKey, body, config.token, signal);
29
29
  };
30
30
 
31
31
  /**
@@ -42,5 +42,5 @@ export const getAffiliates = (
42
42
  const url = `${config.host}${ENDPOINT_CREATE_AFFILIATES}`;
43
43
  const apiKey = config.apiKey;
44
44
 
45
- return get(url, apiKey, signal, true);
45
+ return get(url, apiKey, config.token, signal, true);
46
46
  };
@@ -27,7 +27,7 @@ export const contactForm = (
27
27
  const apiKey = config.apiKey;
28
28
  const body = JSON.stringify(request);
29
29
 
30
- return post(url, apiKey, body, signal);
30
+ return post(url, apiKey, body, config.token, signal);
31
31
  };
32
32
 
33
33
  export const contactHasTag = (
@@ -39,5 +39,5 @@ export const contactHasTag = (
39
39
  const apiKey = config.apiKey;
40
40
  const body = JSON.stringify(request);
41
41
 
42
- return post(url, apiKey, body, signal);
42
+ return post(url, apiKey, body, config.token, signal);
43
43
  };
@@ -20,5 +20,5 @@ export const feedXml = (
20
20
  const url = `${config.host}${ENDPOINT_FEED}/${request}`;
21
21
  const apiKey = config.apiKey;
22
22
 
23
- return get(url, apiKey, signal);
23
+ return get(url, apiKey, config.token, signal);
24
24
  };