@faasjs/react 0.0.2-beta.392 → 0.0.2-beta.395

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,7 +18,7 @@ React plugin for FaasJS.
18
18
  - [Response](classes/Response.md)
19
19
  - [ResponseError](classes/ResponseError.md)
20
20
 
21
- ### Type aliases
21
+ ### Type Aliases
22
22
 
23
23
  - [FaasDataInjection](#faasdatainjection)
24
24
  - [FaasDataWrapperProps](#faasdatawrapperprops)
@@ -34,7 +34,7 @@ React plugin for FaasJS.
34
34
  - [getClient](#getclient)
35
35
  - [useFaas](#usefaas)
36
36
 
37
- ## Type aliases
37
+ ## Type Aliases
38
38
 
39
39
  ### FaasDataInjection
40
40
 
@@ -98,15 +98,17 @@ ___
98
98
 
99
99
  | Name | Type |
100
100
  | :------ | :------ |
101
- | `FaasDataWrapper` | <PathOrData\>(`props`: [`FaasDataWrapperProps`](#faasdatawrapperprops)<`PathOrData`\>) => `Element` |
102
101
  | `faas` | <PathOrData\>(`action`: `string` \| `PathOrData`, `params`: `FaasParams`<`PathOrData`\>) => `Promise`<[`Response`](classes/Response.md)<`FaasData`<`PathOrData`\>\>\> |
103
102
  | `useFaas` | <PathOrData\>(`action`: `string` \| `PathOrData`, `defaultParams`: `FaasParams`<`PathOrData`\>) => [`FaasDataInjection`](#faasdatainjection)<`FaasData`<`PathOrData`\>\> |
103
+ | `FaasDataWrapper` | <PathOrData\>(`props`: [`FaasDataWrapperProps`](#faasdatawrapperprops)<`PathOrData`\>) => `Element` |
104
104
 
105
105
  ___
106
106
 
107
107
  ### Options
108
108
 
109
- Ƭ **Options**: `RequestInit` & { `headers?`: { `[key: string]`: `string`; } ; `beforeRequest?`: (`__namedParameters`: { `action`: `string` ; `options`: [`Options`](#options) ; `params`: `Record`<`string`, `any`\> }) => `void` \| `Promise`<`void`\> }
109
+ Ƭ **Options**: `RequestInit` & { `beforeRequest?`: (`{
110
+ action, params, options
111
+ }`: { `action`: `string` ; `options`: [`Options`](#options) ; `params`: `Record`<`string`, `any`\> }) => `Promise`<`void`\> \| `void` ; `headers?`: { `[key: string]`: `string`; } }
110
112
 
111
113
  ___
112
114
 
@@ -167,8 +169,8 @@ Before use faas, you should initialize a FaasReactClient.
167
169
  | :------ | :------ |
168
170
  | `__namedParameters` | `Object` |
169
171
  | `__namedParameters.domain` | `string` |
170
- | `__namedParameters.options?` | [`Options`](#options) |
171
172
  | `__namedParameters.onError?` | (`action`: `string`, `params`: `Record`<`string`, `any`\>) => (`res`: [`ResponseError`](classes/ResponseError.md)) => `Promise`<`void`\> |
173
+ | `__namedParameters.options?` | [`Options`](#options) |
172
174
 
173
175
  #### Returns
174
176
 
@@ -198,8 +200,8 @@ Request faas server
198
200
 
199
201
  | Name | Type | Description |
200
202
  | :------ | :------ | :------ |
201
- | `action` | `string` \| `PathOrData` | action name |
202
- | `params` | `FaasParams`<`PathOrData`\> | action params |
203
+ | `action` | `string` \| `PathOrData` | {string} action name |
204
+ | `params` | `FaasParams`<`PathOrData`\> | {object} action params |
203
205
 
204
206
  #### Returns
205
207
 
@@ -223,7 +225,7 @@ Get FaasReactClient instance
223
225
 
224
226
  | Name | Type | Description |
225
227
  | :------ | :------ | :------ |
226
- | `domain?` | `string` | empty string for default domain |
228
+ | `domain?` | `string` | {string} empty string for default domain |
227
229
 
228
230
  #### Returns
229
231
 
@@ -253,8 +255,8 @@ Request faas server with React hook
253
255
 
254
256
  | Name | Type | Description |
255
257
  | :------ | :------ | :------ |
256
- | `action` | `string` \| `PathOrData` | action name |
257
- | `defaultParams` | `FaasParams`<`PathOrData`\> | initial action params |
258
+ | `action` | `string` \| `PathOrData` | {string} action name |
259
+ | `defaultParams` | `FaasParams`<`PathOrData`\> | {object} initial action params |
258
260
 
259
261
  #### Returns
260
262
 
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
package/dist/index.mjs CHANGED
@@ -1,3 +1,5 @@
1
+ "use strict";
2
+
1
3
  // src/index.tsx
2
4
  import {
3
5
  FaasBrowserClient
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/react",
3
- "version": "0.0.2-beta.392",
3
+ "version": "0.0.2-beta.395",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -23,8 +23,8 @@
23
23
  "dist"
24
24
  ],
25
25
  "peerDependencies": {
26
- "@faasjs/browser": "^0.0.2-beta.392",
27
- "@faasjs/types": "^0.0.2-beta.392",
26
+ "@faasjs/browser": "^0.0.2-beta.395",
27
+ "@faasjs/types": "^0.0.2-beta.395",
28
28
  "react": "*"
29
29
  },
30
30
  "devDependencies": {