@adtrackify/at-service-common 1.1.21 → 1.2.1

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.
Files changed (146) hide show
  1. package/dist/__tests__/helpers/subscription-helper.spec.d.ts +1 -0
  2. package/dist/__tests__/helpers/subscription-helper.spec.js +28 -0
  3. package/dist/__tests__/helpers/subscription-helper.spec.js.map +1 -0
  4. package/dist/clients/generic/cognito-client.d.ts +19 -0
  5. package/dist/clients/generic/cognito-client.js +140 -0
  6. package/dist/clients/generic/cognito-client.js.map +1 -0
  7. package/dist/clients/generic/dynamodb-client.d.ts +15 -0
  8. package/dist/clients/generic/dynamodb-client.js +123 -0
  9. package/dist/clients/generic/dynamodb-client.js.map +1 -0
  10. package/dist/clients/generic/eventbridge-client.d.ts +14 -0
  11. package/dist/clients/generic/eventbridge-client.js +46 -0
  12. package/dist/clients/generic/eventbridge-client.js.map +1 -0
  13. package/dist/clients/generic/http-client.d.ts +29 -0
  14. package/dist/clients/generic/http-client.js +30 -0
  15. package/dist/clients/generic/http-client.js.map +1 -0
  16. package/{src/clients/generic/index.ts → dist/clients/generic/index.d.ts} +5 -5
  17. package/dist/clients/generic/index.js +6 -0
  18. package/dist/clients/generic/index.js.map +1 -0
  19. package/dist/clients/generic/s3-client.d.ts +6 -0
  20. package/dist/clients/generic/s3-client.js +25 -0
  21. package/dist/clients/generic/s3-client.js.map +1 -0
  22. package/{src/clients/index.ts → dist/clients/index.d.ts} +3 -3
  23. package/dist/clients/index.js +4 -0
  24. package/dist/clients/index.js.map +1 -0
  25. package/dist/clients/internal-api/accounts-client.d.ts +82 -0
  26. package/dist/clients/internal-api/accounts-client.js +79 -0
  27. package/dist/clients/internal-api/accounts-client.js.map +1 -0
  28. package/dist/clients/internal-api/destinations-client.d.ts +54 -0
  29. package/dist/clients/internal-api/destinations-client.js +37 -0
  30. package/dist/clients/internal-api/destinations-client.js.map +1 -0
  31. package/{src/clients/internal-api/index.ts → dist/clients/internal-api/index.d.ts} +4 -4
  32. package/dist/clients/internal-api/index.js +5 -0
  33. package/dist/clients/internal-api/index.js.map +1 -0
  34. package/dist/clients/internal-api/shopify-app-install-client.d.ts +57 -0
  35. package/dist/clients/internal-api/shopify-app-install-client.js +43 -0
  36. package/dist/clients/internal-api/shopify-app-install-client.js.map +1 -0
  37. package/dist/clients/internal-api/users-auth-client.d.ts +61 -0
  38. package/dist/clients/internal-api/users-auth-client.js +74 -0
  39. package/dist/clients/internal-api/users-auth-client.js.map +1 -0
  40. package/dist/clients/third-party/index.d.ts +1 -0
  41. package/dist/clients/third-party/index.js +2 -0
  42. package/dist/clients/third-party/index.js.map +1 -0
  43. package/dist/clients/third-party/shopify-client.d.ts +90 -0
  44. package/dist/clients/third-party/shopify-client.js +122 -0
  45. package/dist/clients/third-party/shopify-client.js.map +1 -0
  46. package/{src/helpers/index.ts → dist/helpers/index.d.ts} +5 -5
  47. package/dist/helpers/index.js +6 -0
  48. package/dist/helpers/index.js.map +1 -0
  49. package/dist/helpers/input-validation-helper.d.ts +2 -0
  50. package/dist/helpers/input-validation-helper.js +19 -0
  51. package/dist/helpers/input-validation-helper.js.map +1 -0
  52. package/dist/helpers/logging-helper.d.ts +1 -0
  53. package/dist/helpers/logging-helper.js +10 -0
  54. package/dist/helpers/logging-helper.js.map +1 -0
  55. package/dist/helpers/response-helper.d.ts +36 -0
  56. package/dist/helpers/response-helper.js +36 -0
  57. package/dist/helpers/response-helper.js.map +1 -0
  58. package/dist/helpers/shopify-helper.d.ts +9 -0
  59. package/dist/helpers/shopify-helper.js +24 -0
  60. package/dist/helpers/shopify-helper.js.map +1 -0
  61. package/dist/helpers/subscription-helper.d.ts +8 -0
  62. package/dist/helpers/subscription-helper.js +182 -0
  63. package/dist/helpers/subscription-helper.js.map +1 -0
  64. package/dist/index.d.ts +5 -737
  65. package/dist/index.esm.js +6 -2
  66. package/dist/index.esm.js.map +2 -2
  67. package/dist/index.js +6 -1404
  68. package/dist/index.js.map +1 -7
  69. package/dist/libs/crypto.d.ts +1 -0
  70. package/dist/libs/crypto.js +6 -0
  71. package/dist/libs/crypto.js.map +1 -0
  72. package/dist/libs/dates.d.ts +3 -0
  73. package/dist/libs/dates.js +11 -0
  74. package/dist/libs/dates.js.map +1 -0
  75. package/dist/libs/http-error.d.ts +21 -0
  76. package/dist/libs/http-error.js +56 -0
  77. package/dist/libs/http-error.js.map +1 -0
  78. package/dist/libs/http-status-codes.d.ts +58 -0
  79. package/dist/libs/http-status-codes.js +60 -0
  80. package/dist/libs/http-status-codes.js.map +1 -0
  81. package/{src/libs/index.ts → dist/libs/index.d.ts} +6 -7
  82. package/dist/libs/index.js +7 -0
  83. package/dist/libs/index.js.map +1 -0
  84. package/dist/libs/url.d.ts +1 -0
  85. package/dist/libs/url.js +10 -0
  86. package/dist/libs/url.js.map +1 -0
  87. package/dist/services/eventbridge-integration-service.d.ts +9 -0
  88. package/dist/services/eventbridge-integration-service.js +25 -0
  89. package/dist/services/eventbridge-integration-service.js.map +1 -0
  90. package/dist/services/index.d.ts +1 -0
  91. package/dist/services/index.js +2 -0
  92. package/dist/services/index.js.map +1 -0
  93. package/{src/types/api-response.ts → dist/types/api-response.d.ts} +6 -6
  94. package/dist/types/api-response.js +2 -0
  95. package/dist/types/api-response.js.map +1 -0
  96. package/dist/types/index.d.ts +1 -0
  97. package/dist/types/index.js +2 -0
  98. package/dist/types/index.js.map +1 -0
  99. package/dist/types/internal-events/event-detail-types.d.ts +20 -0
  100. package/dist/types/internal-events/event-detail-types.js +25 -0
  101. package/dist/types/internal-events/event-detail-types.js.map +1 -0
  102. package/dist/types/internal-events/index.d.ts +1 -0
  103. package/dist/types/internal-events/index.js +2 -0
  104. package/dist/types/internal-events/index.js.map +1 -0
  105. package/package.json +14 -5
  106. package/.editorconfig +0 -12
  107. package/.eslintignore +0 -3
  108. package/.eslintrc.json +0 -37
  109. package/.husky/pre-push +0 -4
  110. package/.vscode/settings.json +0 -10
  111. package/bitbucket-pipelines.yml +0 -20
  112. package/build.js +0 -39
  113. package/env.yml +0 -9
  114. package/jest.config.ts +0 -41
  115. package/src/__tests__/helpers/subscription-helper.spec.ts +0 -41
  116. package/src/clients/generic/axios.d.ts +0 -8
  117. package/src/clients/generic/cognito-client.ts +0 -154
  118. package/src/clients/generic/dynamodb-client.ts +0 -127
  119. package/src/clients/generic/eventbridge-client.ts +0 -53
  120. package/src/clients/generic/http-client.ts +0 -34
  121. package/src/clients/generic/s3-client.ts +0 -27
  122. package/src/clients/internal-api/accounts-client.ts +0 -126
  123. package/src/clients/internal-api/destinations-client.ts +0 -58
  124. package/src/clients/internal-api/shopify-app-install-client.ts +0 -66
  125. package/src/clients/internal-api/users-auth-client.ts +0 -112
  126. package/src/clients/third-party/index.ts +0 -1
  127. package/src/clients/third-party/shopify-client.ts +0 -139
  128. package/src/helpers/input-validation-helper.ts +0 -22
  129. package/src/helpers/logging-helper.ts +0 -10
  130. package/src/helpers/response-helper.ts +0 -40
  131. package/src/helpers/shopify-helper.ts +0 -39
  132. package/src/helpers/subscription-helper.ts +0 -243
  133. package/src/index.ts +0 -5
  134. package/src/libs/crypto.ts +0 -6
  135. package/src/libs/dates.ts +0 -14
  136. package/src/libs/http-error.ts +0 -90
  137. package/src/libs/http-status-codes.ts +0 -344
  138. package/src/libs/url.ts +0 -10
  139. package/src/services/eventbridge-integration-service.ts +0 -44
  140. package/src/services/index.ts +0 -1
  141. package/src/types/index.ts +0 -1
  142. package/src/types/internal-events/event-detail-types.ts +0 -10
  143. package/src/types/internal-events/index.ts +0 -1
  144. package/tsconfig.json +0 -35
  145. package/tsconfig.tsbuildinfo +0 -1
  146. package/tslint.json +0 -6
@@ -0,0 +1,79 @@
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
@@ -0,0 +1 @@
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,SAAS,EAAE,CAAC;QACtC,MAAM,qBAAqB,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,oBAAoB,CAAC,CAAC;QAC1E,GAAG,CAAC,IAAI,CAAC,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,CAAC,CAAC;CASH"}
@@ -0,0 +1,54 @@
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
+ }
@@ -0,0 +1,37 @@
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
@@ -0,0 +1 @@
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,4 +1,4 @@
1
- export * from './destinations-client.js';
2
- export * from './accounts-client.js';
3
- export * from './users-auth-client.js';
4
- export * from './shopify-app-install-client.js';
1
+ export * from './destinations-client.js';
2
+ export * from './accounts-client.js';
3
+ export * from './users-auth-client.js';
4
+ export * from './shopify-app-install-client.js';
@@ -0,0 +1,5 @@
1
+ export * from './destinations-client.js';
2
+ export * from './accounts-client.js';
3
+ export * from './users-auth-client.js';
4
+ export * from './shopify-app-install-client.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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"}
@@ -0,0 +1,57 @@
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
+ }
@@ -0,0 +1,43 @@
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
@@ -0,0 +1 @@
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,EAAE,MAAM,2BAA2B,CAAC;AAi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,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"}
@@ -0,0 +1,61 @@
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
+ }
@@ -0,0 +1,74 @@
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
@@ -0,0 +1 @@
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,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SAAS,EAAE,CAAC;QACtC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,gBAAgB,EACjD;YACE,KAAK;SACN,EAAE;YACH,OAAO,EAAE;gBACP,WAAW,EAAE,IAAI,CAAC,kBAAkB;aACrC;SACF,CACA,CAAC;QAGF,IAAI,QAAQ,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"}
@@ -0,0 +1 @@
1
+ export * from './shopify-client.js';
@@ -0,0 +1,2 @@
1
+ export * from './shopify-client.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/clients/third-party/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,90 @@
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
+ }