@datalayer/core 1.1.43 → 1.1.45
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/lib/components/billing/BillingEntitySelect.d.ts +35 -0
- package/lib/components/billing/{BillableAccountSelect.js → BillingEntitySelect.js} +39 -41
- package/lib/components/billing/index.d.ts +1 -1
- package/lib/components/billing/index.js +1 -1
- package/lib/components/checkout/StripeCheckout.js +5 -5
- package/lib/components/display/VisuallyHidden.d.ts +1 -1
- package/lib/components/display/index.d.ts +0 -1
- package/lib/components/display/index.js +0 -1
- package/lib/components/principal/Principal.js +4 -2
- package/lib/components/principal/PrincipalBadge.js +21 -0
- package/lib/components/principal/PrincipalDetailsOverlay.js +72 -37
- package/lib/components/principal/PrincipalSwitcherMenu.d.ts +3 -3
- package/lib/components/principal/PrincipalSwitcherMenu.js +130 -111
- package/lib/hooks/index.d.ts +2 -2
- package/lib/hooks/index.js +2 -2
- package/lib/hooks/useBillingEntityStore.d.ts +31 -0
- package/lib/hooks/useBillingEntityStore.js +53 -0
- package/lib/hooks/useCache.d.ts +34 -33
- package/lib/hooks/useCache.js +32 -16
- package/lib/hooks/useSelectedBillingEntity.d.ts +14 -0
- package/lib/hooks/{useSelectedBillableAccount.js → useSelectedBillingEntity.js} +14 -14
- package/lib/hooks/useSelectedPrincipal.d.ts +1 -1
- package/lib/hooks/useSelectedPrincipal.js +1 -1
- package/package.json +4 -4
- package/lib/components/billing/BillableAccountSelect.d.ts +0 -35
- package/lib/components/display/LiveRelativeTime.d.ts +0 -1
- package/lib/components/display/LiveRelativeTime.js +0 -10
- package/lib/hooks/useBillableAccountStore.d.ts +0 -31
- package/lib/hooks/useBillableAccountStore.js +0 -53
- package/lib/hooks/useSelectedBillableAccount.d.ts +0 -14
package/lib/hooks/useCache.d.ts
CHANGED
|
@@ -265,7 +265,7 @@ export declare const useCache: ({ loginRoute }?: CacheProps) => {
|
|
|
265
265
|
password: string;
|
|
266
266
|
}, unknown>;
|
|
267
267
|
useLogout: () => import("@tanstack/react-query").UseMutationResult<any, Error, void, unknown>;
|
|
268
|
-
useMe: (token?: string) => import("@tanstack/react-query").UseQueryResult<IUser | null | undefined
|
|
268
|
+
useMe: (token?: string) => import("@tanstack/react-query").UseQueryResult<NoInfer<IUser | null | undefined>, Error>;
|
|
269
269
|
useUpdateMe: () => import("@tanstack/react-query").UseMutationResult<any, Error, {
|
|
270
270
|
email: string;
|
|
271
271
|
firstName: string;
|
|
@@ -356,11 +356,11 @@ export declare const useCache: ({ loginRoute }?: CacheProps) => {
|
|
|
356
356
|
body: object;
|
|
357
357
|
token: string;
|
|
358
358
|
}, unknown>;
|
|
359
|
-
useUser: (userId: string) => import("@tanstack/react-query").UseQueryResult<IUser | undefined
|
|
359
|
+
useUser: (userId: string) => import("@tanstack/react-query").UseQueryResult<NoInfer<IUser | undefined>, Error>;
|
|
360
360
|
useUserByHandle: (handle: string) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
361
361
|
useUserPublicProfileByHandle: (handle: string) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
362
|
-
useSearchUsers: (namingPattern: string) => import("@tanstack/react-query").UseQueryResult<IUser[]
|
|
363
|
-
useUsersByUids: (userIds: string[]) => import("@tanstack/react-query").UseQueryResult<IUser[]
|
|
362
|
+
useSearchUsers: (namingPattern: string) => import("@tanstack/react-query").UseQueryResult<NoInfer<IUser[]>, Error>;
|
|
363
|
+
useUsersByUids: (userIds: string[]) => import("@tanstack/react-query").UseQueryResult<NoInfer<IUser[]>, Error>;
|
|
364
364
|
useUpdateUserOnboarding: () => import("@tanstack/react-query").UseMutationResult<any, Error, IUserOnboarding, unknown>;
|
|
365
365
|
useUpdateUserSettings: () => import("@tanstack/react-query").UseMutationResult<any, Error, {
|
|
366
366
|
userId: string;
|
|
@@ -411,11 +411,11 @@ export declare const useCache: ({ loginRoute }?: CacheProps) => {
|
|
|
411
411
|
}, unknown>;
|
|
412
412
|
useUsages: (scopeOrOptions?: {
|
|
413
413
|
accountUid?: string;
|
|
414
|
-
} | Omit<UseQueryOptions<unknown[]>, "queryKey" | "queryFn">, options?: Omit<UseQueryOptions<unknown[]>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<unknown[]
|
|
415
|
-
useUsagesForUser: (userId: string, options?: Omit<UseQueryOptions<unknown[]>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<unknown[]
|
|
416
|
-
usePlatformUsages: (options?: Omit<UseQueryOptions<unknown[]>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<unknown[]
|
|
417
|
-
useOrganization: (organizationId: string) => import("@tanstack/react-query").UseQueryResult<IOrganization
|
|
418
|
-
useOrganizationByHandle: (handle: string) => import("@tanstack/react-query").UseQueryResult<IOrganization | null
|
|
414
|
+
} | Omit<UseQueryOptions<unknown[]>, "queryKey" | "queryFn">, options?: Omit<UseQueryOptions<unknown[]>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<NoInfer<unknown[]>, Error>;
|
|
415
|
+
useUsagesForUser: (userId: string, options?: Omit<UseQueryOptions<unknown[]>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<NoInfer<unknown[]>, Error>;
|
|
416
|
+
usePlatformUsages: (options?: Omit<UseQueryOptions<unknown[]>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<NoInfer<unknown[]>, Error>;
|
|
417
|
+
useOrganization: (organizationId: string) => import("@tanstack/react-query").UseQueryResult<NoInfer<IOrganization>, Error>;
|
|
418
|
+
useOrganizationByHandle: (handle: string) => import("@tanstack/react-query").UseQueryResult<NoInfer<IOrganization | null>, Error>;
|
|
419
419
|
useOrganizationPublicProfileByHandle: (handle: string) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
420
420
|
useUserOrganizations: () => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
421
421
|
useCreateOrganization: () => import("@tanstack/react-query").UseMutationResult<any, Error, Partial<IOrganization>, unknown>;
|
|
@@ -442,8 +442,8 @@ export declare const useCache: ({ loginRoute }?: CacheProps) => {
|
|
|
442
442
|
useRefreshUserOrganizations: () => import("@tanstack/react-query").UseMutationResult<any, Error, void, unknown>;
|
|
443
443
|
useUserOrganizationById: (organizationId: string) => any;
|
|
444
444
|
useClearCachedOrganizations: (options?: UseMutationOptions<void, Error, void>) => import("@tanstack/react-query").UseMutationResult<void, Error, void, unknown>;
|
|
445
|
-
useTeam: (teamId: string, organizationId: string) => import("@tanstack/react-query").UseQueryResult<ITeam
|
|
446
|
-
useTeamByHandle: (handle: string) => import("@tanstack/react-query").UseQueryResult<ITeam | null
|
|
445
|
+
useTeam: (teamId: string, organizationId: string) => import("@tanstack/react-query").UseQueryResult<NoInfer<ITeam>, Error>;
|
|
446
|
+
useTeamByHandle: (handle: string) => import("@tanstack/react-query").UseQueryResult<NoInfer<ITeam | null>, Error>;
|
|
447
447
|
useTeamsByOrganization: (organizationId: string) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
448
448
|
useCreateTeam: () => import("@tanstack/react-query").UseMutationResult<any, Error, {
|
|
449
449
|
team: Partial<ITeam>;
|
|
@@ -474,7 +474,7 @@ export declare const useCache: ({ loginRoute }?: CacheProps) => {
|
|
|
474
474
|
}, unknown>;
|
|
475
475
|
useRefreshTeams: () => import("@tanstack/react-query").UseMutationResult<any, Error, string, unknown>;
|
|
476
476
|
useClearCachedTeams: (options?: UseMutationOptions<void, Error, void>) => import("@tanstack/react-query").UseMutationResult<void, Error, void, unknown>;
|
|
477
|
-
useSchools: () => import("@tanstack/react-query").UseQueryResult<ISchool[]
|
|
477
|
+
useSchools: () => import("@tanstack/react-query").UseQueryResult<NoInfer<ISchool[]>, Error>;
|
|
478
478
|
useRefreshSchools: (options?: UseMutationOptions<unknown, Error, void>) => import("@tanstack/react-query").UseMutationResult<unknown, Error, void, unknown>;
|
|
479
479
|
useSpace: (spaceId: string) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
480
480
|
useOrganizationSpace: (organizationId: string, spaceId: string) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
@@ -720,11 +720,11 @@ export declare const useCache: ({ loginRoute }?: CacheProps) => {
|
|
|
720
720
|
}, unknown>;
|
|
721
721
|
useRefreshSpaceAssignments: (options?: UseMutationOptions<unknown, Error, string>) => import("@tanstack/react-query").UseMutationResult<unknown, Error, string, unknown>;
|
|
722
722
|
useDeleteItem: () => import("@tanstack/react-query").UseMutationResult<any, Error, string, unknown>;
|
|
723
|
-
useSpaceItems: (spaceId: string) => import("@tanstack/react-query").UseQueryResult<any[]
|
|
724
|
-
useSpaceDefaultItems: (spaceId: string | undefined) => import("@tanstack/react-query").UseQueryResult<{
|
|
723
|
+
useSpaceItems: (spaceId: string) => import("@tanstack/react-query").UseQueryResult<NoInfer<any[]>, Error>;
|
|
724
|
+
useSpaceDefaultItems: (spaceId: string | undefined) => import("@tanstack/react-query").UseQueryResult<NoInfer<{
|
|
725
725
|
defaultNotebookUid: string | null;
|
|
726
726
|
defaultDocumentUid: string | null;
|
|
727
|
-
}
|
|
727
|
+
}>, Error>;
|
|
728
728
|
useMakeItemPublic: () => import("@tanstack/react-query").UseMutationResult<any, Error, string, unknown>;
|
|
729
729
|
useMakeItemPrivate: () => import("@tanstack/react-query").UseMutationResult<any, Error, string, unknown>;
|
|
730
730
|
useSearchPublicItems: () => import("@tanstack/react-query").UseMutationResult<any, Error, {
|
|
@@ -749,7 +749,7 @@ export declare const useCache: ({ loginRoute }?: CacheProps) => {
|
|
|
749
749
|
useDatasource: (datasourceId: string, options?: {
|
|
750
750
|
principalUid?: string;
|
|
751
751
|
principalKind?: "personal" | "organization" | "team";
|
|
752
|
-
}) => import("@tanstack/react-query").UseQueryResult<IDatasource | null | undefined
|
|
752
|
+
}) => import("@tanstack/react-query").UseQueryResult<NoInfer<IDatasource | null | undefined>, Error>;
|
|
753
753
|
useDatasources: (options?: {
|
|
754
754
|
principalUid?: string;
|
|
755
755
|
principalKind?: "personal" | "organization" | "team";
|
|
@@ -769,7 +769,7 @@ export declare const useCache: ({ loginRoute }?: CacheProps) => {
|
|
|
769
769
|
refetchOnMount?: boolean | "always";
|
|
770
770
|
staleTime?: number;
|
|
771
771
|
gcTime?: number;
|
|
772
|
-
}) => import("@tanstack/react-query").UseQueryResult<ISecret | null | undefined
|
|
772
|
+
}) => import("@tanstack/react-query").UseQueryResult<NoInfer<ISecret | null | undefined>, Error>;
|
|
773
773
|
useSecrets: (options?: {
|
|
774
774
|
principalUid?: string;
|
|
775
775
|
principalKind?: "personal" | "organization" | "team";
|
|
@@ -786,12 +786,12 @@ export declare const useCache: ({ loginRoute }?: CacheProps) => {
|
|
|
786
786
|
principalUid?: string;
|
|
787
787
|
principalKind?: "personal" | "organization" | "team";
|
|
788
788
|
}) => import("@tanstack/react-query").UseMutationResult<any, Error, string, unknown>;
|
|
789
|
-
useToken: (tokenId: string) => import("@tanstack/react-query").UseQueryResult<IIAMToken | null | undefined
|
|
790
|
-
useTokens: () => import("@tanstack/react-query").UseQueryResult<(IIAMToken | undefined)[]
|
|
789
|
+
useToken: (tokenId: string) => import("@tanstack/react-query").UseQueryResult<NoInfer<IIAMToken | null | undefined>, Error>;
|
|
790
|
+
useTokens: () => import("@tanstack/react-query").UseQueryResult<NoInfer<(IIAMToken | undefined)[]>, Error>;
|
|
791
791
|
useCreateToken: () => import("@tanstack/react-query").UseMutationResult<any, Error, Omit<IIAMToken, "id" | "value">, unknown>;
|
|
792
792
|
useUpdateToken: () => import("@tanstack/react-query").UseMutationResult<any, Error, IIAMToken, unknown>;
|
|
793
793
|
useDeleteToken: () => import("@tanstack/react-query").UseMutationResult<any, Error, string, unknown>;
|
|
794
|
-
useInvite: (token: string) => import("@tanstack/react-query").UseQueryResult<import("..").IInvite | undefined
|
|
794
|
+
useInvite: (token: string) => import("@tanstack/react-query").UseQueryResult<NoInfer<import("..").IInvite | undefined>, Error>;
|
|
795
795
|
useInvitesByUser: (accountId: string) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
796
796
|
usePutInvite: () => import("@tanstack/react-query").UseMutationResult<any, Error, string, unknown>;
|
|
797
797
|
useRequestInvite: (options?: UseMutationOptions<unknown, Error, {
|
|
@@ -823,8 +823,8 @@ export declare const useCache: ({ loginRoute }?: CacheProps) => {
|
|
|
823
823
|
useClearCachedInvites: (options?: UseMutationOptions<void, Error, void>) => import("@tanstack/react-query").UseMutationResult<void, Error, void, unknown>;
|
|
824
824
|
useContact: (contactId: string, options?: {
|
|
825
825
|
enabled?: boolean;
|
|
826
|
-
}) => import("@tanstack/react-query").UseQueryResult<IContact | undefined
|
|
827
|
-
useContactByHandle: (handle: string) => import("@tanstack/react-query").UseQueryResult<IContact | null | undefined
|
|
826
|
+
}) => import("@tanstack/react-query").UseQueryResult<NoInfer<IContact | undefined>, Error>;
|
|
827
|
+
useContactByHandle: (handle: string) => import("@tanstack/react-query").UseQueryResult<NoInfer<IContact | null | undefined>, Error>;
|
|
828
828
|
useSearchContacts: (query: string) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
829
829
|
useCreateContact: () => import("@tanstack/react-query").UseMutationResult<any, Error, IContact, unknown>;
|
|
830
830
|
useUpdateContact: () => import("@tanstack/react-query").UseMutationResult<any, Error, {
|
|
@@ -862,12 +862,12 @@ export declare const useCache: ({ loginRoute }?: CacheProps) => {
|
|
|
862
862
|
contactId: string;
|
|
863
863
|
}, unknown>;
|
|
864
864
|
useRefreshContact: (options?: UseMutationOptions<unknown, Error, string>) => import("@tanstack/react-query").UseMutationResult<unknown, Error, string, unknown>;
|
|
865
|
-
useInbounds: (options?: Omit<UseQueryOptions<unknown[]>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<unknown[]
|
|
865
|
+
useInbounds: (options?: Omit<UseQueryOptions<unknown[]>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<NoInfer<unknown[]>, Error>;
|
|
866
866
|
useInbound: (id: string, options?: UseQueryOptions<unknown, Error>) => import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
867
867
|
useInboundByHandle: (handle: string, options?: UseQueryOptions<unknown, Error>) => import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
868
868
|
useRefreshInbound: (options?: UseMutationOptions<unknown, Error, string>) => import("@tanstack/react-query").UseMutationResult<unknown, Error, string, unknown>;
|
|
869
869
|
useOutbound: (outboundId: string, options?: Omit<UseQueryOptions<unknown>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
870
|
-
useOutbounds: (options?: Omit<UseQueryOptions<unknown[]>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<unknown[]
|
|
870
|
+
useOutbounds: (options?: Omit<UseQueryOptions<unknown[]>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<NoInfer<unknown[]>, Error>;
|
|
871
871
|
useDraftBulkEmailsOutbounds: () => import("@tanstack/react-query").UseMutationResult<any, Error, unknown, unknown>;
|
|
872
872
|
useTryBulkEmailsOutbounds: () => import("@tanstack/react-query").UseMutationResult<any, Error, string, unknown>;
|
|
873
873
|
useLaunchBulkEmailsOutbounds: () => import("@tanstack/react-query").UseMutationResult<any, Error, string, unknown>;
|
|
@@ -875,6 +875,7 @@ export declare const useCache: ({ loginRoute }?: CacheProps) => {
|
|
|
875
875
|
userId: string;
|
|
876
876
|
recipient: string;
|
|
877
877
|
subject: string;
|
|
878
|
+
htmlContent?: string;
|
|
878
879
|
content: string;
|
|
879
880
|
}, unknown>;
|
|
880
881
|
useDeleteOutbound: () => import("@tanstack/react-query").UseMutationResult<any, Error, string, unknown>;
|
|
@@ -907,9 +908,9 @@ export declare const useCache: ({ loginRoute }?: CacheProps) => {
|
|
|
907
908
|
}, options?: Omit<UseQueryOptions<any>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
908
909
|
useSubscriptionPlans: (scope?: {
|
|
909
910
|
accountUid?: string;
|
|
910
|
-
}, options?: Omit<UseQueryOptions<unknown[]>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<unknown[]
|
|
911
|
-
useEligibleSubscriptionAccounts: (options?: Omit<UseQueryOptions<any[]>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<any[]
|
|
912
|
-
useSubscriptionAccountsDetails: (accountUids: string[], options?: Omit<UseQueryOptions<any[]>, "queryKey" | "queryFn" | "enabled">) => import("@tanstack/react-query").UseQueryResult<any[]
|
|
911
|
+
}, options?: Omit<UseQueryOptions<unknown[]>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<NoInfer<unknown[]>, Error>;
|
|
912
|
+
useEligibleSubscriptionAccounts: (options?: Omit<UseQueryOptions<any[]>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<NoInfer<any[]>, Error>;
|
|
913
|
+
useSubscriptionAccountsDetails: (accountUids: string[], options?: Omit<UseQueryOptions<any[]>, "queryKey" | "queryFn" | "enabled">) => import("@tanstack/react-query").UseQueryResult<NoInfer<any[]>, Error>;
|
|
913
914
|
useCancelSubscription: (scope?: {
|
|
914
915
|
accountUid?: string;
|
|
915
916
|
}) => import("@tanstack/react-query").UseMutationResult<any, Error, void, unknown>;
|
|
@@ -919,7 +920,7 @@ export declare const useCache: ({ loginRoute }?: CacheProps) => {
|
|
|
919
920
|
useUserSubscription: (userId: string | undefined, options?: Omit<UseQueryOptions<any>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
920
921
|
useResetUserSubscription: () => import("@tanstack/react-query").UseMutationResult<any, Error, string, unknown>;
|
|
921
922
|
useBurnCredit: () => import("@tanstack/react-query").UseMutationResult<any, Error, number, unknown>;
|
|
922
|
-
useTopUpPrices: (options?: Omit<UseQueryOptions<unknown[]>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<unknown[]
|
|
923
|
+
useTopUpPrices: (options?: Omit<UseQueryOptions<unknown[]>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<NoInfer<unknown[]>, Error>;
|
|
923
924
|
useRequestPlatformSupport: () => import("@tanstack/react-query").UseMutationResult<any, Error, {
|
|
924
925
|
subject: string;
|
|
925
926
|
message: string;
|
|
@@ -936,20 +937,20 @@ export declare const useCache: ({ loginRoute }?: CacheProps) => {
|
|
|
936
937
|
useUserSurveys: (userId: string, options?: Omit<UseQueryOptions<unknown>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
937
938
|
useGrowthKPI: (options?: Omit<UseQueryOptions<unknown>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
938
939
|
useGrowthContactsKPI: (options?: Omit<UseQueryOptions<unknown>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
939
|
-
useRayClusters: () => import("@tanstack/react-query").UseQueryResult<{
|
|
940
|
+
useRayClusters: () => import("@tanstack/react-query").UseQueryResult<NoInfer<{
|
|
940
941
|
clusters: any[];
|
|
941
942
|
namespaces: string[];
|
|
942
|
-
}
|
|
943
|
+
}>, Error>;
|
|
943
944
|
useRayCluster: (namespace?: string, clusterName?: string) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
944
945
|
useCreateRayCluster: () => import("@tanstack/react-query").UseMutationResult<any, Error, Record<string, unknown>, unknown>;
|
|
945
946
|
useDeleteRayCluster: (namespace?: string) => import("@tanstack/react-query").UseMutationResult<any, Error, string, unknown>;
|
|
946
|
-
useRayJobs: (namespace?: string, clusterName?: string) => import("@tanstack/react-query").UseQueryResult<any[]
|
|
947
|
+
useRayJobs: (namespace?: string, clusterName?: string) => import("@tanstack/react-query").UseQueryResult<NoInfer<any[]>, Error>;
|
|
947
948
|
useSubmitRayJob: (clusterName: string) => import("@tanstack/react-query").UseMutationResult<any, Error, Record<string, unknown>, unknown>;
|
|
948
949
|
useDeleteRayJob: (namespace?: string) => import("@tanstack/react-query").UseMutationResult<any, Error, string, unknown>;
|
|
949
|
-
useRayJobLogs: (jobName: string, namespace?: string, tailLines?: number, enabled?: boolean) => import("@tanstack/react-query").UseQueryResult<{
|
|
950
|
+
useRayJobLogs: (jobName: string, namespace?: string, tailLines?: number, enabled?: boolean) => import("@tanstack/react-query").UseQueryResult<NoInfer<{
|
|
950
951
|
logs: string;
|
|
951
952
|
status: string;
|
|
952
|
-
}
|
|
953
|
+
}>, Error>;
|
|
953
954
|
queryKeys: {
|
|
954
955
|
readonly auth: {
|
|
955
956
|
readonly me: () => readonly ["auth", "me"];
|
package/lib/hooks/useCache.js
CHANGED
|
@@ -420,19 +420,23 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
420
420
|
codeStudent: studentItem.code_student_t ?? studentItem.codeStudent,
|
|
421
421
|
completed,
|
|
422
422
|
pass,
|
|
423
|
-
nbgrades: studentItem.nbgrades ??
|
|
424
|
-
studentItem.grades ??
|
|
425
|
-
[],
|
|
423
|
+
nbgrades: studentItem.nbgrades ?? studentItem.grades ?? [],
|
|
426
424
|
nbgradesTotalPoints: studentItem.nbgrades_total_points_f ??
|
|
427
425
|
studentItem.nbgradesTotalPoints ??
|
|
428
426
|
studentItem.total_points_f ??
|
|
429
|
-
((studentItem.item_type_s ??
|
|
427
|
+
((studentItem.item_type_s ??
|
|
428
|
+
studentItem.itemType ??
|
|
429
|
+
studentItem.type_s ??
|
|
430
|
+
studentItem.type) === 'assignment'
|
|
430
431
|
? 0
|
|
431
432
|
: undefined),
|
|
432
433
|
nbgradesTotalScore: studentItem.nbgrades_total_score_f ??
|
|
433
434
|
studentItem.nbgradesTotalScore ??
|
|
434
435
|
studentItem.total_score_f ??
|
|
435
|
-
((studentItem.item_type_s ??
|
|
436
|
+
((studentItem.item_type_s ??
|
|
437
|
+
studentItem.itemType ??
|
|
438
|
+
studentItem.type_s ??
|
|
439
|
+
studentItem.type) === 'assignment'
|
|
436
440
|
? 0
|
|
437
441
|
: undefined),
|
|
438
442
|
};
|
|
@@ -869,9 +873,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
869
873
|
let itemIds = new Array();
|
|
870
874
|
const rawItemUids = raw_course.item_uids_s;
|
|
871
875
|
if (Array.isArray(rawItemUids)) {
|
|
872
|
-
itemIds = Array.from(new Set(rawItemUids
|
|
873
|
-
.map(uid => String(uid || '').trim())
|
|
874
|
-
.filter(Boolean)));
|
|
876
|
+
itemIds = Array.from(new Set(rawItemUids.map(uid => String(uid || '').trim()).filter(Boolean)));
|
|
875
877
|
}
|
|
876
878
|
else if (typeof rawItemUids === 'string' && rawItemUids !== '()') {
|
|
877
879
|
itemIds = Array.from(new Set(rawItemUids
|
|
@@ -4721,11 +4723,17 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
4721
4723
|
*/
|
|
4722
4724
|
const useSendOutboundEmailToUser = () => {
|
|
4723
4725
|
return useMutation({
|
|
4724
|
-
mutationFn: async ({ userId, recipient, subject, content, }) => {
|
|
4726
|
+
mutationFn: async ({ userId, recipient, subject, htmlContent, content, }) => {
|
|
4725
4727
|
return requestDatalayer({
|
|
4726
4728
|
url: `${configuration.growthUrl}/api/growth/v1/outbounds/email`,
|
|
4727
4729
|
method: 'POST',
|
|
4728
|
-
body: {
|
|
4730
|
+
body: {
|
|
4731
|
+
userId,
|
|
4732
|
+
recipient,
|
|
4733
|
+
subject,
|
|
4734
|
+
content,
|
|
4735
|
+
htmlContent: htmlContent || content,
|
|
4736
|
+
},
|
|
4729
4737
|
});
|
|
4730
4738
|
},
|
|
4731
4739
|
});
|
|
@@ -4864,9 +4872,9 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
4864
4872
|
return url;
|
|
4865
4873
|
}
|
|
4866
4874
|
const separator = url.includes('?') ? '&' : '?';
|
|
4867
|
-
const parts = [`
|
|
4875
|
+
const parts = [`billing_entity_uid=${encodeURIComponent(accountUid)}`];
|
|
4868
4876
|
if (accountKind) {
|
|
4869
|
-
parts.push(`
|
|
4877
|
+
parts.push(`billing_entity_kind=${encodeURIComponent(accountKind)}`);
|
|
4870
4878
|
}
|
|
4871
4879
|
return `${url}${separator}${parts.join('&')}`;
|
|
4872
4880
|
};
|
|
@@ -6540,8 +6548,12 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
6540
6548
|
return useMutation({
|
|
6541
6549
|
mutationFn: async (variables) => {
|
|
6542
6550
|
const datasetId = typeof variables === 'string' ? variables : variables.datasetId;
|
|
6543
|
-
const selectedPrincipalUid = typeof variables === 'string'
|
|
6544
|
-
|
|
6551
|
+
const selectedPrincipalUid = typeof variables === 'string'
|
|
6552
|
+
? undefined
|
|
6553
|
+
: variables.selectedPrincipalUid;
|
|
6554
|
+
const selectedPrincipalKind = typeof variables === 'string'
|
|
6555
|
+
? undefined
|
|
6556
|
+
: variables.selectedPrincipalKind;
|
|
6545
6557
|
const params = new URLSearchParams();
|
|
6546
6558
|
if (selectedPrincipalUid) {
|
|
6547
6559
|
params.set('selected_principal_uid', selectedPrincipalUid);
|
|
@@ -6574,8 +6586,12 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
6574
6586
|
return useMutation({
|
|
6575
6587
|
mutationFn: async (variables) => {
|
|
6576
6588
|
const spaceId = typeof variables === 'string' ? variables : variables.spaceId;
|
|
6577
|
-
const selectedPrincipalUid = typeof variables === 'string'
|
|
6578
|
-
|
|
6589
|
+
const selectedPrincipalUid = typeof variables === 'string'
|
|
6590
|
+
? undefined
|
|
6591
|
+
: variables.selectedPrincipalUid;
|
|
6592
|
+
const selectedPrincipalKind = typeof variables === 'string'
|
|
6593
|
+
? undefined
|
|
6594
|
+
: variables.selectedPrincipalKind;
|
|
6579
6595
|
const params = new URLSearchParams();
|
|
6580
6596
|
if (selectedPrincipalUid) {
|
|
6581
6597
|
params.set('selected_principal_uid', selectedPrincipalUid);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read-only selector for the currently scoped billing entity.
|
|
3
|
+
*
|
|
4
|
+
* Use this for billing, quotas, plans, credits, agents, and runtime capacity.
|
|
5
|
+
* For visibility/creation/sharing scope, use {@link useSelectedPrincipal}.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useSelectedBillingEntity(): {
|
|
8
|
+
billingEntityKind: string;
|
|
9
|
+
billingEntityUid: string | undefined;
|
|
10
|
+
billingEntityHandle: string | undefined;
|
|
11
|
+
isUserAccount: boolean;
|
|
12
|
+
isOrganizationAccount: boolean;
|
|
13
|
+
};
|
|
14
|
+
export default useSelectedBillingEntity;
|
|
@@ -2,35 +2,35 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { useBillingEntityStore } from './useBillingEntityStore.js';
|
|
6
6
|
import { useSelectedPrincipal } from './useSelectedPrincipal.js';
|
|
7
7
|
/**
|
|
8
|
-
* Read-only selector for the currently scoped
|
|
8
|
+
* Read-only selector for the currently scoped billing entity.
|
|
9
9
|
*
|
|
10
10
|
* Use this for billing, quotas, plans, credits, agents, and runtime capacity.
|
|
11
11
|
* For visibility/creation/sharing scope, use {@link useSelectedPrincipal}.
|
|
12
12
|
*/
|
|
13
|
-
export function
|
|
14
|
-
const persistedUid =
|
|
15
|
-
const persistedHandle =
|
|
13
|
+
export function useSelectedBillingEntity() {
|
|
14
|
+
const persistedUid = useBillingEntityStore(state => state.billingEntityUid);
|
|
15
|
+
const persistedHandle = useBillingEntityStore(state => state.billingEntityHandle);
|
|
16
16
|
const { selectedPrincipalKind, selectedPrincipalUid, selectedPrincipalHandle, selectedTeamParentOrganizationUid, selectedTeamParentOrganizationHandle, } = useSelectedPrincipal();
|
|
17
|
-
const
|
|
17
|
+
const billingEntityKind = selectedPrincipalKind === 'team'
|
|
18
18
|
? 'organization'
|
|
19
19
|
: selectedPrincipalKind === 'organization'
|
|
20
20
|
? 'organization'
|
|
21
21
|
: 'user';
|
|
22
|
-
const
|
|
22
|
+
const billingEntityUid = selectedPrincipalKind === 'team'
|
|
23
23
|
? selectedTeamParentOrganizationUid || persistedUid
|
|
24
24
|
: selectedPrincipalUid || persistedUid;
|
|
25
|
-
const
|
|
25
|
+
const billingEntityHandle = selectedPrincipalKind === 'team'
|
|
26
26
|
? selectedTeamParentOrganizationHandle || persistedHandle
|
|
27
27
|
: selectedPrincipalHandle || persistedHandle;
|
|
28
28
|
return {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
isUserAccount:
|
|
33
|
-
isOrganizationAccount:
|
|
29
|
+
billingEntityKind,
|
|
30
|
+
billingEntityUid,
|
|
31
|
+
billingEntityHandle,
|
|
32
|
+
isUserAccount: billingEntityKind === 'user',
|
|
33
|
+
isOrganizationAccount: billingEntityKind === 'organization',
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
export default
|
|
36
|
+
export default useSelectedBillingEntity;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Read-only selector for the currently selected principal (UI scope).
|
|
3
3
|
*
|
|
4
4
|
* Use this for visibility, creation, and sharing of artifacts.
|
|
5
|
-
* For billing, quotas, plans, and agents, use {@link
|
|
5
|
+
* For billing, quotas, plans, and agents, use {@link useSelectedBillingEntity}.
|
|
6
6
|
*/
|
|
7
7
|
export declare function useSelectedPrincipal(): {
|
|
8
8
|
selectedPrincipalKind: import("./usePrincipalStore").PrincipalKind;
|
|
@@ -7,7 +7,7 @@ import { usePrincipalStore } from './usePrincipalStore.js';
|
|
|
7
7
|
* Read-only selector for the currently selected principal (UI scope).
|
|
8
8
|
*
|
|
9
9
|
* Use this for visibility, creation, and sharing of artifacts.
|
|
10
|
-
* For billing, quotas, plans, and agents, use {@link
|
|
10
|
+
* For billing, quotas, plans, and agents, use {@link useSelectedBillingEntity}.
|
|
11
11
|
*/
|
|
12
12
|
export function useSelectedPrincipal() {
|
|
13
13
|
const selectedPrincipalKind = usePrincipalStore(state => state.selectedPrincipalKind);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datalayer/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.45",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"workspaces": [
|
|
6
6
|
".",
|
|
@@ -131,9 +131,9 @@
|
|
|
131
131
|
"@primer/behaviors": "^1.8.4",
|
|
132
132
|
"@primer/brand-primitives": "^0.51.0",
|
|
133
133
|
"@primer/css": "^21.5.1",
|
|
134
|
-
"@primer/octicons-react": "^19.
|
|
135
|
-
"@primer/primitives": "^10.
|
|
136
|
-
"@primer/react": "^37.
|
|
134
|
+
"@primer/octicons-react": "^19.29.1",
|
|
135
|
+
"@primer/primitives": "^10.7.0",
|
|
136
|
+
"@primer/react": "^37.31.0",
|
|
137
137
|
"@primer/react-brand": "^0.58.0",
|
|
138
138
|
"@stripe/react-stripe-js": "^6.3.0",
|
|
139
139
|
"@stripe/stripe-js": "^9.4.0",
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export type BillableAccountType = 'user' | 'organization' | 'team';
|
|
2
|
-
export type BillableAccount = {
|
|
3
|
-
accountUid: string;
|
|
4
|
-
accountType: BillableAccountType;
|
|
5
|
-
accountHandle: string;
|
|
6
|
-
accountName: string;
|
|
7
|
-
planName: string;
|
|
8
|
-
isEligible: boolean;
|
|
9
|
-
isPaidPlan: boolean;
|
|
10
|
-
sourceOrganizationUid?: string;
|
|
11
|
-
sourceOrganizationHandle?: string;
|
|
12
|
-
teamHandle?: string;
|
|
13
|
-
};
|
|
14
|
-
export type BillableAccountSelectProps = {
|
|
15
|
-
value: string;
|
|
16
|
-
onChange: (accountUid: string) => void;
|
|
17
|
-
onSelectedAccountChange?: (account: BillableAccount | undefined) => void;
|
|
18
|
-
onAccountsResolved?: (state: {
|
|
19
|
-
accounts: BillableAccount[];
|
|
20
|
-
eligibleAccounts: BillableAccount[];
|
|
21
|
-
isLoading: boolean;
|
|
22
|
-
hasEligibleAccount: boolean;
|
|
23
|
-
}) => void;
|
|
24
|
-
disabled?: boolean;
|
|
25
|
-
label?: string;
|
|
26
|
-
caption?: string;
|
|
27
|
-
emptyMessage?: string;
|
|
28
|
-
flashMessage?: string;
|
|
29
|
-
width?: string | number;
|
|
30
|
-
preferOrganizationDefault?: boolean;
|
|
31
|
-
};
|
|
32
|
-
export declare function resolveBillablePlanTier(value: unknown): 'free' | 'pro';
|
|
33
|
-
export declare function formatBillableAccountPlanLabel(planName: string): string;
|
|
34
|
-
export declare function BillableAccountSelect({ value, onChange, onSelectedAccountChange, onAccountsResolved, disabled, label, caption, emptyMessage, flashMessage, width, preferOrganizationDefault, }: BillableAccountSelectProps): JSX.Element;
|
|
35
|
-
export default BillableAccountSelect;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { LiveRelativeTime } from '../time/LiveRelativeTime';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
-
* Distributed under the terms of the Modified BSD License.
|
|
4
|
-
*/
|
|
5
|
-
/*
|
|
6
|
-
* Copyright (c) 2023-2026 Datalayer, Inc.
|
|
7
|
-
* Distributed under the terms of the Modified BSD License.
|
|
8
|
-
*/
|
|
9
|
-
// Backward compatibility export. Use ../../components/time/LiveRelativeTime.
|
|
10
|
-
export { LiveRelativeTime } from '../time/LiveRelativeTime.js';
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The kind of billable account currently in scope.
|
|
3
|
-
*
|
|
4
|
-
* An account is the *billable* principal — only users and organizations
|
|
5
|
-
* are accounts. Teams are NOT accounts; when a team is the selected
|
|
6
|
-
* principal, the billable account is the team's parent organization.
|
|
7
|
-
*/
|
|
8
|
-
export type BillableAccountKind = 'user' | 'organization';
|
|
9
|
-
export type BillableAccountState = {
|
|
10
|
-
billableAccountKind: BillableAccountKind;
|
|
11
|
-
billableAccountUid?: string;
|
|
12
|
-
billableAccountHandle?: string;
|
|
13
|
-
setBillableAccount: (args: {
|
|
14
|
-
kind: BillableAccountKind;
|
|
15
|
-
uid: string;
|
|
16
|
-
handle: string;
|
|
17
|
-
}) => void;
|
|
18
|
-
resetBillableAccount: () => void;
|
|
19
|
-
};
|
|
20
|
-
export declare const useBillableAccountStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<BillableAccountState>, "persist"> & {
|
|
21
|
-
persist: {
|
|
22
|
-
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<BillableAccountState, unknown>>) => void;
|
|
23
|
-
clearStorage: () => void;
|
|
24
|
-
rehydrate: () => Promise<void> | void;
|
|
25
|
-
hasHydrated: () => boolean;
|
|
26
|
-
onHydrate: (fn: (state: BillableAccountState) => void) => () => void;
|
|
27
|
-
onFinishHydration: (fn: (state: BillableAccountState) => void) => () => void;
|
|
28
|
-
getOptions: () => Partial<import("zustand/middleware").PersistOptions<BillableAccountState, unknown>>;
|
|
29
|
-
};
|
|
30
|
-
}>;
|
|
31
|
-
export default useBillableAccountStore;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
-
* Distributed under the terms of the Modified BSD License.
|
|
4
|
-
*/
|
|
5
|
-
import { create } from 'zustand';
|
|
6
|
-
import { createJSONStorage, persist } from 'zustand/middleware';
|
|
7
|
-
import { useUsageRefreshStore } from './useUsageRefreshStore.js';
|
|
8
|
-
export const useBillableAccountStore = create()(persist(set => ({
|
|
9
|
-
billableAccountKind: 'user',
|
|
10
|
-
billableAccountUid: undefined,
|
|
11
|
-
billableAccountHandle: undefined,
|
|
12
|
-
setBillableAccount: ({ kind, uid, handle }) => set(state => {
|
|
13
|
-
const unchanged = state.billableAccountKind === kind &&
|
|
14
|
-
state.billableAccountUid === uid &&
|
|
15
|
-
state.billableAccountHandle === handle;
|
|
16
|
-
if (unchanged) {
|
|
17
|
-
return state;
|
|
18
|
-
}
|
|
19
|
-
useUsageRefreshStore
|
|
20
|
-
.getState()
|
|
21
|
-
.requestUsageRefresh('billable-account-changed');
|
|
22
|
-
return {
|
|
23
|
-
billableAccountKind: kind,
|
|
24
|
-
billableAccountUid: uid,
|
|
25
|
-
billableAccountHandle: handle,
|
|
26
|
-
};
|
|
27
|
-
}),
|
|
28
|
-
resetBillableAccount: () => set(state => {
|
|
29
|
-
const unchanged = state.billableAccountKind === 'user' &&
|
|
30
|
-
state.billableAccountUid === undefined &&
|
|
31
|
-
state.billableAccountHandle === undefined;
|
|
32
|
-
if (unchanged) {
|
|
33
|
-
return state;
|
|
34
|
-
}
|
|
35
|
-
useUsageRefreshStore
|
|
36
|
-
.getState()
|
|
37
|
-
.requestUsageRefresh('billable-account-reset');
|
|
38
|
-
return {
|
|
39
|
-
billableAccountKind: 'user',
|
|
40
|
-
billableAccountUid: undefined,
|
|
41
|
-
billableAccountHandle: undefined,
|
|
42
|
-
};
|
|
43
|
-
}),
|
|
44
|
-
}), {
|
|
45
|
-
name: 'datalayer-billable-account',
|
|
46
|
-
storage: createJSONStorage(() => localStorage),
|
|
47
|
-
partialize: state => ({
|
|
48
|
-
billableAccountKind: state.billableAccountKind,
|
|
49
|
-
billableAccountUid: state.billableAccountUid,
|
|
50
|
-
billableAccountHandle: state.billableAccountHandle,
|
|
51
|
-
}),
|
|
52
|
-
}));
|
|
53
|
-
export default useBillableAccountStore;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Read-only selector for the currently scoped billable account.
|
|
3
|
-
*
|
|
4
|
-
* Use this for billing, quotas, plans, credits, agents, and runtime capacity.
|
|
5
|
-
* For visibility/creation/sharing scope, use {@link useSelectedPrincipal}.
|
|
6
|
-
*/
|
|
7
|
-
export declare function useSelectedBillableAccount(): {
|
|
8
|
-
billableAccountKind: string;
|
|
9
|
-
billableAccountUid: string | undefined;
|
|
10
|
-
billableAccountHandle: string | undefined;
|
|
11
|
-
isUserAccount: boolean;
|
|
12
|
-
isOrganizationAccount: boolean;
|
|
13
|
-
};
|
|
14
|
-
export default useSelectedBillableAccount;
|