@noya-app/noya-api-client-react 0.1.38 → 0.1.40
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 +32 -1
- package/dist/index.d.ts +32 -1
- package/dist/index.js +146 -104
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +132 -91
- 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
|
-
[32mESM[39m [1mdist/index.mjs [22m[
|
|
11
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[32m1.
|
|
12
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
-
[32mCJS[39m [1mdist/index.js [22m[
|
|
14
|
-
[32mCJS[39m [1mdist/index.js.map [22m[32m1.
|
|
15
|
-
[32mCJS[39m ⚡️ Build success in
|
|
16
|
-
DTS ⚡️ Build success in
|
|
17
|
-
DTS dist/index.d.ts
|
|
18
|
-
DTS dist/index.d.mts
|
|
10
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m398.29 KB[39m
|
|
11
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m1.06 MB[39m
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 463ms
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m406.24 KB[39m
|
|
14
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m1.06 MB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 463ms
|
|
16
|
+
DTS ⚡️ Build success in 6843ms
|
|
17
|
+
DTS dist/index.d.ts 16.88 KB
|
|
18
|
+
DTS dist/index.d.mts 16.88 KB
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @noya-app/noya-api-client-react
|
|
2
2
|
|
|
3
|
+
## 0.1.40
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [11c73e0]
|
|
8
|
+
- @noya-app/noya-utils@0.1.9
|
|
9
|
+
- @noya-app/noya-api@0.1.40
|
|
10
|
+
|
|
11
|
+
## 0.1.39
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 30ac7fe: Bump
|
|
16
|
+
- Updated dependencies [30ac7fe]
|
|
17
|
+
- @noya-app/observable-store@0.1.2
|
|
18
|
+
- @noya-app/noya-api@0.1.39
|
|
19
|
+
|
|
3
20
|
## 0.1.38
|
|
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;
|
|
@@ -333,8 +339,10 @@ declare function useGeneratedPageNames(): EnhancedGeneratedPageName[];
|
|
|
333
339
|
declare function useGeneratedPageComponentNames(): EnhancedGeneratedPageName[];
|
|
334
340
|
declare function useNoyaSites(): {
|
|
335
341
|
sites: {
|
|
342
|
+
url?: string | null | undefined;
|
|
336
343
|
publishedDeploymentId?: string | null | undefined;
|
|
337
344
|
publishedDeployment?: {
|
|
345
|
+
url?: string | null | undefined;
|
|
338
346
|
id: string;
|
|
339
347
|
createdAt: string;
|
|
340
348
|
fileVersionId: string | null;
|
|
@@ -344,8 +352,10 @@ declare function useNoyaSites(): {
|
|
|
344
352
|
id: string;
|
|
345
353
|
subdomain: string | null;
|
|
346
354
|
createdAt: string;
|
|
355
|
+
workspaceId: string | null;
|
|
347
356
|
updatedAt: string;
|
|
348
357
|
deployments: {
|
|
358
|
+
url?: string | null | undefined;
|
|
349
359
|
id: string;
|
|
350
360
|
createdAt: string;
|
|
351
361
|
fileVersionId: string | null;
|
|
@@ -357,6 +367,7 @@ declare function useNoyaSites(): {
|
|
|
357
367
|
};
|
|
358
368
|
declare function useNoyaDeployments(): {
|
|
359
369
|
deployments: {
|
|
370
|
+
url?: string | null | undefined;
|
|
360
371
|
id: string;
|
|
361
372
|
createdAt: string;
|
|
362
373
|
fileVersionId: string | null;
|
|
@@ -367,8 +378,10 @@ declare function useNoyaDeployments(): {
|
|
|
367
378
|
};
|
|
368
379
|
declare function useNoyaSite(siteId: string): {
|
|
369
380
|
site: {
|
|
381
|
+
url?: string | null | undefined;
|
|
370
382
|
publishedDeploymentId?: string | null | undefined;
|
|
371
383
|
publishedDeployment?: {
|
|
384
|
+
url?: string | null | undefined;
|
|
372
385
|
id: string;
|
|
373
386
|
createdAt: string;
|
|
374
387
|
fileVersionId: string | null;
|
|
@@ -378,8 +391,10 @@ declare function useNoyaSite(siteId: string): {
|
|
|
378
391
|
id: string;
|
|
379
392
|
subdomain: string | null;
|
|
380
393
|
createdAt: string;
|
|
394
|
+
workspaceId: string | null;
|
|
381
395
|
updatedAt: string;
|
|
382
396
|
deployments: {
|
|
397
|
+
url?: string | null | undefined;
|
|
383
398
|
id: string;
|
|
384
399
|
createdAt: string;
|
|
385
400
|
fileVersionId: string | null;
|
|
@@ -498,31 +513,47 @@ declare function useTable<TTable extends Table<any>, Config extends GetSelectCon
|
|
|
498
513
|
status: NoyaAPI.FetchStatus;
|
|
499
514
|
data: SelectedShape<GetRowType<TTable>, Config>[];
|
|
500
515
|
refetch: () => void;
|
|
516
|
+
optimisticUpdate: (entity: Entity<TTable["schema"]>, config?: GetSelectConfig<TTable>) => void;
|
|
501
517
|
};
|
|
502
518
|
declare function useFileList<Config extends SelectConfig<NoyaAPI.FileListItem>>(select: Config, options?: UseTableOptions): {
|
|
503
519
|
status: NoyaAPI.FetchStatus;
|
|
504
520
|
data: SelectedShape<NoyaAPI.FileListItem, Config>[];
|
|
505
521
|
refetch: RefetchFunction;
|
|
522
|
+
optimisticUpdate: (entity: Partial<NoyaAPI.FileListItem> & {
|
|
523
|
+
id: string;
|
|
524
|
+
}, config?: Config) => void;
|
|
506
525
|
};
|
|
507
526
|
declare function useFileListItem<Config extends SelectConfig<NoyaAPI.FileListItem>>(id: string | undefined, select: Config, options?: UseTableOptions): {
|
|
508
527
|
status: NoyaAPI.FetchStatus;
|
|
509
528
|
data: SelectedShape<NoyaAPI.FileListItem, Config> | undefined;
|
|
510
529
|
refetch: RefetchFunction;
|
|
530
|
+
optimisticUpdate: (entity: Partial<NoyaAPI.FileListItem> & {
|
|
531
|
+
id: string;
|
|
532
|
+
}, config?: Config) => void;
|
|
511
533
|
};
|
|
512
534
|
declare function useResourcesList<Config extends SelectConfig<Resource>>(fileId: string, select: Config, options?: UseTableOptions): {
|
|
513
535
|
status: NoyaAPI.FetchStatus;
|
|
514
536
|
data: SelectedShape<Resource, Config>[];
|
|
515
537
|
refetch: RefetchFunction;
|
|
538
|
+
optimisticUpdate: (entity: Partial<Resource> & {
|
|
539
|
+
id: string;
|
|
540
|
+
}, config?: Config) => void;
|
|
516
541
|
};
|
|
517
542
|
declare function useUser<Config extends SelectConfig<NoyaAPI.PublicUser>>(id: string | null | undefined, select: Config, options?: UseTableOptions): {
|
|
518
543
|
status: NoyaAPI.FetchStatus;
|
|
519
544
|
data: SelectedShape<NoyaAPI.PublicUser, Config> | undefined;
|
|
520
545
|
refetch: RefetchFunction;
|
|
546
|
+
optimisticUpdate: (entity: Partial<NoyaAPI.PublicUser> & {
|
|
547
|
+
id: string;
|
|
548
|
+
}, config?: Config) => void;
|
|
521
549
|
};
|
|
522
550
|
declare function useActivityEventsList<Config extends SelectConfig<ActivityEvent>>(fileId: string, select: Config, options?: UseTableOptions): {
|
|
523
551
|
status: NoyaAPI.FetchStatus;
|
|
524
552
|
data: SelectedShape<ActivityEvent, Config>[];
|
|
525
553
|
refetch: RefetchFunction;
|
|
554
|
+
optimisticUpdate: (entity: Partial<ActivityEvent> & {
|
|
555
|
+
id: string;
|
|
556
|
+
}, config?: Config) => void;
|
|
526
557
|
};
|
|
527
558
|
|
|
528
559
|
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;
|
|
@@ -333,8 +339,10 @@ declare function useGeneratedPageNames(): EnhancedGeneratedPageName[];
|
|
|
333
339
|
declare function useGeneratedPageComponentNames(): EnhancedGeneratedPageName[];
|
|
334
340
|
declare function useNoyaSites(): {
|
|
335
341
|
sites: {
|
|
342
|
+
url?: string | null | undefined;
|
|
336
343
|
publishedDeploymentId?: string | null | undefined;
|
|
337
344
|
publishedDeployment?: {
|
|
345
|
+
url?: string | null | undefined;
|
|
338
346
|
id: string;
|
|
339
347
|
createdAt: string;
|
|
340
348
|
fileVersionId: string | null;
|
|
@@ -344,8 +352,10 @@ declare function useNoyaSites(): {
|
|
|
344
352
|
id: string;
|
|
345
353
|
subdomain: string | null;
|
|
346
354
|
createdAt: string;
|
|
355
|
+
workspaceId: string | null;
|
|
347
356
|
updatedAt: string;
|
|
348
357
|
deployments: {
|
|
358
|
+
url?: string | null | undefined;
|
|
349
359
|
id: string;
|
|
350
360
|
createdAt: string;
|
|
351
361
|
fileVersionId: string | null;
|
|
@@ -357,6 +367,7 @@ declare function useNoyaSites(): {
|
|
|
357
367
|
};
|
|
358
368
|
declare function useNoyaDeployments(): {
|
|
359
369
|
deployments: {
|
|
370
|
+
url?: string | null | undefined;
|
|
360
371
|
id: string;
|
|
361
372
|
createdAt: string;
|
|
362
373
|
fileVersionId: string | null;
|
|
@@ -367,8 +378,10 @@ declare function useNoyaDeployments(): {
|
|
|
367
378
|
};
|
|
368
379
|
declare function useNoyaSite(siteId: string): {
|
|
369
380
|
site: {
|
|
381
|
+
url?: string | null | undefined;
|
|
370
382
|
publishedDeploymentId?: string | null | undefined;
|
|
371
383
|
publishedDeployment?: {
|
|
384
|
+
url?: string | null | undefined;
|
|
372
385
|
id: string;
|
|
373
386
|
createdAt: string;
|
|
374
387
|
fileVersionId: string | null;
|
|
@@ -378,8 +391,10 @@ declare function useNoyaSite(siteId: string): {
|
|
|
378
391
|
id: string;
|
|
379
392
|
subdomain: string | null;
|
|
380
393
|
createdAt: string;
|
|
394
|
+
workspaceId: string | null;
|
|
381
395
|
updatedAt: string;
|
|
382
396
|
deployments: {
|
|
397
|
+
url?: string | null | undefined;
|
|
383
398
|
id: string;
|
|
384
399
|
createdAt: string;
|
|
385
400
|
fileVersionId: string | null;
|
|
@@ -498,31 +513,47 @@ declare function useTable<TTable extends Table<any>, Config extends GetSelectCon
|
|
|
498
513
|
status: NoyaAPI.FetchStatus;
|
|
499
514
|
data: SelectedShape<GetRowType<TTable>, Config>[];
|
|
500
515
|
refetch: () => void;
|
|
516
|
+
optimisticUpdate: (entity: Entity<TTable["schema"]>, config?: GetSelectConfig<TTable>) => void;
|
|
501
517
|
};
|
|
502
518
|
declare function useFileList<Config extends SelectConfig<NoyaAPI.FileListItem>>(select: Config, options?: UseTableOptions): {
|
|
503
519
|
status: NoyaAPI.FetchStatus;
|
|
504
520
|
data: SelectedShape<NoyaAPI.FileListItem, Config>[];
|
|
505
521
|
refetch: RefetchFunction;
|
|
522
|
+
optimisticUpdate: (entity: Partial<NoyaAPI.FileListItem> & {
|
|
523
|
+
id: string;
|
|
524
|
+
}, config?: Config) => void;
|
|
506
525
|
};
|
|
507
526
|
declare function useFileListItem<Config extends SelectConfig<NoyaAPI.FileListItem>>(id: string | undefined, select: Config, options?: UseTableOptions): {
|
|
508
527
|
status: NoyaAPI.FetchStatus;
|
|
509
528
|
data: SelectedShape<NoyaAPI.FileListItem, Config> | undefined;
|
|
510
529
|
refetch: RefetchFunction;
|
|
530
|
+
optimisticUpdate: (entity: Partial<NoyaAPI.FileListItem> & {
|
|
531
|
+
id: string;
|
|
532
|
+
}, config?: Config) => void;
|
|
511
533
|
};
|
|
512
534
|
declare function useResourcesList<Config extends SelectConfig<Resource>>(fileId: string, select: Config, options?: UseTableOptions): {
|
|
513
535
|
status: NoyaAPI.FetchStatus;
|
|
514
536
|
data: SelectedShape<Resource, Config>[];
|
|
515
537
|
refetch: RefetchFunction;
|
|
538
|
+
optimisticUpdate: (entity: Partial<Resource> & {
|
|
539
|
+
id: string;
|
|
540
|
+
}, config?: Config) => void;
|
|
516
541
|
};
|
|
517
542
|
declare function useUser<Config extends SelectConfig<NoyaAPI.PublicUser>>(id: string | null | undefined, select: Config, options?: UseTableOptions): {
|
|
518
543
|
status: NoyaAPI.FetchStatus;
|
|
519
544
|
data: SelectedShape<NoyaAPI.PublicUser, Config> | undefined;
|
|
520
545
|
refetch: RefetchFunction;
|
|
546
|
+
optimisticUpdate: (entity: Partial<NoyaAPI.PublicUser> & {
|
|
547
|
+
id: string;
|
|
548
|
+
}, config?: Config) => void;
|
|
521
549
|
};
|
|
522
550
|
declare function useActivityEventsList<Config extends SelectConfig<ActivityEvent>>(fileId: string, select: Config, options?: UseTableOptions): {
|
|
523
551
|
status: NoyaAPI.FetchStatus;
|
|
524
552
|
data: SelectedShape<ActivityEvent, Config>[];
|
|
525
553
|
refetch: RefetchFunction;
|
|
554
|
+
optimisticUpdate: (entity: Partial<ActivityEvent> & {
|
|
555
|
+
id: string;
|
|
556
|
+
}, config?: Config) => void;
|
|
526
557
|
};
|
|
527
558
|
|
|
528
559
|
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 };
|