@noatgnu/cupcake-core 1.2.8 → 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/index.d.ts CHANGED
@@ -242,6 +242,7 @@ interface LabGroup extends BaseTimestampedModel {
242
242
  creatorName?: string;
243
243
  isActive: boolean;
244
244
  allowMemberInvites: boolean;
245
+ allowProcessJobs: boolean;
245
246
  memberCount: number;
246
247
  subGroupsCount: number;
247
248
  isCreator: boolean;
@@ -270,6 +271,7 @@ interface LabGroupCreateRequest {
270
271
  description?: string;
271
272
  parentGroup?: number;
272
273
  allowMemberInvites?: boolean;
274
+ allowProcessJobs?: boolean;
273
275
  }
274
276
  interface LabGroupUpdateRequest {
275
277
  name?: string;
@@ -277,6 +279,7 @@ interface LabGroupUpdateRequest {
277
279
  parentGroup?: number;
278
280
  isActive?: boolean;
279
281
  allowMemberInvites?: boolean;
282
+ allowProcessJobs?: boolean;
280
283
  }
281
284
  interface LabGroupInviteRequest {
282
285
  emails: string[];
@@ -361,7 +364,7 @@ interface AnnotationFolder extends BaseResource {
361
364
  interface Annotation extends BaseResource {
362
365
  annotation: string;
363
366
  annotationType: string;
364
- file?: number;
367
+ file?: string;
365
368
  fileUrl?: string;
366
369
  fileSize?: number;
367
370
  folder?: number;
@@ -372,6 +375,9 @@ interface Annotation extends BaseResource {
372
375
  translation?: string;
373
376
  scratched: boolean;
374
377
  ownerName?: string;
378
+ canEdit?: boolean;
379
+ canView?: boolean;
380
+ canDelete?: boolean;
375
381
  }
376
382
  interface AnnotationFolderCreateRequest {
377
383
  folderName: string;
@@ -608,6 +614,17 @@ declare class ApiService {
608
614
  createAnnotationFolder(folderData: AnnotationFolderCreateRequest): Observable<AnnotationFolder>;
609
615
  updateAnnotationFolder(id: number, folderData: AnnotationFolderUpdateRequest): Observable<AnnotationFolder>;
610
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
+ */
611
628
  getAnnotations(params?: {
612
629
  search?: string;
613
630
  annotationType?: string;
@@ -621,9 +638,52 @@ declare class ApiService {
621
638
  count: number;
622
639
  results: Annotation[];
623
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
+ */
624
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
+ */
625
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
+ */
626
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
+ */
627
687
  deleteAnnotation(id: number): Observable<void>;
628
688
  getResourcePermissions(params?: {
629
689
  user?: number;
@@ -1035,6 +1095,7 @@ declare const authGuard: CanActivateFn;
1035
1095
 
1036
1096
  declare const adminGuard: CanActivateFn;
1037
1097
 
1098
+ declare function resetRefreshState(): void;
1038
1099
  declare const authInterceptor: HttpInterceptorFn;
1039
1100
 
1040
1101
  declare class LoginComponent implements OnInit {
@@ -1385,5 +1446,5 @@ declare class CupcakeCoreModule {
1385
1446
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<CupcakeCoreModule>;
1386
1447
  }
1387
1448
 
1388
- 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 };
1389
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noatgnu/cupcake-core",
3
- "version": "1.2.8",
3
+ "version": "1.2.10",
4
4
  "description": "A reusable Angular library that provides user management, authentication, and site configuration functionality for cupcake applications.",
5
5
  "keywords": [
6
6
  "angular",