@vendit-dev/thirdparty-adapters 0.4.0-beta.1 → 0.4.0-beta.10

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.
@@ -1,75 +1,60 @@
1
- import { UserServiceGrpcCaller } from '@vendit-dev/utility-modules';
2
- import { AmanoHttpResponse, DeletePreDiscountInfoInput, DeletePreDiscountInfoResponse, FeeCarSearchInput, GetFeeCarSearchResponse, GetPreDiscountListInfoResponse, InsertPreDiscountInfoInput, InsertPreDiscountInfoResponse, PreDiscountListInfoInput, UpdatePreDiscountInfoInput, UpdatePreDiscountInfoResponse } from '../types/amanoKorea';
3
- import MutexLock from '../utils/mutex';
4
- declare type VenditAmanoKoreaAuthInfo = {
5
- scope: string;
6
- credential: {
7
- lotAreaNo: string;
8
- registUserId: string;
9
- password: string;
10
- eqpmNo: string;
11
- discCodeNo: string;
12
- };
13
- };
14
- export default class AmanoKoreaAdapter {
15
- API_HOST: string;
16
- TEST_SERVER_URL: string;
17
- authenticator: UserServiceGrpcCaller;
18
- redis: any;
19
- PROVIDER_KEY: string;
20
- mutexLock: MutexLock;
21
- authorization: string;
22
- dateFormat: string;
23
- defaultPreDiscountInfo: {
24
- lotAreaNo: number;
25
- registUserId: string;
26
- registUserName: string;
27
- preDiscountId: number;
28
- discCodeNo: number;
29
- carNo: string;
30
- dcCount: number;
31
- startDtm: string;
32
- endDtm: string;
33
- dongcode: string;
34
- hocode: string;
35
- memo: string;
36
- mobile: string;
37
- };
38
- constructor({ authenticator, redis, apiHost, }: {
39
- authenticator: UserServiceGrpcCaller;
40
- redis: any;
41
- apiHost: string;
42
- });
43
- parseJSONSafe: (str: string) => any | boolean;
44
- static indexAccommodation: ({ accommodationId, }: {
45
- accommodationId: string;
46
- }) => string;
47
- checkAmanoKoreaIntegration: ({ accommodationId, }: {
48
- accommodationId: string;
49
- }) => Promise<boolean>;
50
- getAccommodationAuthInfo: ({ accommodationId, }: {
51
- accommodationId: string;
52
- }) => Promise<VenditAmanoKoreaAuthInfo | boolean>;
53
- setAuthorization: ({ authorization }: {
54
- authorization: string;
55
- }) => void;
56
- callAPI: <TRequestType, TReturnType extends AmanoHttpResponse<any> = AmanoHttpResponse<any>, TErrorType extends AmanoHttpResponse<any> = AmanoHttpResponse<any>>({ directory, resources, }: {
57
- directory: string;
58
- resources: TRequestType;
59
- }) => Promise<TReturnType | TErrorType>;
60
- syncTimeToMCS: () => Promise<string>;
61
- getPreDiscountListInfo: (resources: PreDiscountListInfoInput) => Promise<AmanoHttpResponse<GetPreDiscountListInfoResponse>>;
62
- insertPreDiscountInfo: ({ resources, }: {
63
- resources: InsertPreDiscountInfoInput;
64
- }) => Promise<AmanoHttpResponse<InsertPreDiscountInfoResponse>>;
65
- updatePreDiscountInfo: ({ resources, }: {
66
- resources: UpdatePreDiscountInfoInput;
67
- }) => Promise<AmanoHttpResponse<UpdatePreDiscountInfoResponse>>;
68
- deletePreDiscountInfo: ({ resources, }: {
69
- resources: DeletePreDiscountInfoInput;
70
- }) => Promise<AmanoHttpResponse<DeletePreDiscountInfoResponse>>;
71
- getFeeCarSearch: ({ resources, }: {
72
- resources: FeeCarSearchInput;
73
- }) => Promise<AmanoHttpResponse<GetFeeCarSearchResponse>>;
74
- }
75
- export {};
1
+ import { UserServiceGrpcCaller } from '@vendit-dev/utility-modules';
2
+ import { AmanoHttpResponse, DeletePreDiscountInfoInput, DeletePreDiscountInfoResponse, FeeCarSearchInput, GetFeeCarSearchResponse, GetPreDiscountListInfoResponse, InsertPreDiscountInfoInput, InsertPreDiscountInfoResponse, PreDiscountListInfoInput, UpdatePreDiscountInfoInput, UpdatePreDiscountInfoResponse } from '../types/amanoKorea';
3
+ import MutexLock from '../utils/mutex';
4
+ declare type VenditAmanoKoreaAuthInfo = {
5
+ scope: string;
6
+ credential: {
7
+ lotAreaNo: string;
8
+ registUserId: string;
9
+ password: string;
10
+ eqpmNo: string;
11
+ discCodeNo: string;
12
+ };
13
+ };
14
+ export default class AmanoKoreaAdapter {
15
+ API_HOST: string;
16
+ API_PORT: number;
17
+ authenticator: UserServiceGrpcCaller;
18
+ redis: any;
19
+ PROVIDER_KEY: string;
20
+ mutexLock: MutexLock;
21
+ authorization: string;
22
+ dateFormat: string;
23
+ lotAreaNo: number;
24
+ discCodeNo: number;
25
+ constructor({ authenticator, redis, }: {
26
+ authenticator: UserServiceGrpcCaller;
27
+ redis: any;
28
+ });
29
+ parseJSONSafe: (str: string) => any | boolean;
30
+ static indexAccommodation: ({ accommodationId, }: {
31
+ accommodationId: string;
32
+ }) => string;
33
+ checkAmanoKoreaIntegration: ({ accommodationId, }: {
34
+ accommodationId: string;
35
+ }) => Promise<boolean>;
36
+ getAccommodationAuthInfo: ({ accommodationId, }: {
37
+ accommodationId: string;
38
+ }) => Promise<VenditAmanoKoreaAuthInfo | boolean>;
39
+ setAuthorization: ({ authorization }: {
40
+ authorization: string;
41
+ }) => void;
42
+ callAPI: <TRequestType, TReturnType extends AmanoHttpResponse<any> = AmanoHttpResponse<any>, TErrorType extends AmanoHttpResponse<any> = AmanoHttpResponse<any>>({ directory, resources, }: {
43
+ directory: string;
44
+ resources: TRequestType;
45
+ }) => Promise<TReturnType | TErrorType>;
46
+ getPreDiscountListInfo: (resources: PreDiscountListInfoInput) => Promise<AmanoHttpResponse<GetPreDiscountListInfoResponse>>;
47
+ insertPreDiscountInfo: ({ resources, }: {
48
+ resources: InsertPreDiscountInfoInput;
49
+ }) => Promise<AmanoHttpResponse<InsertPreDiscountInfoResponse>>;
50
+ updatePreDiscountInfo: ({ resources, }: {
51
+ resources: UpdatePreDiscountInfoInput;
52
+ }) => Promise<AmanoHttpResponse<UpdatePreDiscountInfoResponse>>;
53
+ deletePreDiscountInfo: ({ resources, }: {
54
+ resources: DeletePreDiscountInfoInput;
55
+ }) => Promise<AmanoHttpResponse<DeletePreDiscountInfoResponse>>;
56
+ getFeeCarSearch: ({ resources, }: {
57
+ resources: FeeCarSearchInput;
58
+ }) => Promise<AmanoHttpResponse<GetFeeCarSearchResponse>>;
59
+ }
60
+ export {};