ti2 1.0.7 → 1.0.11

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.
@@ -8,14 +8,13 @@ on:
8
8
 
9
9
  jobs:
10
10
  tag:
11
- if: ${{ github.event.workflow_run.conclusion == 'success' }}
11
+ if: github.event.workflow_run.conclusion == 'success' && github.repository == 'ti2travel/ti2'
12
12
  runs-on: ubuntu-latest
13
13
  steps:
14
14
  - uses: actions/checkout@master
15
15
  - uses: tool3/bump@master
16
16
  with:
17
17
  github_token: ${{ secrets.GITHUB_TOKEN }}
18
- unrelated: true
19
18
  user: 'Github Action Job'
20
19
  email: 'engineering@tourconnect.com'
21
20
  branch: main
@@ -5,13 +5,37 @@ on:
5
5
  push:
6
6
 
7
7
  jobs:
8
- build_and_test:
8
+ test:
9
+ timeout-minutes: 10
9
10
  runs-on: ubuntu-latest
11
+ container:
12
+ image: node:erbium
13
+ services:
14
+ mysql:
15
+ image: mysql
16
+ env:
17
+ MYSQL_DATABASE: ti2development
18
+ MYSQL_ALLOW_EMPTY_PASSWORD: true
19
+ MYSQL_ROOT_PASSWORD: root
20
+ ports:
21
+ - 3306:3306
22
+ env:
23
+ CI: true
24
+ DB_URL: 'mysql://root:root@mysql/ti2development'
25
+ dbCryptoKey: 'YmYzYzE5OWMyNDcwY2I0NzdkOTA3YjFlMDkxN2MxN2I='
26
+ jwtSecret: '9rifawckwztuKehocJOtGM6deTqICGWzIyc5CqgNyi'
27
+ frontendKey: 'lYjEJHzb7lbQ1hk3ypjX'
28
+ adminKey: 'IxEAYjHbbUYhsPjQXwX1'
10
29
  steps:
11
- - uses: actions/checkout@v2
12
- - uses: actions/setup-node@v1
13
- with:
14
- node-version: 12
15
- - run: npm ci
16
- - run: npm run build --if-present
17
- - run: npm test
30
+ - uses: actions/checkout@v2
31
+ - uses: actions/setup-node@v1
32
+ with:
33
+ node-version: 12
34
+ - name: install dependencies
35
+ run: npm i
36
+ - name: create/migrate the database
37
+ run: npx sequelize db:create && npx sequelize db:migrate
38
+ - name: seed the database
39
+ run: npx sequelize db:seed:all
40
+ - name: run the tests
41
+ run: npx jest -i --coverage --forceExit
package/README.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Ti2
2
- Tourism Industry Interchange
2
+
3
+ Ti2 (Tourism Information Interchange) is an open source integration framework, built by and for the tourism community. Ti2's goal is to make integrations in our industry faster and easier to build, while providing a framework for innovation on top of these integrations.
4
+
5
+ Core functions of Ti2 are currently focused on content, rates, and bookings.
6
+
7
+ ## About this Project
8
+
9
+ ### How it Works
10
+
11
+ Ti2 has a core codebase of standardized industry functions (new, update, cancel, etc.) for bookings, content, and rates - with more to come. Plugins are used to connect to the Ti2 to perform a task (like create a booking). There are two types of plugins: Integration and App.
12
+
13
+ Integration Plugins are used to connect core systems, like booking/reservation or content management systems, to Ti2. For example, you would use a Integration Plugin to connect Ventrata to Ti2. You would do this to be able to accept bookings from another system (like an OTA) connected to Ti2. *Ti2 allows any Integration Plugin to communicate with each other; therefore, once a Integration Plugin is live, no one ever needs to write a custom integration for that system again.*
14
+
15
+ App Plugins are value added tools that only speak to Ti2 and other plugins. For example, you might create an App Plugin that sends email notifications every morning with a list of all active bookings for the day. You would retrieve the list of bookings for the day by using a System Plugin.
16
+
17
+ Ti2 can be deployed on your own servers, or you can connect to a Ti2 instance that another company is hosting.
18
+
19
+ ### Why use Ti2 ?
20
+
21
+ Ti2 gives a free, open source solution to building integrations across our industry. In addition, tools can be built on top of Ti2, that add additional value to these integrations - whether for the good of our industry or for profit.
22
+
23
+ **Become part of the community, start building on Ti2 today!**
3
24
 
4
25
  ## Getting Started
5
26
 
@@ -8,7 +29,7 @@ Tourism Industry Interchange
8
29
  Some environment variables are required for ti2 to start
9
30
 
10
31
  - DB_URL (mysql connection in url format)
11
- - dbCryptoKey (integration details encription key)
32
+ - dbCryptoKey (integration details encription key, should be a 32 chars random string base64 encoded)
12
33
  - adminKey (a key for admin related requests)
13
34
  - jwtKey (a key to encrypt user sessions request)
14
35
  - frontendKey (an additional optional key to validate the origin of the requests)
@@ -16,10 +37,10 @@ Some environment variables are required for ti2 to start
16
37
 
17
38
  ### Starting your server
18
39
 
19
- You can start your own instance by adding a requirement on your own nodejs project as follows:
40
+ You can start your own instance by instlling ti2 and any aplugin syou may want to use on your own nodejs project root folter:
20
41
 
21
42
  ```bash
22
- $ npm i ti2
43
+ $ npm i ti2 ti2-travelgate ti2-ventrata ti2-tourconnect
23
44
  ```
24
45
 
25
46
  To start the server with default values use the following:
@@ -46,12 +67,31 @@ Plugin ENV variable name convention: ti2_pluginName_environmenVariableName, for
46
67
  ti2_tourconnect_apiUrl=http://backend:8080
47
68
  ```
48
69
 
49
- ### Available Plugins
50
-
51
- | Repo | Features | Maintainer |
52
- | ---- | -------- | ---------- |
53
- | [ti2-ventrata](https://github.com/TourConnect/ti2-ventrata) | Bookings: Search, Cancellation | TourConnect |
54
- | [ti2-travelgate](https://github.com/TourConnect/ti2-travelgate) | Bookings: Search, Cancellation | TourConnect |
70
+ ### Plugin Library
71
+
72
+ | Methods | [Ventrata](https://github.com/TourConnect/ti2-ventrata) | [TravelGateX](https://github.com/TourConnect/ti2-travelgate) | [Didgigo](https://github.com/TourConnect/ti2-didgigo) | [TourConnect](https://github.com/TourConnect/ti2-tourconnect)
73
+ | ---- | -------- | ---------- | ---- | ---- |
74
+ |**Base**|
75
+ |validateToken|||✓|✓|
76
+ |copyMedia||||✓|
77
+ |**Content**|
78
+ |getProfile|||✓|✓|
79
+ |updateProfile||||✓|
80
+ |getLocations|||✓|✓|
81
+ |getLocation|||✓|✓|
82
+ |createLocation|||✓|✓|
83
+ |updateLocation|||✓|✓|
84
+ |getProducts|||✓|✓|
85
+ |getProduct|||✓|✓|
86
+ |createProduct|||✓|✓|
87
+ |updateProduct|||✓|✓|
88
+ |**Bookings**|
89
+ |searchProducts|✓|✓|
90
+ |searchBooking|✓|✓|
91
+ |searchAvailability|✓|✓|
92
+ |quoteAvailability|✓|✓|
93
+ |createBooking|✓|✓|
94
+ |cancelBooking|✓|✓|
55
95
 
56
96
  ## API logging
57
97
 
@@ -90,7 +130,7 @@ Feel free to check the [Issues Page](https://github.com/TourConnect/ti2/issues).
90
130
 
91
131
  ## License
92
132
 
93
- Distributed under the GPL-3 License. See LICENSE.txt for more information.
133
+ Distributed under the GPL-3 License. See LICENSE file for more information.
94
134
 
95
135
  TL;DR Here's what the license entails:
96
136