@noatgnu/cupcake-core 1.2.9 → 1.2.10
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/fesm2022/noatgnu-cupcake-core.mjs +168 -88
- package/fesm2022/noatgnu-cupcake-core.mjs.map +1 -1
- package/index.d.ts +60 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -364,7 +364,7 @@ interface AnnotationFolder extends BaseResource {
|
|
|
364
364
|
interface Annotation extends BaseResource {
|
|
365
365
|
annotation: string;
|
|
366
366
|
annotationType: string;
|
|
367
|
-
file?:
|
|
367
|
+
file?: string;
|
|
368
368
|
fileUrl?: string;
|
|
369
369
|
fileSize?: number;
|
|
370
370
|
folder?: number;
|
|
@@ -375,6 +375,9 @@ interface Annotation extends BaseResource {
|
|
|
375
375
|
translation?: string;
|
|
376
376
|
scratched: boolean;
|
|
377
377
|
ownerName?: string;
|
|
378
|
+
canEdit?: boolean;
|
|
379
|
+
canView?: boolean;
|
|
380
|
+
canDelete?: boolean;
|
|
378
381
|
}
|
|
379
382
|
interface AnnotationFolderCreateRequest {
|
|
380
383
|
folderName: string;
|
|
@@ -611,6 +614,17 @@ declare class ApiService {
|
|
|
611
614
|
createAnnotationFolder(folderData: AnnotationFolderCreateRequest): Observable<AnnotationFolder>;
|
|
612
615
|
updateAnnotationFolder(id: number, folderData: AnnotationFolderUpdateRequest): Observable<AnnotationFolder>;
|
|
613
616
|
deleteAnnotationFolder(id: number): Observable<void>;
|
|
617
|
+
/**
|
|
618
|
+
* WARNING: This method accesses the base annotation endpoint and should only be used
|
|
619
|
+
* for standalone annotations that are NOT attached to parent resources.
|
|
620
|
+
*
|
|
621
|
+
* For annotations attached to parent resources, use the specialized services instead:
|
|
622
|
+
* - Instrument annotations: Use InstrumentService from @noatgnu/cupcake-macaron
|
|
623
|
+
* - StoredReagent annotations: Use ReagentService from @noatgnu/cupcake-macaron
|
|
624
|
+
* - Session annotations: Use SessionService from @noatgnu/cupcake-red-velvet
|
|
625
|
+
*
|
|
626
|
+
* These specialized services ensure proper permission checking through parent resources.
|
|
627
|
+
*/
|
|
614
628
|
getAnnotations(params?: {
|
|
615
629
|
search?: string;
|
|
616
630
|
annotationType?: string;
|
|
@@ -624,9 +638,52 @@ declare class ApiService {
|
|
|
624
638
|
count: number;
|
|
625
639
|
results: Annotation[];
|
|
626
640
|
}>;
|
|
641
|
+
/**
|
|
642
|
+
* WARNING: This method accesses the base annotation endpoint and should only be used
|
|
643
|
+
* for standalone annotations that are NOT attached to parent resources.
|
|
644
|
+
*
|
|
645
|
+
* For annotations attached to parent resources, use the specialized services instead:
|
|
646
|
+
* - Instrument annotations: Use InstrumentService.getInstrumentAnnotation()
|
|
647
|
+
* - StoredReagent annotations: Use ReagentService.getStoredReagentAnnotation()
|
|
648
|
+
* - Session annotations: Use SessionService (session folder annotations)
|
|
649
|
+
*
|
|
650
|
+
* The backend enforces parent resource permissions, but using specialized services
|
|
651
|
+
* provides cleaner access control and better context.
|
|
652
|
+
*/
|
|
627
653
|
getAnnotation(id: number): Observable<Annotation>;
|
|
654
|
+
/**
|
|
655
|
+
* WARNING: This method accesses the base annotation endpoint and should only be used
|
|
656
|
+
* for standalone annotations that are NOT attached to parent resources.
|
|
657
|
+
*
|
|
658
|
+
* For creating annotations attached to parent resources, use specialized upload methods:
|
|
659
|
+
* - Instrument annotations: Use InstrumentService.uploadAnnotation()
|
|
660
|
+
* - StoredReagent annotations: Use ReagentService.uploadAnnotation()
|
|
661
|
+
* - Session/Step annotations: Use the appropriate chunked upload service
|
|
662
|
+
*
|
|
663
|
+
* These specialized methods provide chunked upload support, progress tracking,
|
|
664
|
+
* and automatic binding to parent resources with proper permission enforcement.
|
|
665
|
+
*/
|
|
628
666
|
createAnnotation(annotationData: AnnotationCreateRequest): Observable<Annotation>;
|
|
667
|
+
/**
|
|
668
|
+
* WARNING: This method accesses the base annotation endpoint and should only be used
|
|
669
|
+
* for standalone annotations that are NOT attached to parent resources.
|
|
670
|
+
*
|
|
671
|
+
* For annotations attached to parent resources, the backend enforces parent resource
|
|
672
|
+
* permissions. However, using specialized services provides better context and access control.
|
|
673
|
+
*/
|
|
629
674
|
updateAnnotation(id: number, annotationData: AnnotationUpdateRequest): Observable<Annotation>;
|
|
675
|
+
/**
|
|
676
|
+
* WARNING: This method accesses the base annotation endpoint and should only be used
|
|
677
|
+
* for standalone annotations that are NOT attached to parent resources.
|
|
678
|
+
*
|
|
679
|
+
* For deleting annotations attached to parent resources, use specialized services:
|
|
680
|
+
* - Instrument annotations: Use InstrumentService.deleteInstrumentAnnotation()
|
|
681
|
+
* - StoredReagent annotations: Use ReagentService.deleteStoredReagentAnnotation()
|
|
682
|
+
* - Session annotations: Use appropriate session/step annotation delete methods
|
|
683
|
+
*
|
|
684
|
+
* The backend enforces parent resource permissions, but using specialized services
|
|
685
|
+
* provides clearer intent and better access control context.
|
|
686
|
+
*/
|
|
630
687
|
deleteAnnotation(id: number): Observable<void>;
|
|
631
688
|
getResourcePermissions(params?: {
|
|
632
689
|
user?: number;
|
|
@@ -1038,6 +1095,7 @@ declare const authGuard: CanActivateFn;
|
|
|
1038
1095
|
|
|
1039
1096
|
declare const adminGuard: CanActivateFn;
|
|
1040
1097
|
|
|
1098
|
+
declare function resetRefreshState(): void;
|
|
1041
1099
|
declare const authInterceptor: HttpInterceptorFn;
|
|
1042
1100
|
|
|
1043
1101
|
declare class LoginComponent implements OnInit {
|
|
@@ -1388,5 +1446,5 @@ declare class CupcakeCoreModule {
|
|
|
1388
1446
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<CupcakeCoreModule>;
|
|
1389
1447
|
}
|
|
1390
1448
|
|
|
1391
|
-
export { ApiService, AuthService, BaseApiService, CUPCAKE_CORE_CONFIG, CupcakeCoreModule, InvitationStatus, InvitationStatusLabels, LabGroupService, LabGroupsComponent, LoginComponent, NotificationService, PoweredByFooterComponent, RegisterComponent, ResourceRole, ResourceRoleLabels, ResourceService, ResourceType, ResourceTypeLabels, ResourceVisibility, ResourceVisibilityLabels, SiteConfigComponent, SiteConfigService, ThemeService, ToastContainerComponent, ToastService, UserManagementComponent, UserManagementService, UserProfileComponent, WEBSOCKET_ENDPOINT, WEBSOCKET_ENDPOINTS, WebSocketConfigService, WebSocketEndpoints, WebSocketService, adminGuard, authGuard, authInterceptor };
|
|
1449
|
+
export { ApiService, AuthService, BaseApiService, CUPCAKE_CORE_CONFIG, CupcakeCoreModule, InvitationStatus, InvitationStatusLabels, LabGroupService, LabGroupsComponent, LoginComponent, NotificationService, PoweredByFooterComponent, RegisterComponent, ResourceRole, ResourceRoleLabels, ResourceService, ResourceType, ResourceTypeLabels, ResourceVisibility, ResourceVisibilityLabels, SiteConfigComponent, SiteConfigService, ThemeService, ToastContainerComponent, ToastService, UserManagementComponent, UserManagementService, UserProfileComponent, WEBSOCKET_ENDPOINT, WEBSOCKET_ENDPOINTS, WebSocketConfigService, WebSocketEndpoints, WebSocketService, adminGuard, authGuard, authInterceptor, resetRefreshState };
|
|
1392
1450
|
export type { AccountMergeRequest, AdminPasswordResetRequest, Annotation, AnnotationCreateRequest, AnnotationFolder, AnnotationFolderCreateRequest, AnnotationFolderUpdateRequest, AnnotationUpdateRequest, ApiResponse, AuthConfig, AuthResponse, AuthStatus, BaseResource, BaseTimestampedModel, BulkPermissionRequest, CupcakeCoreConfig, EmailChangeConfirmRequest, EmailChangeConfirmResponse, EmailChangeRequest, InvitationResponseRequest, LabGroup, LabGroupCreateRequest, LabGroupInvitation, LabGroupInvitationCreateRequest, LabGroupInvitationQueryParams, LabGroupInvitationQueryResponse, LabGroupInviteRequest, LabGroupMember, LabGroupPathItem, LabGroupPermission, LabGroupPermissionCreateRequest, LabGroupPermissionQueryParams, LabGroupPermissionQueryResponse, LabGroupPermissionUpdateRequest, LabGroupQueryParams, LabGroupQueryResponse, LabGroupUpdateRequest, NotificationAction, NotificationItem, PaginatedResponse, PasswordChangeRequest, PasswordChangeResponse, PasswordResetConfirmRequest, PasswordResetRequest, RegistrationStatus, RemoteHost, RemoteHostCreateRequest, RemoteHostUpdateRequest, ResourcePermission, ResourcePermissionCreateRequest, ResourcePermissionUpdateRequest, ResourceQueryParams, SiteConfig, SiteConfigUpdateRequest, Theme, ToastMessage, User, UserCreateRequest, UserListResponse, UserOrcidProfile, UserProfileUpdateRequest, UserRegistrationRequest, UserResponse, WebSocketConfig, WebSocketEndpointConfig, WebSocketMessage };
|
package/package.json
CHANGED