Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .changeset/thick-cougars-accept.md

This file was deleted.

48 changes: 48 additions & 0 deletions docs/content/3.middleware/3.api/middleware.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -6151,6 +6151,54 @@
"endIndex": 6
}
},
{
"kind": "TypeAlias",
"canonicalReference": "@vue-storefront/middleware!WithoutContext:type",
"docComment": "/**\n * Removes the `context` from the methods of an API Client. `context` is an internal parameter added by the Server Middleware to the methods of the API Client. Removing it allows to define the contract of the endpoints exposed by the Server Middleware.\n *\n * @example\n * ```ts\n * type ApiClientMethods = {\n * getProduct: (context: any, id: string) => Promise<Product>;\n * }\n *\n * type Endpoints = WithoutContext<ApiClientMethods>;\n * // { getProduct: (id: string) => Promise<Product> }\n * ```\n *\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export type WithoutContext<Methods extends "
},
{
"kind": "Reference",
"text": "ApiMethods",
"canonicalReference": "@vue-storefront/middleware!ApiMethods:type"
},
{
"kind": "Content",
"text": "> = "
},
{
"kind": "Content",
"text": "{\n [T in keyof Methods]: Methods[T] extends (context: any, ...arguments_: infer P) => infer R ? (...arguments_: P) => R : never;\n}"
},
{
"kind": "Content",
"text": ";"
}
],
"fileUrlPath": "src/types/common.ts",
"releaseTag": "Public",
"name": "WithoutContext",
"typeParameters": [
{
"typeParameterName": "Methods",
"constraintTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"defaultTypeTokenRange": {
"startIndex": 0,
"endIndex": 0
}
}
],
"typeTokenRange": {
"startIndex": 3,
"endIndex": 4
}
},
{
"kind": "TypeAlias",
"canonicalReference": "@vue-storefront/middleware!WithRequired:type",
Expand Down
14 changes: 14 additions & 0 deletions docs/content/3.middleware/4.reference/change-log.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Change log

## 3.9.0

### Minor Changes

- 712ba85a6: [ADDED] Adds WithoutContext type helper.

```ts
type ApiClientMethods = {
getProduct: (context: any, id: string) => Promise<Product>;
};

type Endpoints = WithoutContext<ApiClientMethods>;
```

## 3.8.1

### Patch Changes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change log

## 3.0.0

### Patch Changes

- Updated dependencies [712ba85a6]
- @vue-storefront/middleware@3.9.0

## 2.0.1

### Patch Changes
Expand Down
14 changes: 14 additions & 0 deletions packages/middleware/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Change log

## 3.9.0

### Minor Changes

- 712ba85a6: [ADDED] Adds WithoutContext type helper.

```ts
type ApiClientMethods = {
getProduct: (context: any, id: string) => Promise<Product>;
};

type Endpoints = WithoutContext<ApiClientMethods>;
```

## 3.8.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/middleware/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue-storefront/middleware",
"version": "3.8.1",
"version": "3.9.0",
"main": "lib/index.cjs.js",
"module": "lib/index.es.js",
"types": "lib/index.d.ts",
Expand Down
7 changes: 7 additions & 0 deletions packages/multistore/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change log

## 3.0.0

### Patch Changes

- Updated dependencies [712ba85a6]
- @vue-storefront/middleware@3.9.0

## 2.0.1

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/multistore/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue-storefront/multistore",
"version": "2.0.1",
"version": "3.0.0",
"author": "Fifciu",
"license": "MIT",
"main": "lib/index.cjs.js",
Expand All @@ -20,7 +20,7 @@
"prepublishOnly": "yarn build"
},
"peerDependencies": {
"@vue-storefront/middleware": "^3"
"@vue-storefront/middleware": "^3.9.0"
},
"publishConfig": {
"access": "public"
Expand Down