@verbatims/sdk 1.6.15 → 1.6.16
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 +31 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/resources/index.d.ts +1 -0
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +1 -0
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/social.d.ts +272 -0
- package/dist/resources/social.d.ts.map +1 -0
- package/dist/resources/social.js +153 -0
- package/dist/resources/social.js.map +1 -0
- package/dist/types.d.ts +110 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +20 -0
- package/src/resources/__tests__/resources.test.ts +250 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/social.ts +190 -0
- package/src/types.ts +127 -0
package/README.md
CHANGED
|
@@ -38,12 +38,42 @@ for await (const quote of vb.quotes.paginate({ language: 'fr' })) {
|
|
|
38
38
|
|
|
39
39
|
| Resource | Methods |
|
|
40
40
|
|---|---|
|
|
41
|
-
| `vb.quotes` | `list`, `get`, `create`, `update`, `delete`, `paginate` |
|
|
41
|
+
| `vb.quotes` | `list`, `get`, `create`, `update`, `delete`, `submit`, `moderate`, `paginate` |
|
|
42
42
|
| `vb.authors` | `list`, `get`, `create`, `update`, `paginate` |
|
|
43
43
|
| `vb.references` | `list`, `get`, `create`, `update`, `paginate` |
|
|
44
44
|
| `vb.tags` | `list`, `paginate` |
|
|
45
45
|
| `vb.collections` | `create`, `addQuote`, `removeQuote` |
|
|
46
46
|
| `vb.search` | `query`, `paginate` |
|
|
47
|
+
| `vb.themes` | `list`, `get`, `create`, `update`, `delete`, `activate`, `setDefault`, `getActive`, `getFeed`, `paginate` |
|
|
48
|
+
| `vb.social` | `listPlatforms`, `listQueue`, `getQueueItem`, `addToQueue`, `addRandomToQueue`, `removeQueueItem`, `clearQueue`, `reorderQueueItem`, `runNow`, `requeueQueueItem`, `listPosts`, `paginateQueue` |
|
|
49
|
+
|
|
50
|
+
## Social queue
|
|
51
|
+
|
|
52
|
+
Manage the auto-post queue of quotes on social platforms (x, bluesky, instagram, threads, facebook, pinterest).
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
// List platforms with queue stats
|
|
56
|
+
const { data } = await vb.social.listPlatforms()
|
|
57
|
+
|
|
58
|
+
// List queued items for a platform
|
|
59
|
+
const { data } = await vb.social.listQueue({ platform: 'bluesky', status: 'queued', limit: 20 })
|
|
60
|
+
|
|
61
|
+
// Enqueue approved quotes
|
|
62
|
+
const { data } = await vb.social.addToQueue({ quote_ids: [42, 57], platform: 'bluesky' })
|
|
63
|
+
|
|
64
|
+
// Enqueue 5 random approved quotes
|
|
65
|
+
const { data } = await vb.social.addRandomToQueue({ platform: 'x', count: 5, language: 'fr' })
|
|
66
|
+
|
|
67
|
+
// Publish the next eligible item immediately
|
|
68
|
+
const { data } = await vb.social.runNow({ platform: 'bluesky' })
|
|
69
|
+
|
|
70
|
+
// Iterate through all queue items
|
|
71
|
+
for await (const item of vb.social.paginateQueue({ platform: 'x' })) {
|
|
72
|
+
console.log(item.id, item.quote_text)
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Requires an API key with the `moderator`/`admin` role and the `social:read` / `social:write` permissions.
|
|
47
77
|
|
|
48
78
|
## Nuxt module
|
|
49
79
|
|
package/dist/index.d.ts
CHANGED
|
@@ -6,12 +6,13 @@ import { TagsResource } from './resources/tags';
|
|
|
6
6
|
import { CollectionsResource } from './resources/collections';
|
|
7
7
|
import { SearchResource } from './resources/search';
|
|
8
8
|
import { ThemesResource } from './resources/themes';
|
|
9
|
+
import { SocialResource } from './resources/social';
|
|
9
10
|
import type { UploadedImage } from './types';
|
|
10
11
|
export type { ClientOptions } from './client';
|
|
11
12
|
export { paginate } from './pagination';
|
|
12
13
|
export type { PageFetcher } from './pagination';
|
|
13
14
|
export { VerbatimsError, NotFoundError, RateLimitError, ValidationError, AuthError, ForbiddenError, } from './errors';
|
|
14
|
-
export type { QuoteStatus, QuoteWithRelations, Author, QuoteReference, PaginationMeta, ApiResponse, ListQuotesParams, ListAuthorsParams, ListReferencesParams, SearchParams, CreateQuoteData, UpdateQuoteData, ModerateQuoteData, CreateAuthorData, UpdateAuthorData, CreateReferenceData, UpdateReferenceData, CreateCollectionData, Theme, ThemeFilter, ThemeTranslation, ThemeSuggestion, ThemeFeed, ThemeFeedTheme, ThemeFeedQuote, ThemeFeedAuthor, ThemeFeedReference, AddQuoteTagData, ThemeWithDetails, ListThemesParams, CreateThemeData, UpdateThemeData, AddFilterData, FilterSuggestion, FilterRecommendationsData, FilterRecommendation, ThemeNameSuggestion, ThemeSuggestionItem, ActiveThemeParams, FeedParams, ThemeSuggestionsQuery, UploadedImage, } from './types';
|
|
15
|
+
export type { QuoteStatus, QuoteWithRelations, Author, QuoteReference, PaginationMeta, ApiResponse, ListQuotesParams, ListAuthorsParams, ListReferencesParams, SearchParams, CreateQuoteData, UpdateQuoteData, ModerateQuoteData, CreateAuthorData, UpdateAuthorData, CreateReferenceData, UpdateReferenceData, CreateCollectionData, Theme, ThemeFilter, ThemeTranslation, ThemeSuggestion, ThemeFeed, ThemeFeedTheme, ThemeFeedQuote, ThemeFeedAuthor, ThemeFeedReference, AddQuoteTagData, ThemeWithDetails, ListThemesParams, CreateThemeData, UpdateThemeData, AddFilterData, FilterSuggestion, FilterRecommendationsData, FilterRecommendation, ThemeNameSuggestion, ThemeSuggestionItem, ActiveThemeParams, FeedParams, ThemeSuggestionsQuery, UploadedImage, SocialPlatform, SocialQueueStatus, SocialPostStatus, SocialPlatformInfo, SocialQueueStats, SocialResolvedContent, SocialQueueItem, SocialPost, QueuedSocialItem, SocialQueueListResult, ListSocialQueueParams, ListSocialPostsParams, AddToSocialQueueData, AddRandomToSocialQueueData, ClearSocialQueueData, ReorderSocialQueueData, RunSocialAutopostData, } from './types';
|
|
15
16
|
export declare class VerbatimsClient extends BaseClient {
|
|
16
17
|
quotes: QuotesResource;
|
|
17
18
|
authors: AuthorsResource;
|
|
@@ -20,6 +21,7 @@ export declare class VerbatimsClient extends BaseClient {
|
|
|
20
21
|
collections: CollectionsResource;
|
|
21
22
|
search: SearchResource;
|
|
22
23
|
themes: ThemesResource;
|
|
24
|
+
social: SocialResource;
|
|
23
25
|
constructor(apiKey: string, opts?: ConstructorParameters<typeof BaseClient>[1]);
|
|
24
26
|
uploadImage(file: Blob): Promise<{
|
|
25
27
|
success: boolean;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,IAAI,UAAU,EAAE,MAAM,UAAU,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAG5C,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE/C,OAAO,EACL,cAAc,EACd,aAAa,EACb,cAAc,EACd,eAAe,EACf,SAAS,EACT,cAAc,GACf,MAAM,UAAU,CAAA;AAEjB,YAAY,EACV,WAAW,EACX,kBAAkB,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AM,EAAE,IAAI,CAAC,EAAE,qBAAqB,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC;IAYxE,WAAW,CAAC,IAAI,EAAE,IAAI;iBAEiE,OAAO;cAAQ,aAAa;;CAE1H"}
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import { TagsResource } from './resources/tags';
|
|
|
7
7
|
import { CollectionsResource } from './resources/collections';
|
|
8
8
|
import { SearchResource } from './resources/search';
|
|
9
9
|
import { ThemesResource } from './resources/themes';
|
|
10
|
+
import { SocialResource } from './resources/social';
|
|
10
11
|
import { apiResponseSchema } from './types';
|
|
11
12
|
export { paginate } from './pagination';
|
|
12
13
|
export { VerbatimsError, NotFoundError, RateLimitError, ValidationError, AuthError, ForbiddenError, } from './errors';
|
|
@@ -18,6 +19,7 @@ export class VerbatimsClient extends BaseClient {
|
|
|
18
19
|
collections;
|
|
19
20
|
search;
|
|
20
21
|
themes;
|
|
22
|
+
social;
|
|
21
23
|
constructor(apiKey, opts) {
|
|
22
24
|
super(apiKey, opts);
|
|
23
25
|
this.quotes = new QuotesResource(this);
|
|
@@ -27,6 +29,7 @@ export class VerbatimsClient extends BaseClient {
|
|
|
27
29
|
this.collections = new CollectionsResource(this);
|
|
28
30
|
this.search = new SearchResource(this);
|
|
29
31
|
this.themes = new ThemesResource(this);
|
|
32
|
+
this.social = new SocialResource(this);
|
|
30
33
|
}
|
|
31
34
|
async uploadImage(file) {
|
|
32
35
|
const uploadSchema = apiResponseSchema(z.object({ url: z.string() }));
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EAAE,eAAe,IAAI,UAAU,EAAE,MAAM,UAAU,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,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["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA"}
|
package/dist/resources/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import type { VerbatimsClient } from '../client';
|
|
2
|
+
import type { SocialQueueItem, ListSocialQueueParams, ListSocialPostsParams, AddToSocialQueueData, AddRandomToSocialQueueData, ClearSocialQueueData, ReorderSocialQueueData, RunSocialAutopostData } from '../types';
|
|
3
|
+
export declare class SocialResource {
|
|
4
|
+
private client;
|
|
5
|
+
constructor(client: VerbatimsClient);
|
|
6
|
+
listPlatforms(): Promise<{
|
|
7
|
+
success: true;
|
|
8
|
+
data?: {
|
|
9
|
+
platform: "x" | "bluesky" | "instagram" | "threads" | "facebook" | "pinterest";
|
|
10
|
+
label: string;
|
|
11
|
+
enabled: boolean;
|
|
12
|
+
queue: {
|
|
13
|
+
queued: number;
|
|
14
|
+
processing: number;
|
|
15
|
+
posted: number;
|
|
16
|
+
failed: number;
|
|
17
|
+
};
|
|
18
|
+
}[] | undefined;
|
|
19
|
+
message?: string | undefined;
|
|
20
|
+
pagination?: {
|
|
21
|
+
page: number;
|
|
22
|
+
limit: number;
|
|
23
|
+
total: number;
|
|
24
|
+
totalPages: number;
|
|
25
|
+
hasMore: boolean;
|
|
26
|
+
} | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
listQueue(params?: ListSocialQueueParams): Promise<{
|
|
29
|
+
success: true;
|
|
30
|
+
data?: {
|
|
31
|
+
queue: {
|
|
32
|
+
id: number;
|
|
33
|
+
quote_id: number;
|
|
34
|
+
source_type: string;
|
|
35
|
+
source_id: number;
|
|
36
|
+
platform: "x" | "bluesky" | "instagram" | "threads" | "facebook" | "pinterest";
|
|
37
|
+
status: "queued" | "processing" | "posted" | "failed";
|
|
38
|
+
position: number;
|
|
39
|
+
scheduled_for: string | null;
|
|
40
|
+
created_at: string | null;
|
|
41
|
+
updated_at: string | null;
|
|
42
|
+
published_post_url: string | null;
|
|
43
|
+
published_external_post_id: string | null;
|
|
44
|
+
published_posted_at: string | null;
|
|
45
|
+
error_message: string | null;
|
|
46
|
+
quote_posts_count: number;
|
|
47
|
+
quote_text: string | null;
|
|
48
|
+
quote_language: string | null;
|
|
49
|
+
author_name: string | null;
|
|
50
|
+
reference_name: string | null;
|
|
51
|
+
resolved_content: {
|
|
52
|
+
source_type: string;
|
|
53
|
+
source_id: number;
|
|
54
|
+
primary_text: string | null;
|
|
55
|
+
secondary_text: string | null;
|
|
56
|
+
canonical_path: string | null;
|
|
57
|
+
title: string | null;
|
|
58
|
+
subtitle: string | null;
|
|
59
|
+
language: string | null;
|
|
60
|
+
} | null;
|
|
61
|
+
}[];
|
|
62
|
+
stats: {
|
|
63
|
+
queued: number;
|
|
64
|
+
processing: number;
|
|
65
|
+
posted: number;
|
|
66
|
+
failed: number;
|
|
67
|
+
};
|
|
68
|
+
} | undefined;
|
|
69
|
+
message?: string | undefined;
|
|
70
|
+
pagination?: {
|
|
71
|
+
page: number;
|
|
72
|
+
limit: number;
|
|
73
|
+
total: number;
|
|
74
|
+
totalPages: number;
|
|
75
|
+
hasMore: boolean;
|
|
76
|
+
} | undefined;
|
|
77
|
+
}>;
|
|
78
|
+
paginateQueue(params?: ListSocialQueueParams): AsyncGenerator<SocialQueueItem>;
|
|
79
|
+
getQueueItem(id: number): Promise<{
|
|
80
|
+
success: true;
|
|
81
|
+
data?: {
|
|
82
|
+
id: number;
|
|
83
|
+
quote_id: number;
|
|
84
|
+
source_type: string;
|
|
85
|
+
source_id: number;
|
|
86
|
+
platform: "x" | "bluesky" | "instagram" | "threads" | "facebook" | "pinterest";
|
|
87
|
+
status: "queued" | "processing" | "posted" | "failed";
|
|
88
|
+
position: number;
|
|
89
|
+
scheduled_for: string | null;
|
|
90
|
+
created_at: string | null;
|
|
91
|
+
updated_at: string | null;
|
|
92
|
+
published_post_url: string | null;
|
|
93
|
+
published_external_post_id: string | null;
|
|
94
|
+
published_posted_at: string | null;
|
|
95
|
+
error_message: string | null;
|
|
96
|
+
quote_posts_count: number;
|
|
97
|
+
quote_text: string | null;
|
|
98
|
+
quote_language: string | null;
|
|
99
|
+
author_name: string | null;
|
|
100
|
+
reference_name: string | null;
|
|
101
|
+
resolved_content: {
|
|
102
|
+
source_type: string;
|
|
103
|
+
source_id: number;
|
|
104
|
+
primary_text: string | null;
|
|
105
|
+
secondary_text: string | null;
|
|
106
|
+
canonical_path: string | null;
|
|
107
|
+
title: string | null;
|
|
108
|
+
subtitle: string | null;
|
|
109
|
+
language: string | null;
|
|
110
|
+
} | null;
|
|
111
|
+
} | undefined;
|
|
112
|
+
message?: string | undefined;
|
|
113
|
+
pagination?: {
|
|
114
|
+
page: number;
|
|
115
|
+
limit: number;
|
|
116
|
+
total: number;
|
|
117
|
+
totalPages: number;
|
|
118
|
+
hasMore: boolean;
|
|
119
|
+
} | undefined;
|
|
120
|
+
}>;
|
|
121
|
+
addToQueue(data: AddToSocialQueueData): Promise<{
|
|
122
|
+
success: true;
|
|
123
|
+
data?: {
|
|
124
|
+
id: number;
|
|
125
|
+
quote_id: number;
|
|
126
|
+
source_type: string;
|
|
127
|
+
source_id: number;
|
|
128
|
+
position: number;
|
|
129
|
+
status?: "queued" | "processing" | "posted" | "failed" | undefined;
|
|
130
|
+
}[] | undefined;
|
|
131
|
+
message?: string | undefined;
|
|
132
|
+
pagination?: {
|
|
133
|
+
page: number;
|
|
134
|
+
limit: number;
|
|
135
|
+
total: number;
|
|
136
|
+
totalPages: number;
|
|
137
|
+
hasMore: boolean;
|
|
138
|
+
} | undefined;
|
|
139
|
+
count?: number | undefined;
|
|
140
|
+
}>;
|
|
141
|
+
addRandomToQueue(data: AddRandomToSocialQueueData): Promise<{
|
|
142
|
+
success: true;
|
|
143
|
+
data?: {
|
|
144
|
+
id: number;
|
|
145
|
+
quote_id: number;
|
|
146
|
+
source_type: string;
|
|
147
|
+
source_id: number;
|
|
148
|
+
position: number;
|
|
149
|
+
status?: "queued" | "processing" | "posted" | "failed" | undefined;
|
|
150
|
+
}[] | undefined;
|
|
151
|
+
message?: string | undefined;
|
|
152
|
+
pagination?: {
|
|
153
|
+
page: number;
|
|
154
|
+
limit: number;
|
|
155
|
+
total: number;
|
|
156
|
+
totalPages: number;
|
|
157
|
+
hasMore: boolean;
|
|
158
|
+
} | undefined;
|
|
159
|
+
count?: number | undefined;
|
|
160
|
+
}>;
|
|
161
|
+
removeQueueItem(id: number): Promise<{
|
|
162
|
+
success: true;
|
|
163
|
+
data?: {
|
|
164
|
+
deleted: true;
|
|
165
|
+
id: number;
|
|
166
|
+
sourceType: string;
|
|
167
|
+
sourceId: number;
|
|
168
|
+
} | undefined;
|
|
169
|
+
message?: string | undefined;
|
|
170
|
+
pagination?: {
|
|
171
|
+
page: number;
|
|
172
|
+
limit: number;
|
|
173
|
+
total: number;
|
|
174
|
+
totalPages: number;
|
|
175
|
+
hasMore: boolean;
|
|
176
|
+
} | undefined;
|
|
177
|
+
}>;
|
|
178
|
+
clearQueue(data: ClearSocialQueueData): Promise<{
|
|
179
|
+
success: true;
|
|
180
|
+
data?: {
|
|
181
|
+
deleted: true;
|
|
182
|
+
platform: string;
|
|
183
|
+
deletedCount: number;
|
|
184
|
+
sourceTypes: {
|
|
185
|
+
sourceType: string;
|
|
186
|
+
count: number;
|
|
187
|
+
}[];
|
|
188
|
+
} | undefined;
|
|
189
|
+
message?: string | undefined;
|
|
190
|
+
pagination?: {
|
|
191
|
+
page: number;
|
|
192
|
+
limit: number;
|
|
193
|
+
total: number;
|
|
194
|
+
totalPages: number;
|
|
195
|
+
hasMore: boolean;
|
|
196
|
+
} | undefined;
|
|
197
|
+
}>;
|
|
198
|
+
reorderQueueItem(data: ReorderSocialQueueData): Promise<{
|
|
199
|
+
success: true;
|
|
200
|
+
data?: {
|
|
201
|
+
moved: boolean;
|
|
202
|
+
id?: number | undefined;
|
|
203
|
+
sourceType?: string | undefined;
|
|
204
|
+
sourceId?: number | undefined;
|
|
205
|
+
position?: number | undefined;
|
|
206
|
+
} | undefined;
|
|
207
|
+
message?: string | undefined;
|
|
208
|
+
pagination?: {
|
|
209
|
+
page: number;
|
|
210
|
+
limit: number;
|
|
211
|
+
total: number;
|
|
212
|
+
totalPages: number;
|
|
213
|
+
hasMore: boolean;
|
|
214
|
+
} | undefined;
|
|
215
|
+
}>;
|
|
216
|
+
runNow(data?: RunSocialAutopostData): Promise<{
|
|
217
|
+
success: true;
|
|
218
|
+
data?: Record<string, unknown> | undefined;
|
|
219
|
+
message?: string | undefined;
|
|
220
|
+
pagination?: {
|
|
221
|
+
page: number;
|
|
222
|
+
limit: number;
|
|
223
|
+
total: number;
|
|
224
|
+
totalPages: number;
|
|
225
|
+
hasMore: boolean;
|
|
226
|
+
} | undefined;
|
|
227
|
+
}>;
|
|
228
|
+
requeueQueueItem(id: number): Promise<{
|
|
229
|
+
success: true;
|
|
230
|
+
data?: {
|
|
231
|
+
requeued: true;
|
|
232
|
+
id: number;
|
|
233
|
+
} | undefined;
|
|
234
|
+
message?: string | undefined;
|
|
235
|
+
pagination?: {
|
|
236
|
+
page: number;
|
|
237
|
+
limit: number;
|
|
238
|
+
total: number;
|
|
239
|
+
totalPages: number;
|
|
240
|
+
hasMore: boolean;
|
|
241
|
+
} | undefined;
|
|
242
|
+
}>;
|
|
243
|
+
listPosts(params?: ListSocialPostsParams): Promise<{
|
|
244
|
+
success: true;
|
|
245
|
+
data?: {
|
|
246
|
+
posts: {
|
|
247
|
+
id: number;
|
|
248
|
+
quote_id: number;
|
|
249
|
+
source_type: string;
|
|
250
|
+
source_id: number;
|
|
251
|
+
queue_id: number | null;
|
|
252
|
+
platform: "x" | "bluesky" | "instagram" | "threads" | "facebook" | "pinterest";
|
|
253
|
+
status: "success" | "failed";
|
|
254
|
+
post_text: string | null;
|
|
255
|
+
post_url: string | null;
|
|
256
|
+
external_post_id: string | null;
|
|
257
|
+
error_message: string | null;
|
|
258
|
+
posted_at: string | null;
|
|
259
|
+
created_at: string | null;
|
|
260
|
+
}[];
|
|
261
|
+
} | undefined;
|
|
262
|
+
message?: string | undefined;
|
|
263
|
+
pagination?: {
|
|
264
|
+
page: number;
|
|
265
|
+
limit: number;
|
|
266
|
+
total: number;
|
|
267
|
+
totalPages: number;
|
|
268
|
+
hasMore: boolean;
|
|
269
|
+
} | undefined;
|
|
270
|
+
}>;
|
|
271
|
+
}
|
|
272
|
+
//# sourceMappingURL=social.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"social.d.ts","sourceRoot":"","sources":["../../src/resources/social.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAGhD,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,0BAA0B,EAC1B,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,UAAU,CAAA;AAwHjB,qBAAa,cAAc;IACb,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,eAAe;IAErC,aAAa;;;;;;;;;;;;;;;;;;;;;;IAIb,SAAS,CAAC,MAAM,CAAC,EAAE,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAI9C,aAAa,CAAC,MAAM,CAAC,EAAE,qBAAqB,GAAG,cAAc,CAAC,eAAe,CAAC;IASxE,YAAY,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIvB,UAAU,CAAC,IAAI,EAAE,oBAAoB;;;;;;;;;;;;;;;;;;;;IAIrC,gBAAgB,CAAC,IAAI,EAAE,0BAA0B;;;;;;;;;;;;;;;;;;;;IAIjD,eAAe,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;IAI1B,UAAU,CAAC,IAAI,EAAE,oBAAoB;;;;;;;;;;;;;;;;;;;;IAIrC,gBAAgB,CAAC,IAAI,EAAE,sBAAsB;;;;;;;;;;;;;;;;;;IAI7C,MAAM,CAAC,IAAI,CAAC,EAAE,qBAAqB;;;;;;;;;;;;IAInC,gBAAgB,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;IAI3B,SAAS,CAAC,MAAM,CAAC,EAAE,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAG/C"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
import { apiResponseSchema } from '../types';
|
|
3
|
+
import { paginate } from '../pagination';
|
|
4
|
+
const socialQueueStatsSchema = z.object({
|
|
5
|
+
queued: z.number(),
|
|
6
|
+
processing: z.number(),
|
|
7
|
+
posted: z.number(),
|
|
8
|
+
failed: z.number(),
|
|
9
|
+
});
|
|
10
|
+
const socialResolvedContentSchema = z.object({
|
|
11
|
+
source_type: z.string(),
|
|
12
|
+
source_id: z.number(),
|
|
13
|
+
primary_text: z.string().nullable(),
|
|
14
|
+
secondary_text: z.string().nullable(),
|
|
15
|
+
canonical_path: z.string().nullable(),
|
|
16
|
+
title: z.string().nullable(),
|
|
17
|
+
subtitle: z.string().nullable(),
|
|
18
|
+
language: z.string().nullable(),
|
|
19
|
+
});
|
|
20
|
+
const socialQueueItemSchema = z.object({
|
|
21
|
+
id: z.number(),
|
|
22
|
+
quote_id: z.number(),
|
|
23
|
+
source_type: z.string(),
|
|
24
|
+
source_id: z.number(),
|
|
25
|
+
platform: z.enum(['x', 'bluesky', 'instagram', 'threads', 'facebook', 'pinterest']),
|
|
26
|
+
status: z.enum(['queued', 'processing', 'posted', 'failed']),
|
|
27
|
+
position: z.number(),
|
|
28
|
+
scheduled_for: z.string().nullable(),
|
|
29
|
+
created_at: z.string().nullable(),
|
|
30
|
+
updated_at: z.string().nullable(),
|
|
31
|
+
published_post_url: z.string().nullable(),
|
|
32
|
+
published_external_post_id: z.string().nullable(),
|
|
33
|
+
published_posted_at: z.string().nullable(),
|
|
34
|
+
error_message: z.string().nullable(),
|
|
35
|
+
quote_posts_count: z.number(),
|
|
36
|
+
quote_text: z.string().nullable(),
|
|
37
|
+
quote_language: z.string().nullable(),
|
|
38
|
+
author_name: z.string().nullable(),
|
|
39
|
+
reference_name: z.string().nullable(),
|
|
40
|
+
resolved_content: socialResolvedContentSchema.nullable(),
|
|
41
|
+
});
|
|
42
|
+
const socialPostSchema = z.object({
|
|
43
|
+
id: z.number(),
|
|
44
|
+
quote_id: z.number(),
|
|
45
|
+
source_type: z.string(),
|
|
46
|
+
source_id: z.number(),
|
|
47
|
+
queue_id: z.number().nullable(),
|
|
48
|
+
platform: z.enum(['x', 'bluesky', 'instagram', 'threads', 'facebook', 'pinterest']),
|
|
49
|
+
status: z.enum(['success', 'failed']),
|
|
50
|
+
post_text: z.string().nullable(),
|
|
51
|
+
post_url: z.string().nullable(),
|
|
52
|
+
external_post_id: z.string().nullable(),
|
|
53
|
+
error_message: z.string().nullable(),
|
|
54
|
+
posted_at: z.string().nullable(),
|
|
55
|
+
created_at: z.string().nullable(),
|
|
56
|
+
});
|
|
57
|
+
const socialPlatformSchema = z.object({
|
|
58
|
+
platform: z.enum(['x', 'bluesky', 'instagram', 'threads', 'facebook', 'pinterest']),
|
|
59
|
+
label: z.string(),
|
|
60
|
+
enabled: z.boolean(),
|
|
61
|
+
queue: socialQueueStatsSchema,
|
|
62
|
+
});
|
|
63
|
+
const queuedItemSchema = z.object({
|
|
64
|
+
id: z.number(),
|
|
65
|
+
quote_id: z.number(),
|
|
66
|
+
source_type: z.string(),
|
|
67
|
+
source_id: z.number(),
|
|
68
|
+
position: z.number(),
|
|
69
|
+
status: z.enum(['queued', 'processing', 'posted', 'failed']).optional(),
|
|
70
|
+
});
|
|
71
|
+
const socialQueueListResponseSchema = apiResponseSchema(z.object({
|
|
72
|
+
queue: z.array(socialQueueItemSchema),
|
|
73
|
+
stats: socialQueueStatsSchema,
|
|
74
|
+
}));
|
|
75
|
+
const socialPostsListResponseSchema = apiResponseSchema(z.object({
|
|
76
|
+
posts: z.array(socialPostSchema),
|
|
77
|
+
}));
|
|
78
|
+
const socialPlatformsResponseSchema = apiResponseSchema(z.array(socialPlatformSchema));
|
|
79
|
+
const enqueueResponseSchema = apiResponseSchema(z.array(queuedItemSchema)).extend({
|
|
80
|
+
count: z.number().optional(),
|
|
81
|
+
});
|
|
82
|
+
const deleteQueueItemResponseSchema = apiResponseSchema(z.object({
|
|
83
|
+
deleted: z.literal(true),
|
|
84
|
+
id: z.number(),
|
|
85
|
+
sourceType: z.string(),
|
|
86
|
+
sourceId: z.number(),
|
|
87
|
+
}));
|
|
88
|
+
const clearQueueResponseSchema = apiResponseSchema(z.object({
|
|
89
|
+
deleted: z.literal(true),
|
|
90
|
+
platform: z.string(),
|
|
91
|
+
deletedCount: z.number(),
|
|
92
|
+
sourceTypes: z.array(z.object({
|
|
93
|
+
sourceType: z.string(),
|
|
94
|
+
count: z.number(),
|
|
95
|
+
})),
|
|
96
|
+
}));
|
|
97
|
+
const reorderQueueResponseSchema = apiResponseSchema(z.object({
|
|
98
|
+
moved: z.boolean(),
|
|
99
|
+
id: z.number().optional(),
|
|
100
|
+
sourceType: z.string().optional(),
|
|
101
|
+
sourceId: z.number().optional(),
|
|
102
|
+
position: z.number().optional(),
|
|
103
|
+
}));
|
|
104
|
+
const requeueQueueItemResponseSchema = apiResponseSchema(z.object({
|
|
105
|
+
requeued: z.literal(true),
|
|
106
|
+
id: z.number(),
|
|
107
|
+
}));
|
|
108
|
+
export class SocialResource {
|
|
109
|
+
client;
|
|
110
|
+
constructor(client) {
|
|
111
|
+
this.client = client;
|
|
112
|
+
}
|
|
113
|
+
async listPlatforms() {
|
|
114
|
+
return this.client.get('/social/platforms', {}, socialPlatformsResponseSchema);
|
|
115
|
+
}
|
|
116
|
+
async listQueue(params) {
|
|
117
|
+
return this.client.get('/social/queue', { params: params }, socialQueueListResponseSchema);
|
|
118
|
+
}
|
|
119
|
+
paginateQueue(params) {
|
|
120
|
+
return paginate((page) => this.listQueue({ ...params, page }).then(r => ({
|
|
121
|
+
data: r.data?.queue,
|
|
122
|
+
pagination: r.pagination,
|
|
123
|
+
})));
|
|
124
|
+
}
|
|
125
|
+
async getQueueItem(id) {
|
|
126
|
+
return this.client.get(`/social/queue/${id}`, {}, apiResponseSchema(socialQueueItemSchema));
|
|
127
|
+
}
|
|
128
|
+
async addToQueue(data) {
|
|
129
|
+
return this.client.post('/social/queue', data, {}, enqueueResponseSchema);
|
|
130
|
+
}
|
|
131
|
+
async addRandomToQueue(data) {
|
|
132
|
+
return this.client.post('/social/queue/bulk-random', data, {}, enqueueResponseSchema);
|
|
133
|
+
}
|
|
134
|
+
async removeQueueItem(id) {
|
|
135
|
+
return this.client.delete(`/social/queue/${id}`, {}, deleteQueueItemResponseSchema);
|
|
136
|
+
}
|
|
137
|
+
async clearQueue(data) {
|
|
138
|
+
return this.client.post('/social/queue/clear', data, {}, clearQueueResponseSchema);
|
|
139
|
+
}
|
|
140
|
+
async reorderQueueItem(data) {
|
|
141
|
+
return this.client.post('/social/queue/reorder', data, {}, reorderQueueResponseSchema);
|
|
142
|
+
}
|
|
143
|
+
async runNow(data) {
|
|
144
|
+
return this.client.post('/social/queue/run-now', data ?? {}, {}, apiResponseSchema(z.record(z.string(), z.unknown())));
|
|
145
|
+
}
|
|
146
|
+
async requeueQueueItem(id) {
|
|
147
|
+
return this.client.post(`/social/queue/${id}/requeue`, {}, {}, requeueQueueItemResponseSchema);
|
|
148
|
+
}
|
|
149
|
+
async listPosts(params) {
|
|
150
|
+
return this.client.get('/social/posts', { params: params }, socialPostsListResponseSchema);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=social.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"social.js","sourceRoot":"","sources":["../../src/resources/social.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAYxC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;CACnB,CAAC,CAAA;AAEF,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACh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