@inneropen/marvin-sdk 1.5.0 → 1.7.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.
- package/dist/platform.cjs +323 -0
- package/dist/platform.d.cts +351 -2
- package/dist/platform.d.ts +351 -2
- package/dist/platform.js +317 -0
- package/package.json +1 -1
package/dist/platform.d.cts
CHANGED
|
@@ -2689,11 +2689,26 @@ interface Workspace {
|
|
|
2689
2689
|
interface WorkspaceWithMembership {
|
|
2690
2690
|
workspace: Workspace;
|
|
2691
2691
|
role: string;
|
|
2692
|
-
|
|
2692
|
+
isActive: boolean;
|
|
2693
2693
|
}
|
|
2694
2694
|
interface WorkspaceActivationRequest {
|
|
2695
2695
|
workspace: string;
|
|
2696
2696
|
}
|
|
2697
|
+
interface WorkspaceCreate {
|
|
2698
|
+
name: string;
|
|
2699
|
+
slug?: string;
|
|
2700
|
+
description?: string | null;
|
|
2701
|
+
}
|
|
2702
|
+
interface WorkspaceUpdate {
|
|
2703
|
+
name?: string;
|
|
2704
|
+
description?: string | null;
|
|
2705
|
+
}
|
|
2706
|
+
interface WorkspacePreferences {
|
|
2707
|
+
[key: string]: any;
|
|
2708
|
+
}
|
|
2709
|
+
interface WorkspacePreferencesUpdate {
|
|
2710
|
+
[key: string]: any;
|
|
2711
|
+
}
|
|
2697
2712
|
declare class WorkspacesModule {
|
|
2698
2713
|
private http;
|
|
2699
2714
|
constructor(http: HttpClient);
|
|
@@ -2710,6 +2725,334 @@ declare class WorkspacesModule {
|
|
|
2710
2725
|
* Backend accepts both, so no lookup needed
|
|
2711
2726
|
*/
|
|
2712
2727
|
setActive(workspace: string): Promise<Workspace>;
|
|
2728
|
+
/**
|
|
2729
|
+
* Get a workspace by ID (admin)
|
|
2730
|
+
*/
|
|
2731
|
+
get(id: string): Promise<Workspace>;
|
|
2732
|
+
/**
|
|
2733
|
+
* Create a new workspace (requires SUPER_ADMIN)
|
|
2734
|
+
*/
|
|
2735
|
+
create(data: WorkspaceCreate): Promise<Workspace>;
|
|
2736
|
+
/**
|
|
2737
|
+
* Update workspace settings (requires ADMIN or OWNER)
|
|
2738
|
+
*/
|
|
2739
|
+
update(id: string, data: WorkspaceUpdate): Promise<Workspace>;
|
|
2740
|
+
/**
|
|
2741
|
+
* Delete a workspace (requires SUPER_ADMIN)
|
|
2742
|
+
*/
|
|
2743
|
+
delete(id: string, force?: boolean): Promise<void>;
|
|
2744
|
+
/**
|
|
2745
|
+
* Get workspace preferences
|
|
2746
|
+
*/
|
|
2747
|
+
getPreferences(workspaceId: string): Promise<WorkspacePreferences>;
|
|
2748
|
+
/**
|
|
2749
|
+
* Update workspace preferences
|
|
2750
|
+
*/
|
|
2751
|
+
updatePreferences(workspaceId: string, data: WorkspacePreferencesUpdate): Promise<WorkspacePreferences>;
|
|
2752
|
+
}
|
|
2753
|
+
|
|
2754
|
+
/**
|
|
2755
|
+
* Invites Module - Platform API
|
|
2756
|
+
*
|
|
2757
|
+
* Manage workspace invitation tokens and email invitations
|
|
2758
|
+
*/
|
|
2759
|
+
|
|
2760
|
+
type InviteTokenCreate = components['schemas']['InviteTokenCreate'];
|
|
2761
|
+
type InviteTokenSummary = components['schemas']['InviteTokenSummary'];
|
|
2762
|
+
type InviteTokenPagination = components['schemas']['InviteTokenPagination'];
|
|
2763
|
+
interface EmailInvitationRequest {
|
|
2764
|
+
email: string;
|
|
2765
|
+
usesLeft?: number;
|
|
2766
|
+
}
|
|
2767
|
+
declare class InvitesModule {
|
|
2768
|
+
private http;
|
|
2769
|
+
constructor(http: HttpClient);
|
|
2770
|
+
/**
|
|
2771
|
+
* List all invite tokens for the current workspace
|
|
2772
|
+
*/
|
|
2773
|
+
list(): Promise<InviteTokenSummary[]>;
|
|
2774
|
+
/**
|
|
2775
|
+
* Create a new invite token
|
|
2776
|
+
*/
|
|
2777
|
+
create(data: InviteTokenCreate): Promise<InviteTokenSummary>;
|
|
2778
|
+
/**
|
|
2779
|
+
* Send an email invitation
|
|
2780
|
+
*/
|
|
2781
|
+
sendEmail(data: EmailInvitationRequest): Promise<void>;
|
|
2782
|
+
}
|
|
2783
|
+
|
|
2784
|
+
/**
|
|
2785
|
+
* Notifications Module - Platform API
|
|
2786
|
+
*
|
|
2787
|
+
* Manage workspace notifications
|
|
2788
|
+
*/
|
|
2789
|
+
|
|
2790
|
+
interface Notification {
|
|
2791
|
+
id: string;
|
|
2792
|
+
name: string;
|
|
2793
|
+
enabled: boolean;
|
|
2794
|
+
eventType: string;
|
|
2795
|
+
url?: string;
|
|
2796
|
+
config?: Record<string, any>;
|
|
2797
|
+
}
|
|
2798
|
+
interface NotificationCreate {
|
|
2799
|
+
name: string;
|
|
2800
|
+
eventType: string;
|
|
2801
|
+
url?: string;
|
|
2802
|
+
enabled?: boolean;
|
|
2803
|
+
config?: Record<string, any>;
|
|
2804
|
+
}
|
|
2805
|
+
interface NotificationUpdate {
|
|
2806
|
+
name?: string;
|
|
2807
|
+
eventType?: string;
|
|
2808
|
+
url?: string;
|
|
2809
|
+
enabled?: boolean;
|
|
2810
|
+
config?: Record<string, any>;
|
|
2811
|
+
}
|
|
2812
|
+
declare class NotificationsModule {
|
|
2813
|
+
private http;
|
|
2814
|
+
constructor(http: HttpClient);
|
|
2815
|
+
/**
|
|
2816
|
+
* List all notifications for the current workspace
|
|
2817
|
+
*/
|
|
2818
|
+
list(): Promise<Notification[]>;
|
|
2819
|
+
/**
|
|
2820
|
+
* Get a notification by ID
|
|
2821
|
+
*/
|
|
2822
|
+
get(id: string): Promise<Notification>;
|
|
2823
|
+
/**
|
|
2824
|
+
* Create a new notification
|
|
2825
|
+
*/
|
|
2826
|
+
create(data: NotificationCreate): Promise<Notification>;
|
|
2827
|
+
/**
|
|
2828
|
+
* Update a notification
|
|
2829
|
+
*/
|
|
2830
|
+
update(id: string, data: NotificationUpdate): Promise<Notification>;
|
|
2831
|
+
/**
|
|
2832
|
+
* Delete a notification
|
|
2833
|
+
*/
|
|
2834
|
+
delete(id: string): Promise<void>;
|
|
2835
|
+
/**
|
|
2836
|
+
* Test a notification
|
|
2837
|
+
*/
|
|
2838
|
+
test(id: string): Promise<{
|
|
2839
|
+
success: boolean;
|
|
2840
|
+
message?: string;
|
|
2841
|
+
}>;
|
|
2842
|
+
}
|
|
2843
|
+
|
|
2844
|
+
/**
|
|
2845
|
+
* Webhooks Module - Platform API
|
|
2846
|
+
*
|
|
2847
|
+
* Manage workspace webhooks
|
|
2848
|
+
*/
|
|
2849
|
+
|
|
2850
|
+
type Webhook = components['schemas']['WebhookRead'];
|
|
2851
|
+
type WebhookCreate = components['schemas']['WebhookCreate'];
|
|
2852
|
+
type WebhookPagination = components['schemas']['WebhookPagination'];
|
|
2853
|
+
type WebhookMethod = components['schemas']['WebhookMethod'];
|
|
2854
|
+
interface WebhookUpdate {
|
|
2855
|
+
name?: string;
|
|
2856
|
+
url?: string;
|
|
2857
|
+
enabled?: boolean;
|
|
2858
|
+
eventTypes?: string[];
|
|
2859
|
+
method?: WebhookMethod;
|
|
2860
|
+
headers?: Record<string, string>;
|
|
2861
|
+
}
|
|
2862
|
+
declare class WebhooksModule {
|
|
2863
|
+
private http;
|
|
2864
|
+
constructor(http: HttpClient);
|
|
2865
|
+
/**
|
|
2866
|
+
* List all webhooks for the current workspace
|
|
2867
|
+
*/
|
|
2868
|
+
list(): Promise<Webhook[]>;
|
|
2869
|
+
/**
|
|
2870
|
+
* Get a webhook by ID
|
|
2871
|
+
*/
|
|
2872
|
+
get(id: string): Promise<Webhook>;
|
|
2873
|
+
/**
|
|
2874
|
+
* Create a new webhook
|
|
2875
|
+
*/
|
|
2876
|
+
create(data: WebhookCreate): Promise<Webhook>;
|
|
2877
|
+
/**
|
|
2878
|
+
* Update a webhook
|
|
2879
|
+
*/
|
|
2880
|
+
update(id: string, data: WebhookUpdate): Promise<Webhook>;
|
|
2881
|
+
/**
|
|
2882
|
+
* Delete a webhook
|
|
2883
|
+
*/
|
|
2884
|
+
delete(id: string): Promise<void>;
|
|
2885
|
+
/**
|
|
2886
|
+
* Test a webhook
|
|
2887
|
+
*/
|
|
2888
|
+
test(id: string): Promise<{
|
|
2889
|
+
success: boolean;
|
|
2890
|
+
message?: string;
|
|
2891
|
+
statusCode?: number;
|
|
2892
|
+
}>;
|
|
2893
|
+
/**
|
|
2894
|
+
* Rerun failed webhooks
|
|
2895
|
+
*/
|
|
2896
|
+
rerun(): Promise<{
|
|
2897
|
+
message: string;
|
|
2898
|
+
requeued: number;
|
|
2899
|
+
}>;
|
|
2900
|
+
}
|
|
2901
|
+
|
|
2902
|
+
/**
|
|
2903
|
+
* Admin Users Module - Platform API
|
|
2904
|
+
*
|
|
2905
|
+
* User management for administrators
|
|
2906
|
+
*/
|
|
2907
|
+
|
|
2908
|
+
type User = components['schemas']['UserRead'];
|
|
2909
|
+
type UserCreate = components['schemas']['UserCreate'];
|
|
2910
|
+
type UserUpdate = components['schemas']['UserUpdate'];
|
|
2911
|
+
type UserPagination = components['schemas']['UserPagination'];
|
|
2912
|
+
type UserSummary = components['schemas']['UserSummary'];
|
|
2913
|
+
interface PasswordResetTokenRequest {
|
|
2914
|
+
userId: string;
|
|
2915
|
+
}
|
|
2916
|
+
interface PasswordResetTokenResponse {
|
|
2917
|
+
token: string;
|
|
2918
|
+
}
|
|
2919
|
+
interface UnlockUserRequest {
|
|
2920
|
+
userId: string;
|
|
2921
|
+
}
|
|
2922
|
+
declare class AdminUsersModule {
|
|
2923
|
+
private http;
|
|
2924
|
+
constructor(http: HttpClient);
|
|
2925
|
+
/**
|
|
2926
|
+
* List all users (paginated)
|
|
2927
|
+
*/
|
|
2928
|
+
list(page?: number, perPage?: number): Promise<UserPagination>;
|
|
2929
|
+
/**
|
|
2930
|
+
* Get a user by ID
|
|
2931
|
+
*/
|
|
2932
|
+
get(id: string): Promise<User>;
|
|
2933
|
+
/**
|
|
2934
|
+
* Update a user
|
|
2935
|
+
*/
|
|
2936
|
+
update(id: string, data: UserUpdate): Promise<User>;
|
|
2937
|
+
/**
|
|
2938
|
+
* Delete a user
|
|
2939
|
+
*/
|
|
2940
|
+
delete(id: string): Promise<void>;
|
|
2941
|
+
/**
|
|
2942
|
+
* Generate a password reset token for a user
|
|
2943
|
+
*/
|
|
2944
|
+
generatePasswordResetToken(userId: string): Promise<PasswordResetTokenResponse>;
|
|
2945
|
+
/**
|
|
2946
|
+
* Unlock a locked user account
|
|
2947
|
+
*/
|
|
2948
|
+
unlock(userId: string): Promise<void>;
|
|
2949
|
+
}
|
|
2950
|
+
|
|
2951
|
+
/**
|
|
2952
|
+
* Admin System Module - Platform API
|
|
2953
|
+
*
|
|
2954
|
+
* System information and settings for administrators
|
|
2955
|
+
*/
|
|
2956
|
+
|
|
2957
|
+
type AdminAboutInfo = components['schemas']['AdminAboutInfo'];
|
|
2958
|
+
interface EmailSettings {
|
|
2959
|
+
host?: string;
|
|
2960
|
+
port?: number;
|
|
2961
|
+
username?: string;
|
|
2962
|
+
password?: string;
|
|
2963
|
+
from?: string;
|
|
2964
|
+
useTls?: boolean;
|
|
2965
|
+
}
|
|
2966
|
+
interface SystemStatistics {
|
|
2967
|
+
users?: number;
|
|
2968
|
+
workspaces?: number;
|
|
2969
|
+
entries?: number;
|
|
2970
|
+
collections?: number;
|
|
2971
|
+
resources?: number;
|
|
2972
|
+
assets?: number;
|
|
2973
|
+
}
|
|
2974
|
+
declare class AdminSystemModule {
|
|
2975
|
+
private http;
|
|
2976
|
+
constructor(http: HttpClient);
|
|
2977
|
+
/**
|
|
2978
|
+
* Get system information
|
|
2979
|
+
*/
|
|
2980
|
+
getAbout(): Promise<AdminAboutInfo>;
|
|
2981
|
+
/**
|
|
2982
|
+
* Check system health
|
|
2983
|
+
*/
|
|
2984
|
+
check(): Promise<{
|
|
2985
|
+
status: string;
|
|
2986
|
+
}>;
|
|
2987
|
+
/**
|
|
2988
|
+
* Get startup information
|
|
2989
|
+
*/
|
|
2990
|
+
getStartupInfo(): Promise<any>;
|
|
2991
|
+
/**
|
|
2992
|
+
* Get system statistics
|
|
2993
|
+
*/
|
|
2994
|
+
getStatistics(): Promise<SystemStatistics>;
|
|
2995
|
+
/**
|
|
2996
|
+
* Get email settings
|
|
2997
|
+
*/
|
|
2998
|
+
getEmailSettings(): Promise<EmailSettings>;
|
|
2999
|
+
/**
|
|
3000
|
+
* Update email settings
|
|
3001
|
+
*/
|
|
3002
|
+
updateEmailSettings(data: EmailSettings): Promise<EmailSettings>;
|
|
3003
|
+
}
|
|
3004
|
+
|
|
3005
|
+
/**
|
|
3006
|
+
* Admin Maintenance Module - Platform API
|
|
3007
|
+
*
|
|
3008
|
+
* System maintenance operations for administrators
|
|
3009
|
+
*/
|
|
3010
|
+
|
|
3011
|
+
type MaintenanceSummary = components['schemas']['MaintenanceSummary'];
|
|
3012
|
+
type MaintenanceStorageDetails = components['schemas']['MaintenanceStorageDetails'];
|
|
3013
|
+
declare class AdminMaintenanceModule {
|
|
3014
|
+
private http;
|
|
3015
|
+
constructor(http: HttpClient);
|
|
3016
|
+
/**
|
|
3017
|
+
* Clean temporary files
|
|
3018
|
+
*/
|
|
3019
|
+
cleanTemp(): Promise<{
|
|
3020
|
+
message: string;
|
|
3021
|
+
}>;
|
|
3022
|
+
/**
|
|
3023
|
+
* Clean up old events
|
|
3024
|
+
*/
|
|
3025
|
+
cleanupEvents(): Promise<{
|
|
3026
|
+
message: string;
|
|
3027
|
+
deleted: number;
|
|
3028
|
+
}>;
|
|
3029
|
+
/**
|
|
3030
|
+
* Clean up expired tokens
|
|
3031
|
+
*/
|
|
3032
|
+
cleanupTokens(): Promise<{
|
|
3033
|
+
message: string;
|
|
3034
|
+
deleted: number;
|
|
3035
|
+
}>;
|
|
3036
|
+
/**
|
|
3037
|
+
* Clear application cache
|
|
3038
|
+
*/
|
|
3039
|
+
clearCache(): Promise<{
|
|
3040
|
+
message: string;
|
|
3041
|
+
}>;
|
|
3042
|
+
/**
|
|
3043
|
+
* Optimize database
|
|
3044
|
+
*/
|
|
3045
|
+
optimizeDatabase(): Promise<{
|
|
3046
|
+
message: string;
|
|
3047
|
+
}>;
|
|
3048
|
+
/**
|
|
3049
|
+
* Get maintenance statistics
|
|
3050
|
+
*/
|
|
3051
|
+
getStats(): Promise<MaintenanceSummary>;
|
|
3052
|
+
/**
|
|
3053
|
+
* Get storage information
|
|
3054
|
+
*/
|
|
3055
|
+
getStorage(): Promise<MaintenanceStorageDetails>;
|
|
2713
3056
|
}
|
|
2714
3057
|
|
|
2715
3058
|
/**
|
|
@@ -2732,6 +3075,12 @@ declare class PlatformClient extends HttpClient {
|
|
|
2732
3075
|
entryTypes: EntryTypesModule;
|
|
2733
3076
|
workspaceMembers: WorkspaceMembersModule;
|
|
2734
3077
|
workspaces: WorkspacesModule;
|
|
3078
|
+
invites: InvitesModule;
|
|
3079
|
+
notifications: NotificationsModule;
|
|
3080
|
+
webhooks: WebhooksModule;
|
|
3081
|
+
adminUsers: AdminUsersModule;
|
|
3082
|
+
adminSystem: AdminSystemModule;
|
|
3083
|
+
adminMaintenance: AdminMaintenanceModule;
|
|
2735
3084
|
constructor(config: PlatformClientConfig);
|
|
2736
3085
|
}
|
|
2737
3086
|
/**
|
|
@@ -2739,4 +3088,4 @@ declare class PlatformClient extends HttpClient {
|
|
|
2739
3088
|
*/
|
|
2740
3089
|
declare function createPlatformClient(config: PlatformClientConfig): PlatformClient;
|
|
2741
3090
|
|
|
2742
|
-
export { APIClientsModule, AssetsModule, CollectionsModule, EntriesModule, EntryTypesModule, type PlatformAPIClient, type PlatformAPIClientCreate, type PlatformAPIClientUpdate, type PlatformAPIClientWithToken, type PlatformAsset, type PlatformAssetCreate, type PlatformAssetUpdate, PlatformClient, type PlatformClientConfig, type PlatformCollection, type PlatformCollectionCreate, type PlatformCollectionUpdate, type PlatformEntry, type PlatformEntryCreate, type PlatformEntryType, type PlatformEntryUpdate, type PlatformResource, type PlatformResourceCreate, type PlatformResourceUpdate, type PlatformWorkspaceMember, type PlatformWorkspaceMemberCreate, type PlatformWorkspaceMemberUpdate, ResourcesModule, type Workspace, type WorkspaceActivationRequest, WorkspaceMembersModule, type WorkspaceWithMembership, WorkspacesModule, createPlatformClient };
|
|
3091
|
+
export { APIClientsModule, type AdminAboutInfo, AdminMaintenanceModule, AdminSystemModule, AdminUsersModule, AssetsModule, CollectionsModule, type EmailInvitationRequest, type EmailSettings, EntriesModule, EntryTypesModule, type InviteTokenCreate, type InviteTokenPagination, type InviteTokenSummary, InvitesModule, type MaintenanceStorageDetails, type MaintenanceSummary, type Notification, type NotificationCreate, type NotificationUpdate, NotificationsModule, type PasswordResetTokenRequest, type PasswordResetTokenResponse, type PlatformAPIClient, type PlatformAPIClientCreate, type PlatformAPIClientUpdate, type PlatformAPIClientWithToken, type PlatformAsset, type PlatformAssetCreate, type PlatformAssetUpdate, PlatformClient, type PlatformClientConfig, type PlatformCollection, type PlatformCollectionCreate, type PlatformCollectionUpdate, type PlatformEntry, type PlatformEntryCreate, type PlatformEntryType, type PlatformEntryUpdate, type PlatformResource, type PlatformResourceCreate, type PlatformResourceUpdate, type PlatformWorkspaceMember, type PlatformWorkspaceMemberCreate, type PlatformWorkspaceMemberUpdate, ResourcesModule, type SystemStatistics, type UnlockUserRequest, type User, type UserCreate, type UserPagination, type UserSummary, type UserUpdate, type Webhook, type WebhookCreate, type WebhookMethod, type WebhookPagination, type WebhookUpdate, WebhooksModule, type Workspace, type WorkspaceActivationRequest, type WorkspaceCreate, WorkspaceMembersModule, type WorkspacePreferences, type WorkspacePreferencesUpdate, type WorkspaceUpdate, type WorkspaceWithMembership, WorkspacesModule, createPlatformClient };
|