@headroom-cms/admin-api 0.1.4 → 0.1.6
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/dist/index.cjs +43 -0
- package/dist/index.d.cts +84 -3
- package/dist/index.d.ts +84 -3
- package/dist/index.js +43 -0
- package/dist/node.d.cts +83 -2
- package/dist/node.d.ts +83 -2
- package/dist/seed.d.cts +31 -1
- package/dist/seed.d.ts +31 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -236,6 +236,7 @@ var HeadroomAdminClient = class {
|
|
|
236
236
|
if (params?.status) qs.set("status", params.status);
|
|
237
237
|
if (params?.sort) qs.set("sort", params.sort);
|
|
238
238
|
if (params?.relatedTo) qs.set("relatedTo", params.relatedTo);
|
|
239
|
+
if (params?.relField) qs.set("relField", params.relField);
|
|
239
240
|
if (params?.limit) qs.set("limit", String(params.limit));
|
|
240
241
|
if (params?.cursor) qs.set("cursor", params.cursor);
|
|
241
242
|
const q = qs.toString();
|
|
@@ -531,11 +532,53 @@ var HeadroomAdminClient = class {
|
|
|
531
532
|
{ method: "DELETE" }
|
|
532
533
|
);
|
|
533
534
|
}
|
|
535
|
+
// ── Site Users (site-scoped) ──────────────────────
|
|
536
|
+
async listSiteUsers(host, params) {
|
|
537
|
+
const qs = new URLSearchParams();
|
|
538
|
+
if (params?.cursor) qs.set("cursor", params.cursor);
|
|
539
|
+
if (params?.limit) qs.set("limit", String(params.limit));
|
|
540
|
+
if (params?.tag) qs.set("tag", params.tag);
|
|
541
|
+
const query = qs.toString();
|
|
542
|
+
return this.apiFetch(
|
|
543
|
+
`/v1/admin/sites/${encodeURIComponent(host)}/site-users${query ? `?${query}` : ""}`
|
|
544
|
+
);
|
|
545
|
+
}
|
|
546
|
+
async getSiteUser(host, userId) {
|
|
547
|
+
return this.apiFetch(`/v1/admin/sites/${encodeURIComponent(host)}/site-users/${userId}`);
|
|
548
|
+
}
|
|
549
|
+
async createSiteUser(host, data) {
|
|
550
|
+
return this.apiFetch(`/v1/admin/sites/${encodeURIComponent(host)}/site-users`, {
|
|
551
|
+
method: "POST",
|
|
552
|
+
body: JSON.stringify(data)
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
async updateSiteUser(host, userId, data) {
|
|
556
|
+
return this.apiFetch(`/v1/admin/sites/${encodeURIComponent(host)}/site-users/${userId}`, {
|
|
557
|
+
method: "PUT",
|
|
558
|
+
body: JSON.stringify(data)
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
async deleteSiteUser(host, userId) {
|
|
562
|
+
await this.apiFetch(`/v1/admin/sites/${encodeURIComponent(host)}/site-users/${userId}`, {
|
|
563
|
+
method: "DELETE"
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
async changeSiteUserEmail(host, userId, data) {
|
|
567
|
+
return this.apiFetch(
|
|
568
|
+
`/v1/admin/sites/${encodeURIComponent(host)}/site-users/${userId}/email`,
|
|
569
|
+
{
|
|
570
|
+
method: "PUT",
|
|
571
|
+
body: JSON.stringify(data)
|
|
572
|
+
}
|
|
573
|
+
);
|
|
574
|
+
}
|
|
534
575
|
// ── Audit ──────────────────────────────────────────
|
|
535
576
|
async listAuditEvents(host, params) {
|
|
536
577
|
const qs = new URLSearchParams();
|
|
537
578
|
if (params?.action) qs.set("action", params.action);
|
|
538
579
|
if (params?.before) qs.set("before", String(params.before));
|
|
580
|
+
if (params?.limit) qs.set("limit", String(params.limit));
|
|
581
|
+
if (params?.admin) qs.set("admin", params.admin);
|
|
539
582
|
const q = qs.toString();
|
|
540
583
|
return this.apiFetch(
|
|
541
584
|
`/v1/admin/sites/${encodeURIComponent(host)}/audit${q ? `?${q}` : ""}`
|
package/dist/index.d.cts
CHANGED
|
@@ -323,11 +323,19 @@ interface components {
|
|
|
323
323
|
pathItems: never;
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
-
type Site = components["schemas"]["Site"]
|
|
326
|
+
type Site = components["schemas"]["Site"] & {
|
|
327
|
+
auth?: SiteAuthConfig;
|
|
328
|
+
fromEmail?: string;
|
|
329
|
+
fromName?: string;
|
|
330
|
+
};
|
|
327
331
|
type SiteAdmin = components["schemas"]["SiteAdmin"];
|
|
328
332
|
type Collection = components["schemas"]["Collection"] & {
|
|
329
333
|
relationships?: RelationshipDef[];
|
|
330
334
|
singletonContentId?: string;
|
|
335
|
+
mobileNavPriority?: number;
|
|
336
|
+
icon?: string;
|
|
337
|
+
mode?: string;
|
|
338
|
+
requireAuth?: boolean;
|
|
331
339
|
};
|
|
332
340
|
type FieldDefinition = components["schemas"]["FieldDef"];
|
|
333
341
|
type BlockType = components["schemas"]["BlockType"] & {
|
|
@@ -338,6 +346,14 @@ type ContentItem = components["schemas"]["ContentMetadata"] & {
|
|
|
338
346
|
relationships?: Record<string, ContentRef[]>;
|
|
339
347
|
scheduledAt?: number;
|
|
340
348
|
scheduledFailed?: boolean;
|
|
349
|
+
mode?: string;
|
|
350
|
+
siteUserId?: string;
|
|
351
|
+
siteUser?: {
|
|
352
|
+
userId: string;
|
|
353
|
+
name?: string;
|
|
354
|
+
email: string;
|
|
355
|
+
};
|
|
356
|
+
fields?: Record<string, unknown>;
|
|
341
357
|
};
|
|
342
358
|
type ContentDetail = components["schemas"]["ContentDetail"];
|
|
343
359
|
type DraftContent = components["schemas"]["DraftContent"] & {
|
|
@@ -352,7 +368,41 @@ type ApiKeyItem = components["schemas"]["APIKeyMetadata"];
|
|
|
352
368
|
type ApiKeyCreateResponse = components["schemas"]["APIKeyCreateResult"];
|
|
353
369
|
type Webhook = components["schemas"]["Webhook"];
|
|
354
370
|
type WebhookDelivery = components["schemas"]["WebhookDelivery"];
|
|
355
|
-
|
|
371
|
+
interface AuditDetails {
|
|
372
|
+
resourceType?: string;
|
|
373
|
+
resourceId?: string;
|
|
374
|
+
title?: string;
|
|
375
|
+
collection?: string;
|
|
376
|
+
blockId?: string;
|
|
377
|
+
prevBlockId?: string;
|
|
378
|
+
extra?: string;
|
|
379
|
+
}
|
|
380
|
+
type AuditEvent = Omit<components["schemas"]["AuditEvent"], "details"> & {
|
|
381
|
+
resourceType?: string;
|
|
382
|
+
resourceId?: string;
|
|
383
|
+
details?: AuditDetails;
|
|
384
|
+
};
|
|
385
|
+
interface SiteUser {
|
|
386
|
+
userId: string;
|
|
387
|
+
email: string;
|
|
388
|
+
status: "active" | "disabled";
|
|
389
|
+
name?: string;
|
|
390
|
+
tags?: string[];
|
|
391
|
+
fields?: Record<string, unknown>;
|
|
392
|
+
sessionVersion: number;
|
|
393
|
+
createdAt: number;
|
|
394
|
+
lastLogin?: number;
|
|
395
|
+
}
|
|
396
|
+
interface SiteAuthConfig {
|
|
397
|
+
enabled: boolean;
|
|
398
|
+
sessionTtl: number;
|
|
399
|
+
allowSignup: boolean;
|
|
400
|
+
otpRateLimit?: number;
|
|
401
|
+
emailSubject?: string;
|
|
402
|
+
emailBody?: string;
|
|
403
|
+
emailTextBody?: string;
|
|
404
|
+
userFields?: FieldDefinition[];
|
|
405
|
+
}
|
|
356
406
|
interface AdminMediaItem {
|
|
357
407
|
mediaId: string;
|
|
358
408
|
filename: string;
|
|
@@ -429,6 +479,10 @@ interface CollectionInput {
|
|
|
429
479
|
singleton?: boolean;
|
|
430
480
|
fields: FieldDefinition[];
|
|
431
481
|
relationships?: RelationshipDef[];
|
|
482
|
+
mobileNavPriority?: number;
|
|
483
|
+
icon?: string;
|
|
484
|
+
mode?: string;
|
|
485
|
+
requireAuth?: boolean;
|
|
432
486
|
}
|
|
433
487
|
interface BlockTypeInput {
|
|
434
488
|
name: string;
|
|
@@ -461,6 +515,7 @@ interface ContentListParams {
|
|
|
461
515
|
status?: "draft" | "published" | "changed" | "unpublished" | "scheduled";
|
|
462
516
|
sort?: string;
|
|
463
517
|
relatedTo?: string;
|
|
518
|
+
relField?: string;
|
|
464
519
|
limit?: number;
|
|
465
520
|
cursor?: string;
|
|
466
521
|
}
|
|
@@ -498,6 +553,8 @@ interface SaveTransformRequest {
|
|
|
498
553
|
interface AuditListParams {
|
|
499
554
|
action?: string;
|
|
500
555
|
before?: number;
|
|
556
|
+
limit?: number;
|
|
557
|
+
admin?: string;
|
|
501
558
|
}
|
|
502
559
|
interface PaginatedResponse<T> {
|
|
503
560
|
items: T[];
|
|
@@ -521,6 +578,8 @@ declare class HeadroomAdminClient {
|
|
|
521
578
|
updateSite(host: string, data: {
|
|
522
579
|
name?: string;
|
|
523
580
|
status?: string;
|
|
581
|
+
fromEmail?: string;
|
|
582
|
+
fromName?: string;
|
|
524
583
|
}): Promise<Site>;
|
|
525
584
|
deleteSite(host: string): Promise<void>;
|
|
526
585
|
updateSiteAdmins(host: string, admins: SiteAdmin[]): Promise<void>;
|
|
@@ -628,6 +687,28 @@ declare class HeadroomAdminClient {
|
|
|
628
687
|
}>;
|
|
629
688
|
createTag(host: string, tag: string): Promise<void>;
|
|
630
689
|
deleteTag(host: string, tag: string): Promise<void>;
|
|
690
|
+
listSiteUsers(host: string, params?: {
|
|
691
|
+
cursor?: string;
|
|
692
|
+
limit?: number;
|
|
693
|
+
tag?: string;
|
|
694
|
+
}): Promise<PaginatedResponse<SiteUser>>;
|
|
695
|
+
getSiteUser(host: string, userId: string): Promise<SiteUser>;
|
|
696
|
+
createSiteUser(host: string, data: {
|
|
697
|
+
email: string;
|
|
698
|
+
name?: string;
|
|
699
|
+
tags?: string[];
|
|
700
|
+
fields?: Record<string, unknown>;
|
|
701
|
+
}): Promise<SiteUser>;
|
|
702
|
+
updateSiteUser(host: string, userId: string, data: {
|
|
703
|
+
name?: string;
|
|
704
|
+
status?: string;
|
|
705
|
+
tags?: string[];
|
|
706
|
+
fields?: Record<string, unknown>;
|
|
707
|
+
}): Promise<SiteUser>;
|
|
708
|
+
deleteSiteUser(host: string, userId: string): Promise<void>;
|
|
709
|
+
changeSiteUserEmail(host: string, userId: string, data: {
|
|
710
|
+
email: string;
|
|
711
|
+
}): Promise<SiteUser>;
|
|
631
712
|
listAuditEvents(host: string, params?: AuditListParams): Promise<PaginatedResponse<AuditEvent>>;
|
|
632
713
|
listUsers(): Promise<{
|
|
633
714
|
users: {
|
|
@@ -756,4 +837,4 @@ declare function image(props: ImageProps): {
|
|
|
756
837
|
children: unknown[];
|
|
757
838
|
};
|
|
758
839
|
|
|
759
|
-
export { type AdminMediaItem, type ApiKeyCreateResponse, type ApiKeyItem, type AuditEvent, type AuditListParams, type BlockType, type BlockTypeInput, type BulkMediaRequest, type BulkMediaResult, type Collection, type CollectionInput, type CompleteUploadRequest, type ContentDetail, type ContentItem, type ContentListParams, type ContentRef, type CreateContentParams, type DraftContent, type DuplicateCheckResponse, type FieldDefinition, HeadroomAdminClient, HeadroomApiError, type ImageProps, type MediaFolder, type MediaItem, type MediaListParams, type MediaTransformParams, type MediaUsageResponse, type PaginatedResponse, type ReferencesResult, type RelationshipDef, type SaveDraftParams, type SaveDraftResult, type SaveTransformRequest, type Site, type SiteAdmin, StaticTokenProvider, type TokenProvider, type UploadURLRequest, type UploadURLResult, type Webhook, type WebhookDelivery, block, bulletItem, checkItem, codeBlock, heading, image, link, numberedItem, paragraph, text };
|
|
840
|
+
export { type AdminMediaItem, type ApiKeyCreateResponse, type ApiKeyItem, type AuditDetails, type AuditEvent, type AuditListParams, type BlockType, type BlockTypeInput, type BulkMediaRequest, type BulkMediaResult, type Collection, type CollectionInput, type CompleteUploadRequest, type ContentDetail, type ContentItem, type ContentListParams, type ContentRef, type CreateContentParams, type DraftContent, type DuplicateCheckResponse, type FieldDefinition, HeadroomAdminClient, HeadroomApiError, type ImageProps, type MediaFolder, type MediaItem, type MediaListParams, type MediaTransformParams, type MediaUsageResponse, type PaginatedResponse, type ReferencesResult, type RelationshipDef, type SaveDraftParams, type SaveDraftResult, type SaveTransformRequest, type Site, type SiteAdmin, type SiteAuthConfig, type SiteUser, StaticTokenProvider, type TokenProvider, type UploadURLRequest, type UploadURLResult, type Webhook, type WebhookDelivery, block, bulletItem, checkItem, codeBlock, heading, image, link, numberedItem, paragraph, text };
|
package/dist/index.d.ts
CHANGED
|
@@ -323,11 +323,19 @@ interface components {
|
|
|
323
323
|
pathItems: never;
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
-
type Site = components["schemas"]["Site"]
|
|
326
|
+
type Site = components["schemas"]["Site"] & {
|
|
327
|
+
auth?: SiteAuthConfig;
|
|
328
|
+
fromEmail?: string;
|
|
329
|
+
fromName?: string;
|
|
330
|
+
};
|
|
327
331
|
type SiteAdmin = components["schemas"]["SiteAdmin"];
|
|
328
332
|
type Collection = components["schemas"]["Collection"] & {
|
|
329
333
|
relationships?: RelationshipDef[];
|
|
330
334
|
singletonContentId?: string;
|
|
335
|
+
mobileNavPriority?: number;
|
|
336
|
+
icon?: string;
|
|
337
|
+
mode?: string;
|
|
338
|
+
requireAuth?: boolean;
|
|
331
339
|
};
|
|
332
340
|
type FieldDefinition = components["schemas"]["FieldDef"];
|
|
333
341
|
type BlockType = components["schemas"]["BlockType"] & {
|
|
@@ -338,6 +346,14 @@ type ContentItem = components["schemas"]["ContentMetadata"] & {
|
|
|
338
346
|
relationships?: Record<string, ContentRef[]>;
|
|
339
347
|
scheduledAt?: number;
|
|
340
348
|
scheduledFailed?: boolean;
|
|
349
|
+
mode?: string;
|
|
350
|
+
siteUserId?: string;
|
|
351
|
+
siteUser?: {
|
|
352
|
+
userId: string;
|
|
353
|
+
name?: string;
|
|
354
|
+
email: string;
|
|
355
|
+
};
|
|
356
|
+
fields?: Record<string, unknown>;
|
|
341
357
|
};
|
|
342
358
|
type ContentDetail = components["schemas"]["ContentDetail"];
|
|
343
359
|
type DraftContent = components["schemas"]["DraftContent"] & {
|
|
@@ -352,7 +368,41 @@ type ApiKeyItem = components["schemas"]["APIKeyMetadata"];
|
|
|
352
368
|
type ApiKeyCreateResponse = components["schemas"]["APIKeyCreateResult"];
|
|
353
369
|
type Webhook = components["schemas"]["Webhook"];
|
|
354
370
|
type WebhookDelivery = components["schemas"]["WebhookDelivery"];
|
|
355
|
-
|
|
371
|
+
interface AuditDetails {
|
|
372
|
+
resourceType?: string;
|
|
373
|
+
resourceId?: string;
|
|
374
|
+
title?: string;
|
|
375
|
+
collection?: string;
|
|
376
|
+
blockId?: string;
|
|
377
|
+
prevBlockId?: string;
|
|
378
|
+
extra?: string;
|
|
379
|
+
}
|
|
380
|
+
type AuditEvent = Omit<components["schemas"]["AuditEvent"], "details"> & {
|
|
381
|
+
resourceType?: string;
|
|
382
|
+
resourceId?: string;
|
|
383
|
+
details?: AuditDetails;
|
|
384
|
+
};
|
|
385
|
+
interface SiteUser {
|
|
386
|
+
userId: string;
|
|
387
|
+
email: string;
|
|
388
|
+
status: "active" | "disabled";
|
|
389
|
+
name?: string;
|
|
390
|
+
tags?: string[];
|
|
391
|
+
fields?: Record<string, unknown>;
|
|
392
|
+
sessionVersion: number;
|
|
393
|
+
createdAt: number;
|
|
394
|
+
lastLogin?: number;
|
|
395
|
+
}
|
|
396
|
+
interface SiteAuthConfig {
|
|
397
|
+
enabled: boolean;
|
|
398
|
+
sessionTtl: number;
|
|
399
|
+
allowSignup: boolean;
|
|
400
|
+
otpRateLimit?: number;
|
|
401
|
+
emailSubject?: string;
|
|
402
|
+
emailBody?: string;
|
|
403
|
+
emailTextBody?: string;
|
|
404
|
+
userFields?: FieldDefinition[];
|
|
405
|
+
}
|
|
356
406
|
interface AdminMediaItem {
|
|
357
407
|
mediaId: string;
|
|
358
408
|
filename: string;
|
|
@@ -429,6 +479,10 @@ interface CollectionInput {
|
|
|
429
479
|
singleton?: boolean;
|
|
430
480
|
fields: FieldDefinition[];
|
|
431
481
|
relationships?: RelationshipDef[];
|
|
482
|
+
mobileNavPriority?: number;
|
|
483
|
+
icon?: string;
|
|
484
|
+
mode?: string;
|
|
485
|
+
requireAuth?: boolean;
|
|
432
486
|
}
|
|
433
487
|
interface BlockTypeInput {
|
|
434
488
|
name: string;
|
|
@@ -461,6 +515,7 @@ interface ContentListParams {
|
|
|
461
515
|
status?: "draft" | "published" | "changed" | "unpublished" | "scheduled";
|
|
462
516
|
sort?: string;
|
|
463
517
|
relatedTo?: string;
|
|
518
|
+
relField?: string;
|
|
464
519
|
limit?: number;
|
|
465
520
|
cursor?: string;
|
|
466
521
|
}
|
|
@@ -498,6 +553,8 @@ interface SaveTransformRequest {
|
|
|
498
553
|
interface AuditListParams {
|
|
499
554
|
action?: string;
|
|
500
555
|
before?: number;
|
|
556
|
+
limit?: number;
|
|
557
|
+
admin?: string;
|
|
501
558
|
}
|
|
502
559
|
interface PaginatedResponse<T> {
|
|
503
560
|
items: T[];
|
|
@@ -521,6 +578,8 @@ declare class HeadroomAdminClient {
|
|
|
521
578
|
updateSite(host: string, data: {
|
|
522
579
|
name?: string;
|
|
523
580
|
status?: string;
|
|
581
|
+
fromEmail?: string;
|
|
582
|
+
fromName?: string;
|
|
524
583
|
}): Promise<Site>;
|
|
525
584
|
deleteSite(host: string): Promise<void>;
|
|
526
585
|
updateSiteAdmins(host: string, admins: SiteAdmin[]): Promise<void>;
|
|
@@ -628,6 +687,28 @@ declare class HeadroomAdminClient {
|
|
|
628
687
|
}>;
|
|
629
688
|
createTag(host: string, tag: string): Promise<void>;
|
|
630
689
|
deleteTag(host: string, tag: string): Promise<void>;
|
|
690
|
+
listSiteUsers(host: string, params?: {
|
|
691
|
+
cursor?: string;
|
|
692
|
+
limit?: number;
|
|
693
|
+
tag?: string;
|
|
694
|
+
}): Promise<PaginatedResponse<SiteUser>>;
|
|
695
|
+
getSiteUser(host: string, userId: string): Promise<SiteUser>;
|
|
696
|
+
createSiteUser(host: string, data: {
|
|
697
|
+
email: string;
|
|
698
|
+
name?: string;
|
|
699
|
+
tags?: string[];
|
|
700
|
+
fields?: Record<string, unknown>;
|
|
701
|
+
}): Promise<SiteUser>;
|
|
702
|
+
updateSiteUser(host: string, userId: string, data: {
|
|
703
|
+
name?: string;
|
|
704
|
+
status?: string;
|
|
705
|
+
tags?: string[];
|
|
706
|
+
fields?: Record<string, unknown>;
|
|
707
|
+
}): Promise<SiteUser>;
|
|
708
|
+
deleteSiteUser(host: string, userId: string): Promise<void>;
|
|
709
|
+
changeSiteUserEmail(host: string, userId: string, data: {
|
|
710
|
+
email: string;
|
|
711
|
+
}): Promise<SiteUser>;
|
|
631
712
|
listAuditEvents(host: string, params?: AuditListParams): Promise<PaginatedResponse<AuditEvent>>;
|
|
632
713
|
listUsers(): Promise<{
|
|
633
714
|
users: {
|
|
@@ -756,4 +837,4 @@ declare function image(props: ImageProps): {
|
|
|
756
837
|
children: unknown[];
|
|
757
838
|
};
|
|
758
839
|
|
|
759
|
-
export { type AdminMediaItem, type ApiKeyCreateResponse, type ApiKeyItem, type AuditEvent, type AuditListParams, type BlockType, type BlockTypeInput, type BulkMediaRequest, type BulkMediaResult, type Collection, type CollectionInput, type CompleteUploadRequest, type ContentDetail, type ContentItem, type ContentListParams, type ContentRef, type CreateContentParams, type DraftContent, type DuplicateCheckResponse, type FieldDefinition, HeadroomAdminClient, HeadroomApiError, type ImageProps, type MediaFolder, type MediaItem, type MediaListParams, type MediaTransformParams, type MediaUsageResponse, type PaginatedResponse, type ReferencesResult, type RelationshipDef, type SaveDraftParams, type SaveDraftResult, type SaveTransformRequest, type Site, type SiteAdmin, StaticTokenProvider, type TokenProvider, type UploadURLRequest, type UploadURLResult, type Webhook, type WebhookDelivery, block, bulletItem, checkItem, codeBlock, heading, image, link, numberedItem, paragraph, text };
|
|
840
|
+
export { type AdminMediaItem, type ApiKeyCreateResponse, type ApiKeyItem, type AuditDetails, type AuditEvent, type AuditListParams, type BlockType, type BlockTypeInput, type BulkMediaRequest, type BulkMediaResult, type Collection, type CollectionInput, type CompleteUploadRequest, type ContentDetail, type ContentItem, type ContentListParams, type ContentRef, type CreateContentParams, type DraftContent, type DuplicateCheckResponse, type FieldDefinition, HeadroomAdminClient, HeadroomApiError, type ImageProps, type MediaFolder, type MediaItem, type MediaListParams, type MediaTransformParams, type MediaUsageResponse, type PaginatedResponse, type ReferencesResult, type RelationshipDef, type SaveDraftParams, type SaveDraftResult, type SaveTransformRequest, type Site, type SiteAdmin, type SiteAuthConfig, type SiteUser, StaticTokenProvider, type TokenProvider, type UploadURLRequest, type UploadURLResult, type Webhook, type WebhookDelivery, block, bulletItem, checkItem, codeBlock, heading, image, link, numberedItem, paragraph, text };
|
package/dist/index.js
CHANGED
|
@@ -198,6 +198,7 @@ var HeadroomAdminClient = class {
|
|
|
198
198
|
if (params?.status) qs.set("status", params.status);
|
|
199
199
|
if (params?.sort) qs.set("sort", params.sort);
|
|
200
200
|
if (params?.relatedTo) qs.set("relatedTo", params.relatedTo);
|
|
201
|
+
if (params?.relField) qs.set("relField", params.relField);
|
|
201
202
|
if (params?.limit) qs.set("limit", String(params.limit));
|
|
202
203
|
if (params?.cursor) qs.set("cursor", params.cursor);
|
|
203
204
|
const q = qs.toString();
|
|
@@ -493,11 +494,53 @@ var HeadroomAdminClient = class {
|
|
|
493
494
|
{ method: "DELETE" }
|
|
494
495
|
);
|
|
495
496
|
}
|
|
497
|
+
// ── Site Users (site-scoped) ──────────────────────
|
|
498
|
+
async listSiteUsers(host, params) {
|
|
499
|
+
const qs = new URLSearchParams();
|
|
500
|
+
if (params?.cursor) qs.set("cursor", params.cursor);
|
|
501
|
+
if (params?.limit) qs.set("limit", String(params.limit));
|
|
502
|
+
if (params?.tag) qs.set("tag", params.tag);
|
|
503
|
+
const query = qs.toString();
|
|
504
|
+
return this.apiFetch(
|
|
505
|
+
`/v1/admin/sites/${encodeURIComponent(host)}/site-users${query ? `?${query}` : ""}`
|
|
506
|
+
);
|
|
507
|
+
}
|
|
508
|
+
async getSiteUser(host, userId) {
|
|
509
|
+
return this.apiFetch(`/v1/admin/sites/${encodeURIComponent(host)}/site-users/${userId}`);
|
|
510
|
+
}
|
|
511
|
+
async createSiteUser(host, data) {
|
|
512
|
+
return this.apiFetch(`/v1/admin/sites/${encodeURIComponent(host)}/site-users`, {
|
|
513
|
+
method: "POST",
|
|
514
|
+
body: JSON.stringify(data)
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
async updateSiteUser(host, userId, data) {
|
|
518
|
+
return this.apiFetch(`/v1/admin/sites/${encodeURIComponent(host)}/site-users/${userId}`, {
|
|
519
|
+
method: "PUT",
|
|
520
|
+
body: JSON.stringify(data)
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
async deleteSiteUser(host, userId) {
|
|
524
|
+
await this.apiFetch(`/v1/admin/sites/${encodeURIComponent(host)}/site-users/${userId}`, {
|
|
525
|
+
method: "DELETE"
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
async changeSiteUserEmail(host, userId, data) {
|
|
529
|
+
return this.apiFetch(
|
|
530
|
+
`/v1/admin/sites/${encodeURIComponent(host)}/site-users/${userId}/email`,
|
|
531
|
+
{
|
|
532
|
+
method: "PUT",
|
|
533
|
+
body: JSON.stringify(data)
|
|
534
|
+
}
|
|
535
|
+
);
|
|
536
|
+
}
|
|
496
537
|
// ── Audit ──────────────────────────────────────────
|
|
497
538
|
async listAuditEvents(host, params) {
|
|
498
539
|
const qs = new URLSearchParams();
|
|
499
540
|
if (params?.action) qs.set("action", params.action);
|
|
500
541
|
if (params?.before) qs.set("before", String(params.before));
|
|
542
|
+
if (params?.limit) qs.set("limit", String(params.limit));
|
|
543
|
+
if (params?.admin) qs.set("admin", params.admin);
|
|
501
544
|
const q = qs.toString();
|
|
502
545
|
return this.apiFetch(
|
|
503
546
|
`/v1/admin/sites/${encodeURIComponent(host)}/audit${q ? `?${q}` : ""}`
|
package/dist/node.d.cts
CHANGED
|
@@ -314,11 +314,19 @@ interface components {
|
|
|
314
314
|
pathItems: never;
|
|
315
315
|
}
|
|
316
316
|
|
|
317
|
-
type Site = components["schemas"]["Site"]
|
|
317
|
+
type Site = components["schemas"]["Site"] & {
|
|
318
|
+
auth?: SiteAuthConfig;
|
|
319
|
+
fromEmail?: string;
|
|
320
|
+
fromName?: string;
|
|
321
|
+
};
|
|
318
322
|
type SiteAdmin = components["schemas"]["SiteAdmin"];
|
|
319
323
|
type Collection = components["schemas"]["Collection"] & {
|
|
320
324
|
relationships?: RelationshipDef[];
|
|
321
325
|
singletonContentId?: string;
|
|
326
|
+
mobileNavPriority?: number;
|
|
327
|
+
icon?: string;
|
|
328
|
+
mode?: string;
|
|
329
|
+
requireAuth?: boolean;
|
|
322
330
|
};
|
|
323
331
|
type FieldDefinition = components["schemas"]["FieldDef"];
|
|
324
332
|
type BlockType = components["schemas"]["BlockType"] & {
|
|
@@ -329,6 +337,14 @@ type ContentItem = components["schemas"]["ContentMetadata"] & {
|
|
|
329
337
|
relationships?: Record<string, ContentRef[]>;
|
|
330
338
|
scheduledAt?: number;
|
|
331
339
|
scheduledFailed?: boolean;
|
|
340
|
+
mode?: string;
|
|
341
|
+
siteUserId?: string;
|
|
342
|
+
siteUser?: {
|
|
343
|
+
userId: string;
|
|
344
|
+
name?: string;
|
|
345
|
+
email: string;
|
|
346
|
+
};
|
|
347
|
+
fields?: Record<string, unknown>;
|
|
332
348
|
};
|
|
333
349
|
type ContentDetail = components["schemas"]["ContentDetail"];
|
|
334
350
|
type SaveDraftResult = components["schemas"]["SaveDraftResult"];
|
|
@@ -337,7 +353,41 @@ type ApiKeyItem = components["schemas"]["APIKeyMetadata"];
|
|
|
337
353
|
type ApiKeyCreateResponse = components["schemas"]["APIKeyCreateResult"];
|
|
338
354
|
type Webhook = components["schemas"]["Webhook"];
|
|
339
355
|
type WebhookDelivery = components["schemas"]["WebhookDelivery"];
|
|
340
|
-
|
|
356
|
+
interface AuditDetails {
|
|
357
|
+
resourceType?: string;
|
|
358
|
+
resourceId?: string;
|
|
359
|
+
title?: string;
|
|
360
|
+
collection?: string;
|
|
361
|
+
blockId?: string;
|
|
362
|
+
prevBlockId?: string;
|
|
363
|
+
extra?: string;
|
|
364
|
+
}
|
|
365
|
+
type AuditEvent = Omit<components["schemas"]["AuditEvent"], "details"> & {
|
|
366
|
+
resourceType?: string;
|
|
367
|
+
resourceId?: string;
|
|
368
|
+
details?: AuditDetails;
|
|
369
|
+
};
|
|
370
|
+
interface SiteUser {
|
|
371
|
+
userId: string;
|
|
372
|
+
email: string;
|
|
373
|
+
status: "active" | "disabled";
|
|
374
|
+
name?: string;
|
|
375
|
+
tags?: string[];
|
|
376
|
+
fields?: Record<string, unknown>;
|
|
377
|
+
sessionVersion: number;
|
|
378
|
+
createdAt: number;
|
|
379
|
+
lastLogin?: number;
|
|
380
|
+
}
|
|
381
|
+
interface SiteAuthConfig {
|
|
382
|
+
enabled: boolean;
|
|
383
|
+
sessionTtl: number;
|
|
384
|
+
allowSignup: boolean;
|
|
385
|
+
otpRateLimit?: number;
|
|
386
|
+
emailSubject?: string;
|
|
387
|
+
emailBody?: string;
|
|
388
|
+
emailTextBody?: string;
|
|
389
|
+
userFields?: FieldDefinition[];
|
|
390
|
+
}
|
|
341
391
|
interface AdminMediaItem {
|
|
342
392
|
mediaId: string;
|
|
343
393
|
filename: string;
|
|
@@ -414,6 +464,10 @@ interface CollectionInput {
|
|
|
414
464
|
singleton?: boolean;
|
|
415
465
|
fields: FieldDefinition[];
|
|
416
466
|
relationships?: RelationshipDef[];
|
|
467
|
+
mobileNavPriority?: number;
|
|
468
|
+
icon?: string;
|
|
469
|
+
mode?: string;
|
|
470
|
+
requireAuth?: boolean;
|
|
417
471
|
}
|
|
418
472
|
interface BlockTypeInput {
|
|
419
473
|
name: string;
|
|
@@ -446,6 +500,7 @@ interface ContentListParams {
|
|
|
446
500
|
status?: "draft" | "published" | "changed" | "unpublished" | "scheduled";
|
|
447
501
|
sort?: string;
|
|
448
502
|
relatedTo?: string;
|
|
503
|
+
relField?: string;
|
|
449
504
|
limit?: number;
|
|
450
505
|
cursor?: string;
|
|
451
506
|
}
|
|
@@ -483,6 +538,8 @@ interface SaveTransformRequest {
|
|
|
483
538
|
interface AuditListParams {
|
|
484
539
|
action?: string;
|
|
485
540
|
before?: number;
|
|
541
|
+
limit?: number;
|
|
542
|
+
admin?: string;
|
|
486
543
|
}
|
|
487
544
|
interface PaginatedResponse<T> {
|
|
488
545
|
items: T[];
|
|
@@ -506,6 +563,8 @@ declare class HeadroomAdminClient {
|
|
|
506
563
|
updateSite(host: string, data: {
|
|
507
564
|
name?: string;
|
|
508
565
|
status?: string;
|
|
566
|
+
fromEmail?: string;
|
|
567
|
+
fromName?: string;
|
|
509
568
|
}): Promise<Site>;
|
|
510
569
|
deleteSite(host: string): Promise<void>;
|
|
511
570
|
updateSiteAdmins(host: string, admins: SiteAdmin[]): Promise<void>;
|
|
@@ -613,6 +672,28 @@ declare class HeadroomAdminClient {
|
|
|
613
672
|
}>;
|
|
614
673
|
createTag(host: string, tag: string): Promise<void>;
|
|
615
674
|
deleteTag(host: string, tag: string): Promise<void>;
|
|
675
|
+
listSiteUsers(host: string, params?: {
|
|
676
|
+
cursor?: string;
|
|
677
|
+
limit?: number;
|
|
678
|
+
tag?: string;
|
|
679
|
+
}): Promise<PaginatedResponse<SiteUser>>;
|
|
680
|
+
getSiteUser(host: string, userId: string): Promise<SiteUser>;
|
|
681
|
+
createSiteUser(host: string, data: {
|
|
682
|
+
email: string;
|
|
683
|
+
name?: string;
|
|
684
|
+
tags?: string[];
|
|
685
|
+
fields?: Record<string, unknown>;
|
|
686
|
+
}): Promise<SiteUser>;
|
|
687
|
+
updateSiteUser(host: string, userId: string, data: {
|
|
688
|
+
name?: string;
|
|
689
|
+
status?: string;
|
|
690
|
+
tags?: string[];
|
|
691
|
+
fields?: Record<string, unknown>;
|
|
692
|
+
}): Promise<SiteUser>;
|
|
693
|
+
deleteSiteUser(host: string, userId: string): Promise<void>;
|
|
694
|
+
changeSiteUserEmail(host: string, userId: string, data: {
|
|
695
|
+
email: string;
|
|
696
|
+
}): Promise<SiteUser>;
|
|
616
697
|
listAuditEvents(host: string, params?: AuditListParams): Promise<PaginatedResponse<AuditEvent>>;
|
|
617
698
|
listUsers(): Promise<{
|
|
618
699
|
users: {
|
package/dist/node.d.ts
CHANGED
|
@@ -314,11 +314,19 @@ interface components {
|
|
|
314
314
|
pathItems: never;
|
|
315
315
|
}
|
|
316
316
|
|
|
317
|
-
type Site = components["schemas"]["Site"]
|
|
317
|
+
type Site = components["schemas"]["Site"] & {
|
|
318
|
+
auth?: SiteAuthConfig;
|
|
319
|
+
fromEmail?: string;
|
|
320
|
+
fromName?: string;
|
|
321
|
+
};
|
|
318
322
|
type SiteAdmin = components["schemas"]["SiteAdmin"];
|
|
319
323
|
type Collection = components["schemas"]["Collection"] & {
|
|
320
324
|
relationships?: RelationshipDef[];
|
|
321
325
|
singletonContentId?: string;
|
|
326
|
+
mobileNavPriority?: number;
|
|
327
|
+
icon?: string;
|
|
328
|
+
mode?: string;
|
|
329
|
+
requireAuth?: boolean;
|
|
322
330
|
};
|
|
323
331
|
type FieldDefinition = components["schemas"]["FieldDef"];
|
|
324
332
|
type BlockType = components["schemas"]["BlockType"] & {
|
|
@@ -329,6 +337,14 @@ type ContentItem = components["schemas"]["ContentMetadata"] & {
|
|
|
329
337
|
relationships?: Record<string, ContentRef[]>;
|
|
330
338
|
scheduledAt?: number;
|
|
331
339
|
scheduledFailed?: boolean;
|
|
340
|
+
mode?: string;
|
|
341
|
+
siteUserId?: string;
|
|
342
|
+
siteUser?: {
|
|
343
|
+
userId: string;
|
|
344
|
+
name?: string;
|
|
345
|
+
email: string;
|
|
346
|
+
};
|
|
347
|
+
fields?: Record<string, unknown>;
|
|
332
348
|
};
|
|
333
349
|
type ContentDetail = components["schemas"]["ContentDetail"];
|
|
334
350
|
type SaveDraftResult = components["schemas"]["SaveDraftResult"];
|
|
@@ -337,7 +353,41 @@ type ApiKeyItem = components["schemas"]["APIKeyMetadata"];
|
|
|
337
353
|
type ApiKeyCreateResponse = components["schemas"]["APIKeyCreateResult"];
|
|
338
354
|
type Webhook = components["schemas"]["Webhook"];
|
|
339
355
|
type WebhookDelivery = components["schemas"]["WebhookDelivery"];
|
|
340
|
-
|
|
356
|
+
interface AuditDetails {
|
|
357
|
+
resourceType?: string;
|
|
358
|
+
resourceId?: string;
|
|
359
|
+
title?: string;
|
|
360
|
+
collection?: string;
|
|
361
|
+
blockId?: string;
|
|
362
|
+
prevBlockId?: string;
|
|
363
|
+
extra?: string;
|
|
364
|
+
}
|
|
365
|
+
type AuditEvent = Omit<components["schemas"]["AuditEvent"], "details"> & {
|
|
366
|
+
resourceType?: string;
|
|
367
|
+
resourceId?: string;
|
|
368
|
+
details?: AuditDetails;
|
|
369
|
+
};
|
|
370
|
+
interface SiteUser {
|
|
371
|
+
userId: string;
|
|
372
|
+
email: string;
|
|
373
|
+
status: "active" | "disabled";
|
|
374
|
+
name?: string;
|
|
375
|
+
tags?: string[];
|
|
376
|
+
fields?: Record<string, unknown>;
|
|
377
|
+
sessionVersion: number;
|
|
378
|
+
createdAt: number;
|
|
379
|
+
lastLogin?: number;
|
|
380
|
+
}
|
|
381
|
+
interface SiteAuthConfig {
|
|
382
|
+
enabled: boolean;
|
|
383
|
+
sessionTtl: number;
|
|
384
|
+
allowSignup: boolean;
|
|
385
|
+
otpRateLimit?: number;
|
|
386
|
+
emailSubject?: string;
|
|
387
|
+
emailBody?: string;
|
|
388
|
+
emailTextBody?: string;
|
|
389
|
+
userFields?: FieldDefinition[];
|
|
390
|
+
}
|
|
341
391
|
interface AdminMediaItem {
|
|
342
392
|
mediaId: string;
|
|
343
393
|
filename: string;
|
|
@@ -414,6 +464,10 @@ interface CollectionInput {
|
|
|
414
464
|
singleton?: boolean;
|
|
415
465
|
fields: FieldDefinition[];
|
|
416
466
|
relationships?: RelationshipDef[];
|
|
467
|
+
mobileNavPriority?: number;
|
|
468
|
+
icon?: string;
|
|
469
|
+
mode?: string;
|
|
470
|
+
requireAuth?: boolean;
|
|
417
471
|
}
|
|
418
472
|
interface BlockTypeInput {
|
|
419
473
|
name: string;
|
|
@@ -446,6 +500,7 @@ interface ContentListParams {
|
|
|
446
500
|
status?: "draft" | "published" | "changed" | "unpublished" | "scheduled";
|
|
447
501
|
sort?: string;
|
|
448
502
|
relatedTo?: string;
|
|
503
|
+
relField?: string;
|
|
449
504
|
limit?: number;
|
|
450
505
|
cursor?: string;
|
|
451
506
|
}
|
|
@@ -483,6 +538,8 @@ interface SaveTransformRequest {
|
|
|
483
538
|
interface AuditListParams {
|
|
484
539
|
action?: string;
|
|
485
540
|
before?: number;
|
|
541
|
+
limit?: number;
|
|
542
|
+
admin?: string;
|
|
486
543
|
}
|
|
487
544
|
interface PaginatedResponse<T> {
|
|
488
545
|
items: T[];
|
|
@@ -506,6 +563,8 @@ declare class HeadroomAdminClient {
|
|
|
506
563
|
updateSite(host: string, data: {
|
|
507
564
|
name?: string;
|
|
508
565
|
status?: string;
|
|
566
|
+
fromEmail?: string;
|
|
567
|
+
fromName?: string;
|
|
509
568
|
}): Promise<Site>;
|
|
510
569
|
deleteSite(host: string): Promise<void>;
|
|
511
570
|
updateSiteAdmins(host: string, admins: SiteAdmin[]): Promise<void>;
|
|
@@ -613,6 +672,28 @@ declare class HeadroomAdminClient {
|
|
|
613
672
|
}>;
|
|
614
673
|
createTag(host: string, tag: string): Promise<void>;
|
|
615
674
|
deleteTag(host: string, tag: string): Promise<void>;
|
|
675
|
+
listSiteUsers(host: string, params?: {
|
|
676
|
+
cursor?: string;
|
|
677
|
+
limit?: number;
|
|
678
|
+
tag?: string;
|
|
679
|
+
}): Promise<PaginatedResponse<SiteUser>>;
|
|
680
|
+
getSiteUser(host: string, userId: string): Promise<SiteUser>;
|
|
681
|
+
createSiteUser(host: string, data: {
|
|
682
|
+
email: string;
|
|
683
|
+
name?: string;
|
|
684
|
+
tags?: string[];
|
|
685
|
+
fields?: Record<string, unknown>;
|
|
686
|
+
}): Promise<SiteUser>;
|
|
687
|
+
updateSiteUser(host: string, userId: string, data: {
|
|
688
|
+
name?: string;
|
|
689
|
+
status?: string;
|
|
690
|
+
tags?: string[];
|
|
691
|
+
fields?: Record<string, unknown>;
|
|
692
|
+
}): Promise<SiteUser>;
|
|
693
|
+
deleteSiteUser(host: string, userId: string): Promise<void>;
|
|
694
|
+
changeSiteUserEmail(host: string, userId: string, data: {
|
|
695
|
+
email: string;
|
|
696
|
+
}): Promise<SiteUser>;
|
|
616
697
|
listAuditEvents(host: string, params?: AuditListParams): Promise<PaginatedResponse<AuditEvent>>;
|
|
617
698
|
listUsers(): Promise<{
|
|
618
699
|
users: {
|
package/dist/seed.d.cts
CHANGED
|
@@ -303,10 +303,18 @@ interface components {
|
|
|
303
303
|
pathItems: never;
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
type Site = components["schemas"]["Site"]
|
|
306
|
+
type Site = components["schemas"]["Site"] & {
|
|
307
|
+
auth?: SiteAuthConfig;
|
|
308
|
+
fromEmail?: string;
|
|
309
|
+
fromName?: string;
|
|
310
|
+
};
|
|
307
311
|
type Collection = components["schemas"]["Collection"] & {
|
|
308
312
|
relationships?: RelationshipDef[];
|
|
309
313
|
singletonContentId?: string;
|
|
314
|
+
mobileNavPriority?: number;
|
|
315
|
+
icon?: string;
|
|
316
|
+
mode?: string;
|
|
317
|
+
requireAuth?: boolean;
|
|
310
318
|
};
|
|
311
319
|
type FieldDefinition = components["schemas"]["FieldDef"];
|
|
312
320
|
type ContentItem = components["schemas"]["ContentMetadata"] & {
|
|
@@ -314,10 +322,28 @@ type ContentItem = components["schemas"]["ContentMetadata"] & {
|
|
|
314
322
|
relationships?: Record<string, ContentRef[]>;
|
|
315
323
|
scheduledAt?: number;
|
|
316
324
|
scheduledFailed?: boolean;
|
|
325
|
+
mode?: string;
|
|
326
|
+
siteUserId?: string;
|
|
327
|
+
siteUser?: {
|
|
328
|
+
userId: string;
|
|
329
|
+
name?: string;
|
|
330
|
+
email: string;
|
|
331
|
+
};
|
|
332
|
+
fields?: Record<string, unknown>;
|
|
317
333
|
};
|
|
318
334
|
type SaveDraftResult = components["schemas"]["SaveDraftResult"];
|
|
319
335
|
type ApiKeyItem = components["schemas"]["APIKeyMetadata"];
|
|
320
336
|
type ApiKeyCreateResponse = components["schemas"]["APIKeyCreateResult"];
|
|
337
|
+
interface SiteAuthConfig {
|
|
338
|
+
enabled: boolean;
|
|
339
|
+
sessionTtl: number;
|
|
340
|
+
allowSignup: boolean;
|
|
341
|
+
otpRateLimit?: number;
|
|
342
|
+
emailSubject?: string;
|
|
343
|
+
emailBody?: string;
|
|
344
|
+
emailTextBody?: string;
|
|
345
|
+
userFields?: FieldDefinition[];
|
|
346
|
+
}
|
|
321
347
|
interface AdminMediaItem {
|
|
322
348
|
mediaId: string;
|
|
323
349
|
filename: string;
|
|
@@ -354,6 +380,10 @@ interface CollectionInput {
|
|
|
354
380
|
singleton?: boolean;
|
|
355
381
|
fields: FieldDefinition[];
|
|
356
382
|
relationships?: RelationshipDef[];
|
|
383
|
+
mobileNavPriority?: number;
|
|
384
|
+
icon?: string;
|
|
385
|
+
mode?: string;
|
|
386
|
+
requireAuth?: boolean;
|
|
357
387
|
}
|
|
358
388
|
interface SaveDraftParams {
|
|
359
389
|
title?: string;
|
package/dist/seed.d.ts
CHANGED
|
@@ -303,10 +303,18 @@ interface components {
|
|
|
303
303
|
pathItems: never;
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
type Site = components["schemas"]["Site"]
|
|
306
|
+
type Site = components["schemas"]["Site"] & {
|
|
307
|
+
auth?: SiteAuthConfig;
|
|
308
|
+
fromEmail?: string;
|
|
309
|
+
fromName?: string;
|
|
310
|
+
};
|
|
307
311
|
type Collection = components["schemas"]["Collection"] & {
|
|
308
312
|
relationships?: RelationshipDef[];
|
|
309
313
|
singletonContentId?: string;
|
|
314
|
+
mobileNavPriority?: number;
|
|
315
|
+
icon?: string;
|
|
316
|
+
mode?: string;
|
|
317
|
+
requireAuth?: boolean;
|
|
310
318
|
};
|
|
311
319
|
type FieldDefinition = components["schemas"]["FieldDef"];
|
|
312
320
|
type ContentItem = components["schemas"]["ContentMetadata"] & {
|
|
@@ -314,10 +322,28 @@ type ContentItem = components["schemas"]["ContentMetadata"] & {
|
|
|
314
322
|
relationships?: Record<string, ContentRef[]>;
|
|
315
323
|
scheduledAt?: number;
|
|
316
324
|
scheduledFailed?: boolean;
|
|
325
|
+
mode?: string;
|
|
326
|
+
siteUserId?: string;
|
|
327
|
+
siteUser?: {
|
|
328
|
+
userId: string;
|
|
329
|
+
name?: string;
|
|
330
|
+
email: string;
|
|
331
|
+
};
|
|
332
|
+
fields?: Record<string, unknown>;
|
|
317
333
|
};
|
|
318
334
|
type SaveDraftResult = components["schemas"]["SaveDraftResult"];
|
|
319
335
|
type ApiKeyItem = components["schemas"]["APIKeyMetadata"];
|
|
320
336
|
type ApiKeyCreateResponse = components["schemas"]["APIKeyCreateResult"];
|
|
337
|
+
interface SiteAuthConfig {
|
|
338
|
+
enabled: boolean;
|
|
339
|
+
sessionTtl: number;
|
|
340
|
+
allowSignup: boolean;
|
|
341
|
+
otpRateLimit?: number;
|
|
342
|
+
emailSubject?: string;
|
|
343
|
+
emailBody?: string;
|
|
344
|
+
emailTextBody?: string;
|
|
345
|
+
userFields?: FieldDefinition[];
|
|
346
|
+
}
|
|
321
347
|
interface AdminMediaItem {
|
|
322
348
|
mediaId: string;
|
|
323
349
|
filename: string;
|
|
@@ -354,6 +380,10 @@ interface CollectionInput {
|
|
|
354
380
|
singleton?: boolean;
|
|
355
381
|
fields: FieldDefinition[];
|
|
356
382
|
relationships?: RelationshipDef[];
|
|
383
|
+
mobileNavPriority?: number;
|
|
384
|
+
icon?: string;
|
|
385
|
+
mode?: string;
|
|
386
|
+
requireAuth?: boolean;
|
|
357
387
|
}
|
|
358
388
|
interface SaveDraftParams {
|
|
359
389
|
title?: string;
|