Skip to content

Commit

Permalink
docs: Update types and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ldoppea committed Jul 26, 2024
1 parent 3273cc3 commit 33d9442
Show file tree
Hide file tree
Showing 5 changed files with 159 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/api/cozy-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ cozy-client
* [CozyClient](classes/CozyClient.md)
* [CozyLink](classes/CozyLink.md)
* [CozyProvider](classes/CozyProvider.md)
* [FlagshipLink](classes/FlagshipLink.md)
* [HasMany](classes/HasMany.md)
* [HasManyInPlace](classes/HasManyInPlace.md)
* [HasManyTriggers](classes/HasManyTriggers.md)
Expand Down
2 changes: 2 additions & 0 deletions docs/api/cozy-client/classes/CozyLink.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

[`StackLink`](StackLink.md)

[`FlagshipLink`](FlagshipLink.md)

## Constructors

### constructor
Expand Down
137 changes: 137 additions & 0 deletions docs/api/cozy-client/classes/FlagshipLink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
[cozy-client](../README.md) / FlagshipLink

# Class: FlagshipLink

## Hierarchy

* [`CozyLink`](CozyLink.md)

**`FlagshipLink`**

## Constructors

### constructor

**new FlagshipLink**(`[options]?`)

*Parameters*

| Name | Type | Description |
| :------ | :------ | :------ |
| `[options]` | `Object` | Options |
| `[options].client` | `any` | - |
| `[options].stackClient` | `any` | - |
| `[options].webviewIntent` | `WebviewService` | - |

*Overrides*

[CozyLink](CozyLink.md).[constructor](CozyLink.md#constructor)

*Defined in*

[packages/cozy-client/src/FlagshipLink.js:11](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/FlagshipLink.js#L11)

## Properties

### stackClient

**stackClient**: `any`

*Defined in*

[packages/cozy-client/src/FlagshipLink.js:18](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/FlagshipLink.js#L18)

***

### webviewIntent

**webviewIntent**: `WebviewService`

*Defined in*

[packages/cozy-client/src/FlagshipLink.js:19](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/FlagshipLink.js#L19)

## Methods

### persistData

**persistData**(`data`, `forward`): `Promise`<`void`>

*Parameters*

| Name | Type |
| :------ | :------ |
| `data` | `any` |
| `forward` | `any` |

*Returns*

`Promise`<`void`>

*Overrides*

[CozyLink](CozyLink.md).[persistData](CozyLink.md#persistdata)

*Defined in*

[packages/cozy-client/src/FlagshipLink.js:34](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/FlagshipLink.js#L34)

***

### registerClient

**registerClient**(`client`): `void`

*Parameters*

| Name | Type |
| :------ | :------ |
| `client` | `any` |

*Returns*

`void`

*Defined in*

[packages/cozy-client/src/FlagshipLink.js:22](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/FlagshipLink.js#L22)

***

### request

**request**(`operation`, `result`, `forward`): `Promise`<`boolean`>

*Parameters*

| Name | Type |
| :------ | :------ |
| `operation` | `any` |
| `result` | `any` |
| `forward` | `any` |

*Returns*

`Promise`<`boolean`>

*Overrides*

[CozyLink](CozyLink.md).[request](CozyLink.md#request)

*Defined in*

[packages/cozy-client/src/FlagshipLink.js:30](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/FlagshipLink.js#L30)

***

### reset

**reset**(): `void`

*Returns*

`void`

*Defined in*

[packages/cozy-client/src/FlagshipLink.js:26](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/FlagshipLink.js#L26)
18 changes: 18 additions & 0 deletions packages/cozy-client/types/FlagshipLink.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export default class FlagshipLink extends CozyLink {
/**
* @param {object} [options] - Options
* @param {object} [options.stackClient] - A StackClient
* @param {object} [options.client] - A StackClient (deprecated)
* @param {import('cozy-intent').WebviewService} [options.webviewIntent] - The webview's intent reference
*/
constructor({ client, stackClient, webviewIntent }?: {
stackClient: object;
client: object;
webviewIntent: import('cozy-intent').WebviewService;
});
stackClient: any;
webviewIntent: import("cozy-intent").WebviewService;
registerClient(client: any): void;
reset(): void;
}
import CozyLink from "./CozyLink";
1 change: 1 addition & 0 deletions packages/cozy-client/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export { default } from "./CozyClient";
export { default as CozyLink } from "./CozyLink";
export { default as StackLink } from "./StackLink";
export { default as FlagshipLink } from "./FlagshipLink";
export { default as compose } from "lodash/flow";
export { getQueryFromState } from "./store";
export { default as Registry } from "./registry";
Expand Down

0 comments on commit 33d9442

Please sign in to comment.