Skip to content

Commit

Permalink
Release 0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Jul 12, 2024
1 parent 559588d commit d712123
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ following namespace:
```typescript
import { Crossmint } from "crossmint";

const request: Crossmint.HeadlessCreateOrderRequest = {
const request: Crossmint.CreateOrderRequest = {
...
};
```
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ await client.headless.createOrder({

<dd>

**request: `Crossmint.HeadlessCreateOrderRequest`**
**request: `Crossmint.CreateOrderRequest`**

</dd>

Expand Down
14 changes: 6 additions & 8 deletions src/api/resources/headless/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -55,7 +55,7 @@ export class Headless {
* })
*/
public async createOrder(
request: Crossmint.HeadlessCreateOrderRequest,
request: Crossmint.CreateOrderRequest,
requestOptions?: Headless.RequestOptions
): Promise<Crossmint.CreateOrderResponse> {
const _response = await (this._options.fetcher ?? core.fetcher)({
Expand All @@ -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,
Expand Down Expand Up @@ -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()),
Expand Down Expand Up @@ -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()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import * as Crossmint from "../../../../index";
* }
* }
*/
export interface HeadlessCreateOrderRequest {
export interface CreateOrderRequest {
recipient?: Crossmint.Recipient;
locale?: Crossmint.Locale;
payment: Crossmint.Payment;
Expand Down
2 changes: 1 addition & 1 deletion src/api/resources/headless/client/requests/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { type HeadlessCreateOrderRequest } from "./HeadlessCreateOrderRequest";
export { type CreateOrderRequest } from "./CreateOrderRequest";
export { type OrderDto } from "./OrderDto";
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ 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(),
payment: Payment,
lineItems: LineItems,
});

export declare namespace HeadlessCreateOrderRequest {
export declare namespace CreateOrderRequest {
interface Raw {
recipient?: Recipient.Raw | null;
locale?: Locale.Raw | null;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { HeadlessCreateOrderRequest } from "./HeadlessCreateOrderRequest";
export { CreateOrderRequest } from "./CreateOrderRequest";
export { OrderDto } from "./OrderDto";

0 comments on commit d712123

Please sign in to comment.