@adtrackify/at-service-common 3.5.25 → 3.5.26
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/third-party/index.d.ts +1 -0
- package/dist/cjs/clients/third-party/index.js +1 -0
- package/dist/cjs/clients/third-party/index.js.map +1 -1
- package/dist/cjs/clients/third-party/loops-client.d.ts +10 -0
- package/dist/cjs/clients/third-party/loops-client.js +31 -0
- package/dist/cjs/clients/third-party/loops-client.js.map +1 -0
- package/dist/esm/clients/third-party/index.d.ts +1 -0
- package/dist/esm/clients/third-party/index.js +1 -0
- package/dist/esm/clients/third-party/index.js.map +1 -1
- package/dist/esm/clients/third-party/loops-client.d.ts +10 -0
- package/dist/esm/clients/third-party/loops-client.js +27 -0
- package/dist/esm/clients/third-party/loops-client.js.map +1 -0
- package/package.json +3 -2
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./shopify-client.js"), exports);
|
|
18
18
|
__exportStar(require("./emailable-client.js"), exports);
|
|
19
|
+
__exportStar(require("./loops-client.js"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/clients/third-party/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,wDAAsC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/clients/third-party/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,wDAAsC;AACtC,oDAAkC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LoopsClient as LoopsSdkClient } from 'loops';
|
|
2
|
+
export type { TransactionalSuccess, TransactionalVariables, TransactionalAttachment, EventSuccessResponse, EventProperties, ContactProperties, } from 'loops';
|
|
3
|
+
type SendTransactionalEmailParams = Parameters<LoopsSdkClient['sendTransactionalEmail']>[0];
|
|
4
|
+
type SendEventParams = Parameters<LoopsSdkClient['sendEvent']>[0];
|
|
5
|
+
export declare class LoopsClient {
|
|
6
|
+
private client;
|
|
7
|
+
constructor(apiKey: string);
|
|
8
|
+
sendTransactionalEmail: (params: SendTransactionalEmailParams) => Promise<import("loops").TransactionalSuccess>;
|
|
9
|
+
sendEvent: (params: SendEventParams) => Promise<import("loops").EventSuccessResponse>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LoopsClient = void 0;
|
|
4
|
+
const loops_1 = require("loops");
|
|
5
|
+
const logging_helper_js_1 = require("../../helpers/logging-helper.js");
|
|
6
|
+
class LoopsClient {
|
|
7
|
+
client;
|
|
8
|
+
constructor(apiKey) {
|
|
9
|
+
this.client = new loops_1.LoopsClient(apiKey);
|
|
10
|
+
}
|
|
11
|
+
sendTransactionalEmail = async (params) => {
|
|
12
|
+
try {
|
|
13
|
+
return await this.client.sendTransactionalEmail(params);
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
logging_helper_js_1.Logger.error('Failed to send Loops transactional email', { error, params });
|
|
17
|
+
throw error;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
sendEvent = async (params) => {
|
|
21
|
+
try {
|
|
22
|
+
return await this.client.sendEvent(params);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
logging_helper_js_1.Logger.error('Failed to send Loops event', { error, params });
|
|
26
|
+
throw error;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
exports.LoopsClient = LoopsClient;
|
|
31
|
+
//# sourceMappingURL=loops-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loops-client.js","sourceRoot":"","sources":["../../../../src/clients/third-party/loops-client.ts"],"names":[],"mappings":";;;AAAA,iCAAsD;AACtD,uEAAyD;AAkBzD,MAAa,WAAW;IACd,MAAM,CAAiB;IAE/B,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,IAAI,mBAAc,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;IAEM,sBAAsB,GAAG,KAAK,EAAE,MAAoC,EAAE,EAAE;QAC7E,IAAI;YACF,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC;SACzD;QAAC,OAAO,KAAK,EAAE;YACd,0BAAM,CAAC,KAAK,CAAC,0CAA0C,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;YAC5E,MAAM,KAAK,CAAC;SACb;IACH,CAAC,CAAC;IAEK,SAAS,GAAG,KAAK,EAAE,MAAuB,EAAE,EAAE;QACnD,IAAI;YACF,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;SAC5C;QAAC,OAAO,KAAK,EAAE;YACd,0BAAM,CAAC,KAAK,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;YAC9D,MAAM,KAAK,CAAC;SACb;IACH,CAAC,CAAC;CACH;AAxBD,kCAwBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/clients/third-party/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/clients/third-party/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LoopsClient as LoopsSdkClient } from 'loops';
|
|
2
|
+
export type { TransactionalSuccess, TransactionalVariables, TransactionalAttachment, EventSuccessResponse, EventProperties, ContactProperties, } from 'loops';
|
|
3
|
+
type SendTransactionalEmailParams = Parameters<LoopsSdkClient['sendTransactionalEmail']>[0];
|
|
4
|
+
type SendEventParams = Parameters<LoopsSdkClient['sendEvent']>[0];
|
|
5
|
+
export declare class LoopsClient {
|
|
6
|
+
private client;
|
|
7
|
+
constructor(apiKey: string);
|
|
8
|
+
sendTransactionalEmail: (params: SendTransactionalEmailParams) => Promise<import("loops").TransactionalSuccess>;
|
|
9
|
+
sendEvent: (params: SendEventParams) => Promise<import("loops").EventSuccessResponse>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { LoopsClient as LoopsSdkClient } from 'loops';
|
|
2
|
+
import { Logger } from '../../helpers/logging-helper.js';
|
|
3
|
+
export class LoopsClient {
|
|
4
|
+
client;
|
|
5
|
+
constructor(apiKey) {
|
|
6
|
+
this.client = new LoopsSdkClient(apiKey);
|
|
7
|
+
}
|
|
8
|
+
sendTransactionalEmail = async (params) => {
|
|
9
|
+
try {
|
|
10
|
+
return await this.client.sendTransactionalEmail(params);
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
Logger.error('Failed to send Loops transactional email', { error, params });
|
|
14
|
+
throw error;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
sendEvent = async (params) => {
|
|
18
|
+
try {
|
|
19
|
+
return await this.client.sendEvent(params);
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
Logger.error('Failed to send Loops event', { error, params });
|
|
23
|
+
throw error;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=loops-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loops-client.js","sourceRoot":"","sources":["../../../../src/clients/third-party/loops-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAkBzD,MAAM,OAAO,WAAW;IACd,MAAM,CAAiB;IAE/B,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;IAEM,sBAAsB,GAAG,KAAK,EAAE,MAAoC,EAAE,EAAE;QAC7E,IAAI;YACF,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC;SACzD;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,CAAC,KAAK,CAAC,0CAA0C,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;YAC5E,MAAM,KAAK,CAAC;SACb;IACH,CAAC,CAAC;IAEK,SAAS,GAAG,KAAK,EAAE,MAAuB,EAAE,EAAE;QACnD,IAAI;YACF,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;SAC5C;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,CAAC,KAAK,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;YAC9D,MAAM,KAAK,CAAC;SACb;IACH,CAAC,CAAC;CACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adtrackify/at-service-common",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.26",
|
|
4
4
|
"description": "",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/*"
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"big.js": "^7.0.1",
|
|
45
45
|
"ioredis": "^5.4.1",
|
|
46
46
|
"libphonenumber-js": "^1.12.15",
|
|
47
|
+
"loops": "^6.0.1",
|
|
47
48
|
"pako": "^2.1.0",
|
|
48
49
|
"papaparse": "^5.5.3",
|
|
49
50
|
"psl": "^1.15.0",
|
|
@@ -128,4 +129,4 @@
|
|
|
128
129
|
"author": "",
|
|
129
130
|
"license": "ISC",
|
|
130
131
|
"homepage": "https://bitbucket.org/eacap/at-service-common#readme"
|
|
131
|
-
}
|
|
132
|
+
}
|