This repository was archived by the owner on Jun 9, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtypes.ts
More file actions
159 lines (143 loc) · 3.95 KB
/
Copy pathtypes.ts
File metadata and controls
159 lines (143 loc) · 3.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
import type { UploadedImage } from '@prezly/uploads';
import type { CultureRef, Newsroom, Pagination, Query, SortOrder } from '../../types';
export interface IncludeOptions<
Include extends keyof Newsroom.ExtraFields = keyof Newsroom.ExtraFields,
> {
include?: Include[];
}
export interface ListOptions<
Include extends keyof Newsroom.ExtraFields = keyof Newsroom.ExtraFields,
> {
include?: Include[];
limit?: number;
offset?: number;
/**
* Text search keyword.
*/
search?: string;
sortOrder?: SortOrder | string;
}
export interface SearchOptions<
Include extends keyof Newsroom.ExtraFields = keyof Newsroom.ExtraFields,
> extends ListOptions<Include> {
/**
* Filter query using Prezly JSON Query Language
*/
query?: Query;
}
export interface ListResponse<T extends Newsroom = Newsroom> {
newsrooms: T[];
pagination: Pagination;
sort: string;
}
export interface CreateRequest {
name: string;
/**
* Subdomain to be used for the newsroom.
* {subdomain}.prezly.com
*/
subdomain: string;
cultures?: CultureRef['code'][];
default_culture?: CultureRef['code'];
/**
* Uploadcare Image JSON
*/
newsroom_logo?: string;
/**
* Uploadcare Image JSON
*/
square_logo?: string;
/**
* Theme ID or codename
*/
active_theme?: string;
status?: Newsroom.Status.ACTIVE | Newsroom.Status.INACTIVE;
/**
* Populate newsroom with example content
*/
with_demo_content?: boolean;
}
export interface UpdateRequest {
name?: string;
/**
* Subdomain to be used for the newsroom.
* {subdomain}.prezly.com
*/
subdomain?: string;
cultures?: CultureRef['code'][];
default_culture?: CultureRef['code'];
is_indexable?: boolean;
/**
* Uploadcare Image JSON
*/
newsroom_logo?: string | null;
/**
* Uploadcare Image JSON
*/
square_logo?: string | null;
/**
* Uploadcare Image JSON
*/
icon?: string;
google_search_console_key?: string | null;
google_analytics_id?: string | null;
segment_analytics_id?: string | null;
/**
* Accepts valid PHP or Moment.js time formats.
*/
time_format?: string;
/**
* Accepts "ampm" or "24" or valid PHP time formats ("h:i a", "H:i")
* or valid Moment.js time formats ("hh:mm a", "HH:mm")
*/
date_format?: string;
/**
* Timezone name in the ICANN tz database.
*/
timezone?: string;
email_branding_mode?: Newsroom.EmailBrandingMode;
email_branding?: Newsroom.EmailBranding;
email_logo?: UploadedImage | null;
email_logo_alignment?: Newsroom.EmailLogoAlignment;
is_privacy_portal_enabled?: boolean;
/**
* Available only when license has
* "custom_privacy_policy_link" feature flag
*/
custom_privacy_policy_link?: string | null;
/**
* Available only when license has
* "custom_privacy_policy_link" feature flag
*/
custom_privacy_policy_content?: string | null;
/**
* Available only when license has
* "custom_privacy_policy_link" feature flag
*/
custom_cookie_policy_link?: string | null;
/**
* Available only when license has
* "custom_privacy_policy_link" feature flag
*/
custom_cookie_policy_content?: string | null;
/**
* Available only when license has
* "custom_data_request_link" feature flag
*/
custom_data_request_link?: string | null;
/**
* Available only when license has
* "subscription_form" feature flag
*/
is_subscription_form_enabled?: boolean;
auto_create_contacts_from_subscribers?: boolean;
status?: Newsroom.Status.ACTIVE | Newsroom.Status.INACTIVE;
is_plausible_enabled?: boolean;
is_white_labeled?: boolean;
onetrust_cookie_consent?: {
is_enabled?: boolean;
category?: string;
script?: string;
};
tracking_policy?: Newsroom.TrackingPolicy | null;
}