Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

Commit 6e55bc0

Browse files
srenatuschendrixspeakeasybot
authored
massage module structure + typedoc (#43)
* Nest models under sdk subpackage * Move porcelain up to root level * ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.252.0 * typedoc: add favicon * typedoc: reorder links (top-right) Signed-off-by: Stephan Renatus <stephan@styra.com> Co-authored-by: Chris Hendrix <chendrix@styra.com> Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
1 parent dc21257 commit 6e55bc0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+216
-179
lines changed

.genignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
LICENSE
22
/src/helpers
3-
/src/porcelain
43
/src/index.ts
54
/.eslintrc.js

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
/sdk/models/errors
12
/models
23
/models/errors
34
/types
45
/lib
56
/sdk
67
/hooks
78
/index.*
9+
/opaclient.*
810
/cjs
911
/node_modules
1012
/.tsbuildinfo
11-
/porcelain
13+
/output

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
/cjs
99
/.github
1010
/.speakeasy
11+
/.typedoc

.speakeasy/gen.lock

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ id: 2f8b2839-3001-46b4-b5e0-cec0aad583ed
33
management:
44
docChecksum: 2401c7030f847f72ab31c8f75de58a66
55
docVersion: 0.2.0
6-
speakeasyVersion: 1.250.0
7-
generationVersion: 2.304.1
8-
releaseVersion: 0.2.5
9-
configChecksum: 3718ba08271d1d35549f6862040a1f7a
6+
speakeasyVersion: 1.252.0
7+
generationVersion: 2.306.0
8+
releaseVersion: 0.2.6
9+
configChecksum: 8c20639be93c10198d3995021b1a1f6c
1010
repoURL: https://github.com/StyraInc/opa-typescript.git
1111
installationURL: https://github.com/StyraInc/opa-typescript
1212
published: true
@@ -34,55 +34,55 @@ generatedFiles:
3434
- src/lib/security.ts
3535
- src/lib/url.ts
3636
- src/sdk/index.ts
37-
- src/models/errors/sdkerror.ts
38-
- src/models/errors/sdkvalidationerror.ts
37+
- src/sdk/models/errors/sdkerror.ts
38+
- src/sdk/models/errors/sdkvalidationerror.ts
3939
- src/types/blobs.ts
4040
- src/types/index.ts
4141
- src/types/operations.ts
4242
- src/types/rfcdate.ts
4343
- tsconfig.json
44-
- src/models/operations/executepolicy.ts
45-
- src/models/operations/executepolicywithinput.ts
46-
- src/models/operations/health.ts
47-
- src/models/components/successfulpolicyevaluation.ts
48-
- src/models/components/provenance.ts
49-
- src/models/components/result.ts
50-
- src/models/components/httpmetadata.ts
51-
- src/models/components/explain.ts
52-
- src/models/components/gzipacceptencoding.ts
53-
- src/models/components/input.ts
54-
- src/models/components/gzipcontentencoding.ts
55-
- src/models/components/healthyserver.ts
56-
- src/models/errors/clienterror.ts
57-
- src/models/errors/servererror.ts
58-
- src/models/errors/unhealthyserver.ts
59-
- src/models/errors/index.ts
60-
- src/models/operations/index.ts
61-
- src/models/components/index.ts
62-
- docs/models/operations/executepolicyrequest.md
63-
- docs/models/operations/executepolicyresponse.md
64-
- docs/models/operations/executepolicywithinputrequestbody.md
65-
- docs/models/operations/executepolicywithinputrequest.md
66-
- docs/models/operations/executepolicywithinputresponse.md
67-
- docs/models/operations/healthrequest.md
68-
- docs/models/operations/healthresponse.md
69-
- docs/models/components/successfulpolicyevaluation.md
70-
- docs/models/components/revision.md
71-
- docs/models/components/provenance.md
72-
- docs/models/components/result.md
73-
- docs/models/components/httpmetadata.md
74-
- docs/models/components/explain.md
75-
- docs/models/components/gzipacceptencoding.md
76-
- docs/models/components/input.md
77-
- docs/models/components/gzipcontentencoding.md
78-
- docs/models/components/healthyserver.md
79-
- docs/models/errors/location.md
80-
- docs/models/errors/errors.md
81-
- docs/models/errors/clienterror.md
82-
- docs/models/errors/servererrorlocation.md
83-
- docs/models/errors/servererrorerrors.md
84-
- docs/models/errors/servererror.md
85-
- docs/models/errors/unhealthyserver.md
44+
- src/sdk/models/operations/executepolicy.ts
45+
- src/sdk/models/operations/executepolicywithinput.ts
46+
- src/sdk/models/operations/health.ts
47+
- src/sdk/models/components/successfulpolicyevaluation.ts
48+
- src/sdk/models/components/provenance.ts
49+
- src/sdk/models/components/result.ts
50+
- src/sdk/models/components/httpmetadata.ts
51+
- src/sdk/models/components/explain.ts
52+
- src/sdk/models/components/gzipacceptencoding.ts
53+
- src/sdk/models/components/input.ts
54+
- src/sdk/models/components/gzipcontentencoding.ts
55+
- src/sdk/models/components/healthyserver.ts
56+
- src/sdk/models/errors/clienterror.ts
57+
- src/sdk/models/errors/servererror.ts
58+
- src/sdk/models/errors/unhealthyserver.ts
59+
- src/sdk/models/errors/index.ts
60+
- src/sdk/models/operations/index.ts
61+
- src/sdk/models/components/index.ts
62+
- docs/sdk/models/operations/executepolicyrequest.md
63+
- docs/sdk/models/operations/executepolicyresponse.md
64+
- docs/sdk/models/operations/executepolicywithinputrequestbody.md
65+
- docs/sdk/models/operations/executepolicywithinputrequest.md
66+
- docs/sdk/models/operations/executepolicywithinputresponse.md
67+
- docs/sdk/models/operations/healthrequest.md
68+
- docs/sdk/models/operations/healthresponse.md
69+
- docs/sdk/models/components/successfulpolicyevaluation.md
70+
- docs/sdk/models/components/revision.md
71+
- docs/sdk/models/components/provenance.md
72+
- docs/sdk/models/components/result.md
73+
- docs/sdk/models/components/httpmetadata.md
74+
- docs/sdk/models/components/explain.md
75+
- docs/sdk/models/components/gzipacceptencoding.md
76+
- docs/sdk/models/components/input.md
77+
- docs/sdk/models/components/gzipcontentencoding.md
78+
- docs/sdk/models/components/healthyserver.md
79+
- docs/sdk/models/errors/location.md
80+
- docs/sdk/models/errors/errors.md
81+
- docs/sdk/models/errors/clienterror.md
82+
- docs/sdk/models/errors/servererrorlocation.md
83+
- docs/sdk/models/errors/servererrorerrors.md
84+
- docs/sdk/models/errors/servererror.md
85+
- docs/sdk/models/errors/unhealthyserver.md
8686
- docs/sdks/opaapiclient/README.md
8787
- USAGE.md
8888
- .gitattributes

.speakeasy/gen.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ generation:
1212
auth:
1313
oAuth2ClientCredentialsEnabled: false
1414
typescript:
15-
version: 0.2.5
15+
version: 0.2.6
1616
additionalDependencies:
1717
dependencies: {}
1818
devDependencies:
@@ -21,6 +21,7 @@ typescript:
2121
testcontainers: ^10.7.2
2222
ts-node: ^10.9.2
2323
typedoc: ^0.25.13
24+
typedoc-plugin-extras: ^3.0.0
2425
typedoc-plugin-replace-text: ^3.3.0
2526
peerDependencies: {}
2627
author: Styra
@@ -30,11 +31,11 @@ typescript:
3031
imports:
3132
option: openapi
3233
paths:
33-
callbacks: models/callbacks
34-
errors: models/errors
35-
operations: models/operations
36-
shared: models/components
37-
webhooks: models/webhooks
34+
callbacks: sdk/models/callbacks
35+
errors: sdk/models/errors
36+
operations: sdk/models/operations
37+
shared: sdk/models/components
38+
webhooks: sdk/models/webhooks
3839
inputModelSuffix: input
3940
maxMethodParams: 4
4041
outputModelSuffix: output

.typedoc/favicon.ico

14.7 KB
Binary file not shown.

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,10 @@ Please refer to [the repository's README.md](https://github.com/StyraInc/opa-typ
259259
```typescript
260260
import { OpaApiClient } from "@styra/opa";
261261

262-
async function run() {
263-
const sdk = new OpaApiClient();
262+
const opaApiClient = new OpaApiClient();
264263

265-
const result = await sdk.executePolicyWithInput({
264+
async function run() {
265+
const result = await opaApiClient.executePolicyWithInput({
266266
path: "app/rbac",
267267
requestBody: {
268268
input: {
@@ -309,14 +309,14 @@ Validation errors can also occur when either method arguments or data returned f
309309

310310
```typescript
311311
import { OpaApiClient } from "@styra/opa";
312-
import * as errors from "@styra/opa/models/errors";
312+
import * as errors from "@styra/opa/sdk/models/errors";
313313

314-
async function run() {
315-
const sdk = new OpaApiClient();
314+
const opaApiClient = new OpaApiClient();
316315

316+
async function run() {
317317
let result;
318318
try {
319-
result = await sdk.executePolicy({
319+
result = await opaApiClient.executePolicy({
320320
path: "app/rbac",
321321
});
322322
} catch (err) {
@@ -365,12 +365,12 @@ You can override the default server globally by passing a server index to the `s
365365
```typescript
366366
import { OpaApiClient } from "@styra/opa";
367367

368-
async function run() {
369-
const sdk = new OpaApiClient({
370-
serverIdx: 0,
371-
});
368+
const opaApiClient = new OpaApiClient({
369+
serverIdx: 0,
370+
});
372371

373-
const result = await sdk.executePolicy({
372+
async function run() {
373+
const result = await opaApiClient.executePolicy({
374374
path: "app/rbac",
375375
});
376376

@@ -390,12 +390,12 @@ The default server can also be overridden globally by passing a URL to the `serv
390390
```typescript
391391
import { OpaApiClient } from "@styra/opa";
392392

393-
async function run() {
394-
const sdk = new OpaApiClient({
395-
serverURL: "http://localhost:8181",
396-
});
393+
const opaApiClient = new OpaApiClient({
394+
serverURL: "http://localhost:8181",
395+
});
397396

398-
const result = await sdk.executePolicy({
397+
async function run() {
398+
const result = await opaApiClient.executePolicy({
399399
path: "app/rbac",
400400
});
401401

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,14 @@ Based on:
8888
### Generated
8989
- [typescript v0.2.5] .
9090
### Releases
91-
- [NPM v0.2.5] https://www.npmjs.com/package/@styra/opa/v/0.2.5 - .
91+
- [NPM v0.2.5] https://www.npmjs.com/package/@styra/opa/v/0.2.5 - .
92+
93+
## 2024-04-12 19:27:59
94+
### Changes
95+
Based on:
96+
- OpenAPI Doc
97+
- Speakeasy CLI 1.252.0 (2.306.0) https://github.com/speakeasy-api/speakeasy
98+
### Generated
99+
- [typescript v0.2.6] .
100+
### Releases
101+
- [NPM v0.2.6] https://www.npmjs.com/package/@styra/opa/v/0.2.6 - .

USAGE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
```typescript
33
import { OpaApiClient } from "@styra/opa";
44

5-
async function run() {
6-
const sdk = new OpaApiClient();
5+
const opaApiClient = new OpaApiClient();
76

8-
const result = await sdk.executePolicyWithInput({
7+
async function run() {
8+
const result = await opaApiClient.executePolicyWithInput({
99
path: "app/rbac",
1010
requestBody: {
1111
input: {

docs/models/errors/clienterror.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)