Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update client all #31

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 155 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions packages/sdk-client-aca/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# dependencies
node_modules

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
wwwroot/*.js
dist

# System Files
.DS_Store
Thumbs.db

# other
.env
.env.production
.npmrc
.nyc_output
coverage
10 changes: 10 additions & 0 deletions packages/sdk-client-aca/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm

node_modules
coverage
.vscode
.DS_Store
.nyc_output
.history
.idea
Thumbs.db
23 changes: 23 additions & 0 deletions packages/sdk-client-aca/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
14 changes: 14 additions & 0 deletions packages/sdk-client-aca/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.gitignore
.npmignore
.openapi-generator-ignore
README.md
api.ts
base.ts
common.ts
configuration.ts
git_push.sh
index.ts
package.json
project.json
tsconfig.esm.json
tsconfig.json
1 change: 1 addition & 0 deletions packages/sdk-client-aca/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.2.0
53 changes: 53 additions & 0 deletions packages/sdk-client-aca/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
## @affinidi/test-sdk-client-aca

### Usage

```bash
npm install @affinidi/test-sdk-client-aca --save
```

#### With PAT

To call service methods with personal access token, you need to get a getProjectScopedToken for the machine user:

```ts
import { SomeClassApi, Configuration } from '@affinidi/test-sdk-client-aca';
import { authProvider } from '@affinidi/test-auth-provider';

const projectScopedToken = await authProvider.getProjectScopedToken({
apiGatewayUrl,
projectId,
machineUserId,
tokenEndpoint,
privateKey,
passphrase,
keyId,
publicKey,
});

const api = new SomeClassApi(
new Configuration({
apiKey: projectScopedToken,
basePath: `${apiGatewayUrl}/aca`,
})
);

await api.oneOfMethods();
```

#### With session ID via BFF

```ts
import { SomeClassApi, Configuration } from '@affinidi/test-sdk-client-aca';
import { getBffHeaders } from '@affinidi/test-auth-provider';

const headers = getBffHeaders(cookieName, sessionId);

const baseOptions = { headers };

const api = new SomeClassApi(
new Configuration({ basePath: `${bffHost}/aca`, baseOptions })
);

await api.oneOfMethods();
```
Loading
Loading