Skip to content

Commit

Permalink
Release 0.0.34
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed May 15, 2023
1 parent 136f6db commit 3397753
Show file tree
Hide file tree
Showing 61 changed files with 971 additions and 912 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@squidex/squidex",
"version": "0.0.33",
"version": "0.0.34",
"private": false,
"repository": "https://github.com/squidex/sdk-node",
"main": "./index.js",
Expand Down
255 changes: 125 additions & 130 deletions src/api/resources/apps/client/Client.ts

Large diffs are not rendered by default.

153 changes: 74 additions & 79 deletions src/api/resources/assets/client/Client.ts

Large diffs are not rendered by default.

45 changes: 20 additions & 25 deletions src/api/resources/backups/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import * as core from "../../../../core";
import * as stream from "stream";
import urlJoin from "url-join";
import * as errors from "../../../../errors";
import * as serializers from "../../../../serialization";
import * as Squidex from "../../..";
import * as serializers from "../../../../serialization";
import URLSearchParams from "@ungap/url-search-params";

export declare namespace Backups {
Expand All @@ -33,7 +33,7 @@ export class Backups {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@squidex/squidex",
"X-Fern-SDK-Version": "0.0.33",
"X-Fern-SDK-Version": "0.0.34",
},
timeoutMs: 60000,
onError: (error) => {
Expand All @@ -45,9 +45,9 @@ export class Backups {
}

/**
* @throws {Squidex.BadRequestError}
* @throws {Squidex.NotFoundError}
* @throws {Squidex.InternalServerError}
* @throws {@link Squidex.BadRequestError}
* @throws {@link Squidex.NotFoundError}
* @throws {@link Squidex.InternalServerError}
*/
public async deleteBackup(id: string): Promise<void> {
const _response = await core.fetcher({
Expand All @@ -60,7 +60,7 @@ export class Backups {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@squidex/squidex",
"X-Fern-SDK-Version": "0.0.33",
"X-Fern-SDK-Version": "0.0.34",
},
contentType: "application/json",
timeoutMs: 60000,
Expand Down Expand Up @@ -135,7 +135,7 @@ export class Backups {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@squidex/squidex",
"X-Fern-SDK-Version": "0.0.33",
"X-Fern-SDK-Version": "0.0.34",
},
queryParameters: _queryParams,
timeoutMs: 60000,
Expand All @@ -148,8 +148,8 @@ export class Backups {
}

/**
* @throws {Squidex.NotFoundError}
* @throws {Squidex.InternalServerError}
* @throws {@link Squidex.NotFoundError}
* @throws {@link Squidex.InternalServerError}
*/
public async getBackups(): Promise<Squidex.BackupJobsDto> {
const _response = await core.fetcher({
Expand All @@ -162,7 +162,7 @@ export class Backups {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@squidex/squidex",
"X-Fern-SDK-Version": "0.0.33",
"X-Fern-SDK-Version": "0.0.34",
},
contentType: "application/json",
timeoutMs: 60000,
Expand Down Expand Up @@ -213,9 +213,9 @@ export class Backups {
}

/**
* @throws {Squidex.BadRequestError}
* @throws {Squidex.NotFoundError}
* @throws {Squidex.InternalServerError}
* @throws {@link Squidex.BadRequestError}
* @throws {@link Squidex.NotFoundError}
* @throws {@link Squidex.InternalServerError}
*/
public async postBackup(): Promise<void> {
const _response = await core.fetcher({
Expand All @@ -228,7 +228,7 @@ export class Backups {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@squidex/squidex",
"X-Fern-SDK-Version": "0.0.33",
"X-Fern-SDK-Version": "0.0.34",
},
contentType: "application/json",
timeoutMs: 60000,
Expand Down Expand Up @@ -283,7 +283,7 @@ export class Backups {
}

/**
* @throws {Squidex.InternalServerError}
* @throws {@link Squidex.InternalServerError}
*/
public async getRestoreJob(): Promise<Squidex.RestoreJobDto> {
const _response = await core.fetcher({
Expand All @@ -293,7 +293,7 @@ export class Backups {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@squidex/squidex",
"X-Fern-SDK-Version": "0.0.33",
"X-Fern-SDK-Version": "0.0.34",
},
contentType: "application/json",
timeoutMs: 60000,
Expand Down Expand Up @@ -342,8 +342,8 @@ export class Backups {
}

/**
* @throws {Squidex.BadRequestError}
* @throws {Squidex.InternalServerError}
* @throws {@link Squidex.BadRequestError}
* @throws {@link Squidex.InternalServerError}
*/
public async postRestoreJob(request: Squidex.RestoreRequestDto): Promise<void> {
const _response = await core.fetcher({
Expand All @@ -353,7 +353,7 @@ export class Backups {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@squidex/squidex",
"X-Fern-SDK-Version": "0.0.33",
"X-Fern-SDK-Version": "0.0.34",
},
contentType: "application/json",
body: await serializers.RestoreRequestDto.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -407,11 +407,6 @@ export class Backups {
}

protected async _getAuthorizationHeader() {
const bearer = await core.Supplier.get(this.options.token);
if (bearer != null) {
return `Bearer ${bearer}`;
}

return undefined;
return `Bearer ${await core.Supplier.get(this.options.token)}`;
}
}
45 changes: 20 additions & 25 deletions src/api/resources/comments/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

import * as environments from "../../../../environments";
import * as core from "../../../../core";
import * as Squidex from "../../..";
import urlJoin from "url-join";
import * as serializers from "../../../../serialization";
import * as errors from "../../../../errors";
import * as Squidex from "../../..";
import URLSearchParams from "@ungap/url-search-params";

export declare namespace Comments {
Expand All @@ -22,8 +22,8 @@ export class Comments {
constructor(protected readonly options: Comments.Options) {}

/**
* @throws {Squidex.NotFoundError}
* @throws {Squidex.InternalServerError}
* @throws {@link Squidex.NotFoundError}
* @throws {@link Squidex.InternalServerError}
*/
public async getWatchingUsers(resource: string | undefined): Promise<string[]> {
const _response = await core.fetcher({
Expand All @@ -36,7 +36,7 @@ export class Comments {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@squidex/squidex",
"X-Fern-SDK-Version": "0.0.33",
"X-Fern-SDK-Version": "0.0.34",
},
contentType: "application/json",
timeoutMs: 60000,
Expand Down Expand Up @@ -88,8 +88,8 @@ export class Comments {

/**
* When passing in a version you can retrieve all updates since then.
* @throws {Squidex.NotFoundError}
* @throws {Squidex.InternalServerError}
* @throws {@link Squidex.NotFoundError}
* @throws {@link Squidex.InternalServerError}
*/
public async getComments(
commentsId: string,
Expand All @@ -111,7 +111,7 @@ export class Comments {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@squidex/squidex",
"X-Fern-SDK-Version": "0.0.33",
"X-Fern-SDK-Version": "0.0.34",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -163,9 +163,9 @@ export class Comments {
}

/**
* @throws {Squidex.BadRequestError}
* @throws {Squidex.NotFoundError}
* @throws {Squidex.InternalServerError}
* @throws {@link Squidex.BadRequestError}
* @throws {@link Squidex.NotFoundError}
* @throws {@link Squidex.InternalServerError}
*/
public async postComment(commentsId: string, request: Squidex.UpsertCommentDto): Promise<Squidex.CommentDto> {
const _response = await core.fetcher({
Expand All @@ -178,7 +178,7 @@ export class Comments {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@squidex/squidex",
"X-Fern-SDK-Version": "0.0.33",
"X-Fern-SDK-Version": "0.0.34",
},
contentType: "application/json",
body: await serializers.UpsertCommentDto.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -239,9 +239,9 @@ export class Comments {
}

/**
* @throws {Squidex.BadRequestError}
* @throws {Squidex.NotFoundError}
* @throws {Squidex.InternalServerError}
* @throws {@link Squidex.BadRequestError}
* @throws {@link Squidex.NotFoundError}
* @throws {@link Squidex.InternalServerError}
*/
public async putComment(commentsId: string, commentId: string, request: Squidex.UpsertCommentDto): Promise<void> {
const _response = await core.fetcher({
Expand All @@ -254,7 +254,7 @@ export class Comments {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@squidex/squidex",
"X-Fern-SDK-Version": "0.0.33",
"X-Fern-SDK-Version": "0.0.34",
},
contentType: "application/json",
body: await serializers.UpsertCommentDto.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -310,9 +310,9 @@ export class Comments {
}

/**
* @throws {Squidex.BadRequestError}
* @throws {Squidex.NotFoundError}
* @throws {Squidex.InternalServerError}
* @throws {@link Squidex.BadRequestError}
* @throws {@link Squidex.NotFoundError}
* @throws {@link Squidex.InternalServerError}
*/
public async deleteComment(commentsId: string, commentId: string): Promise<void> {
const _response = await core.fetcher({
Expand All @@ -325,7 +325,7 @@ export class Comments {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@squidex/squidex",
"X-Fern-SDK-Version": "0.0.33",
"X-Fern-SDK-Version": "0.0.34",
},
contentType: "application/json",
timeoutMs: 60000,
Expand Down Expand Up @@ -380,11 +380,6 @@ export class Comments {
}

protected async _getAuthorizationHeader() {
const bearer = await core.Supplier.get(this.options.token);
if (bearer != null) {
return `Bearer ${bearer}`;
}

return undefined;
return `Bearer ${await core.Supplier.get(this.options.token)}`;
}
}
Loading

0 comments on commit 3397753

Please sign in to comment.