@shopware/api-client
Advanced tools
Comparing version
@@ -152,2 +152,43 @@ { | ||
], | ||
"Customer": [ | ||
{ | ||
"properties": { | ||
"accountType": "_DELETE_", | ||
"company": "_DELETE_", | ||
"vatIds": "_DELETE_" | ||
} | ||
}, | ||
{ | ||
"oneOf": [ | ||
{ | ||
"required": ["accountType"], | ||
"properties": { | ||
"accountType": { | ||
"type": "string", | ||
"enum": ["private"] | ||
} | ||
} | ||
}, | ||
{ | ||
"required": ["accountType", "vatIds", "company"], | ||
"properties": { | ||
"accountType": { | ||
"type": "string", | ||
"enum": ["business"] | ||
}, | ||
"vatIds": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"minItems": 1 | ||
}, | ||
"company": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"DeliveryInformation": [ | ||
@@ -451,2 +492,71 @@ { | ||
}, | ||
"/account/change-profile": { | ||
"post": [ | ||
{ | ||
"requestBody": { | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"properties": { | ||
"accountType": "_DELETE_", | ||
"company": "_DELETE_", | ||
"vatIds": "_DELETE_" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"requestBody": { | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"oneOf": [ | ||
{ | ||
"properties": { | ||
"accountType": { | ||
"description": "Type of the customer account. Default value is 'private'.", | ||
"type": "string", | ||
"enum": ["private"], | ||
"default": "private" | ||
}, | ||
"company": { | ||
"type": "null" | ||
}, | ||
"vatIds": { | ||
"type": "null" | ||
} | ||
} | ||
}, | ||
{ | ||
"required": ["accountType", "company", "vatIds"], | ||
"properties": { | ||
"accountType": { | ||
"description": "Type of the customer account. Can be `private` or `business`.", | ||
"type": "string", | ||
"enum": ["business"] | ||
}, | ||
"company": { | ||
"description": "Company of the customer. Only required when `accountType` is `business`.", | ||
"type": "string" | ||
}, | ||
"vatIds": { | ||
"description": "VAT IDs of the customer's company. Only valid when `accountType` is `business`.", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"minItems": 1 | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"/account/list-address": { | ||
@@ -486,2 +596,69 @@ "post": [ | ||
}, | ||
"/account/register": { | ||
"post":[ | ||
{ | ||
"requestBody": { | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"properties": { | ||
"accountType": "_DELETE_" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"requestBody": { | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"oneOf": [ | ||
{ | ||
"properties": { | ||
"accountType": { | ||
"description": "Type of the customer account. Default value is 'private'.", | ||
"type": "string", | ||
"enum": ["private"], | ||
"default": "private" | ||
}, | ||
"company": { | ||
"type": "null" | ||
}, | ||
"vatIds": { | ||
"type": "null" | ||
} | ||
} | ||
}, | ||
{ | ||
"required": ["accountType", "company", "vatIds"], | ||
"properties": { | ||
"accountType": { | ||
"description": "Type of the customer account. Can be `private` or `business`.", | ||
"type": "string", | ||
"enum": ["business"] | ||
}, | ||
"company": { | ||
"description": "Company of the customer. Only required when `accountType` is `business`.", | ||
"type": "string" | ||
}, | ||
"vatIds": { | ||
"description": "VAT IDs of the customer's company. Only valid when `accountType` is `business`.", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"minItems": 1 | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"/account/shopping-list/line-item/{id}/add": { | ||
@@ -488,0 +665,0 @@ "post": { |
@@ -1,2 +0,2 @@ | ||
import { components as mainComponents } from "./storeApiTypes"; | ||
import type { components as mainComponents } from "./storeApiTypes"; | ||
@@ -63,51 +63,2 @@ export type components = mainComponents; | ||
export type operations = { | ||
"register post /account/register": { | ||
contentType?: "application/json"; | ||
accept?: "application/json"; | ||
body: { | ||
/** Flag indicating accepted data protection */ | ||
acceptedDataProtection: boolean; | ||
/** | ||
* Account type of the customer which can be either `private` or `business`. | ||
* @default private | ||
*/ | ||
accountType?: string; | ||
/** Field can be used to store an affiliate tracking code */ | ||
affiliateCode?: string; | ||
billingAddress: Omit< | ||
components["schemas"]["CustomerAddress"], | ||
"createdAt" | "id" | "customerId" | "firstName" | "lastName" | ||
>; // TODO: [OpenAPI][register] - omit id, createdAt, customerId, firstName, lastName while creating address (or better to reverse and pick required fields) | ||
/** Birthday day */ | ||
birthdayDay?: number; | ||
/** Birthday month */ | ||
birthdayMonth?: number; | ||
/** Birthday year */ | ||
birthdayYear?: number; | ||
/** Field can be used to store a campaign tracking code */ | ||
campaignCode?: string; | ||
/** Email of the customer. Has to be unique, unless `guest` is `true` */ | ||
email: string; | ||
/** Customer first name. Value will be reused for shipping and billing address if not provided explicitly. */ | ||
firstName: string; | ||
/** | ||
* If set, will create a guest customer. Guest customers can re-use an email address and don't need a password. | ||
* @default false | ||
*/ | ||
guest?: boolean; | ||
/** Customer last name. Value will be reused for shipping and billing address if not provided explicitly. */ | ||
lastName: string; | ||
/** Password for the customer. Required, unless `guest` is `true` */ | ||
password: string; | ||
/** Id of the salutation for the customer account. Fetch options using `salutation` endpoint. */ | ||
salutationId: string; | ||
shippingAddress?: components["schemas"]["CustomerAddress"]; | ||
/** URL of the storefront for that registration. Used in confirmation emails. Has to be one of the configured domains of the sales channel. */ | ||
storefrontUrl: string; | ||
/** (Academic) title of the customer */ | ||
title?: string; | ||
}; | ||
response: components["schemas"]["Customer"]; | ||
responseCode: 200; | ||
}; | ||
"updateLineItem patch /checkout/cart/line-item": { | ||
@@ -114,0 +65,0 @@ contentType?: "application/json"; |
{ | ||
"name": "@shopware/api-client", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"description": "Shopware client for API connection.", | ||
@@ -45,10 +45,10 @@ "author": "Shopware", | ||
"devDependencies": { | ||
"@biomejs/biome": "1.8.3", | ||
"@codspeed/vitest-plugin": "3.1.1", | ||
"@types/prettier": "3.0.0", | ||
"@vitest/coverage-v8": "2.1.4", | ||
"@vitest/coverage-v8": "2.1.8", | ||
"jsdom": "^25.0.1", | ||
"prettier": "3.3.3", | ||
"prettier": "3.4.2", | ||
"unbuild": "2.0.0", | ||
"vitest": "2.1.4", | ||
"eslint-config-shopware": "1.0.0", | ||
"vitest": "2.1.8", | ||
"tsconfig": "0.0.0" | ||
@@ -65,3 +65,4 @@ }, | ||
"dev": "export NODE_ENV=development && unbuild --stub", | ||
"lint": "eslint src/**/*.ts* --fix --max-warnings=0 && pnpm run typecheck", | ||
"lint": "biome check .", | ||
"lint:fix": "biome check . --write && pnpm typecheck", | ||
"typecheck": "tsc --noEmit", | ||
@@ -68,0 +69,0 @@ "test": "vitest run --typecheck", |
@@ -282,6 +282,6 @@ # shopware/frontends - api-client | ||
### Latest changes: 1.1.2 | ||
### Latest changes: 1.2.0 | ||
### Patch Changes | ||
### Minor Changes | ||
- [#1434](https://github.com/shopware/frontends/pull/1434) [`938c4cf`](https://github.com/shopware/frontends/commit/938c4cfe6438f0e11a34f69bc7a183f10ba7f381) Thanks [@quando1910](https://github.com/quando1910)! - set authentication header instead of appending, when session has expired and is being refreshed | ||
- [#1468](https://github.com/shopware/frontends/pull/1468) [`a87bbcf`](https://github.com/shopware/frontends/commit/a87bbcfa3f5aa440265b1e8f0fc72a204863befc) Thanks [@JimTacobs](https://github.com/JimTacobs)! - Added fetchOptions to both API clients to allow for base configuration of http client |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
18507634
0.05%224464
0.1%