@metarisc/metarisc-js 0.0.1-alpha.21 → 0.0.1-alpha.22

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.
@@ -0,0 +1,11 @@
1
+ import { Core, MetariscConfig } from "../core";
2
+ import { Client } from "../client";
3
+ import { Collection } from "../collection";
4
+ import { FeedMessage } from '../model/FeedMessage';
5
+ export declare class FeedAPI extends Core {
6
+ constructor(config: MetariscConfig, client?: Client);
7
+ /**
8
+ * Récupération d'une liste de message composant un flux d'activité pour l'utilisateur connecté.
9
+ */
10
+ getFeedMessages(): Collection<FeedMessage>;
11
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.FeedAPI = void 0;
7
+ const core_1 = require("../core");
8
+ const utils_1 = __importDefault(require("../utils"));
9
+ class FeedAPI extends core_1.Core {
10
+ constructor(config, client) {
11
+ super(config, client);
12
+ }
13
+ /**
14
+ * Récupération d'une liste de message composant un flux d'activité pour l'utilisateur connecté.
15
+ */
16
+ getFeedMessages() {
17
+ const pathVariable = {};
18
+ return this.collect({
19
+ method: 'GET',
20
+ endpoint: utils_1.default.constructPath(pathVariable, '/feed'),
21
+ headers: {},
22
+ params: {},
23
+ body: {}
24
+ });
25
+ }
26
+ }
27
+ exports.FeedAPI = FeedAPI;
package/lib/index.d.ts CHANGED
@@ -8,6 +8,7 @@ export { Client } from "./client";
8
8
  export { Tus } from "./tus";
9
9
  export { DossiersAPI } from './api/DossiersAPI';
10
10
  export { EvenementsAPI } from './api/EvenementsAPI';
11
+ export { FeedAPI } from './api/FeedAPI';
11
12
  export { NotificationsAPI } from './api/NotificationsAPI';
12
13
  export { OrganisationsAPI } from './api/OrganisationsAPI';
13
14
  export { PEIAPI } from './api/PEIAPI';
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UtilisateursAPI = exports.PingAPI = exports.PEIAPI = exports.OrganisationsAPI = exports.NotificationsAPI = exports.EvenementsAPI = exports.DossiersAPI = exports.Tus = exports.Client = exports.AuthMethod = exports.Collection = exports.Core = exports.OAuth2 = exports.Metarisc = void 0;
3
+ exports.UtilisateursAPI = exports.PingAPI = exports.PEIAPI = exports.OrganisationsAPI = exports.NotificationsAPI = exports.FeedAPI = exports.EvenementsAPI = exports.DossiersAPI = exports.Tus = exports.Client = exports.AuthMethod = exports.Collection = exports.Core = exports.OAuth2 = exports.Metarisc = void 0;
4
4
  var metarisc_1 = require("./metarisc");
5
5
  Object.defineProperty(exports, "Metarisc", { enumerable: true, get: function () { return metarisc_1.Metarisc; } });
6
6
  var oauth2_1 = require("./auth/oauth2");
@@ -19,6 +19,8 @@ var DossiersAPI_1 = require("./api/DossiersAPI");
19
19
  Object.defineProperty(exports, "DossiersAPI", { enumerable: true, get: function () { return DossiersAPI_1.DossiersAPI; } });
20
20
  var EvenementsAPI_1 = require("./api/EvenementsAPI");
21
21
  Object.defineProperty(exports, "EvenementsAPI", { enumerable: true, get: function () { return EvenementsAPI_1.EvenementsAPI; } });
22
+ var FeedAPI_1 = require("./api/FeedAPI");
23
+ Object.defineProperty(exports, "FeedAPI", { enumerable: true, get: function () { return FeedAPI_1.FeedAPI; } });
22
24
  var NotificationsAPI_1 = require("./api/NotificationsAPI");
23
25
  Object.defineProperty(exports, "NotificationsAPI", { enumerable: true, get: function () { return NotificationsAPI_1.NotificationsAPI; } });
24
26
  var OrganisationsAPI_1 = require("./api/OrganisationsAPI");
package/lib/metarisc.d.ts CHANGED
@@ -3,6 +3,7 @@ import { Tus } from "./tus";
3
3
  import { Client } from "./client";
4
4
  import { DossiersAPI } from './api/DossiersAPI';
5
5
  import { EvenementsAPI } from './api/EvenementsAPI';
6
+ import { FeedAPI } from './api/FeedAPI';
6
7
  import { NotificationsAPI } from './api/NotificationsAPI';
7
8
  import { OrganisationsAPI } from './api/OrganisationsAPI';
8
9
  import { PEIAPI } from './api/PEIAPI';
@@ -10,6 +11,7 @@ import { PingAPI } from './api/PingAPI';
10
11
  import { UtilisateursAPI } from './api/UtilisateursAPI';
11
12
  export declare class Metarisc extends Core {
12
13
  utilisateurs?: UtilisateursAPI;
14
+ feed?: FeedAPI;
13
15
  dossiers?: DossiersAPI;
14
16
  organisations?: OrganisationsAPI;
15
17
  pei?: PEIAPI;
package/lib/metarisc.js CHANGED
@@ -5,6 +5,7 @@ const core_1 = require("./core");
5
5
  const tus_1 = require("./tus");
6
6
  const DossiersAPI_1 = require("./api/DossiersAPI");
7
7
  const EvenementsAPI_1 = require("./api/EvenementsAPI");
8
+ const FeedAPI_1 = require("./api/FeedAPI");
8
9
  const NotificationsAPI_1 = require("./api/NotificationsAPI");
9
10
  const OrganisationsAPI_1 = require("./api/OrganisationsAPI");
10
11
  const PEIAPI_1 = require("./api/PEIAPI");
@@ -19,6 +20,8 @@ class Metarisc extends core_1.Core {
19
20
  switch (name) {
20
21
  case 'utilisateurs':
21
22
  return new UtilisateursAPI_1.UtilisateursAPI(config, tmpClient);
23
+ case 'feed':
24
+ return new FeedAPI_1.FeedAPI(config, tmpClient);
22
25
  case 'dossiers':
23
26
  return new DossiersAPI_1.DossiersAPI(config, tmpClient);
24
27
  case 'organisations':
@@ -0,0 +1,2 @@
1
+ import { FeedMessageTexte } from '../../src/model/FeedMessageTexte';
2
+ export type FeedMessage = FeedMessageTexte;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ export type FeedMessageBase = {
2
+ 'id'?: string;
3
+ 'titre'?: string;
4
+ 'date_de_creation'?: Date;
5
+ 'type'?: string;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { FeedMessageBase } from '../model/FeedMessageBase';
2
+ export type FeedMessageTexte = FeedMessageBase & {
3
+ 'texte'?: string;
4
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@metarisc/metarisc-js",
3
3
  "main": "lib/index.js",
4
4
  "types": "lib/index.d.ts",
5
- "version": "0.0.1-alpha.21",
5
+ "version": "0.0.1-alpha.22",
6
6
  "scripts": {
7
7
  "lint": "eslint . --ext .ts --fix",
8
8
  "compile": "tsc",
@@ -0,0 +1,27 @@
1
+ import { Core, MetariscConfig } from "../core";
2
+ import Utils from "../utils";
3
+ import { Client } from "../client";
4
+ import { Collection } from "../collection";
5
+ import { FeedMessage } from '../model/FeedMessage';
6
+
7
+ export class FeedAPI extends Core {
8
+ constructor(config: MetariscConfig, client?: Client) {
9
+ super(config, client);
10
+ }
11
+
12
+ /**
13
+ * Récupération d'une liste de message composant un flux d'activité pour l'utilisateur connecté.
14
+ */
15
+ getFeedMessages(): Collection<FeedMessage>
16
+ {
17
+ const pathVariable = { };
18
+ return this.collect<FeedMessage>({
19
+ method: 'GET',
20
+ endpoint: Utils.constructPath(pathVariable, '/feed'),
21
+ headers: { },
22
+ params: { },
23
+ body: {}
24
+ });
25
+ }
26
+
27
+ }
package/src/index.ts CHANGED
@@ -11,6 +11,8 @@ export { DossiersAPI } from './api/DossiersAPI';
11
11
 
12
12
  export { EvenementsAPI } from './api/EvenementsAPI';
13
13
 
14
+ export { FeedAPI } from './api/FeedAPI';
15
+
14
16
  export { NotificationsAPI } from './api/NotificationsAPI';
15
17
 
16
18
  export { OrganisationsAPI } from './api/OrganisationsAPI';
package/src/metarisc.ts CHANGED
@@ -6,6 +6,8 @@ import { DossiersAPI } from './api/DossiersAPI';
6
6
 
7
7
  import { EvenementsAPI } from './api/EvenementsAPI';
8
8
 
9
+ import { FeedAPI } from './api/FeedAPI';
10
+
9
11
  import { NotificationsAPI } from './api/NotificationsAPI';
10
12
 
11
13
  import { OrganisationsAPI } from './api/OrganisationsAPI';
@@ -21,6 +23,8 @@ export class Metarisc extends Core
21
23
 
22
24
  public utilisateurs?: UtilisateursAPI;
23
25
 
26
+ public feed?: FeedAPI;
27
+
24
28
  public dossiers?: DossiersAPI;
25
29
 
26
30
  public organisations?: OrganisationsAPI;
@@ -47,6 +51,9 @@ export class Metarisc extends Core
47
51
  case 'utilisateurs':
48
52
  return new UtilisateursAPI(config, tmpClient);
49
53
 
54
+ case 'feed':
55
+ return new FeedAPI(config, tmpClient);
56
+
50
57
  case 'dossiers':
51
58
  return new DossiersAPI(config, tmpClient);
52
59
 
@@ -0,0 +1,3 @@
1
+ import { FeedMessageTexte } from '../../src/model/FeedMessageTexte';
2
+
3
+ export type FeedMessage = FeedMessageTexte;
@@ -0,0 +1,6 @@
1
+ export type FeedMessageBase = {
2
+ 'id'?: string;
3
+ 'titre'?: string;
4
+ 'date_de_creation'?: Date;
5
+ 'type'?: string;
6
+ };
@@ -0,0 +1,5 @@
1
+ import { FeedMessageBase } from '../model/FeedMessageBase';
2
+
3
+ export type FeedMessageTexte = FeedMessageBase & {
4
+ 'texte'?: string;
5
+ };