@edifice.io/community-client-rest-rn 1.4.3 → 1.4.4-develop.0.20260608074344
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/clients/announcement.client.js +4 -0
- package/clients/announcement.client.js.map +1 -1
- package/clients/community.client.d.ts +2 -2
- package/clients/community.client.js +3 -2
- package/clients/community.client.js.map +1 -1
- package/clients/discussion.client.d.ts +13 -5
- package/clients/discussion.client.js +54 -10
- package/clients/discussion.client.js.map +1 -1
- package/clients/generated/clients/discussions.client.d.ts +3 -3
- package/clients/resource.client.d.ts +6 -6
- package/clients/resource.client.js +11 -5
- package/clients/resource.client.js.map +1 -1
- package/dtos/announcement.d.ts +35 -5
- package/dtos/announcement.js +116 -11
- package/dtos/announcement.js.map +1 -1
- package/dtos/community.d.ts +12 -1
- package/dtos/community.js +50 -1
- package/dtos/community.js.map +1 -1
- package/dtos/discussion.d.ts +47 -18
- package/dtos/discussion.js +263 -57
- package/dtos/discussion.js.map +1 -1
- package/dtos/index.d.ts +1 -0
- package/dtos/index.js +1 -0
- package/dtos/index.js.map +1 -1
- package/dtos/resource-enrich.d.ts +19 -0
- package/dtos/resource-enrich.js +11 -0
- package/dtos/resource-enrich.js.map +1 -0
- package/dtos/resource.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/tsconfig.browser.tsbuildinfo +1 -1
- package/utils/app-name.util.d.ts +3 -0
- package/utils/app-name.util.js +18 -0
- package/utils/app-name.util.js.map +1 -0
- package/utils/index.d.ts +3 -0
- package/utils/index.js +3 -0
- package/utils/index.js.map +1 -1
- package/utils/media-type.util.d.ts +3 -0
- package/utils/media-type.util.js +14 -0
- package/utils/media-type.util.js.map +1 -0
- package/utils/resource-enrich.util.d.ts +3 -0
- package/utils/resource-enrich.util.js +14 -0
- package/utils/resource-enrich.util.js.map +1 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AppName } from "../dtos";
|
|
2
|
+
export const MOBILE_APP_NAME_MAP = {
|
|
3
|
+
[AppName.WORKSPACE]: "Espace documentaire",
|
|
4
|
+
[AppName.BLOG]: "Blog",
|
|
5
|
+
[AppName.TIMELINEGENERATOR]: "TimelineGenerator",
|
|
6
|
+
[AppName.SCRAPBOOK]: "Cahier Multimédia",
|
|
7
|
+
[AppName.MINDMAP]: "Mindmap",
|
|
8
|
+
[AppName.WIKI]: "Wiki",
|
|
9
|
+
[AppName.EXERCIZER]: "Exercices et évaluations",
|
|
10
|
+
[AppName.FORM]: "Formulaire",
|
|
11
|
+
[AppName.COLLABORATIVEWALL]: "CollaborativeWall",
|
|
12
|
+
[AppName.COLLABORATIVEDITOR]: "Collaborative Editor",
|
|
13
|
+
[AppName.EXTERNAL_LINK]: "External",
|
|
14
|
+
};
|
|
15
|
+
export function getMobileAppName(appName) {
|
|
16
|
+
return MOBILE_APP_NAME_MAP[appName] ?? "External";
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=app-name.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-name.util.js","sourceRoot":"","sources":["../../../src/utils/app-name.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAiB,MAAM,SAAS,CAAC;AAEjD,MAAM,CAAC,MAAM,mBAAmB,GAAmC;IACjE,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,qBAAqB;IAC1C,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM;IACtB,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,mBAAmB;IAChD,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,mBAAmB;IACxC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,SAAS;IAC5B,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM;IACtB,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,0BAA0B;IAC/C,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,YAAY;IAC5B,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,mBAAmB;IAChD,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE,sBAAsB;IACpD,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,UAAU;CACpC,CAAC;AAEF,MAAM,UAAU,gBAAgB,CAAC,OAAgB;IAC/C,OAAO,mBAAmB,CAAC,OAAO,CAAC,IAAI,UAAU,CAAC;AACpD,CAAC"}
|
package/utils/index.d.ts
CHANGED
|
@@ -3,3 +3,6 @@ export * from "./rights.utils";
|
|
|
3
3
|
export * from "./community-image.types";
|
|
4
4
|
export * from "./community-image.util";
|
|
5
5
|
export * from "./background-images.constants";
|
|
6
|
+
export * from "./app-name.util";
|
|
7
|
+
export * from "./media-type.util";
|
|
8
|
+
export * from "./resource-enrich.util";
|
package/utils/index.js
CHANGED
|
@@ -3,4 +3,7 @@ export * from "./rights.utils";
|
|
|
3
3
|
export * from "./community-image.types";
|
|
4
4
|
export * from "./community-image.util";
|
|
5
5
|
export * from "./background-images.constants";
|
|
6
|
+
export * from "./app-name.util";
|
|
7
|
+
export * from "./media-type.util";
|
|
8
|
+
export * from "./resource-enrich.util";
|
|
6
9
|
//# sourceMappingURL=index.js.map
|
package/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MobileMediaType, ResourceType } from "../dtos";
|
|
2
|
+
export const MOBILE_MEDIA_TYPE_MAP = {
|
|
3
|
+
[ResourceType.IMAGE]: MobileMediaType.IMAGE,
|
|
4
|
+
[ResourceType.VIDEO]: MobileMediaType.VIDEO,
|
|
5
|
+
[ResourceType.SOUND]: MobileMediaType.AUDIO,
|
|
6
|
+
[ResourceType.ENT]: MobileMediaType.RESOURCE,
|
|
7
|
+
[ResourceType.EXTERNAL_LINK]: MobileMediaType.LINK,
|
|
8
|
+
[ResourceType.FILE]: MobileMediaType.ATTACHMENT,
|
|
9
|
+
[ResourceType.OFFICE_DOCUMENT]: MobileMediaType.OFFICE,
|
|
10
|
+
};
|
|
11
|
+
export function getMobileMediaType(resourceType) {
|
|
12
|
+
return MOBILE_MEDIA_TYPE_MAP[resourceType] ?? MobileMediaType.ATTACHMENT;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=media-type.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-type.util.js","sourceRoot":"","sources":["../../../src/utils/media-type.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAExD,MAAM,CAAC,MAAM,qBAAqB,GAA0C;IAC1E,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC,KAAK;IAC3C,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC,KAAK;IAC3C,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC,KAAK;IAC3C,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,eAAe,CAAC,QAAQ;IAC5C,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE,eAAe,CAAC,IAAI;IAClD,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC,UAAU;IAC/C,CAAC,YAAY,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC,MAAM;CACvD,CAAC;AAEF,MAAM,UAAU,kBAAkB,CAChC,YAA0B;IAE1B,OAAO,qBAAqB,CAAC,YAAY,CAAC,IAAI,eAAe,CAAC,UAAU,CAAC;AAC3E,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ResourceDto, SearchResourceResponseDto, EnrichedResourceDto, EnrichedSearchResourceResponseDto } from "../dtos";
|
|
2
|
+
export declare function enrichResource(dto: ResourceDto): EnrichedResourceDto;
|
|
3
|
+
export declare function enrichSearchResponse(res: SearchResourceResponseDto): EnrichedSearchResourceResponseDto;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getMobileAppName } from "./app-name.util";
|
|
2
|
+
import { getMobileMediaType } from "./media-type.util";
|
|
3
|
+
export function enrichResource(dto) {
|
|
4
|
+
return {
|
|
5
|
+
...dto,
|
|
6
|
+
mobileAppName: getMobileAppName(dto.appName),
|
|
7
|
+
mobileMediaType: getMobileMediaType(dto.type),
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export function enrichSearchResponse(res) {
|
|
11
|
+
const items = res?.items ?? [];
|
|
12
|
+
return { ...res, items: items.map(enrichResource) };
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=resource-enrich.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-enrich.util.js","sourceRoot":"","sources":["../../../src/utils/resource-enrich.util.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,MAAM,UAAU,cAAc,CAAC,GAAgB;IAC7C,OAAO;QACL,GAAG,GAAG;QACN,aAAa,EAAE,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC;QAC5C,eAAe,EAAE,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC;KAC9C,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,GAA8B;IAE9B,MAAM,KAAK,GAAG,GAAG,EAAE,KAAK,IAAI,EAAE,CAAC;IAC/B,OAAO,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC;AACtD,CAAC"}
|