@inneropen/marvin-sdk 1.6.0 → 1.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.
@@ -2703,6 +2703,12 @@ interface WorkspaceUpdate {
2703
2703
  name?: string;
2704
2704
  description?: string | null;
2705
2705
  }
2706
+ interface WorkspacePreferences {
2707
+ [key: string]: any;
2708
+ }
2709
+ interface WorkspacePreferencesUpdate {
2710
+ [key: string]: any;
2711
+ }
2706
2712
  declare class WorkspacesModule {
2707
2713
  private http;
2708
2714
  constructor(http: HttpClient);
@@ -2735,6 +2741,14 @@ declare class WorkspacesModule {
2735
2741
  * Delete a workspace (requires SUPER_ADMIN)
2736
2742
  */
2737
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>;
2738
2752
  }
2739
2753
 
2740
2754
  /**
@@ -2767,6 +2781,366 @@ declare class InvitesModule {
2767
2781
  sendEmail(data: EmailInvitationRequest): Promise<void>;
2768
2782
  }
2769
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>;
3056
+ }
3057
+
3058
+ /**
3059
+ * User Self-Service Module - Platform API
3060
+ *
3061
+ * User profile and personal API token management
3062
+ */
3063
+
3064
+ interface UserProfile {
3065
+ id: string;
3066
+ username: string;
3067
+ email: string;
3068
+ fullName?: string | null;
3069
+ admin: boolean;
3070
+ }
3071
+ interface ApiToken {
3072
+ id: string;
3073
+ name: string;
3074
+ description?: string | null;
3075
+ lastUsedAt?: string | null;
3076
+ createdAt: string;
3077
+ expiresAt?: string | null;
3078
+ }
3079
+ interface ApiTokenCreate {
3080
+ name: string;
3081
+ description?: string | null;
3082
+ expiresAt?: string | null;
3083
+ }
3084
+ interface ApiTokenWithToken extends ApiToken {
3085
+ token: string;
3086
+ }
3087
+ interface PasswordChange {
3088
+ currentPassword: string;
3089
+ newPassword: string;
3090
+ }
3091
+ declare class UserModule {
3092
+ private http;
3093
+ constructor(http: HttpClient);
3094
+ /**
3095
+ * Get current user profile
3096
+ */
3097
+ getProfile(): Promise<UserProfile>;
3098
+ /**
3099
+ * List personal API tokens
3100
+ */
3101
+ listApiTokens(): Promise<ApiToken[]>;
3102
+ /**
3103
+ * Create a new personal API token
3104
+ */
3105
+ createApiToken(data: ApiTokenCreate): Promise<ApiTokenWithToken>;
3106
+ /**
3107
+ * Revoke an API token
3108
+ */
3109
+ revokeApiToken(tokenId: string): Promise<void>;
3110
+ /**
3111
+ * Rotate an API token (revoke old, create new)
3112
+ */
3113
+ rotateApiToken(tokenId: string): Promise<ApiTokenWithToken>;
3114
+ /**
3115
+ * Delete an API token
3116
+ */
3117
+ deleteApiToken(tokenId: string): Promise<void>;
3118
+ /**
3119
+ * Change password
3120
+ */
3121
+ changePassword(data: PasswordChange): Promise<void>;
3122
+ }
3123
+
3124
+ /**
3125
+ * Events Module - Platform API
3126
+ *
3127
+ * Event type information for webhooks and notifications
3128
+ */
3129
+
3130
+ interface EventOption {
3131
+ value: string;
3132
+ label: string;
3133
+ description?: string;
3134
+ }
3135
+ declare class EventsModule {
3136
+ private http;
3137
+ constructor(http: HttpClient);
3138
+ /**
3139
+ * Get available event types for webhooks and notifications
3140
+ */
3141
+ getOptions(): Promise<EventOption[]>;
3142
+ }
3143
+
2770
3144
  /**
2771
3145
  * Platform API Client
2772
3146
  *
@@ -2788,6 +3162,13 @@ declare class PlatformClient extends HttpClient {
2788
3162
  workspaceMembers: WorkspaceMembersModule;
2789
3163
  workspaces: WorkspacesModule;
2790
3164
  invites: InvitesModule;
3165
+ notifications: NotificationsModule;
3166
+ webhooks: WebhooksModule;
3167
+ user: UserModule;
3168
+ events: EventsModule;
3169
+ adminUsers: AdminUsersModule;
3170
+ adminSystem: AdminSystemModule;
3171
+ adminMaintenance: AdminMaintenanceModule;
2791
3172
  constructor(config: PlatformClientConfig);
2792
3173
  }
2793
3174
  /**
@@ -2795,4 +3176,4 @@ declare class PlatformClient extends HttpClient {
2795
3176
  */
2796
3177
  declare function createPlatformClient(config: PlatformClientConfig): PlatformClient;
2797
3178
 
2798
- export { APIClientsModule, AssetsModule, CollectionsModule, type EmailInvitationRequest, EntriesModule, EntryTypesModule, type InviteTokenCreate, type InviteTokenPagination, type InviteTokenSummary, InvitesModule, 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, type WorkspaceCreate, WorkspaceMembersModule, type WorkspaceUpdate, type WorkspaceWithMembership, WorkspacesModule, createPlatformClient };
3179
+ export { APIClientsModule, type AdminAboutInfo, AdminMaintenanceModule, AdminSystemModule, AdminUsersModule, type ApiToken, type ApiTokenCreate, type ApiTokenWithToken, AssetsModule, CollectionsModule, type EmailInvitationRequest, type EmailSettings, EntriesModule, EntryTypesModule, type EventOption, EventsModule, type InviteTokenCreate, type InviteTokenPagination, type InviteTokenSummary, InvitesModule, type MaintenanceStorageDetails, type MaintenanceSummary, type Notification, type NotificationCreate, type NotificationUpdate, NotificationsModule, type PasswordChange, 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, UserModule, type UserPagination, type UserProfile, 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 };