Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.
Merged
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
8 changes: 4 additions & 4 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 2f8b2839-3001-46b4-b5e0-cec0aad583ed
management:
docChecksum: 2401c7030f847f72ab31c8f75de58a66
docChecksum: 2422daf10293e923232daf08349ae0ae
docVersion: 0.2.0
speakeasyVersion: 1.274.1
speakeasyVersion: 1.276.0
generationVersion: 2.314.0
releaseVersion: 0.4.0
configChecksum: b02e7a1aec479cdaff173c813fc5f9c5
releaseVersion: 0.4.1
configChecksum: 02bbee7871c8eb9f1e6449a9a884ae2e
repoURL: https://github.com/StyraInc/opa-typescript.git
installationURL: https://github.com/StyraInc/opa-typescript
published: true
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
typescript:
version: 0.4.0
version: 0.4.1
additionalDependencies:
dependencies: {}
devDependencies:
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
speakeasyVersion: 1.274.1
speakeasyVersion: 1.276.0
sources:
openapi: {}
targets:
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,14 @@ Based on:
### Generated
- [typescript v0.4.0] .
### Releases
- [NPM v0.4.0] https://www.npmjs.com/package/@styra/opa/v/0.4.0 - .
- [NPM v0.4.0] https://www.npmjs.com/package/@styra/opa/v/0.4.0 - .

## 2024-04-29 00:14:27
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.276.0 (2.314.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.4.1] .
### Releases
- [NPM v0.4.1] https://www.npmjs.com/package/@styra/opa/v/0.4.1 - .
7 changes: 1 addition & 6 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ async function run() {
const result = await opaApiClient.executePolicyWithInput({
path: "app/rbac",
requestBody: {
input: {
user: "alice",
action: "read",
object: "id123",
type: "dog",
},
input: false,
},
});

Expand Down
7 changes: 1 addition & 6 deletions docs/sdks/opaapiclient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,7 @@ async function run() {
const result = await opaApiClient.executePolicyWithInput({
path: "app/rbac",
requestBody: {
input: {
"user": "alice",
"action": "read",
"object": "id123",
"type": "dog",
},
input: false,
},
});

Expand Down
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
"name": "@styra/opa",
"version": "0.4.0",
"version": "0.4.1",
"exports": {
".": "./src/index.ts",
"./sdk/models/errors": "./src/sdk/models/errors/index.ts",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@styra/opa",
"version": "0.4.0",
"version": "0.4.1",
"author": "Styra",
"main": "./index.js",
"sideEffects": false,
Expand Down
4 changes: 2 additions & 2 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "0.2.0",
sdkVersion: "0.4.0",
sdkVersion: "0.4.1",
genVersion: "2.314.0",
userAgent: "speakeasy-sdk/typescript 0.4.0 2.314.0 0.2.0 @styra/opa",
userAgent: "speakeasy-sdk/typescript 0.4.1 2.314.0 0.2.0 @styra/opa",
} as const;
14 changes: 7 additions & 7 deletions src/sdk/models/components/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ import * as z from "zod";
/**
* Arbitrary JSON used within your policies by accessing `input`
*/
export type Input = Record<string, any> | boolean | string | Array<any> | number;
export type Input = boolean | string | number | Array<any> | Record<string, any>;

/** @internal */
export namespace Input$ {
export type Inbound = Record<string, any> | boolean | string | Array<any> | number;
export type Inbound = boolean | string | number | Array<any> | Record<string, any>;

export type Outbound = Record<string, any> | boolean | string | Array<any> | number;
export type Outbound = boolean | string | number | Array<any> | Record<string, any>;
export const inboundSchema: z.ZodType<Input, z.ZodTypeDef, Inbound> = z.union([
z.record(z.any()),
z.boolean(),
z.string(),
z.array(z.any()),
z.number(),
z.array(z.any()),
z.record(z.any()),
]);
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Input> = z.union([
z.record(z.any()),
z.boolean(),
z.string(),
z.array(z.any()),
z.number(),
z.array(z.any()),
z.record(z.any()),
]);
}
14 changes: 7 additions & 7 deletions src/sdk/models/components/result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ import * as z from "zod";
/**
* The base or virtual document referred to by the URL path. If the path is undefined, this key will be omitted.
*/
export type Result = Record<string, any> | boolean | string | Array<any> | number;
export type Result = boolean | string | number | Array<any> | Record<string, any>;

/** @internal */
export namespace Result$ {
export type Inbound = Record<string, any> | boolean | string | Array<any> | number;
export type Inbound = boolean | string | number | Array<any> | Record<string, any>;

export type Outbound = Record<string, any> | boolean | string | Array<any> | number;
export type Outbound = boolean | string | number | Array<any> | Record<string, any>;
export const inboundSchema: z.ZodType<Result, z.ZodTypeDef, Inbound> = z.union([
z.record(z.any()),
z.boolean(),
z.string(),
z.array(z.any()),
z.number(),
z.array(z.any()),
z.record(z.any()),
]);
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Result> = z.union([
z.record(z.any()),
z.boolean(),
z.string(),
z.array(z.any()),
z.number(),
z.array(z.any()),
z.record(z.any()),
]);
}