@playaos/api-client 0.56.2 → 0.58.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 +38 -0
- package/dist/applications-schema.d.ts +1 -0
- package/dist/applications-schema.js +2 -1
- package/dist/applications-schema.js.map +1 -1
- package/dist/index.d.ts +183 -32
- package/dist/index.js +22 -7
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -61,6 +61,44 @@ const created = await client.applications.create({
|
|
|
61
61
|
|
|
62
62
|
If your deployment serves both route families from the same host, omit `embedBaseUrl` and the client will reuse `baseUrl`.
|
|
63
63
|
|
|
64
|
+
### External application receipts
|
|
65
|
+
|
|
66
|
+
External forms can submit only the fields they collect, plus structured
|
|
67
|
+
`custom_fields`. Omit uncollected birthdays and acknowledgements; never invent
|
|
68
|
+
affirmative consent to satisfy the multi-step wizard's separate requirements.
|
|
69
|
+
The camp must have an active year configured.
|
|
70
|
+
|
|
71
|
+
The approval workflow requires actual principles agreement. An intake without
|
|
72
|
+
that answer can be stored, but cannot be approved. Collect explicit consent in
|
|
73
|
+
forms intended to complete that workflow and pass `agrees_to_principles: true`
|
|
74
|
+
only after the applicant acknowledges it. Missing consent is never an implied
|
|
75
|
+
agreement, and administrators cannot manufacture it during reconciliation.
|
|
76
|
+
|
|
77
|
+
For retryable submissions, create one UUID per logical application and retain it
|
|
78
|
+
with the draft. Send it as `submission_id` on every identical retry:
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
const receipt = await client.applications.create({
|
|
82
|
+
submission_id: submissionId,
|
|
83
|
+
first_name: "Rain",
|
|
84
|
+
last_name: "",
|
|
85
|
+
email: "rain@example.com",
|
|
86
|
+
custom_fields: { interests: ["pickleball"] },
|
|
87
|
+
});
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
A fresh opted-in acceptance returns `replayed: false`. An identical retry returns
|
|
91
|
+
the same `applicationId` and original `year` with `replayed: true`, without
|
|
92
|
+
changing the saved application. Different answers under an accepted key conflict;
|
|
93
|
+
an email duplicate under another key is not an owned receipt. Retries remain
|
|
94
|
+
scoped to the issuing camp. Keep this operation on the server when its camp
|
|
95
|
+
credential is server-only.
|
|
96
|
+
|
|
97
|
+
Start optional mail or spreadsheet side effects only for an explicit
|
|
98
|
+
`replayed === false` result. A replay or older server's missing flag does not
|
|
99
|
+
prove those side effects are safe to repeat. Saved acceptance and notification
|
|
100
|
+
delivery are separate outcomes; reconcile unknown delivery before resending.
|
|
101
|
+
|
|
64
102
|
## Route hosts
|
|
65
103
|
|
|
66
104
|
- `baseUrl` is used for authenticated `/api/v1/*` routes.
|
|
@@ -50,6 +50,7 @@ export declare const step5Schema: z.ZodObject<{
|
|
|
50
50
|
agrees_to_principles: z.ZodLiteral<true>;
|
|
51
51
|
}, z.core.$strip>;
|
|
52
52
|
export declare const applicationSchema: z.ZodObject<{
|
|
53
|
+
submission_id: z.ZodOptional<z.ZodString>;
|
|
53
54
|
acknowledged_expectations: z.ZodOptional<z.ZodLiteral<true>>;
|
|
54
55
|
first_name: z.ZodString;
|
|
55
56
|
last_name: z.ZodString;
|
|
@@ -51,9 +51,10 @@ const step5Schema = z.object({
|
|
|
51
51
|
agrees_to_principles: z.literal(true, { error: "You must agree to the 10 Principles" })
|
|
52
52
|
});
|
|
53
53
|
const applicationSchema = z.object({
|
|
54
|
+
submission_id: z.string().uuid().optional(),
|
|
54
55
|
acknowledged_expectations: z.literal(true).optional(),
|
|
55
56
|
first_name: z.string().min(1),
|
|
56
|
-
last_name: z.string()
|
|
57
|
+
last_name: z.string(),
|
|
57
58
|
email: z.string().email(),
|
|
58
59
|
phone: z.string().optional(),
|
|
59
60
|
referral_code: z.string().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applications-schema.js","names":[],"sources":["../src/applications-schema.ts"],"sourcesContent":["import { z } from \"zod\";\n\n// Single source of truth for the apply-wizard form shape.\n// The portal apply flow and the @playaos/react <ApplicationForm> SDK both import\n// from here so the validation contract can never drift between them (PLA-483).\n// `ApplicationCreatePayload` in ./types.ts is the zod-free wire mirror; a type\n// equivalence test (applications-schema.test.ts) keeps the two locked together.\n\n// Per-step validation schemas\nexport const step0Schema = z.object({\n acknowledged_expectations: z.literal(true, {\n error: \"Please acknowledge the expectations to continue\",\n }),\n});\n\nexport const step1Schema = z.object({\n first_name: z.string().min(1, \"First name is required\"),\n last_name: z.string().min(1, \"Last name is required\"),\n email: z.string().email(\"Invalid email address\"),\n phone: z.string().min(10, \"Phone number is required\"),\n referral_code: z.string().optional(),\n socials: z.string().optional(),\n birthday: z.string().min(1, \"Birthday is required\"),\n hometown: z.string().min(1, \"Location is required\"),\n});\n\nexport const step2Schema = z.object({\n how_heard: z.string().min(1, \"Please tell us how you heard about us\"),\n burning_man_before: z.enum([\"yes\", \"no\"], { error: \"Please select an option\" }),\n burning_man_years: z.string().optional(),\n});\n\nexport const step3Schema = z.object({\n shelter_type: z.enum([\"joining_rv\", \"bringing_rv\", \"shiftpod_tent\", \"car\", \"truck\", \"van\", \"unsure\"], {\n error: \"Please select a shelter type\",\n }),\n shelter_mates: z.string().optional(),\n ticket_status: z.enum([\"looking\", \"have_ticket\", \"unsure\"], { error: \"Please select your ticket status\" }),\n});\n\nexport const step4Schema = z\n .object({\n build_available: z.boolean(),\n build_skills: z.string().optional(),\n strike_available: z.boolean(),\n strike_help: z.string().optional(),\n // commitmentId → value. Integers only on the number branch (per dataType);\n // per-commitment bounds (min/max) are validated against the live defs at\n // form-render + on the server, not here (PLA-682).\n commitments: z.record(z.string(), z.union([z.number().int(), z.boolean()])).optional(),\n })\n .refine((data) => !data.build_available || data.build_skills, {\n message: \"Please tell us about your build skills\",\n path: [\"build_skills\"],\n })\n .refine((data) => !data.strike_available || data.strike_help, {\n message: \"Please tell us how you can help with strike\",\n path: [\"strike_help\"],\n });\n\nexport const step5Schema = z.object({\n about_yourself: z.string().min(50, \"Please write at least 50 characters about yourself\"),\n agrees_to_principles: z.literal(true, { error: \"You must agree to the 10 Principles\" }),\n});\n\n// Combined schema for API-level validation — permissive so external camps\n// can submit applications with only first_name + last_name + email + custom_fields.\n// Step schemas (above) remain strict for the PlayaOS wizard UI.\nexport const applicationSchema = z.object({\n acknowledged_expectations: z.literal(true).optional(),\n first_name: z.string().min(1),\n last_name: z.string()
|
|
1
|
+
{"version":3,"file":"applications-schema.js","names":[],"sources":["../src/applications-schema.ts"],"sourcesContent":["import { z } from \"zod\";\n\n// Single source of truth for the apply-wizard form shape.\n// The portal apply flow and the @playaos/react <ApplicationForm> SDK both import\n// from here so the validation contract can never drift between them (PLA-483).\n// `ApplicationCreatePayload` in ./types.ts is the zod-free wire mirror; a type\n// equivalence test (applications-schema.test.ts) keeps the two locked together.\n\n// Per-step validation schemas\nexport const step0Schema = z.object({\n acknowledged_expectations: z.literal(true, {\n error: \"Please acknowledge the expectations to continue\",\n }),\n});\n\nexport const step1Schema = z.object({\n first_name: z.string().min(1, \"First name is required\"),\n last_name: z.string().min(1, \"Last name is required\"),\n email: z.string().email(\"Invalid email address\"),\n phone: z.string().min(10, \"Phone number is required\"),\n referral_code: z.string().optional(),\n socials: z.string().optional(),\n birthday: z.string().min(1, \"Birthday is required\"),\n hometown: z.string().min(1, \"Location is required\"),\n});\n\nexport const step2Schema = z.object({\n how_heard: z.string().min(1, \"Please tell us how you heard about us\"),\n burning_man_before: z.enum([\"yes\", \"no\"], { error: \"Please select an option\" }),\n burning_man_years: z.string().optional(),\n});\n\nexport const step3Schema = z.object({\n shelter_type: z.enum([\"joining_rv\", \"bringing_rv\", \"shiftpod_tent\", \"car\", \"truck\", \"van\", \"unsure\"], {\n error: \"Please select a shelter type\",\n }),\n shelter_mates: z.string().optional(),\n ticket_status: z.enum([\"looking\", \"have_ticket\", \"unsure\"], { error: \"Please select your ticket status\" }),\n});\n\nexport const step4Schema = z\n .object({\n build_available: z.boolean(),\n build_skills: z.string().optional(),\n strike_available: z.boolean(),\n strike_help: z.string().optional(),\n // commitmentId → value. Integers only on the number branch (per dataType);\n // per-commitment bounds (min/max) are validated against the live defs at\n // form-render + on the server, not here (PLA-682).\n commitments: z.record(z.string(), z.union([z.number().int(), z.boolean()])).optional(),\n })\n .refine((data) => !data.build_available || data.build_skills, {\n message: \"Please tell us about your build skills\",\n path: [\"build_skills\"],\n })\n .refine((data) => !data.strike_available || data.strike_help, {\n message: \"Please tell us how you can help with strike\",\n path: [\"strike_help\"],\n });\n\nexport const step5Schema = z.object({\n about_yourself: z.string().min(50, \"Please write at least 50 characters about yourself\"),\n agrees_to_principles: z.literal(true, { error: \"You must agree to the 10 Principles\" }),\n});\n\n// Combined schema for API-level validation — permissive so external camps\n// can submit applications with only first_name + last_name + email + custom_fields.\n// Step schemas (above) remain strict for the PlayaOS wizard UI.\nexport const applicationSchema = z.object({\n submission_id: z.string().uuid().optional(),\n acknowledged_expectations: z.literal(true).optional(),\n first_name: z.string().min(1),\n last_name: z.string(),\n email: z.string().email(),\n phone: z.string().optional(),\n referral_code: z.string().optional(),\n socials: z.string().optional(),\n birthday: z.string().optional(),\n hometown: z.string().optional(),\n how_heard: z.string().optional(),\n burning_man_before: z.enum([\"yes\", \"no\"]).optional(),\n burning_man_years: z.string().optional(),\n shelter_type: z.enum([\"joining_rv\", \"bringing_rv\", \"shiftpod_tent\", \"car\", \"truck\", \"van\", \"unsure\"]).optional(),\n shelter_mates: z.string().optional(),\n ticket_status: z.enum([\"looking\", \"have_ticket\", \"unsure\"]).optional(),\n build_available: z.boolean().optional(),\n build_skills: z.string().optional(),\n strike_available: z.boolean().optional(),\n strike_help: z.string().optional(),\n about_yourself: z.string().optional(),\n agrees_to_principles: z.literal(true).optional(),\n // Permissive at the API level (no bounds checks) — the server validates each\n // value against the live commitment definition before seeding (PLA-682).\n commitments: z.record(z.string(), z.union([z.number(), z.boolean()])).optional(),\n custom_fields: z.object({}).passthrough().optional(),\n});\n\nexport type ApplicationFormData = z.infer<typeof applicationSchema>;\nexport type Step0Data = z.infer<typeof step0Schema>;\nexport type Step1Data = z.infer<typeof step1Schema>;\nexport type Step2Data = z.infer<typeof step2Schema>;\nexport type Step3Data = z.infer<typeof step3Schema>;\nexport type Step4Data = z.infer<typeof step4Schema>;\nexport type Step5Data = z.infer<typeof step5Schema>;\n"],"mappings":"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"}
|
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,19 @@ type PaginationParams = {
|
|
|
35
35
|
/** Opaque cursor from a previous response's nextCursor. */
|
|
36
36
|
cursor?: string;
|
|
37
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* Event scope for event-scoped reads and writes (ADR-132). Send `eventId` for a canonical event.
|
|
40
|
+
* Year handling is endpoint-specific during the ADR-132 rollout (`playa-0i3qp.11.3.x`): endpoints
|
|
41
|
+
* that have adopted the contract resolve a `year` alone to at most one event and answer
|
|
42
|
+
* 409 `EVENT_REQUIRED` with the candidate events when it matches several; endpoints that have
|
|
43
|
+
* not adopted it yet still treat `year` as the legacy annual filter.
|
|
44
|
+
*/
|
|
45
|
+
type EventScopeParams = {
|
|
46
|
+
/** Legacy camp year. */
|
|
47
|
+
year?: number;
|
|
48
|
+
/** Canonical event ID. */
|
|
49
|
+
eventId?: string;
|
|
50
|
+
};
|
|
38
51
|
interface Member {
|
|
39
52
|
id: string;
|
|
40
53
|
firstName: string;
|
|
@@ -123,7 +136,29 @@ interface ApplicationCapacity {
|
|
|
123
136
|
limit: number;
|
|
124
137
|
atCapacity: boolean;
|
|
125
138
|
}
|
|
139
|
+
interface ApplicationWorkflowCapabilities {
|
|
140
|
+
transitions: {
|
|
141
|
+
to: "approved" | "rejected" | "waitlisted" | "interviewed";
|
|
142
|
+
enabled: boolean;
|
|
143
|
+
reason?: string;
|
|
144
|
+
}[];
|
|
145
|
+
invite: {
|
|
146
|
+
enabled: boolean;
|
|
147
|
+
reason?: string;
|
|
148
|
+
};
|
|
149
|
+
interviewNote: {
|
|
150
|
+
enabled: boolean;
|
|
151
|
+
reason?: string;
|
|
152
|
+
};
|
|
153
|
+
annotations: {
|
|
154
|
+
notes: boolean;
|
|
155
|
+
tags: boolean;
|
|
156
|
+
scores: boolean;
|
|
157
|
+
};
|
|
158
|
+
}
|
|
126
159
|
interface ApplicationAdmin extends Application {
|
|
160
|
+
/** Advisory server policy; writes remain authoritative. Absent on older servers. */
|
|
161
|
+
workflowCapabilities?: ApplicationWorkflowCapabilities;
|
|
127
162
|
/** Applicant phone from the joined profile (PLA-1322). */
|
|
128
163
|
phone: string | null;
|
|
129
164
|
/** Applicant birthday (YYYY-MM-DD) from the joined profile (PLA-1332). */
|
|
@@ -174,6 +209,15 @@ interface ImportantDate {
|
|
|
174
209
|
category: string | null;
|
|
175
210
|
year: number;
|
|
176
211
|
}
|
|
212
|
+
type EventStatus = "draft" | "published" | "archived";
|
|
213
|
+
interface EventSummary {
|
|
214
|
+
id: string;
|
|
215
|
+
name: string;
|
|
216
|
+
status: EventStatus;
|
|
217
|
+
startDate: string | null;
|
|
218
|
+
endDate: string | null;
|
|
219
|
+
timezone: string | null;
|
|
220
|
+
}
|
|
177
221
|
interface SummerCampAttendee {
|
|
178
222
|
profileId: string;
|
|
179
223
|
nightsAttending: string[];
|
|
@@ -288,8 +332,9 @@ interface PhotoExportJob {
|
|
|
288
332
|
completedAt: string | null;
|
|
289
333
|
}
|
|
290
334
|
interface CreatePhotoExportInput {
|
|
335
|
+
/** Canonical event (`events.id`) to export. Required since 0.58.0, which removed `year`. */
|
|
336
|
+
eventId: string;
|
|
291
337
|
attending?: "true" | "all";
|
|
292
|
-
year?: number;
|
|
293
338
|
role?: string;
|
|
294
339
|
status?: string;
|
|
295
340
|
search?: string;
|
|
@@ -300,7 +345,8 @@ interface OnboardingProgress {
|
|
|
300
345
|
orgId: string;
|
|
301
346
|
userId: string;
|
|
302
347
|
itemId: string;
|
|
303
|
-
|
|
348
|
+
eventId: string | null;
|
|
349
|
+
year: number | null;
|
|
304
350
|
completed: boolean | null;
|
|
305
351
|
}
|
|
306
352
|
/** A camp year with its per-year member/date counts (`GET /bookkeeping/years`, PLA-1345). */
|
|
@@ -444,7 +490,8 @@ interface MemberCustomChecklistItem {
|
|
|
444
490
|
categoryId: string;
|
|
445
491
|
name: string;
|
|
446
492
|
completed: boolean | null;
|
|
447
|
-
|
|
493
|
+
eventId: string | null;
|
|
494
|
+
year: number | null;
|
|
448
495
|
}
|
|
449
496
|
interface DuesStatus {
|
|
450
497
|
userId: string | null;
|
|
@@ -471,6 +518,10 @@ interface MemberDuesStatus {
|
|
|
471
518
|
attendanceResponse: string | null;
|
|
472
519
|
/** Whether the member has ever signed in (PLA-1343). */
|
|
473
520
|
hasLoggedIn: boolean | null;
|
|
521
|
+
/** Event the row is for; absent or null on the annual path (ADR-132). */
|
|
522
|
+
eventId?: string | null;
|
|
523
|
+
/** Event participation status; absent or null on the annual path. */
|
|
524
|
+
participationStatus?: string | null;
|
|
474
525
|
}
|
|
475
526
|
/** Per-tier dues totals from `dues_summary` (PLA-1336). */
|
|
476
527
|
interface DuesSummaryRow {
|
|
@@ -520,6 +571,8 @@ interface ShiftSignup {
|
|
|
520
571
|
userId: string;
|
|
521
572
|
status: string | null;
|
|
522
573
|
role: string | null;
|
|
574
|
+
canceledAt?: string | null;
|
|
575
|
+
waitlistedAt?: string | null;
|
|
523
576
|
}
|
|
524
577
|
interface ShiftType {
|
|
525
578
|
id: string;
|
|
@@ -527,6 +580,10 @@ interface ShiftType {
|
|
|
527
580
|
description: string | null;
|
|
528
581
|
}
|
|
529
582
|
interface Shift {
|
|
583
|
+
/** Server-owned self-service time window only; publication and capacity are separate. */
|
|
584
|
+
selfServiceOpen?: boolean;
|
|
585
|
+
/** Effective capacity for self-service signup; independent of mobile/admin policies. */
|
|
586
|
+
selfSignupCapacity?: number;
|
|
530
587
|
id: string;
|
|
531
588
|
orgId: string;
|
|
532
589
|
shiftDate: string;
|
|
@@ -588,8 +645,28 @@ interface AdminShelter {
|
|
|
588
645
|
} | null;
|
|
589
646
|
}>;
|
|
590
647
|
}
|
|
648
|
+
/** An organization-owned event, as listed on `GET /org` (ADR-132). */
|
|
649
|
+
interface OrgEvent {
|
|
650
|
+
id: string;
|
|
651
|
+
name: string;
|
|
652
|
+
slug: string;
|
|
653
|
+
status: "draft" | "published" | "archived";
|
|
654
|
+
startDate: string | null;
|
|
655
|
+
endDate: string | null;
|
|
656
|
+
}
|
|
591
657
|
interface OrgConfig {
|
|
658
|
+
/** Canonical branding fields; absent on older API deployments. */
|
|
659
|
+
tagline?: string | null;
|
|
660
|
+
description?: string | null;
|
|
661
|
+
/**
|
|
662
|
+
* @deprecated Display and legacy use only: the configured active camp year, else the current
|
|
663
|
+
* calendar year. Not an event scope (ADR-132); send `eventId` or an explicit `year` instead.
|
|
664
|
+
*/
|
|
592
665
|
activeCampYear: number;
|
|
666
|
+
/** Actual configured active camp year; absent on older API deployments. Never a calendar fallback. */
|
|
667
|
+
configuredActiveCampYear?: number | null;
|
|
668
|
+
/** The organization's events, ordered by start date; absent on older API deployments (ADR-132). */
|
|
669
|
+
events?: OrgEvent[];
|
|
593
670
|
id: string;
|
|
594
671
|
name: string;
|
|
595
672
|
slug: string;
|
|
@@ -821,6 +898,8 @@ interface MemberGroupRosterRow {
|
|
|
821
898
|
profileStatus: string | null;
|
|
822
899
|
}
|
|
823
900
|
interface ApplicationCreatePayload {
|
|
901
|
+
/** Stable opaque UUID for exact-payload receipt recovery; never reuse for changed answers. */
|
|
902
|
+
submission_id?: string;
|
|
824
903
|
acknowledged_expectations?: true;
|
|
825
904
|
first_name: string;
|
|
826
905
|
last_name: string;
|
|
@@ -849,6 +928,10 @@ interface ApplicationCreatePayload {
|
|
|
849
928
|
interface ApplicationCreateResponse {
|
|
850
929
|
applicationId: string;
|
|
851
930
|
status: string;
|
|
931
|
+
/** Original accepted camp year. */
|
|
932
|
+
year?: number;
|
|
933
|
+
/** Present for opted-in submissions; only false authorizes fresh delivery side effects. */
|
|
934
|
+
replayed?: boolean;
|
|
852
935
|
}
|
|
853
936
|
interface ApplicationTransitionPayload {
|
|
854
937
|
to: ApplicationStatus;
|
|
@@ -1291,8 +1374,10 @@ interface BikeRentalInterestedMember {
|
|
|
1291
1374
|
unmatchable: boolean;
|
|
1292
1375
|
}
|
|
1293
1376
|
interface BikeRentalInterestedNotReservedResponse {
|
|
1294
|
-
/**
|
|
1377
|
+
/** Camp year of the list; for an event, its start year. */
|
|
1295
1378
|
year: number;
|
|
1379
|
+
/** Event the list is for; null on the annual path. */
|
|
1380
|
+
eventId: string | null;
|
|
1296
1381
|
items: BikeRentalInterestedMember[];
|
|
1297
1382
|
}
|
|
1298
1383
|
/** Email template registry entry (PLA-1265). */
|
|
@@ -1381,7 +1466,8 @@ interface Scholarship {
|
|
|
1381
1466
|
id: string;
|
|
1382
1467
|
orgId: string;
|
|
1383
1468
|
userId: string;
|
|
1384
|
-
|
|
1469
|
+
eventId: string | null;
|
|
1470
|
+
year: number | null;
|
|
1385
1471
|
promoCode: string;
|
|
1386
1472
|
discountAmount: string;
|
|
1387
1473
|
reason: string | null;
|
|
@@ -1396,6 +1482,7 @@ interface CreateScholarshipInput {
|
|
|
1396
1482
|
discountAmount: number;
|
|
1397
1483
|
reason?: string;
|
|
1398
1484
|
year?: number;
|
|
1485
|
+
eventId?: string;
|
|
1399
1486
|
}
|
|
1400
1487
|
type TicketStatus = "have_ticket" | "need_ticket" | "step_enrolled" | "low_income_approved";
|
|
1401
1488
|
interface AdminTicketRow extends Ticket {
|
|
@@ -1457,7 +1544,25 @@ interface MemberSelfProfile {
|
|
|
1457
1544
|
otherAllergies: string | null;
|
|
1458
1545
|
hasEpipen: boolean | null;
|
|
1459
1546
|
}
|
|
1547
|
+
type MemberGateId = "attendance" | "account" | "documents" | "profile" | "shelter";
|
|
1548
|
+
interface MemberGateStep {
|
|
1549
|
+
id: MemberGateId;
|
|
1550
|
+
status: "complete" | "pending" | "not_applicable";
|
|
1551
|
+
skippable: boolean;
|
|
1552
|
+
requirements: {
|
|
1553
|
+
id: string;
|
|
1554
|
+
complete: boolean;
|
|
1555
|
+
}[];
|
|
1556
|
+
}
|
|
1557
|
+
interface MemberGatePlan {
|
|
1558
|
+
year: number;
|
|
1559
|
+
steps: MemberGateStep[];
|
|
1560
|
+
nextGate: MemberGateId | null;
|
|
1561
|
+
remainingCount: number;
|
|
1562
|
+
totalCount: number;
|
|
1563
|
+
}
|
|
1460
1564
|
interface MemberBootstrap {
|
|
1565
|
+
gates: MemberGatePlan;
|
|
1461
1566
|
year: number;
|
|
1462
1567
|
profile: MemberSelfProfile;
|
|
1463
1568
|
campYear: {
|
|
@@ -1468,14 +1573,36 @@ interface MemberBootstrap {
|
|
|
1468
1573
|
confirmedShelterAssignment: {
|
|
1469
1574
|
id: string;
|
|
1470
1575
|
} | null;
|
|
1576
|
+
/** Renderable unsigned documents for the current documents gate; other gates use requirements only. */
|
|
1471
1577
|
unsignedDocuments: Array<{
|
|
1472
1578
|
id: string;
|
|
1473
1579
|
name: string;
|
|
1474
1580
|
description: string | null;
|
|
1475
1581
|
content: string | WaiverContent | null;
|
|
1476
1582
|
filePath: string | null;
|
|
1583
|
+
externalUrl: string | null;
|
|
1477
1584
|
}>;
|
|
1478
1585
|
}
|
|
1586
|
+
/** Acting member's active-year dues flags and attributed payment history. */
|
|
1587
|
+
interface MemberPaymentsOverview {
|
|
1588
|
+
year: number;
|
|
1589
|
+
duesStatus: {
|
|
1590
|
+
hasPaidBaseDues: boolean;
|
|
1591
|
+
hasPaidRvDues: boolean;
|
|
1592
|
+
ownsRvShelter: boolean;
|
|
1593
|
+
rvAmperage: number | null;
|
|
1594
|
+
rvType: string | null;
|
|
1595
|
+
totalPaid: number;
|
|
1596
|
+
};
|
|
1597
|
+
payments: Array<{
|
|
1598
|
+
id: string;
|
|
1599
|
+
amount: number;
|
|
1600
|
+
paymentMethod: string | null;
|
|
1601
|
+
paymentStatus: string | null;
|
|
1602
|
+
paymentDate: string | null;
|
|
1603
|
+
}>;
|
|
1604
|
+
donationWidgetId: string | null;
|
|
1605
|
+
}
|
|
1479
1606
|
interface MemberDashboard {
|
|
1480
1607
|
year: number;
|
|
1481
1608
|
profile: MemberSelfProfile;
|
|
@@ -2123,6 +2250,11 @@ interface SchedulingAdminResult {
|
|
|
2123
2250
|
success?: boolean;
|
|
2124
2251
|
}
|
|
2125
2252
|
interface SchedulingAdminSettings {
|
|
2253
|
+
/** Missing on older servers; an empty array means no active camp booking links. */
|
|
2254
|
+
bookingLinks?: {
|
|
2255
|
+
id: string;
|
|
2256
|
+
title: string;
|
|
2257
|
+
}[];
|
|
2126
2258
|
googleConnected: boolean;
|
|
2127
2259
|
interviewer: {
|
|
2128
2260
|
id: string;
|
|
@@ -2263,11 +2395,12 @@ interface AdminScholarshipsPage {
|
|
|
2263
2395
|
scholarships: {
|
|
2264
2396
|
id: string;
|
|
2265
2397
|
userId: string;
|
|
2398
|
+
eventId: string | null;
|
|
2266
2399
|
promoCode: string;
|
|
2267
2400
|
discountAmount: string;
|
|
2268
2401
|
reason: string | null;
|
|
2269
2402
|
status: ScholarshipStatus;
|
|
2270
|
-
year: number;
|
|
2403
|
+
year: number | null;
|
|
2271
2404
|
usedAt: string | null;
|
|
2272
2405
|
createdAt: string | null;
|
|
2273
2406
|
profile: {
|
|
@@ -2969,9 +3102,23 @@ export declare class PlayaOSClient {
|
|
|
2969
3102
|
bootstrap: (opts?: {
|
|
2970
3103
|
signal?: AbortSignal;
|
|
2971
3104
|
}) => Promise<MemberBootstrap>;
|
|
3105
|
+
gates: (opts?: {
|
|
3106
|
+
signal?: AbortSignal;
|
|
3107
|
+
}) => Promise<MemberGatePlan>;
|
|
2972
3108
|
dashboard: (opts?: {
|
|
2973
3109
|
signal?: AbortSignal;
|
|
2974
3110
|
}) => Promise<MemberDashboard>;
|
|
3111
|
+
/** Always the acting member, including admins; requires a member token and members:read scope. */
|
|
3112
|
+
paymentOverview: (opts?: {
|
|
3113
|
+
signal?: AbortSignal;
|
|
3114
|
+
}) => Promise<MemberPaymentsOverview>;
|
|
3115
|
+
/** Acting member's original photo only; missing originals return 404, never an avatar fallback. */
|
|
3116
|
+
selfPhotoDownloadUrl: (opts?: {
|
|
3117
|
+
signal?: AbortSignal;
|
|
3118
|
+
}) => Promise<{
|
|
3119
|
+
url: string;
|
|
3120
|
+
fileName: string;
|
|
3121
|
+
}>;
|
|
2975
3122
|
/** Presigned profile-photo upload (PLA-1263). PUT the bytes, then setPhoto. */
|
|
2976
3123
|
createPhotoUploadUrl: (payload: {
|
|
2977
3124
|
contentType: "image/jpeg" | "image/png" | "image/webp";
|
|
@@ -3037,6 +3184,8 @@ export declare class PlayaOSClient {
|
|
|
3037
3184
|
sortBy?: "name" | "email" | "role" | "status" | "createdAt";
|
|
3038
3185
|
sortOrder?: "asc" | "desc";
|
|
3039
3186
|
attending?: "true" | "false";
|
|
3187
|
+
/** Canonical event to scope `attending` to; alone, lists that event's participants. */
|
|
3188
|
+
eventId?: string;
|
|
3040
3189
|
} & PaginationParams & {
|
|
3041
3190
|
/** Raw row offset — the members table's pager. Mutually exclusive with `cursor`. */
|
|
3042
3191
|
offset?: number;
|
|
@@ -3549,9 +3698,7 @@ export declare class PlayaOSClient {
|
|
|
3549
3698
|
}>;
|
|
3550
3699
|
};
|
|
3551
3700
|
readonly scholarships: {
|
|
3552
|
-
adminPage: (params?: {
|
|
3553
|
-
year?: number;
|
|
3554
|
-
}, opts?: {
|
|
3701
|
+
adminPage: (params?: EventScopeParams, opts?: {
|
|
3555
3702
|
signal?: AbortSignal;
|
|
3556
3703
|
}) => Promise<AdminScholarshipsPage>;
|
|
3557
3704
|
refresh: (id: string, opts?: {
|
|
@@ -3560,9 +3707,7 @@ export declare class PlayaOSClient {
|
|
|
3560
3707
|
givebutterActive: boolean;
|
|
3561
3708
|
givebutterUsed: number;
|
|
3562
3709
|
}>;
|
|
3563
|
-
stats: (params?: {
|
|
3564
|
-
year?: number;
|
|
3565
|
-
}, opts?: {
|
|
3710
|
+
stats: (params?: EventScopeParams, opts?: {
|
|
3566
3711
|
signal?: AbortSignal;
|
|
3567
3712
|
}) => Promise<ScholarshipStats>;
|
|
3568
3713
|
/** Create a scholarship (code + Givebutter sync). Admin-only (PLA-1266). */
|
|
@@ -3846,8 +3991,11 @@ export declare class PlayaOSClient {
|
|
|
3846
3991
|
requestReservation: (payload: BikeRentalRequestInput, opts?: {
|
|
3847
3992
|
signal?: AbortSignal;
|
|
3848
3993
|
}) => Promise<BikeRentalRequestResult>;
|
|
3849
|
-
/**
|
|
3850
|
-
|
|
3994
|
+
/**
|
|
3995
|
+
* Members who said they want a bike but have no reservation, for one event or camp year. With
|
|
3996
|
+
* no params, the camp's configured active camp year. Org key only.
|
|
3997
|
+
*/
|
|
3998
|
+
interestedNotReserved: (params?: EventScopeParams, opts?: {
|
|
3851
3999
|
signal?: AbortSignal;
|
|
3852
4000
|
}) => Promise<BikeRentalInterestedNotReservedResponse>;
|
|
3853
4001
|
};
|
|
@@ -4150,6 +4298,14 @@ export declare class PlayaOSClient {
|
|
|
4150
4298
|
signal?: AbortSignal;
|
|
4151
4299
|
}) => Promise<ImportantDate[]>;
|
|
4152
4300
|
};
|
|
4301
|
+
readonly events: {
|
|
4302
|
+
/** The camp's events with the given status (default `published`), earliest first. */
|
|
4303
|
+
list: (params?: {
|
|
4304
|
+
status?: EventStatus;
|
|
4305
|
+
}, opts?: {
|
|
4306
|
+
signal?: AbortSignal;
|
|
4307
|
+
}) => Promise<EventSummary[]>;
|
|
4308
|
+
};
|
|
4153
4309
|
readonly emails: {
|
|
4154
4310
|
recipients: (payload: EmailRecipientFilter, opts?: {
|
|
4155
4311
|
signal?: AbortSignal;
|
|
@@ -4297,22 +4453,19 @@ export declare class PlayaOSClient {
|
|
|
4297
4453
|
/** Per-member checklist completion; non-admins are pinned to themselves. */
|
|
4298
4454
|
progress: (params?: {
|
|
4299
4455
|
userId?: string;
|
|
4300
|
-
|
|
4301
|
-
} & PaginationParams, opts?: {
|
|
4456
|
+
} & EventScopeParams & PaginationParams, opts?: {
|
|
4302
4457
|
signal?: AbortSignal;
|
|
4303
4458
|
}) => Promise<Paginated<OnboardingProgress>>;
|
|
4304
4459
|
/** The acting member's own custom checklist items for a year (PLA-1340). */
|
|
4305
4460
|
customItems: (params?: {
|
|
4306
4461
|
userId?: string;
|
|
4307
|
-
|
|
4308
|
-
} & PaginationParams, opts?: {
|
|
4462
|
+
} & EventScopeParams & PaginationParams, opts?: {
|
|
4309
4463
|
signal?: AbortSignal;
|
|
4310
4464
|
}) => Promise<Paginated<MemberCustomChecklistItem>>;
|
|
4311
4465
|
/** Tick a checklist item for the acting member (PLA-1259). */
|
|
4312
4466
|
setProgress: (itemId: string, payload: {
|
|
4313
4467
|
completed: boolean;
|
|
4314
|
-
|
|
4315
|
-
}, opts?: {
|
|
4468
|
+
} & EventScopeParams, opts?: {
|
|
4316
4469
|
signal?: AbortSignal;
|
|
4317
4470
|
}) => Promise<OnboardingProgress>;
|
|
4318
4471
|
};
|
|
@@ -4521,23 +4674,21 @@ export declare class PlayaOSClient {
|
|
|
4521
4674
|
accessToken?: string;
|
|
4522
4675
|
signal?: AbortSignal;
|
|
4523
4676
|
}) => Promise<DuesUpdateResponse>;
|
|
4524
|
-
/**
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4677
|
+
/**
|
|
4678
|
+
* Per-member dues state for one event or camp year (PLA-1336, ADR-132). With no params, the
|
|
4679
|
+
* configured active camp year. V1-only — requires a member token.
|
|
4680
|
+
*/
|
|
4681
|
+
status: (params?: EventScopeParams, opts?: {
|
|
4528
4682
|
signal?: AbortSignal;
|
|
4529
4683
|
}) => Promise<MemberDuesStatus[]>;
|
|
4530
|
-
/** Per-tier dues totals
|
|
4531
|
-
summary: (params?: {
|
|
4532
|
-
year?: number;
|
|
4533
|
-
}, opts?: {
|
|
4684
|
+
/** Per-tier dues totals for one event or camp year (PLA-1336, ADR-132). V1-only — requires a member token. */
|
|
4685
|
+
summary: (params?: EventScopeParams, opts?: {
|
|
4534
4686
|
signal?: AbortSignal;
|
|
4535
4687
|
}) => Promise<DuesSummaryRow[]>;
|
|
4536
|
-
/** Members who paid a given dues type (PLA-1336). V1-only — requires a member token. */
|
|
4688
|
+
/** Members who paid a given dues type, for one event or camp year (PLA-1336, ADR-132). V1-only — requires a member token. */
|
|
4537
4689
|
payors: (params: {
|
|
4538
4690
|
duesType: string;
|
|
4539
|
-
|
|
4540
|
-
}, opts?: {
|
|
4691
|
+
} & EventScopeParams, opts?: {
|
|
4541
4692
|
signal?: AbortSignal;
|
|
4542
4693
|
}) => Promise<DuesTypePayor[]>;
|
|
4543
4694
|
};
|
|
@@ -4736,5 +4887,5 @@ interface PublicMarketplaceClient {
|
|
|
4736
4887
|
}
|
|
4737
4888
|
export declare function createPublicMarketplaceClient(opts: PublicMarketplaceClientOptions): PublicMarketplaceClient;
|
|
4738
4889
|
//#endregion
|
|
4739
|
-
export type { AccountReviewProfile, AdminAccountsOperation, AdminAccountsPage, AdminBikeInterestRow, AdminBikeInventory, AdminBikeOperation, AdminBikeOperationResult, AdminBikeRental, AdminBikeType, AdminCampDocument, AdminCampSettings, AdminDocumentSignature, AdminGivebutterCatalog, AdminGivebutterCatalogOperation, AdminGivebutterWidgetOperation, AdminGivebutterWidgets, AdminImportOperation, AdminImportResult, AdminImportRow, AdminImportantDate, AdminImportantDateInput, AdminImportantDateOperation, AdminInterviewBooking, AdminMemberExportRow, AdminMemberInvite, AdminMemberOperation, AdminMemberRole, AdminMemberStatus, AdminNotificationPrefs, AdminPaymentOperation, AdminPaymentOperationResult, AdminPaymentSummary, AdminPaymentsPage, AdminScholarshipsPage, AdminShelter, AdminShelterOperation, AdminShift, AdminShiftType, AdminTicketRow, AdminWebhooksPage, Application, ApplicationActivityItem, ApplicationAdmin, ApplicationAnnotations, ApplicationCapacity, ApplicationCreatePayload, ApplicationCreateResponse, ApplicationNote, ApplicationScore, ApplicationStatus, ApplicationTransitionPayload, ApplicationTransitionResponse, ApplicationWorkflowInput, ApplicationWorkflowOptions, BikeRentalCatalogItem, BikeRentalCatalogResponse, BikeRentalDeliveryMode, BikeRentalFramePreference, BikeRentalInterestedMember, BikeRentalInterestedNotReservedResponse, BikeRentalRequestInput, BikeRentalRequestResult, BikeRentalReservation, BikeRentalReservationListResponse, BikeRentalWaiver, BookkeepingAdminOperation, BookkeepingExportPreview, BuildStrikeReportRow, CampDocumentDownloadUrl, CampDocumentSignature, CampDocumentSignaturesResponse, CampSettingsOperation, CampYearWithCounts, Commitment, CommitmentDataType, CommitmentValue, CommitmentsListResponse, ContactSyncResponse, ContractSection, CreateMeetingInput, CreateSapAssignmentInput, CreateScholarshipInput, DailyHeadcount, DashboardMetrics, DirectoryMember, DirectoryMembersListResponse, DocumentWriteInput, DuesStatus, DuesSummaryRow, DuesTypePayor, EmailCmsPreview, EmailComposerOptions, EmailDeliveryPage, EmailLog, EmailRecipient, EmailRecipientFilter, EmailRetry, EmailRetryCount, EmailRetryListResponse, EmailSegmentKey, EmailTemplate, ExchangeParams, ExchangeResult, ImageUploadTarget, ImportantDate, InterviewFeedBooking, ListingImage, LogisticsBreakdowns, LogisticsSummary, MarketplaceFlagReason, Meeting, MeetingDateOption, MeetingListResponse, MeetingRsvp, Member, MemberBikeStatus, MemberBootstrap, MemberCreatePayload, MemberCreateResponse, MemberCustomChecklistItem, MemberDashboard, MemberDeactivateResponse, MemberDevice, MemberDocumentPage, MemberDuesStatus, MemberInboxNotification, MemberInboxPage, MemberOnboardingUpdate, MemberPreferences, MemberProfileDetails, MemberPushPreferences, MemberRole, MemberSelfProfile, MemberSelfProfilePatch, MemberShelter, MemberShelterPage, MemberShiftView, MemberTag, MemberTagAssignment, MemberTagWithMemberCount, MemberUpdatePayload, MemberUpdateResponse, MobileShifts, NewListingInput, OnboardingChecklistCategory, OnboardingChecklistItem, OnboardingProgress, OrgConfig, OwnerShelterCreate, OwnerShelterPatch, PackingCampAdminItem, PackingCampAdminList, PackingCampCategory, PackingCampCategoryInput, PackingCampItem, PackingContainer, PackingContainerInput, PackingContainerListResponse, PackingContainerType, PackingItem, PackingItemStatus, PackingLayer, PackingListResponse, PackingPersonalItem, PackingPlacementListResponse, PaymentPageResponse, PublicMarketplaceClient, PublicMarketplaceClientOptions, RvAmperageTotal, SapAllocation, SapAssignment, SapDayAllocation, SchedulingAdminOperation, SchedulingAdminResult, SchedulingAdminSettings, SchedulingAvailability, SchedulingOverride, Scholarship, ScholarshipStats, ScholarshipStatus, SetPhotoPayload, SheetsSyncResult, ShelterTypeDistribution, Shift, ShiftAdminOperation, ShiftAdminOperationResult, ShiftAdminWorkflow, ShiftAdminWorkflowResult, ShiftPlannerData, ShiftSignup, ShiftType, SummerCampAttendee, SummerCampEvent, SummerCampRsvp, SummerCampRsvpInput, Ticket, TicketStatus, TicketUpdateInput, TshirtSizeTotal, UnmatchedRefund, UnsureDateMember, UpdateSapAllocationInput, UpdateSapAssignmentInput, UpsertPackingCampItemInput, UpsertSapDayAllocationInput, VehiclePass, VehiclePassStatus, VehiclePassUpdateInput, Waiver, WaiverContent, WaiverSection, WaiverSignPayload, WaiverSignResponse, WaiverStatus, WebhookCandidate, WebhookLog, WebhookMatchSelection };
|
|
4890
|
+
export type { AccountReviewProfile, AdminAccountsOperation, AdminAccountsPage, AdminBikeInterestRow, AdminBikeInventory, AdminBikeOperation, AdminBikeOperationResult, AdminBikeRental, AdminBikeType, AdminCampDocument, AdminCampSettings, AdminDocumentSignature, AdminGivebutterCatalog, AdminGivebutterCatalogOperation, AdminGivebutterWidgetOperation, AdminGivebutterWidgets, AdminImportOperation, AdminImportResult, AdminImportRow, AdminImportantDate, AdminImportantDateInput, AdminImportantDateOperation, AdminInterviewBooking, AdminMemberExportRow, AdminMemberInvite, AdminMemberOperation, AdminMemberRole, AdminMemberStatus, AdminNotificationPrefs, AdminPaymentOperation, AdminPaymentOperationResult, AdminPaymentSummary, AdminPaymentsPage, AdminScholarshipsPage, AdminShelter, AdminShelterOperation, AdminShift, AdminShiftType, AdminTicketRow, AdminWebhooksPage, Application, ApplicationActivityItem, ApplicationAdmin, ApplicationAnnotations, ApplicationCapacity, ApplicationCreatePayload, ApplicationCreateResponse, ApplicationEvent, ApplicationNote, ApplicationScore, ApplicationStatus, ApplicationTransitionPayload, ApplicationTransitionResponse, ApplicationWorkflowCapabilities, ApplicationWorkflowInput, ApplicationWorkflowOptions, AvailabilityWindow, BikeRentalCatalogItem, BikeRentalCatalogResponse, BikeRentalDeliveryMode, BikeRentalFramePreference, BikeRentalInterestedMember, BikeRentalInterestedNotReservedResponse, BikeRentalRequestInput, BikeRentalRequestResult, BikeRentalReservation, BikeRentalReservationListResponse, BikeRentalWaiver, BookkeepingAdminOperation, BookkeepingExportPreview, BuildStrikeReportRow, CampDocumentDownloadUrl, CampDocumentSignature, CampDocumentSignaturesResponse, CampSettingsOperation, CampYearWithCounts, Commitment, CommitmentDataType, CommitmentValue, CommitmentsListResponse, ContactSyncResponse, ContractSection, CreateMeetingInput, CreateSapAssignmentInput, CreateScholarshipInput, DailyHeadcount, DashboardMetrics, DirectoryMember, DirectoryMembersListResponse, DocumentWriteInput, DuesStatus, DuesSummaryRow, DuesTypePayor, EmailCmsPreview, EmailComposerOptions, EmailDeliveryPage, EmailLog, EmailRecipient, EmailRecipientFilter, EmailRetry, EmailRetryCount, EmailRetryListResponse, EmailSegmentKey, EmailTemplate, EventScopeParams, EventStatus, EventSummary, ExchangeParams, ExchangeResult, ImageUploadTarget, ImportantDate, InterviewFeedBooking, ListingImage, LogisticsBreakdowns, LogisticsSummary, MarketplaceFlagReason, Meeting, MeetingDateOption, MeetingListResponse, MeetingRsvp, Member, MemberBikeStatus, MemberBootstrap, MemberCreatePayload, MemberCreateResponse, MemberCustomChecklistItem, MemberDashboard, MemberDeactivateResponse, MemberDevice, MemberDocumentPage, MemberDuesStatus, MemberGateId, MemberGatePlan, MemberGateStep, MemberInboxNotification, MemberInboxPage, MemberOnboardingUpdate, MemberPaymentsOverview, MemberPreferences, MemberProfileDetails, MemberPushPreferences, MemberRole, MemberSelfProfile, MemberSelfProfilePatch, MemberShelter, MemberShelterPage, MemberShiftView, MemberTag, MemberTagAssignment, MemberTagWithMemberCount, MemberUpdatePayload, MemberUpdateResponse, MobileShifts, NewListingInput, OnboardingChecklistCategory, OnboardingChecklistItem, OnboardingProgress, OrgConfig, OrgEvent, OwnerShelterCreate, OwnerShelterPatch, PackingCampAdminItem, PackingCampAdminList, PackingCampCategory, PackingCampCategoryInput, PackingCampItem, PackingContainer, PackingContainerInput, PackingContainerListResponse, PackingContainerType, PackingItem, PackingItemStatus, PackingLayer, PackingListResponse, PackingPersonalItem, PackingPlacementListResponse, PaymentPageResponse, PublicMarketplaceClient, PublicMarketplaceClientOptions, RvAmperageTotal, SapAllocation, SapAssignment, SapDayAllocation, SchedulingAdminOperation, SchedulingAdminResult, SchedulingAdminSettings, SchedulingAvailability, SchedulingOverride, Scholarship, ScholarshipStats, ScholarshipStatus, SetPhotoPayload, SheetsSyncResult, ShelterTypeDistribution, Shift, ShiftAdminOperation, ShiftAdminOperationResult, ShiftAdminWorkflow, ShiftAdminWorkflowResult, ShiftPlannerData, ShiftSignup, ShiftType, SummerCampAttendee, SummerCampEvent, SummerCampRsvp, SummerCampRsvpInput, Ticket, TicketStatus, TicketUpdateInput, TshirtSizeTotal, UnmatchedRefund, UnsureDateMember, UpdateSapAllocationInput, UpdateSapAssignmentInput, UpsertPackingCampItemInput, UpsertSapDayAllocationInput, VehiclePass, VehiclePassStatus, VehiclePassUpdateInput, Waiver, WaiverContent, WaiverSection, WaiverSignPayload, WaiverSignResponse, WaiverStatus, WebhookCandidate, WebhookLog, WebhookMatchSelection };
|
|
4740
4891
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -69,9 +69,10 @@ async function getEmbedAuthed(url, campKey, opts) {
|
|
|
69
69
|
if (!res.ok) throw await parseError(res);
|
|
70
70
|
return res.json();
|
|
71
71
|
}
|
|
72
|
-
async function request(url, auth, signal) {
|
|
72
|
+
async function request(url, auth, signal, cache) {
|
|
73
73
|
const res = await fetch(url, {
|
|
74
74
|
headers: v1Headers(auth),
|
|
75
|
+
...cache ? { cache } : {},
|
|
75
76
|
signal
|
|
76
77
|
});
|
|
77
78
|
if (!res.ok) throw await parseError(res);
|
|
@@ -262,8 +263,13 @@ var PlayaOSClient = class PlayaOSClient {
|
|
|
262
263
|
adminSetPhoto: (id, payload, opts) => post(buildUrl(this.baseUrl, `/members/${encodeURIComponent(id)}/photo`), this.auth, payload, opts?.signal),
|
|
263
264
|
adminDeletePhoto: (id, opts) => sendV1("DELETE", buildUrl(this.baseUrl, `/members/${encodeURIComponent(id)}/photo`), this.auth, {}, opts?.signal),
|
|
264
265
|
updateOnboarding: (payload, opts) => sendV1("PATCH", buildUrl(this.baseUrl, "/members/me/onboarding"), this.auth, payload, opts?.signal),
|
|
265
|
-
bootstrap: (opts) => request(buildUrl(this.baseUrl, "/members/me/bootstrap"), this.auth, opts?.signal),
|
|
266
|
+
bootstrap: (opts) => request(buildUrl(this.baseUrl, "/members/me/bootstrap"), this.auth, opts?.signal, "no-store"),
|
|
267
|
+
gates: (opts) => request(buildUrl(this.baseUrl, "/members/me/gates"), this.auth, opts?.signal, "no-store"),
|
|
266
268
|
dashboard: (opts) => request(buildUrl(this.baseUrl, "/members/me/dashboard"), this.auth, opts?.signal),
|
|
269
|
+
/** Always the acting member, including admins; requires a member token and members:read scope. */
|
|
270
|
+
paymentOverview: (opts) => request(buildUrl(this.baseUrl, "/members/me/payment-overview"), this.auth, opts?.signal, "no-store"),
|
|
271
|
+
/** Acting member's original photo only; missing originals return 404, never an avatar fallback. */
|
|
272
|
+
selfPhotoDownloadUrl: (opts) => request(buildUrl(this.baseUrl, "/members/me/photo/download-url"), this.auth, opts?.signal, "no-store"),
|
|
267
273
|
/** Presigned profile-photo upload (PLA-1263). PUT the bytes, then setPhoto. */
|
|
268
274
|
createPhotoUploadUrl: (payload, opts) => post(buildUrl(this.baseUrl, "/members/me/photo/upload-url"), this.auth, payload, opts?.signal),
|
|
269
275
|
setPhoto: (payload, opts) => post(buildUrl(this.baseUrl, "/members/me/photo"), this.auth, payload, opts?.signal),
|
|
@@ -526,8 +532,11 @@ var PlayaOSClient = class PlayaOSClient {
|
|
|
526
532
|
* the model is sold out, 400 when it is unknown or no longer bookable.
|
|
527
533
|
*/
|
|
528
534
|
requestReservation: (payload, opts) => post(buildUrl(this.baseUrl, "/bike-rentals/requests"), this.auth, payload, opts?.signal),
|
|
529
|
-
/**
|
|
530
|
-
|
|
535
|
+
/**
|
|
536
|
+
* Members who said they want a bike but have no reservation, for one event or camp year. With
|
|
537
|
+
* no params, the camp's configured active camp year. Org key only.
|
|
538
|
+
*/
|
|
539
|
+
interestedNotReserved: (params, opts) => request(buildUrl(this.baseUrl, "/bike-rentals/interested-not-reserved", params), this.auth, opts?.signal)
|
|
531
540
|
};
|
|
532
541
|
tags = {
|
|
533
542
|
create: (payload, opts) => post(buildUrl(this.baseUrl, "/tags"), this.auth, payload, opts?.signal),
|
|
@@ -627,6 +636,9 @@ var PlayaOSClient = class PlayaOSClient {
|
|
|
627
636
|
/** Visible camp dates (PLA-1268), optionally pinned to a year. */
|
|
628
637
|
list: (params, opts) => request(buildUrl(this.baseUrl, "/important-dates", params), this.auth, opts?.signal)
|
|
629
638
|
};
|
|
639
|
+
events = {
|
|
640
|
+
/** The camp's events with the given status (default `published`), earliest first. */
|
|
641
|
+
list: (params, opts) => request(buildUrl(this.baseUrl, "/events", params), this.auth, opts?.signal) };
|
|
630
642
|
emails = {
|
|
631
643
|
recipients: (payload, opts) => post(buildUrl(this.baseUrl, "/email/recipients"), this.auth, payload, opts?.signal),
|
|
632
644
|
composerOptions: (params, opts) => request(buildUrl(this.baseUrl, "/email/composer-options", params), this.auth, opts?.signal),
|
|
@@ -784,17 +796,20 @@ send: (payload, opts) => (({ accessToken, signal }) => this.adminV1OrEmbed("POST
|
|
|
784
796
|
create: (payload, opts) => (({ accessToken, signal }) => this.adminV1OrEmbed("POST", "/dues", "/admin/dues", accessToken, payload, signal))(this.adminAccess(opts)),
|
|
785
797
|
/** Update a dues/payment record (PLA-708). Requires admin Bearer token. */
|
|
786
798
|
update: (id, payload, opts) => (({ accessToken, signal }) => this.adminV1OrEmbed("PATCH", `/dues/${encodeURIComponent(id)}`, `/admin/dues/${encodeURIComponent(id)}`, accessToken, payload, signal))(this.adminAccess(opts)),
|
|
787
|
-
/**
|
|
799
|
+
/**
|
|
800
|
+
* Per-member dues state for one event or camp year (PLA-1336, ADR-132). With no params, the
|
|
801
|
+
* configured active camp year. V1-only — requires a member token.
|
|
802
|
+
*/
|
|
788
803
|
status: (params, opts) => {
|
|
789
804
|
if (!this.memberToken) throw new Error("dues.status requires withMember(token)");
|
|
790
805
|
return request(buildUrl(this.baseUrl, "/admin/dues/status", params), this.auth, opts?.signal).then((r) => r.data);
|
|
791
806
|
},
|
|
792
|
-
/** Per-tier dues totals
|
|
807
|
+
/** Per-tier dues totals for one event or camp year (PLA-1336, ADR-132). V1-only — requires a member token. */
|
|
793
808
|
summary: (params, opts) => {
|
|
794
809
|
if (!this.memberToken) throw new Error("dues.summary requires withMember(token)");
|
|
795
810
|
return request(buildUrl(this.baseUrl, "/admin/dues/summary", params), this.auth, opts?.signal).then((r) => r.data);
|
|
796
811
|
},
|
|
797
|
-
/** Members who paid a given dues type (PLA-1336). V1-only — requires a member token. */
|
|
812
|
+
/** Members who paid a given dues type, for one event or camp year (PLA-1336, ADR-132). V1-only — requires a member token. */
|
|
798
813
|
payors: (params, opts) => {
|
|
799
814
|
if (!this.memberToken) throw new Error("dues.payors requires withMember(token)");
|
|
800
815
|
return request(buildUrl(this.baseUrl, "/admin/dues/payors", params), this.auth, opts?.signal).then((r) => r.data);
|