@smartytalent/api-client 0.1.0 → 0.1.1
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/LICENSE +23 -0
- package/README.md +74 -0
- package/package.json +13 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Copyright (c) 2026 SmartyTalent (SmartyMeet sp. z o.o.)
|
|
2
|
+
|
|
3
|
+
All rights reserved.
|
|
4
|
+
|
|
5
|
+
This software and associated documentation files (the "Software") are the
|
|
6
|
+
proprietary property of SmartyTalent (SmartyMeet sp. z o.o.) and are protected by
|
|
7
|
+
copyright law.
|
|
8
|
+
|
|
9
|
+
The Software is licensed, not sold. Use of the Software is permitted only by
|
|
10
|
+
authorized employees, contractors, and partners of SmartyTalent under the
|
|
11
|
+
terms of a valid agreement.
|
|
12
|
+
|
|
13
|
+
Unauthorized copying, modification, distribution, or use of this Software,
|
|
14
|
+
in whole or in part, is strictly prohibited without prior written permission
|
|
15
|
+
from SmartyTalent.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# @smartytalent/api-client
|
|
2
|
+
|
|
3
|
+
TypeScript API client for the SmartyTalent platform, auto-generated from the OpenAPI spec.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @smartytalent/api-client
|
|
9
|
+
# or
|
|
10
|
+
pnpm add @smartytalent/api-client
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { Configuration, TenantsApi, UsersApi, RolesApi } from '@smartytalent/api-client'
|
|
17
|
+
|
|
18
|
+
const config = new Configuration({
|
|
19
|
+
basePath: 'https://api.example.com',
|
|
20
|
+
headers: {
|
|
21
|
+
Authorization: `Bearer ${accessToken}`
|
|
22
|
+
}
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
const tenantsApi = new TenantsApi(config)
|
|
26
|
+
const usersApi = new UsersApi(config)
|
|
27
|
+
const rolesApi = new RolesApi(config)
|
|
28
|
+
|
|
29
|
+
// Fetch tenants
|
|
30
|
+
const tenants = await tenantsApi.listTenants()
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Development
|
|
34
|
+
|
|
35
|
+
### Prerequisites
|
|
36
|
+
|
|
37
|
+
- Node.js 20+
|
|
38
|
+
- AWS CLI configured (for S3 access to the API spec)
|
|
39
|
+
|
|
40
|
+
### Generate SDK
|
|
41
|
+
|
|
42
|
+
Fetches the latest OpenAPI spec from S3 and generates the TypeScript client:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm run generate
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Build
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npm run build
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Publish
|
|
55
|
+
|
|
56
|
+
Generate, build, and publish to npm in one step:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npm run release
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Or manually bump version and publish:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm version patch
|
|
66
|
+
npm publish --access public
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## How it works
|
|
70
|
+
|
|
71
|
+
1. The OpenAPI spec is fetched from `s3://sm-dev03-tb-s3-bucket/apispec/dist/dist_api_spec.yaml`
|
|
72
|
+
2. `openapi-generator-cli` generates a `typescript-fetch` client into `src/`
|
|
73
|
+
3. TypeScript compiles `src/` to `dist/`
|
|
74
|
+
4. Only `dist/` is published to npm
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartytalent/api-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "TypeScript API client generated from SmartyTalent OpenAPI spec",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
|
+
"fetch-spec": "bash scripts/fetch-spec.sh",
|
|
11
12
|
"generate": "bash scripts/generate.sh",
|
|
12
13
|
"build": "tsc",
|
|
13
14
|
"prepublishOnly": "npm run build",
|
|
@@ -20,6 +21,17 @@
|
|
|
20
21
|
"publishConfig": {
|
|
21
22
|
"access": "public"
|
|
22
23
|
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"smartytalent",
|
|
26
|
+
"smartymeet",
|
|
27
|
+
"api-client",
|
|
28
|
+
"sdk",
|
|
29
|
+
"openapi",
|
|
30
|
+
"typescript",
|
|
31
|
+
"recruitment",
|
|
32
|
+
"hr",
|
|
33
|
+
"talent-management"
|
|
34
|
+
],
|
|
23
35
|
"license": "UNLICENSED",
|
|
24
36
|
"devDependencies": {
|
|
25
37
|
"@openapitools/openapi-generator-cli": "^2.30.0",
|