Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
feat: SDK regeneration (#15)
Browse files Browse the repository at this point in the history
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
  • Loading branch information
fern-api[bot] authored Aug 16, 2023
1 parent 03c99ce commit 236c80e
Show file tree
Hide file tree
Showing 21 changed files with 107 additions and 25 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@flipt-io/flipt",
"version": "0.2.8",
"version": "0.2.10",
"private": false,
"repository": "https://github.com/flipt-io/flipt-node",
"files": [
Expand Down
1 change: 1 addition & 0 deletions src/api/resources/evaluate/types/EvaluationResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ export interface EvaluationResponse {
requestDurationMillis: number;
attachment: string;
reason: FliptApi.EvaluationReason;
segmentKeys?: string;
}
4 changes: 4 additions & 0 deletions src/api/resources/rollouts/types/RolloutSegment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
* This file was auto-generated by Fern from our API Definition.
*/

import { FliptApi } from "@flipt-io/flipt";

export interface RolloutSegment {
segmentKey: string;
segmentKeys?: string[];
segmentOperator?: FliptApi.RolloutSegmentOperator;
value: boolean;
}
10 changes: 10 additions & 0 deletions src/api/resources/rollouts/types/RolloutSegmentOperator.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

export type RolloutSegmentOperator = "OR_SEGMENT_OPERATOR" | "AND_SEGMENT_OPERATOR";

export const RolloutSegmentOperator = {
OrSegmentOperator: "OR_SEGMENT_OPERATOR",
AndSegmentOperator: "AND_SEGMENT_OPERATOR",
} as const;
1 change: 1 addition & 0 deletions src/api/resources/rollouts/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export * from "./RolloutList";
export * from "./Rollout";
export * from "./RolloutSegmentOperator";
export * from "./RolloutType";
export * from "./RolloutSegment";
export * from "./RolloutThreshold";
Expand Down
2 changes: 2 additions & 0 deletions src/api/resources/rules/types/Rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export interface Rule {
namespaceKey: string;
flagKey: string;
segmentKey: string;
segmentKeys?: string[];
segmentOperator: FliptApi.RuleSegmentOperator;
distributions: FliptApi.Distribution[];
rank: number;
createdAt: Date;
Expand Down
4 changes: 4 additions & 0 deletions src/api/resources/rules/types/RuleCreateRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
* This file was auto-generated by Fern from our API Definition.
*/

import { FliptApi } from "@flipt-io/flipt";

export interface RuleCreateRequest {
segmentKey: string;
segmentKeys?: string[];
segmentOperator?: FliptApi.RuleSegmentOperator;
rank: number;
}
10 changes: 10 additions & 0 deletions src/api/resources/rules/types/RuleSegmentOperator.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

export type RuleSegmentOperator = "OR_SEGMENT_OPERATOR" | "AND_SEGMENT_OPERATOR";

export const RuleSegmentOperator = {
OrSegmentOperator: "OR_SEGMENT_OPERATOR",
AndSegmentOperator: "AND_SEGMENT_OPERATOR",
} as const;
4 changes: 4 additions & 0 deletions src/api/resources/rules/types/RuleUpdateRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
* This file was auto-generated by Fern from our API Definition.
*/

import { FliptApi } from "@flipt-io/flipt";

export interface RuleUpdateRequest {
segmentKey: string;
segmentKeys?: string[];
segmentOperator?: FliptApi.RuleSegmentOperator;
}
1 change: 1 addition & 0 deletions src/api/resources/rules/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from "./RuleList";
export * from "./RuleSegmentOperator";
export * from "./Rule";
export * from "./RuleCreateRequest";
export * from "./RuleOrderRequest";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const EvaluationResponse: core.serialization.ObjectSchema<
requestDurationMillis: core.serialization.number(),
attachment: core.serialization.string(),
reason: core.serialization.lazy(async () => (await import("../../..")).EvaluationReason),
segmentKeys: core.serialization.string().optional(),
});

export declare namespace EvaluationResponse {
Expand All @@ -36,5 +37,6 @@ export declare namespace EvaluationResponse {
requestDurationMillis: number;
attachment: string;
reason: serializers.EvaluationReason.Raw;
segmentKeys?: string | null;
}
}
33 changes: 12 additions & 21 deletions src/serialization/resources/evaluation/types/EvaluationResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,22 @@ export const EvaluationResponse: core.serialization.ObjectSchema<
FliptApi.evaluation.EvaluationResponse
> = core.serialization.object({
type: core.serialization.lazy(async () => (await import("../../..")).evaluation.EvaluationResponseType),
booleanResponse: core.serialization.property(
"boolean_response",
core.serialization
.lazyObject(async () => (await import("../../..")).evaluation.BooleanEvaluationResponse)
.optional()
),
variantResponse: core.serialization.property(
"variant_response",
core.serialization
.lazyObject(async () => (await import("../../..")).evaluation.VariantEvaluationResponse)
.optional()
),
errorResponse: core.serialization.property(
"error_response",
core.serialization
.lazyObject(async () => (await import("../../..")).evaluation.ErrorEvaluationResponse)
.optional()
),
booleanResponse: core.serialization
.lazyObject(async () => (await import("../../..")).evaluation.BooleanEvaluationResponse)
.optional(),
variantResponse: core.serialization
.lazyObject(async () => (await import("../../..")).evaluation.VariantEvaluationResponse)
.optional(),
errorResponse: core.serialization
.lazyObject(async () => (await import("../../..")).evaluation.ErrorEvaluationResponse)
.optional(),
});

export declare namespace EvaluationResponse {
interface Raw {
type: serializers.evaluation.EvaluationResponseType.Raw;
boolean_response?: serializers.evaluation.BooleanEvaluationResponse.Raw | null;
variant_response?: serializers.evaluation.VariantEvaluationResponse.Raw | null;
error_response?: serializers.evaluation.ErrorEvaluationResponse.Raw | null;
booleanResponse?: serializers.evaluation.BooleanEvaluationResponse.Raw | null;
variantResponse?: serializers.evaluation.VariantEvaluationResponse.Raw | null;
errorResponse?: serializers.evaluation.ErrorEvaluationResponse.Raw | null;
}
}
6 changes: 6 additions & 0 deletions src/serialization/resources/rollouts/types/RolloutSegment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,18 @@ import * as core from "../../../../core";
export const RolloutSegment: core.serialization.ObjectSchema<serializers.RolloutSegment.Raw, FliptApi.RolloutSegment> =
core.serialization.object({
segmentKey: core.serialization.string(),
segmentKeys: core.serialization.list(core.serialization.string()).optional(),
segmentOperator: core.serialization
.lazy(async () => (await import("../../..")).RolloutSegmentOperator)
.optional(),
value: core.serialization.boolean(),
});

export declare namespace RolloutSegment {
interface Raw {
segmentKey: string;
segmentKeys?: string[] | null;
segmentOperator?: serializers.RolloutSegmentOperator.Raw | null;
value: boolean;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as serializers from "../../..";
import { FliptApi } from "@flipt-io/flipt";
import * as core from "../../../../core";

export const RolloutSegmentOperator: core.serialization.Schema<
serializers.RolloutSegmentOperator.Raw,
FliptApi.RolloutSegmentOperator
> = core.serialization.enum_(["OR_SEGMENT_OPERATOR", "AND_SEGMENT_OPERATOR"]);

export declare namespace RolloutSegmentOperator {
type Raw = "OR_SEGMENT_OPERATOR" | "AND_SEGMENT_OPERATOR";
}
1 change: 1 addition & 0 deletions src/serialization/resources/rollouts/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export * from "./RolloutList";
export * from "./Rollout";
export * from "./RolloutSegmentOperator";
export * from "./RolloutType";
export * from "./RolloutSegment";
export * from "./RolloutThreshold";
Expand Down
4 changes: 4 additions & 0 deletions src/serialization/resources/rules/types/Rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export const Rule: core.serialization.ObjectSchema<serializers.Rule.Raw, FliptAp
namespaceKey: core.serialization.string(),
flagKey: core.serialization.string(),
segmentKey: core.serialization.string(),
segmentKeys: core.serialization.list(core.serialization.string()).optional(),
segmentOperator: core.serialization.lazy(async () => (await import("../../..")).RuleSegmentOperator),
distributions: core.serialization.list(
core.serialization.lazyObject(async () => (await import("../../..")).Distribution)
),
Expand All @@ -25,6 +27,8 @@ export declare namespace Rule {
namespaceKey: string;
flagKey: string;
segmentKey: string;
segmentKeys?: string[] | null;
segmentOperator: serializers.RuleSegmentOperator.Raw;
distributions: serializers.Distribution.Raw[];
rank: number;
createdAt: string;
Expand Down
4 changes: 4 additions & 0 deletions src/serialization/resources/rules/types/RuleCreateRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ export const RuleCreateRequest: core.serialization.ObjectSchema<
FliptApi.RuleCreateRequest
> = core.serialization.object({
segmentKey: core.serialization.string(),
segmentKeys: core.serialization.list(core.serialization.string()).optional(),
segmentOperator: core.serialization.lazy(async () => (await import("../../..")).RuleSegmentOperator).optional(),
rank: core.serialization.number(),
});

export declare namespace RuleCreateRequest {
interface Raw {
segmentKey: string;
segmentKeys?: string[] | null;
segmentOperator?: serializers.RuleSegmentOperator.Raw | null;
rank: number;
}
}
16 changes: 16 additions & 0 deletions src/serialization/resources/rules/types/RuleSegmentOperator.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as serializers from "../../..";
import { FliptApi } from "@flipt-io/flipt";
import * as core from "../../../../core";

export const RuleSegmentOperator: core.serialization.Schema<
serializers.RuleSegmentOperator.Raw,
FliptApi.RuleSegmentOperator
> = core.serialization.enum_(["OR_SEGMENT_OPERATOR", "AND_SEGMENT_OPERATOR"]);

export declare namespace RuleSegmentOperator {
type Raw = "OR_SEGMENT_OPERATOR" | "AND_SEGMENT_OPERATOR";
}
4 changes: 4 additions & 0 deletions src/serialization/resources/rules/types/RuleUpdateRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ export const RuleUpdateRequest: core.serialization.ObjectSchema<
FliptApi.RuleUpdateRequest
> = core.serialization.object({
segmentKey: core.serialization.string(),
segmentKeys: core.serialization.list(core.serialization.string()).optional(),
segmentOperator: core.serialization.lazy(async () => (await import("../../..")).RuleSegmentOperator).optional(),
});

export declare namespace RuleUpdateRequest {
interface Raw {
segmentKey: string;
segmentKeys?: string[] | null;
segmentOperator?: serializers.RuleSegmentOperator.Raw | null;
}
}
1 change: 1 addition & 0 deletions src/serialization/resources/rules/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from "./RuleList";
export * from "./RuleSegmentOperator";
export * from "./Rule";
export * from "./RuleCreateRequest";
export * from "./RuleOrderRequest";
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
"@types/node" "*"

"@types/node@*":
version "20.4.10"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.10.tgz#73c9480791e3ddeb4887a660fc93a7f59353ad45"
integrity sha512-vwzFiiy8Rn6E0MtA13/Cxxgpan/N6UeNYR9oUu6kuJWxu6zCk98trcDp8CBhbtaeuq9SykCmXkFr2lWLoPcvLg==
version "20.5.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.5.0.tgz#7fc8636d5f1aaa3b21e6245e97d56b7f56702313"
integrity sha512-Mgq7eCtoTjT89FqNoTzzXg2XvCi5VMhRV6+I2aYanc6kQCBImeNaAYRs/DyoVqk1YEUJK5gN9VO7HRIdz4Wo3Q==

"@types/[email protected]":
version "17.0.33"
Expand Down

0 comments on commit 236c80e

Please sign in to comment.