Skip to content

Commit

Permalink
Release 1.6.20
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Sep 2, 2024
1 parent fa3275a commit dfdfd53
Show file tree
Hide file tree
Showing 42 changed files with 418 additions and 233 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.19",
"version": "1.6.20",
"private": false,
"repository": "https://github.com/flagright/flagright-node",
"main": "./index.js",
Expand Down
18 changes: 8 additions & 10 deletions src/api/resources/businessUserEvents/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,15 @@ export class BusinessUserEvents {
*
* @example
* await flagright.businessUserEvents.create({
* body: {
* timestamp: 1.1,
* userId: "userId"
* }
* timestamp: 1.1,
* userId: "userId"
* })
*/
public async create(
request: Flagright.BusinessUserEventsCreateRequest,
request: Flagright.BusinessUserEvent,
requestOptions?: BusinessUserEvents.RequestOptions
): Promise<Flagright.BusinessWithRulesResult> {
const { allowUserTypeConversion, body: _body } = request;
const { allowUserTypeConversion, ..._body } = request;
const _queryParams: Record<string, string | string[]> = {};
if (allowUserTypeConversion != null) {
_queryParams["allowUserTypeConversion"] = allowUserTypeConversion;
Expand All @@ -76,7 +74,7 @@ export class BusinessUserEvents {
"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.19",
"X-Fern-SDK-Version": "1.6.20",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -161,7 +159,7 @@ export class BusinessUserEvents {
public async get(
eventId: string,
requestOptions?: BusinessUserEvents.RequestOptions
): Promise<Flagright.BusinessUserEvent> {
): Promise<Flagright.BusinessUserEventWithRulesResult> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
Expand All @@ -172,7 +170,7 @@ export class BusinessUserEvents {
"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.19",
"X-Fern-SDK-Version": "1.6.20",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand All @@ -181,7 +179,7 @@ export class BusinessUserEvents {
maxRetries: requestOptions?.maxRetries,
});
if (_response.ok) {
return await serializers.BusinessUserEvent.parseOrThrow(_response.body, {
return await serializers.BusinessUserEventWithRulesResult.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as Flagright from "../../../..";

/**
* @example
* {
* timestamp: 1.1,
* userId: "userId"
* }
*/
export interface BusinessUserEvent {
/**
* Boolean string whether Flagright should allow a Business user event to be applied to a Consumer user with the same user ID. This will converts a Consumer user to a Business user.
*/
allowUserTypeConversion?: Flagright.BooleanString;
/** Timestamp of the event */
timestamp: number;
/** Transaction ID the event pertains to */
userId: string;
/** Unique event ID */
eventId?: string;
/** Reason for the event or a state change */
reason?: string;
/** Event description */
eventDescription?: string;
updatedBusinessUserAttributes?: Flagright.BusinessOptional;
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { BusinessUserEventsCreateRequest } from "./BusinessUserEventsCreateRequest";
export { BusinessUserEvent } from "./BusinessUserEvent";
4 changes: 2 additions & 2 deletions src/api/resources/businessUsers/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class BusinessUsers {
"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.19",
"X-Fern-SDK-Version": "1.6.20",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -166,7 +166,7 @@ export class BusinessUsers {
"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.19",
"X-Fern-SDK-Version": "1.6.20",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
18 changes: 8 additions & 10 deletions src/api/resources/consumerUserEvents/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,15 @@ export class ConsumerUserEvents {
*
* @example
* await flagright.consumerUserEvents.create({
* body: {
* timestamp: 1.1,
* userId: "userId"
* }
* timestamp: 1.1,
* userId: "userId"
* })
*/
public async create(
request: Flagright.ConsumerUserEventsCreateRequest,
request: Flagright.ConsumerUserEvent,
requestOptions?: ConsumerUserEvents.RequestOptions
): Promise<Flagright.UserWithRulesResult> {
const { allowUserTypeConversion, body: _body } = request;
const { allowUserTypeConversion, ..._body } = request;
const _queryParams: Record<string, string | string[]> = {};
if (allowUserTypeConversion != null) {
_queryParams["allowUserTypeConversion"] = allowUserTypeConversion;
Expand All @@ -76,7 +74,7 @@ export class ConsumerUserEvents {
"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.19",
"X-Fern-SDK-Version": "1.6.20",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -161,7 +159,7 @@ export class ConsumerUserEvents {
public async get(
eventId: string,
requestOptions?: ConsumerUserEvents.RequestOptions
): Promise<Flagright.ConsumerUserEvent> {
): Promise<Flagright.ConsumerUserEventWithRulesResult> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
Expand All @@ -172,7 +170,7 @@ export class ConsumerUserEvents {
"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.19",
"X-Fern-SDK-Version": "1.6.20",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand All @@ -181,7 +179,7 @@ export class ConsumerUserEvents {
maxRetries: requestOptions?.maxRetries,
});
if (_response.ok) {
return await serializers.ConsumerUserEvent.parseOrThrow(_response.body, {
return await serializers.ConsumerUserEventWithRulesResult.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as Flagright from "../../../..";

/**
* @example
* {
* timestamp: 1.1,
* userId: "userId"
* }
*/
export interface ConsumerUserEvent {
/**
* Boolean string whether Flagright should allow a Consumer user event to be applied to a Business user with the same user ID. This will converts a Business user to a Consumer user.
*/
allowUserTypeConversion?: Flagright.BooleanString;
/** Timestamp of the event */
timestamp: number;
/** Transaction ID the event pertains to */
userId: string;
/** Unique event ID */
eventId?: string;
/** Reason for the event or a state change */
reason?: string;
/** Event description */
eventDescription?: string;
updatedConsumerUserAttributes?: Flagright.UserOptional;
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { ConsumerUserEventsCreateRequest } from "./ConsumerUserEventsCreateRequest";
export { ConsumerUserEvent } from "./ConsumerUserEvent";
4 changes: 2 additions & 2 deletions src/api/resources/consumerUsers/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class ConsumerUsers {
"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.19",
"X-Fern-SDK-Version": "1.6.20",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -199,7 +199,7 @@ export class ConsumerUsers {
"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.19",
"X-Fern-SDK-Version": "1.6.20",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
1 change: 1 addition & 0 deletions src/api/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export * as transactionEvents from "./transactionEvents";
export * as consumerUserEvents from "./consumerUserEvents";
export * as businessUserEvents from "./businessUserEvents";
export * from "./transactions/client/requests";
export * from "./transactionEvents/client/requests";
export * from "./consumerUsers/client/requests";
export * from "./businessUsers/client/requests";
export * from "./consumerUserEvents/client/requests";
Expand Down
8 changes: 4 additions & 4 deletions src/api/resources/transactionEvents/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class TransactionEvents {
"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.19",
"X-Fern-SDK-Version": "1.6.20",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -165,7 +165,7 @@ export class TransactionEvents {
public async get(
eventId: string,
requestOptions?: TransactionEvents.RequestOptions
): Promise<Flagright.TransactionEvent> {
): Promise<Flagright.TransactionEventWithRulesResult> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FlagrightEnvironment.Default,
Expand All @@ -176,7 +176,7 @@ export class TransactionEvents {
"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.19",
"X-Fern-SDK-Version": "1.6.20",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand All @@ -185,7 +185,7 @@ export class TransactionEvents {
maxRetries: requestOptions?.maxRetries,
});
if (_response.ok) {
return await serializers.TransactionEvent.parseOrThrow(_response.body, {
return await serializers.TransactionEventWithRulesResult.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
Expand Down
2 changes: 1 addition & 1 deletion src/api/resources/transactionEvents/client/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export {};
export * from "./requests";
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,24 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as Flagright from "..";
import * as Flagright from "../../../..";

/**
* Model for transaction-related events
* @example
* {
* transactionState: Flagright.TransactionState.Successful,
* timestamp: 1431231244001,
* transactionId: "443dea26147a406b957d9ee3a1247b11",
* eventId: "aaeeb166147a406b957dd9147a406b957",
* eventDescription: "Transaction created",
* metaData: {
* batteryLevel: 76.3,
* deviceLatitude: 13.009711,
* deviceLongitude: 76.102898,
* ipAddress: "79.144.2.20",
* vpnUsed: true
* }
* }
*/
export interface TransactionEvent {
transactionState: Flagright.TransactionState;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { TransactionEvent } from "./TransactionEvent";
4 changes: 2 additions & 2 deletions src/api/resources/transactions/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class Transactions {
"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.19",
"X-Fern-SDK-Version": "1.6.20",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -224,7 +224,7 @@ export class Transactions {
"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.19",
"X-Fern-SDK-Version": "1.6.20",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@

import * as Flagright from "..";

/**
* Model for business user-related events
*/
export interface BusinessUserEvent {
export interface BusinessUserEventWithRulesResult {
/** Timestamp of the event */
timestamp: number;
/** Transaction ID the event pertains to */
Expand All @@ -19,4 +16,7 @@ export interface BusinessUserEvent {
/** Event description */
eventDescription?: string;
updatedBusinessUserAttributes?: Flagright.BusinessOptional;
executedRules?: Flagright.ExecutedRulesResult[];
hitRules?: Flagright.HitRulesDetails[];
riskScoreDetails?: Flagright.UserRiskScoreDetails;
}
Loading

0 comments on commit dfdfd53

Please sign in to comment.