Skip to content

Commit

Permalink
Release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Aug 21, 2023
1 parent a87da7d commit a073e96
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 77 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ node_modules
/dist
/Client.d.ts
/Client.js
/environments.d.ts
/environments.js
/index.d.ts
/index.js
/api
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flagright",
"version": "0.1.2",
"version": "1.0.0",
"private": false,
"repository": "https://github.com/flagright/flagright-node",
"main": "./index.js",
Expand Down
3 changes: 1 addition & 2 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as environments from "./environments";
import * as core from "./core";
import { Transactions } from "./api/resources/transactions/client/Client";
import { TransactionEvents } from "./api/resources/transactionEvents/client/Client";
Expand All @@ -13,7 +12,7 @@ import { BusinessUserEvents } from "./api/resources/businessUserEvents/client/Cl

export declare namespace FlagrightClient {
interface Options {
environment?: core.Supplier<environments.FlagrightEnvironment | string>;
environment: core.Supplier<string>;
apiKey: core.Supplier<string>;
}

Expand Down
10 changes: 3 additions & 7 deletions src/api/resources/businessUserEvents/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as environments from "../../../../environments";
import * as core from "../../../../core";
import * as Flagright from "../../..";
import { default as URLSearchParams } from "@ungap/url-search-params";
Expand All @@ -12,7 +11,7 @@ import * as errors from "../../../../errors";

export declare namespace BusinessUserEvents {
interface Options {
environment?: core.Supplier<environments.FlagrightEnvironment | string>;
environment: core.Supplier<string>;
apiKey: core.Supplier<string>;
}

Expand Down Expand Up @@ -60,16 +59,13 @@ export class BusinessUserEvents {
}

const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
"events/business/user"
),
url: urlJoin(await core.Supplier.get(this._options.environment), "events/business/user"),
method: "POST",
headers: {
"x-api-key": await core.Supplier.get(this._options.apiKey),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "flagright",
"X-Fern-SDK-Version": "0.1.2",
"X-Fern-SDK-Version": "1.0.0",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down
17 changes: 5 additions & 12 deletions src/api/resources/businessUsers/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as environments from "../../../../environments";
import * as core from "../../../../core";
import * as Flagright from "../../..";
import * as serializers from "../../../../serialization";
Expand All @@ -11,7 +10,7 @@ import * as errors from "../../../../errors";

export declare namespace BusinessUsers {
interface Options {
environment?: core.Supplier<environments.FlagrightEnvironment | string>;
environment: core.Supplier<string>;
apiKey: core.Supplier<string>;
}

Expand Down Expand Up @@ -47,16 +46,13 @@ export class BusinessUsers {
requestOptions?: BusinessUsers.RequestOptions
): Promise<Flagright.BusinessUsersCreateResponse> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
"business/users"
),
url: urlJoin(await core.Supplier.get(this._options.environment), "business/users"),
method: "POST",
headers: {
"x-api-key": await core.Supplier.get(this._options.apiKey),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "flagright",
"X-Fern-SDK-Version": "0.1.2",
"X-Fern-SDK-Version": "1.0.0",
},
contentType: "application/json",
body: await serializers.Business.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -116,16 +112,13 @@ export class BusinessUsers {
requestOptions?: BusinessUsers.RequestOptions
): Promise<Flagright.BusinessResponse> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
`business/users/${userId}`
),
url: urlJoin(await core.Supplier.get(this._options.environment), `business/users/${userId}`),
method: "GET",
headers: {
"x-api-key": await core.Supplier.get(this._options.apiKey),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "flagright",
"X-Fern-SDK-Version": "0.1.2",
"X-Fern-SDK-Version": "1.0.0",
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down
10 changes: 3 additions & 7 deletions src/api/resources/consumerUserEvents/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as environments from "../../../../environments";
import * as core from "../../../../core";
import * as Flagright from "../../..";
import { default as URLSearchParams } from "@ungap/url-search-params";
Expand All @@ -12,7 +11,7 @@ import * as errors from "../../../../errors";

export declare namespace ConsumerUserEvents {
interface Options {
environment?: core.Supplier<environments.FlagrightEnvironment | string>;
environment: core.Supplier<string>;
apiKey: core.Supplier<string>;
}

Expand Down Expand Up @@ -60,16 +59,13 @@ export class ConsumerUserEvents {
}

const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
"events/consumer/user"
),
url: urlJoin(await core.Supplier.get(this._options.environment), "events/consumer/user"),
method: "POST",
headers: {
"x-api-key": await core.Supplier.get(this._options.apiKey),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "flagright",
"X-Fern-SDK-Version": "0.1.2",
"X-Fern-SDK-Version": "1.0.0",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down
17 changes: 5 additions & 12 deletions src/api/resources/consumerUsers/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as environments from "../../../../environments";
import * as core from "../../../../core";
import * as Flagright from "../../..";
import * as serializers from "../../../../serialization";
Expand All @@ -11,7 +10,7 @@ import * as errors from "../../../../errors";

export declare namespace ConsumerUsers {
interface Options {
environment?: core.Supplier<environments.FlagrightEnvironment | string>;
environment: core.Supplier<string>;
apiKey: core.Supplier<string>;
}

Expand Down Expand Up @@ -46,16 +45,13 @@ export class ConsumerUsers {
requestOptions?: ConsumerUsers.RequestOptions
): Promise<Flagright.ConsumerUsersCreateResponse> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
"consumer/users"
),
url: urlJoin(await core.Supplier.get(this._options.environment), "consumer/users"),
method: "POST",
headers: {
"x-api-key": await core.Supplier.get(this._options.apiKey),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "flagright",
"X-Fern-SDK-Version": "0.1.2",
"X-Fern-SDK-Version": "1.0.0",
},
contentType: "application/json",
body: await serializers.User.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -112,16 +108,13 @@ export class ConsumerUsers {
*/
public async get(userId: string, requestOptions?: ConsumerUsers.RequestOptions): Promise<Flagright.UserResponse> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
`consumer/users/${userId}`
),
url: urlJoin(await core.Supplier.get(this._options.environment), `consumer/users/${userId}`),
method: "GET",
headers: {
"x-api-key": await core.Supplier.get(this._options.apiKey),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "flagright",
"X-Fern-SDK-Version": "0.1.2",
"X-Fern-SDK-Version": "1.0.0",
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down
17 changes: 5 additions & 12 deletions src/api/resources/transactionEvents/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as environments from "../../../../environments";
import * as core from "../../../../core";
import * as Flagright from "../../..";
import * as serializers from "../../../../serialization";
Expand All @@ -11,7 +10,7 @@ import * as errors from "../../../../errors";

export declare namespace TransactionEvents {
interface Options {
environment?: core.Supplier<environments.FlagrightEnvironment | string>;
environment: core.Supplier<string>;
apiKey: core.Supplier<string>;
}

Expand Down Expand Up @@ -54,16 +53,13 @@ export class TransactionEvents {
requestOptions?: TransactionEvents.RequestOptions
): Promise<Flagright.TransactionEventMonitoringResult> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
"events/transaction"
),
url: urlJoin(await core.Supplier.get(this._options.environment), "events/transaction"),
method: "POST",
headers: {
"x-api-key": await core.Supplier.get(this._options.apiKey),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "flagright",
"X-Fern-SDK-Version": "0.1.2",
"X-Fern-SDK-Version": "1.0.0",
},
contentType: "application/json",
body: await serializers.TransactionEvent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -124,16 +120,13 @@ export class TransactionEvents {
requestOptions?: TransactionEvents.RequestOptions
): Promise<Flagright.TransactionEvent> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
`events/transaction/${eventId}`
),
url: urlJoin(await core.Supplier.get(this._options.environment), `events/transaction/${eventId}`),
method: "GET",
headers: {
"x-api-key": await core.Supplier.get(this._options.apiKey),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "flagright",
"X-Fern-SDK-Version": "0.1.2",
"X-Fern-SDK-Version": "1.0.0",
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down
17 changes: 5 additions & 12 deletions src/api/resources/transactions/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as environments from "../../../../environments";
import * as core from "../../../../core";
import * as Flagright from "../../..";
import { default as URLSearchParams } from "@ungap/url-search-params";
Expand All @@ -12,7 +11,7 @@ import * as errors from "../../../../errors";

export declare namespace Transactions {
interface Options {
environment?: core.Supplier<environments.FlagrightEnvironment | string>;
environment: core.Supplier<string>;
apiKey: core.Supplier<string>;
}

Expand Down Expand Up @@ -65,16 +64,13 @@ export class Transactions {
}

const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
"transactions"
),
url: urlJoin(await core.Supplier.get(this._options.environment), "transactions"),
method: "POST",
headers: {
"x-api-key": await core.Supplier.get(this._options.apiKey),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "flagright",
"X-Fern-SDK-Version": "0.1.2",
"X-Fern-SDK-Version": "1.0.0",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -135,16 +131,13 @@ export class Transactions {
requestOptions?: Transactions.RequestOptions
): Promise<Flagright.TransactionWithRulesResult> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
`transactions/${transactionId}`
),
url: urlJoin(await core.Supplier.get(this._options.environment), `transactions/${transactionId}`),
method: "GET",
headers: {
"x-api-key": await core.Supplier.get(this._options.apiKey),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "flagright",
"X-Fern-SDK-Version": "0.1.2",
"X-Fern-SDK-Version": "1.0.0",
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down
9 changes: 0 additions & 9 deletions src/environments.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * as Flagright from "./api";
export { FlagrightClient } from "./Client";
export { FlagrightEnvironment } from "./environments";
export { FlagrightError, FlagrightTimeoutError } from "./errors";

0 comments on commit a073e96

Please sign in to comment.