@data-fair/lib-common-types 1.8.0 → 1.8.1
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/event/.type/index.d.ts +16 -0
- package/event/schema.d.ts +20 -0
- package/event/schema.js +20 -0
- package/package.json +1 -1
package/event/.type/index.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export type Event = {
|
|
|
53
53
|
[k: string]: unknown;
|
|
54
54
|
};
|
|
55
55
|
resource?: TheMainResourceConcernedByTheEvent;
|
|
56
|
+
recipient?: OptionalRecipientTargetOfTheEvent;
|
|
56
57
|
}
|
|
57
58
|
export type InternationalizedTitle = {
|
|
58
59
|
/**
|
|
@@ -128,4 +129,19 @@ export type TheMainResourceConcernedByTheEvent = {
|
|
|
128
129
|
*/
|
|
129
130
|
title?: string;
|
|
130
131
|
}
|
|
132
|
+
export type OptionalRecipientTargetOfTheEvent = {
|
|
133
|
+
/**
|
|
134
|
+
* The unique id of the user
|
|
135
|
+
*/
|
|
136
|
+
id: string;
|
|
137
|
+
/**
|
|
138
|
+
* The display name of the user
|
|
139
|
+
*/
|
|
140
|
+
name?: string;
|
|
141
|
+
/**
|
|
142
|
+
* If true, the event is only sent to the recipient if they are subscribed to the topic
|
|
143
|
+
*/
|
|
144
|
+
subscribedOnly?: boolean;
|
|
145
|
+
[k: string]: unknown;
|
|
146
|
+
}
|
|
131
147
|
|
package/event/schema.d.ts
CHANGED
|
@@ -145,6 +145,26 @@ declare const _default: {
|
|
|
145
145
|
};
|
|
146
146
|
};
|
|
147
147
|
};
|
|
148
|
+
recipient: {
|
|
149
|
+
type: string;
|
|
150
|
+
title: string;
|
|
151
|
+
required: string[];
|
|
152
|
+
readOnly: boolean;
|
|
153
|
+
properties: {
|
|
154
|
+
id: {
|
|
155
|
+
type: string;
|
|
156
|
+
description: string;
|
|
157
|
+
};
|
|
158
|
+
name: {
|
|
159
|
+
type: string;
|
|
160
|
+
description: string;
|
|
161
|
+
};
|
|
162
|
+
subscribedOnly: {
|
|
163
|
+
type: string;
|
|
164
|
+
description: string;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
};
|
|
148
168
|
};
|
|
149
169
|
$defs: {
|
|
150
170
|
sender: {
|
package/event/schema.js
CHANGED
|
@@ -124,6 +124,26 @@ export default {
|
|
|
124
124
|
description: 'The display name of the resource'
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
+
},
|
|
128
|
+
recipient: {
|
|
129
|
+
type: 'object',
|
|
130
|
+
title: 'Optional recipient target of the event',
|
|
131
|
+
required: ['id'],
|
|
132
|
+
readOnly: true,
|
|
133
|
+
properties: {
|
|
134
|
+
id: {
|
|
135
|
+
type: 'string',
|
|
136
|
+
description: 'The unique id of the user'
|
|
137
|
+
},
|
|
138
|
+
name: {
|
|
139
|
+
type: 'string',
|
|
140
|
+
description: 'The display name of the user'
|
|
141
|
+
},
|
|
142
|
+
subscribedOnly: {
|
|
143
|
+
type: 'boolean',
|
|
144
|
+
description: 'If true, the event is only sent to the recipient if they are subscribed to the topic'
|
|
145
|
+
}
|
|
146
|
+
}
|
|
127
147
|
}
|
|
128
148
|
},
|
|
129
149
|
$defs: {
|