@wise/dynamic-flow-types 2.7.0 → 2.8.0

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.
@@ -0,0 +1 @@
1
+ export type UploadSource = 'camera' | 'file';
@@ -1,16 +1,14 @@
1
- import type { BlobSchemaSource } from './BlobSchemaSource';
2
1
  import type { Icon } from '../misc/Icon';
3
2
  import type { Image } from '../misc/Image';
4
3
  import type { SummaryProvider } from '../feature/SummaryProvider';
5
4
  import type { ValidateAsync } from '../feature/ValidateAsync';
6
5
  import type { AlertLayout } from '../layout/AlertLayout';
6
+ import type { JsonElement } from '../JsonElement';
7
+ import type { UploadSource } from '../feature/UploadSource';
7
8
  export type BlobSchema = {
8
9
  type: 'blob';
9
10
  disabled?: boolean;
10
11
  $id?: string;
11
- accepts: string[];
12
- maxSize?: number;
13
- source?: BlobSchemaSource;
14
12
  title?: string;
15
13
  description?: string;
16
14
  control?: string;
@@ -23,6 +21,10 @@ export type BlobSchema = {
23
21
  validationAsync?: ValidateAsync;
24
22
  validationMessages?: Record<string, string>;
25
23
  alert?: AlertLayout;
24
+ cameraConfig?: JsonElement;
25
+ accepts?: string[];
26
+ maxSize?: number;
27
+ source?: UploadSource;
26
28
  /**
27
29
  * @deprecated Please use nested oneOf schemas instead.
28
30
  */
@@ -1,4 +1,3 @@
1
- import type { StringSchemaSource } from './StringSchemaSource';
2
1
  import type { StringSchemaFormat } from './StringSchemaFormat';
3
2
  import type { Icon } from '../misc/Icon';
4
3
  import type { Image } from '../misc/Image';
@@ -6,6 +5,8 @@ import type { SummaryProvider } from '../feature/SummaryProvider';
6
5
  import type { PersistAsync } from '../feature/PersistAsync';
7
6
  import type { ValidateAsync } from '../feature/ValidateAsync';
8
7
  import type { AlertLayout } from '../layout/AlertLayout';
8
+ import type { JsonElement } from '../JsonElement';
9
+ import type { UploadSource } from '../feature/UploadSource';
9
10
  import type { AutocompleteToken } from '../misc/AutocompleteToken';
10
11
  import type { Help } from '../feature/Help';
11
12
  export type StringSchema = {
@@ -61,7 +62,7 @@ export type StringSchema = {
61
62
  /**
62
63
  * @deprecated Please use 'persistAsync' with a 'BlobSchema' instead.
63
64
  */
64
- cameraConfig?: unknown;
65
+ cameraConfig?: JsonElement;
65
66
  /**
66
67
  * @deprecated Please use 'persistAsync' with a 'BlobSchema' instead.
67
68
  */
@@ -73,5 +74,5 @@ export type StringSchema = {
73
74
  /**
74
75
  * @deprecated Please use 'persistAsync' with a 'BlobSchema' instead.
75
76
  */
76
- source?: StringSchemaSource;
77
+ source?: UploadSource;
77
78
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-types",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "description": "Dynamic Flow TypeScript Types",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1 +0,0 @@
1
- export type BlobSchemaSource = 'file' | 'camera';
@@ -1,4 +0,0 @@
1
- /**
2
- * @deprecated Please do not use StringSchema for file uploads. You can use Persist Async with BlobSchema.
3
- */
4
- export type StringSchemaSource = 'camera' | 'file';