@acms-subir/client 0.1.6 → 0.1.8
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 +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -1
- package/dist/types.d.ts +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ the cache and transport configuration with the original client.
|
|
|
37
37
|
| `post(slug, opts)` | Scans post summaries, then loads detail by ID; pass `collection` for ambiguous slugs |
|
|
38
38
|
| `pages(opts)` | Page **summaries**, with pagination; use `page()` for sections |
|
|
39
39
|
| `search(text, opts)` | Top matches in `posts`, `pages` and `events`, plus `more` per group; `types`, `collection`, `limit` (1–20, default 5). Blank text resolves empty without a request |
|
|
40
|
-
| `events(opts)` | Occurrences with `from`, `to`, `calendar`, `q`, pagination |
|
|
40
|
+
| `events(opts)` | Occurrences with `from`, `to`, `calendar`, `tag`, `excludeTag`, `q`, pagination |
|
|
41
41
|
| `event(slug, opts)` | First matching event from occurrences in the requested window |
|
|
42
42
|
| `calendars()` | Public calendars |
|
|
43
43
|
| `resources(opts)`, `resource(slug, opts)` | Public resources; slug lookup scans list pages |
|
package/dist/index.d.ts
CHANGED
|
@@ -31,6 +31,10 @@ export interface EventOptions extends ListOptions {
|
|
|
31
31
|
to?: EventBound | (string & {});
|
|
32
32
|
calendar?: string;
|
|
33
33
|
q?: string;
|
|
34
|
+
/** only events with this public tag (its name or slug, any case) */
|
|
35
|
+
tag?: string;
|
|
36
|
+
/** leave out events with this public tag (its name or slug, any case) */
|
|
37
|
+
excludeTag?: string;
|
|
34
38
|
}
|
|
35
39
|
export interface SearchOptions extends RequestOptions {
|
|
36
40
|
/** Which groups to search; default all three. */
|
package/dist/index.js
CHANGED
|
@@ -219,7 +219,7 @@ export function createClient(options) {
|
|
|
219
219
|
return { ...result, items: result.items.filter(p => !o.tag || p.tags.includes(o.tag)) };
|
|
220
220
|
};
|
|
221
221
|
const pages = (o = {}) => content({ ...o, kind: 'page' });
|
|
222
|
-
const events = (o = {}) => request('events', o, { ...paging(o), from: o.from, to: o.to, calendar: o.calendar, q: o.q });
|
|
222
|
+
const events = (o = {}) => request('events', o, { ...paging(o), from: o.from, to: o.to, calendar: o.calendar, tag: o.tag, excludeTag: o.excludeTag, q: o.q });
|
|
223
223
|
const resources = (o = {}) => request('resources', o, paging(o));
|
|
224
224
|
const paginate = {
|
|
225
225
|
content: (o = {}) => iterate(content, 'items', o),
|
package/dist/types.d.ts
CHANGED
|
@@ -825,7 +825,7 @@ export type EditorToken = {
|
|
|
825
825
|
"id": string;
|
|
826
826
|
"name": string;
|
|
827
827
|
"email": string;
|
|
828
|
-
"role":
|
|
828
|
+
"role": string;
|
|
829
829
|
};
|
|
830
830
|
"device": {
|
|
831
831
|
"id": string;
|
|
@@ -844,7 +844,7 @@ export type EditorMe = {
|
|
|
844
844
|
"id": string;
|
|
845
845
|
"name": string;
|
|
846
846
|
"email": string;
|
|
847
|
-
"role":
|
|
847
|
+
"role": string;
|
|
848
848
|
};
|
|
849
849
|
"device": {
|
|
850
850
|
"id": string;
|
|
@@ -1018,7 +1018,7 @@ export type EditorSections = {
|
|
|
1018
1018
|
"revision": number;
|
|
1019
1019
|
"stage": "draft" | "live";
|
|
1020
1020
|
"hasDraft": boolean;
|
|
1021
|
-
"role":
|
|
1021
|
+
"role": string;
|
|
1022
1022
|
"theme": {
|
|
1023
1023
|
"slug": string;
|
|
1024
1024
|
"name": string;
|