@adtrackify/at-service-common 1.2.9 → 1.2.11
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 +1 -1
- package/dist/__tests__/helpers/subscription-helper.spec.d.ts +0 -1
- package/dist/__tests__/helpers/subscription-helper.spec.js +0 -28
- package/dist/__tests__/helpers/subscription-helper.spec.js.map +0 -1
- package/dist/clients/generic/cognito-client.d.ts +0 -19
- package/dist/clients/generic/cognito-client.js +0 -140
- package/dist/clients/generic/cognito-client.js.map +0 -1
- package/dist/clients/generic/dynamodb-client.d.ts +0 -15
- package/dist/clients/generic/dynamodb-client.js +0 -123
- package/dist/clients/generic/dynamodb-client.js.map +0 -1
- package/dist/clients/generic/eventbridge-client.d.ts +0 -14
- package/dist/clients/generic/eventbridge-client.js +0 -46
- package/dist/clients/generic/eventbridge-client.js.map +0 -1
- package/dist/clients/generic/http-client.d.ts +0 -30
- package/dist/clients/generic/http-client.js +0 -29
- package/dist/clients/generic/http-client.js.map +0 -1
- package/dist/clients/generic/index.d.ts +0 -6
- package/dist/clients/generic/index.js +0 -7
- package/dist/clients/generic/index.js.map +0 -1
- package/dist/clients/generic/s3-client.d.ts +0 -6
- package/dist/clients/generic/s3-client.js +0 -25
- package/dist/clients/generic/s3-client.js.map +0 -1
- package/dist/clients/generic/sqs-client.d.ts +0 -14
- package/dist/clients/generic/sqs-client.js +0 -35
- package/dist/clients/generic/sqs-client.js.map +0 -1
- package/dist/clients/index.d.ts +0 -3
- package/dist/clients/index.js +0 -4
- package/dist/clients/index.js.map +0 -1
- package/dist/clients/internal-api/accounts-client.d.ts +0 -82
- package/dist/clients/internal-api/accounts-client.js +0 -79
- package/dist/clients/internal-api/accounts-client.js.map +0 -1
- package/dist/clients/internal-api/destinations-client.d.ts +0 -54
- package/dist/clients/internal-api/destinations-client.js +0 -37
- package/dist/clients/internal-api/destinations-client.js.map +0 -1
- package/dist/clients/internal-api/index.d.ts +0 -4
- package/dist/clients/internal-api/index.js +0 -5
- package/dist/clients/internal-api/index.js.map +0 -1
- package/dist/clients/internal-api/shopify-app-install-client.d.ts +0 -57
- package/dist/clients/internal-api/shopify-app-install-client.js +0 -43
- package/dist/clients/internal-api/shopify-app-install-client.js.map +0 -1
- package/dist/clients/internal-api/users-auth-client.d.ts +0 -61
- package/dist/clients/internal-api/users-auth-client.js +0 -74
- package/dist/clients/internal-api/users-auth-client.js.map +0 -1
- package/dist/clients/third-party/index.d.ts +0 -1
- package/dist/clients/third-party/index.js +0 -2
- package/dist/clients/third-party/index.js.map +0 -1
- package/dist/clients/third-party/shopify-client.d.ts +0 -90
- package/dist/clients/third-party/shopify-client.js +0 -122
- package/dist/clients/third-party/shopify-client.js.map +0 -1
- package/dist/helpers/index.d.ts +0 -5
- package/dist/helpers/index.js +0 -6
- package/dist/helpers/index.js.map +0 -1
- package/dist/helpers/input-validation-helper.d.ts +0 -2
- package/dist/helpers/input-validation-helper.js +0 -19
- package/dist/helpers/input-validation-helper.js.map +0 -1
- package/dist/helpers/logging-helper.d.ts +0 -1
- package/dist/helpers/logging-helper.js +0 -10
- package/dist/helpers/logging-helper.js.map +0 -1
- package/dist/helpers/response-helper.d.ts +0 -36
- package/dist/helpers/response-helper.js +0 -36
- package/dist/helpers/response-helper.js.map +0 -1
- package/dist/helpers/shopify-helper.d.ts +0 -9
- package/dist/helpers/shopify-helper.js +0 -24
- package/dist/helpers/shopify-helper.js.map +0 -1
- package/dist/helpers/subscription-helper.d.ts +0 -8
- package/dist/helpers/subscription-helper.js +0 -182
- package/dist/helpers/subscription-helper.js.map +0 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.esm.js +0 -1374
- package/dist/index.esm.js.map +0 -7
- package/dist/index.js +0 -6
- package/dist/index.js.map +0 -1
- package/dist/libs/crypto.d.ts +0 -1
- package/dist/libs/crypto.js +0 -6
- package/dist/libs/crypto.js.map +0 -1
- package/dist/libs/dates.d.ts +0 -3
- package/dist/libs/dates.js +0 -11
- package/dist/libs/dates.js.map +0 -1
- package/dist/libs/http-error.d.ts +0 -21
- package/dist/libs/http-error.js +0 -56
- package/dist/libs/http-error.js.map +0 -1
- package/dist/libs/http-status-codes.d.ts +0 -58
- package/dist/libs/http-status-codes.js +0 -60
- package/dist/libs/http-status-codes.js.map +0 -1
- package/dist/libs/index.d.ts +0 -6
- package/dist/libs/index.js +0 -7
- package/dist/libs/index.js.map +0 -1
- package/dist/libs/url.d.ts +0 -1
- package/dist/libs/url.js +0 -10
- package/dist/libs/url.js.map +0 -1
- package/dist/services/eventbridge-integration-service.d.ts +0 -9
- package/dist/services/eventbridge-integration-service.js +0 -25
- package/dist/services/eventbridge-integration-service.js.map +0 -1
- package/dist/services/index.d.ts +0 -1
- package/dist/services/index.js +0 -2
- package/dist/services/index.js.map +0 -1
- package/dist/types/api-response.d.ts +0 -6
- package/dist/types/api-response.js +0 -2
- package/dist/types/api-response.js.map +0 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.js +0 -2
- package/dist/types/index.js.map +0 -1
- package/dist/types/internal-events/event-detail-types.d.ts +0 -20
- package/dist/types/internal-events/event-detail-types.js +0 -25
- package/dist/types/internal-events/event-detail-types.js.map +0 -1
- package/dist/types/internal-events/index.d.ts +0 -1
- package/dist/types/internal-events/index.js +0 -2
- package/dist/types/internal-events/index.js.map +0 -1
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { ApiResponse } from '../../types/api-response.js';
|
|
2
|
-
import { Account, ACCOUNT_STATUS, Destination } from '@adtrackify/at-tracking-event-types';
|
|
3
|
-
export interface AccountResponseData {
|
|
4
|
-
account: Account;
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
}
|
|
7
|
-
export interface IsAuthorizedUserResponseData {
|
|
8
|
-
isAccountUser: boolean;
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
}
|
|
11
|
-
export interface PixelConfigResponseData {
|
|
12
|
-
id: string;
|
|
13
|
-
destinations: Destination[];
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
}
|
|
16
|
-
export interface AddUserToAccountResponseData {
|
|
17
|
-
userId: string;
|
|
18
|
-
accountId: string;
|
|
19
|
-
}
|
|
20
|
-
export interface UpdateAccountRequest {
|
|
21
|
-
accountName?: string;
|
|
22
|
-
companyName?: string;
|
|
23
|
-
primaryEmail?: string;
|
|
24
|
-
ownerId?: string;
|
|
25
|
-
subscriptionId?: string;
|
|
26
|
-
accountStatus?: ACCOUNT_STATUS;
|
|
27
|
-
}
|
|
28
|
-
export declare class AccountsClient {
|
|
29
|
-
BASE_API_URL: string;
|
|
30
|
-
ACCOUNTS_API_KEY?: string;
|
|
31
|
-
constructor(baseApiUrl: string, accountsApiKey?: string);
|
|
32
|
-
getConfig: () => any;
|
|
33
|
-
getClient: () => Promise<{
|
|
34
|
-
instance: () => import("axios").AxiosInstance;
|
|
35
|
-
get: (url: string, config?: any) => Promise<{
|
|
36
|
-
headers: any;
|
|
37
|
-
data: any;
|
|
38
|
-
status: any;
|
|
39
|
-
}>;
|
|
40
|
-
post: (url: string, data?: any, config?: any) => Promise<{
|
|
41
|
-
headers: any;
|
|
42
|
-
data: any;
|
|
43
|
-
status: any;
|
|
44
|
-
}>;
|
|
45
|
-
delete: (url: string, config?: any) => Promise<{
|
|
46
|
-
headers: any;
|
|
47
|
-
data: any;
|
|
48
|
-
status: any;
|
|
49
|
-
}>;
|
|
50
|
-
put: (url: string, data?: any, config?: any) => Promise<{
|
|
51
|
-
headers: any;
|
|
52
|
-
data: any;
|
|
53
|
-
status: any;
|
|
54
|
-
}>;
|
|
55
|
-
patch: (url: string, data?: any, config?: any) => Promise<{
|
|
56
|
-
headers: any;
|
|
57
|
-
data: any;
|
|
58
|
-
status: any;
|
|
59
|
-
}>;
|
|
60
|
-
setBaseUrl: (url: string) => boolean;
|
|
61
|
-
}>;
|
|
62
|
-
createAccount: (createAccountRequest: any) => Promise<{
|
|
63
|
-
headers: any;
|
|
64
|
-
data: any;
|
|
65
|
-
status: any;
|
|
66
|
-
}>;
|
|
67
|
-
updateAccount: (accountId: string, body: any) => Promise<ApiResponse<AccountResponseData>>;
|
|
68
|
-
addOwner: (accountId: string, userId: string) => Promise<{
|
|
69
|
-
headers: any;
|
|
70
|
-
data: any;
|
|
71
|
-
status: any;
|
|
72
|
-
}>;
|
|
73
|
-
isAuthorizedUser: (userId: string, accountId: string, pixelId?: string) => Promise<ApiResponse<IsAuthorizedUserResponseData>>;
|
|
74
|
-
adminDeleteAccount: (accountId: string) => Promise<{
|
|
75
|
-
headers: any;
|
|
76
|
-
data: any;
|
|
77
|
-
status: any;
|
|
78
|
-
}>;
|
|
79
|
-
getPixelConfigById: (pixelId: string) => Promise<ApiResponse<PixelConfigResponseData>>;
|
|
80
|
-
getAccount: (accountId: string) => Promise<ApiResponse<AccountResponseData>>;
|
|
81
|
-
addUserToAccount: (accountId: string, userId: string) => Promise<ApiResponse<AddUserToAccountResponseData>>;
|
|
82
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import * as log from 'lambda-log';
|
|
2
|
-
import { axiosHttpService } from '../generic/http-client.js';
|
|
3
|
-
export class AccountsClient {
|
|
4
|
-
BASE_API_URL;
|
|
5
|
-
ACCOUNTS_API_KEY;
|
|
6
|
-
constructor(baseApiUrl, accountsApiKey) {
|
|
7
|
-
this.BASE_API_URL = baseApiUrl;
|
|
8
|
-
this.ACCOUNTS_API_KEY = accountsApiKey;
|
|
9
|
-
}
|
|
10
|
-
getConfig = () => {
|
|
11
|
-
const SERVICE_API_ROOT_URL = `${this.BASE_API_URL}/accounts`;
|
|
12
|
-
const params = {
|
|
13
|
-
baseURL: SERVICE_API_ROOT_URL
|
|
14
|
-
};
|
|
15
|
-
if (this.ACCOUNTS_API_KEY) {
|
|
16
|
-
params.headers = {
|
|
17
|
-
common: {
|
|
18
|
-
'x-api-key': this.ACCOUNTS_API_KEY
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
return params;
|
|
23
|
-
};
|
|
24
|
-
getClient = async () => {
|
|
25
|
-
return axiosHttpService(this.getConfig());
|
|
26
|
-
};
|
|
27
|
-
createAccount = async (createAccountRequest) => {
|
|
28
|
-
const client = await this.getClient();
|
|
29
|
-
const createAccountResponse = await client.post('', createAccountRequest);
|
|
30
|
-
log.info('createAccountResponse', { createAccountResponse });
|
|
31
|
-
return createAccountResponse;
|
|
32
|
-
};
|
|
33
|
-
updateAccount = async (accountId, body) => {
|
|
34
|
-
const client = await this.getClient();
|
|
35
|
-
const response = await client.patch(`/${accountId}/`, body);
|
|
36
|
-
log.info('update Account response', { response });
|
|
37
|
-
return response;
|
|
38
|
-
};
|
|
39
|
-
addOwner = async (accountId, userId) => {
|
|
40
|
-
const client = await this.getClient();
|
|
41
|
-
const addOwnerResponse = await client.post('/addOwner', { accountId, userId });
|
|
42
|
-
log.info('addOwnerResponse', { addOwnerResponse });
|
|
43
|
-
return addOwnerResponse;
|
|
44
|
-
};
|
|
45
|
-
isAuthorizedUser = async (userId, accountId, pixelId) => {
|
|
46
|
-
const client = await this.getClient();
|
|
47
|
-
const body = {
|
|
48
|
-
userId, accountId, pixelId
|
|
49
|
-
};
|
|
50
|
-
const response = await client.post('/checkUserAuthorization', body);
|
|
51
|
-
log.info('checkUserAuthorization', { response });
|
|
52
|
-
return response;
|
|
53
|
-
};
|
|
54
|
-
adminDeleteAccount = async (accountId) => {
|
|
55
|
-
const client = await this.getClient();
|
|
56
|
-
const success = await client.delete(`/${accountId}`);
|
|
57
|
-
log.info('adminDeleteAccount');
|
|
58
|
-
return success;
|
|
59
|
-
};
|
|
60
|
-
getPixelConfigById = async (pixelId) => {
|
|
61
|
-
const client = await this.getClient();
|
|
62
|
-
const pixelResponse = await client.get(`/px/${pixelId}/config`);
|
|
63
|
-
log.debug('get pixelResponse', { pixelResponse });
|
|
64
|
-
return pixelResponse;
|
|
65
|
-
};
|
|
66
|
-
getAccount = async (accountId) => {
|
|
67
|
-
const client = await this.getClient();
|
|
68
|
-
const response = await client.get(`/${accountId}/`);
|
|
69
|
-
log.info('get account response', { response });
|
|
70
|
-
return response;
|
|
71
|
-
};
|
|
72
|
-
addUserToAccount = async (accountId, userId) => {
|
|
73
|
-
const client = await this.getClient();
|
|
74
|
-
const response = await client.post('/addUser', { accountId, userId });
|
|
75
|
-
log.info('add user account response', { response });
|
|
76
|
-
return response;
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
//# sourceMappingURL=accounts-client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accounts-client.js","sourceRoot":"","sources":["../../../src/clients/internal-api/accounts-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,YAAY,CAAC;AAGlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAmC7D,MAAM,OAAO,cAAc;IAClB,YAAY,CAAS;IACrB,gBAAgB,CAAU;IAEjC,YAAa,UAAkB,EAAE,cAAuB;QACtD,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC;QAC/B,IAAI,CAAC,gBAAgB,GAAG,cAAc,CAAC;IACzC,CAAC;IAED,SAAS,GAAG,GAAG,EAAE;QACf,MAAM,oBAAoB,GAAG,GAAG,IAAI,CAAC,YAAY,WAAW,CAAC;QAC7D,MAAM,MAAM,GAAQ;YAClB,OAAO,EAAE,oBAAoB;SAC9B,CAAC;QACF,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACzB,MAAM,CAAC,OAAO,GAAG;gBACf,MAAM,EAAE;oBACN,WAAW,EAAE,IAAI,CAAC,gBAAgB;iBACnC;aACF,CAAC;SACH;QACD,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;IAEF,SAAS,GAAG,KAAK,IAAI,EAAE;QACrB,OAAO,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IAC5C,CAAC,CAAC;IAEF,aAAa,GAAG,KAAK,EAAE,oBAAyB,EAAE,EAAE;QAClD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC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S,EAAE,MAAM,EAAE,CAAC,CAAC;QACtE,GAAG,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;QACpD,OAAO,QAAqD,CAAC;IAC/D,CAAC,CAAC;CASH"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { ApiResponse } from '../../types/api-response.js';
|
|
2
|
-
import { Destination } from '@adtrackify/at-tracking-event-types';
|
|
3
|
-
export interface GetDestinationsResponseData {
|
|
4
|
-
destinations: Destination[];
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
}
|
|
7
|
-
export interface CreateDestinationResponseData {
|
|
8
|
-
destination: Destination;
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
}
|
|
11
|
-
export declare class DestinationsClient {
|
|
12
|
-
BASE_API_URL: string;
|
|
13
|
-
DESTINATIONS_API_KEY: string;
|
|
14
|
-
constructor(baseApiUrl: string, destinationsApiKey: string);
|
|
15
|
-
getConfig: () => {
|
|
16
|
-
baseURL: string;
|
|
17
|
-
headers: {
|
|
18
|
-
common: {
|
|
19
|
-
'x-api-key': string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
getClient: () => Promise<{
|
|
24
|
-
instance: () => import("axios").AxiosInstance;
|
|
25
|
-
get: (url: string, config?: any) => Promise<{
|
|
26
|
-
headers: any;
|
|
27
|
-
data: any;
|
|
28
|
-
status: any;
|
|
29
|
-
}>;
|
|
30
|
-
post: (url: string, data?: any, config?: any) => Promise<{
|
|
31
|
-
headers: any;
|
|
32
|
-
data: any;
|
|
33
|
-
status: any;
|
|
34
|
-
}>;
|
|
35
|
-
delete: (url: string, config?: any) => Promise<{
|
|
36
|
-
headers: any;
|
|
37
|
-
data: any;
|
|
38
|
-
status: any;
|
|
39
|
-
}>;
|
|
40
|
-
put: (url: string, data?: any, config?: any) => Promise<{
|
|
41
|
-
headers: any;
|
|
42
|
-
data: any;
|
|
43
|
-
status: any;
|
|
44
|
-
}>;
|
|
45
|
-
patch: (url: string, data?: any, config?: any) => Promise<{
|
|
46
|
-
headers: any;
|
|
47
|
-
data: any;
|
|
48
|
-
status: any;
|
|
49
|
-
}>;
|
|
50
|
-
setBaseUrl: (url: string) => boolean;
|
|
51
|
-
}>;
|
|
52
|
-
createDestination: (createDestinationRequest: any) => Promise<ApiResponse<CreateDestinationResponseData>>;
|
|
53
|
-
getPixelDestinations: (pixelId: string) => Promise<ApiResponse<GetDestinationsResponseData>>;
|
|
54
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import * as log from 'lambda-log';
|
|
2
|
-
import { axiosHttpService } from '../generic/http-client.js';
|
|
3
|
-
export class DestinationsClient {
|
|
4
|
-
BASE_API_URL;
|
|
5
|
-
DESTINATIONS_API_KEY;
|
|
6
|
-
constructor(baseApiUrl, destinationsApiKey) {
|
|
7
|
-
this.BASE_API_URL = baseApiUrl;
|
|
8
|
-
this.DESTINATIONS_API_KEY = destinationsApiKey;
|
|
9
|
-
}
|
|
10
|
-
getConfig = () => {
|
|
11
|
-
const SERVICE_API_ROOT_URL = `${this.BASE_API_URL}/destinations`;
|
|
12
|
-
return {
|
|
13
|
-
baseURL: SERVICE_API_ROOT_URL,
|
|
14
|
-
headers: {
|
|
15
|
-
common: {
|
|
16
|
-
'x-api-key': this.DESTINATIONS_API_KEY
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
getClient = async () => {
|
|
22
|
-
return axiosHttpService(this.getConfig());
|
|
23
|
-
};
|
|
24
|
-
createDestination = async (createDestinationRequest) => {
|
|
25
|
-
const client = await this.getClient();
|
|
26
|
-
const response = await client.post('/', createDestinationRequest);
|
|
27
|
-
log.info('createDestinationResponse', { response });
|
|
28
|
-
return response;
|
|
29
|
-
};
|
|
30
|
-
getPixelDestinations = async (pixelId) => {
|
|
31
|
-
const client = await this.getClient();
|
|
32
|
-
const response = await client.get(`/?pixelId=${pixelId}`);
|
|
33
|
-
log.info('getPixelResponse', { response });
|
|
34
|
-
return response;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=destinations-client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"destinations-client.js","sourceRoot":"","sources":["../../../src/clients/internal-api/destinations-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,YAAY,CAAC;AAGlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAe7D,MAAM,OAAO,kBAAkB;IAEtB,YAAY,CAAS;IACrB,oBAAoB,CAAS;IAEpC,YAAa,UAAkB,EAAE,kBAA0B;QACzD,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC;QAC/B,IAAI,CAAC,oBAAoB,GAAG,kBAAkB,CAAC;IACjD,CAAC;IAED,SAAS,GAAG,GAAG,EAAE;QACf,MAAM,oBAAoB,GAAG,GAAG,IAAI,CAAC,YAAY,eAAe,CAAC;QACjE,OAAO;YACL,OAAO,EAAE,oBAAoB;YAC7B,OAAO,EAAE;gBACP,MAAM,EAAE;oBACN,WAAW,EAAE,IAAI,CAAC,oBAAoB;iBACvC;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,iBAAiB,GAAG,KAAK,EAAE,wBAA6B,EAAuD,EAAE;QAC/G,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;QACtC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,wBAAwB,CAAC,CAAC;QAClE,GAAG,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;QACpD,OAAO,QAAsD,CAAC;IAChE,CAAC,CAAC;IAEF,oBAAoB,GAAG,KAAK,EAAE,OAAe,EAAqD,EAAE;QAClG,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;QACtC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,aAAa,OAAO,EAAE,CAAC,CAAC;QAC1D,GAAG,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC3C,OAAO,QAAoD,CAAC;IAC9D,CAAC,CAAC;CACH"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { ApiResponse } from '../../types/api-response.js';
|
|
2
|
-
import { ShopifyAppInstall, ShopifyAppSubscriptionStatus } from '@adtrackify/at-tracking-event-types';
|
|
3
|
-
export interface ShopifyAppInstallResponseData {
|
|
4
|
-
shopifyAppInstall: ShopifyAppInstall;
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
}
|
|
7
|
-
export interface UpdateShopifyAppInstallRequest {
|
|
8
|
-
appSubscriptionStatus?: ShopifyAppSubscriptionStatus;
|
|
9
|
-
pixelId?: string;
|
|
10
|
-
shopifyAppInstallId: string;
|
|
11
|
-
isAppEnabled?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare class ShopifyAppInstallClient {
|
|
14
|
-
BASE_API_URL: string;
|
|
15
|
-
SHOPIFY_APP_INSTALL_API_KEY: string;
|
|
16
|
-
constructor(baseApiUrl: string, shopifyAppInstallApiKey: string);
|
|
17
|
-
getConfig: () => {
|
|
18
|
-
baseURL: string;
|
|
19
|
-
headers: {
|
|
20
|
-
common: {
|
|
21
|
-
'x-api-key': string;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
getClient: () => Promise<{
|
|
26
|
-
instance: () => import("axios").AxiosInstance;
|
|
27
|
-
get: (url: string, config?: any) => Promise<{
|
|
28
|
-
headers: any;
|
|
29
|
-
data: any;
|
|
30
|
-
status: any;
|
|
31
|
-
}>;
|
|
32
|
-
post: (url: string, data?: any, config?: any) => Promise<{
|
|
33
|
-
headers: any;
|
|
34
|
-
data: any;
|
|
35
|
-
status: any;
|
|
36
|
-
}>;
|
|
37
|
-
delete: (url: string, config?: any) => Promise<{
|
|
38
|
-
headers: any;
|
|
39
|
-
data: any;
|
|
40
|
-
status: any;
|
|
41
|
-
}>;
|
|
42
|
-
put: (url: string, data?: any, config?: any) => Promise<{
|
|
43
|
-
headers: any;
|
|
44
|
-
data: any;
|
|
45
|
-
status: any;
|
|
46
|
-
}>;
|
|
47
|
-
patch: (url: string, data?: any, config?: any) => Promise<{
|
|
48
|
-
headers: any;
|
|
49
|
-
data: any;
|
|
50
|
-
status: any;
|
|
51
|
-
}>;
|
|
52
|
-
setBaseUrl: (url: string) => boolean;
|
|
53
|
-
}>;
|
|
54
|
-
updateShopifyAppInstall: (shopifyAppInstallId: string, updateShopifyAppInstallRequest: UpdateShopifyAppInstallRequest) => Promise<ApiResponse<ShopifyAppInstallResponseData>>;
|
|
55
|
-
getShopifyAppInstall: (shopifyAppInstallId: string) => Promise<ApiResponse<ShopifyAppInstallResponseData>>;
|
|
56
|
-
getShopifyAppInstallByShop: (shop: string) => Promise<ApiResponse<ShopifyAppInstallResponseData>>;
|
|
57
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import log from 'lambda-log';
|
|
2
|
-
import { axiosHttpService } from '../generic/http-client.js';
|
|
3
|
-
export class ShopifyAppInstallClient {
|
|
4
|
-
BASE_API_URL;
|
|
5
|
-
SHOPIFY_APP_INSTALL_API_KEY;
|
|
6
|
-
constructor(baseApiUrl, shopifyAppInstallApiKey) {
|
|
7
|
-
this.BASE_API_URL = baseApiUrl;
|
|
8
|
-
this.SHOPIFY_APP_INSTALL_API_KEY = shopifyAppInstallApiKey;
|
|
9
|
-
}
|
|
10
|
-
getConfig = () => {
|
|
11
|
-
const SERVICE_API_ROOT_URL = `${this.BASE_API_URL}/shopify-app-installs`;
|
|
12
|
-
return {
|
|
13
|
-
baseURL: SERVICE_API_ROOT_URL,
|
|
14
|
-
headers: {
|
|
15
|
-
common: {
|
|
16
|
-
'x-api-key': this.SHOPIFY_APP_INSTALL_API_KEY
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
getClient = async () => {
|
|
22
|
-
return axiosHttpService(this.getConfig());
|
|
23
|
-
};
|
|
24
|
-
updateShopifyAppInstall = async (shopifyAppInstallId, updateShopifyAppInstallRequest) => {
|
|
25
|
-
const client = await this.getClient();
|
|
26
|
-
const response = await client.put(`/${shopifyAppInstallId}`, updateShopifyAppInstallRequest);
|
|
27
|
-
log.info('updateShopifyAppInstall', { response });
|
|
28
|
-
return response;
|
|
29
|
-
};
|
|
30
|
-
getShopifyAppInstall = async (shopifyAppInstallId) => {
|
|
31
|
-
const client = await this.getClient();
|
|
32
|
-
const response = await client.get(`/${shopifyAppInstallId}`);
|
|
33
|
-
log.info('getShopifyAppInstall', { response });
|
|
34
|
-
return response;
|
|
35
|
-
};
|
|
36
|
-
getShopifyAppInstallByShop = async (shop) => {
|
|
37
|
-
const client = await this.getClient();
|
|
38
|
-
const response = await client.get(`/?shop=${shop}`);
|
|
39
|
-
log.info('getShopifyAppInstallByShop', { response });
|
|
40
|
-
return response;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=shopify-app-install-client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shopify-app-install-client.js","sourceRoot":"","sources":["../../../src/clients/internal-api/shopify-app-install-client.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,YAAY,CAAC;AAE7B,OAAO,EAAE,gBAAgB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QAC/C,OAAO,QAAsD,CAAC;IAChE,CAAC,CAAC;IAEF,0BAA0B,GAAG,KAAK,EAAE,IAAY,EAAuD,EAAE;QACvG,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;QACtC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QACpD,GAAG,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;QACrD,OAAO,QAAsD,CAAC;IAChE,CAAC,CAAC;CACH"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { User } from '@adtrackify/at-tracking-event-types';
|
|
2
|
-
import { ApiResponse } from '../../types/api-response.js';
|
|
3
|
-
export interface UserResponseData {
|
|
4
|
-
user: User;
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
}
|
|
7
|
-
export interface UserSignupRequest {
|
|
8
|
-
email: string;
|
|
9
|
-
password: string;
|
|
10
|
-
givenName: string;
|
|
11
|
-
familyName: string;
|
|
12
|
-
}
|
|
13
|
-
export declare class UsersAuthClient {
|
|
14
|
-
SERVICE_API_ROOT_URL: string;
|
|
15
|
-
BASE_API_URL: string;
|
|
16
|
-
USERS_AUTH_API_KEY: string;
|
|
17
|
-
constructor(baseApiUrl: string, usersAuthApiKey?: string);
|
|
18
|
-
getConfig: () => {
|
|
19
|
-
baseURL: string;
|
|
20
|
-
headers: {
|
|
21
|
-
common: {};
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
getClient: () => Promise<{
|
|
25
|
-
instance: () => import("axios").AxiosInstance;
|
|
26
|
-
get: (url: string, config?: any) => Promise<{
|
|
27
|
-
headers: any;
|
|
28
|
-
data: any;
|
|
29
|
-
status: any;
|
|
30
|
-
}>;
|
|
31
|
-
post: (url: string, data?: any, config?: any) => Promise<{
|
|
32
|
-
headers: any;
|
|
33
|
-
data: any;
|
|
34
|
-
status: any;
|
|
35
|
-
}>;
|
|
36
|
-
delete: (url: string, config?: any) => Promise<{
|
|
37
|
-
headers: any;
|
|
38
|
-
data: any;
|
|
39
|
-
status: any;
|
|
40
|
-
}>;
|
|
41
|
-
put: (url: string, data?: any, config?: any) => Promise<{
|
|
42
|
-
headers: any;
|
|
43
|
-
data: any;
|
|
44
|
-
status: any;
|
|
45
|
-
}>;
|
|
46
|
-
patch: (url: string, data?: any, config?: any) => Promise<{
|
|
47
|
-
headers: any;
|
|
48
|
-
data: any;
|
|
49
|
-
status: any;
|
|
50
|
-
}>;
|
|
51
|
-
setBaseUrl: (url: string) => boolean;
|
|
52
|
-
}>;
|
|
53
|
-
signupAndConfirmUser: (userSignupRequest: any) => Promise<any>;
|
|
54
|
-
signupUser: (userSignupRequest: UserSignupRequest) => Promise<any>;
|
|
55
|
-
adminConfirmUser: (email: string) => Promise<{
|
|
56
|
-
headers: any;
|
|
57
|
-
data: any;
|
|
58
|
-
status: any;
|
|
59
|
-
}>;
|
|
60
|
-
getUserByEmail: (email: string) => Promise<ApiResponse<UserResponseData>>;
|
|
61
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import * as log from 'lambda-log';
|
|
2
|
-
import { HttpError } from '../../libs/http-error.js';
|
|
3
|
-
import { HttpStatusCodes } from '../../libs/http-status-codes.js';
|
|
4
|
-
import { axiosHttpService } from '../generic/http-client.js';
|
|
5
|
-
export class UsersAuthClient {
|
|
6
|
-
SERVICE_API_ROOT_URL;
|
|
7
|
-
BASE_API_URL;
|
|
8
|
-
USERS_AUTH_API_KEY;
|
|
9
|
-
constructor(baseApiUrl, usersAuthApiKey) {
|
|
10
|
-
this.BASE_API_URL = baseApiUrl;
|
|
11
|
-
this.USERS_AUTH_API_KEY = usersAuthApiKey;
|
|
12
|
-
this.SERVICE_API_ROOT_URL = `${this.BASE_API_URL}/auth`;
|
|
13
|
-
}
|
|
14
|
-
getConfig = () => {
|
|
15
|
-
return {
|
|
16
|
-
baseURL: this.SERVICE_API_ROOT_URL,
|
|
17
|
-
headers: {
|
|
18
|
-
common: {}
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
getClient = async () => {
|
|
23
|
-
return axiosHttpService(this.getConfig());
|
|
24
|
-
};
|
|
25
|
-
signupAndConfirmUser = async (userSignupRequest) => {
|
|
26
|
-
const user = await this.signupUser(userSignupRequest);
|
|
27
|
-
await this.adminConfirmUser(user.email);
|
|
28
|
-
return user;
|
|
29
|
-
};
|
|
30
|
-
signupUser = async (userSignupRequest) => {
|
|
31
|
-
log.info('Attempting to signup user', { email: userSignupRequest.email });
|
|
32
|
-
const client = await this.getClient();
|
|
33
|
-
const response = await client.post('/signup', userSignupRequest);
|
|
34
|
-
if (response.status !== 200 || !response?.data?.user) {
|
|
35
|
-
const message = 'User Signup Failed';
|
|
36
|
-
log.error(message, { response });
|
|
37
|
-
throw new HttpError(HttpStatusCodes.INTERNAL_SERVER_ERROR, message);
|
|
38
|
-
}
|
|
39
|
-
log.info('User Signup Successful', { response });
|
|
40
|
-
return response.data.user;
|
|
41
|
-
};
|
|
42
|
-
adminConfirmUser = async (email) => {
|
|
43
|
-
log.info('Attempting to admin confirm user', { email });
|
|
44
|
-
const client = await this.getClient();
|
|
45
|
-
const response = await client.post('/admin/confirm', {
|
|
46
|
-
email
|
|
47
|
-
}, {
|
|
48
|
-
headers: {
|
|
49
|
-
'x-api-key': this.USERS_AUTH_API_KEY
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
if (response.status !== 200) {
|
|
53
|
-
const message = 'Admin User Confirmation Failed';
|
|
54
|
-
log.error(message, { response });
|
|
55
|
-
throw new HttpError(HttpStatusCodes.INTERNAL_SERVER_ERROR, message);
|
|
56
|
-
}
|
|
57
|
-
log.info('Admin User Confirmation Successful', { response });
|
|
58
|
-
return response;
|
|
59
|
-
};
|
|
60
|
-
getUserByEmail = async (email) => {
|
|
61
|
-
const client = await this.getClient();
|
|
62
|
-
const getUserResponse = await client.get('/lookup', {
|
|
63
|
-
headers: {
|
|
64
|
-
'x-api-key': this.USERS_AUTH_API_KEY
|
|
65
|
-
},
|
|
66
|
-
params: {
|
|
67
|
-
email
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
log.info('getUserResponse', { getUserResponse });
|
|
71
|
-
return getUserResponse;
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=users-auth-client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"users-auth-client.js","sourceRoot":"","sources":["../../../src/clients/internal-api/users-auth-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAc7D,MAAM,OAAO,eAAe;IAEnB,oBAAoB,CAAS;IAC7B,YAAY,CAAS;IACrB,kBAAkB,CAAS;IAClC,YAAa,UAAkB,EAAE,eAAwB;QACvD,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC;QAC/B,IAAI,CAAC,kBAAkB,GAAG,eAAyB,CAAC;QACpD,IAAI,CAAC,oBAAoB,GAAG,GAAG,IAAI,CAAC,YAAY,OAAO,CAAC;IAC1D,CAAC;IAED,SAAS,GAAG,GAAG,EAAE;QACf,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,oBAAoB;YAClC,OAAO,EAAE;gBACP,MAAM,EAAE,EACP;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,oBAAoB,GAAG,KAAK,EAAE,iBAAsB,EAAgB,EAAE;QACpE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,UAAU,CAA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AAQ,CAAC,MAAM,KAAK,GAAG,EAAE;YAC3B,MAAM,OAAO,GAAG,gCAAgC,CAAC;YACjD,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;YACjC,MAAM,IAAI,SAAS,CAAC,eAAe,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;SACrE;QAED,GAAG,CAAC,IAAI,CAAC,oCAAoC,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC7D,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC;IAEF,cAAc,GAAG,KAAK,EAAE,KAAa,EAA0C,EAAE;QAC/E,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;QACtC,MAAM,eAAe,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE;YAClD,OAAO,EAAE;gBACP,WAAW,EAAE,IAAI,CAAC,kBAAkB;aACrC;YACD,MAAM,EAAE;gBACN,KAAK;aACN;SACF,CAAC,CAAC;QACH,GAAG,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,eAAe,EAAE,CAAC,CAAC;QACjD,OAAO,eAAe,CAAC;IACzB,CAAC,CAAC;CAEH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './shopify-client.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/clients/third-party/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
export declare class ShopifyClient {
|
|
2
|
-
static _shopify_api_version: string;
|
|
3
|
-
static getConfig: (shopifyDomain: string, accessToken: string) => {
|
|
4
|
-
baseURL: string;
|
|
5
|
-
headers: {
|
|
6
|
-
common: {
|
|
7
|
-
'X-Shopify-Access-Token': string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
static getClient: (shopifyDomain: string, accessToken: string) => {
|
|
12
|
-
instance: () => import("axios").AxiosInstance;
|
|
13
|
-
get: (url: string, config?: any) => Promise<{
|
|
14
|
-
headers: any;
|
|
15
|
-
data: any;
|
|
16
|
-
status: any;
|
|
17
|
-
}>;
|
|
18
|
-
post: (url: string, data?: any, config?: any) => Promise<{
|
|
19
|
-
headers: any;
|
|
20
|
-
data: any;
|
|
21
|
-
status: any;
|
|
22
|
-
}>;
|
|
23
|
-
delete: (url: string, config?: any) => Promise<{
|
|
24
|
-
headers: any;
|
|
25
|
-
data: any;
|
|
26
|
-
status: any;
|
|
27
|
-
}>;
|
|
28
|
-
put: (url: string, data?: any, config?: any) => Promise<{
|
|
29
|
-
headers: any;
|
|
30
|
-
data: any;
|
|
31
|
-
status: any;
|
|
32
|
-
}>;
|
|
33
|
-
patch: (url: string, data?: any, config?: any) => Promise<{
|
|
34
|
-
headers: any;
|
|
35
|
-
data: any;
|
|
36
|
-
status: any;
|
|
37
|
-
}>;
|
|
38
|
-
setBaseUrl: (url: string) => boolean;
|
|
39
|
-
};
|
|
40
|
-
static registerApp: (shop: string, code: string, appKey: string, appSecret: string) => Promise<{
|
|
41
|
-
headers: any;
|
|
42
|
-
data: any;
|
|
43
|
-
status: any;
|
|
44
|
-
}>;
|
|
45
|
-
static registerWebhookTopic: (shop: string, accessToken: string, eventBridgeArn: string, topic: string) => Promise<{
|
|
46
|
-
headers: any;
|
|
47
|
-
data: any;
|
|
48
|
-
status: any;
|
|
49
|
-
}>;
|
|
50
|
-
static updateShopifyAppMetafield: (shop: string, accessToken: string, pixelId: string) => Promise<{
|
|
51
|
-
headers: any;
|
|
52
|
-
data: any;
|
|
53
|
-
status: any;
|
|
54
|
-
}>;
|
|
55
|
-
static getShopifyStoreProperties: (shop: string, accessToken: string) => Promise<{
|
|
56
|
-
headers: any;
|
|
57
|
-
data: any;
|
|
58
|
-
status: any;
|
|
59
|
-
}>;
|
|
60
|
-
static createAppSubscription: (shop: string, accessToken: string, planName: string, price: number, returnUrl: string, trialDays: number, test?: boolean) => Promise<{
|
|
61
|
-
headers: any;
|
|
62
|
-
data: any;
|
|
63
|
-
status: any;
|
|
64
|
-
}>;
|
|
65
|
-
static cancelAppSubscription: (shop: string, accessToken: string, chargeId: string) => Promise<{
|
|
66
|
-
headers: any;
|
|
67
|
-
data: any;
|
|
68
|
-
status: any;
|
|
69
|
-
}>;
|
|
70
|
-
static listAppSubscriptions: (shop: string, accessToken: string) => Promise<{
|
|
71
|
-
headers: any;
|
|
72
|
-
data: any;
|
|
73
|
-
status: any;
|
|
74
|
-
}>;
|
|
75
|
-
static genericShopifyPost: (url: string, accessToken: string, payload: any) => Promise<{
|
|
76
|
-
headers: any;
|
|
77
|
-
data: any;
|
|
78
|
-
status: any;
|
|
79
|
-
}>;
|
|
80
|
-
static genericShopifyGet: (url: string, accessToken: string) => Promise<{
|
|
81
|
-
headers: any;
|
|
82
|
-
data: any;
|
|
83
|
-
status: any;
|
|
84
|
-
}>;
|
|
85
|
-
static genericShopifyPut: (url: string, accessToken: string, payload: any) => Promise<{
|
|
86
|
-
headers: any;
|
|
87
|
-
data: any;
|
|
88
|
-
status: any;
|
|
89
|
-
}>;
|
|
90
|
-
}
|