Skip to content

Commit

Permalink
Release 1.6.21
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Sep 2, 2024
1 parent dfdfd53 commit f8495e5
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 27 deletions.
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": "1.6.20",
"version": "1.6.21",
"private": false,
"repository": "https://github.com/flagright/flagright-node",
"main": "./index.js",
Expand Down
10 changes: 6 additions & 4 deletions src/api/resources/businessUserEvents/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,16 @@ export class BusinessUserEvents {

const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
(await core.Supplier.get(this._options.environment)) ??
environments.FlagrightEnvironment.SandboxApiServerEu1,
"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": "1.6.20",
"X-Fern-SDK-Version": "1.6.21",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -162,15 +163,16 @@ export class BusinessUserEvents {
): Promise<Flagright.BusinessUserEventWithRulesResult> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
(await core.Supplier.get(this._options.environment)) ??
environments.FlagrightEnvironment.SandboxApiServerEu1,
`events/business/user/${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": "1.6.20",
"X-Fern-SDK-Version": "1.6.21",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
10 changes: 6 additions & 4 deletions src/api/resources/businessUsers/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,16 @@ export class BusinessUsers {
): Promise<Flagright.BusinessUsersCreateResponse> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
(await core.Supplier.get(this._options.environment)) ??
environments.FlagrightEnvironment.SandboxApiServerEu1,
"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": "1.6.20",
"X-Fern-SDK-Version": "1.6.21",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -158,15 +159,16 @@ export class BusinessUsers {
): Promise<Flagright.BusinessWithRulesResult> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
(await core.Supplier.get(this._options.environment)) ??
environments.FlagrightEnvironment.SandboxApiServerEu1,
`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": "1.6.20",
"X-Fern-SDK-Version": "1.6.21",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
10 changes: 6 additions & 4 deletions src/api/resources/consumerUserEvents/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,16 @@ export class ConsumerUserEvents {

const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
(await core.Supplier.get(this._options.environment)) ??
environments.FlagrightEnvironment.SandboxApiServerEu1,
"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": "1.6.20",
"X-Fern-SDK-Version": "1.6.21",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -162,15 +163,16 @@ export class ConsumerUserEvents {
): Promise<Flagright.ConsumerUserEventWithRulesResult> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
(await core.Supplier.get(this._options.environment)) ??
environments.FlagrightEnvironment.SandboxApiServerEu1,
`events/consumer/user/${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": "1.6.20",
"X-Fern-SDK-Version": "1.6.21",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
10 changes: 6 additions & 4 deletions src/api/resources/consumerUsers/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,16 @@ export class ConsumerUsers {
): Promise<Flagright.ConsumerUsersCreateResponse> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
(await core.Supplier.get(this._options.environment)) ??
environments.FlagrightEnvironment.SandboxApiServerEu1,
"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": "1.6.20",
"X-Fern-SDK-Version": "1.6.21",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -191,15 +192,16 @@ export class ConsumerUsers {
): Promise<Flagright.UserWithRulesResult> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
(await core.Supplier.get(this._options.environment)) ??
environments.FlagrightEnvironment.SandboxApiServerEu1,
`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": "1.6.20",
"X-Fern-SDK-Version": "1.6.21",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
10 changes: 6 additions & 4 deletions src/api/resources/transactionEvents/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,16 @@ export class TransactionEvents {
): Promise<Flagright.TransactionEventMonitoringResult> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
(await core.Supplier.get(this._options.environment)) ??
environments.FlagrightEnvironment.SandboxApiServerEu1,
"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": "1.6.20",
"X-Fern-SDK-Version": "1.6.21",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -168,15 +169,16 @@ export class TransactionEvents {
): Promise<Flagright.TransactionEventWithRulesResult> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
(await core.Supplier.get(this._options.environment)) ??
environments.FlagrightEnvironment.SandboxApiServerEu1,
`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": "1.6.20",
"X-Fern-SDK-Version": "1.6.21",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
10 changes: 6 additions & 4 deletions src/api/resources/transactions/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,16 @@ export class Transactions {

const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
(await core.Supplier.get(this._options.environment)) ??
environments.FlagrightEnvironment.SandboxApiServerEu1,
"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": "1.6.20",
"X-Fern-SDK-Version": "1.6.21",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -216,15 +217,16 @@ export class Transactions {
): Promise<Flagright.TransactionWithRulesResult> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
(await core.Supplier.get(this._options.environment)) ??
environments.FlagrightEnvironment.SandboxApiServerEu1,
`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": "1.6.20",
"X-Fern-SDK-Version": "1.6.21",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
7 changes: 5 additions & 2 deletions src/environments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
*/

export const FlagrightEnvironment = {
Default: "https://sandbox.api.flagright.com",
SandboxApiServerEu1: "https://sandbox.api.flagright.com",
SandboxApiServerAsia1: "https://sandbox-asia-1.api.flagright.com",
} as const;

export type FlagrightEnvironment = typeof FlagrightEnvironment.Default;
export type FlagrightEnvironment =
| typeof FlagrightEnvironment.SandboxApiServerEu1
| typeof FlagrightEnvironment.SandboxApiServerAsia1;

0 comments on commit f8495e5

Please sign in to comment.