diff --git a/package.json b/package.json index 621c102..7b9e6d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "", - "version": "1.0.12", + "version": "1.0.13", "private": false, "repository": "https://github.com/dopt/blocks-javascript-browser-client", "main": "./index.js", diff --git a/src/api/resources/blocks/client/Client.ts b/src/api/resources/blocks/client/Client.ts index 77bbc9f..240d6e0 100644 --- a/src/api/resources/blocks/client/Client.ts +++ b/src/api/resources/blocks/client/Client.ts @@ -41,7 +41,7 @@ export class Blocks { "X-Api-Key": await core.Supplier.get(this.options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.0.13", }, contentType: "application/json", queryParameters: _queryParams, @@ -124,7 +124,7 @@ export class Blocks { "X-Api-Key": await core.Supplier.get(this.options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.0.13", }, contentType: "application/json", queryParameters: _queryParams, diff --git a/src/api/resources/flows/client/Client.ts b/src/api/resources/flows/client/Client.ts index 747ca0d..debfa8b 100644 --- a/src/api/resources/flows/client/Client.ts +++ b/src/api/resources/flows/client/Client.ts @@ -27,9 +27,16 @@ export class Flows { * @throws {@link DoptApi.InternalServerError} */ public async getFlow(sid: string, request: DoptApi.GetFlowRequest): Promise { - const { version, include, userIdentifier, groupIdentifier } = request; + const { version, tag, include, userIdentifier, groupIdentifier } = request; const _queryParams = new URLSearchParams(); - _queryParams.append("version", version.toString()); + if (version != null) { + _queryParams.append("version", version.toString()); + } + + if (tag != null) { + _queryParams.append("tag", tag); + } + if (include != null) { _queryParams.append("include", include); } @@ -49,7 +56,7 @@ export class Flows { "X-Api-Key": await core.Supplier.get(this.options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.0.13", }, contentType: "application/json", queryParameters: _queryParams, @@ -108,9 +115,16 @@ export class Flows { intent: DoptApi.IntentRequestIntent, request: DoptApi.IntentRequest ): Promise { - const { version, userIdentifier, groupIdentifier, force, ..._body } = request; + const { version, tag, userIdentifier, groupIdentifier, force, ..._body } = request; const _queryParams = new URLSearchParams(); - _queryParams.append("version", version.toString()); + if (version != null) { + _queryParams.append("version", version.toString()); + } + + if (tag != null) { + _queryParams.append("tag", tag); + } + _queryParams.append("userIdentifier", userIdentifier); if (groupIdentifier != null) { _queryParams.append("groupIdentifier", groupIdentifier); @@ -130,7 +144,7 @@ export class Flows { "X-Api-Key": await core.Supplier.get(this.options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.0.13", }, contentType: "application/json", queryParameters: _queryParams, diff --git a/src/api/resources/flows/client/requests/GetFlowRequest.ts b/src/api/resources/flows/client/requests/GetFlowRequest.ts index 236151f..f70c169 100644 --- a/src/api/resources/flows/client/requests/GetFlowRequest.ts +++ b/src/api/resources/flows/client/requests/GetFlowRequest.ts @@ -2,8 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ +import * as DoptApi from "../../../.."; + export interface GetFlowRequest { - version: number; + version?: number; + tag?: DoptApi.GetFlowRequestTag; include?: "block"; userIdentifier: string; groupIdentifier?: string; diff --git a/src/api/resources/flows/client/requests/IntentRequest.ts b/src/api/resources/flows/client/requests/IntentRequest.ts index 49df798..eab487a 100644 --- a/src/api/resources/flows/client/requests/IntentRequest.ts +++ b/src/api/resources/flows/client/requests/IntentRequest.ts @@ -2,8 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ +import * as DoptApi from "../../../.."; + export interface IntentRequest { - version: number; + version?: number; + tag?: DoptApi.IntentRequestTag; userIdentifier: string; groupIdentifier?: string; force?: boolean; diff --git a/src/api/types/FlowIntentQueryString.ts b/src/api/types/FlowIntentQueryString.ts index 71676c6..83d9dd6 100644 --- a/src/api/types/FlowIntentQueryString.ts +++ b/src/api/types/FlowIntentQueryString.ts @@ -2,8 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ +import * as DoptApi from ".."; + export interface FlowIntentQueryString { - version: number; + version?: number; + tag?: DoptApi.FlowIntentQueryStringTag; userIdentifier: string; groupIdentifier?: string; force?: boolean; diff --git a/src/api/types/FlowIntentQueryStringTag.ts b/src/api/types/FlowIntentQueryStringTag.ts new file mode 100644 index 0000000..f6f97d0 --- /dev/null +++ b/src/api/types/FlowIntentQueryStringTag.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type FlowIntentQueryStringTag = "uncommitted" | "latest"; + +export const FlowIntentQueryStringTag = { + Uncommitted: "uncommitted", + Latest: "latest", +} as const; diff --git a/src/api/types/GetFlowQueryString.ts b/src/api/types/GetFlowQueryString.ts index e11f6a2..d147d29 100644 --- a/src/api/types/GetFlowQueryString.ts +++ b/src/api/types/GetFlowQueryString.ts @@ -2,8 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ +import * as DoptApi from ".."; + export interface GetFlowQueryString { - version: number; + version?: number; + tag?: DoptApi.GetFlowQueryStringTag; include?: "block"; userIdentifier: string; groupIdentifier?: string; diff --git a/src/api/types/GetFlowQueryStringTag.ts b/src/api/types/GetFlowQueryStringTag.ts new file mode 100644 index 0000000..5243234 --- /dev/null +++ b/src/api/types/GetFlowQueryStringTag.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetFlowQueryStringTag = "uncommitted" | "latest"; + +export const GetFlowQueryStringTag = { + Uncommitted: "uncommitted", + Latest: "latest", +} as const; diff --git a/src/api/types/GetFlowRequestTag.ts b/src/api/types/GetFlowRequestTag.ts new file mode 100644 index 0000000..09188f3 --- /dev/null +++ b/src/api/types/GetFlowRequestTag.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetFlowRequestTag = "uncommitted" | "latest"; + +export const GetFlowRequestTag = { + Uncommitted: "uncommitted", + Latest: "latest", +} as const; diff --git a/src/api/types/IntentRequestTag.ts b/src/api/types/IntentRequestTag.ts new file mode 100644 index 0000000..f305efa --- /dev/null +++ b/src/api/types/IntentRequestTag.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type IntentRequestTag = "uncommitted" | "latest"; + +export const IntentRequestTag = { + Uncommitted: "uncommitted", + Latest: "latest", +} as const; diff --git a/src/api/types/index.ts b/src/api/types/index.ts index f00bb5f..122440a 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -3,6 +3,7 @@ export * from "./GetBlockResponseState"; export * from "./GetBlockResponseType"; export * from "./GetBlockResponseFieldsItem"; export * from "./GetBlockResponseFieldsItemGetBlockResponseFieldsItem"; +export * from "./GetFlowRequestTag"; export * from "./GetFlowResponse"; export * from "./GetFlowResponseState"; export * from "./GetFlowResponseBlocksItem"; @@ -11,18 +12,21 @@ export * from "./GetFlowResponseBlocksItemType"; export * from "./GetFlowResponseBlocksItemFieldsItem"; export * from "./GetFlowResponseBlocksItemFieldsItemGetFlowResponseBlocksItemFieldsItem"; export * from "./IntentRequestIntent"; +export * from "./IntentRequestTag"; export * from "./BadRequestErrorResponseBody"; export * from "./BadRequestErrorResponseBodyCode"; export * from "./BlockTransitionQueryString"; export * from "./BlockTransitionRequestBody"; export * from "./BlockTransitionRequestParams"; export * from "./FlowIntentQueryString"; +export * from "./FlowIntentQueryStringTag"; export * from "./FlowIntentRequestBody"; export * from "./FlowIntentRequestParams"; export * from "./FlowIntentRequestParamsIntent"; export * from "./GetBlockQueryString"; export * from "./GetBlockRequestParams"; export * from "./GetFlowQueryString"; +export * from "./GetFlowQueryStringTag"; export * from "./GetFlowRequestParams"; export * from "./HealthCheckResponseBody"; export * from "./InternalServerErrorResponseBody"; diff --git a/src/serialization/resources/flows/client/requests/IntentRequest.ts b/src/serialization/resources/flows/client/requests/IntentRequest.ts index 9245286..50c3595 100644 --- a/src/serialization/resources/flows/client/requests/IntentRequest.ts +++ b/src/serialization/resources/flows/client/requests/IntentRequest.ts @@ -8,7 +8,7 @@ import * as core from "../../../../../core"; export const IntentRequest: core.serialization.Schema< serializers.IntentRequest.Raw, - Omit + Omit > = core.serialization.object({}); export declare namespace IntentRequest { diff --git a/src/serialization/types/FlowIntentQueryString.ts b/src/serialization/types/FlowIntentQueryString.ts index 1df764e..e431010 100644 --- a/src/serialization/types/FlowIntentQueryString.ts +++ b/src/serialization/types/FlowIntentQueryString.ts @@ -10,7 +10,8 @@ export const FlowIntentQueryString: core.serialization.ObjectSchema< serializers.FlowIntentQueryString.Raw, DoptApi.FlowIntentQueryString > = core.serialization.object({ - version: core.serialization.number(), + version: core.serialization.number().optional(), + tag: core.serialization.lazy(async () => (await import("..")).FlowIntentQueryStringTag).optional(), userIdentifier: core.serialization.string(), groupIdentifier: core.serialization.string().optional(), force: core.serialization.boolean().optional(), @@ -18,7 +19,8 @@ export const FlowIntentQueryString: core.serialization.ObjectSchema< export declare namespace FlowIntentQueryString { interface Raw { - version: number; + version?: number | null; + tag?: serializers.FlowIntentQueryStringTag.Raw | null; userIdentifier: string; groupIdentifier?: string | null; force?: boolean | null; diff --git a/src/serialization/types/FlowIntentQueryStringTag.ts b/src/serialization/types/FlowIntentQueryStringTag.ts new file mode 100644 index 0000000..65fd2cf --- /dev/null +++ b/src/serialization/types/FlowIntentQueryStringTag.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as DoptApi from "../../api"; +import * as core from "../../core"; + +export const FlowIntentQueryStringTag: core.serialization.Schema< + serializers.FlowIntentQueryStringTag.Raw, + DoptApi.FlowIntentQueryStringTag +> = core.serialization.enum_(["uncommitted", "latest"]); + +export declare namespace FlowIntentQueryStringTag { + type Raw = "uncommitted" | "latest"; +} diff --git a/src/serialization/types/GetFlowQueryString.ts b/src/serialization/types/GetFlowQueryString.ts index 36eb7e1..bb6a9de 100644 --- a/src/serialization/types/GetFlowQueryString.ts +++ b/src/serialization/types/GetFlowQueryString.ts @@ -10,7 +10,8 @@ export const GetFlowQueryString: core.serialization.ObjectSchema< serializers.GetFlowQueryString.Raw, DoptApi.GetFlowQueryString > = core.serialization.object({ - version: core.serialization.number(), + version: core.serialization.number().optional(), + tag: core.serialization.lazy(async () => (await import("..")).GetFlowQueryStringTag).optional(), include: core.serialization.stringLiteral("block").optional(), userIdentifier: core.serialization.string(), groupIdentifier: core.serialization.string().optional(), @@ -18,7 +19,8 @@ export const GetFlowQueryString: core.serialization.ObjectSchema< export declare namespace GetFlowQueryString { interface Raw { - version: number; + version?: number | null; + tag?: serializers.GetFlowQueryStringTag.Raw | null; include?: "block" | null; userIdentifier: string; groupIdentifier?: string | null; diff --git a/src/serialization/types/GetFlowQueryStringTag.ts b/src/serialization/types/GetFlowQueryStringTag.ts new file mode 100644 index 0000000..8cdc829 --- /dev/null +++ b/src/serialization/types/GetFlowQueryStringTag.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as DoptApi from "../../api"; +import * as core from "../../core"; + +export const GetFlowQueryStringTag: core.serialization.Schema< + serializers.GetFlowQueryStringTag.Raw, + DoptApi.GetFlowQueryStringTag +> = core.serialization.enum_(["uncommitted", "latest"]); + +export declare namespace GetFlowQueryStringTag { + type Raw = "uncommitted" | "latest"; +} diff --git a/src/serialization/types/GetFlowRequestTag.ts b/src/serialization/types/GetFlowRequestTag.ts new file mode 100644 index 0000000..8d8580b --- /dev/null +++ b/src/serialization/types/GetFlowRequestTag.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as DoptApi from "../../api"; +import * as core from "../../core"; + +export const GetFlowRequestTag: core.serialization.Schema< + serializers.GetFlowRequestTag.Raw, + DoptApi.GetFlowRequestTag +> = core.serialization.enum_(["uncommitted", "latest"]); + +export declare namespace GetFlowRequestTag { + type Raw = "uncommitted" | "latest"; +} diff --git a/src/serialization/types/IntentRequestTag.ts b/src/serialization/types/IntentRequestTag.ts new file mode 100644 index 0000000..80d6a8f --- /dev/null +++ b/src/serialization/types/IntentRequestTag.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as DoptApi from "../../api"; +import * as core from "../../core"; + +export const IntentRequestTag: core.serialization.Schema = + core.serialization.enum_(["uncommitted", "latest"]); + +export declare namespace IntentRequestTag { + type Raw = "uncommitted" | "latest"; +} diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index f00bb5f..122440a 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -3,6 +3,7 @@ export * from "./GetBlockResponseState"; export * from "./GetBlockResponseType"; export * from "./GetBlockResponseFieldsItem"; export * from "./GetBlockResponseFieldsItemGetBlockResponseFieldsItem"; +export * from "./GetFlowRequestTag"; export * from "./GetFlowResponse"; export * from "./GetFlowResponseState"; export * from "./GetFlowResponseBlocksItem"; @@ -11,18 +12,21 @@ export * from "./GetFlowResponseBlocksItemType"; export * from "./GetFlowResponseBlocksItemFieldsItem"; export * from "./GetFlowResponseBlocksItemFieldsItemGetFlowResponseBlocksItemFieldsItem"; export * from "./IntentRequestIntent"; +export * from "./IntentRequestTag"; export * from "./BadRequestErrorResponseBody"; export * from "./BadRequestErrorResponseBodyCode"; export * from "./BlockTransitionQueryString"; export * from "./BlockTransitionRequestBody"; export * from "./BlockTransitionRequestParams"; export * from "./FlowIntentQueryString"; +export * from "./FlowIntentQueryStringTag"; export * from "./FlowIntentRequestBody"; export * from "./FlowIntentRequestParams"; export * from "./FlowIntentRequestParamsIntent"; export * from "./GetBlockQueryString"; export * from "./GetBlockRequestParams"; export * from "./GetFlowQueryString"; +export * from "./GetFlowQueryStringTag"; export * from "./GetFlowRequestParams"; export * from "./HealthCheckResponseBody"; export * from "./InternalServerErrorResponseBody";