Browse Source

fix problems in the spec

Signed-off-by: Nikolas Rimikis <rimikis.nikolas@gmail.com>
pull/228/head
Nikolas Rimikis 2 years ago
parent
commit
ee828fc524
No known key found for this signature in database
GPG Key ID: 85ED1DE9786A4FF2
  1. 114
      packages/nextcloud/lib/src/nextcloud.openapi.dart
  2. 22
      packages/nextcloud/lib/src/nextcloud.openapi.g.dart
  3. 49
      packages/nextcloud/lib/src/nextcloud.openapi.json
  4. 8
      packages/nextcloud/test/notifications.dart
  5. 33
      packages/nextcloud/test/user_status.dart
  6. 8
      specs/core.json
  7. 14
      specs/notifications.json
  8. 2
      specs/uppush.json
  9. 27
      specs/user_status.json

114
packages/nextcloud/lib/src/nextcloud.openapi.dart

@ -3709,16 +3709,23 @@ class NextcloudCoreLoginFlowResult {
class NextcloudCoreAutocompleteResult_Ocs_Data_Status {
NextcloudCoreAutocompleteResult_Ocs_Data_Status(
this._data, {
this.listDynamic,
this.string,
});
factory NextcloudCoreAutocompleteResult_Ocs_Data_Status.fromJson(dynamic data) {
List<dynamic>? listDynamic;
String? string;
try {
listDynamic = (data as List).map((final e) => (e as dynamic)).toList();
} catch (_) {}
try {
string = (data as String);
} catch (_) {}
assert([listDynamic, string].where((final x) => x != null).length == 1, 'Need oneOf for $data');
return NextcloudCoreAutocompleteResult_Ocs_Data_Status(
data,
listDynamic: listDynamic,
string: string,
);
}
@ -3730,6 +3737,8 @@ class NextcloudCoreAutocompleteResult_Ocs_Data_Status {
final dynamic _data;
final List<dynamic>? listDynamic;
final String? string;
// coverage:ignore-start
@ -4202,74 +4211,6 @@ class NextcloudNotesSettings {
static String? toJsonString(NextcloudNotesSettings? data) => data == null ? null : json.encode(data.toJson());
}
class NextcloudNotificationsNotification_SubjectRichParameters {
NextcloudNotificationsNotification_SubjectRichParameters(
this._data, {
this.mapStringDynamic,
});
factory NextcloudNotificationsNotification_SubjectRichParameters.fromJson(dynamic data) {
Map<String, dynamic>? mapStringDynamic;
try {
mapStringDynamic = (data as Map<String, dynamic>);
} catch (_) {}
return NextcloudNotificationsNotification_SubjectRichParameters(
data,
mapStringDynamic: mapStringDynamic,
);
}
// coverage:ignore-start
factory NextcloudNotificationsNotification_SubjectRichParameters.fromJsonString(String data) =>
NextcloudNotificationsNotification_SubjectRichParameters.fromJson(json.decode(data));
// coverage:ignore-end
final dynamic _data;
final Map<String, dynamic>? mapStringDynamic;
// coverage:ignore-start
dynamic toJson() => _data;
// coverage:ignore-end
// coverage:ignore-start
static String toJsonString(dynamic data) => json.encode(data);
// coverage:ignore-end
}
class NextcloudNotificationsNotification_MessageRichParameters {
NextcloudNotificationsNotification_MessageRichParameters(
this._data, {
this.mapStringDynamic,
});
factory NextcloudNotificationsNotification_MessageRichParameters.fromJson(dynamic data) {
Map<String, dynamic>? mapStringDynamic;
try {
mapStringDynamic = (data as Map<String, dynamic>);
} catch (_) {}
return NextcloudNotificationsNotification_MessageRichParameters(
data,
mapStringDynamic: mapStringDynamic,
);
}
// coverage:ignore-start
factory NextcloudNotificationsNotification_MessageRichParameters.fromJsonString(String data) =>
NextcloudNotificationsNotification_MessageRichParameters.fromJson(json.decode(data));
// coverage:ignore-end
final dynamic _data;
final Map<String, dynamic>? mapStringDynamic;
// coverage:ignore-start
dynamic toJson() => _data;
// coverage:ignore-end
// coverage:ignore-start
static String toJsonString(dynamic data) => json.encode(data);
// coverage:ignore-end
}
@JsonSerializable()
class NextcloudNotificationsNotificationAction {
NextcloudNotificationsNotificationAction({
@ -4357,11 +4298,11 @@ class NextcloudNotificationsNotification {
final String subjectRich;
final NextcloudNotificationsNotification_SubjectRichParameters subjectRichParameters;
final dynamic subjectRichParameters;
final String messageRich;
final NextcloudNotificationsNotification_MessageRichParameters messageRichParameters;
final dynamic messageRichParameters;
final String icon;
@ -5330,6 +5271,7 @@ class NextcloudUserStatusPublicStatus_ClearAt {
try {
$int = (data as int);
} catch (_) {}
assert([userStatusClearAt, $int].where((final x) => x != null).length == 1, 'Need oneOf for $data');
return NextcloudUserStatusPublicStatus_ClearAt(
data,
userStatusClearAt: userStatusClearAt,
@ -5392,7 +5334,7 @@ class NextcloudUserStatusPublicStatus {
required this.userId,
this.message,
this.icon,
required this.clearAt,
this.clearAt,
required this.status,
});
@ -5412,7 +5354,7 @@ class NextcloudUserStatusPublicStatus {
final String? icon;
final NextcloudUserStatusPublicStatus_ClearAt clearAt;
final NextcloudUserStatusPublicStatus_ClearAt? clearAt;
final NextcloudUserStatusType status;
@ -5477,16 +5419,23 @@ class NextcloudUserStatusGetPublicStatuses {
class NextcloudUserStatusGetPublicStatus_Ocs_Data {
NextcloudUserStatusGetPublicStatus_Ocs_Data(
this._data, {
this.listDynamic,
this.userStatusPublicStatus,
});
factory NextcloudUserStatusGetPublicStatus_Ocs_Data.fromJson(dynamic data) {
List<dynamic>? listDynamic;
NextcloudUserStatusPublicStatus? userStatusPublicStatus;
try {
listDynamic = (data as List).map((final e) => (e as dynamic)).toList();
} catch (_) {}
try {
userStatusPublicStatus = NextcloudUserStatusPublicStatus.fromJson(data as Map<String, dynamic>);
} catch (_) {}
assert([listDynamic, userStatusPublicStatus].where((final x) => x != null).length == 1, 'Need oneOf for $data');
return NextcloudUserStatusGetPublicStatus_Ocs_Data(
data,
listDynamic: listDynamic,
userStatusPublicStatus: userStatusPublicStatus,
);
}
@ -5498,6 +5447,8 @@ class NextcloudUserStatusGetPublicStatus_Ocs_Data {
final dynamic _data;
final List<dynamic>? listDynamic;
final NextcloudUserStatusPublicStatus? userStatusPublicStatus;
// coverage:ignore-start
@ -5575,6 +5526,7 @@ class NextcloudUserStatusStatus_ClearAt {
try {
$int = (data as int);
} catch (_) {}
assert([userStatusClearAt, $int].where((final x) => x != null).length == 1, 'Need oneOf for $data');
return NextcloudUserStatusStatus_ClearAt(
data,
userStatusClearAt: userStatusClearAt,
@ -5610,7 +5562,7 @@ class NextcloudUserStatusStatus {
this.messageId,
required this.messageIsPredefined,
this.icon,
required this.clearAt,
this.clearAt,
required this.status,
required this.statusIsUserDefined,
});
@ -5634,7 +5586,7 @@ class NextcloudUserStatusStatus {
final String? icon;
final NextcloudUserStatusStatus_ClearAt clearAt;
final NextcloudUserStatusStatus_ClearAt? clearAt;
final NextcloudUserStatusType status;
@ -5649,16 +5601,23 @@ class NextcloudUserStatusStatus {
class NextcloudUserStatusGetStatus_Ocs_Data {
NextcloudUserStatusGetStatus_Ocs_Data(
this._data, {
this.listDynamic,
this.userStatusStatus,
});
factory NextcloudUserStatusGetStatus_Ocs_Data.fromJson(dynamic data) {
List<dynamic>? listDynamic;
NextcloudUserStatusStatus? userStatusStatus;
try {
listDynamic = (data as List).map((final e) => (e as dynamic)).toList();
} catch (_) {}
try {
userStatusStatus = NextcloudUserStatusStatus.fromJson(data as Map<String, dynamic>);
} catch (_) {}
assert([listDynamic, userStatusStatus].where((final x) => x != null).length == 1, 'Need oneOf for $data');
return NextcloudUserStatusGetStatus_Ocs_Data(
data,
listDynamic: listDynamic,
userStatusStatus: userStatusStatus,
);
}
@ -5670,6 +5629,8 @@ class NextcloudUserStatusGetStatus_Ocs_Data {
final dynamic _data;
final List<dynamic>? listDynamic;
final NextcloudUserStatusStatus? userStatusStatus;
// coverage:ignore-start
@ -5746,6 +5707,7 @@ class NextcloudUserStatusPredefinedStatus_ClearAt {
try {
$int = (data as int);
} catch (_) {}
assert([userStatusClearAt, $int].where((final x) => x != null).length == 1, 'Need oneOf for $data');
return NextcloudUserStatusPredefinedStatus_ClearAt(
data,
userStatusClearAt: userStatusClearAt,
@ -5779,7 +5741,7 @@ class NextcloudUserStatusPredefinedStatus {
required this.id,
required this.icon,
required this.message,
required this.clearAt,
this.clearAt,
});
// coverage:ignore-start
@ -5798,7 +5760,7 @@ class NextcloudUserStatusPredefinedStatus {
final String message;
final NextcloudUserStatusPredefinedStatus_ClearAt clearAt;
final NextcloudUserStatusPredefinedStatus_ClearAt? clearAt;
// coverage:ignore-start
Map<String, dynamic> toJson() => _$NextcloudUserStatusPredefinedStatusToJson(this);

22
packages/nextcloud/lib/src/nextcloud.openapi.g.dart

@ -1555,11 +1555,9 @@ NextcloudNotificationsNotification _$NextcloudNotificationsNotificationFromJson(
message: json['message'] as String,
link: json['link'] as String,
subjectRich: json['subjectRich'] as String,
subjectRichParameters:
NextcloudNotificationsNotification_SubjectRichParameters.fromJson(json['subjectRichParameters']),
subjectRichParameters: json['subjectRichParameters'],
messageRich: json['messageRich'] as String,
messageRichParameters:
NextcloudNotificationsNotification_MessageRichParameters.fromJson(json['messageRichParameters']),
messageRichParameters: json['messageRichParameters'],
icon: json['icon'] as String,
actions: (json['actions'] as List<dynamic>)
.map((e) => NextcloudNotificationsNotificationAction.fromJson(e as Map<String, dynamic>))
@ -1579,9 +1577,9 @@ Map<String, dynamic> _$NextcloudNotificationsNotificationToJson(NextcloudNotific
'message': instance.message,
'link': instance.link,
'subjectRich': instance.subjectRich,
'subjectRichParameters': instance.subjectRichParameters.toJson(),
'subjectRichParameters': instance.subjectRichParameters,
'messageRich': instance.messageRich,
'messageRichParameters': instance.messageRichParameters.toJson(),
'messageRichParameters': instance.messageRichParameters,
'icon': instance.icon,
'actions': instance.actions.map((e) => e.toJson()).toList(),
};
@ -2215,7 +2213,7 @@ NextcloudUserStatusPublicStatus _$NextcloudUserStatusPublicStatusFromJson(Map<St
userId: json['userId'] as String,
message: json['message'] as String?,
icon: json['icon'] as String?,
clearAt: NextcloudUserStatusPublicStatus_ClearAt.fromJson(json['clearAt']),
clearAt: json['clearAt'] == null ? null : NextcloudUserStatusPublicStatus_ClearAt.fromJson(json['clearAt']),
status: $enumDecode(_$NextcloudUserStatusTypeEnumMap, json['status']),
);
}
@ -2225,7 +2223,7 @@ Map<String, dynamic> _$NextcloudUserStatusPublicStatusToJson(NextcloudUserStatus
'userId': instance.userId,
'message': instance.message,
'icon': instance.icon,
'clearAt': instance.clearAt.toJson(),
'clearAt': instance.clearAt?.toJson(),
'status': _$NextcloudUserStatusTypeEnumMap[instance.status]!,
};
@ -2324,7 +2322,7 @@ NextcloudUserStatusStatus _$NextcloudUserStatusStatusFromJson(Map<String, dynami
messageId: json['messageId'] as String?,
messageIsPredefined: json['messageIsPredefined'] as bool,
icon: json['icon'] as String?,
clearAt: NextcloudUserStatusStatus_ClearAt.fromJson(json['clearAt']),
clearAt: json['clearAt'] == null ? null : NextcloudUserStatusStatus_ClearAt.fromJson(json['clearAt']),
status: $enumDecode(_$NextcloudUserStatusTypeEnumMap, json['status']),
statusIsUserDefined: json['statusIsUserDefined'] as bool,
);
@ -2336,7 +2334,7 @@ Map<String, dynamic> _$NextcloudUserStatusStatusToJson(NextcloudUserStatusStatus
'messageId': instance.messageId,
'messageIsPredefined': instance.messageIsPredefined,
'icon': instance.icon,
'clearAt': instance.clearAt.toJson(),
'clearAt': instance.clearAt?.toJson(),
'status': _$NextcloudUserStatusTypeEnumMap[instance.status]!,
'statusIsUserDefined': instance.statusIsUserDefined,
};
@ -2381,7 +2379,7 @@ NextcloudUserStatusPredefinedStatus _$NextcloudUserStatusPredefinedStatusFromJso
id: json['id'] as String,
icon: json['icon'] as String,
message: json['message'] as String,
clearAt: NextcloudUserStatusPredefinedStatus_ClearAt.fromJson(json['clearAt']),
clearAt: json['clearAt'] == null ? null : NextcloudUserStatusPredefinedStatus_ClearAt.fromJson(json['clearAt']),
);
}
@ -2390,7 +2388,7 @@ Map<String, dynamic> _$NextcloudUserStatusPredefinedStatusToJson(NextcloudUserSt
'id': instance.id,
'icon': instance.icon,
'message': instance.message,
'clearAt': instance.clearAt.toJson(),
'clearAt': instance.clearAt?.toJson(),
};
NextcloudUserStatusPredefinedStatuses_Ocs _$NextcloudUserStatusPredefinedStatuses_OcsFromJson(

49
packages/nextcloud/lib/src/nextcloud.openapi.json

@ -942,7 +942,13 @@
"type": "string"
},
"status": {
"anyOf": [
"oneOf": [
{
"type": "array",
"items": {
"type": "object"
}
},
{
"type": "string"
}
@ -1307,23 +1313,13 @@
"type": "string"
},
"subjectRichParameters": {
"anyOf": [
{
"type": "object",
"properties": {}
}
]
"type": "object"
},
"messageRich": {
"type": "string"
},
"messageRichParameters": {
"anyOf": [
{
"type": "object",
"properties": {}
}
]
"type": "object"
},
"icon": {
"type": "string"
@ -1741,8 +1737,7 @@
"required": [
"id",
"icon",
"message",
"clearAt"
"message"
],
"properties": {
"id": {
@ -1755,7 +1750,7 @@
"type": "string"
},
"clearAt": {
"anyOf": [
"oneOf": [
{
"$ref": "#/components/schemas/UserStatusClearAt"
},
@ -1825,7 +1820,13 @@
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"anyOf": [
"oneOf": [
{
"type": "array",
"items": {
"type": "object"
}
},
{
"$ref": "#/components/schemas/UserStatusStatus"
}
@ -1878,7 +1879,13 @@
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"anyOf": [
"oneOf": [
{
"type": "array",
"items": {
"type": "object"
}
},
{
"$ref": "#/components/schemas/UserStatusPublicStatus"
}
@ -1893,7 +1900,6 @@
"required": [
"userId",
"messageIsPredefined",
"clearAt",
"status",
"statusIsUserDefined"
],
@ -1914,7 +1920,7 @@
"type": "string"
},
"clearAt": {
"anyOf": [
"oneOf": [
{
"$ref": "#/components/schemas/UserStatusClearAt"
},
@ -1936,7 +1942,6 @@
"type": "object",
"required": [
"userId",
"clearAt",
"status"
],
"properties": {
@ -1950,7 +1955,7 @@
"type": "string"
},
"clearAt": {
"anyOf": [
"oneOf": [
{
"$ref": "#/components/schemas/UserStatusClearAt"
},

8
packages/nextcloud/test/notifications.dart

@ -51,9 +51,9 @@ Future run(final DockerImage image) async {
expect(response.ocs.data[0].message, '456');
expect(response.ocs.data[0].link, '');
expect(response.ocs.data[0].subjectRich, '');
expect(response.ocs.data[0].subjectRichParameters.mapStringDynamic, null);
expect(response.ocs.data[0].subjectRichParameters, isEmpty);
expect(response.ocs.data[0].messageRich, '');
expect(response.ocs.data[0].messageRichParameters.mapStringDynamic, null);
expect(response.ocs.data[0].messageRichParameters, isEmpty);
expect(response.ocs.data[0].icon, isNotEmpty);
expect(response.ocs.data[0].actions, hasLength(0));
});
@ -73,9 +73,9 @@ Future run(final DockerImage image) async {
expect(response.ocs.data.message, '456');
expect(response.ocs.data.link, '');
expect(response.ocs.data.subjectRich, '');
expect(response.ocs.data.subjectRichParameters.mapStringDynamic, null);
expect(response.ocs.data.subjectRichParameters, isEmpty);
expect(response.ocs.data.messageRich, '');
expect(response.ocs.data.messageRichParameters.mapStringDynamic, null);
expect(response.ocs.data.messageRichParameters, isEmpty);
expect(response.ocs.data.icon, isNotEmpty);
expect(response.ocs.data.actions, hasLength(0));
});

33
packages/nextcloud/test/user_status.dart

@ -28,25 +28,24 @@ Future run(final DockerImage image) async {
expect(status.message, isNotNull);
}
final meeting = response.ocs.data.singleWhere((final s) => s.id == 'meeting').clearAt.userStatusClearAt!;
final meeting = response.ocs.data.singleWhere((final s) => s.id == 'meeting').clearAt!.userStatusClearAt!;
expect(meeting.type, NextcloudUserStatusClearAt_Type.period);
expect(meeting.time.$int, 3600);
final commuting = response.ocs.data.singleWhere((final s) => s.id == 'commuting').clearAt.userStatusClearAt!;
final commuting = response.ocs.data.singleWhere((final s) => s.id == 'commuting').clearAt!.userStatusClearAt!;
expect(commuting.type, NextcloudUserStatusClearAt_Type.period);
expect(commuting.time.$int, 1800);
final remoteWork = response.ocs.data.singleWhere((final s) => s.id == 'remote-work').clearAt.userStatusClearAt!;
final remoteWork = response.ocs.data.singleWhere((final s) => s.id == 'remote-work').clearAt!.userStatusClearAt!;
expect(remoteWork.type, NextcloudUserStatusClearAt_Type.endOf);
expect(remoteWork.time.userStatusClearAtTime0, NextcloudUserStatusClearAt_Time0.day);
final sickLeave = response.ocs.data.singleWhere((final s) => s.id == 'sick-leave').clearAt.userStatusClearAt!;
final sickLeave = response.ocs.data.singleWhere((final s) => s.id == 'sick-leave').clearAt!.userStatusClearAt!;
expect(sickLeave.type, NextcloudUserStatusClearAt_Type.endOf);
expect(sickLeave.time.userStatusClearAtTime0, NextcloudUserStatusClearAt_Time0.day);
final vacationing = response.ocs.data.singleWhere((final s) => s.id == 'vacationing').clearAt;
expect(vacationing.userStatusClearAt, null);
expect(vacationing.$int, null);
expect(vacationing, null);
});
test('Set status', () async {
@ -57,8 +56,7 @@ Future run(final DockerImage image) async {
expect(response.ocs.data.userStatusStatus!.messageId, null);
expect(response.ocs.data.userStatusStatus!.messageIsPredefined, false);
expect(response.ocs.data.userStatusStatus!.icon, null);
expect(response.ocs.data.userStatusStatus!.clearAt.userStatusClearAt, null);
expect(response.ocs.data.userStatusStatus!.clearAt.$int, null);
expect(response.ocs.data.userStatusStatus!.clearAt, null);
expect(response.ocs.data.userStatusStatus!.status, NextcloudUserStatusType.online);
expect(response.ocs.data.userStatusStatus!.statusIsUserDefined, true);
});
@ -74,8 +72,7 @@ Future run(final DockerImage image) async {
expect(response.ocs.data.userStatusStatus!.messageId, null);
expect(response.ocs.data.userStatusStatus!.messageIsPredefined, false);
expect(response.ocs.data.userStatusStatus!.icon, null);
expect(response.ocs.data.userStatusStatus!.clearAt.userStatusClearAt, null);
expect(response.ocs.data.userStatusStatus!.clearAt.$int, null);
expect(response.ocs.data.userStatusStatus!.clearAt, null);
expect(response.ocs.data.userStatusStatus!.status, NextcloudUserStatusType.online);
expect(response.ocs.data.userStatusStatus!.statusIsUserDefined, true);
});
@ -91,8 +88,7 @@ Future run(final DockerImage image) async {
expect(response.ocs.data[0].userId, 'user1');
expect(response.ocs.data[0].message, null);
expect(response.ocs.data[0].icon, null);
expect(response.ocs.data[0].clearAt.userStatusClearAt, null);
expect(response.ocs.data[0].clearAt.$int, null);
expect(response.ocs.data[0].clearAt, null);
expect(response.ocs.data[0].status, NextcloudUserStatusType.online);
});
@ -104,8 +100,7 @@ Future run(final DockerImage image) async {
expect(response.ocs.data.userStatusPublicStatus!.userId, 'user1');
expect(response.ocs.data.userStatusPublicStatus!.message, null);
expect(response.ocs.data.userStatusPublicStatus!.icon, null);
expect(response.ocs.data.userStatusPublicStatus!.clearAt.userStatusClearAt, null);
expect(response.ocs.data.userStatusPublicStatus!.clearAt.$int, null);
expect(response.ocs.data.userStatusPublicStatus!.clearAt, null);
expect(response.ocs.data.userStatusPublicStatus!.status, NextcloudUserStatusType.online);
});
@ -120,7 +115,7 @@ Future run(final DockerImage image) async {
expect(response.ocs.data.userStatusStatus!.messageId, 'meeting');
expect(response.ocs.data.userStatusStatus!.messageIsPredefined, true);
expect(response.ocs.data.userStatusStatus!.icon, null);
expect(response.ocs.data.userStatusStatus!.clearAt.$int, clearAt);
expect(response.ocs.data.userStatusStatus!.clearAt!.$int, clearAt);
expect(response.ocs.data.userStatusStatus!.status, NextcloudUserStatusType.offline);
expect(response.ocs.data.userStatusStatus!.statusIsUserDefined, false);
});
@ -137,7 +132,7 @@ Future run(final DockerImage image) async {
expect(response.ocs.data.userStatusStatus!.messageId, null);
expect(response.ocs.data.userStatusStatus!.messageIsPredefined, false);
expect(response.ocs.data.userStatusStatus!.icon, '😀');
expect(response.ocs.data.userStatusStatus!.clearAt.$int, clearAt);
expect(response.ocs.data.userStatusStatus!.clearAt!.$int, clearAt);
expect(response.ocs.data.userStatusStatus!.status, NextcloudUserStatusType.offline);
expect(response.ocs.data.userStatusStatus!.statusIsUserDefined, false);
});
@ -157,8 +152,7 @@ Future run(final DockerImage image) async {
expect(response.ocs.data.userStatusStatus!.messageId, null);
expect(response.ocs.data.userStatusStatus!.messageIsPredefined, false);
expect(response.ocs.data.userStatusStatus!.icon, null);
expect(response.ocs.data.userStatusStatus!.clearAt.userStatusClearAt, null);
expect(response.ocs.data.userStatusStatus!.clearAt.$int, null);
expect(response.ocs.data.userStatusStatus!.clearAt, null);
expect(response.ocs.data.userStatusStatus!.status, NextcloudUserStatusType.offline);
expect(response.ocs.data.userStatusStatus!.statusIsUserDefined, false);
});
@ -170,8 +164,7 @@ Future run(final DockerImage image) async {
expect(response.ocs.data.messageId, null);
expect(response.ocs.data.messageIsPredefined, false);
expect(response.ocs.data.icon, null);
expect(response.ocs.data.clearAt.userStatusClearAt, null);
expect(response.ocs.data.clearAt.$int, null);
expect(response.ocs.data.clearAt, null);
expect(response.ocs.data.status, NextcloudUserStatusType.online);
expect(response.ocs.data.statusIsUserDefined, false);
});

8
specs/core.json

@ -942,7 +942,13 @@
"type": "string"
},
"status": {
"anyOf": [
"oneOf": [
{
"type": "array",
"items": {
"type": "object"
}
},
{
"type": "string"
}

14
specs/notifications.json

@ -128,23 +128,13 @@
"type": "string"
},
"subjectRichParameters": {
"anyOf": [
{
"type": "object",
"properties": {}
}
]
"type": "object"
},
"messageRich": {
"type": "string"
},
"messageRichParameters": {
"anyOf": [
{
"type": "object",
"properties": {}
}
]
"type": "object"
},
"icon": {
"type": "string"

2
specs/uppush.json

@ -442,4 +442,4 @@
}
],
"tags": []
}
}

27
specs/user_status.json

@ -108,8 +108,7 @@
"required": [
"id",
"icon",
"message",
"clearAt"
"message"
],
"properties": {
"id": {
@ -122,7 +121,7 @@
"type": "string"
},
"clearAt": {
"anyOf": [
"oneOf": [
{
"$ref": "#/components/schemas/ClearAt"
},
@ -192,7 +191,13 @@
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"anyOf": [
"oneOf": [
{
"type": "array",
"items": {
"type": "object"
}
},
{
"$ref": "#/components/schemas/Status"
}
@ -245,7 +250,13 @@
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"anyOf": [
"oneOf": [
{
"type": "array",
"items": {
"type": "object"
}
},
{
"$ref": "#/components/schemas/PublicStatus"
}
@ -260,7 +271,6 @@
"required": [
"userId",
"messageIsPredefined",
"clearAt",
"status",
"statusIsUserDefined"
],
@ -281,7 +291,7 @@
"type": "string"
},
"clearAt": {
"anyOf": [
"oneOf": [
{
"$ref": "#/components/schemas/ClearAt"
},
@ -303,7 +313,6 @@
"type": "object",
"required": [
"userId",
"clearAt",
"status"
],
"properties": {
@ -317,7 +326,7 @@
"type": "string"
},
"clearAt": {
"anyOf": [
"oneOf": [
{
"$ref": "#/components/schemas/ClearAt"
},

Loading…
Cancel
Save