@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.
- package/lib/adapters/amanoKorea.d.ts +60 -75
- package/lib/adapters/amanoKorea.js +303 -292
- package/lib/adapters/sanhaWings.d.ts +179 -179
- package/lib/adapters/sanhaWings.js +841 -841
- package/lib/adapters/smartAccess.d.ts +90 -90
- package/lib/adapters/smartAccess.js +465 -465
- package/lib/adapters/themrIoT.d.ts +148 -148
- package/lib/adapters/themrIoT.js +301 -301
- package/lib/index.d.ts +5 -4
- package/lib/index.js +14 -12
- package/lib/types/amanoKorea.d.ts +124 -124
- package/lib/types/amanoKorea.js +2 -2
- package/lib/utils/mutex.d.ts +14 -14
- package/lib/utils/mutex.js +93 -93
- package/package.json +43 -43
- package/readme.md +4 -4
|
@@ -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
|
-
|
|
17
|
-
authenticator: UserServiceGrpcCaller;
|
|
18
|
-
redis: any;
|
|
19
|
-
PROVIDER_KEY: string;
|
|
20
|
-
mutexLock: MutexLock;
|
|
21
|
-
authorization: string;
|
|
22
|
-
dateFormat: string;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}) => Promise<
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}) => Promise<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}) =>
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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 {};
|