@verbatims/sdk 1.6.14 → 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 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;
@@ -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;AAG5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AgB,EAChB,eAAe,EACf,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,0BAA0B,EAC1B,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,SAAS,CAAA;AAEhB,qBAAa,eAAgB,SAAQ,UAAU;IAC7C,MAAM,EAAE,cAAc,CAAA;IACtB,OAAO,EAAE,eAAe,CAAA;IACxB,UAAU,EAAE,kBAAkB,CAAA;IAC9B,IAAI,EAAE,YAAY,CAAA;IAClB,WAAW,EAAE,mBAAmB,CAAA;IAChC,MAAM,EAAE,cAAc,CAAA;IACtB,MAAM,EAAE,cAAc,CAAA;IACtB,MAAM,EAAE,cAAc,CAAA;gBAEV,MAAM,EAAE,MAAM,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,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;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAG3C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAGvC,OAAO,EACL,cAAc,EACd,aAAa,EACb,cAAc,EACd,eAAe,EACf,SAAS,EACT,cAAc,GACf,MAAM,UAAU,CAAA;AA+CjB,MAAM,OAAO,eAAgB,SAAQ,UAAU;IAC7C,MAAM,CAAgB;IACtB,OAAO,CAAiB;IACxB,UAAU,CAAoB;IAC9B,IAAI,CAAc;IAClB,WAAW,CAAqB;IAChC,MAAM,CAAgB;IACtB,MAAM,CAAgB;IAE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C,WAAW,CAAC,IAAU;QAC1B,MAAM,YAAY,GAAG,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAA;QACrE,OAAO,IAAI,CAAC,UAAU,CAAC,eAAe,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,CAAuD,CAAA;IAC5H,CAAC;CACF"}
@@ -5,4 +5,5 @@ export { TagsResource } from './tags';
5
5
  export { CollectionsResource } from './collections';
6
6
  export { SearchResource } from './search';
7
7
  export { ThemesResource } from './themes';
8
+ export { SocialResource } from './social';
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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"}
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"}
@@ -5,4 +5,5 @@ export { TagsResource } from './tags';
5
5
  export { CollectionsResource } from './collections';
6
6
  export { SearchResource } from './search';
7
7
  export { ThemesResource } from './themes';
8
+ export { SocialResource } from './social';
8
9
  //# sourceMappingURL=index.js.map
@@ -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"}
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod/v4';
2
2
  import type { VerbatimsClient } from '../client';
3
3
  import type { SearchParams } from '../types';
4
- declare const searchQuoteSchema: z.ZodObject<{
4
+ declare const searchResultSchema: z.ZodUnion<readonly [z.ZodObject<{
5
5
  id: z.ZodNumber;
6
6
  content: z.ZodString;
7
7
  language: z.ZodString;
@@ -18,14 +18,26 @@ declare const searchQuoteSchema: z.ZodObject<{
18
18
  type: z.ZodOptional<z.ZodString>;
19
19
  }, z.core.$strip>>>;
20
20
  created_at: z.ZodNullable<z.ZodString>;
21
- }, z.core.$strip>;
22
- type SearchResultItem = z.infer<typeof searchQuoteSchema>;
21
+ }, z.core.$strip>, z.ZodObject<{
22
+ id: z.ZodNumber;
23
+ name: z.ZodString;
24
+ image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
+ job: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ type: z.ZodOptional<z.ZodLiteral<"author">>;
27
+ }, z.core.$strip>, z.ZodObject<{
28
+ id: z.ZodNumber;
29
+ name: z.ZodString;
30
+ type: z.ZodOptional<z.ZodString>;
31
+ image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32
+ entity_type: z.ZodOptional<z.ZodLiteral<"reference">>;
33
+ }, z.core.$strip>]>;
34
+ type SearchResultItem = z.infer<typeof searchResultSchema>;
23
35
  export declare class SearchResource {
24
36
  private client;
25
37
  constructor(client: VerbatimsClient);
26
38
  query(params: SearchParams): Promise<{
27
39
  success: true;
28
- data?: {
40
+ data?: ({
29
41
  id: number;
30
42
  content: string;
31
43
  language: string;
@@ -42,7 +54,19 @@ export declare class SearchResource {
42
54
  name: string;
43
55
  type?: string | undefined;
44
56
  } | null | undefined;
45
- }[] | undefined;
57
+ } | {
58
+ id: number;
59
+ name: string;
60
+ image_url?: string | null | undefined;
61
+ job?: string | null | undefined;
62
+ type?: "author" | undefined;
63
+ } | {
64
+ id: number;
65
+ name: string;
66
+ type?: string | undefined;
67
+ image_url?: string | null | undefined;
68
+ entity_type?: "reference" | undefined;
69
+ })[] | undefined;
46
70
  message?: string | undefined;
47
71
  pagination?: {
48
72
  page: number;
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/resources/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAGhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAgB5C,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;iBAOrB,CAAA;AAEF,KAAK,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAIzD,qBAAa,cAAc;IACb,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,eAAe;IAErC,KAAK,CAAC,MAAM,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIhC,QAAQ,CAAC,MAAM,EAAE,YAAY,GAAG,cAAc,CAAC,gBAAgB,CAAC;CAQjE"}
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/resources/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAGhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAyC5C,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAsF,CAAA;AAE9G,KAAK,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAI1D,qBAAa,cAAc;IACb,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,eAAe;IAErC,KAAK,CAAC,MAAM,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIhC,QAAQ,CAAC,MAAM,EAAE,YAAY,GAAG,cAAc,CAAC,gBAAgB,CAAC;CAQjE"}
@@ -1,27 +1,42 @@
1
1
  import { z } from 'zod/v4';
2
2
  import { apiResponseSchema } from '../types';
3
3
  import { paginate } from '../pagination';
4
- const searchAuthorSchema = z.object({
4
+ const searchAuthorRefSchema = z.object({
5
5
  id: z.number(),
6
6
  name: z.string(),
7
7
  fictional: z.boolean().optional(),
8
8
  image_url: z.string().nullable().optional(),
9
9
  job: z.string().nullable().optional(),
10
10
  });
11
- const searchReferenceSchema = z.object({
11
+ const searchQuoteRefSchema = z.object({
12
12
  id: z.number(),
13
13
  name: z.string(),
14
14
  type: z.string().optional(),
15
15
  });
16
- const searchQuoteSchema = z.object({
16
+ const searchQuoteItemSchema = z.object({
17
17
  id: z.number(),
18
18
  content: z.string(),
19
19
  language: z.string(),
20
- author: searchAuthorSchema.nullable().optional(),
21
- reference: searchReferenceSchema.nullable().optional(),
20
+ author: searchAuthorRefSchema.nullable().optional(),
21
+ reference: searchQuoteRefSchema.nullable().optional(),
22
22
  created_at: z.string().nullable(),
23
23
  });
24
- const searchResponseSchema = apiResponseSchema(z.array(searchQuoteSchema));
24
+ const searchAuthorItemSchema = z.object({
25
+ id: z.number(),
26
+ name: z.string(),
27
+ image_url: z.string().nullable().optional(),
28
+ job: z.string().nullable().optional(),
29
+ type: z.literal('author').optional(),
30
+ });
31
+ const searchReferenceItemSchema = z.object({
32
+ id: z.number(),
33
+ name: z.string(),
34
+ type: z.string().optional(),
35
+ image_url: z.string().nullable().optional(),
36
+ entity_type: z.literal('reference').optional(),
37
+ });
38
+ const searchResultSchema = z.union([searchQuoteItemSchema, searchAuthorItemSchema, searchReferenceItemSchema]);
39
+ const searchResponseSchema = apiResponseSchema(z.array(searchResultSchema));
25
40
  export class SearchResource {
26
41
  client;
27
42
  constructor(client) {
@@ -1 +1 @@
1
- {"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/resources/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,C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C,KAAK,CAAC,CAAC,qBAAqB,EAAE,sBAAsB,EAAE,yBAAyB,CAAC,CAAC,CAAA;AAI9G,MAAM,oBAAoB,GAAG,iBAAiB,CAAC,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAA;AAE3E,MAAM,OAAO,cAAc;IACL;IAApB,YAAoB,MAAuB;QAAvB,WAAM,GAAN,MAAM,CAAiB;IAAG,CAAC;IAE/C,KAAK,CAAC,KAAK,CAAC,MAAoB;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,MAA4C,EAAE,EAAE,oBAAoB,CAAC,CAAA;IACnH,CAAC;IAED,QAAQ,CAAC,MAAoB;QAC3B,OAAO,QAAQ,CAAmB,CAAC,IAAI,EAAE,EAAE,CACzC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACzC,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,UAAU,EAAE,CAAC,CAAC,UAAU;SACzB,CAAC,CAAC,CACJ,CAAA;IACH,CAAC;CACF"}
@@ -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"}