@iveri/contracts 0.54.0 → 0.60.0

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.
Files changed (139) hide show
  1. package/dist/api/gym/gym-booking-refusal.enum.d.ts +14 -0
  2. package/dist/api/gym/gym-booking-refusal.enum.js +15 -0
  3. package/dist/api/gym/gym-booking-status.enum.d.ts +9 -0
  4. package/dist/api/gym/gym-booking-status.enum.js +10 -0
  5. package/dist/api/gym/gym-branch.type.d.ts +47 -0
  6. package/dist/api/gym/gym-branch.type.js +1 -0
  7. package/dist/api/gym/gym-busy-level.enum.d.ts +5 -0
  8. package/dist/api/gym/gym-busy-level.enum.js +6 -0
  9. package/dist/api/gym/gym-check-in-outcome.enum.d.ts +6 -0
  10. package/dist/api/gym/gym-check-in-outcome.enum.js +7 -0
  11. package/dist/api/gym/gym-check-in-refusal.enum.d.ts +12 -0
  12. package/dist/api/gym/gym-check-in-refusal.enum.js +13 -0
  13. package/dist/api/gym/gym-class-access.enum.d.ts +6 -0
  14. package/dist/api/gym/gym-class-access.enum.js +7 -0
  15. package/dist/api/gym/gym-class-level.enum.d.ts +6 -0
  16. package/dist/api/gym/gym-class-level.enum.js +7 -0
  17. package/dist/api/gym/gym-class-type.type.d.ts +35 -0
  18. package/dist/api/gym/gym-class-type.type.js +1 -0
  19. package/dist/api/gym/gym-common.type.d.ts +14 -0
  20. package/dist/api/gym/gym-common.type.js +1 -0
  21. package/dist/api/gym/gym-door.type.d.ts +65 -0
  22. package/dist/api/gym/gym-door.type.js +1 -0
  23. package/dist/api/gym/gym-duration-unit.enum.d.ts +4 -0
  24. package/dist/api/gym/gym-duration-unit.enum.js +5 -0
  25. package/dist/api/gym/gym-entry-kind.enum.d.ts +6 -0
  26. package/dist/api/gym/gym-entry-kind.enum.js +7 -0
  27. package/dist/api/gym/gym-equipment.enum.d.ts +11 -0
  28. package/dist/api/gym/gym-equipment.enum.js +12 -0
  29. package/dist/api/gym/gym-exercise-category.enum.d.ts +5 -0
  30. package/dist/api/gym/gym-exercise-category.enum.js +6 -0
  31. package/dist/api/gym/gym-exercise-measure.enum.d.ts +7 -0
  32. package/dist/api/gym/gym-exercise-measure.enum.js +8 -0
  33. package/dist/api/gym/gym-gallery.type.d.ts +17 -0
  34. package/dist/api/gym/gym-gallery.type.js +1 -0
  35. package/dist/api/gym/gym-lead-kind.enum.d.ts +5 -0
  36. package/dist/api/gym/gym-lead-kind.enum.js +6 -0
  37. package/dist/api/gym/gym-lead-status.enum.d.ts +7 -0
  38. package/dist/api/gym/gym-lead-status.enum.js +8 -0
  39. package/dist/api/gym/gym-lead.type.d.ts +32 -0
  40. package/dist/api/gym/gym-lead.type.js +1 -0
  41. package/dist/api/gym/gym-me.type.d.ts +115 -0
  42. package/dist/api/gym/gym-me.type.js +1 -0
  43. package/dist/api/gym/gym-member.type.d.ts +55 -0
  44. package/dist/api/gym/gym-member.type.js +1 -0
  45. package/dist/api/gym/gym-membership-status.enum.d.ts +14 -0
  46. package/dist/api/gym/gym-membership-status.enum.js +15 -0
  47. package/dist/api/gym/gym-membership.type.d.ts +93 -0
  48. package/dist/api/gym/gym-membership.type.js +1 -0
  49. package/dist/api/gym/gym-muscle-group.enum.d.ts +13 -0
  50. package/dist/api/gym/gym-muscle-group.enum.js +14 -0
  51. package/dist/api/gym/gym-payment-kind.enum.d.ts +4 -0
  52. package/dist/api/gym/gym-payment-kind.enum.js +5 -0
  53. package/dist/api/gym/gym-payment-method.enum.d.ts +6 -0
  54. package/dist/api/gym/gym-payment-method.enum.js +7 -0
  55. package/dist/api/gym/gym-payment.type.d.ts +59 -0
  56. package/dist/api/gym/gym-payment.type.js +1 -0
  57. package/dist/api/gym/gym-plan-activation.enum.d.ts +5 -0
  58. package/dist/api/gym/gym-plan-activation.enum.js +6 -0
  59. package/dist/api/gym/gym-plan.type.d.ts +72 -0
  60. package/dist/api/gym/gym-plan.type.js +1 -0
  61. package/dist/api/gym/gym-profile.type.d.ts +65 -0
  62. package/dist/api/gym/gym-profile.type.js +1 -0
  63. package/dist/api/gym/gym-promo-code.type.d.ts +33 -0
  64. package/dist/api/gym/gym-promo-code.type.js +1 -0
  65. package/dist/api/gym/gym-public.type.d.ts +114 -0
  66. package/dist/api/gym/gym-public.type.js +1 -0
  67. package/dist/api/gym/gym-record-kind.enum.d.ts +7 -0
  68. package/dist/api/gym/gym-record-kind.enum.js +8 -0
  69. package/dist/api/gym/gym-report.type.d.ts +73 -0
  70. package/dist/api/gym/gym-report.type.js +1 -0
  71. package/dist/api/gym/gym-resource-status.enum.d.ts +5 -0
  72. package/dist/api/gym/gym-resource-status.enum.js +6 -0
  73. package/dist/api/gym/gym-room.type.d.ts +27 -0
  74. package/dist/api/gym/gym-room.type.js +1 -0
  75. package/dist/api/gym/gym-schedule.type.d.ts +122 -0
  76. package/dist/api/gym/gym-schedule.type.js +1 -0
  77. package/dist/api/gym/gym-session-kind.enum.d.ts +4 -0
  78. package/dist/api/gym/gym-session-kind.enum.js +5 -0
  79. package/dist/api/gym/gym-session-status.enum.d.ts +4 -0
  80. package/dist/api/gym/gym-session-status.enum.js +5 -0
  81. package/dist/api/gym/gym-signature-method.enum.d.ts +4 -0
  82. package/dist/api/gym/gym-signature-method.enum.js +5 -0
  83. package/dist/api/gym/gym-staff.type.d.ts +46 -0
  84. package/dist/api/gym/gym-staff.type.js +1 -0
  85. package/dist/api/gym/gym-training.type.d.ts +179 -0
  86. package/dist/api/gym/gym-training.type.js +1 -0
  87. package/dist/api/gym/gym-waiver.type.d.ts +32 -0
  88. package/dist/api/gym/gym-waiver.type.js +1 -0
  89. package/dist/api/gym/index.d.ts +44 -0
  90. package/dist/api/gym/index.js +44 -0
  91. package/dist/api/realtime/realtime-event-type.enum.d.ts +7 -1
  92. package/dist/api/realtime/realtime-event-type.enum.js +6 -0
  93. package/dist/api/realtime/realtime-resource-type.enum.d.ts +7 -1
  94. package/dist/api/realtime/realtime-resource-type.enum.js +6 -0
  95. package/dist/api/social/index.d.ts +20 -0
  96. package/dist/api/social/index.js +20 -0
  97. package/dist/api/social/social-account.type.d.ts +24 -0
  98. package/dist/api/social/social-account.type.js +1 -0
  99. package/dist/api/social/social-activity-kind.enum.d.ts +13 -0
  100. package/dist/api/social/social-activity-kind.enum.js +14 -0
  101. package/dist/api/social/social-activity.type.d.ts +26 -0
  102. package/dist/api/social/social-activity.type.js +1 -0
  103. package/dist/api/social/social-appeal-status.enum.d.ts +7 -0
  104. package/dist/api/social/social-appeal-status.enum.js +8 -0
  105. package/dist/api/social/social-case-decision.enum.d.ts +13 -0
  106. package/dist/api/social/social-case-decision.enum.js +14 -0
  107. package/dist/api/social/social-case-status.enum.d.ts +4 -0
  108. package/dist/api/social/social-case-status.enum.js +5 -0
  109. package/dist/api/social/social-conversation.type.d.ts +45 -0
  110. package/dist/api/social/social-conversation.type.js +1 -0
  111. package/dist/api/social/social-export-status.enum.d.ts +6 -0
  112. package/dist/api/social/social-export-status.enum.js +7 -0
  113. package/dist/api/social/social-follow-state.enum.d.ts +7 -0
  114. package/dist/api/social/social-follow-state.enum.js +8 -0
  115. package/dist/api/social/social-image.type.d.ts +28 -0
  116. package/dist/api/social/social-image.type.js +1 -0
  117. package/dist/api/social/social-limits.constant.d.ts +23 -0
  118. package/dist/api/social/social-limits.constant.js +23 -0
  119. package/dist/api/social/social-member-status.enum.d.ts +12 -0
  120. package/dist/api/social/social-member-status.enum.js +13 -0
  121. package/dist/api/social/social-member.type.d.ts +79 -0
  122. package/dist/api/social/social-member.type.js +1 -0
  123. package/dist/api/social/social-moderation-reason.enum.d.ts +13 -0
  124. package/dist/api/social/social-moderation-reason.enum.js +14 -0
  125. package/dist/api/social/social-moderation.type.d.ts +166 -0
  126. package/dist/api/social/social-moderation.type.js +1 -0
  127. package/dist/api/social/social-post.type.d.ts +58 -0
  128. package/dist/api/social/social-post.type.js +1 -0
  129. package/dist/api/social/social-refusal.enum.d.ts +37 -0
  130. package/dist/api/social/social-refusal.enum.js +38 -0
  131. package/dist/api/social/social-report-reason.enum.d.ts +18 -0
  132. package/dist/api/social/social-report-reason.enum.js +19 -0
  133. package/dist/api/social/social-report-target.enum.d.ts +8 -0
  134. package/dist/api/social/social-report-target.enum.js +9 -0
  135. package/dist/api/social/social-story.type.d.ts +30 -0
  136. package/dist/api/social/social-story.type.js +1 -0
  137. package/dist/enum/user-permission.enum.d.ts +53 -1
  138. package/dist/enum/user-permission.enum.js +52 -0
  139. package/package.json +9 -1
@@ -0,0 +1,166 @@
1
+ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
+ import type { Nullable } from '../../type/nil.type.js';
3
+ import type { UUID } from '../../type/uuid.type.js';
4
+ import type { SocialAppealStatus } from './social-appeal-status.enum.js';
5
+ import type { SocialCaseDecision } from './social-case-decision.enum.js';
6
+ import type { SocialCaseStatus } from './social-case-status.enum.js';
7
+ import type { SocialMemberStatus } from './social-member-status.enum.js';
8
+ import type { SocialMemberCard } from './social-member.type.js';
9
+ import type { SocialModerationReason } from './social-moderation-reason.enum.js';
10
+ import type { SocialReportReason } from './social-report-reason.enum.js';
11
+ import type { SocialReportTarget } from './social-report-target.enum.js';
12
+ export interface CreateSocialReportRequest {
13
+ targetType: SocialReportTarget;
14
+ targetId: UUID;
15
+ reason: SocialReportReason;
16
+ detail?: Nullable<string>;
17
+ }
18
+ /** A decision, as the member it was about reads it. */
19
+ export interface SocialNotice {
20
+ id: UUID;
21
+ decision: SocialCaseDecision;
22
+ reason: SocialModerationReason;
23
+ targetType: SocialReportTarget;
24
+ excerpt: Nullable<string>;
25
+ decidedAt: IsoDateTime;
26
+ suspendedUntil: Nullable<IsoDateTime>;
27
+ canAppeal: boolean;
28
+ appealStatus: Nullable<SocialAppealStatus>;
29
+ appealAnsweredAt: Nullable<IsoDateTime>;
30
+ }
31
+ export interface CreateSocialAppealRequest {
32
+ statement: string;
33
+ }
34
+ /** What was reported, frozen when the case opened. */
35
+ export interface SocialCaseEvidence {
36
+ text: Nullable<string>;
37
+ imageUrls: string[];
38
+ /** For a reported message, what came just before it, oldest first. */
39
+ context: SocialCaseMessageContext[];
40
+ createdAt: Nullable<IsoDateTime>;
41
+ }
42
+ export interface SocialCaseMessageContext {
43
+ senderHandle: Nullable<string>;
44
+ body: Nullable<string>;
45
+ sentAt: IsoDateTime;
46
+ }
47
+ export interface SocialCaseSummary {
48
+ id: UUID;
49
+ targetType: SocialReportTarget;
50
+ targetId: UUID;
51
+ status: SocialCaseStatus;
52
+ subject: Nullable<SocialMemberCard>;
53
+ excerpt: Nullable<string>;
54
+ topReason: SocialReportReason;
55
+ reportCount: number;
56
+ isUrgent: boolean;
57
+ claimedByMe: boolean;
58
+ claimedUntil: Nullable<IsoDateTime>;
59
+ openedAt: IsoDateTime;
60
+ lastReportedAt: IsoDateTime;
61
+ decision: Nullable<SocialCaseDecision>;
62
+ }
63
+ export interface SocialCaseReport {
64
+ id: UUID;
65
+ reporter: Nullable<SocialMemberCard>;
66
+ reason: SocialReportReason;
67
+ detail: Nullable<string>;
68
+ createdAt: IsoDateTime;
69
+ }
70
+ export interface SocialCaseAction {
71
+ id: UUID;
72
+ decision: SocialCaseDecision;
73
+ reason: SocialModerationReason;
74
+ note: Nullable<string>;
75
+ moderatorUserId: UUID;
76
+ suspendedUntil: Nullable<IsoDateTime>;
77
+ createdAt: IsoDateTime;
78
+ }
79
+ export interface SocialCaseDetail extends SocialCaseSummary {
80
+ evidence: SocialCaseEvidence;
81
+ reports: SocialCaseReport[];
82
+ actions: SocialCaseAction[];
83
+ subjectRecord: Nullable<SocialStaffMember>;
84
+ }
85
+ export interface DecideSocialCaseRequest {
86
+ decision: SocialCaseDecision;
87
+ reason: SocialModerationReason;
88
+ /** Staff only. The member is told the reason, never this. */
89
+ note?: Nullable<string>;
90
+ suspendDays?: Nullable<number>;
91
+ }
92
+ /** A member as staff see them. */
93
+ export interface SocialStaffMember extends SocialMemberCard {
94
+ status: SocialMemberStatus;
95
+ suspendedUntil: Nullable<IsoDateTime>;
96
+ isMinor: boolean;
97
+ bio: Nullable<string>;
98
+ followerCount: number;
99
+ followingCount: number;
100
+ postCount: number;
101
+ warningCount: number;
102
+ suspensionCount: number;
103
+ reportCount: number;
104
+ joinedAt: IsoDateTime;
105
+ }
106
+ export interface SocialStaffMemberDetail extends SocialStaffMember {
107
+ notices: SocialStaffNotice[];
108
+ }
109
+ export interface SocialStaffNotice extends SocialNotice {
110
+ caseId: UUID;
111
+ moderatorUserId: UUID;
112
+ note: Nullable<string>;
113
+ }
114
+ export interface SanctionSocialMemberRequest {
115
+ decision: SocialCaseDecision.SUSPEND | SocialCaseDecision.BAN;
116
+ reason: SocialModerationReason;
117
+ note?: Nullable<string>;
118
+ suspendDays?: Nullable<number>;
119
+ }
120
+ export interface SocialStaffAppeal {
121
+ id: UUID;
122
+ status: SocialAppealStatus;
123
+ statement: string;
124
+ member: Nullable<SocialMemberCard>;
125
+ notice: SocialStaffNotice;
126
+ /** The moderator who made the decision cannot answer this appeal. */
127
+ canDecide: boolean;
128
+ createdAt: IsoDateTime;
129
+ answeredAt: Nullable<IsoDateTime>;
130
+ answerNote: Nullable<string>;
131
+ }
132
+ export interface DecideSocialAppealRequest {
133
+ status: SocialAppealStatus.UPHELD | SocialAppealStatus.REVERSED;
134
+ note?: Nullable<string>;
135
+ }
136
+ export interface SocialModerationOverview {
137
+ openCases: number;
138
+ urgentCases: number;
139
+ pendingAppeals: number;
140
+ oldestOpenAt: Nullable<IsoDateTime>;
141
+ resolvedLast7Days: number;
142
+ reportsLast7Days: number;
143
+ membersTotal: number;
144
+ membersLast7Days: number;
145
+ postsLast7Days: number;
146
+ restrictedMembers: number;
147
+ reportsByReason: SocialReasonCount[];
148
+ reportsByDay: SocialDayCount[];
149
+ }
150
+ export interface SocialReasonCount {
151
+ reason: SocialReportReason;
152
+ count: number;
153
+ }
154
+ export interface SocialDayCount {
155
+ day: string;
156
+ count: number;
157
+ }
158
+ /** One line of the record of what staff looked at and did. */
159
+ export interface SocialStaffAuditEntry {
160
+ id: UUID;
161
+ staffUserId: UUID;
162
+ action: string;
163
+ caseId: Nullable<UUID>;
164
+ memberId: Nullable<UUID>;
165
+ createdAt: IsoDateTime;
166
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,58 @@
1
+ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
+ import type { Nullable } from '../../type/nil.type.js';
3
+ import type { UUID } from '../../type/uuid.type.js';
4
+ import type { SocialImage } from './social-image.type.js';
5
+ import type { SocialMemberCard } from './social-member.type.js';
6
+ export interface SocialPost {
7
+ id: UUID;
8
+ author: SocialMemberCard;
9
+ caption: Nullable<string>;
10
+ images: SocialImage[];
11
+ commentsDisabled: boolean;
12
+ likeCount: number;
13
+ commentCount: number;
14
+ viewerLiked: boolean;
15
+ viewerSaved: boolean;
16
+ isOwn: boolean;
17
+ createdAt: IsoDateTime;
18
+ editedAt: Nullable<IsoDateTime>;
19
+ }
20
+ export interface CreateSocialPostMedia {
21
+ id: UUID;
22
+ altText?: Nullable<string>;
23
+ }
24
+ export interface CreateSocialPostRequest {
25
+ caption?: Nullable<string>;
26
+ media?: CreateSocialPostMedia[];
27
+ commentsDisabled?: boolean;
28
+ }
29
+ export interface UpdateSocialPostRequest {
30
+ caption?: Nullable<string>;
31
+ commentsDisabled?: boolean;
32
+ }
33
+ export interface SocialComment {
34
+ id: UUID;
35
+ postId: UUID;
36
+ parentId: Nullable<UUID>;
37
+ author: SocialMemberCard;
38
+ body: string;
39
+ likeCount: number;
40
+ replyCount: number;
41
+ viewerLiked: boolean;
42
+ isOwn: boolean;
43
+ /** The commenter and the post's author may both delete it. */
44
+ canDelete: boolean;
45
+ createdAt: IsoDateTime;
46
+ }
47
+ export interface CreateSocialCommentRequest {
48
+ body: string;
49
+ parentId?: Nullable<UUID>;
50
+ }
51
+ export interface SocialTag {
52
+ name: string;
53
+ postCount: number;
54
+ }
55
+ export interface SocialSearchResults {
56
+ members: SocialMemberCard[];
57
+ tags: SocialTag[];
58
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Why `social-api` refused something a member can do something about.
3
+ *
4
+ * Sent as `error.details.reason`. A site that shows Georgian to a Georgian reader cannot print the
5
+ * API's English sentence at them, so each of these is a key the site translates. The English
6
+ * `message` remains for a log line and for anything that does not know this list.
7
+ */
8
+ export declare enum SocialRefusal {
9
+ PROFILE_MISSING = "profile-missing",
10
+ PROFILE_EXISTS = "profile-exists",
11
+ HANDLE_TAKEN = "handle-taken",
12
+ HANDLE_RESERVED = "handle-reserved",
13
+ HANDLE_CHANGED_RECENTLY = "handle-changed-recently",
14
+ TOO_YOUNG = "too-young",
15
+ TERMS_OUTDATED = "terms-outdated",
16
+ SUSPENDED = "suspended",
17
+ BANNED = "banned",
18
+ DELETING = "deleting",
19
+ RATE_LIMITED = "rate-limited",
20
+ IMAGE_UNREADABLE = "image-unreadable",
21
+ IMAGE_TOO_LARGE = "image-too-large",
22
+ MEDIA_UNAVAILABLE = "media-unavailable",
23
+ POST_EMPTY = "post-empty",
24
+ COMMENTS_DISABLED = "comments-disabled",
25
+ CANNOT_FOLLOW_SELF = "cannot-follow-self",
26
+ CANNOT_MESSAGE = "cannot-message",
27
+ MESSAGE_EMPTY = "message-empty",
28
+ ALREADY_REPORTED = "already-reported",
29
+ ALREADY_APPEALED = "already-appealed",
30
+ APPEAL_NOT_ALLOWED = "appeal-not-allowed",
31
+ EXPORT_TOO_SOON = "export-too-soon",
32
+ EMAIL_RESEND_TOO_SOON = "email-resend-too-soon",
33
+ CONFIRMATION_INVALID = "confirmation-invalid",
34
+ CASE_CLAIMED = "case-claimed",
35
+ CASE_RESOLVED = "case-resolved",
36
+ APPEAL_OWN_DECISION = "appeal-own-decision"
37
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Why `social-api` refused something a member can do something about.
3
+ *
4
+ * Sent as `error.details.reason`. A site that shows Georgian to a Georgian reader cannot print the
5
+ * API's English sentence at them, so each of these is a key the site translates. The English
6
+ * `message` remains for a log line and for anything that does not know this list.
7
+ */
8
+ export var SocialRefusal;
9
+ (function (SocialRefusal) {
10
+ SocialRefusal["PROFILE_MISSING"] = "profile-missing";
11
+ SocialRefusal["PROFILE_EXISTS"] = "profile-exists";
12
+ SocialRefusal["HANDLE_TAKEN"] = "handle-taken";
13
+ SocialRefusal["HANDLE_RESERVED"] = "handle-reserved";
14
+ SocialRefusal["HANDLE_CHANGED_RECENTLY"] = "handle-changed-recently";
15
+ SocialRefusal["TOO_YOUNG"] = "too-young";
16
+ SocialRefusal["TERMS_OUTDATED"] = "terms-outdated";
17
+ SocialRefusal["SUSPENDED"] = "suspended";
18
+ SocialRefusal["BANNED"] = "banned";
19
+ SocialRefusal["DELETING"] = "deleting";
20
+ SocialRefusal["RATE_LIMITED"] = "rate-limited";
21
+ SocialRefusal["IMAGE_UNREADABLE"] = "image-unreadable";
22
+ SocialRefusal["IMAGE_TOO_LARGE"] = "image-too-large";
23
+ SocialRefusal["MEDIA_UNAVAILABLE"] = "media-unavailable";
24
+ SocialRefusal["POST_EMPTY"] = "post-empty";
25
+ SocialRefusal["COMMENTS_DISABLED"] = "comments-disabled";
26
+ SocialRefusal["CANNOT_FOLLOW_SELF"] = "cannot-follow-self";
27
+ SocialRefusal["CANNOT_MESSAGE"] = "cannot-message";
28
+ SocialRefusal["MESSAGE_EMPTY"] = "message-empty";
29
+ SocialRefusal["ALREADY_REPORTED"] = "already-reported";
30
+ SocialRefusal["ALREADY_APPEALED"] = "already-appealed";
31
+ SocialRefusal["APPEAL_NOT_ALLOWED"] = "appeal-not-allowed";
32
+ SocialRefusal["EXPORT_TOO_SOON"] = "export-too-soon";
33
+ SocialRefusal["EMAIL_RESEND_TOO_SOON"] = "email-resend-too-soon";
34
+ SocialRefusal["CONFIRMATION_INVALID"] = "confirmation-invalid";
35
+ SocialRefusal["CASE_CLAIMED"] = "case-claimed";
36
+ SocialRefusal["CASE_RESOLVED"] = "case-resolved";
37
+ SocialRefusal["APPEAL_OWN_DECISION"] = "appeal-own-decision";
38
+ })(SocialRefusal || (SocialRefusal = {}));
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Why a member reported something.
3
+ *
4
+ * `child-safety` is the one that changes what happens: the content is hidden at once and the case
5
+ * goes to the top of the queue, before anybody has looked at it.
6
+ */
7
+ export declare enum SocialReportReason {
8
+ SPAM = "spam",
9
+ HARASSMENT = "harassment",
10
+ HATE = "hate",
11
+ VIOLENCE = "violence",
12
+ NUDITY = "nudity",
13
+ CHILD_SAFETY = "child-safety",
14
+ SELF_HARM = "self-harm",
15
+ IMPERSONATION = "impersonation",
16
+ ILLEGAL = "illegal",
17
+ OTHER = "other"
18
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Why a member reported something.
3
+ *
4
+ * `child-safety` is the one that changes what happens: the content is hidden at once and the case
5
+ * goes to the top of the queue, before anybody has looked at it.
6
+ */
7
+ export var SocialReportReason;
8
+ (function (SocialReportReason) {
9
+ SocialReportReason["SPAM"] = "spam";
10
+ SocialReportReason["HARASSMENT"] = "harassment";
11
+ SocialReportReason["HATE"] = "hate";
12
+ SocialReportReason["VIOLENCE"] = "violence";
13
+ SocialReportReason["NUDITY"] = "nudity";
14
+ SocialReportReason["CHILD_SAFETY"] = "child-safety";
15
+ SocialReportReason["SELF_HARM"] = "self-harm";
16
+ SocialReportReason["IMPERSONATION"] = "impersonation";
17
+ SocialReportReason["ILLEGAL"] = "illegal";
18
+ SocialReportReason["OTHER"] = "other";
19
+ })(SocialReportReason || (SocialReportReason = {}));
@@ -0,0 +1,8 @@
1
+ /** The kinds of thing a member can report. */
2
+ export declare enum SocialReportTarget {
3
+ POST = "post",
4
+ COMMENT = "comment",
5
+ STORY = "story",
6
+ MEMBER = "member",
7
+ MESSAGE = "message"
8
+ }
@@ -0,0 +1,9 @@
1
+ /** The kinds of thing a member can report. */
2
+ export var SocialReportTarget;
3
+ (function (SocialReportTarget) {
4
+ SocialReportTarget["POST"] = "post";
5
+ SocialReportTarget["COMMENT"] = "comment";
6
+ SocialReportTarget["STORY"] = "story";
7
+ SocialReportTarget["MEMBER"] = "member";
8
+ SocialReportTarget["MESSAGE"] = "message";
9
+ })(SocialReportTarget || (SocialReportTarget = {}));
@@ -0,0 +1,30 @@
1
+ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
+ import type { Nullable } from '../../type/nil.type.js';
3
+ import type { UUID } from '../../type/uuid.type.js';
4
+ import type { SocialImage } from './social-image.type.js';
5
+ import type { SocialMemberCard } from './social-member.type.js';
6
+ export interface SocialStory {
7
+ id: UUID;
8
+ image: SocialImage;
9
+ caption: Nullable<string>;
10
+ createdAt: IsoDateTime;
11
+ expiresAt: IsoDateTime;
12
+ viewerSeen: boolean;
13
+ /** Only the author is told. */
14
+ viewCount: Nullable<number>;
15
+ }
16
+ /** Everything one person has up today. */
17
+ export interface SocialStoryReel {
18
+ author: SocialMemberCard;
19
+ stories: SocialStory[];
20
+ hasUnseen: boolean;
21
+ }
22
+ export interface CreateSocialStoryRequest {
23
+ mediaId: UUID;
24
+ caption?: Nullable<string>;
25
+ altText?: Nullable<string>;
26
+ }
27
+ export interface SocialStoryViewer {
28
+ member: SocialMemberCard;
29
+ viewedAt: IsoDateTime;
30
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -499,6 +499,18 @@ export declare enum UserPermission {
499
499
  RESTAURANT_MARKETING_MANAGE = "restaurant:marketing:manage",
500
500
  /** See sales reports. */
501
501
  RESTAURANT_REPORT_READ = "restaurant:report:read",
502
+ /** See Ezo's moderation queue, what was reported and the appeals against decisions. */
503
+ SOCIAL_MODERATION_READ = "social:moderation:read",
504
+ /** Decide a case: dismiss it, remove the content, warn, suspend or ban. */
505
+ SOCIAL_MODERATION_DECIDE = "social:moderation:decide",
506
+ /** Answer an appeal. Never against your own decision, which the service refuses. */
507
+ SOCIAL_APPEAL_DECIDE = "social:appeal:decide",
508
+ /** Look up members and their records. */
509
+ SOCIAL_MEMBER_READ = "social:member:read",
510
+ /** Suspend, ban or reinstate a member without a report behind it. */
511
+ SOCIAL_MEMBER_SANCTION = "social:member:sanction",
512
+ /** Read the record of what staff looked at and did. */
513
+ SOCIAL_AUDIT_READ = "social:audit:read",
502
514
  /** Read a company's HR settings, locations, departments and job titles. */
503
515
  HR_ORG_READ = "hr:org:read",
504
516
  /** Change them. */
@@ -544,7 +556,47 @@ export declare enum UserPermission {
544
556
  /** See goals and reviews across the company. A manager sees their own reports without this. */
545
557
  HR_PERFORMANCE_READ = "hr:performance:read",
546
558
  /** Run review cycles. */
547
- HR_PERFORMANCE_MANAGE = "hr:performance:manage"
559
+ HR_PERFORMANCE_MANAGE = "hr:performance:manage",
560
+ /** See how a gym is set up: its profile, branches, rooms, classes, staff and plans. */
561
+ GYM_SETUP_READ = "gym:setup:read",
562
+ /** Change how a gym is set up, including its prices and booking rules. */
563
+ GYM_SETUP_MANAGE = "gym:setup:manage",
564
+ /** See members, their memberships and their waivers. */
565
+ GYM_MEMBER_READ = "gym:member:read",
566
+ /** Add and change members, and sell, freeze and cancel memberships. */
567
+ GYM_MEMBER_MANAGE = "gym:member:manage",
568
+ /** See who has come through the door. */
569
+ GYM_DOOR_READ = "gym:door:read",
570
+ /** Scan people in. */
571
+ GYM_DOOR_OPERATE = "gym:door:operate",
572
+ /** Let somebody in whom the rules refused. Its own permission, and recorded with a reason. */
573
+ GYM_DOOR_OVERRIDE = "gym:door:override",
574
+ /** See the timetable and who is booked. */
575
+ GYM_SCHEDULE_READ = "gym:schedule:read",
576
+ /** Change the timetable: patterns, dates, trainers and cancellations. */
577
+ GYM_SCHEDULE_MANAGE = "gym:schedule:manage",
578
+ /** Book people into classes and mark who came. */
579
+ GYM_BOOKING_MANAGE = "gym:booking:manage",
580
+ /** See what has been paid, what is owing and the day's takings. */
581
+ GYM_PAYMENT_READ = "gym:payment:read",
582
+ /** Record money taken at the desk. */
583
+ GYM_PAYMENT_RECORD = "gym:payment:record",
584
+ /** Give money back. Its own permission, because taking money does not imply returning it. */
585
+ GYM_PAYMENT_REFUND = "gym:payment:refund",
586
+ /** Read a member's workouts and measurements. The front desk runs without this. */
587
+ GYM_TRAINING_READ = "gym:training:read",
588
+ /** Write routines, assign them and record measurements, and keep the exercise library. */
589
+ GYM_TRAINING_MANAGE = "gym:training:manage",
590
+ /** Read trial requests and questions sent from a gym's website or app. */
591
+ GYM_LEAD_READ = "gym:lead:read",
592
+ /** Work through them. */
593
+ GYM_LEAD_MANAGE = "gym:lead:manage",
594
+ /** See promo codes and the gallery. */
595
+ GYM_MARKETING_READ = "gym:marketing:read",
596
+ /** Change promo codes and the gallery. */
597
+ GYM_MARKETING_MANAGE = "gym:marketing:manage",
598
+ /** See the owner's reports. */
599
+ GYM_REPORT_READ = "gym:report:read"
548
600
  }
549
601
  /**
550
602
  * Every member, for seeding the owner role and validating custom-role input.
@@ -562,6 +562,18 @@ export var UserPermission;
562
562
  UserPermission["RESTAURANT_MARKETING_MANAGE"] = "restaurant:marketing:manage";
563
563
  /** See sales reports. */
564
564
  UserPermission["RESTAURANT_REPORT_READ"] = "restaurant:report:read";
565
+ /** See Ezo's moderation queue, what was reported and the appeals against decisions. */
566
+ UserPermission["SOCIAL_MODERATION_READ"] = "social:moderation:read";
567
+ /** Decide a case: dismiss it, remove the content, warn, suspend or ban. */
568
+ UserPermission["SOCIAL_MODERATION_DECIDE"] = "social:moderation:decide";
569
+ /** Answer an appeal. Never against your own decision, which the service refuses. */
570
+ UserPermission["SOCIAL_APPEAL_DECIDE"] = "social:appeal:decide";
571
+ /** Look up members and their records. */
572
+ UserPermission["SOCIAL_MEMBER_READ"] = "social:member:read";
573
+ /** Suspend, ban or reinstate a member without a report behind it. */
574
+ UserPermission["SOCIAL_MEMBER_SANCTION"] = "social:member:sanction";
575
+ /** Read the record of what staff looked at and did. */
576
+ UserPermission["SOCIAL_AUDIT_READ"] = "social:audit:read";
565
577
  // HR
566
578
  /** Read a company's HR settings, locations, departments and job titles. */
567
579
  UserPermission["HR_ORG_READ"] = "hr:org:read";
@@ -609,6 +621,46 @@ export var UserPermission;
609
621
  UserPermission["HR_PERFORMANCE_READ"] = "hr:performance:read";
610
622
  /** Run review cycles. */
611
623
  UserPermission["HR_PERFORMANCE_MANAGE"] = "hr:performance:manage";
624
+ /** See how a gym is set up: its profile, branches, rooms, classes, staff and plans. */
625
+ UserPermission["GYM_SETUP_READ"] = "gym:setup:read";
626
+ /** Change how a gym is set up, including its prices and booking rules. */
627
+ UserPermission["GYM_SETUP_MANAGE"] = "gym:setup:manage";
628
+ /** See members, their memberships and their waivers. */
629
+ UserPermission["GYM_MEMBER_READ"] = "gym:member:read";
630
+ /** Add and change members, and sell, freeze and cancel memberships. */
631
+ UserPermission["GYM_MEMBER_MANAGE"] = "gym:member:manage";
632
+ /** See who has come through the door. */
633
+ UserPermission["GYM_DOOR_READ"] = "gym:door:read";
634
+ /** Scan people in. */
635
+ UserPermission["GYM_DOOR_OPERATE"] = "gym:door:operate";
636
+ /** Let somebody in whom the rules refused. Its own permission, and recorded with a reason. */
637
+ UserPermission["GYM_DOOR_OVERRIDE"] = "gym:door:override";
638
+ /** See the timetable and who is booked. */
639
+ UserPermission["GYM_SCHEDULE_READ"] = "gym:schedule:read";
640
+ /** Change the timetable: patterns, dates, trainers and cancellations. */
641
+ UserPermission["GYM_SCHEDULE_MANAGE"] = "gym:schedule:manage";
642
+ /** Book people into classes and mark who came. */
643
+ UserPermission["GYM_BOOKING_MANAGE"] = "gym:booking:manage";
644
+ /** See what has been paid, what is owing and the day's takings. */
645
+ UserPermission["GYM_PAYMENT_READ"] = "gym:payment:read";
646
+ /** Record money taken at the desk. */
647
+ UserPermission["GYM_PAYMENT_RECORD"] = "gym:payment:record";
648
+ /** Give money back. Its own permission, because taking money does not imply returning it. */
649
+ UserPermission["GYM_PAYMENT_REFUND"] = "gym:payment:refund";
650
+ /** Read a member's workouts and measurements. The front desk runs without this. */
651
+ UserPermission["GYM_TRAINING_READ"] = "gym:training:read";
652
+ /** Write routines, assign them and record measurements, and keep the exercise library. */
653
+ UserPermission["GYM_TRAINING_MANAGE"] = "gym:training:manage";
654
+ /** Read trial requests and questions sent from a gym's website or app. */
655
+ UserPermission["GYM_LEAD_READ"] = "gym:lead:read";
656
+ /** Work through them. */
657
+ UserPermission["GYM_LEAD_MANAGE"] = "gym:lead:manage";
658
+ /** See promo codes and the gallery. */
659
+ UserPermission["GYM_MARKETING_READ"] = "gym:marketing:read";
660
+ /** Change promo codes and the gallery. */
661
+ UserPermission["GYM_MARKETING_MANAGE"] = "gym:marketing:manage";
662
+ /** See the owner's reports. */
663
+ UserPermission["GYM_REPORT_READ"] = "gym:report:read";
612
664
  })(UserPermission || (UserPermission = {}));
613
665
  /**
614
666
  * Every member, for seeding the owner role and validating custom-role input.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iveri/contracts",
3
- "version": "0.54.0",
3
+ "version": "0.60.0",
4
4
  "description": "Wire contracts shared by every Iveri backend and frontend. Zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -52,6 +52,10 @@
52
52
  "types": "./dist/api/clinic/index.d.ts",
53
53
  "default": "./dist/api/clinic/index.js"
54
54
  },
55
+ "./social": {
56
+ "types": "./dist/api/social/index.d.ts",
57
+ "default": "./dist/api/social/index.js"
58
+ },
55
59
  "./hr": {
56
60
  "types": "./dist/api/hr/index.d.ts",
57
61
  "default": "./dist/api/hr/index.js"
@@ -60,6 +64,10 @@
60
64
  "types": "./dist/api/restaurant/index.d.ts",
61
65
  "default": "./dist/api/restaurant/index.js"
62
66
  },
67
+ "./gym": {
68
+ "types": "./dist/api/gym/index.d.ts",
69
+ "default": "./dist/api/gym/index.js"
70
+ },
63
71
  "./mobility": {
64
72
  "types": "./dist/api/mobility/index.d.ts",
65
73
  "default": "./dist/api/mobility/index.js"