Skip to content

Commit 86efd4f

Browse files
authored
Merge branch 'main' into aakash/req-acc-jwt
2 parents 8cd7457 + 26e6aef commit 86efd4f

11 files changed

Lines changed: 8967 additions & 58 deletions

File tree

‎.github/workflows/update-juno-sdk.yml‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,23 @@ jobs:
1414
run: |
1515
# fetch latest prerelease
1616
latest_prerelease=$(jq -r 'map(select(.prerelease)) | first | .tag_name' <<< "$(curl --silent https://api.github.com/repos/GTBitsOfGood/juno/releases)")
17-
17+
1818
# retrieve auto-generated sdk files
1919
wget "https://github.com/GTBitsOfGood/juno/releases/download/${latest_prerelease}/juno-client-sdk.tar.gz"
20-
20+
2121
# unzip
2222
tar -xvzf "juno-client-sdk.tar.gz"
23-
23+
2424
# move relevant api files over
2525
cp -r juno-client-sdk/api src/internal/
2626
cp -r juno-client-sdk/api.ts src/internal/
2727
cp -r juno-client-sdk/model src/internal/
2828
29-
29+
3030
# cleanup files
3131
rm "juno-client-sdk.tar.gz"
3232
rm -r "juno-client-sdk"
3333
34-
3534
- name: Create Pull Request
3635
uses: peter-evans/create-pull-request@v7
3736
with:

‎README.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
The SDK uses several models to structure the data exchanged between the client and Juno's services. These models represent the input data for API requests and the output data returned by the server.
2828

2929
#### Key Models:
30+
3031
- **CreateProjectModel**: Defines the structure for creating a new project.
3132
- **CreateUserModel**: Contains the necessary fields to create a new user (email, name, password).
3233
- **IssueApiKeyRequest**: Defines the request data for issuing an API key for a project.
@@ -41,6 +42,7 @@ The SDK uses several models to structure the data exchanged between the client a
4142
The SDK includes API methods for interacting with Juno services. These methods abstract the complexities of making HTTP requests and ensure that data is structured according to Juno's requirements.
4243

4344
#### Core APIs:
45+
4446
- **AuthApi**: Handles authentication tasks, such as issuing API keys and generating JWT tokens.
4547
- **EmailApi**: Manages email operations like sending emails and registering domains.
4648
- **ProjectApi**: Manages project-related tasks, including creating projects and linking users.
@@ -51,30 +53,35 @@ The SDK includes API methods for interacting with Juno services. These methods a
5153
The Juno SDK provides a set of APIs for managing various services. Each API is built to simplify interactions with specific Juno infrastructure components. Below is an overview of how to use the main APIs.
5254

5355
### Authentication
56+
5457
The **AuthApi** is used to handle authentication-related tasks, including issuing API keys and generating JWT tokens for secure access to Juno services.
5558

5659
- **Issue API Key**: Create a new API key for project access. This is necessary for authenticating requests to other services.
5760
- **Generate JWT**: Once you have an API key, use it to generate a JWT, which is required to authenticate further API requests.
5861

5962
### Project Management
63+
6064
The **ProjectApi** is responsible for managing projects within Juno’s infrastructure:
6165

6266
- **Create Project**: Define and create a new project using the provided model.
6367
- **Link User to Project**: Associate a user with a project, allowing them to access or contribute to the project.
6468

6569
### User Management
70+
6671
The **UserApi** is designed for creating and managing users:
6772

6873
- **Create User**: Create a new user by providing necessary details like email, name, and password.
6974
- **Set User Role**: Update a user's role to control access levels (e.g., ADMIN, SUPERADMIN).
7075

7176
### Email Management
77+
7278
The **EmailApi** allows you to manage email-related operations, such as registering domains and sending emails. It includes the following functionality:
7379

7480
- **Register Domain**: Register a domain to use as the sender of emails.
7581
- **Send Email**: Send an email through Juno’s email service by specifying the sender, recipient, and content.
7682

7783
### General Workflow
84+
7885
1. **Authentication**: Start by using the **AuthApi** to issue an API key and generate a JWT token.
7986
2. **Project and User Management**: Set up projects and link users using **ProjectApi** and **UserApi**.
8087
3. **Email Operations**: If your project involves email management, use **EmailApi** to register sender domains and send emails.

‎jest.config.js‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
/** @type {import('ts-jest').JestConfigWithTsJest} **/
22
module.exports = {
3-
testEnvironment: "node",
3+
testEnvironment: 'node',
44
transform: {
5-
"^.+.tsx?$": ["ts-jest",{}],
5+
'^.+.tsx?$': ['ts-jest', {}],
66
},
7-
roots: [
8-
"./tests/"
9-
]
7+
roots: ['./tests/'],
108
};

0 commit comments

Comments
 (0)