Skip to content

Commit

Permalink
Merge pull request #16 from Codehagen/speakeasy-sdk-regen-1718841894
Browse files Browse the repository at this point in the history
chore: 🐝 Update SDK - Generate
  • Loading branch information
Codehagen committed Jun 20, 2024
2 parents b25b933 + b46937a commit 9186b18
Show file tree
Hide file tree
Showing 28 changed files with 88 additions and 80 deletions.
File renamed without changes.
12 changes: 6 additions & 6 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ id: 6250b250-1f28-403b-a1c6-452ade2211c7
management:
docChecksum: 277eb484dd0b1cc1e11e50240c91e379
docVersion: 1.0.0
speakeasyVersion: 1.307.2
generationVersion: 2.342.2
releaseVersion: 0.1.18
configChecksum: 1bb034b9765ca039fdbe0c13094f88e0
speakeasyVersion: 1.310.0
generationVersion: 2.347.4
releaseVersion: 0.2.0
configChecksum: 10248a8e6314bdfd497207cdce423dbc
repoURL: https://github.com/Codehagen/dingify-sdk.git
installationURL: https://github.com/Codehagen/dingify-sdk
published: true
features:
typescript:
additionalDependencies: 0.1.0
core: 3.9.14
core: 3.10.0
globalSecurity: 2.82.9
globalSecurityCallbacks: 0.1.0
globalSecurityFlattening: 0.1.0
Expand All @@ -23,7 +23,7 @@ features:
generatedFiles:
- src/sdk/events.ts
- src/sdk/sdk.ts
- .eslintrc.js
- .eslintrc.cjs
- .npmignore
- RUNTIMES.md
- jsr.json
Expand Down
3 changes: 2 additions & 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.1.18
version: 0.2.0
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand All @@ -37,3 +37,4 @@ typescript:
packageName: dingify
responseFormat: flat
templateVersion: v2
useIndexModules: true
6 changes: 3 additions & 3 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
speakeasyVersion: 1.307.2
speakeasyVersion: 1.310.0
sources:
sample-source:
sourceNamespace: sample-source
sourceRevisionDigest: sha256:a388dffc34f12d912e555ee3b5a212f03876e57aee84edddf4ab08f2ac982ff8
sourceRevisionDigest: sha256:b781689ad32f78399a654e73cbd51f9539a506cedbce54d72872a5d456b4b939
sourceBlobDigest: sha256:cbed9d93c9141a3cb32d5922de1f7db6c4afbe92ac04620db41dea7ea4abf063
tags:
- latest
Expand All @@ -11,7 +11,7 @@ targets:
my-first-target:
source: sample-source
sourceNamespace: sample-source
sourceRevisionDigest: sha256:a388dffc34f12d912e555ee3b5a212f03876e57aee84edddf4ab08f2ac982ff8
sourceRevisionDigest: sha256:b781689ad32f78399a654e73cbd51f9539a506cedbce54d72872a5d456b4b939
sourceBlobDigest: sha256:cbed9d93c9141a3cb32d5922de1f7db6c4afbe92ac04620db41dea7ea4abf063
outLocation: /github/workspace/repo
workflow:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Validation errors can also occur when either method arguments or data returned f

```typescript
import { Dingify } from "dingify";
import * as errors from "dingify/models/errors";
import { SDKValidationError } from "dingify/models/errors";

const dingify = new Dingify({
apiKey: "<YOUR_API_KEY_HERE>",
Expand All @@ -154,7 +154,7 @@ async function run() {
});
} catch (err) {
switch (true) {
case err instanceof errors.SDKValidationError: {
case err instanceof SDKValidationError: {
// Validation errors can be pretty-printed
console.error(err.pretty());
// Raw value may also be inspected
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,14 @@ Based on:
### Generated
- [typescript v0.1.18] .
### Releases
- [NPM v0.1.18] https://www.npmjs.com/package/dingify/v/0.1.18 - .
- [NPM v0.1.18] https://www.npmjs.com/package/dingify/v/0.1.18 - .

## 2024-06-20 00:04:52
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.310.0 (2.347.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.2.0] .
### Releases
- [NPM v0.2.0] https://www.npmjs.com/package/dingify/v/0.2.0 - .
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": "dingify",
"version": "0.1.18",
"version": "0.2.0",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/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": "dingify",
"version": "0.1.18",
"version": "0.2.0",
"author": "Speakeasy",
"main": "./index.js",
"sideEffects": false,
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

import { RequestInput } from "../lib/http";
import { RequestInput } from "../lib/http.js";
import {
AfterErrorContext,
AfterErrorHook,
Expand All @@ -15,7 +15,7 @@ import {
Hooks,
SDKInitHook,
SDKInitOptions,
} from "./types";
} from "./types.js";

export class SDKHooks implements Hooks {
sdkInitHooks: SDKInitHook[] = [];
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

export * from "./types";
export * from "./hooks";
export * from "./types.js";
export * from "./hooks.js";
2 changes: 1 addition & 1 deletion src/hooks/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

import { HTTPClient, RequestInput } from "../lib/http";
import { HTTPClient, RequestInput } from "../lib/http.js";

export type HookContext = {
operationID: string;
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

export * from "./sdk";
export * from "./lib/config";
export * from "./sdk/sdk.js";
export * from "./lib/config.js";
12 changes: 6 additions & 6 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

import { HTTPClient } from "./http";
import { RetryConfig } from "./retries";
import { Params, pathToFunc } from "./url";
import { HTTPClient } from "./http.js";
import { RetryConfig } from "./retries.js";
import { Params, pathToFunc } from "./url.js";

/**
* Contains the list of servers available to the SDK
Expand Down Expand Up @@ -54,7 +54,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "1.0.0",
sdkVersion: "0.1.18",
genVersion: "2.342.2",
userAgent: "speakeasy-sdk/typescript 0.1.18 2.342.2 1.0.0 dingify",
sdkVersion: "0.2.0",
genVersion: "2.347.4",
userAgent: "speakeasy-sdk/typescript 0.2.0 2.347.4 1.0.0 dingify",
} as const;
4 changes: 2 additions & 2 deletions src/lib/encodings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

import { bytesToBase64 } from "./base64";
import { isPlainObject } from "./is-plain-object";
import { bytesToBase64 } from "./base64.js";
import { isPlainObject } from "./is-plain-object.js";

export class EncodingError extends Error {
constructor(message: string) {
Expand Down
14 changes: 5 additions & 9 deletions src/lib/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/

import { never as znever } from "zod";
import { parse } from "./schemas";
import { isPlainObject } from "./is-plain-object";
import * as errors from "../models/errors";
import { parse } from "./schemas.js";
import { isPlainObject } from "./is-plain-object.js";
import { SDKError } from "../models/errors/sdkerror.js";

export type Fetcher = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;

Expand Down Expand Up @@ -406,7 +406,7 @@ export class ResponseMatcher<Result> {
}
if (pred == null) {
const responseBody = await response.text();
throw new errors.SDKError(
throw new SDKError(
"Unexpected API response status or content-type",
response,
responseBody
Expand Down Expand Up @@ -446,11 +446,7 @@ export class ResponseMatcher<Result> {
const resultKey = pred.key || options?.resultKey;
let data: unknown;
if (pred.fail) {
throw new errors.SDKError(
"API error occurred",
response,
typeof raw === "string" ? raw : ""
);
throw new SDKError("API error occurred", response, typeof raw === "string" ? raw : "");
} else if (pred.err) {
data = {
...options?.extraFields,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

import { output, ZodEffects, ZodError, ZodObject, ZodRawShape, ZodTypeAny } from "zod";
import { SDKValidationError } from "../models/errors/sdkvalidationerror";
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";

/**
* Utility function that executes some code which may throw a ZodError. It
Expand Down
13 changes: 7 additions & 6 deletions src/lib/sdks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

import { ResponseMatcher, HTTPClient, matchStatusCode } from "./http";
import { SecurityState, resolveSecurity, resolveGlobalSecurity } from "./security";
import { pathToFunc } from "./url";
import { encodeForm } from "./encodings";
import { stringToBase64 } from "./base64";
import { SDKHooks, HookContext } from "../hooks";
import { ResponseMatcher, HTTPClient, matchStatusCode } from "./http.js";
import { SecurityState, resolveSecurity, resolveGlobalSecurity } from "./security.js";
import { pathToFunc } from "./url.js";
import { encodeForm } from "./encodings.js";
import { stringToBase64 } from "./base64.js";
import { SDKHooks } from "../hooks/hooks.js";
import { HookContext } from "../hooks/types.js";

export type RequestOptions = {
fetchOptions?: Omit<RequestInit, "method" | "body">;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/security.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

import * as components from "../models/components";
import * as components from "../models/components/index.js";

export enum SecurityErrorCode {
Incomplete = "incomplete",
Expand Down
2 changes: 1 addition & 1 deletion src/models/components/eventresponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

import { Event, Event$ } from "./event";
import { Event, Event$ } from "./event.js";
import * as z from "zod";

export type EventResponse = {
Expand Down
2 changes: 1 addition & 1 deletion src/models/components/eventsresponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

import { Event, Event$ } from "./event";
import { Event, Event$ } from "./event.js";
import * as z from "zod";

export type EventsResponse = {
Expand Down
10 changes: 5 additions & 5 deletions src/models/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

export * from "./event";
export * from "./eventcreate";
export * from "./eventresponse";
export * from "./eventsresponse";
export * from "./security";
export * from "./event.js";
export * from "./eventcreate.js";
export * from "./eventresponse.js";
export * from "./eventsresponse.js";
export * from "./security.js";
2 changes: 1 addition & 1 deletion src/models/components/security.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

import { remap as remap$ } from "../../lib/primitives";
import { remap as remap$ } from "../../lib/primitives.js";
import * as z from "zod";

export type Security = {
Expand Down
6 changes: 3 additions & 3 deletions src/models/errors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

export * from "./sdkerror";
export * from "./sdkvalidationerror";
export * from "./unauthorizederror";
export * from "./sdkerror.js";
export * from "./sdkvalidationerror.js";
export * from "./unauthorizederror.js";
16 changes: 8 additions & 8 deletions src/sdk/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

import { SDKHooks } from "../hooks";
import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config";
import { encodeJSON as encodeJSON$ } from "../lib/encodings";
import { HTTPClient } from "../lib/http";
import * as schemas$ from "../lib/schemas";
import { ClientSDK, RequestOptions } from "../lib/sdks";
import * as components from "../models/components";
import * as errors from "../models/errors";
import { SDKHooks } from "../hooks/hooks.js";
import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config.js";
import { encodeJSON as encodeJSON$ } from "../lib/encodings.js";
import { HTTPClient } from "../lib/http.js";
import * as schemas$ from "../lib/schemas.js";
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
import * as components from "../models/components/index.js";
import * as errors from "../models/errors/index.js";

export class Events extends ClientSDK {
private readonly options$: SDKOptions & { hooks?: SDKHooks };
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

export * from "./sdk";
export * from "./sdk.js";
10 changes: 5 additions & 5 deletions src/sdk/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

import { SDKHooks } from "../hooks";
import { SDKOptions, serverURLFromOptions } from "../lib/config";
import { HTTPClient } from "../lib/http";
import { ClientSDK } from "../lib/sdks";
import { Events } from "./events";
import { SDKHooks } from "../hooks/hooks.js";
import { SDKOptions, serverURLFromOptions } from "../lib/config.js";
import { HTTPClient } from "../lib/http.js";
import { ClientSDK } from "../lib/sdks.js";
import { Events } from "./events.js";

export class Dingify extends ClientSDK {
private readonly options$: SDKOptions & { hooks?: SDKHooks };
Expand Down
12 changes: 6 additions & 6 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

export { RFCDate } from "./rfcdate";
export { blobLikeSchema, isBlobLike } from "./blobs";
export type { Paginator, PageIterator } from "./operations";
export { createPageIterator } from "./operations";
export { catchUnrecognizedEnum } from "./enums";
export type { OpenEnum, ClosedEnum, Unrecognized } from "./enums";
export { RFCDate } from "./rfcdate.js";
export { blobLikeSchema, isBlobLike } from "./blobs.js";
export type { Paginator, PageIterator } from "./operations.js";
export { createPageIterator } from "./operations.js";
export { catchUnrecognizedEnum } from "./enums.js";
export type { OpenEnum, ClosedEnum, Unrecognized } from "./enums.js";

0 comments on commit 9186b18

Please sign in to comment.