@data-fair/lib-common-types 1.10.1 → 1.10.3

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.
@@ -17,6 +17,7 @@ export type OrganizationDepartment = string;
17
17
  export type OrganizationDepartmentName = string;
18
18
  export type TopicKey = string;
19
19
  export type TopicTitle = string;
20
+ export type ExplicitlyDefinedUrlAlternativeIsToUseUrlTemplateInSubscriptionAndUrlParams = string;
20
21
  export type Visibility = "public" | "private";
21
22
  export type ReceptionDate = string;
22
23
  export type Type1 = string;
@@ -26,7 +27,7 @@ export type Event = {
26
27
  body?: Content | InternationalizedContent;
27
28
  htmlBody?: HTMLContent | InternationalizedHTMLContent;
28
29
  icon?: URLOfEventIcon;
29
- sender: Emitter;
30
+ sender?: Emitter;
30
31
  originator?: {
31
32
  internalProcess?: {
32
33
  id?: string;
@@ -55,6 +56,7 @@ export type Event = {
55
56
  [k: string]: unknown;
56
57
  };
57
58
  topic: TopicRef;
59
+ url?: ExplicitlyDefinedUrlAlternativeIsToUseUrlTemplateInSubscriptionAndUrlParams;
58
60
  urlParams?: UsedToFillSubscriptionUrlTemplateAndSoCreateNotificationUrl;
59
61
  visibility?: Visibility;
60
62
  date: ReceptionDate;
package/event/schema.d.ts CHANGED
@@ -127,6 +127,10 @@ declare const _default: {
127
127
  topic: {
128
128
  $ref: string;
129
129
  };
130
+ url: {
131
+ type: string;
132
+ title: string;
133
+ };
130
134
  urlParams: {
131
135
  type: string;
132
136
  title: string;
package/event/schema.js CHANGED
@@ -12,7 +12,7 @@ export default {
12
12
  title: 'Event',
13
13
  type: 'object',
14
14
  additionalProperties: false,
15
- required: ['title', 'topic', 'sender', 'date'],
15
+ required: ['title', 'topic', 'date'],
16
16
  properties: {
17
17
  title: {
18
18
  oneOf: [{
@@ -36,7 +36,7 @@ export default {
36
36
  type: 'string',
37
37
  title: 'URL of event icon'
38
38
  },
39
- // sender is the owner of the topic
39
+ // sender is the owner of the topic, topic is global if no sender is given
40
40
  sender: { $ref: '#/$defs/sender' },
41
41
  // originator is the account/user who triggered the event
42
42
  originator: {
@@ -101,6 +101,10 @@ export default {
101
101
  }
102
102
  },
103
103
  topic: { $ref: '#/$defs/topicRef' },
104
+ url: {
105
+ type: 'string',
106
+ title: 'explicitly defined url, alternative is to use urlTemplate in subscription and urlParams',
107
+ },
104
108
  urlParams: {
105
109
  type: 'object',
106
110
  title: 'used to fill subscription.urlTemplate and so create notification.url',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/lib-common-types",
3
- "version": "1.10.1",
3
+ "version": "1.10.3",
4
4
  "description": "Shared schemas and built type definitions in the data-fair stack.",
5
5
  "main": "index.js",
6
6
  "scripts": {