@playaos/api-client 0.55.0 → 0.56.2
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 +21 -0
- package/dist/index.d.ts +359 -9
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -125,3 +125,24 @@ try {
|
|
|
125
125
|
|
|
126
126
|
For AI agent access, use the companion [@playaos/mcp](https://www.npmjs.com/package/@playaos/mcp) package.
|
|
127
127
|
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
### Member-safe directory
|
|
131
|
+
|
|
132
|
+
`client.withMember(token).members.directory({ q, homeCity, attending, id, shelterId, shiftTypeId,
|
|
133
|
+
limit, offset })` calls `GET /api/v1/members?directory=true`. It requires a camp member token,
|
|
134
|
+
returns display-safe `DirectoryMember` rows and a filtered `total`, and uses the same safe projection
|
|
135
|
+
for admin callers. `q` matches real/playa names, not email; city/search input is literal. Optional
|
|
136
|
+
`id` selects one directory entry for detail without using the self/admin private profile endpoint.
|
|
137
|
+
Attendance and shift-type membership use the camp's active year. Apply filters before pagination;
|
|
138
|
+
missing/ineligible/cross-camp IDs give an empty page. Deploy the server contract before clients.
|
|
139
|
+
|
|
140
|
+
The typed helper is added on the migration branch and requires its next SDK publication; the
|
|
141
|
+
companion adapter uses a tested additive-query bridge on the already published 0.56 client.
|
|
142
|
+
|
|
143
|
+
### Member inbox (migration branch)
|
|
144
|
+
|
|
145
|
+
`client.withMember(jwt).notifications.inbox({ limit, offset })` returns own sent messages, total
|
|
146
|
+
and whole-inbox unread count. `notifications.markRead(ids)` acknowledges only those messages
|
|
147
|
+
(up to 100 IDs); it never calls `markSeen()`. Receipt state respects the existing portal high-water
|
|
148
|
+
mark. These helpers require the next SDK publication and the ADR-107 API/schema deployment.
|
package/dist/index.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ interface Member {
|
|
|
57
57
|
yearJoined?: number | null;
|
|
58
58
|
adminRoles?: string[] | null;
|
|
59
59
|
isDeveloper?: boolean | null;
|
|
60
|
+
burningManBefore?: boolean | null;
|
|
60
61
|
referredByUserId?: string | null;
|
|
61
62
|
birthday?: string | null;
|
|
62
63
|
dietaryRestrictions?: string[] | null;
|
|
@@ -173,6 +174,62 @@ interface ImportantDate {
|
|
|
173
174
|
category: string | null;
|
|
174
175
|
year: number;
|
|
175
176
|
}
|
|
177
|
+
interface SummerCampAttendee {
|
|
178
|
+
profileId: string;
|
|
179
|
+
nightsAttending: string[];
|
|
180
|
+
isDayTripOnly: boolean;
|
|
181
|
+
profile: {
|
|
182
|
+
name: string | null;
|
|
183
|
+
playaName: string | null;
|
|
184
|
+
profilePhotoPath: string | null;
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
interface SheetsSyncResult {
|
|
188
|
+
year: number;
|
|
189
|
+
tabs: {
|
|
190
|
+
name: string;
|
|
191
|
+
rows: number;
|
|
192
|
+
}[];
|
|
193
|
+
}
|
|
194
|
+
interface AdminWebhooksPage {
|
|
195
|
+
logs: {
|
|
196
|
+
id: string;
|
|
197
|
+
provider: string;
|
|
198
|
+
eventType: string;
|
|
199
|
+
processingStatus: string | null;
|
|
200
|
+
errorMessage: string | null;
|
|
201
|
+
createdAt: string | null;
|
|
202
|
+
processedAt: string | null;
|
|
203
|
+
payload: unknown;
|
|
204
|
+
}[];
|
|
205
|
+
queueStatus: {
|
|
206
|
+
queueName: string;
|
|
207
|
+
queueDepth: number;
|
|
208
|
+
maxReadCount: number;
|
|
209
|
+
oldestEnqueuedAt: string | null;
|
|
210
|
+
archivedCount: number;
|
|
211
|
+
latestArchivedAt: string | null;
|
|
212
|
+
}[];
|
|
213
|
+
}
|
|
214
|
+
interface WebhookCandidate {
|
|
215
|
+
id: string;
|
|
216
|
+
name: string;
|
|
217
|
+
email: string;
|
|
218
|
+
phone: string | null;
|
|
219
|
+
status: string;
|
|
220
|
+
signals: {
|
|
221
|
+
name: "exact" | "partial" | "none";
|
|
222
|
+
phone: "exact" | "none";
|
|
223
|
+
};
|
|
224
|
+
score: number;
|
|
225
|
+
}
|
|
226
|
+
type WebhookMatchSelection = {
|
|
227
|
+
kind: "candidate";
|
|
228
|
+
profileId: string;
|
|
229
|
+
} | {
|
|
230
|
+
kind: "email";
|
|
231
|
+
email: string;
|
|
232
|
+
};
|
|
176
233
|
interface SummerCampEvent {
|
|
177
234
|
id: string;
|
|
178
235
|
name: string;
|
|
@@ -186,9 +243,20 @@ interface SummerCampEvent {
|
|
|
186
243
|
registrationDeadline: string | null;
|
|
187
244
|
availableNights: string[];
|
|
188
245
|
costPerNight: string | null;
|
|
246
|
+
heroImageUrl: string | null;
|
|
247
|
+
detailsMarkdown: string | null;
|
|
248
|
+
itinerary: unknown;
|
|
249
|
+
packingList: unknown;
|
|
250
|
+
directionsUrl: string | null;
|
|
251
|
+
directionsNotes: string | null;
|
|
252
|
+
groupChatUrl: string | null;
|
|
253
|
+
airbnbCostPerPerson: string | null;
|
|
254
|
+
foodCostPerPerson: string | null;
|
|
189
255
|
}
|
|
190
256
|
type SummerCampRsvpStatus = "pending" | "confirmed" | "cancelled";
|
|
191
257
|
interface SummerCampRsvp {
|
|
258
|
+
owesFood: boolean;
|
|
259
|
+
amountPaid: string;
|
|
192
260
|
id: string;
|
|
193
261
|
eventId: string;
|
|
194
262
|
status: SummerCampRsvpStatus;
|
|
@@ -521,6 +589,7 @@ interface AdminShelter {
|
|
|
521
589
|
}>;
|
|
522
590
|
}
|
|
523
591
|
interface OrgConfig {
|
|
592
|
+
activeCampYear: number;
|
|
524
593
|
id: string;
|
|
525
594
|
name: string;
|
|
526
595
|
slug: string;
|
|
@@ -1774,6 +1843,8 @@ interface MemberTravelUpdate {
|
|
|
1774
1843
|
cookOrCleanPreference?: "cook" | "clean" | "no_preference" | null;
|
|
1775
1844
|
}
|
|
1776
1845
|
interface MemberSelfProfilePatch {
|
|
1846
|
+
/** Replace attendance history through the current calendar year without deleting annual records. */
|
|
1847
|
+
yearsAttended?: number[];
|
|
1777
1848
|
profile?: MemberProfileUpdate;
|
|
1778
1849
|
campYear?: MemberTravelUpdate;
|
|
1779
1850
|
year?: number;
|
|
@@ -2508,6 +2579,156 @@ type AdminGivebutterCatalogOperation = {
|
|
|
2508
2579
|
campaignId: number;
|
|
2509
2580
|
itemId: number;
|
|
2510
2581
|
};
|
|
2582
|
+
type PackingContainerType = "hdx_tote" | "suitcase" | "box" | "bag" | "other";
|
|
2583
|
+
interface PackingContainer {
|
|
2584
|
+
id: string;
|
|
2585
|
+
name: string;
|
|
2586
|
+
type: PackingContainerType;
|
|
2587
|
+
size: string | null;
|
|
2588
|
+
description: string | null;
|
|
2589
|
+
}
|
|
2590
|
+
interface PackingContainerInput {
|
|
2591
|
+
name: string;
|
|
2592
|
+
type?: PackingContainerType;
|
|
2593
|
+
size?: string | null;
|
|
2594
|
+
description?: string | null;
|
|
2595
|
+
year: number;
|
|
2596
|
+
}
|
|
2597
|
+
interface PackingContainerListResponse {
|
|
2598
|
+
containers: (PackingContainer & {
|
|
2599
|
+
itemCount: number;
|
|
2600
|
+
})[];
|
|
2601
|
+
year: number;
|
|
2602
|
+
}
|
|
2603
|
+
interface PackingPlacementListResponse {
|
|
2604
|
+
items: PackingItem[];
|
|
2605
|
+
year: number;
|
|
2606
|
+
total: number;
|
|
2607
|
+
}
|
|
2608
|
+
interface AdminInterviewBooking {
|
|
2609
|
+
id: string;
|
|
2610
|
+
applicationId: string;
|
|
2611
|
+
startsAt: string;
|
|
2612
|
+
endsAt: string;
|
|
2613
|
+
candidateName: string;
|
|
2614
|
+
candidateEmail: string;
|
|
2615
|
+
timezone: string;
|
|
2616
|
+
}
|
|
2617
|
+
interface AccountReviewProfile {
|
|
2618
|
+
id: string;
|
|
2619
|
+
firstName: string;
|
|
2620
|
+
lastName: string;
|
|
2621
|
+
email: string | null;
|
|
2622
|
+
status: string | null;
|
|
2623
|
+
role: string | null;
|
|
2624
|
+
supabaseUserId: string | null;
|
|
2625
|
+
createdAt: string | null;
|
|
2626
|
+
provider: string | null;
|
|
2627
|
+
lastSignIn: string | null;
|
|
2628
|
+
}
|
|
2629
|
+
interface AdminAccountsPage {
|
|
2630
|
+
duplicates: {
|
|
2631
|
+
normalizedName: string;
|
|
2632
|
+
distance: number;
|
|
2633
|
+
profiles: (AccountReviewProfile & {
|
|
2634
|
+
applicationCount: number;
|
|
2635
|
+
campYears: number[];
|
|
2636
|
+
campYearCount: number;
|
|
2637
|
+
})[];
|
|
2638
|
+
}[];
|
|
2639
|
+
needsAttention: (AccountReviewProfile & {
|
|
2640
|
+
category: "registered-admin" | "registered-member" | "new-user-signed-in";
|
|
2641
|
+
applicationCount: number;
|
|
2642
|
+
})[];
|
|
2643
|
+
orphans: {
|
|
2644
|
+
id: string;
|
|
2645
|
+
email: string | null;
|
|
2646
|
+
createdAt: string | null;
|
|
2647
|
+
invitedAt: string | null;
|
|
2648
|
+
provider: null;
|
|
2649
|
+
}[];
|
|
2650
|
+
}
|
|
2651
|
+
type AdminAccountsOperation = {
|
|
2652
|
+
action: "promote" | "delete";
|
|
2653
|
+
profileIds: string[];
|
|
2654
|
+
} | {
|
|
2655
|
+
action: "dismiss";
|
|
2656
|
+
profileIdA: string;
|
|
2657
|
+
profileIdB: string;
|
|
2658
|
+
} | {
|
|
2659
|
+
action: "merge";
|
|
2660
|
+
primaryId: string;
|
|
2661
|
+
duplicateId: string;
|
|
2662
|
+
};
|
|
2663
|
+
interface AdminBikeInterestRow {
|
|
2664
|
+
userId: string;
|
|
2665
|
+
wantsBikeRental: boolean | null;
|
|
2666
|
+
bikeTypePreference: string | null;
|
|
2667
|
+
arrivalDate: string | null;
|
|
2668
|
+
attendanceResponse: string | null;
|
|
2669
|
+
transportMode: string | null;
|
|
2670
|
+
shelterWizardDone: boolean | null;
|
|
2671
|
+
hasConfirmedShelter: boolean;
|
|
2672
|
+
hasUnsignedDocuments: boolean;
|
|
2673
|
+
profiles: {
|
|
2674
|
+
name: string | null;
|
|
2675
|
+
email: string | null;
|
|
2676
|
+
firstName: string | null;
|
|
2677
|
+
lastName: string | null;
|
|
2678
|
+
phone: string | null;
|
|
2679
|
+
emergencyContactName: string | null;
|
|
2680
|
+
emergencyContactPhone: string | null;
|
|
2681
|
+
dietaryRestrictions: string[] | null;
|
|
2682
|
+
tshirtSize: string | null;
|
|
2683
|
+
onboardingPasswordDone: boolean | null;
|
|
2684
|
+
} | null;
|
|
2685
|
+
}
|
|
2686
|
+
/** Fixed display-safe summary from GET /members?directory=true (ADR-106). */
|
|
2687
|
+
interface DirectoryMember {
|
|
2688
|
+
id: string;
|
|
2689
|
+
name: string | null;
|
|
2690
|
+
playaName: string | null;
|
|
2691
|
+
directoryNameDisplay: string | null;
|
|
2692
|
+
profilePhotoPath: string | null;
|
|
2693
|
+
homeCity: string | null;
|
|
2694
|
+
role: string | null;
|
|
2695
|
+
bio: string | null;
|
|
2696
|
+
yearJoined: number | null;
|
|
2697
|
+
is747Alumni: boolean;
|
|
2698
|
+
showSocialsInDirectory: boolean;
|
|
2699
|
+
socialMedia: Record<string, unknown> | null;
|
|
2700
|
+
yearsAttended: number[];
|
|
2701
|
+
attendanceResponse: string | null;
|
|
2702
|
+
}
|
|
2703
|
+
interface DirectoryMembersListResponse extends Paginated<DirectoryMember> {
|
|
2704
|
+
total: number;
|
|
2705
|
+
}
|
|
2706
|
+
/** Acting member only; operational recipient/error metadata is excluded. */
|
|
2707
|
+
interface MemberInboxNotification {
|
|
2708
|
+
id: string;
|
|
2709
|
+
category: string;
|
|
2710
|
+
title: string;
|
|
2711
|
+
body: string;
|
|
2712
|
+
data: {
|
|
2713
|
+
link: string;
|
|
2714
|
+
} | null;
|
|
2715
|
+
sentAt: string | null;
|
|
2716
|
+
createdAt: string;
|
|
2717
|
+
readAt: string | null;
|
|
2718
|
+
}
|
|
2719
|
+
interface MemberInboxPage {
|
|
2720
|
+
notifications: MemberInboxNotification[];
|
|
2721
|
+
total: number;
|
|
2722
|
+
unreadCount: number;
|
|
2723
|
+
}
|
|
2724
|
+
/** An original can be replaced without uploading/replacing the existing avatar. */
|
|
2725
|
+
type SetPhotoPayload = {
|
|
2726
|
+
key: string;
|
|
2727
|
+
originalKey?: string | null;
|
|
2728
|
+
} | {
|
|
2729
|
+
key?: string;
|
|
2730
|
+
originalKey: string;
|
|
2731
|
+
};
|
|
2511
2732
|
//#endregion
|
|
2512
2733
|
//#region src/client.d.ts
|
|
2513
2734
|
interface ClientOptions {
|
|
@@ -2627,6 +2848,9 @@ export declare class PlayaOSClient {
|
|
|
2627
2848
|
}>;
|
|
2628
2849
|
};
|
|
2629
2850
|
readonly scheduling: {
|
|
2851
|
+
booking: (id: string, opts?: {
|
|
2852
|
+
signal?: AbortSignal;
|
|
2853
|
+
}) => Promise<AdminInterviewBooking>;
|
|
2630
2854
|
adminSettings: (opts?: {
|
|
2631
2855
|
signal?: AbortSignal;
|
|
2632
2856
|
}) => Promise<SchedulingAdminSettings>;
|
|
@@ -2725,10 +2949,7 @@ export declare class PlayaOSClient {
|
|
|
2725
2949
|
token: string;
|
|
2726
2950
|
key: string;
|
|
2727
2951
|
}>;
|
|
2728
|
-
adminSetPhoto: (id: string, payload: {
|
|
2729
|
-
key: string;
|
|
2730
|
-
originalKey?: string | null;
|
|
2731
|
-
}, opts?: {
|
|
2952
|
+
adminSetPhoto: (id: string, payload: SetPhotoPayload, opts?: {
|
|
2732
2953
|
signal?: AbortSignal;
|
|
2733
2954
|
}) => Promise<{
|
|
2734
2955
|
avatarUrl: string;
|
|
@@ -2763,10 +2984,7 @@ export declare class PlayaOSClient {
|
|
|
2763
2984
|
token: string;
|
|
2764
2985
|
key: string;
|
|
2765
2986
|
}>;
|
|
2766
|
-
setPhoto: (payload: {
|
|
2767
|
-
key: string;
|
|
2768
|
-
originalKey?: string | null;
|
|
2769
|
-
}, opts?: {
|
|
2987
|
+
setPhoto: (payload: SetPhotoPayload, opts?: {
|
|
2770
2988
|
signal?: AbortSignal;
|
|
2771
2989
|
}) => Promise<{
|
|
2772
2990
|
avatarUrl: string;
|
|
@@ -2825,6 +3043,18 @@ export declare class PlayaOSClient {
|
|
|
2825
3043
|
}, opts?: {
|
|
2826
3044
|
signal?: AbortSignal;
|
|
2827
3045
|
}) => Promise<MembersListResponse>;
|
|
3046
|
+
/** Verified-member, fixed-safe directory list/detail; filters precede pagination. */
|
|
3047
|
+
directory: (params?: PaginationParams & {
|
|
3048
|
+
offset?: number;
|
|
3049
|
+
q?: string;
|
|
3050
|
+
id?: string;
|
|
3051
|
+
homeCity?: string;
|
|
3052
|
+
shelterId?: string;
|
|
3053
|
+
shiftTypeId?: string;
|
|
3054
|
+
attending?: "true" | "false";
|
|
3055
|
+
}, opts?: {
|
|
3056
|
+
signal?: AbortSignal;
|
|
3057
|
+
}) => Promise<DirectoryMembersListResponse>;
|
|
2828
3058
|
/**
|
|
2829
3059
|
* Full profile (phone, emergency contact). Requires a member token; pass
|
|
2830
3060
|
* `"me"` for the acting member — non-admins may fetch only themselves.
|
|
@@ -2891,6 +3121,9 @@ export declare class PlayaOSClient {
|
|
|
2891
3121
|
};
|
|
2892
3122
|
/** Summer-camp events + the acting member's RSVP (PLA-1270). */
|
|
2893
3123
|
readonly summerCamp: {
|
|
3124
|
+
listAttendees: (eventId: string, opts?: {
|
|
3125
|
+
signal?: AbortSignal;
|
|
3126
|
+
}) => Promise<SummerCampAttendee[]>;
|
|
2894
3127
|
listEvents: (opts?: {
|
|
2895
3128
|
signal?: AbortSignal;
|
|
2896
3129
|
}) => Promise<SummerCampEvent[]>;
|
|
@@ -3112,6 +3345,9 @@ export declare class PlayaOSClient {
|
|
|
3112
3345
|
};
|
|
3113
3346
|
/** Bookkeeping reads (PLA-1345): camp-year list + ops-binder export preview. */
|
|
3114
3347
|
readonly bookkeeping: {
|
|
3348
|
+
syncGoogleSheets: (opts?: {
|
|
3349
|
+
signal?: AbortSignal;
|
|
3350
|
+
}) => Promise<SheetsSyncResult>;
|
|
3115
3351
|
adminOperation: (payload: BookkeepingAdminOperation, opts?: {
|
|
3116
3352
|
signal?: AbortSignal;
|
|
3117
3353
|
}) => Promise<{
|
|
@@ -3140,6 +3376,17 @@ export declare class PlayaOSClient {
|
|
|
3140
3376
|
}) => Promise<Paginated<WebhookLog>>;
|
|
3141
3377
|
};
|
|
3142
3378
|
readonly notifications: {
|
|
3379
|
+
inbox: (params?: {
|
|
3380
|
+
limit?: number;
|
|
3381
|
+
offset?: number;
|
|
3382
|
+
}, opts?: {
|
|
3383
|
+
signal?: AbortSignal;
|
|
3384
|
+
}) => Promise<MemberInboxPage>;
|
|
3385
|
+
markRead: (notificationIds: string[], opts?: {
|
|
3386
|
+
signal?: AbortSignal;
|
|
3387
|
+
}) => Promise<{
|
|
3388
|
+
success: true;
|
|
3389
|
+
}>;
|
|
3143
3390
|
dispatch: (payload: {
|
|
3144
3391
|
audience: "all" | "member" | "admin";
|
|
3145
3392
|
title: string;
|
|
@@ -3509,6 +3756,14 @@ export declare class PlayaOSClient {
|
|
|
3509
3756
|
}>;
|
|
3510
3757
|
};
|
|
3511
3758
|
readonly bikes: {
|
|
3759
|
+
adminInterest: (params?: {
|
|
3760
|
+
year?: number;
|
|
3761
|
+
}, opts?: {
|
|
3762
|
+
signal?: AbortSignal;
|
|
3763
|
+
}) => Promise<{
|
|
3764
|
+
year: number;
|
|
3765
|
+
data: AdminBikeInterestRow[];
|
|
3766
|
+
}>;
|
|
3512
3767
|
adminOperation: (payload: AdminBikeOperation, opts?: {
|
|
3513
3768
|
signal?: AbortSignal;
|
|
3514
3769
|
}) => Promise<AdminBikeOperationResult>;
|
|
@@ -3658,6 +3913,59 @@ export declare class PlayaOSClient {
|
|
|
3658
3913
|
* and 401 on an org key alone.
|
|
3659
3914
|
*/
|
|
3660
3915
|
readonly packing: {
|
|
3916
|
+
containers: {
|
|
3917
|
+
list: (params?: {
|
|
3918
|
+
year?: number;
|
|
3919
|
+
}, opts?: {
|
|
3920
|
+
signal?: AbortSignal;
|
|
3921
|
+
}) => Promise<PackingContainerListResponse>;
|
|
3922
|
+
create: (payload: PackingContainerInput, opts?: {
|
|
3923
|
+
signal?: AbortSignal;
|
|
3924
|
+
}) => Promise<{
|
|
3925
|
+
id: string;
|
|
3926
|
+
}>;
|
|
3927
|
+
update: (id: string, payload: Partial<Omit<PackingContainerInput, "year">> & {
|
|
3928
|
+
year: number;
|
|
3929
|
+
}, opts?: {
|
|
3930
|
+
signal?: AbortSignal;
|
|
3931
|
+
}) => Promise<PackingContainer>;
|
|
3932
|
+
remove: (id: string, params: {
|
|
3933
|
+
year: number;
|
|
3934
|
+
}, opts?: {
|
|
3935
|
+
signal?: AbortSignal;
|
|
3936
|
+
}) => Promise<{
|
|
3937
|
+
ok: true;
|
|
3938
|
+
}>;
|
|
3939
|
+
};
|
|
3940
|
+
placements: {
|
|
3941
|
+
list: (params?: {
|
|
3942
|
+
year?: number;
|
|
3943
|
+
shelter?: string;
|
|
3944
|
+
filter?: "packed" | "unpacked";
|
|
3945
|
+
containerId?: string;
|
|
3946
|
+
}, opts?: {
|
|
3947
|
+
signal?: AbortSignal;
|
|
3948
|
+
}) => Promise<PackingPlacementListResponse>;
|
|
3949
|
+
place: (payload: {
|
|
3950
|
+
slug: string;
|
|
3951
|
+
containerId: string;
|
|
3952
|
+
year: number;
|
|
3953
|
+
shelter?: string;
|
|
3954
|
+
}, opts?: {
|
|
3955
|
+
signal?: AbortSignal;
|
|
3956
|
+
}) => Promise<{
|
|
3957
|
+
ok: true;
|
|
3958
|
+
}>;
|
|
3959
|
+
unpack: (payload: {
|
|
3960
|
+
slug: string;
|
|
3961
|
+
year: number;
|
|
3962
|
+
shelter?: string;
|
|
3963
|
+
}, opts?: {
|
|
3964
|
+
signal?: AbortSignal;
|
|
3965
|
+
}) => Promise<{
|
|
3966
|
+
ok: true;
|
|
3967
|
+
}>;
|
|
3968
|
+
};
|
|
3661
3969
|
/** The resolved list: curated base + camp layer + personal layer (ADR-071). */
|
|
3662
3970
|
list: (params?: {
|
|
3663
3971
|
year?: number;
|
|
@@ -3860,6 +4168,8 @@ export declare class PlayaOSClient {
|
|
|
3860
4168
|
signal?: AbortSignal;
|
|
3861
4169
|
}) => Promise<{
|
|
3862
4170
|
success: true;
|
|
4171
|
+
status?: "queued" | "sent";
|
|
4172
|
+
broadcastId?: string;
|
|
3863
4173
|
sent: number;
|
|
3864
4174
|
failed: number;
|
|
3865
4175
|
total: number;
|
|
@@ -3871,6 +4181,8 @@ export declare class PlayaOSClient {
|
|
|
3871
4181
|
id: string;
|
|
3872
4182
|
subject: string;
|
|
3873
4183
|
recipientCount: number | null;
|
|
4184
|
+
preparationStatus?: string | null;
|
|
4185
|
+
preparationError?: string | null;
|
|
3874
4186
|
sentAt: string | null;
|
|
3875
4187
|
senderName: string | null;
|
|
3876
4188
|
}[];
|
|
@@ -4005,6 +4317,44 @@ export declare class PlayaOSClient {
|
|
|
4005
4317
|
}) => Promise<OnboardingProgress>;
|
|
4006
4318
|
};
|
|
4007
4319
|
readonly admin: {
|
|
4320
|
+
accounts: {
|
|
4321
|
+
page: (opts?: {
|
|
4322
|
+
signal?: AbortSignal;
|
|
4323
|
+
}) => Promise<AdminAccountsPage>;
|
|
4324
|
+
operate: (payload: AdminAccountsOperation, opts?: {
|
|
4325
|
+
signal?: AbortSignal;
|
|
4326
|
+
}) => Promise<{
|
|
4327
|
+
success: true;
|
|
4328
|
+
}>;
|
|
4329
|
+
};
|
|
4330
|
+
webhooks: {
|
|
4331
|
+
page: (opts?: {
|
|
4332
|
+
signal?: AbortSignal;
|
|
4333
|
+
}) => Promise<AdminWebhooksPage>;
|
|
4334
|
+
candidates: (payer: {
|
|
4335
|
+
firstName: string | null;
|
|
4336
|
+
lastName: string | null;
|
|
4337
|
+
phone: string | null;
|
|
4338
|
+
}, opts?: {
|
|
4339
|
+
signal?: AbortSignal;
|
|
4340
|
+
}) => Promise<WebhookCandidate[]>;
|
|
4341
|
+
retry: (id: string, opts?: {
|
|
4342
|
+
signal?: AbortSignal;
|
|
4343
|
+
}) => Promise<{
|
|
4344
|
+
queued: true;
|
|
4345
|
+
}>;
|
|
4346
|
+
match: (id: string, selection: WebhookMatchSelection, opts?: {
|
|
4347
|
+
signal?: AbortSignal;
|
|
4348
|
+
}) => Promise<{
|
|
4349
|
+
queued: true;
|
|
4350
|
+
}>;
|
|
4351
|
+
retryFailed: (opts?: {
|
|
4352
|
+
signal?: AbortSignal;
|
|
4353
|
+
}) => Promise<{
|
|
4354
|
+
queued: number;
|
|
4355
|
+
failed: number;
|
|
4356
|
+
}>;
|
|
4357
|
+
};
|
|
4008
4358
|
applications: {
|
|
4009
4359
|
workflow: (id: string, payload: ApplicationWorkflowInput, opts?: {
|
|
4010
4360
|
signal?: AbortSignal;
|
|
@@ -4386,5 +4736,5 @@ interface PublicMarketplaceClient {
|
|
|
4386
4736
|
}
|
|
4387
4737
|
export declare function createPublicMarketplaceClient(opts: PublicMarketplaceClientOptions): PublicMarketplaceClient;
|
|
4388
4738
|
//#endregion
|
|
4389
|
-
export type { AdminBikeInventory, AdminBikeOperation, AdminBikeOperationResult, AdminBikeRental, AdminBikeType, AdminCampDocument, AdminCampSettings, AdminDocumentSignature, AdminGivebutterCatalog, AdminGivebutterCatalogOperation, AdminGivebutterWidgetOperation, AdminGivebutterWidgets, AdminImportOperation, AdminImportResult, AdminImportRow, AdminImportantDate, AdminImportantDateInput, AdminImportantDateOperation, AdminMemberExportRow, AdminMemberInvite, AdminMemberOperation, AdminMemberRole, AdminMemberStatus, AdminNotificationPrefs, AdminPaymentOperation, AdminPaymentOperationResult, AdminPaymentSummary, AdminPaymentsPage, AdminScholarshipsPage, AdminShelter, AdminShelterOperation, AdminShift, AdminShiftType, AdminTicketRow, 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, 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, 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, PackingItem, PackingItemStatus, PackingLayer, PackingListResponse, PackingPersonalItem, PaymentPageResponse, PublicMarketplaceClient, PublicMarketplaceClientOptions, RvAmperageTotal, SapAllocation, SapAssignment, SapDayAllocation, SchedulingAdminOperation, SchedulingAdminResult, SchedulingAdminSettings, SchedulingAvailability, SchedulingOverride, Scholarship, ScholarshipStats, ScholarshipStatus, ShelterTypeDistribution, Shift, ShiftAdminOperation, ShiftAdminOperationResult, ShiftAdminWorkflow, ShiftAdminWorkflowResult, ShiftPlannerData, ShiftSignup, ShiftType, Ticket, TicketStatus, TicketUpdateInput, TshirtSizeTotal, UnmatchedRefund, UnsureDateMember, UpdateSapAllocationInput, UpdateSapAssignmentInput, UpsertPackingCampItemInput, UpsertSapDayAllocationInput, VehiclePass, VehiclePassStatus, VehiclePassUpdateInput, Waiver, WaiverContent, WaiverSection, WaiverSignPayload, WaiverSignResponse, WaiverStatus, WebhookLog };
|
|
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 };
|
|
4390
4740
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -240,6 +240,7 @@ var PlayaOSClient = class PlayaOSClient {
|
|
|
240
240
|
update: (payload, opts) => post(buildUrl(this.baseUrl, "/admin/camp-settings"), this.auth, payload, opts?.signal)
|
|
241
241
|
};
|
|
242
242
|
scheduling = {
|
|
243
|
+
booking: (id, opts) => request(buildUrl(this.baseUrl, `/admin/scheduling/bookings/${encodeURIComponent(id)}`), this.auth, opts?.signal),
|
|
243
244
|
adminSettings: (opts) => request(buildUrl(this.baseUrl, "/admin/scheduling/settings"), this.auth, opts?.signal),
|
|
244
245
|
adminOperation: (payload, opts) => post(buildUrl(this.baseUrl, "/admin/scheduling/settings"), this.auth, payload, opts?.signal),
|
|
245
246
|
feed: (interviewerId, token, opts) => request(buildUrl(this.baseUrl, `/scheduling/feed/${encodeURIComponent(interviewerId)}`, { token }), this.auth, opts?.signal)
|
|
@@ -275,6 +276,11 @@ var PlayaOSClient = class PlayaOSClient {
|
|
|
275
276
|
getPreferences: (opts) => request(buildUrl(this.baseUrl, "/members/me/preferences"), this.auth, opts?.signal),
|
|
276
277
|
updatePreferences: (payload, opts) => sendV1("PATCH", buildUrl(this.baseUrl, "/members/me/preferences"), this.auth, payload, opts?.signal),
|
|
277
278
|
list: (params, opts) => request(buildUrl(this.baseUrl, "/members", params), this.auth, opts?.signal),
|
|
279
|
+
/** Verified-member, fixed-safe directory list/detail; filters precede pagination. */
|
|
280
|
+
directory: (params, opts) => request(buildUrl(this.baseUrl, "/members", {
|
|
281
|
+
...params,
|
|
282
|
+
directory: "true"
|
|
283
|
+
}), this.auth, opts?.signal),
|
|
278
284
|
/**
|
|
279
285
|
* Full profile (phone, emergency contact). Requires a member token; pass
|
|
280
286
|
* `"me"` for the acting member — non-admins may fetch only themselves.
|
|
@@ -306,6 +312,7 @@ var PlayaOSClient = class PlayaOSClient {
|
|
|
306
312
|
};
|
|
307
313
|
/** Summer-camp events + the acting member's RSVP (PLA-1270). */
|
|
308
314
|
summerCamp = {
|
|
315
|
+
listAttendees: (eventId, opts) => request(buildUrl(this.baseUrl, `/summer-camp/events/${encodeURIComponent(eventId)}/attendees`), this.auth, opts?.signal),
|
|
309
316
|
listEvents: (opts) => request(buildUrl(this.baseUrl, "/summer-camp/events"), this.auth, opts?.signal),
|
|
310
317
|
getMyRsvp: (eventId, opts) => request(buildUrl(this.baseUrl, `/summer-camp/events/${encodeURIComponent(eventId)}/rsvp`), this.auth, opts?.signal).then((r) => r.rsvp),
|
|
311
318
|
rsvp: (eventId, payload, opts) => sendV1("PUT", buildUrl(this.baseUrl, `/summer-camp/events/${encodeURIComponent(eventId)}/rsvp`), this.auth, payload, opts?.signal),
|
|
@@ -375,6 +382,7 @@ var PlayaOSClient = class PlayaOSClient {
|
|
|
375
382
|
};
|
|
376
383
|
/** Bookkeeping reads (PLA-1345): camp-year list + ops-binder export preview. */
|
|
377
384
|
bookkeeping = {
|
|
385
|
+
syncGoogleSheets: (opts) => post(buildUrl(this.baseUrl, "/admin/bookkeeping/sheets/sync"), this.auth, void 0, opts?.signal),
|
|
378
386
|
adminOperation: (payload, opts) => post(buildUrl(this.baseUrl, "/admin/bookkeeping/operations"), this.auth, payload, opts?.signal),
|
|
379
387
|
years: (opts) => request(buildUrl(this.baseUrl, "/bookkeeping/years"), this.auth, opts?.signal).then((r) => r.data),
|
|
380
388
|
exportPreview: (params, opts) => request(buildUrl(this.baseUrl, "/bookkeeping/export-preview", params), this.auth, opts?.signal)
|
|
@@ -385,6 +393,8 @@ var PlayaOSClient = class PlayaOSClient {
|
|
|
385
393
|
webhookLogs: (params, opts) => request(buildUrl(this.baseUrl, "/audit/webhook-logs", params), this.auth, opts?.signal)
|
|
386
394
|
};
|
|
387
395
|
notifications = {
|
|
396
|
+
inbox: (params, opts) => request(buildUrl(this.baseUrl, "/notifications/inbox", params), this.auth, opts?.signal),
|
|
397
|
+
markRead: (notificationIds, opts) => sendV1("PUT", buildUrl(this.baseUrl, "/notifications/inbox/read"), this.auth, { notificationIds }, opts?.signal),
|
|
388
398
|
dispatch: (payload, opts) => post(buildUrl(this.baseUrl, "/notifications/dispatch"), this.auth, payload, opts?.signal),
|
|
389
399
|
/** Set the acting member's notification high-water mark to now (PLA-1261). */
|
|
390
400
|
markSeen: (opts) => sendV1("PUT", buildUrl(this.baseUrl, "/notifications/seen"), this.auth, {}, opts?.signal),
|
|
@@ -479,6 +489,7 @@ var PlayaOSClient = class PlayaOSClient {
|
|
|
479
489
|
respond: (assignmentId, accept, opts) => sendV1("PUT", buildUrl(this.baseUrl, `/shelter-assignments/${encodeURIComponent(assignmentId)}/response`), this.auth, { accept }, opts?.signal)
|
|
480
490
|
};
|
|
481
491
|
bikes = {
|
|
492
|
+
adminInterest: (params, opts) => request(buildUrl(this.baseUrl, "/admin/bikes/interest", params), this.auth, opts?.signal),
|
|
482
493
|
adminOperation: (payload, opts) => post(buildUrl(this.baseUrl, "/admin/bikes/operations"), this.auth, payload, opts?.signal),
|
|
483
494
|
memberStatus: (params, opts) => request(buildUrl(this.baseUrl, "/members/me/bikes", params), this.auth, opts?.signal),
|
|
484
495
|
reserveForMember: (payload, opts) => post(buildUrl(this.baseUrl, "/members/me/bikes"), this.auth, payload, opts?.signal),
|
|
@@ -539,6 +550,17 @@ var PlayaOSClient = class PlayaOSClient {
|
|
|
539
550
|
* and 401 on an org key alone.
|
|
540
551
|
*/
|
|
541
552
|
packing = {
|
|
553
|
+
containers: {
|
|
554
|
+
list: (params, opts) => request(buildUrl(this.baseUrl, "/packing/containers", params), this.auth, opts?.signal),
|
|
555
|
+
create: (payload, opts) => post(buildUrl(this.baseUrl, "/packing/containers"), this.auth, payload, opts?.signal),
|
|
556
|
+
update: (id, payload, opts) => sendV1("PATCH", buildUrl(this.baseUrl, `/packing/containers/${encodeURIComponent(id)}`), this.auth, payload, opts?.signal),
|
|
557
|
+
remove: (id, params, opts) => sendV1("DELETE", buildUrl(this.baseUrl, `/packing/containers/${encodeURIComponent(id)}`, params), this.auth, void 0, opts?.signal)
|
|
558
|
+
},
|
|
559
|
+
placements: {
|
|
560
|
+
list: (params, opts) => request(buildUrl(this.baseUrl, "/packing/placements", params), this.auth, opts?.signal),
|
|
561
|
+
place: (payload, opts) => sendV1("PUT", buildUrl(this.baseUrl, "/packing/placements"), this.auth, payload, opts?.signal),
|
|
562
|
+
unpack: (payload, opts) => sendV1("DELETE", buildUrl(this.baseUrl, "/packing/placements"), this.auth, payload, opts?.signal)
|
|
563
|
+
},
|
|
542
564
|
/** The resolved list: curated base + camp layer + personal layer (ADR-071). */
|
|
543
565
|
list: (params, opts) => request(buildUrl(this.baseUrl, "/packing", params), this.auth, opts?.signal),
|
|
544
566
|
/**
|
|
@@ -657,6 +679,17 @@ var PlayaOSClient = class PlayaOSClient {
|
|
|
657
679
|
setProgress: (itemId, payload, opts) => sendV1("PUT", buildUrl(this.baseUrl, `/onboarding/progress/${encodeURIComponent(itemId)}`), this.auth, payload, opts?.signal)
|
|
658
680
|
};
|
|
659
681
|
admin = {
|
|
682
|
+
accounts: {
|
|
683
|
+
page: (opts) => request(buildUrl(this.baseUrl, "/admin/accounts"), this.auth, opts?.signal),
|
|
684
|
+
operate: (payload, opts) => post(buildUrl(this.baseUrl, "/admin/accounts"), this.auth, payload, opts?.signal)
|
|
685
|
+
},
|
|
686
|
+
webhooks: {
|
|
687
|
+
page: (opts) => request(buildUrl(this.baseUrl, "/admin/webhooks"), this.auth, opts?.signal),
|
|
688
|
+
candidates: (payer, opts) => post(buildUrl(this.baseUrl, "/admin/webhooks/candidates"), this.auth, payer, opts?.signal),
|
|
689
|
+
retry: (id, opts) => post(buildUrl(this.baseUrl, `/admin/webhooks/${encodeURIComponent(id)}/retry`), this.auth, void 0, opts?.signal),
|
|
690
|
+
match: (id, selection, opts) => post(buildUrl(this.baseUrl, `/admin/webhooks/${encodeURIComponent(id)}/match`), this.auth, selection, opts?.signal),
|
|
691
|
+
retryFailed: (opts) => post(buildUrl(this.baseUrl, "/admin/webhooks/retry-failed"), this.auth, void 0, opts?.signal)
|
|
692
|
+
},
|
|
660
693
|
applications: {
|
|
661
694
|
workflow: (id, payload, opts) => post(buildUrl(this.baseUrl, `/admin/applications/${encodeURIComponent(id)}/workflow`), this.auth, payload, opts?.signal),
|
|
662
695
|
workflowOptions: (params, opts) => request(buildUrl(this.baseUrl, "/admin/applications/workflow-options", params), this.auth, opts?.signal),
|