@headroom-cms/admin-api 0.1.5 → 0.1.7
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/LICENSE +142 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +1 -0
- package/dist/node.d.cts +5 -1
- package/dist/node.d.ts +5 -1
- package/dist/seed.d.cts +2 -1
- package/dist/seed.d.ts +2 -1
- package/package.json +10 -10
package/LICENSE
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# PolyForm Noncommercial License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
4
|
+
|
|
5
|
+
## Acceptance
|
|
6
|
+
|
|
7
|
+
In order to get any license under these terms, you must agree
|
|
8
|
+
to them as both strict obligations and conditions to all
|
|
9
|
+
your licenses.
|
|
10
|
+
|
|
11
|
+
## Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a copyright license for the software
|
|
14
|
+
to do everything you might do with the software that would
|
|
15
|
+
otherwise infringe the licensor's copyright in it for any
|
|
16
|
+
permitted purpose. However, you may only distribute the
|
|
17
|
+
software according to [Distribution License](#distribution-license)
|
|
18
|
+
and make changes or new works based on the software according to
|
|
19
|
+
[Changes and New Works License](#changes-and-new-works-license).
|
|
20
|
+
|
|
21
|
+
## Distribution License
|
|
22
|
+
|
|
23
|
+
The licensor grants you an additional copyright license to
|
|
24
|
+
distribute copies of the software. Your license to distribute
|
|
25
|
+
covers distributing the software with changes and new works
|
|
26
|
+
permitted by [Changes and New Works License](#changes-and-new-works-license).
|
|
27
|
+
|
|
28
|
+
## Notices
|
|
29
|
+
|
|
30
|
+
You must ensure that anyone who gets a copy of any part of
|
|
31
|
+
the software from you also gets a copy of these terms or the
|
|
32
|
+
URL for them above, as well as copies of any plain-text lines
|
|
33
|
+
beginning with `Required Notice:` that the licensor provided
|
|
34
|
+
with the software. For example:
|
|
35
|
+
|
|
36
|
+
> Required Notice: Copyright Cykod LLC (https://cykod.com)
|
|
37
|
+
|
|
38
|
+
## Changes and New Works License
|
|
39
|
+
|
|
40
|
+
The licensor grants you an additional copyright license to
|
|
41
|
+
make changes and new works based on the software for any
|
|
42
|
+
permitted purpose.
|
|
43
|
+
|
|
44
|
+
## Patent License
|
|
45
|
+
|
|
46
|
+
The licensor grants you a patent license for the software
|
|
47
|
+
that covers patent claims the licensor can license, or
|
|
48
|
+
becomes able to license, that you would infringe by using
|
|
49
|
+
the software.
|
|
50
|
+
|
|
51
|
+
## Noncommercial Purposes
|
|
52
|
+
|
|
53
|
+
Any noncommercial purpose is a permitted purpose.
|
|
54
|
+
|
|
55
|
+
## Personal Uses
|
|
56
|
+
|
|
57
|
+
Personal use for research, experiment, and testing for
|
|
58
|
+
the benefit of public knowledge, personal study, private
|
|
59
|
+
entertainment, hobby projects, amateur pursuits, or
|
|
60
|
+
religious observance, without any anticipated commercial
|
|
61
|
+
application, is use for a permitted purpose.
|
|
62
|
+
|
|
63
|
+
## Noncommercial Organizations
|
|
64
|
+
|
|
65
|
+
Use by any charitable organization, educational institution,
|
|
66
|
+
public research organization, public safety or health
|
|
67
|
+
organization, environmental protection organization, or
|
|
68
|
+
government institution is use for a permitted purpose
|
|
69
|
+
regardless of the source of funding or obligations
|
|
70
|
+
resulting from the funding.
|
|
71
|
+
|
|
72
|
+
## Fair Use
|
|
73
|
+
|
|
74
|
+
You may have "fair use" rights for the software under the
|
|
75
|
+
law. These terms do not limit them.
|
|
76
|
+
|
|
77
|
+
## No Other Rights
|
|
78
|
+
|
|
79
|
+
These terms do not allow you to sublicense or transfer any
|
|
80
|
+
of your licenses to anyone else, or prevent the licensor
|
|
81
|
+
from granting licenses to anyone else. These terms do not
|
|
82
|
+
imply any other licenses.
|
|
83
|
+
|
|
84
|
+
## Patent Defense
|
|
85
|
+
|
|
86
|
+
If you make any written claim that the software infringes
|
|
87
|
+
or contributes to infringement of any patent, your patent
|
|
88
|
+
license for the software granted under these terms ends
|
|
89
|
+
immediately. If your company makes such a claim, your
|
|
90
|
+
patent license ends immediately for work on behalf of
|
|
91
|
+
your company.
|
|
92
|
+
|
|
93
|
+
## Violations
|
|
94
|
+
|
|
95
|
+
The first time you are notified in writing that you have
|
|
96
|
+
violated any of these terms, or done anything with the
|
|
97
|
+
software not covered by your licenses, your licenses can
|
|
98
|
+
nonetheless continue if you come into full compliance with
|
|
99
|
+
these terms, and take practical steps to correct past
|
|
100
|
+
violations, within 32 days of receiving notice. Otherwise,
|
|
101
|
+
all your licenses end immediately.
|
|
102
|
+
|
|
103
|
+
## No Liability
|
|
104
|
+
|
|
105
|
+
As far as the law allows, the software comes as is, without
|
|
106
|
+
any warranty or condition, and the licensor will not be
|
|
107
|
+
liable to you for any damages arising out of these terms
|
|
108
|
+
or the use or nature of the software, under any kind of
|
|
109
|
+
legal claim.
|
|
110
|
+
|
|
111
|
+
## Definitions
|
|
112
|
+
|
|
113
|
+
The **licensor** is the individual or entity offering these
|
|
114
|
+
terms, and the **software** is the software the licensor
|
|
115
|
+
makes available under these terms.
|
|
116
|
+
|
|
117
|
+
**You** refers to the individual or entity agreeing to
|
|
118
|
+
these terms.
|
|
119
|
+
|
|
120
|
+
**Your company** is any legal entity, sole proprietorship,
|
|
121
|
+
or other kind of organization that you work for, plus all
|
|
122
|
+
organizations that have control over, are under the control
|
|
123
|
+
of, or are under common control with that organization.
|
|
124
|
+
**Control** means ownership of substantially all the assets
|
|
125
|
+
of an entity, or the power to direct its management and
|
|
126
|
+
policies by vote, contract, or otherwise. Control can be
|
|
127
|
+
direct or indirect.
|
|
128
|
+
|
|
129
|
+
**Your licenses** are all the licenses granted to you for
|
|
130
|
+
the software under these terms.
|
|
131
|
+
|
|
132
|
+
**Use** means anything you do with the software requiring
|
|
133
|
+
one of your licenses.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Commercial License
|
|
138
|
+
|
|
139
|
+
For commercial use of Headroom CMS, a commercial license is
|
|
140
|
+
required at $5/month.
|
|
141
|
+
|
|
142
|
+
To purchase a commercial license, contact: headroom@cykod.com
|
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();
|
package/dist/index.d.cts
CHANGED
|
@@ -325,6 +325,8 @@ interface components {
|
|
|
325
325
|
|
|
326
326
|
type Site = components["schemas"]["Site"] & {
|
|
327
327
|
auth?: SiteAuthConfig;
|
|
328
|
+
fromEmail?: string;
|
|
329
|
+
fromName?: string;
|
|
328
330
|
};
|
|
329
331
|
type SiteAdmin = components["schemas"]["SiteAdmin"];
|
|
330
332
|
type Collection = components["schemas"]["Collection"] & {
|
|
@@ -396,7 +398,6 @@ interface SiteAuthConfig {
|
|
|
396
398
|
sessionTtl: number;
|
|
397
399
|
allowSignup: boolean;
|
|
398
400
|
otpRateLimit?: number;
|
|
399
|
-
fromName?: string;
|
|
400
401
|
emailSubject?: string;
|
|
401
402
|
emailBody?: string;
|
|
402
403
|
emailTextBody?: string;
|
|
@@ -514,6 +515,7 @@ interface ContentListParams {
|
|
|
514
515
|
status?: "draft" | "published" | "changed" | "unpublished" | "scheduled";
|
|
515
516
|
sort?: string;
|
|
516
517
|
relatedTo?: string;
|
|
518
|
+
relField?: string;
|
|
517
519
|
limit?: number;
|
|
518
520
|
cursor?: string;
|
|
519
521
|
}
|
|
@@ -576,6 +578,8 @@ declare class HeadroomAdminClient {
|
|
|
576
578
|
updateSite(host: string, data: {
|
|
577
579
|
name?: string;
|
|
578
580
|
status?: string;
|
|
581
|
+
fromEmail?: string;
|
|
582
|
+
fromName?: string;
|
|
579
583
|
}): Promise<Site>;
|
|
580
584
|
deleteSite(host: string): Promise<void>;
|
|
581
585
|
updateSiteAdmins(host: string, admins: SiteAdmin[]): Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -325,6 +325,8 @@ interface components {
|
|
|
325
325
|
|
|
326
326
|
type Site = components["schemas"]["Site"] & {
|
|
327
327
|
auth?: SiteAuthConfig;
|
|
328
|
+
fromEmail?: string;
|
|
329
|
+
fromName?: string;
|
|
328
330
|
};
|
|
329
331
|
type SiteAdmin = components["schemas"]["SiteAdmin"];
|
|
330
332
|
type Collection = components["schemas"]["Collection"] & {
|
|
@@ -396,7 +398,6 @@ interface SiteAuthConfig {
|
|
|
396
398
|
sessionTtl: number;
|
|
397
399
|
allowSignup: boolean;
|
|
398
400
|
otpRateLimit?: number;
|
|
399
|
-
fromName?: string;
|
|
400
401
|
emailSubject?: string;
|
|
401
402
|
emailBody?: string;
|
|
402
403
|
emailTextBody?: string;
|
|
@@ -514,6 +515,7 @@ interface ContentListParams {
|
|
|
514
515
|
status?: "draft" | "published" | "changed" | "unpublished" | "scheduled";
|
|
515
516
|
sort?: string;
|
|
516
517
|
relatedTo?: string;
|
|
518
|
+
relField?: string;
|
|
517
519
|
limit?: number;
|
|
518
520
|
cursor?: string;
|
|
519
521
|
}
|
|
@@ -576,6 +578,8 @@ declare class HeadroomAdminClient {
|
|
|
576
578
|
updateSite(host: string, data: {
|
|
577
579
|
name?: string;
|
|
578
580
|
status?: string;
|
|
581
|
+
fromEmail?: string;
|
|
582
|
+
fromName?: string;
|
|
579
583
|
}): Promise<Site>;
|
|
580
584
|
deleteSite(host: string): Promise<void>;
|
|
581
585
|
updateSiteAdmins(host: string, admins: SiteAdmin[]): Promise<void>;
|
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();
|
package/dist/node.d.cts
CHANGED
|
@@ -316,6 +316,8 @@ interface components {
|
|
|
316
316
|
|
|
317
317
|
type Site = components["schemas"]["Site"] & {
|
|
318
318
|
auth?: SiteAuthConfig;
|
|
319
|
+
fromEmail?: string;
|
|
320
|
+
fromName?: string;
|
|
319
321
|
};
|
|
320
322
|
type SiteAdmin = components["schemas"]["SiteAdmin"];
|
|
321
323
|
type Collection = components["schemas"]["Collection"] & {
|
|
@@ -381,7 +383,6 @@ interface SiteAuthConfig {
|
|
|
381
383
|
sessionTtl: number;
|
|
382
384
|
allowSignup: boolean;
|
|
383
385
|
otpRateLimit?: number;
|
|
384
|
-
fromName?: string;
|
|
385
386
|
emailSubject?: string;
|
|
386
387
|
emailBody?: string;
|
|
387
388
|
emailTextBody?: string;
|
|
@@ -499,6 +500,7 @@ interface ContentListParams {
|
|
|
499
500
|
status?: "draft" | "published" | "changed" | "unpublished" | "scheduled";
|
|
500
501
|
sort?: string;
|
|
501
502
|
relatedTo?: string;
|
|
503
|
+
relField?: string;
|
|
502
504
|
limit?: number;
|
|
503
505
|
cursor?: string;
|
|
504
506
|
}
|
|
@@ -561,6 +563,8 @@ declare class HeadroomAdminClient {
|
|
|
561
563
|
updateSite(host: string, data: {
|
|
562
564
|
name?: string;
|
|
563
565
|
status?: string;
|
|
566
|
+
fromEmail?: string;
|
|
567
|
+
fromName?: string;
|
|
564
568
|
}): Promise<Site>;
|
|
565
569
|
deleteSite(host: string): Promise<void>;
|
|
566
570
|
updateSiteAdmins(host: string, admins: SiteAdmin[]): Promise<void>;
|
package/dist/node.d.ts
CHANGED
|
@@ -316,6 +316,8 @@ interface components {
|
|
|
316
316
|
|
|
317
317
|
type Site = components["schemas"]["Site"] & {
|
|
318
318
|
auth?: SiteAuthConfig;
|
|
319
|
+
fromEmail?: string;
|
|
320
|
+
fromName?: string;
|
|
319
321
|
};
|
|
320
322
|
type SiteAdmin = components["schemas"]["SiteAdmin"];
|
|
321
323
|
type Collection = components["schemas"]["Collection"] & {
|
|
@@ -381,7 +383,6 @@ interface SiteAuthConfig {
|
|
|
381
383
|
sessionTtl: number;
|
|
382
384
|
allowSignup: boolean;
|
|
383
385
|
otpRateLimit?: number;
|
|
384
|
-
fromName?: string;
|
|
385
386
|
emailSubject?: string;
|
|
386
387
|
emailBody?: string;
|
|
387
388
|
emailTextBody?: string;
|
|
@@ -499,6 +500,7 @@ interface ContentListParams {
|
|
|
499
500
|
status?: "draft" | "published" | "changed" | "unpublished" | "scheduled";
|
|
500
501
|
sort?: string;
|
|
501
502
|
relatedTo?: string;
|
|
503
|
+
relField?: string;
|
|
502
504
|
limit?: number;
|
|
503
505
|
cursor?: string;
|
|
504
506
|
}
|
|
@@ -561,6 +563,8 @@ declare class HeadroomAdminClient {
|
|
|
561
563
|
updateSite(host: string, data: {
|
|
562
564
|
name?: string;
|
|
563
565
|
status?: string;
|
|
566
|
+
fromEmail?: string;
|
|
567
|
+
fromName?: string;
|
|
564
568
|
}): Promise<Site>;
|
|
565
569
|
deleteSite(host: string): Promise<void>;
|
|
566
570
|
updateSiteAdmins(host: string, admins: SiteAdmin[]): Promise<void>;
|
package/dist/seed.d.cts
CHANGED
|
@@ -305,6 +305,8 @@ interface components {
|
|
|
305
305
|
|
|
306
306
|
type Site = components["schemas"]["Site"] & {
|
|
307
307
|
auth?: SiteAuthConfig;
|
|
308
|
+
fromEmail?: string;
|
|
309
|
+
fromName?: string;
|
|
308
310
|
};
|
|
309
311
|
type Collection = components["schemas"]["Collection"] & {
|
|
310
312
|
relationships?: RelationshipDef[];
|
|
@@ -337,7 +339,6 @@ interface SiteAuthConfig {
|
|
|
337
339
|
sessionTtl: number;
|
|
338
340
|
allowSignup: boolean;
|
|
339
341
|
otpRateLimit?: number;
|
|
340
|
-
fromName?: string;
|
|
341
342
|
emailSubject?: string;
|
|
342
343
|
emailBody?: string;
|
|
343
344
|
emailTextBody?: string;
|
package/dist/seed.d.ts
CHANGED
|
@@ -305,6 +305,8 @@ interface components {
|
|
|
305
305
|
|
|
306
306
|
type Site = components["schemas"]["Site"] & {
|
|
307
307
|
auth?: SiteAuthConfig;
|
|
308
|
+
fromEmail?: string;
|
|
309
|
+
fromName?: string;
|
|
308
310
|
};
|
|
309
311
|
type Collection = components["schemas"]["Collection"] & {
|
|
310
312
|
relationships?: RelationshipDef[];
|
|
@@ -337,7 +339,6 @@ interface SiteAuthConfig {
|
|
|
337
339
|
sessionTtl: number;
|
|
338
340
|
allowSignup: boolean;
|
|
339
341
|
otpRateLimit?: number;
|
|
340
|
-
fromName?: string;
|
|
341
342
|
emailSubject?: string;
|
|
342
343
|
emailBody?: string;
|
|
343
344
|
emailTextBody?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@headroom-cms/admin-api",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -30,14 +30,6 @@
|
|
|
30
30
|
"files": [
|
|
31
31
|
"dist"
|
|
32
32
|
],
|
|
33
|
-
"scripts": {
|
|
34
|
-
"build": "tsup",
|
|
35
|
-
"dev": "tsup --watch",
|
|
36
|
-
"test": "vitest run",
|
|
37
|
-
"test:watch": "vitest",
|
|
38
|
-
"typecheck": "tsc --noEmit",
|
|
39
|
-
"generate:types": "bash scripts/generate-types.sh"
|
|
40
|
-
},
|
|
41
33
|
"devDependencies": {
|
|
42
34
|
"@types/node": "~24.10.13",
|
|
43
35
|
"@vitest/coverage-v8": "^4.0.18",
|
|
@@ -53,5 +45,13 @@
|
|
|
53
45
|
"amazon-cognito-identity-js": {
|
|
54
46
|
"optional": true
|
|
55
47
|
}
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "tsup",
|
|
51
|
+
"dev": "tsup --watch",
|
|
52
|
+
"test": "vitest run",
|
|
53
|
+
"test:watch": "vitest",
|
|
54
|
+
"typecheck": "tsc --noEmit",
|
|
55
|
+
"generate:types": "bash scripts/generate-types.sh"
|
|
56
56
|
}
|
|
57
|
-
}
|
|
57
|
+
}
|