@iveri/contracts 0.100.0 → 0.102.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.
package/README.md
CHANGED
|
@@ -267,6 +267,7 @@ Conduit's outbox.
|
|
|
267
267
|
`localization:message:manage`, `localization:translate`, `localization:publish` and
|
|
268
268
|
`localization:render` permissions.
|
|
269
269
|
- Version `0.100.0` adds `notification:send-any`, the password-reset bodies and Conduit's usage metrics.
|
|
270
|
+
- Version `0.101.0` adds `UsageHistory`, a company's closed months of a product by metric.
|
|
270
271
|
- Widening a type is minor; narrowing it is major.
|
|
271
272
|
- Under `api/`, the contract follows the service: add the field to the service's DTO and to the
|
|
272
273
|
interface in the same release, and let `implements` prove they agree.
|
|
@@ -44,6 +44,29 @@ export interface UsageSummary {
|
|
|
44
44
|
plan: Nullable<UsagePlan>;
|
|
45
45
|
metrics: UsageMetricSummary[];
|
|
46
46
|
}
|
|
47
|
+
/** How much of one metric a company used in one month. */
|
|
48
|
+
export interface UsageMonthMetric {
|
|
49
|
+
metric: string;
|
|
50
|
+
quantity: number;
|
|
51
|
+
}
|
|
52
|
+
/** One closed calendar month in UTC, its end exclusive, with every metric of the product used in it. */
|
|
53
|
+
export interface UsageMonth {
|
|
54
|
+
periodStart: IsoDateTime;
|
|
55
|
+
periodEnd: IsoDateTime;
|
|
56
|
+
/** By metric name. Empty for a month with no usage, which is still listed. */
|
|
57
|
+
metrics: UsageMonthMetric[];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* `GET /billing/usage/months?product=&months=` (a company's own) or `?tenantId=&product=&months=` (behind
|
|
61
|
+
* `billing:usage:read-any`): the months before the current one, newest first, `months` of them. **No plan and no
|
|
62
|
+
* limits**: the plan a company was on in a past month is not recorded, and today's would be read as that month's. What
|
|
63
|
+
* it was billed against is on that month's invoice.
|
|
64
|
+
*/
|
|
65
|
+
export interface UsageHistory {
|
|
66
|
+
tenantId: UUID;
|
|
67
|
+
product: IveriProduct;
|
|
68
|
+
months: UsageMonth[];
|
|
69
|
+
}
|
|
47
70
|
/** One line of an invoice, as it was when the invoice was issued. */
|
|
48
71
|
export interface UsageInvoiceLine {
|
|
49
72
|
description: string;
|
|
@@ -100,6 +100,11 @@ export interface GymMyBooking {
|
|
|
100
100
|
canCancel: boolean;
|
|
101
101
|
/** Cancelling now would keep what the booking cost. */
|
|
102
102
|
isLateCancel: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* The Baasi conversation with this session's trainer, on a personal session once one is open; null for a class.
|
|
105
|
+
* It stays set after the training ends, because the two can still read it.
|
|
106
|
+
*/
|
|
107
|
+
chatConversationId: Nullable<UUID>;
|
|
103
108
|
}
|
|
104
109
|
export interface CreateMyGymPersonalSessionRequest {
|
|
105
110
|
branchId: UUID;
|
|
@@ -77,6 +77,11 @@ export interface GymBooking {
|
|
|
77
77
|
/** Null unless waitlisted. 1 is next. */
|
|
78
78
|
waitlistPosition: Nullable<number>;
|
|
79
79
|
membershipId: UUID;
|
|
80
|
+
/**
|
|
81
|
+
* The Baasi conversation between this member and the session's trainer, on a personal session only and only
|
|
82
|
+
* for the trainer asking: null for a class, for a desk employee who is not that trainer, and before one is open.
|
|
83
|
+
*/
|
|
84
|
+
chatConversationId: Nullable<UUID>;
|
|
80
85
|
createdAt: IsoDateTime;
|
|
81
86
|
updatedAt: IsoDateTime;
|
|
82
87
|
}
|