@data-fair/lib-common-types 1.5.0 → 1.5.2

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.
@@ -2,7 +2,7 @@
2
2
  export const schemaExports: string[]
3
3
 
4
4
  // see https://github.com/bcherny/json-schema-to-typescript/issues/439 if some types are not exported
5
- export interface Account {
5
+ export type Account = {
6
6
  type: "user" | "organization";
7
7
  id: string;
8
8
  name: string;
@@ -14,7 +14,7 @@ export interface Account {
14
14
  * This interface was referenced by `Account`'s JSON-Schema
15
15
  * via the `definition` "accountKeys".
16
16
  */
17
- export interface AccountKeys {
17
+ export type AccountKeys = {
18
18
  type: "user" | "organization";
19
19
  id: string;
20
20
  department?: string;
package/account/schema.js CHANGED
@@ -1,3 +1,4 @@
1
+ // TODO: remove this, duplicate of session/schema.ts
1
2
  export default {
2
3
  $id: 'https://github.com/data-fair/lib/account',
3
4
  'x-exports': ['types', 'validate'],
@@ -31,7 +31,7 @@ export type Dataset1 = {
31
31
  [k: string]: unknown;
32
32
  } | null;
33
33
 
34
- export interface Application {
34
+ export type Application = {
35
35
  /**
36
36
  * Globally unique identifier of the application
37
37
  */
@@ -62,7 +62,7 @@ export interface Application {
62
62
  };
63
63
  [k: string]: unknown;
64
64
  }
65
- export interface AccountKeys {
65
+ export type AccountKeys = {
66
66
  type: "user" | "organization";
67
67
  id: string;
68
68
  department?: string;
@@ -71,7 +71,7 @@ export interface AccountKeys {
71
71
  * This interface was referenced by `Application`'s JSON-Schema
72
72
  * via the `definition` "field".
73
73
  */
74
- export interface Field {
74
+ export type Field = {
75
75
  key: string;
76
76
  type: string;
77
77
  format?: string;
@@ -12,7 +12,7 @@ export type TopicTitle = string;
12
12
  export type Visibility = "public" | "private";
13
13
  export type ReceptionDate = string;
14
14
 
15
- export interface Event {
15
+ export type Event = {
16
16
  title: Title | InternationalizedTitle;
17
17
  body?: Content | InternationalizedContent;
18
18
  htmlBody?: HTMLContent | InternationalizedHTMLContent;
@@ -29,21 +29,21 @@ export interface Event {
29
29
  [k: string]: unknown;
30
30
  };
31
31
  }
32
- export interface InternationalizedTitle {
32
+ export type InternationalizedTitle = {
33
33
  /**
34
34
  * This interface was referenced by `InternationalizedTitle`'s JSON-Schema definition
35
35
  * via the `patternProperty` ".*".
36
36
  */
37
37
  [k: string]: string;
38
38
  }
39
- export interface InternationalizedContent {
39
+ export type InternationalizedContent = {
40
40
  /**
41
41
  * This interface was referenced by `InternationalizedContent`'s JSON-Schema definition
42
42
  * via the `patternProperty` ".*".
43
43
  */
44
44
  [k: string]: string;
45
45
  }
46
- export interface InternationalizedHTMLContent {
46
+ export type InternationalizedHTMLContent = {
47
47
  /**
48
48
  * This interface was referenced by `InternationalizedHTMLContent`'s JSON-Schema definition
49
49
  * via the `patternProperty` ".*".
@@ -54,7 +54,7 @@ export interface InternationalizedHTMLContent {
54
54
  * This interface was referenced by `Event`'s JSON-Schema
55
55
  * via the `definition` "sender".
56
56
  */
57
- export interface Emitter {
57
+ export type Emitter = {
58
58
  type: Type;
59
59
  /**
60
60
  * The unique id of the user or organization
@@ -81,11 +81,11 @@ export interface Emitter {
81
81
  * This interface was referenced by `Event`'s JSON-Schema
82
82
  * via the `definition` "topicRef".
83
83
  */
84
- export interface TopicRef {
84
+ export type TopicRef = {
85
85
  key: TopicKey;
86
86
  title?: TopicTitle;
87
87
  }
88
- export interface UsedToFillSubscriptionUrlTemplateAndSoCreateNotificationUrl {
88
+ export type UsedToFillSubscriptionUrlTemplateAndSoCreateNotificationUrl = {
89
89
  /**
90
90
  * This interface was referenced by `UsedToFillSubscriptionUrlTemplateAndSoCreateNotificationUrl`'s JSON-Schema definition
91
91
  * via the `patternProperty` ".*".
@@ -2,7 +2,6 @@
2
2
  export const schemaExports: string[]
3
3
 
4
4
  // see https://github.com/bcherny/json-schema-to-typescript/issues/439 if some types are not exported
5
- export type Identifiant = string;
6
5
  export type SiteDOrigineDeLaSouscription = string;
7
6
  export type Titre = string;
8
7
  export type Contenu = string;
@@ -17,8 +16,7 @@ export type RecevoirLaNotificationParEmail = "email";
17
16
  export type Sorties = ((RecevoirLaNotificationSurVosAppareilsConfigures | RecevoirLaNotificationParEmail) & string)[];
18
17
  export type CalculeAPartirDeSubscriptionUrlTemplateEtEventUrlParams = string;
19
18
 
20
- export interface Notification {
21
- _id: Identifiant;
19
+ export type Notification = {
22
20
  origin?: SiteDOrigineDeLaSouscription;
23
21
  title: Titre;
24
22
  body?: Contenu;
@@ -52,7 +50,7 @@ export interface Notification {
52
50
  [k: string]: unknown;
53
51
  };
54
52
  }
55
- export interface Emitter {
53
+ export type Emitter = {
56
54
  type: Type;
57
55
  /**
58
56
  * The unique id of the user or organization
@@ -75,7 +73,7 @@ export interface Emitter {
75
73
  */
76
74
  departmentName?: string;
77
75
  }
78
- export interface TopicRef {
76
+ export type TopicRef = {
79
77
  key: TopicKey;
80
78
  title?: TopicTitle;
81
79
  }