-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
2,245 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.gitignore | ||
.npmignore | ||
.openapi-generator-ignore | ||
README.md | ||
api.ts | ||
base.ts | ||
common.ts | ||
configuration.ts | ||
git_push.sh | ||
index.ts | ||
package.json | ||
tsconfig.esm.json | ||
tsconfig.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
7.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
## @affinidi/test-sdk-client-cwe | ||
|
||
### Usage | ||
|
||
```bash | ||
npm install @affinidi/test-sdk-client-cwe --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-cwe'; | ||
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}/cwe`, | ||
}) | ||
); | ||
|
||
await api.oneOfMethods(); | ||
``` | ||
|
||
#### With session ID via BFF | ||
|
||
```ts | ||
import { SomeClassApi, Configuration } from '@affinidi/test-sdk-client-cwe'; | ||
import { getBffHeaders } from '@affinidi/test-auth-provider'; | ||
|
||
const headers = getBffHeaders(cookieName, sessionId); | ||
|
||
const baseOptions = { headers }; | ||
|
||
const api = new SomeClassApi( | ||
new Configuration({ basePath: `${bffHost}/cwe`, baseOptions }) | ||
); | ||
|
||
await api.oneOfMethods(); | ||
``` |
Oops, something went wrong.