@vendit-dev/thirdparty-adapters 0.7.33-beta.2 → 0.7.34
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/.github/workflows/publish.yml +87 -0
- package/lib/adapters/externalChannelManagers/tl-lincoln.helper.js +6 -45
- package/package.json +1 -1
- package/.idea/codeStyles/Project.xml +0 -50
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/thirdparty-adapters.iml +0 -12
- package/.idea/vcs.xml +0 -6
- package/lib/adapters/externalChannelManagers/tl-sample.d.ts +0 -1218
- package/lib/adapters/externalChannelManagers/tl-sample.js +0 -3974
- package/test.json +0 -773
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
name: Publish to npm
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
version_bump:
|
|
7
|
+
description: "Version bump type"
|
|
8
|
+
required: true
|
|
9
|
+
type: choice
|
|
10
|
+
options:
|
|
11
|
+
- patch
|
|
12
|
+
- minor
|
|
13
|
+
- major
|
|
14
|
+
- custom
|
|
15
|
+
default: "patch"
|
|
16
|
+
custom_version:
|
|
17
|
+
description: 'Custom version (only used when "custom" is selected, e.g. 1.2.3)'
|
|
18
|
+
required: false
|
|
19
|
+
type: string
|
|
20
|
+
dry_run:
|
|
21
|
+
description: "Dry run (skip publish & git push)"
|
|
22
|
+
required: false
|
|
23
|
+
type: boolean
|
|
24
|
+
default: false
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
publish:
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
permissions:
|
|
30
|
+
contents: write
|
|
31
|
+
steps:
|
|
32
|
+
- name: Checkout
|
|
33
|
+
uses: actions/checkout@v4
|
|
34
|
+
|
|
35
|
+
- name: Setup Node.js
|
|
36
|
+
uses: actions/setup-node@v4
|
|
37
|
+
with:
|
|
38
|
+
node-version: "20"
|
|
39
|
+
registry-url: "https://registry.npmjs.org"
|
|
40
|
+
|
|
41
|
+
- name: Install dependencies
|
|
42
|
+
run: yarn install --frozen-lockfile
|
|
43
|
+
|
|
44
|
+
- name: Build
|
|
45
|
+
run: yarn build
|
|
46
|
+
|
|
47
|
+
- name: Configure Git
|
|
48
|
+
run: |
|
|
49
|
+
git config user.name "github-actions[bot]"
|
|
50
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
51
|
+
|
|
52
|
+
- name: Bump version
|
|
53
|
+
id: bump
|
|
54
|
+
run: |
|
|
55
|
+
if [ "${{ inputs.version_bump }}" = "custom" ]; then
|
|
56
|
+
VERSION="${{ inputs.custom_version }}"
|
|
57
|
+
if [ -z "$VERSION" ]; then
|
|
58
|
+
echo "::error::custom_version is required when version_bump is 'custom'"
|
|
59
|
+
exit 1
|
|
60
|
+
fi
|
|
61
|
+
npm version "$VERSION" --no-git-tag-version
|
|
62
|
+
else
|
|
63
|
+
npm version "${{ inputs.version_bump }}" --no-git-tag-version
|
|
64
|
+
fi
|
|
65
|
+
VERSION=$(node -p "require('./package.json').version")
|
|
66
|
+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
67
|
+
|
|
68
|
+
- name: Publish (dry run)
|
|
69
|
+
if: inputs.dry_run
|
|
70
|
+
run: npm publish --dry-run
|
|
71
|
+
env:
|
|
72
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
73
|
+
|
|
74
|
+
- name: Publish
|
|
75
|
+
if: ${{ !inputs.dry_run }}
|
|
76
|
+
run: npm publish
|
|
77
|
+
env:
|
|
78
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
79
|
+
|
|
80
|
+
- name: Commit, tag & push
|
|
81
|
+
if: ${{ !inputs.dry_run }}
|
|
82
|
+
run: |
|
|
83
|
+
git add package.json
|
|
84
|
+
git commit -m "v${{ steps.bump.outputs.version }}"
|
|
85
|
+
git tag "v${{ steps.bump.outputs.version }}"
|
|
86
|
+
git push
|
|
87
|
+
git push --tags
|
|
@@ -49,44 +49,14 @@ function jsonToXml(json) {
|
|
|
49
49
|
return builder.build(xmlContent);
|
|
50
50
|
}
|
|
51
51
|
exports.jsonToXml = jsonToXml;
|
|
52
|
-
var ARRAY_TAGS = [
|
|
53
|
-
'BankList',
|
|
54
|
-
'ModificationPoint',
|
|
55
|
-
'SpecialServiceRequest',
|
|
56
|
-
'OtherServiceInformation',
|
|
57
|
-
'CouponList',
|
|
58
|
-
'TotalAccommodationHotelTax',
|
|
59
|
-
'TotalAccommodationOtherFee',
|
|
60
|
-
'RoomAndGuestList',
|
|
61
|
-
'SpecialInformation',
|
|
62
|
-
'Option',
|
|
63
|
-
'RoomAndRoomRateInformation',
|
|
64
|
-
'Facilities',
|
|
65
|
-
'RoomSpecialRequest',
|
|
66
|
-
'RoomRateInformation',
|
|
67
|
-
'GuestInformationList',
|
|
68
|
-
'BlockReport',
|
|
69
|
-
'QuestionAndAnswerList',
|
|
70
|
-
'PointsDiscountList',
|
|
71
|
-
'DepositList',
|
|
72
|
-
'netAgtRmTypeList',
|
|
73
|
-
'rmTypeList',
|
|
74
|
-
'netRmTypeGroupList',
|
|
75
|
-
'planGroupList',
|
|
76
|
-
'planRankPriceList',
|
|
77
|
-
'planList',
|
|
78
|
-
'bookingInfo',
|
|
79
|
-
];
|
|
80
52
|
function xmlToJson(xml) {
|
|
81
53
|
// 
 문자는 제거하고 파싱합니다.
|
|
82
54
|
try {
|
|
83
55
|
var parser = new fast_xml_parser_1.XMLParser({
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
return false;
|
|
89
|
-
},
|
|
56
|
+
numberParseOptions: {
|
|
57
|
+
leadingZeros: false,
|
|
58
|
+
hex: false,
|
|
59
|
+
}
|
|
90
60
|
});
|
|
91
61
|
return parser.parse(xml.replace(/
/g, ''));
|
|
92
62
|
}
|
|
@@ -310,7 +280,7 @@ var makePaymentInfo = function (_a) {
|
|
|
310
280
|
});
|
|
311
281
|
}, {
|
|
312
282
|
amount: 0,
|
|
313
|
-
commissionAmount:
|
|
283
|
+
commissionAmount: 0,
|
|
314
284
|
reservationType: 'lodge',
|
|
315
285
|
segments: [],
|
|
316
286
|
externalRoomTypeCode: '',
|
|
@@ -318,15 +288,6 @@ var makePaymentInfo = function (_a) {
|
|
|
318
288
|
type: 'platform',
|
|
319
289
|
useStartAt: '',
|
|
320
290
|
});
|
|
321
|
-
if (basicRateInformation.TotalAccommodationCharge &&
|
|
322
|
-
paymentInfo.amount !== basicRateInformation.TotalAccommodationCharge) {
|
|
323
|
-
var difference = basicRateInformation.TotalAccommodationCharge - paymentInfo.amount;
|
|
324
|
-
if (paymentInfo.segments) {
|
|
325
|
-
paymentInfo.segments[paymentInfo.segments.length - 1].amount +=
|
|
326
|
-
difference;
|
|
327
|
-
}
|
|
328
|
-
paymentInfo.amount = basicRateInformation.TotalAccommodationCharge;
|
|
329
|
-
}
|
|
330
291
|
if (PointDiscountList && (PointDiscountList === null || PointDiscountList === void 0 ? void 0 : PointDiscountList.length) > 0) {
|
|
331
292
|
paymentInfo.amount -= PointDiscountList.reduce(function (acc, point) { return acc + point.PointsDiscount; }, 0);
|
|
332
293
|
// auto segment 로 생성되도록 처리
|
|
@@ -378,7 +339,7 @@ var refineReservationData = function (infoTravelXML) {
|
|
|
378
339
|
: '', "\n").concat((OtherInfo === null || OtherInfo === void 0 ? void 0 : OtherInfo.AdditionalInformation)
|
|
379
340
|
? "[\uCD94\uAC00\uC815\uBCF4]\n".concat(OtherInfo.AdditionalInformation)
|
|
380
341
|
: '', "\n").concat((0, exports.formattedPaxCountText)(BasicInformation), "\n[\uACB0\uC81C\uC815\uBCF4]\n\uC9C0\uBD88\uC218\uB2E8: ").concat(BasicRateInformation.Payment || '정보 없음', "\n").concat(BasicRateInformation.Payment === 'CreditCard'
|
|
381
|
-
? "
|
|
342
|
+
? "CVC: ".concat(BasicRateInformation.CreditCardAuthority, "\n\uCE74\uB4DC\uBC88\uD638: ").concat(BasicRateInformation.CreditCardNumber, "\n\uC720\uD6A8\uAE30\uAC04: ").concat(BasicRateInformation.ExpireDate, "\n\uC18C\uC9C0\uC790\uBA85: ").concat(BasicRateInformation.CardHolderName, "\n\uC774\uC804 \uCDE8\uC18C\uAE08\uC561: ").concat(BasicRateInformation.CancellationCharge, "\n")
|
|
382
343
|
: '', "\n\uC218\uC218\uB8CC\uC728: ").concat(BasicRateInformation.CommissionPercentage
|
|
383
344
|
? "".concat(BasicRateInformation.CommissionPercentage, "%")
|
|
384
345
|
: '정보 없음', "\n\uC218\uC218\uB8CC \uCD1D\uC561: ").concat(BasicRateInformation.TotalAccommodationCommissionAmount
|
package/package.json
CHANGED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<component name="ProjectCodeStyleConfiguration">
|
|
2
|
-
<code_scheme name="Project" version="173">
|
|
3
|
-
<JSCodeStyleSettings version="0">
|
|
4
|
-
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
5
|
-
<option name="USE_DOUBLE_QUOTES" value="false" />
|
|
6
|
-
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
7
|
-
<option name="VAR_DECLARATION_WRAP" value="2" />
|
|
8
|
-
<option name="OBJECT_LITERAL_WRAP" value="2" />
|
|
9
|
-
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
10
|
-
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
11
|
-
</JSCodeStyleSettings>
|
|
12
|
-
<TypeScriptCodeStyleSettings version="0">
|
|
13
|
-
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
14
|
-
<option name="USE_DOUBLE_QUOTES" value="false" />
|
|
15
|
-
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
16
|
-
<option name="VAR_DECLARATION_WRAP" value="2" />
|
|
17
|
-
<option name="OBJECT_LITERAL_WRAP" value="2" />
|
|
18
|
-
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
19
|
-
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
20
|
-
</TypeScriptCodeStyleSettings>
|
|
21
|
-
<codeStyleSettings language="JavaScript">
|
|
22
|
-
<option name="BLOCK_COMMENT_ADD_SPACE" value="true" />
|
|
23
|
-
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
|
|
24
|
-
<option name="ALIGN_MULTILINE_FOR" value="false" />
|
|
25
|
-
<option name="METHOD_CALL_CHAIN_WRAP" value="2" />
|
|
26
|
-
<option name="IF_BRACE_FORCE" value="1" />
|
|
27
|
-
<option name="DOWHILE_BRACE_FORCE" value="1" />
|
|
28
|
-
<option name="WHILE_BRACE_FORCE" value="1" />
|
|
29
|
-
<option name="FOR_BRACE_FORCE" value="1" />
|
|
30
|
-
<indentOptions>
|
|
31
|
-
<option name="INDENT_SIZE" value="2" />
|
|
32
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
33
|
-
</indentOptions>
|
|
34
|
-
</codeStyleSettings>
|
|
35
|
-
<codeStyleSettings language="TypeScript">
|
|
36
|
-
<option name="BLOCK_COMMENT_ADD_SPACE" value="true" />
|
|
37
|
-
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
|
|
38
|
-
<option name="ALIGN_MULTILINE_FOR" value="false" />
|
|
39
|
-
<option name="METHOD_CALL_CHAIN_WRAP" value="2" />
|
|
40
|
-
<option name="IF_BRACE_FORCE" value="1" />
|
|
41
|
-
<option name="DOWHILE_BRACE_FORCE" value="1" />
|
|
42
|
-
<option name="WHILE_BRACE_FORCE" value="1" />
|
|
43
|
-
<option name="FOR_BRACE_FORCE" value="1" />
|
|
44
|
-
<indentOptions>
|
|
45
|
-
<option name="INDENT_SIZE" value="2" />
|
|
46
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
47
|
-
</indentOptions>
|
|
48
|
-
</codeStyleSettings>
|
|
49
|
-
</code_scheme>
|
|
50
|
-
</component>
|
package/.idea/modules.xml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectModuleManager">
|
|
4
|
-
<modules>
|
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/thirdparty-adapters.iml" filepath="$PROJECT_DIR$/.idea/thirdparty-adapters.iml" />
|
|
6
|
-
</modules>
|
|
7
|
-
</component>
|
|
8
|
-
</project>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="WEB_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager">
|
|
4
|
-
<content url="file://$MODULE_DIR$">
|
|
5
|
-
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
6
|
-
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
7
|
-
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
-
</content>
|
|
9
|
-
<orderEntry type="inheritedJdk" />
|
|
10
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
11
|
-
</component>
|
|
12
|
-
</module>
|