wedance-shared 1.0.177 → 1.0.179

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.
@@ -1,12 +1,12 @@
1
1
  import { CityName, CountryCode } from "./city.js";
2
2
  import { DanceTag } from "./event.js";
3
3
  import { UserSummary } from "./user.js";
4
+ export type PrivateClassStatus = "draft" | "published" | "pending";
4
5
  /**
5
- * `published` is visible to everyone; `hidden` is suppressed by an admin. A
6
- * listing is published when first saved, and re-saving never changes the
7
- * status — a teacher cannot undo an admin having hidden their listing.
6
+ * A known {@link DanceTag}, or any free-text style the teacher typed. The
7
+ * `string & {}` keeps autocomplete on the known tags.
8
8
  */
9
- export type PrivateClassStatus = "published" | "hidden";
9
+ export type PrivateClassDanceTag = DanceTag | (string & {});
10
10
  /** What the teacher charges for: one hour, or one session of any length. */
11
11
  export type PrivateClassPriceUnit = "hour" | "session";
12
12
  export type PrivateClassPrice = {
@@ -26,7 +26,11 @@ export type PrivateClass = {
26
26
  userId: string;
27
27
  headline: string;
28
28
  description: string | null;
29
- danceTags: DanceTag[];
29
+ danceTags: PrivateClassDanceTag[];
30
+ /** Languages the teacher can teach in, free text. */
31
+ languages: string[];
32
+ /** School or venue names the teacher also teaches at, free text. */
33
+ teacherAt: string[] | null;
30
34
  city: CityName;
31
35
  countryCode: CountryCode;
32
36
  /** null when the teacher gives no price ("on request"). */
@@ -57,7 +61,11 @@ export type UpsertPrivateClassInput = {
57
61
  /** Max 120 characters. */
58
62
  headline: string;
59
63
  city: CityName;
60
- danceTags: DanceTag[];
64
+ danceTags: PrivateClassDanceTag[];
65
+ /** Free text, cleared when omitted. */
66
+ languages?: string[];
67
+ /** Free text, cleared when omitted. */
68
+ teacherAt?: string[] | null;
61
69
  /** Max 2000 characters. */
62
70
  description?: string | null;
63
71
  /** MINOR units. Requires `priceUnit`; omit for "price on request". */
@@ -74,13 +82,16 @@ export type UpsertPrivateClassInput = {
74
82
  /** `GET /private-classes` — every filter is optional. */
75
83
  export type ListPrivateClassesQuery = {
76
84
  city?: CityName;
77
- danceTag?: DanceTag;
85
+ danceTag?: PrivateClassDanceTag;
78
86
  /** Admin only, ignored for everyone else. */
79
87
  status?: PrivateClassStatus | "all";
80
88
  /** Clamped to 1–100. */
81
89
  limit?: number;
82
90
  };
83
- /** `PATCH /private-classes/:id/status` — admin only. */
91
+ /**
92
+ * `PATCH /private-classes/:id/status` — admin only. Approving a request means
93
+ * setting `published`; rejecting or taking a listing down means `draft`.
94
+ */
84
95
  export type UpdatePrivateClassStatusInput = {
85
96
  status: PrivateClassStatus;
86
97
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wedance-shared",
3
- "version": "1.0.177",
3
+ "version": "1.0.179",
4
4
  "description": "This repository contains shared TypeScript types and interfaces used across multiple WeDance applications:",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",