From d7121233e39f21dd213cd356736e80a9005d70c2 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 12 Jul 2024 15:07:20 +0000 Subject: [PATCH] Release 0.0.2 --- README.md | 2 +- package.json | 2 +- reference.md | 2 +- src/api/resources/headless/client/Client.ts | 14 ++++++-------- ...CreateOrderRequest.ts => CreateOrderRequest.ts} | 2 +- .../resources/headless/client/requests/index.ts | 2 +- ...CreateOrderRequest.ts => CreateOrderRequest.ts} | 8 ++++---- .../resources/headless/client/requests/index.ts | 2 +- 8 files changed, 16 insertions(+), 18 deletions(-) rename src/api/resources/headless/client/requests/{HeadlessCreateOrderRequest.ts => CreateOrderRequest.ts} (92%) rename src/serialization/resources/headless/client/requests/{HeadlessCreateOrderRequest.ts => CreateOrderRequest.ts} (78%) diff --git a/README.md b/README.md index f5a1d5d..e54c4c7 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ following namespace: ```typescript import { Crossmint } from "crossmint"; -const request: Crossmint.HeadlessCreateOrderRequest = { +const request: Crossmint.CreateOrderRequest = { ... }; ``` diff --git a/package.json b/package.json index 4e5be59..2315bdf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "crossmint", - "version": "0.0.1", + "version": "0.0.2", "private": false, "repository": "https://github.com/fern-demo/crossmint-typescript-sdk", "main": "./index.js", diff --git a/reference.md b/reference.md index 7302098..e8c5c30 100644 --- a/reference.md +++ b/reference.md @@ -66,7 +66,7 @@ await client.headless.createOrder({
-**request: `Crossmint.HeadlessCreateOrderRequest`** +**request: `Crossmint.CreateOrderRequest`**
diff --git a/src/api/resources/headless/client/Client.ts b/src/api/resources/headless/client/Client.ts index aa82075..101b4ae 100644 --- a/src/api/resources/headless/client/Client.ts +++ b/src/api/resources/headless/client/Client.ts @@ -35,7 +35,7 @@ export class Headless { /** * Creates a new order that can be used to complete a headless checkout. * - * @param {Crossmint.HeadlessCreateOrderRequest} request + * @param {Crossmint.CreateOrderRequest} request * @param {Headless.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Crossmint.BadRequestError} @@ -55,7 +55,7 @@ export class Headless { * }) */ public async createOrder( - request: Crossmint.HeadlessCreateOrderRequest, + request: Crossmint.CreateOrderRequest, requestOptions?: Headless.RequestOptions ): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -67,15 +67,13 @@ export class Headless { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "crossmint", - "X-Fern-SDK-Version": "0.0.1", + "X-Fern-SDK-Version": "0.0.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), }, contentType: "application/json", - body: await serializers.HeadlessCreateOrderRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + body: await serializers.CreateOrderRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, abortSignal: requestOptions?.abortSignal, @@ -181,7 +179,7 @@ export class Headless { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "crossmint", - "X-Fern-SDK-Version": "0.0.1", + "X-Fern-SDK-Version": "0.0.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -297,7 +295,7 @@ export class Headless { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "crossmint", - "X-Fern-SDK-Version": "0.0.1", + "X-Fern-SDK-Version": "0.0.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/headless/client/requests/HeadlessCreateOrderRequest.ts b/src/api/resources/headless/client/requests/CreateOrderRequest.ts similarity index 92% rename from src/api/resources/headless/client/requests/HeadlessCreateOrderRequest.ts rename to src/api/resources/headless/client/requests/CreateOrderRequest.ts index d73bd07..e5aed0a 100644 --- a/src/api/resources/headless/client/requests/HeadlessCreateOrderRequest.ts +++ b/src/api/resources/headless/client/requests/CreateOrderRequest.ts @@ -16,7 +16,7 @@ import * as Crossmint from "../../../../index"; * } * } */ -export interface HeadlessCreateOrderRequest { +export interface CreateOrderRequest { recipient?: Crossmint.Recipient; locale?: Crossmint.Locale; payment: Crossmint.Payment; diff --git a/src/api/resources/headless/client/requests/index.ts b/src/api/resources/headless/client/requests/index.ts index 2b59f8f..0dbebaf 100644 --- a/src/api/resources/headless/client/requests/index.ts +++ b/src/api/resources/headless/client/requests/index.ts @@ -1,2 +1,2 @@ -export { type HeadlessCreateOrderRequest } from "./HeadlessCreateOrderRequest"; +export { type CreateOrderRequest } from "./CreateOrderRequest"; export { type OrderDto } from "./OrderDto"; diff --git a/src/serialization/resources/headless/client/requests/HeadlessCreateOrderRequest.ts b/src/serialization/resources/headless/client/requests/CreateOrderRequest.ts similarity index 78% rename from src/serialization/resources/headless/client/requests/HeadlessCreateOrderRequest.ts rename to src/serialization/resources/headless/client/requests/CreateOrderRequest.ts index b229dcf..d9fc962 100644 --- a/src/serialization/resources/headless/client/requests/HeadlessCreateOrderRequest.ts +++ b/src/serialization/resources/headless/client/requests/CreateOrderRequest.ts @@ -10,9 +10,9 @@ import { Locale } from "../../../../types/Locale"; import { Payment } from "../../../../types/Payment"; import { LineItems } from "../../../../types/LineItems"; -export const HeadlessCreateOrderRequest: core.serialization.Schema< - serializers.HeadlessCreateOrderRequest.Raw, - Crossmint.HeadlessCreateOrderRequest +export const CreateOrderRequest: core.serialization.Schema< + serializers.CreateOrderRequest.Raw, + Crossmint.CreateOrderRequest > = core.serialization.object({ recipient: Recipient.optional(), locale: Locale.optional(), @@ -20,7 +20,7 @@ export const HeadlessCreateOrderRequest: core.serialization.Schema< lineItems: LineItems, }); -export declare namespace HeadlessCreateOrderRequest { +export declare namespace CreateOrderRequest { interface Raw { recipient?: Recipient.Raw | null; locale?: Locale.Raw | null; diff --git a/src/serialization/resources/headless/client/requests/index.ts b/src/serialization/resources/headless/client/requests/index.ts index 6e98342..584abc0 100644 --- a/src/serialization/resources/headless/client/requests/index.ts +++ b/src/serialization/resources/headless/client/requests/index.ts @@ -1,2 +1,2 @@ -export { HeadlessCreateOrderRequest } from "./HeadlessCreateOrderRequest"; +export { CreateOrderRequest } from "./CreateOrderRequest"; export { OrderDto } from "./OrderDto";