Skip to content

Commit a9e1cc3

Browse files
Merge pull request #14 from openapi/upkeep
Upkeep
2 parents 09d73d1 + 6d5eaf2 commit a9e1cc3

File tree

9 files changed

+149
-20
lines changed

9 files changed

+149
-20
lines changed

.github/REPOINFO.txt

Whitespace-only changes.

.github/assets/repo-header-a3.png

89 KB
Loading

.github/assets/repo-header-a3.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Image Description Sheet
2+
-----------------------
3+
4+
File Name: repo-header-a3.png
5+
Format: PNG
6+
Dimensions: 830 x 173 pixels
7+
8+
Short Description:
9+
A banner image featuring the word "PHP" on the left, PHP code snippet in the background,
10+
and the Openapi logo on the right.
11+
12+
Purpose:
13+
This image is intended to be used as a header/banner for documentation or repository README.
14+
It visually associates Rust programming language with the Openapi SDK/client,
15+
giving a professional and modern look to the project materials.

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,42 @@ The MIT License is a permissive open-source license that allows you to freely us
211211
In short, you are free to use this SDK in your personal, academic, or commercial projects, with minimal restrictions. The project is provided "as-is", without any warranty of any kind, either expressed or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement.
212212

213213
For more details, see the full license text at the [MIT License page](https://choosealicense.com/licenses/mit/).
214+
215+
## Contributing
216+
217+
Contributions are always welcome! Whether you want to report bugs, suggest new features, improve documentation, or contribute code, your help is appreciated.
218+
219+
See [docs/contributing.md](docs/contributing.md) for detailed instructions on how to get started. Please make sure to follow this project's [docs/code-of-conduct.md](docs/code-of-conduct.md) to help maintain a welcoming and collaborative environment.
220+
221+
## Authors
222+
223+
Meet the project authors:
224+
225+
- Michael Cuffaro ([@maiku1008](https://www.github.com/maiku1008))
226+
- Openapi Team ([@openapi-it](https://github.com/openapi-it))
227+
228+
## Partners
229+
230+
Meet our partners using Openapi or contributing to this SDK:
231+
232+
- [Blank](https://www.blank.app/)
233+
- [Credit Safe](https://www.creditsafe.com/)
234+
- [Deliveroo](https://deliveroo.it/)
235+
- [Gruppo MOL](https://molgroupitaly.it/it/)
236+
- [Jakala](https://www.jakala.com/)
237+
- [Octotelematics](https://www.octotelematics.com/)
238+
- [OTOQI](https://otoqi.com/)
239+
- [PWC](https://www.pwc.com/)
240+
- [QOMODO S.R.L.](https://www.qomodo.me/)
241+
- [SOUNDREEF S.P.A.](https://www.soundreef.com/)
242+
243+
## License
244+
245+
This project is licensed under the [MIT License](LICENSE).
246+
247+
The MIT License is a permissive open-source license that allows you to freely use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the software, provided that the original copyright notice and this permission notice are included in all copies or substantial portions of the software.
248+
249+
In short, you are free to use this SDK in your personal, academic, or commercial projects, with minimal restrictions. The project is provided "as-is", without any warranty of any kind, either expressed or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement.
250+
251+
For more details, see the full license text at the [MIT License page](https://choosealicense.com/licenses/mit/).
252+

docs/code-of-conduct.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project a harassment-free experience for everyone.
6+
7+
## Our Standards
8+
9+
Examples of positive behavior:
10+
11+
- Using welcoming and inclusive language
12+
- Being respectful of differing viewpoints and experiences
13+
- Gracefully accepting constructive criticism
14+
- Focusing on what is best for the community
15+
- Showing empathy toward other community members
16+
17+
Examples of unacceptable behavior:
18+
19+
- Harassment, intimidation, or discrimination
20+
- Public or private insults and derogatory comments
21+
- Publishing others’ private information without consent
22+
- Any other conduct reasonably considered inappropriate
23+
24+
## Enforcement
25+
26+
Instances of unacceptable behavior may be reported by contacting the project team at `<hello@openapi.com>`. All complaints will be reviewed promptly and fairly.
27+
28+
## Attribution
29+
30+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.

docs/contributing.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Contributing to Openapi SDK
2+
3+
Thanks for considering contributing! 🎉
4+
We welcome all kinds of contributions: bug reports, feature requests, documentation improvements, and code enhancements.
5+
6+
## How to Contribute
7+
8+
1. **Fork the repository** and clone it locally:
9+
```bash
10+
git clone https://github.com/<username>/<repo>.git
11+
```
12+
13+
2. **Create a branch** for your feature or fix:
14+
```bash
15+
git checkout -b feature/your-feature-name
16+
```
17+
18+
3. **Make your changes** and commit them:
19+
```bash
20+
git commit -m "Add some feature"
21+
```
22+
23+
4. **Push your branch** to your fork:
24+
```bash
25+
git push origin feature/your-feature-name
26+
```
27+
28+
5. **Open a Pull Request** describing your changes.
29+
30+
## Guidelines
31+
32+
* Follow the existing **Rust coding style**.
33+
* Include **tests** for new features or bug fixes when applicable.
34+
* Keep **commit messages clear and concise**.
35+
* Update **documentation** as needed for your changes.
36+
37+
## Reporting Issues
38+
39+
To report bugs or request features, please **open an issue** on GitHub including:
40+
41+
* Clear description of the problem or feature.
42+
* Steps to reproduce (if applicable).
43+
* Relevant logs or screenshots.
44+
45+
Thank you for helping improve Openapi SDK! 🚀

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"homepage": "https://developers.openapi.it",
2020
"repository": {
2121
"type": "git",
22-
"url": "https://github.com/openapi-it/OpenApi-NodeJS"
22+
"url": "https://github.com/openapi-it/Openapi-NodeJS"
2323
},
2424
"bugs": {
2525
"url": "https://github.com/openapi-it/OpenApi-NodeJS/issues"

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ export class OauthClient {
1818

1919
constructor(username: string, apiKey: string, isTest: boolean = false) {
2020
this.baseUrl = isTest ? 'https://test.oauth.altravia.com' : 'https://oauth.altravia.com';
21-
21+
2222
const auth = Buffer.from(`${username}:${apiKey}`).toString('base64');
23-
23+
2424
this.client = axios.create({
2525
baseURL: this.baseUrl,
2626
headers: {

test/client.test.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// import OpenApi from '../dist/index';
1+
// import Openapi from '../dist/index';
22
const fs = require('fs');
3-
let OpenApi = require('../dist/index').default;
3+
let Openapi = require('../dist/index').default;
44

55
const scopes = [
66
"GET:ws.ufficiopostale.com/raccomandate",
@@ -30,27 +30,27 @@ const scopes = [
3030

3131
test('init', async function() {
3232

33-
let client = await OpenApi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY);
33+
let client = await Openapi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY);
3434
const token = await client.generateToken(scopes);
3535
expect(typeof token === 'string').toBeTruthy()
3636
})
3737

3838
test('initWithString', async function() {
3939

40-
let client = await OpenApi.init('production', process.env.OPENAPI_USERNAME, process.env.API_KEY);
40+
let client = await Openapi.init('production', process.env.OPENAPI_USERNAME, process.env.API_KEY);
4141
const token = await client.generateToken('imprese.altravia.com');
4242
expect(typeof token === 'string').toBeTruthy()
4343
console.log(client.scopes);
4444
})
4545

4646
test('initWithToken', async function() {
47-
let client = await OpenApi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY, process.env.TOKEN);
47+
let client = await Openapi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY, process.env.TOKEN);
4848
expect(client.comuni).toBeDefined();
4949
})
5050

5151
test('initWithOldToken', async function() {
5252

53-
let client = new OpenApi('test', process.env.OPENAPI_USERNAME, process.env.API_KEY);
53+
let client = new Openapi('test', process.env.OPENAPI_USERNAME, process.env.API_KEY);
5454

5555
const token = process.env.OLD_TOKEN;
5656
expect(typeof token === 'string').toBe(true);
@@ -60,7 +60,7 @@ test('initWithOldToken', async function() {
6060

6161
test('initWithSkip', async function() {
6262

63-
let client = new OpenApi('test', process.env.OPENAPI_USERNAME, process.env.API_KEY);
63+
let client = new Openapi('test', process.env.OPENAPI_USERNAME, process.env.API_KEY);
6464

6565
const token = process.env.TOKEN;
6666
expect(typeof token === 'string').toBe(true);
@@ -79,7 +79,7 @@ test('testComuni', async function() {
7979
const token = process.env.TOKEN;
8080
expect(typeof token === 'string').toBe(true);
8181

82-
let client = await OpenApi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY, token);
82+
let client = await Openapi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY, token);
8383

8484

8585
const cap = await client.comuni.getCitiesByCap('00121')
@@ -98,7 +98,7 @@ test('testComuni', async function() {
9898
})
9999

100100
test('testImprese', async function() {
101-
let client = await OpenApi.init('production', process.env.OPENAPI_USERNAME, process.env.API_KEY, process.env.TOKEN);
101+
let client = await Openapi.init('production', process.env.OPENAPI_USERNAME, process.env.API_KEY, process.env.TOKEN);
102102
console.log(JSON.stringify(client.scopes, null, 2));
103103

104104
const piva = await client.imprese.getByPartitaIva('12485671007')
@@ -125,14 +125,14 @@ test('testImprese', async function() {
125125
})
126126

127127
test('testPa', async function() {
128-
let client = await OpenApi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY, process.env.TOKEN);
128+
let client = await Openapi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY, process.env.TOKEN);
129129
client.generateToken(scopes)
130130
const piva = await client.pa.findPa('00559720982')
131131
expect(piva).toBeDefined();
132132
})
133133

134134
test('testFD', async function() {
135-
let client = await OpenApi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY, process.env.TOKEN);
135+
let client = await Openapi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY, process.env.TOKEN);
136136
// const prodotti = await client.firmaDigitale.getProducts();
137137
// expect(prodotti).toBeDefined();
138138

@@ -161,13 +161,13 @@ test('testFD', async function() {
161161
})
162162

163163
test('testMT', async function() {
164-
let client = await OpenApi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY, process.env.TOKEN);
164+
let client = await Openapi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY, process.env.TOKEN);
165165
const lotto = await client.marcheTemporali.checkLotto('FAKETSA.altravia16', 'FAKE9R155S9VF');
166166
expect(lotto.used).toBeDefined()
167167
})
168168

169169
test('testValutometro', async function() {
170-
let client = await OpenApi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY, process.env.TOKEN);
170+
let client = await Openapi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY, process.env.TOKEN);
171171
const p = await client.valutometro.listPropertyTypes()
172172
expect(p[0]).toBeDefined()
173173

@@ -180,7 +180,7 @@ test('testValutometro', async function() {
180180
})
181181

182182
test('testVisengine', async function() {
183-
let client = await OpenApi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY, process.env.TOKEN);
183+
let client = await Openapi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY, process.env.TOKEN);
184184
const s = await client.visengine.listServices()
185185
expect(s[0]).toBeDefined()
186186

@@ -199,7 +199,7 @@ test('testVisengine', async function() {
199199

200200

201201
test('testsms', async function() {
202-
let client = await OpenApi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY, process.env.TOKEN);
202+
let client = await Openapi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY, process.env.TOKEN);
203203
// const list = await client.sms.getMessages()
204204
// console.log(list);
205205
const sms = await client.sms.send('test', 'Test sms', ['+39-3939989741'], 0, {}, true)
@@ -208,7 +208,7 @@ test('testsms', async function() {
208208
})
209209

210210
test('testUP', async function() {
211-
let client = await OpenApi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY, process.env.TOKEN);
211+
let client = await Openapi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY, process.env.TOKEN);
212212
// const list = await client.ufficioPostale.listRaccomandate('NEW')
213213
// expect(list).toBeDefined()
214214
const mitt = {
@@ -263,7 +263,7 @@ test('testUP', async function() {
263263
})
264264

265265
test('testUPlol', async function() {
266-
let client = await OpenApi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY);
266+
let client = await Openapi.init('test', process.env.OPENAPI_USERNAME, process.env.API_KEY);
267267
await client.generateToken('ws.ufficiopostale.com');
268268
const mitt = {
269269
"titolo": "mr",

0 commit comments

Comments
 (0)