@adtrackify/at-service-common 2.0.16 → 2.0.17
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/cjs/clients/generic/http-client.d.ts +2 -2
- package/dist/cjs/clients/generic/http-client.js.map +1 -1
- package/dist/cjs/clients/internal-api/accounts-client.d.ts +1 -1
- package/dist/cjs/clients/internal-api/db-management-client.d.ts +1 -1
- package/dist/cjs/clients/internal-api/destinations-client.d.ts +1 -1
- package/dist/cjs/clients/internal-api/event-collector-client.d.ts +47 -0
- package/dist/cjs/clients/internal-api/event-collector-client.js +38 -0
- package/dist/cjs/clients/internal-api/event-collector-client.js.map +1 -0
- package/dist/cjs/clients/internal-api/index.d.ts +1 -0
- package/dist/cjs/clients/internal-api/index.js +1 -0
- package/dist/cjs/clients/internal-api/index.js.map +1 -1
- package/dist/cjs/clients/internal-api/shopify-app-install-client.d.ts +1 -1
- package/dist/cjs/clients/internal-api/users-auth-client.d.ts +1 -1
- package/dist/cjs/clients/third-party/shopify-client.d.ts +1 -1
- package/dist/esm/clients/generic/http-client.d.ts +2 -2
- package/dist/esm/clients/generic/http-client.js.map +1 -1
- package/dist/esm/clients/internal-api/accounts-client.d.ts +1 -1
- package/dist/esm/clients/internal-api/db-management-client.d.ts +1 -1
- package/dist/esm/clients/internal-api/destinations-client.d.ts +1 -1
- package/dist/esm/clients/internal-api/event-collector-client.d.ts +47 -0
- package/dist/esm/clients/internal-api/event-collector-client.js +31 -0
- package/dist/esm/clients/internal-api/event-collector-client.js.map +1 -0
- package/dist/esm/clients/internal-api/index.d.ts +1 -0
- package/dist/esm/clients/internal-api/index.js +1 -0
- package/dist/esm/clients/internal-api/index.js.map +1 -1
- package/dist/esm/clients/internal-api/shopify-app-install-client.d.ts +1 -1
- package/dist/esm/clients/internal-api/users-auth-client.d.ts +1 -1
- package/dist/esm/clients/third-party/shopify-client.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CreateAxiosDefaults } from 'axios';
|
|
1
|
+
import { AxiosRequestConfig, CreateAxiosDefaults } from 'axios';
|
|
2
2
|
export declare const axiosHttpService: (config?: CreateAxiosDefaults) => {
|
|
3
3
|
instance: () => import("axios").AxiosInstance;
|
|
4
|
-
get: (url: string, config?:
|
|
4
|
+
get: (url: string, config?: AxiosRequestConfig) => Promise<{
|
|
5
5
|
headers: any;
|
|
6
6
|
data: any;
|
|
7
7
|
status: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-client.js","sourceRoot":"","sources":["../../../../src/clients/generic/http-client.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"http-client.js","sourceRoot":"","sources":["../../../../src/clients/generic/http-client.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAuE;AACvE,kDAA0B;AAE1B,MAAM,YAAY,GAAG,CAAC,MAAW,EAAE,EAAE,EAAE;IACrC,OAAO;QACL,OAAO,EAAE,GAAG,EAAE,OAAO,IAAI,EAAE;QAC3B,IAAI,EAAE,GAAG,EAAE,IAAI,IAAI,EAAE;QACrB,MAAM,EAAE,GAAG,EAAE,MAAM,IAAI,CAAC;KACzB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,KAAU,EAAE,EAAE;IACtC,IAAI,CAAC,KAAK,EAAE,QAAQ,IAAI,CAAC,KAAK,EAAE,OAAO;QAAE,MAAM,KAAK,CAAC;IACrD,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AACvH,CAAC,CAAC;AAEK,MAAM,gBAAgB,GAAG,CAAC,SAA8B,EAAE,EAAE,EAAE;IACnE,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,UAAU,GAAG,IAAI,eAAK,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACzD,MAAM,YAAY,GAAG,eAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAE1C,OAAO;QACL,QAAQ,EAAE,GAAG,EAAE,CAAC,YAAY;QAC5B,GAAG,EAAE,CAAC,GAAW,EAAE,MAA2B,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC;QACrH,IAAI,EAAE,CAAC,GAAW,EAAE,IAAU,EAAE,MAAY,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC;QAC1H,MAAM,EAAE,CAAC,GAAW,EAAE,MAAY,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC;QAC5G,GAAG,EAAE,CAAC,GAAW,EAAE,IAAU,EAAE,MAAY,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC;QACxH,KAAK,EAAE,CAAC,GAAW,EAAE,IAAU,EAAE,MAAY,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC;QAC5H,UAAU,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,OAAO,GAAG,GAAG,CAAC;KACrE,CAAC;AACJ,CAAC,CAAC;AAdW,QAAA,gBAAgB,oBAc3B"}
|
|
@@ -32,7 +32,7 @@ export declare class AccountsClient {
|
|
|
32
32
|
getConfig: () => any;
|
|
33
33
|
getClient: () => Promise<{
|
|
34
34
|
instance: () => import("axios").AxiosInstance;
|
|
35
|
-
get: (url: string, config?: any) => Promise<{
|
|
35
|
+
get: (url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<{
|
|
36
36
|
headers: any;
|
|
37
37
|
data: any;
|
|
38
38
|
status: any;
|
|
@@ -17,7 +17,7 @@ export declare class DbMgmtClient {
|
|
|
17
17
|
};
|
|
18
18
|
getClient: () => Promise<{
|
|
19
19
|
instance: () => import("axios").AxiosInstance;
|
|
20
|
-
get: (url: string, config?: any) => Promise<{
|
|
20
|
+
get: (url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<{
|
|
21
21
|
headers: any;
|
|
22
22
|
data: any;
|
|
23
23
|
status: any;
|
|
@@ -22,7 +22,7 @@ export declare class DestinationsClient {
|
|
|
22
22
|
};
|
|
23
23
|
getClient: () => Promise<{
|
|
24
24
|
instance: () => import("axios").AxiosInstance;
|
|
25
|
-
get: (url: string, config?: any) => Promise<{
|
|
25
|
+
get: (url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<{
|
|
26
26
|
headers: any;
|
|
27
27
|
data: any;
|
|
28
28
|
status: any;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ApiResponse } from '../../types/api-response.js';
|
|
2
|
+
export interface EventStatusResponseData {
|
|
3
|
+
found?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare class EventCollectorClient {
|
|
6
|
+
BASE_API_URL: string;
|
|
7
|
+
EVENT_COLLECTOR_API_KEY: string;
|
|
8
|
+
constructor(baseApiUrl: string, apiKey: string);
|
|
9
|
+
getConfig: () => {
|
|
10
|
+
baseURL: string;
|
|
11
|
+
headers: {
|
|
12
|
+
common: {
|
|
13
|
+
'x-api-key': string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
getClient: () => Promise<{
|
|
18
|
+
instance: () => import("axios").AxiosInstance;
|
|
19
|
+
get: (url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<{
|
|
20
|
+
headers: any;
|
|
21
|
+
data: any;
|
|
22
|
+
status: any;
|
|
23
|
+
}>;
|
|
24
|
+
post: (url: string, data?: any, config?: any) => Promise<{
|
|
25
|
+
headers: any;
|
|
26
|
+
data: any;
|
|
27
|
+
status: any;
|
|
28
|
+
}>;
|
|
29
|
+
delete: (url: string, config?: any) => Promise<{
|
|
30
|
+
headers: any;
|
|
31
|
+
data: any;
|
|
32
|
+
status: any;
|
|
33
|
+
}>;
|
|
34
|
+
put: (url: string, data?: any, config?: any) => Promise<{
|
|
35
|
+
headers: any;
|
|
36
|
+
data: any;
|
|
37
|
+
status: any;
|
|
38
|
+
}>;
|
|
39
|
+
patch: (url: string, data?: any, config?: any) => Promise<{
|
|
40
|
+
headers: any;
|
|
41
|
+
data: any;
|
|
42
|
+
status: any;
|
|
43
|
+
}>;
|
|
44
|
+
setBaseUrl: (url: string) => boolean;
|
|
45
|
+
}>;
|
|
46
|
+
getEventStatus: (pixelId: string, eventId: string) => Promise<ApiResponse<EventStatusResponseData>>;
|
|
47
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.EventCollectorClient = void 0;
|
|
7
|
+
const lambda_log_1 = __importDefault(require("lambda-log"));
|
|
8
|
+
const http_client_js_1 = require("../generic/http-client.js");
|
|
9
|
+
class EventCollectorClient {
|
|
10
|
+
BASE_API_URL;
|
|
11
|
+
EVENT_COLLECTOR_API_KEY;
|
|
12
|
+
constructor(baseApiUrl, apiKey) {
|
|
13
|
+
this.BASE_API_URL = baseApiUrl;
|
|
14
|
+
this.EVENT_COLLECTOR_API_KEY = apiKey;
|
|
15
|
+
}
|
|
16
|
+
getConfig = () => {
|
|
17
|
+
const SERVICE_API_ROOT_URL = `${this.BASE_API_URL}/tr`;
|
|
18
|
+
return {
|
|
19
|
+
baseURL: SERVICE_API_ROOT_URL,
|
|
20
|
+
headers: {
|
|
21
|
+
common: {
|
|
22
|
+
'x-api-key': this.EVENT_COLLECTOR_API_KEY
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
getClient = async () => {
|
|
28
|
+
return (0, http_client_js_1.axiosHttpService)(this.getConfig());
|
|
29
|
+
};
|
|
30
|
+
getEventStatus = async (pixelId, eventId) => {
|
|
31
|
+
const client = await this.getClient();
|
|
32
|
+
const response = await client.get('/e', { params: { eid: eventId, pid: pixelId } });
|
|
33
|
+
lambda_log_1.default.debug('getEventStatus', { response });
|
|
34
|
+
return response;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
exports.EventCollectorClient = EventCollectorClient;
|
|
38
|
+
//# sourceMappingURL=event-collector-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-collector-client.js","sourceRoot":"","sources":["../../../../src/clients/internal-api/event-collector-client.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA6B;AAE7B,8DAA6D;AAK7D,MAAa,oBAAoB;IAExB,YAAY,CAAS;IACrB,uBAAuB,CAAS;IAEvC,YAAY,UAAkB,EAAE,MAAc;QAC5C,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC;QAC/B,IAAI,CAAC,uBAAuB,GAAG,MAAM,CAAC;IACxC,CAAC;IAED,SAAS,GAAG,GAAG,EAAE;QACf,MAAM,oBAAoB,GAAG,GAAG,IAAI,CAAC,YAAY,KAAK,CAAC;QACvD,OAAO;YACL,OAAO,EAAE,oBAAoB;YAC7B,OAAO,EAAE;gBACP,MAAM,EAAE;oBACN,WAAW,EAAE,IAAI,CAAC,uBAAuB;iBAC1C;aACF;SACF,CAAC;IACJ,CAAC,CAAC;IAEF,SAAS,GAAG,KAAK,IAAI,EAAE;QACrB,OAAO,IAAA,iCAAgB,EAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IAC5C,CAAC,CAAC;IAEF,cAAc,GAAG,KAAK,EAAE,OAAe,EAAE,OAAe,EAAiD,EAAE;QACzG,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;QACtC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;QACpF,oBAAG,CAAC,KAAK,CAAC,gBAAgB,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC1C,OAAO,QAAgD,CAAC;IAC1D,CAAC,CAAC;CAGH;AAlCD,oDAkCC"}
|
|
@@ -20,4 +20,5 @@ __exportStar(require("./users-auth-client.js"), exports);
|
|
|
20
20
|
__exportStar(require("./shopify-app-install-client.js"), exports);
|
|
21
21
|
__exportStar(require("./identity-client.js"), exports);
|
|
22
22
|
__exportStar(require("./db-management-client.js"), exports);
|
|
23
|
+
__exportStar(require("./event-collector-client.js"), exports);
|
|
23
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/clients/internal-api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,uDAAqC;AACrC,yDAAuC;AACvC,kEAAgD;AAChD,uDAAqC;AACrC,4DAA0C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/clients/internal-api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,uDAAqC;AACrC,yDAAuC;AACvC,kEAAgD;AAChD,uDAAqC;AACrC,4DAA0C;AAC1C,8DAA4C"}
|
|
@@ -24,7 +24,7 @@ export declare class ShopifyAppInstallClient {
|
|
|
24
24
|
};
|
|
25
25
|
getClient: () => Promise<{
|
|
26
26
|
instance: () => import("axios").AxiosInstance;
|
|
27
|
-
get: (url: string, config?: any) => Promise<{
|
|
27
|
+
get: (url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<{
|
|
28
28
|
headers: any;
|
|
29
29
|
data: any;
|
|
30
30
|
status: any;
|
|
@@ -23,7 +23,7 @@ export declare class UsersAuthClient {
|
|
|
23
23
|
};
|
|
24
24
|
getClient: () => Promise<{
|
|
25
25
|
instance: () => import("axios").AxiosInstance;
|
|
26
|
-
get: (url: string, config?: any) => Promise<{
|
|
26
|
+
get: (url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<{
|
|
27
27
|
headers: any;
|
|
28
28
|
data: any;
|
|
29
29
|
status: any;
|
|
@@ -10,7 +10,7 @@ export declare class ShopifyClient {
|
|
|
10
10
|
};
|
|
11
11
|
static getClient: (shopifyDomain: string, accessToken: string) => {
|
|
12
12
|
instance: () => import("axios").AxiosInstance;
|
|
13
|
-
get: (url: string, config?: any) => Promise<{
|
|
13
|
+
get: (url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<{
|
|
14
14
|
headers: any;
|
|
15
15
|
data: any;
|
|
16
16
|
status: any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CreateAxiosDefaults } from 'axios';
|
|
1
|
+
import { AxiosRequestConfig, CreateAxiosDefaults } from 'axios';
|
|
2
2
|
export declare const axiosHttpService: (config?: CreateAxiosDefaults) => {
|
|
3
3
|
instance: () => import("axios").AxiosInstance;
|
|
4
|
-
get: (url: string, config?:
|
|
4
|
+
get: (url: string, config?: AxiosRequestConfig) => Promise<{
|
|
5
5
|
headers: any;
|
|
6
6
|
data: any;
|
|
7
7
|
status: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-client.js","sourceRoot":"","sources":["../../../../src/clients/generic/http-client.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"http-client.js","sourceRoot":"","sources":["../../../../src/clients/generic/http-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,YAAY,GAAG,CAAC,MAAW,EAAE,EAAE,EAAE;IACrC,OAAO;QACL,OAAO,EAAE,GAAG,EAAE,OAAO,IAAI,EAAE;QAC3B,IAAI,EAAE,GAAG,EAAE,IAAI,IAAI,EAAE;QACrB,MAAM,EAAE,GAAG,EAAE,MAAM,IAAI,CAAC;KACzB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,KAAU,EAAE,EAAE;IACtC,IAAI,CAAC,KAAK,EAAE,QAAQ,IAAI,CAAC,KAAK,EAAE,OAAO;QAAE,MAAM,KAAK,CAAC;IACrD,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AACvH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAA8B,EAAE,EAAE,EAAE;IACnE,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,UAAU,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACzD,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAE1C,OAAO;QACL,QAAQ,EAAE,GAAG,EAAE,CAAC,YAAY;QAC5B,GAAG,EAAE,CAAC,GAAW,EAAE,MAA2B,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC;QACrH,IAAI,EAAE,CAAC,GAAW,EAAE,IAAU,EAAE,MAAY,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC;QAC1H,MAAM,EAAE,CAAC,GAAW,EAAE,MAAY,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC;QAC5G,GAAG,EAAE,CAAC,GAAW,EAAE,IAAU,EAAE,MAAY,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC;QACxH,KAAK,EAAE,CAAC,GAAW,EAAE,IAAU,EAAE,MAAY,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC;QAC5H,UAAU,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,OAAO,GAAG,GAAG,CAAC;KACrE,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -32,7 +32,7 @@ export declare class AccountsClient {
|
|
|
32
32
|
getConfig: () => any;
|
|
33
33
|
getClient: () => Promise<{
|
|
34
34
|
instance: () => import("axios").AxiosInstance;
|
|
35
|
-
get: (url: string, config?: any) => Promise<{
|
|
35
|
+
get: (url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<{
|
|
36
36
|
headers: any;
|
|
37
37
|
data: any;
|
|
38
38
|
status: any;
|
|
@@ -17,7 +17,7 @@ export declare class DbMgmtClient {
|
|
|
17
17
|
};
|
|
18
18
|
getClient: () => Promise<{
|
|
19
19
|
instance: () => import("axios").AxiosInstance;
|
|
20
|
-
get: (url: string, config?: any) => Promise<{
|
|
20
|
+
get: (url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<{
|
|
21
21
|
headers: any;
|
|
22
22
|
data: any;
|
|
23
23
|
status: any;
|
|
@@ -22,7 +22,7 @@ export declare class DestinationsClient {
|
|
|
22
22
|
};
|
|
23
23
|
getClient: () => Promise<{
|
|
24
24
|
instance: () => import("axios").AxiosInstance;
|
|
25
|
-
get: (url: string, config?: any) => Promise<{
|
|
25
|
+
get: (url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<{
|
|
26
26
|
headers: any;
|
|
27
27
|
data: any;
|
|
28
28
|
status: any;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ApiResponse } from '../../types/api-response.js';
|
|
2
|
+
export interface EventStatusResponseData {
|
|
3
|
+
found?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare class EventCollectorClient {
|
|
6
|
+
BASE_API_URL: string;
|
|
7
|
+
EVENT_COLLECTOR_API_KEY: string;
|
|
8
|
+
constructor(baseApiUrl: string, apiKey: string);
|
|
9
|
+
getConfig: () => {
|
|
10
|
+
baseURL: string;
|
|
11
|
+
headers: {
|
|
12
|
+
common: {
|
|
13
|
+
'x-api-key': string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
getClient: () => Promise<{
|
|
18
|
+
instance: () => import("axios").AxiosInstance;
|
|
19
|
+
get: (url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<{
|
|
20
|
+
headers: any;
|
|
21
|
+
data: any;
|
|
22
|
+
status: any;
|
|
23
|
+
}>;
|
|
24
|
+
post: (url: string, data?: any, config?: any) => Promise<{
|
|
25
|
+
headers: any;
|
|
26
|
+
data: any;
|
|
27
|
+
status: any;
|
|
28
|
+
}>;
|
|
29
|
+
delete: (url: string, config?: any) => Promise<{
|
|
30
|
+
headers: any;
|
|
31
|
+
data: any;
|
|
32
|
+
status: any;
|
|
33
|
+
}>;
|
|
34
|
+
put: (url: string, data?: any, config?: any) => Promise<{
|
|
35
|
+
headers: any;
|
|
36
|
+
data: any;
|
|
37
|
+
status: any;
|
|
38
|
+
}>;
|
|
39
|
+
patch: (url: string, data?: any, config?: any) => Promise<{
|
|
40
|
+
headers: any;
|
|
41
|
+
data: any;
|
|
42
|
+
status: any;
|
|
43
|
+
}>;
|
|
44
|
+
setBaseUrl: (url: string) => boolean;
|
|
45
|
+
}>;
|
|
46
|
+
getEventStatus: (pixelId: string, eventId: string) => Promise<ApiResponse<EventStatusResponseData>>;
|
|
47
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import log from 'lambda-log';
|
|
2
|
+
import { axiosHttpService } from '../generic/http-client.js';
|
|
3
|
+
export class EventCollectorClient {
|
|
4
|
+
BASE_API_URL;
|
|
5
|
+
EVENT_COLLECTOR_API_KEY;
|
|
6
|
+
constructor(baseApiUrl, apiKey) {
|
|
7
|
+
this.BASE_API_URL = baseApiUrl;
|
|
8
|
+
this.EVENT_COLLECTOR_API_KEY = apiKey;
|
|
9
|
+
}
|
|
10
|
+
getConfig = () => {
|
|
11
|
+
const SERVICE_API_ROOT_URL = `${this.BASE_API_URL}/tr`;
|
|
12
|
+
return {
|
|
13
|
+
baseURL: SERVICE_API_ROOT_URL,
|
|
14
|
+
headers: {
|
|
15
|
+
common: {
|
|
16
|
+
'x-api-key': this.EVENT_COLLECTOR_API_KEY
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
getClient = async () => {
|
|
22
|
+
return axiosHttpService(this.getConfig());
|
|
23
|
+
};
|
|
24
|
+
getEventStatus = async (pixelId, eventId) => {
|
|
25
|
+
const client = await this.getClient();
|
|
26
|
+
const response = await client.get('/e', { params: { eid: eventId, pid: pixelId } });
|
|
27
|
+
log.debug('getEventStatus', { response });
|
|
28
|
+
return response;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=event-collector-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-collector-client.js","sourceRoot":"","sources":["../../../../src/clients/internal-api/event-collector-client.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,YAAY,CAAC;AAE7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAK7D,MAAM,OAAO,oBAAoB;IAExB,YAAY,CAAS;IACrB,uBAAuB,CAAS;IAEvC,YAAY,UAAkB,EAAE,MAAc;QAC5C,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC;QAC/B,IAAI,CAAC,uBAAuB,GAAG,MAAM,CAAC;IACxC,CAAC;IAED,SAAS,GAAG,GAAG,EAAE;QACf,MAAM,oBAAoB,GAAG,GAAG,IAAI,CAAC,YAAY,KAAK,CAAC;QACvD,OAAO;YACL,OAAO,EAAE,oBAAoB;YAC7B,OAAO,EAAE;gBACP,MAAM,EAAE;oBACN,WAAW,EAAE,IAAI,CAAC,uBAAuB;iBAC1C;aACF;SACF,CAAC;IACJ,CAAC,CAAC;IAEF,SAAS,GAAG,KAAK,IAAI,EAAE;QACrB,OAAO,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IAC5C,CAAC,CAAC;IAEF,cAAc,GAAG,KAAK,EAAE,OAAe,EAAE,OAAe,EAAiD,EAAE;QACzG,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;QACtC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;QACpF,GAAG,CAAC,KAAK,CAAC,gBAAgB,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC1C,OAAO,QAAgD,CAAC;IAC1D,CAAC,CAAC;CAGH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/clients/internal-api/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/clients/internal-api/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC"}
|
|
@@ -24,7 +24,7 @@ export declare class ShopifyAppInstallClient {
|
|
|
24
24
|
};
|
|
25
25
|
getClient: () => Promise<{
|
|
26
26
|
instance: () => import("axios").AxiosInstance;
|
|
27
|
-
get: (url: string, config?: any) => Promise<{
|
|
27
|
+
get: (url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<{
|
|
28
28
|
headers: any;
|
|
29
29
|
data: any;
|
|
30
30
|
status: any;
|
|
@@ -23,7 +23,7 @@ export declare class UsersAuthClient {
|
|
|
23
23
|
};
|
|
24
24
|
getClient: () => Promise<{
|
|
25
25
|
instance: () => import("axios").AxiosInstance;
|
|
26
|
-
get: (url: string, config?: any) => Promise<{
|
|
26
|
+
get: (url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<{
|
|
27
27
|
headers: any;
|
|
28
28
|
data: any;
|
|
29
29
|
status: any;
|
|
@@ -10,7 +10,7 @@ export declare class ShopifyClient {
|
|
|
10
10
|
};
|
|
11
11
|
static getClient: (shopifyDomain: string, accessToken: string) => {
|
|
12
12
|
instance: () => import("axios").AxiosInstance;
|
|
13
|
-
get: (url: string, config?: any) => Promise<{
|
|
13
|
+
get: (url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<{
|
|
14
14
|
headers: any;
|
|
15
15
|
data: any;
|
|
16
16
|
status: any;
|