@noya-app/noya-api-client-react 0.1.37 → 0.1.39
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/.turbo/turbo-build.log +9 -9
- package/CHANGELOG.md +17 -0
- package/dist/index.d.mts +23 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.js +145 -104
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +130 -90
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/react/tableHooks.ts +69 -9
package/.turbo/turbo-build.log
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
[34mCJS[39m Build start
|
|
8
8
|
[34mESM[39m Build start
|
|
9
9
|
DTS Build start
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
DTS ⚡️ Build success in
|
|
17
|
-
DTS dist/index.d.ts
|
|
18
|
-
DTS dist/index.d.mts
|
|
10
|
+
[32mCJS[39m [1mdist/index.js [22m[32m406.19 KB[39m
|
|
11
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m1.06 MB[39m
|
|
12
|
+
[32mCJS[39m ⚡️ Build success in 377ms
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m398.23 KB[39m
|
|
14
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m1.06 MB[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 378ms
|
|
16
|
+
DTS ⚡️ Build success in 6073ms
|
|
17
|
+
DTS dist/index.d.ts 16.52 KB
|
|
18
|
+
DTS dist/index.d.mts 16.52 KB
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @noya-app/noya-api-client-react
|
|
2
2
|
|
|
3
|
+
## 0.1.39
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 30ac7fe: Bump
|
|
8
|
+
- Updated dependencies [30ac7fe]
|
|
9
|
+
- @noya-app/observable-store@0.1.2
|
|
10
|
+
- @noya-app/noya-api@0.1.39
|
|
11
|
+
|
|
12
|
+
## 0.1.38
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [38b4ec2]
|
|
17
|
+
- @noya-app/noya-utils@0.1.8
|
|
18
|
+
- @noya-app/noya-api@0.1.38
|
|
19
|
+
|
|
3
20
|
## 0.1.37
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ export * from '@noya-app/noya-api';
|
|
|
3
3
|
import { Static } from '@noya-app/noya-multiplayer-react';
|
|
4
4
|
import { Resource, ActivityEvent } from '@noya-app/noya-schemas';
|
|
5
5
|
import { SelectConfig, SelectedShape } from '@noya-app/observable';
|
|
6
|
-
import { Table, EntitySchema, TableFetchOptions, RefetchFunction } from '@noya-app/observable-store';
|
|
6
|
+
import { Table, EntitySchema, TableFetchOptions, Entity, RefetchFunction } from '@noya-app/observable-store';
|
|
7
7
|
|
|
8
8
|
type NoyaAPIContextValue = NoyaAPI.Client;
|
|
9
9
|
declare const NoyaAPIProvider: React.Provider<NoyaAPIContextValue | undefined>;
|
|
@@ -24,6 +24,8 @@ declare function useNoyaTools(initial?: NoyaAPI.Tool[]): {
|
|
|
24
24
|
url: string;
|
|
25
25
|
description: string | null;
|
|
26
26
|
updatedAt: string;
|
|
27
|
+
theme: any;
|
|
28
|
+
icon: string | null;
|
|
27
29
|
tags: {
|
|
28
30
|
toolCount?: number | undefined;
|
|
29
31
|
id: string;
|
|
@@ -54,6 +56,8 @@ declare function useOptionalNoyaTools(initial?: NoyaAPI.Tool[]): {
|
|
|
54
56
|
url: string;
|
|
55
57
|
description: string | null;
|
|
56
58
|
updatedAt: string;
|
|
59
|
+
theme: any;
|
|
60
|
+
icon: string | null;
|
|
57
61
|
tags: {
|
|
58
62
|
toolCount?: number | undefined;
|
|
59
63
|
id: string;
|
|
@@ -117,6 +121,7 @@ declare function useNoyaAssets(fileId?: string): {
|
|
|
117
121
|
height: number | null;
|
|
118
122
|
id: string;
|
|
119
123
|
createdAt: string;
|
|
124
|
+
stableId: string;
|
|
120
125
|
userId: string | null;
|
|
121
126
|
url?: string | undefined;
|
|
122
127
|
size?: number | undefined;
|
|
@@ -130,6 +135,7 @@ declare function useNoyaAssetsByFileVersionId(fileVersionId: string): {
|
|
|
130
135
|
height: number | null;
|
|
131
136
|
id: string;
|
|
132
137
|
createdAt: string;
|
|
138
|
+
stableId: string;
|
|
133
139
|
userId: string | null;
|
|
134
140
|
url?: string | undefined;
|
|
135
141
|
size?: number | undefined;
|
|
@@ -498,31 +504,47 @@ declare function useTable<TTable extends Table<any>, Config extends GetSelectCon
|
|
|
498
504
|
status: NoyaAPI.FetchStatus;
|
|
499
505
|
data: SelectedShape<GetRowType<TTable>, Config>[];
|
|
500
506
|
refetch: () => void;
|
|
507
|
+
optimisticUpdate: (entity: Entity<TTable["schema"]>, config?: GetSelectConfig<TTable>) => void;
|
|
501
508
|
};
|
|
502
509
|
declare function useFileList<Config extends SelectConfig<NoyaAPI.FileListItem>>(select: Config, options?: UseTableOptions): {
|
|
503
510
|
status: NoyaAPI.FetchStatus;
|
|
504
511
|
data: SelectedShape<NoyaAPI.FileListItem, Config>[];
|
|
505
512
|
refetch: RefetchFunction;
|
|
513
|
+
optimisticUpdate: (entity: Partial<NoyaAPI.FileListItem> & {
|
|
514
|
+
id: string;
|
|
515
|
+
}, config?: Config) => void;
|
|
506
516
|
};
|
|
507
517
|
declare function useFileListItem<Config extends SelectConfig<NoyaAPI.FileListItem>>(id: string | undefined, select: Config, options?: UseTableOptions): {
|
|
508
518
|
status: NoyaAPI.FetchStatus;
|
|
509
519
|
data: SelectedShape<NoyaAPI.FileListItem, Config> | undefined;
|
|
510
520
|
refetch: RefetchFunction;
|
|
521
|
+
optimisticUpdate: (entity: Partial<NoyaAPI.FileListItem> & {
|
|
522
|
+
id: string;
|
|
523
|
+
}, config?: Config) => void;
|
|
511
524
|
};
|
|
512
525
|
declare function useResourcesList<Config extends SelectConfig<Resource>>(fileId: string, select: Config, options?: UseTableOptions): {
|
|
513
526
|
status: NoyaAPI.FetchStatus;
|
|
514
527
|
data: SelectedShape<Resource, Config>[];
|
|
515
528
|
refetch: RefetchFunction;
|
|
529
|
+
optimisticUpdate: (entity: Partial<Resource> & {
|
|
530
|
+
id: string;
|
|
531
|
+
}, config?: Config) => void;
|
|
516
532
|
};
|
|
517
533
|
declare function useUser<Config extends SelectConfig<NoyaAPI.PublicUser>>(id: string | null | undefined, select: Config, options?: UseTableOptions): {
|
|
518
534
|
status: NoyaAPI.FetchStatus;
|
|
519
535
|
data: SelectedShape<NoyaAPI.PublicUser, Config> | undefined;
|
|
520
536
|
refetch: RefetchFunction;
|
|
537
|
+
optimisticUpdate: (entity: Partial<NoyaAPI.PublicUser> & {
|
|
538
|
+
id: string;
|
|
539
|
+
}, config?: Config) => void;
|
|
521
540
|
};
|
|
522
541
|
declare function useActivityEventsList<Config extends SelectConfig<ActivityEvent>>(fileId: string, select: Config, options?: UseTableOptions): {
|
|
523
542
|
status: NoyaAPI.FetchStatus;
|
|
524
543
|
data: SelectedShape<ActivityEvent, Config>[];
|
|
525
544
|
refetch: RefetchFunction;
|
|
545
|
+
optimisticUpdate: (entity: Partial<ActivityEvent> & {
|
|
546
|
+
id: string;
|
|
547
|
+
}, config?: Config) => void;
|
|
526
548
|
};
|
|
527
549
|
|
|
528
550
|
export { type EnhancedGeneratedPageName, NoyaAPIProvider, useActivityEventsList, useFileList, useFileListItem, useGeneratedComponentDescription, useGeneratedComponentDescriptions, useGeneratedComponentNames, useGeneratedPageComponentNames, useGeneratedPageNames, useIsBeta, useMetadata, useNetworkRequests, useNoyaAssets, useNoyaAssetsByFileVersionId, useNoyaBilling, useNoyaClient, useNoyaClientOrFallback, useNoyaCreators, useNoyaDeployments, useNoyaEmailLists, useNoyaMultiplayerRoomToken, useNoyaOwnedFileVersions, useNoyaPersonalAccessTokens, useNoyaSecrets, useNoyaSession, useNoyaSite, useNoyaSites, useNoyaTags, useNoyaTemplates, useNoyaTools, useNoyaUserData, useNoyaWorkspaceBilling, useNoyaWorkspaceInvitations, useNoyaWorkspaces, useOptionalNoyaClient, useOptionalNoyaCreators, useOptionalNoyaSession, useOptionalNoyaTags, useOptionalNoyaTools, useOptionalNoyaUserData, useRandomIcons, useRandomImages, useResourcesList, useTable, useUser };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export * from '@noya-app/noya-api';
|
|
|
3
3
|
import { Static } from '@noya-app/noya-multiplayer-react';
|
|
4
4
|
import { Resource, ActivityEvent } from '@noya-app/noya-schemas';
|
|
5
5
|
import { SelectConfig, SelectedShape } from '@noya-app/observable';
|
|
6
|
-
import { Table, EntitySchema, TableFetchOptions, RefetchFunction } from '@noya-app/observable-store';
|
|
6
|
+
import { Table, EntitySchema, TableFetchOptions, Entity, RefetchFunction } from '@noya-app/observable-store';
|
|
7
7
|
|
|
8
8
|
type NoyaAPIContextValue = NoyaAPI.Client;
|
|
9
9
|
declare const NoyaAPIProvider: React.Provider<NoyaAPIContextValue | undefined>;
|
|
@@ -24,6 +24,8 @@ declare function useNoyaTools(initial?: NoyaAPI.Tool[]): {
|
|
|
24
24
|
url: string;
|
|
25
25
|
description: string | null;
|
|
26
26
|
updatedAt: string;
|
|
27
|
+
theme: any;
|
|
28
|
+
icon: string | null;
|
|
27
29
|
tags: {
|
|
28
30
|
toolCount?: number | undefined;
|
|
29
31
|
id: string;
|
|
@@ -54,6 +56,8 @@ declare function useOptionalNoyaTools(initial?: NoyaAPI.Tool[]): {
|
|
|
54
56
|
url: string;
|
|
55
57
|
description: string | null;
|
|
56
58
|
updatedAt: string;
|
|
59
|
+
theme: any;
|
|
60
|
+
icon: string | null;
|
|
57
61
|
tags: {
|
|
58
62
|
toolCount?: number | undefined;
|
|
59
63
|
id: string;
|
|
@@ -117,6 +121,7 @@ declare function useNoyaAssets(fileId?: string): {
|
|
|
117
121
|
height: number | null;
|
|
118
122
|
id: string;
|
|
119
123
|
createdAt: string;
|
|
124
|
+
stableId: string;
|
|
120
125
|
userId: string | null;
|
|
121
126
|
url?: string | undefined;
|
|
122
127
|
size?: number | undefined;
|
|
@@ -130,6 +135,7 @@ declare function useNoyaAssetsByFileVersionId(fileVersionId: string): {
|
|
|
130
135
|
height: number | null;
|
|
131
136
|
id: string;
|
|
132
137
|
createdAt: string;
|
|
138
|
+
stableId: string;
|
|
133
139
|
userId: string | null;
|
|
134
140
|
url?: string | undefined;
|
|
135
141
|
size?: number | undefined;
|
|
@@ -498,31 +504,47 @@ declare function useTable<TTable extends Table<any>, Config extends GetSelectCon
|
|
|
498
504
|
status: NoyaAPI.FetchStatus;
|
|
499
505
|
data: SelectedShape<GetRowType<TTable>, Config>[];
|
|
500
506
|
refetch: () => void;
|
|
507
|
+
optimisticUpdate: (entity: Entity<TTable["schema"]>, config?: GetSelectConfig<TTable>) => void;
|
|
501
508
|
};
|
|
502
509
|
declare function useFileList<Config extends SelectConfig<NoyaAPI.FileListItem>>(select: Config, options?: UseTableOptions): {
|
|
503
510
|
status: NoyaAPI.FetchStatus;
|
|
504
511
|
data: SelectedShape<NoyaAPI.FileListItem, Config>[];
|
|
505
512
|
refetch: RefetchFunction;
|
|
513
|
+
optimisticUpdate: (entity: Partial<NoyaAPI.FileListItem> & {
|
|
514
|
+
id: string;
|
|
515
|
+
}, config?: Config) => void;
|
|
506
516
|
};
|
|
507
517
|
declare function useFileListItem<Config extends SelectConfig<NoyaAPI.FileListItem>>(id: string | undefined, select: Config, options?: UseTableOptions): {
|
|
508
518
|
status: NoyaAPI.FetchStatus;
|
|
509
519
|
data: SelectedShape<NoyaAPI.FileListItem, Config> | undefined;
|
|
510
520
|
refetch: RefetchFunction;
|
|
521
|
+
optimisticUpdate: (entity: Partial<NoyaAPI.FileListItem> & {
|
|
522
|
+
id: string;
|
|
523
|
+
}, config?: Config) => void;
|
|
511
524
|
};
|
|
512
525
|
declare function useResourcesList<Config extends SelectConfig<Resource>>(fileId: string, select: Config, options?: UseTableOptions): {
|
|
513
526
|
status: NoyaAPI.FetchStatus;
|
|
514
527
|
data: SelectedShape<Resource, Config>[];
|
|
515
528
|
refetch: RefetchFunction;
|
|
529
|
+
optimisticUpdate: (entity: Partial<Resource> & {
|
|
530
|
+
id: string;
|
|
531
|
+
}, config?: Config) => void;
|
|
516
532
|
};
|
|
517
533
|
declare function useUser<Config extends SelectConfig<NoyaAPI.PublicUser>>(id: string | null | undefined, select: Config, options?: UseTableOptions): {
|
|
518
534
|
status: NoyaAPI.FetchStatus;
|
|
519
535
|
data: SelectedShape<NoyaAPI.PublicUser, Config> | undefined;
|
|
520
536
|
refetch: RefetchFunction;
|
|
537
|
+
optimisticUpdate: (entity: Partial<NoyaAPI.PublicUser> & {
|
|
538
|
+
id: string;
|
|
539
|
+
}, config?: Config) => void;
|
|
521
540
|
};
|
|
522
541
|
declare function useActivityEventsList<Config extends SelectConfig<ActivityEvent>>(fileId: string, select: Config, options?: UseTableOptions): {
|
|
523
542
|
status: NoyaAPI.FetchStatus;
|
|
524
543
|
data: SelectedShape<ActivityEvent, Config>[];
|
|
525
544
|
refetch: RefetchFunction;
|
|
545
|
+
optimisticUpdate: (entity: Partial<ActivityEvent> & {
|
|
546
|
+
id: string;
|
|
547
|
+
}, config?: Config) => void;
|
|
526
548
|
};
|
|
527
549
|
|
|
528
550
|
export { type EnhancedGeneratedPageName, NoyaAPIProvider, useActivityEventsList, useFileList, useFileListItem, useGeneratedComponentDescription, useGeneratedComponentDescriptions, useGeneratedComponentNames, useGeneratedPageComponentNames, useGeneratedPageNames, useIsBeta, useMetadata, useNetworkRequests, useNoyaAssets, useNoyaAssetsByFileVersionId, useNoyaBilling, useNoyaClient, useNoyaClientOrFallback, useNoyaCreators, useNoyaDeployments, useNoyaEmailLists, useNoyaMultiplayerRoomToken, useNoyaOwnedFileVersions, useNoyaPersonalAccessTokens, useNoyaSecrets, useNoyaSession, useNoyaSite, useNoyaSites, useNoyaTags, useNoyaTemplates, useNoyaTools, useNoyaUserData, useNoyaWorkspaceBilling, useNoyaWorkspaceInvitations, useNoyaWorkspaces, useOptionalNoyaClient, useOptionalNoyaCreators, useOptionalNoyaSession, useOptionalNoyaTags, useOptionalNoyaTools, useOptionalNoyaUserData, useRandomIcons, useRandomImages, useResourcesList, useTable, useUser };
|