Skip to content

Commit

Permalink
Release 0.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] authored and fern-support committed Jul 17, 2024
1 parent 914db0f commit 4a0ff06
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
5 changes: 3 additions & 2 deletions .mock/definition/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ name: api
error-discrimination:
strategy: status-code
display-name: Headless Checkout
default-environment: Staging
environments:
Default: https://staging.crossmint.com/api
default-environment: Default
Staging: https://staging.crossmint.com/api
Production: https://www.crossmint.com/api
auth-schemes:
apiKey:
header: X-API-KEY
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.1.6",
"version": "0.1.7",
"private": false,
"repository": "https://github.com/fern-demo/crossmint-typescript-sdk",
"main": "./index.js",
Expand Down
12 changes: 6 additions & 6 deletions src/api/resources/checkout/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ export class Checkout {
): Promise<Crossmint.CreateOrderResponse> {
const _response = await (this._options.fetcher ?? core.fetcher)({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.CrossmintEnvironment.Default,
(await core.Supplier.get(this._options.environment)) ?? environments.CrossmintEnvironment.Staging,
"2022-06-09/orders"
),
method: "POST",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.1.6",
"X-Fern-SDK-Version": "0.1.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -169,14 +169,14 @@ export class Checkout {
public async getOrder(orderId: string, requestOptions?: Checkout.RequestOptions): Promise<Crossmint.OrderObject> {
const _response = await (this._options.fetcher ?? core.fetcher)({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.CrossmintEnvironment.Default,
(await core.Supplier.get(this._options.environment)) ?? environments.CrossmintEnvironment.Staging,
`2022-06-09/orders/${encodeURIComponent(orderId)}`
),
method: "GET",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.1.6",
"X-Fern-SDK-Version": "0.1.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -285,14 +285,14 @@ export class Checkout {
): Promise<Crossmint.OrderObject> {
const _response = await (this._options.fetcher ?? core.fetcher)({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.CrossmintEnvironment.Default,
(await core.Supplier.get(this._options.environment)) ?? environments.CrossmintEnvironment.Staging,
`2022-06-09/orders/${encodeURIComponent(orderId)}`
),
method: "PATCH",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.1.6",
"X-Fern-SDK-Version": "0.1.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
5 changes: 3 additions & 2 deletions src/environments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
*/

export const CrossmintEnvironment = {
Default: "https://staging.crossmint.com/api",
Staging: "https://staging.crossmint.com/api",
Production: "https://www.crossmint.com/api",
} as const;

export type CrossmintEnvironment = typeof CrossmintEnvironment.Default;
export type CrossmintEnvironment = typeof CrossmintEnvironment.Staging | typeof CrossmintEnvironment.Production;
2 changes: 1 addition & 1 deletion tests/custom/custom.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe("Integration", () => {
environment: CrossmintEnvironment.Staging
})

const create = await client.headless.createOrder({
const create = await client.checkout.createOrder({
"recipient": {
"email": "jsmith@example.com"
},
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1110,9 +1110,9 @@ domexception@^4.0.0:
webidl-conversions "^7.0.0"

electron-to-chromium@^1.4.820:
version "1.4.828"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.828.tgz#a1ee8cd8847448b2898d3f2d9db02113f9c5b35c"
integrity sha512-QOIJiWpQJDHAVO4P58pwb133Cwee0nbvy/MV1CwzZVGpkH1RX33N3vsaWRCpR6bF63AAq366neZrRTu7Qlsbbw==
version "1.4.829"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.829.tgz#3034a865b5eac9064c9db8b38ba99b60a446bb73"
integrity sha512-5qp1N2POAfW0u1qGAxXEtz6P7bO1m6gpZr5hdf5ve6lxpLM7MpiM4jIPz7xcrNlClQMafbyUDDWjlIQZ1Mw0Rw==

emittery@^0.13.1:
version "0.13.1"
Expand Down

0 comments on commit 4a0ff06

Please sign in to comment.