@usezanin/client 0.1.0
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 +21 -0
- package/README.md +34 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +161 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +133 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +41 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Siyabend Oezdemir
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# @usezanin/client
|
|
2
|
+
|
|
3
|
+
Typed API client for [Zanin](https://github.com/siyabendoezdemir/zanin), the agent-native headless blog CMS. Used by `@usezanin/blog` (the Next.js SDK) and `@usezanin/mcp` (the MCP server); use it directly for scripts and CI.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install @usezanin/client
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { ZaninClient } from "@usezanin/client";
|
|
11
|
+
|
|
12
|
+
const zanin = new ZaninClient({
|
|
13
|
+
baseUrl: "https://your-zanin-deployment",
|
|
14
|
+
apiKey: process.env.ZANIN_API_KEY!, // "zn_...", created in the dashboard
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const [site] = await zanin.listSites();
|
|
18
|
+
const post = await zanin.createPost(site.id, {
|
|
19
|
+
slug: "hello-world",
|
|
20
|
+
title: "Hello World",
|
|
21
|
+
body: "# Hi\n\nWritten via the API.",
|
|
22
|
+
changeSummary: "Initial version",
|
|
23
|
+
});
|
|
24
|
+
await zanin.publishPost(post.id);
|
|
25
|
+
|
|
26
|
+
// Correlate content changes with search outcomes:
|
|
27
|
+
const perf = await zanin.getPostPerformance(post.id, { days: 90 });
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Covers posts (CRUD, publish, revisions), media upload, custom MDX components, and Google Search Console performance (daily metrics with revision markers, top queries).
|
|
31
|
+
|
|
32
|
+
All mutating post methods require a `changeSummary` — every change is stored as an immutable revision so search performance can be correlated with what changed.
|
|
33
|
+
|
|
34
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { CreatePostInput, ListPostsOptions, Media, Post, PostPerformance, PostRevision, PostStatus, Site, SiteComponent, SitePerformance, TopQueriesResult, UpdatePostInput, UploadMediaInput, UpsertComponentInput } from "./types.js";
|
|
2
|
+
export * from "./types.js";
|
|
3
|
+
export interface ZaninClientOptions {
|
|
4
|
+
/** Base URL of the Zanin CMS, e.g. "https://cms.zanin.io". */
|
|
5
|
+
baseUrl: string;
|
|
6
|
+
/** Workspace-scoped API key ("zn_..."). */
|
|
7
|
+
apiKey: string;
|
|
8
|
+
/** Optional fetch implementation override. */
|
|
9
|
+
fetch?: typeof fetch;
|
|
10
|
+
}
|
|
11
|
+
export declare class ZaninApiError extends Error {
|
|
12
|
+
readonly status: number;
|
|
13
|
+
readonly details?: unknown | undefined;
|
|
14
|
+
constructor(status: number, message: string, details?: unknown | undefined);
|
|
15
|
+
}
|
|
16
|
+
export declare class ZaninClient {
|
|
17
|
+
private readonly baseUrl;
|
|
18
|
+
private readonly apiKey;
|
|
19
|
+
private readonly fetchImpl;
|
|
20
|
+
constructor(options: ZaninClientOptions);
|
|
21
|
+
private request;
|
|
22
|
+
listSites(): Promise<Site[]>;
|
|
23
|
+
listPosts(siteId: string, options?: ListPostsOptions): Promise<Post[]>;
|
|
24
|
+
getPost(postId: string): Promise<Post>;
|
|
25
|
+
/**
|
|
26
|
+
* Fetches a post by slug (with body). Returns null when no post matches,
|
|
27
|
+
* so host sites can map it straight to a 404.
|
|
28
|
+
*/
|
|
29
|
+
getPostBySlug(siteId: string, slug: string, options?: {
|
|
30
|
+
status?: PostStatus;
|
|
31
|
+
}): Promise<Post | null>;
|
|
32
|
+
createPost(siteId: string, input: CreatePostInput): Promise<Post>;
|
|
33
|
+
updatePost(postId: string, input: UpdatePostInput): Promise<Post>;
|
|
34
|
+
deletePost(postId: string): Promise<void>;
|
|
35
|
+
publishPost(postId: string): Promise<Post>;
|
|
36
|
+
unpublishPost(postId: string): Promise<Post>;
|
|
37
|
+
listRevisions(postId: string, options?: {
|
|
38
|
+
includeBody?: boolean;
|
|
39
|
+
}): Promise<PostRevision[]>;
|
|
40
|
+
/** Daily search metrics for a post with revision markers inline. */
|
|
41
|
+
getPostPerformance(postId: string, options?: {
|
|
42
|
+
days?: number;
|
|
43
|
+
}): Promise<PostPerformance>;
|
|
44
|
+
/** Site-wide daily search metrics. */
|
|
45
|
+
getSitePerformance(siteId: string, options?: {
|
|
46
|
+
days?: number;
|
|
47
|
+
}): Promise<SitePerformance>;
|
|
48
|
+
/** Top search queries for a site, optionally scoped to one post. */
|
|
49
|
+
getTopQueries(siteId: string, options?: {
|
|
50
|
+
days?: number;
|
|
51
|
+
limit?: number;
|
|
52
|
+
postId?: string;
|
|
53
|
+
}): Promise<TopQueriesResult>;
|
|
54
|
+
listComponents(siteId: string, options?: {
|
|
55
|
+
includeCompiled?: boolean;
|
|
56
|
+
}): Promise<SiteComponent[]>;
|
|
57
|
+
getComponent(siteId: string, name: string): Promise<SiteComponent>;
|
|
58
|
+
/** Creates or updates (by name) a custom MDX component from TSX source. */
|
|
59
|
+
upsertComponent(siteId: string, input: UpsertComponentInput): Promise<SiteComponent>;
|
|
60
|
+
deleteComponent(siteId: string, name: string): Promise<void>;
|
|
61
|
+
listMedia(siteId: string): Promise<Media[]>;
|
|
62
|
+
uploadMedia(siteId: string, input: UploadMediaInput): Promise<Media>;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,KAAK,EACL,IAAI,EACJ,eAAe,EACf,YAAY,EACZ,UAAU,EACV,IAAI,EACJ,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAEpB,cAAc,YAAY,CAAC;AAE3B,MAAM,WAAW,kBAAkB;IACjC,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;IAChB,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACtB;AA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+
export class ZaninApiError extends Error {
|
|
3
|
+
status;
|
|
4
|
+
details;
|
|
5
|
+
constructor(status, message, details) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.status = status;
|
|
8
|
+
this.details = details;
|
|
9
|
+
this.name = "ZaninApiError";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export class ZaninClient {
|
|
13
|
+
baseUrl;
|
|
14
|
+
apiKey;
|
|
15
|
+
fetchImpl;
|
|
16
|
+
constructor(options) {
|
|
17
|
+
this.baseUrl = options.baseUrl.replace(/\/+$/, "");
|
|
18
|
+
this.apiKey = options.apiKey;
|
|
19
|
+
this.fetchImpl = options.fetch ?? fetch;
|
|
20
|
+
}
|
|
21
|
+
async request(method, path, opts = {}) {
|
|
22
|
+
const url = new URL(`${this.baseUrl}/api/v1${path}`);
|
|
23
|
+
for (const [k, v] of Object.entries(opts.query ?? {})) {
|
|
24
|
+
url.searchParams.set(k, v);
|
|
25
|
+
}
|
|
26
|
+
const res = await this.fetchImpl(url, {
|
|
27
|
+
method,
|
|
28
|
+
headers: {
|
|
29
|
+
authorization: `Bearer ${this.apiKey}`,
|
|
30
|
+
...(opts.body !== undefined ? { "content-type": "application/json" } : {}),
|
|
31
|
+
},
|
|
32
|
+
body: opts.formData ?? (opts.body !== undefined ? JSON.stringify(opts.body) : undefined),
|
|
33
|
+
});
|
|
34
|
+
const text = await res.text();
|
|
35
|
+
let json = null;
|
|
36
|
+
try {
|
|
37
|
+
json = text ? JSON.parse(text) : null;
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
// fall through with null body
|
|
41
|
+
}
|
|
42
|
+
if (!res.ok) {
|
|
43
|
+
const err = json?.error;
|
|
44
|
+
throw new ZaninApiError(res.status, err?.message ?? `Request failed with status ${res.status}`, err?.details);
|
|
45
|
+
}
|
|
46
|
+
return json;
|
|
47
|
+
}
|
|
48
|
+
// -- Sites ----------------------------------------------------------------
|
|
49
|
+
async listSites() {
|
|
50
|
+
const { sites } = await this.request("GET", "/sites");
|
|
51
|
+
return sites;
|
|
52
|
+
}
|
|
53
|
+
// -- Posts ----------------------------------------------------------------
|
|
54
|
+
async listPosts(siteId, options = {}) {
|
|
55
|
+
const query = {};
|
|
56
|
+
if (options.status)
|
|
57
|
+
query.status = options.status;
|
|
58
|
+
if (options.limit !== undefined)
|
|
59
|
+
query.limit = String(options.limit);
|
|
60
|
+
if (options.offset !== undefined)
|
|
61
|
+
query.offset = String(options.offset);
|
|
62
|
+
const { posts } = await this.request("GET", `/sites/${encodeURIComponent(siteId)}/posts`, { query });
|
|
63
|
+
return posts;
|
|
64
|
+
}
|
|
65
|
+
async getPost(postId) {
|
|
66
|
+
const { post } = await this.request("GET", `/posts/${encodeURIComponent(postId)}`);
|
|
67
|
+
return post;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Fetches a post by slug (with body). Returns null when no post matches,
|
|
71
|
+
* so host sites can map it straight to a 404.
|
|
72
|
+
*/
|
|
73
|
+
async getPostBySlug(siteId, slug, options = {}) {
|
|
74
|
+
try {
|
|
75
|
+
const { post } = await this.request("GET", `/sites/${encodeURIComponent(siteId)}/posts/by-slug/${encodeURIComponent(slug)}`, { query: options.status ? { status: options.status } : {} });
|
|
76
|
+
return post;
|
|
77
|
+
}
|
|
78
|
+
catch (err) {
|
|
79
|
+
if (err instanceof ZaninApiError && err.status === 404)
|
|
80
|
+
return null;
|
|
81
|
+
throw err;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
async createPost(siteId, input) {
|
|
85
|
+
const { post } = await this.request("POST", `/sites/${encodeURIComponent(siteId)}/posts`, { body: input });
|
|
86
|
+
return post;
|
|
87
|
+
}
|
|
88
|
+
async updatePost(postId, input) {
|
|
89
|
+
const { post } = await this.request("PATCH", `/posts/${encodeURIComponent(postId)}`, { body: input });
|
|
90
|
+
return post;
|
|
91
|
+
}
|
|
92
|
+
async deletePost(postId) {
|
|
93
|
+
await this.request("DELETE", `/posts/${encodeURIComponent(postId)}`);
|
|
94
|
+
}
|
|
95
|
+
async publishPost(postId) {
|
|
96
|
+
const { post } = await this.request("POST", `/posts/${encodeURIComponent(postId)}/publish`);
|
|
97
|
+
return post;
|
|
98
|
+
}
|
|
99
|
+
async unpublishPost(postId) {
|
|
100
|
+
const { post } = await this.request("POST", `/posts/${encodeURIComponent(postId)}/unpublish`);
|
|
101
|
+
return post;
|
|
102
|
+
}
|
|
103
|
+
async listRevisions(postId, options = {}) {
|
|
104
|
+
const { revisions } = await this.request("GET", `/posts/${encodeURIComponent(postId)}/revisions`, { query: options.includeBody ? { includeBody: "true" } : {} });
|
|
105
|
+
return revisions;
|
|
106
|
+
}
|
|
107
|
+
// -- Performance (Google Search Console) -------------------------------------
|
|
108
|
+
/** Daily search metrics for a post with revision markers inline. */
|
|
109
|
+
async getPostPerformance(postId, options = {}) {
|
|
110
|
+
return this.request("GET", `/posts/${encodeURIComponent(postId)}/performance`, { query: options.days !== undefined ? { days: String(options.days) } : {} });
|
|
111
|
+
}
|
|
112
|
+
/** Site-wide daily search metrics. */
|
|
113
|
+
async getSitePerformance(siteId, options = {}) {
|
|
114
|
+
return this.request("GET", `/sites/${encodeURIComponent(siteId)}/performance`, { query: options.days !== undefined ? { days: String(options.days) } : {} });
|
|
115
|
+
}
|
|
116
|
+
/** Top search queries for a site, optionally scoped to one post. */
|
|
117
|
+
async getTopQueries(siteId, options = {}) {
|
|
118
|
+
const query = {};
|
|
119
|
+
if (options.days !== undefined)
|
|
120
|
+
query.days = String(options.days);
|
|
121
|
+
if (options.limit !== undefined)
|
|
122
|
+
query.limit = String(options.limit);
|
|
123
|
+
if (options.postId)
|
|
124
|
+
query.postId = options.postId;
|
|
125
|
+
return this.request("GET", `/sites/${encodeURIComponent(siteId)}/top-queries`, { query });
|
|
126
|
+
}
|
|
127
|
+
// -- Components -------------------------------------------------------------
|
|
128
|
+
async listComponents(siteId, options = {}) {
|
|
129
|
+
const { components } = await this.request("GET", `/sites/${encodeURIComponent(siteId)}/components`, { query: options.includeCompiled ? { includeCompiled: "true" } : {} });
|
|
130
|
+
return components;
|
|
131
|
+
}
|
|
132
|
+
async getComponent(siteId, name) {
|
|
133
|
+
const { component } = await this.request("GET", `/sites/${encodeURIComponent(siteId)}/components/${encodeURIComponent(name)}`);
|
|
134
|
+
return component;
|
|
135
|
+
}
|
|
136
|
+
/** Creates or updates (by name) a custom MDX component from TSX source. */
|
|
137
|
+
async upsertComponent(siteId, input) {
|
|
138
|
+
const { component } = await this.request("POST", `/sites/${encodeURIComponent(siteId)}/components`, { body: input });
|
|
139
|
+
return component;
|
|
140
|
+
}
|
|
141
|
+
async deleteComponent(siteId, name) {
|
|
142
|
+
await this.request("DELETE", `/sites/${encodeURIComponent(siteId)}/components/${encodeURIComponent(name)}`);
|
|
143
|
+
}
|
|
144
|
+
// -- Media ----------------------------------------------------------------
|
|
145
|
+
async listMedia(siteId) {
|
|
146
|
+
const { media } = await this.request("GET", `/sites/${encodeURIComponent(siteId)}/media`);
|
|
147
|
+
return media;
|
|
148
|
+
}
|
|
149
|
+
async uploadMedia(siteId, input) {
|
|
150
|
+
const blob = input.data instanceof Blob
|
|
151
|
+
? input.data
|
|
152
|
+
: new Blob([input.data], { type: input.contentType });
|
|
153
|
+
const form = new FormData();
|
|
154
|
+
form.set("file", new File([blob], input.filename, { type: input.contentType }));
|
|
155
|
+
if (input.alt)
|
|
156
|
+
form.set("alt", input.alt);
|
|
157
|
+
const { media } = await this.request("POST", `/sites/${encodeURIComponent(siteId)}/media`, { formData: form });
|
|
158
|
+
return media;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiBA,cAAc,YAAY,CAAC;AAW3B,MAAM,OAAO,aAAc,SAAQ,KAAK;IAEpB;IAEA;IAHlB,YACkB,MAAc,EAC9B,OAAe,EACC,OAAiB;QAEjC,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KAAuB;QACvD,MAAM,IAAI,GACR,KAAK,CAAC,IAAI,YAAY,IAAI;YACxB,CAAC,CAAC,KAAK,CAAC,IAAI;YACZ,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,IAAgB,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;QACtE,MAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC5B,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;QAChF,IAAI,KAAK,CAAC,GAAG;YAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;QAC1C,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,OAAO,CAClC,MAAM,EACN,UAAU,kBAAkB,CAAC,MAAM,CAAC,QAAQ,EAC5C,EAAE,QAAQ,EAAE,IAAI,EAAE,CACnB,CAAC;QACF,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
export type PostStatus = "draft" | "published";
|
|
2
|
+
export interface Site {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
slug: string;
|
|
6
|
+
domain: string | null;
|
|
7
|
+
gscProperty: string | null;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
updatedAt: string;
|
|
10
|
+
}
|
|
11
|
+
export interface Post {
|
|
12
|
+
id: string;
|
|
13
|
+
siteId: string;
|
|
14
|
+
slug: string;
|
|
15
|
+
title: string;
|
|
16
|
+
description: string | null;
|
|
17
|
+
body?: string;
|
|
18
|
+
status: PostStatus;
|
|
19
|
+
publishedAt: string | null;
|
|
20
|
+
tags: string[];
|
|
21
|
+
ogImageUrl: string | null;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
updatedAt: string;
|
|
24
|
+
}
|
|
25
|
+
export interface PostRevision {
|
|
26
|
+
id: string;
|
|
27
|
+
postId: string;
|
|
28
|
+
revision: number;
|
|
29
|
+
title: string;
|
|
30
|
+
description: string | null;
|
|
31
|
+
body?: string;
|
|
32
|
+
tags: string[];
|
|
33
|
+
changeSummary: string;
|
|
34
|
+
createdBy: string;
|
|
35
|
+
createdAt: string;
|
|
36
|
+
}
|
|
37
|
+
export interface Media {
|
|
38
|
+
id: string;
|
|
39
|
+
siteId: string;
|
|
40
|
+
filename: string;
|
|
41
|
+
url: string;
|
|
42
|
+
contentType: string;
|
|
43
|
+
sizeBytes: number;
|
|
44
|
+
alt: string | null;
|
|
45
|
+
createdAt: string;
|
|
46
|
+
}
|
|
47
|
+
export interface SiteComponent {
|
|
48
|
+
id: string;
|
|
49
|
+
siteId: string;
|
|
50
|
+
name: string;
|
|
51
|
+
source?: string;
|
|
52
|
+
/** Compiled CJS; present when requested with includeCompiled. */
|
|
53
|
+
compiledJs?: string | null;
|
|
54
|
+
createdAt: string;
|
|
55
|
+
updatedAt: string;
|
|
56
|
+
}
|
|
57
|
+
export interface UpsertComponentInput {
|
|
58
|
+
/** MDX tag name, PascalCase (e.g. "PricingTable"). */
|
|
59
|
+
name: string;
|
|
60
|
+
/** TSX source with a default export; may only import react / react/jsx-runtime. */
|
|
61
|
+
source: string;
|
|
62
|
+
}
|
|
63
|
+
export interface DailyMetrics {
|
|
64
|
+
date: string;
|
|
65
|
+
clicks: number;
|
|
66
|
+
impressions: number;
|
|
67
|
+
ctr: number;
|
|
68
|
+
position: number;
|
|
69
|
+
/** Revisions that happened on this day (post performance only). */
|
|
70
|
+
events?: RevisionMarker[];
|
|
71
|
+
}
|
|
72
|
+
export interface RevisionMarker {
|
|
73
|
+
revision: number;
|
|
74
|
+
date: string;
|
|
75
|
+
changeSummary: string;
|
|
76
|
+
createdBy: string;
|
|
77
|
+
}
|
|
78
|
+
export interface PostPerformance {
|
|
79
|
+
postId: string;
|
|
80
|
+
slug: string;
|
|
81
|
+
days: DailyMetrics[];
|
|
82
|
+
revisions: RevisionMarker[];
|
|
83
|
+
gscConfigured: boolean;
|
|
84
|
+
}
|
|
85
|
+
export interface SitePerformance {
|
|
86
|
+
siteId: string;
|
|
87
|
+
days: DailyMetrics[];
|
|
88
|
+
gscConfigured: boolean;
|
|
89
|
+
}
|
|
90
|
+
export interface TopQuery {
|
|
91
|
+
query: string;
|
|
92
|
+
clicks: number;
|
|
93
|
+
impressions: number;
|
|
94
|
+
ctr: number;
|
|
95
|
+
position: number;
|
|
96
|
+
}
|
|
97
|
+
export interface TopQueriesResult {
|
|
98
|
+
siteId: string;
|
|
99
|
+
queries: TopQuery[];
|
|
100
|
+
gscConfigured: boolean;
|
|
101
|
+
}
|
|
102
|
+
export interface CreatePostInput {
|
|
103
|
+
slug: string;
|
|
104
|
+
title: string;
|
|
105
|
+
description?: string | null;
|
|
106
|
+
body?: string;
|
|
107
|
+
tags?: string[];
|
|
108
|
+
ogImageUrl?: string | null;
|
|
109
|
+
/** Why this post exists / what it covers. Defaults to "Initial version". */
|
|
110
|
+
changeSummary?: string;
|
|
111
|
+
}
|
|
112
|
+
export interface UpdatePostInput {
|
|
113
|
+
slug?: string;
|
|
114
|
+
title?: string;
|
|
115
|
+
description?: string | null;
|
|
116
|
+
body?: string;
|
|
117
|
+
tags?: string[];
|
|
118
|
+
ogImageUrl?: string | null;
|
|
119
|
+
/** Required: what changed and why. Powers revision/SEO correlation. */
|
|
120
|
+
changeSummary: string;
|
|
121
|
+
}
|
|
122
|
+
export interface ListPostsOptions {
|
|
123
|
+
status?: PostStatus;
|
|
124
|
+
limit?: number;
|
|
125
|
+
offset?: number;
|
|
126
|
+
}
|
|
127
|
+
export interface UploadMediaInput {
|
|
128
|
+
filename: string;
|
|
129
|
+
contentType: string;
|
|
130
|
+
data: ArrayBuffer | Uint8Array | Blob;
|
|
131
|
+
alt?: string;
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,WAAW,CAAC;AAE/C,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,UAAU,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SA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C,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,WAAW,GAAG,UAAU,GAAG,IAAI,CAAC;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@usezanin/client",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Typed API client for the Zanin blog CMS",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"keywords": [
|
|
19
|
+
"zanin",
|
|
20
|
+
"cms",
|
|
21
|
+
"blog",
|
|
22
|
+
"headless-cms"
|
|
23
|
+
],
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/siyabendoezdemir/zanin.git",
|
|
27
|
+
"directory": "packages/client"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "tsc -p tsconfig.json",
|
|
34
|
+
"dev": "tsc -p tsconfig.json --watch",
|
|
35
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
36
|
+
"prepublishOnly": "npm run build"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"typescript": "^5.8.0"
|
|
40
|
+
}
|
|
41
|
+
}
|