@adtrackify/at-service-common 1.0.39 → 1.0.41
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/index.d.ts +21 -17
- package/dist/index.js +166 -151
- package/dist/index.js.map +4 -4
- package/package.json +2 -2
- package/src/clients/internal-api/users-auth-client.ts +9 -2
- package/src/helpers/index.ts +2 -1
- package/src/helpers/input-validation-helper.ts +3 -3
- package/src/helpers/shopify-helper.ts +39 -0
- package/src/libs/index.ts +1 -1
- package/src/libs/shopify.ts +0 -25
package/dist/index.d.ts
CHANGED
|
@@ -208,6 +208,12 @@ declare module '@adtrackify/at-service-common/clients/internal-api/index' {
|
|
|
208
208
|
|
|
209
209
|
}
|
|
210
210
|
declare module '@adtrackify/at-service-common/clients/internal-api/users-auth-client' {
|
|
211
|
+
import { User } from '@adtrackify/at-tracking-event-types';
|
|
212
|
+
import { ApiResponse } from '@adtrackify/at-service-common/types/api-response';
|
|
213
|
+
export interface UserResponseData {
|
|
214
|
+
user: User;
|
|
215
|
+
[key: string]: any;
|
|
216
|
+
}
|
|
211
217
|
export class UsersAuthClient {
|
|
212
218
|
SERVICE_API_ROOT_URL: string;
|
|
213
219
|
BASE_API_URL: string;
|
|
@@ -253,11 +259,7 @@ declare module '@adtrackify/at-service-common/clients/internal-api/users-auth-cl
|
|
|
253
259
|
data: any;
|
|
254
260
|
status: any;
|
|
255
261
|
}>;
|
|
256
|
-
getUserByEmail: (email: string) => Promise<
|
|
257
|
-
headers: any;
|
|
258
|
-
data: any;
|
|
259
|
-
status: any;
|
|
260
|
-
}>;
|
|
262
|
+
getUserByEmail: (email: string) => Promise<ApiResponse<UserResponseData>>;
|
|
261
263
|
}
|
|
262
264
|
|
|
263
265
|
}
|
|
@@ -346,6 +348,7 @@ declare module '@adtrackify/at-service-common/helpers/index' {
|
|
|
346
348
|
export * from '@adtrackify/at-service-common/helpers/input-validation-helper';
|
|
347
349
|
export * from '@adtrackify/at-service-common/helpers/logging-helper';
|
|
348
350
|
export * from '@adtrackify/at-service-common/helpers/response-helper';
|
|
351
|
+
export * from '@adtrackify/at-service-common/helpers/shopify-helper';
|
|
349
352
|
|
|
350
353
|
}
|
|
351
354
|
declare module '@adtrackify/at-service-common/helpers/input-validation-helper' {
|
|
@@ -395,6 +398,18 @@ declare module '@adtrackify/at-service-common/helpers/response-helper' {
|
|
|
395
398
|
body: string;
|
|
396
399
|
};
|
|
397
400
|
|
|
401
|
+
}
|
|
402
|
+
declare module '@adtrackify/at-service-common/helpers/shopify-helper' {
|
|
403
|
+
export interface ShopifyRequestValidationParameters {
|
|
404
|
+
code: string;
|
|
405
|
+
hmac?: string;
|
|
406
|
+
shop: string;
|
|
407
|
+
state: string;
|
|
408
|
+
timestamp: string;
|
|
409
|
+
}
|
|
410
|
+
export const isShopifyRequestValid: (validationParams: ShopifyRequestValidationParameters, validationHmac: string, shopifyAppApiSecret: string) => boolean;
|
|
411
|
+
export const validateShopifyRequest: (validationParams: ShopifyRequestValidationParameters, validationHmac: string, shopifyAppApiSecret: string) => boolean;
|
|
412
|
+
|
|
398
413
|
}
|
|
399
414
|
declare module '@adtrackify/at-service-common/index' {
|
|
400
415
|
export * from '@adtrackify/at-service-common/clients/index';
|
|
@@ -499,24 +514,13 @@ declare module '@adtrackify/at-service-common/libs/http-status-codes' {
|
|
|
499
514
|
|
|
500
515
|
}
|
|
501
516
|
declare module '@adtrackify/at-service-common/libs/index' {
|
|
517
|
+
export * from '@adtrackify/at-service-common/helpers/shopify-helper';
|
|
502
518
|
export * from '@adtrackify/at-service-common/libs/crypto';
|
|
503
519
|
export * from '@adtrackify/at-service-common/libs/dates';
|
|
504
520
|
export * from '@adtrackify/at-service-common/libs/http-error';
|
|
505
521
|
export * from '@adtrackify/at-service-common/libs/http-status-codes';
|
|
506
|
-
export * from '@adtrackify/at-service-common/libs/shopify';
|
|
507
522
|
export * from '@adtrackify/at-service-common/libs/url';
|
|
508
523
|
|
|
509
|
-
}
|
|
510
|
-
declare module '@adtrackify/at-service-common/libs/shopify' {
|
|
511
|
-
export interface ShopifyRequestValidationParameters {
|
|
512
|
-
code: string;
|
|
513
|
-
hmac?: string;
|
|
514
|
-
shop: string;
|
|
515
|
-
state: string;
|
|
516
|
-
timestamp: string;
|
|
517
|
-
}
|
|
518
|
-
export const validateShopifyAppParameters: (validationParams: ShopifyRequestValidationParameters, validationHmac: string, shopifyAppApiSecret: string) => boolean;
|
|
519
|
-
|
|
520
524
|
}
|
|
521
525
|
declare module '@adtrackify/at-service-common/libs/url' {
|
|
522
526
|
export const mapObjectToQueryString: (inputObj: any) => string;
|