Skip to content

Commit

Permalink
Use latest JS-API and ADF (#3423)
Browse files Browse the repository at this point in the history
* Update JS-API and ADF versions to latest

* Fix missing types

* Fix incorrect types

* Use correct method to get membership requests
  • Loading branch information
MichalKinas authored Sep 8, 2023
1 parent 9106608 commit b086093
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 68 deletions.
83 changes: 36 additions & 47 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
},
"private": true,
"dependencies": {
"@alfresco/adf-content-services": "6.3.0-5977252204",
"@alfresco/adf-core": "6.3.0-5977252204",
"@alfresco/adf-extensions": "6.3.0-5977252204",
"@alfresco/eslint-plugin-eslint-angular": "6.3.0-5977252204",
"@alfresco/js-api": "6.3.0-1172",
"@alfresco/adf-content-services": "6.3.0-6109128581",
"@alfresco/adf-core": "6.3.0-6109128581",
"@alfresco/adf-extensions": "6.3.0-6109128581",
"@alfresco/eslint-plugin-eslint-angular": "6.3.0-6109128581",
"@alfresco/js-api": "6.3.0-1271",
"@angular/animations": "14.1.3",
"@angular/cdk": "14.1.3",
"@angular/common": "14.1.3",
Expand Down Expand Up @@ -69,8 +69,8 @@
"zone.js": "0.11.8"
},
"devDependencies": {
"@alfresco/adf-cli": "6.3.0-5977252204",
"@alfresco/adf-testing": "6.3.0-5977252204",
"@alfresco/adf-cli": "6.3.0-6109128581",
"@alfresco/adf-testing": "6.3.0-6109128581",
"@angular-devkit/build-angular": "14.2.11",
"@angular-devkit/core": "14.1.2",
"@angular-devkit/schematics": "14.1.2",
Expand Down
8 changes: 4 additions & 4 deletions projects/aca-content/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"peerDependencies": {
"@angular/common": "^14.1.0",
"@angular/core": "^14.1.0",
"@alfresco/adf-core": "^6.3.0-5977252204",
"@alfresco/adf-content-services": "^6.3.0-5977252204",
"@alfresco/adf-extensions": "^6.3.0-5977252204",
"@alfresco/js-api": ">=6.3.0-1172",
"@alfresco/adf-core": "^6.3.0-6109128581",
"@alfresco/adf-content-services": "^6.3.0-6109128581",
"@alfresco/adf-extensions": "^6.3.0-6109128581",
"@alfresco/js-api": ">=6.3.0-1271",
"@angular/animations": "^14.1.3",
"@angular/cdk": "^14.1.3",
"@angular/forms": "^14.1.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
import { TestBed, fakeAsync, tick, ComponentFixture } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA, SimpleChange, SimpleChanges } from '@angular/core';
import { Router, ActivatedRoute, convertToParamMap } from '@angular/router';
import { DocumentListService, FilterSearch, PathElementEntity, UploadService } from '@alfresco/adf-content-services';
import { DocumentListService, FilterSearch, UploadService } from '@alfresco/adf-content-services';
import { NodeActionsService } from '../../services/node-actions.service';
import { FilesComponent } from './files.component';
import { AppTestingModule } from '../../testing/app-testing.module';
import { AppExtensionService, ContentApiService } from '@alfresco/aca-shared';
import { of, Subject, throwError } from 'rxjs';
import { By } from '@angular/platform-browser';
import { NodeEntry, NodePaging, Node } from '@alfresco/js-api';
import { NodeEntry, NodePaging, Node, PathElement } from '@alfresco/js-api';

describe('FilesComponent', () => {
let node;
Expand Down Expand Up @@ -437,7 +437,7 @@ describe('FilesComponent', () => {

it('should reset the pagination when navigating using the breadcrumb', () => {
const resetNewFolderPaginationSpy = spyOn(component.documentList, 'resetNewFolderPagination');
const breadcrumbRoute: PathElementEntity = { id: 'fake-breadcrumb-route-id', name: 'fake' };
const breadcrumbRoute: PathElement = { id: 'fake-breadcrumb-route-id', name: 'fake' };
component.onBreadcrumbNavigate(breadcrumbRoute);

expect(resetNewFolderPaginationSpy).toHaveBeenCalled();
Expand Down
4 changes: 2 additions & 2 deletions projects/aca-playwright-shared/src/api/sites-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/

import { ApiClientFactory } from './api-client-factory';
import { SiteBody, SiteEntry } from '@alfresco/js-api';
import { SiteBodyCreate, SiteEntry } from '@alfresco/js-api';
import { users } from '../base-config/global-variables';
import { logger } from '@alfresco/adf-cli/scripts/logger';
import { SITE_VISIBILITY } from '../utils/configs';
Expand All @@ -47,7 +47,7 @@ export class SitesApi extends ApiClientFactory {
visibility: visibility || SITE_VISIBILITY.PUBLIC,
description: description,
id: siteId || title
} as SiteBody;
} as SiteBodyCreate;

try {
return await this.apiService.sites.createSite(site);
Expand Down
8 changes: 4 additions & 4 deletions projects/aca-shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"license": "LGPL-3.0",
"scripts": {},
"peerDependencies": {
"@alfresco/adf-content-services": "^6.3.0-5977252204",
"@alfresco/adf-core": "6.3.0-5977252204",
"@alfresco/adf-extensions": "6.3.0-5977252204",
"@alfresco/js-api": ">=6.3.0-1172",
"@alfresco/adf-content-services": "^6.3.0-6109128581",
"@alfresco/adf-core": "6.3.0-6109128581",
"@alfresco/adf-extensions": "6.3.0-6109128581",
"@alfresco/js-api": ">=6.3.0-1271",
"@angular/animations": "^14.1.3",
"@angular/common": "^14.1.3",
"@angular/compiler": "^14.1.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export class SitesApi extends RepoApi {
async hasMembershipRequest(siteId: string) {
try {
await this.apiAuth();
const requests = (await this.sitesApi.getSiteMembershipRequests('-me-')).list.entries.map((e) => e.entry.id);
const requests = (await this.sitesApi.listSiteMembershipRequestsForPerson('-me-')).list.entries.map((e) => e.entry.id);
return requests.includes(siteId);
} catch (error) {
this.handleError(`SitesApi hasMembershipRequest : catch : `, error);
Expand Down

0 comments on commit b086093

Please sign in to comment.