@schedulin/sdk 0.3.1 → 0.4.1

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.
Files changed (169) hide show
  1. package/cjs/api/errors/BadRequestError.d.ts +7 -0
  2. package/cjs/api/errors/BadRequestError.js +54 -0
  3. package/cjs/api/errors/ConflictError.d.ts +7 -0
  4. package/cjs/api/errors/ConflictError.js +54 -0
  5. package/cjs/api/errors/ForbiddenError.d.ts +7 -0
  6. package/cjs/api/errors/ForbiddenError.js +54 -0
  7. package/cjs/api/errors/NotFoundError.d.ts +7 -0
  8. package/cjs/api/errors/NotFoundError.js +54 -0
  9. package/cjs/api/errors/PaymentRequiredError.d.ts +7 -0
  10. package/cjs/api/errors/PaymentRequiredError.js +54 -0
  11. package/cjs/api/errors/TooManyRequestsError.d.ts +7 -0
  12. package/cjs/api/errors/TooManyRequestsError.js +54 -0
  13. package/cjs/api/errors/UnprocessableEntityError.d.ts +7 -0
  14. package/cjs/api/errors/UnprocessableEntityError.js +54 -0
  15. package/cjs/api/errors/index.d.ts +7 -0
  16. package/cjs/api/errors/index.js +7 -0
  17. package/cjs/api/resources/ai/client/Client.d.ts +11 -2
  18. package/cjs/api/resources/ai/client/Client.js +27 -0
  19. package/cjs/api/resources/ai/index.d.ts +1 -0
  20. package/cjs/api/resources/ai/index.js +1 -0
  21. package/cjs/api/resources/ai/types/GenerateImageAiResponse.d.ts +3 -0
  22. package/cjs/api/resources/ai/types/GenerateImageAiResponse.js +3 -0
  23. package/cjs/api/resources/ai/types/index.d.ts +1 -0
  24. package/cjs/api/resources/ai/types/index.js +17 -0
  25. package/cjs/api/resources/index.d.ts +2 -0
  26. package/cjs/api/resources/index.js +2 -0
  27. package/cjs/api/resources/media/client/Client.d.ts +58 -8
  28. package/cjs/api/resources/media/client/Client.js +158 -3
  29. package/cjs/api/resources/media/client/requests/UpdateMediaRequest.d.ts +2 -3
  30. package/cjs/api/resources/media/types/CreateUploadLinkMediaResponse.d.ts +4 -0
  31. package/cjs/api/resources/media/types/CreateUploadLinkMediaResponse.js +3 -0
  32. package/cjs/api/resources/media/types/DeleteMediaResponse.d.ts +4 -0
  33. package/cjs/api/resources/media/types/DeleteMediaResponse.js +3 -0
  34. package/cjs/api/resources/media/types/SetTagsMediaResponse.d.ts +4 -0
  35. package/cjs/api/resources/media/types/SetTagsMediaResponse.js +3 -0
  36. package/cjs/api/resources/media/types/index.d.ts +3 -0
  37. package/cjs/api/resources/media/types/index.js +3 -0
  38. package/cjs/api/resources/platforms/client/Client.d.ts +4 -0
  39. package/cjs/api/resources/platforms/client/Client.js +12 -0
  40. package/cjs/api/resources/posts/client/Client.d.ts +56 -1
  41. package/cjs/api/resources/posts/client/Client.js +165 -0
  42. package/cjs/api/resources/posts/types/CountByTabPostsResponse.d.ts +7 -0
  43. package/cjs/api/resources/posts/types/CountByTabPostsResponse.js +3 -0
  44. package/cjs/api/resources/posts/types/CreatePostsResponse.d.ts +1 -0
  45. package/cjs/api/resources/posts/types/index.d.ts +1 -0
  46. package/cjs/api/resources/posts/types/index.js +1 -0
  47. package/cjs/api/resources/socialAccounts/client/Client.d.ts +58 -1
  48. package/cjs/api/resources/socialAccounts/client/Client.js +172 -1
  49. package/cjs/api/resources/tags/client/Client.d.ts +21 -0
  50. package/cjs/api/resources/tags/client/Client.js +63 -0
  51. package/cjs/api/resources/webhooks/client/Client.d.ts +51 -8
  52. package/cjs/api/resources/webhooks/client/Client.js +133 -1
  53. package/cjs/api/resources/webhooks/index.d.ts +1 -0
  54. package/cjs/api/resources/webhooks/index.js +1 -0
  55. package/cjs/api/resources/webhooks/types/DeleteWebhooksResponse.d.ts +3 -0
  56. package/cjs/api/resources/webhooks/types/DeleteWebhooksResponse.js +3 -0
  57. package/cjs/api/resources/webhooks/types/ListDeliveriesWebhooksResponse.d.ts +4 -0
  58. package/cjs/api/resources/webhooks/types/ListDeliveriesWebhooksResponse.js +3 -0
  59. package/cjs/api/resources/webhooks/types/ListWebhooksResponse.d.ts +4 -0
  60. package/cjs/api/resources/webhooks/types/ListWebhooksResponse.js +3 -0
  61. package/cjs/api/resources/webhooks/types/TestWebhooksResponse.d.ts +3 -0
  62. package/cjs/api/resources/webhooks/types/TestWebhooksResponse.js +3 -0
  63. package/cjs/api/resources/webhooks/types/index.d.ts +4 -0
  64. package/cjs/api/resources/webhooks/types/index.js +20 -0
  65. package/cjs/api/types/AiGeneration.d.ts +27 -0
  66. package/cjs/api/types/AiGeneration.js +14 -0
  67. package/cjs/api/types/ErrorResponse.d.ts +14 -2
  68. package/cjs/api/types/Media.d.ts +4 -0
  69. package/cjs/api/types/MediaUpdate.d.ts +1 -1
  70. package/cjs/api/types/Post.d.ts +3 -0
  71. package/cjs/api/types/PostMedia.d.ts +14 -0
  72. package/cjs/api/types/PostMedia.js +3 -0
  73. package/cjs/api/types/PostWithRelations.d.ts +5 -68
  74. package/cjs/api/types/PostWithRelations.js +0 -54
  75. package/cjs/api/types/RateLimitErrorResponse.d.ts +17 -0
  76. package/cjs/api/types/RateLimitErrorResponse.js +3 -0
  77. package/cjs/api/types/ValidationErrorResponse.d.ts +17 -0
  78. package/cjs/api/types/ValidationErrorResponse.js +3 -0
  79. package/cjs/api/types/WebhookDelivery.d.ts +20 -0
  80. package/cjs/api/types/WebhookDelivery.js +12 -0
  81. package/cjs/api/types/WebhookEndpoint.d.ts +26 -0
  82. package/cjs/api/types/WebhookEndpoint.js +16 -0
  83. package/cjs/api/types/index.d.ts +6 -0
  84. package/cjs/api/types/index.js +6 -0
  85. package/esm/api/errors/BadRequestError.d.mts +7 -0
  86. package/esm/api/errors/BadRequestError.mjs +17 -0
  87. package/esm/api/errors/ConflictError.d.mts +7 -0
  88. package/esm/api/errors/ConflictError.mjs +17 -0
  89. package/esm/api/errors/ForbiddenError.d.mts +7 -0
  90. package/esm/api/errors/ForbiddenError.mjs +17 -0
  91. package/esm/api/errors/NotFoundError.d.mts +7 -0
  92. package/esm/api/errors/NotFoundError.mjs +17 -0
  93. package/esm/api/errors/PaymentRequiredError.d.mts +7 -0
  94. package/esm/api/errors/PaymentRequiredError.mjs +17 -0
  95. package/esm/api/errors/TooManyRequestsError.d.mts +7 -0
  96. package/esm/api/errors/TooManyRequestsError.mjs +17 -0
  97. package/esm/api/errors/UnprocessableEntityError.d.mts +7 -0
  98. package/esm/api/errors/UnprocessableEntityError.mjs +17 -0
  99. package/esm/api/errors/index.d.mts +7 -0
  100. package/esm/api/errors/index.mjs +7 -0
  101. package/esm/api/resources/ai/client/Client.d.mts +11 -2
  102. package/esm/api/resources/ai/client/Client.mjs +27 -0
  103. package/esm/api/resources/ai/index.d.mts +1 -0
  104. package/esm/api/resources/ai/index.mjs +1 -0
  105. package/esm/api/resources/ai/types/GenerateImageAiResponse.d.mts +3 -0
  106. package/esm/api/resources/ai/types/GenerateImageAiResponse.mjs +2 -0
  107. package/esm/api/resources/ai/types/index.d.mts +1 -0
  108. package/esm/api/resources/ai/types/index.mjs +1 -0
  109. package/esm/api/resources/index.d.mts +2 -0
  110. package/esm/api/resources/index.mjs +2 -0
  111. package/esm/api/resources/media/client/Client.d.mts +58 -8
  112. package/esm/api/resources/media/client/Client.mjs +158 -3
  113. package/esm/api/resources/media/client/requests/UpdateMediaRequest.d.mts +2 -3
  114. package/esm/api/resources/media/types/CreateUploadLinkMediaResponse.d.mts +4 -0
  115. package/esm/api/resources/media/types/CreateUploadLinkMediaResponse.mjs +2 -0
  116. package/esm/api/resources/media/types/DeleteMediaResponse.d.mts +4 -0
  117. package/esm/api/resources/media/types/DeleteMediaResponse.mjs +2 -0
  118. package/esm/api/resources/media/types/SetTagsMediaResponse.d.mts +4 -0
  119. package/esm/api/resources/media/types/SetTagsMediaResponse.mjs +2 -0
  120. package/esm/api/resources/media/types/index.d.mts +3 -0
  121. package/esm/api/resources/media/types/index.mjs +3 -0
  122. package/esm/api/resources/platforms/client/Client.d.mts +4 -0
  123. package/esm/api/resources/platforms/client/Client.mjs +12 -0
  124. package/esm/api/resources/posts/client/Client.d.mts +56 -1
  125. package/esm/api/resources/posts/client/Client.mjs +165 -0
  126. package/esm/api/resources/posts/types/CountByTabPostsResponse.d.mts +7 -0
  127. package/esm/api/resources/posts/types/CountByTabPostsResponse.mjs +2 -0
  128. package/esm/api/resources/posts/types/CreatePostsResponse.d.mts +1 -0
  129. package/esm/api/resources/posts/types/index.d.mts +1 -0
  130. package/esm/api/resources/posts/types/index.mjs +1 -0
  131. package/esm/api/resources/socialAccounts/client/Client.d.mts +58 -1
  132. package/esm/api/resources/socialAccounts/client/Client.mjs +172 -1
  133. package/esm/api/resources/tags/client/Client.d.mts +21 -0
  134. package/esm/api/resources/tags/client/Client.mjs +63 -0
  135. package/esm/api/resources/webhooks/client/Client.d.mts +51 -8
  136. package/esm/api/resources/webhooks/client/Client.mjs +133 -1
  137. package/esm/api/resources/webhooks/index.d.mts +1 -0
  138. package/esm/api/resources/webhooks/index.mjs +1 -0
  139. package/esm/api/resources/webhooks/types/DeleteWebhooksResponse.d.mts +3 -0
  140. package/esm/api/resources/webhooks/types/DeleteWebhooksResponse.mjs +2 -0
  141. package/esm/api/resources/webhooks/types/ListDeliveriesWebhooksResponse.d.mts +4 -0
  142. package/esm/api/resources/webhooks/types/ListDeliveriesWebhooksResponse.mjs +2 -0
  143. package/esm/api/resources/webhooks/types/ListWebhooksResponse.d.mts +4 -0
  144. package/esm/api/resources/webhooks/types/ListWebhooksResponse.mjs +2 -0
  145. package/esm/api/resources/webhooks/types/TestWebhooksResponse.d.mts +3 -0
  146. package/esm/api/resources/webhooks/types/TestWebhooksResponse.mjs +2 -0
  147. package/esm/api/resources/webhooks/types/index.d.mts +4 -0
  148. package/esm/api/resources/webhooks/types/index.mjs +4 -0
  149. package/esm/api/types/AiGeneration.d.mts +27 -0
  150. package/esm/api/types/AiGeneration.mjs +11 -0
  151. package/esm/api/types/ErrorResponse.d.mts +14 -2
  152. package/esm/api/types/Media.d.mts +4 -0
  153. package/esm/api/types/MediaUpdate.d.mts +1 -1
  154. package/esm/api/types/Post.d.mts +3 -0
  155. package/esm/api/types/PostMedia.d.mts +14 -0
  156. package/esm/api/types/PostMedia.mjs +2 -0
  157. package/esm/api/types/PostWithRelations.d.mts +5 -68
  158. package/esm/api/types/PostWithRelations.mjs +1 -53
  159. package/esm/api/types/RateLimitErrorResponse.d.mts +17 -0
  160. package/esm/api/types/RateLimitErrorResponse.mjs +2 -0
  161. package/esm/api/types/ValidationErrorResponse.d.mts +17 -0
  162. package/esm/api/types/ValidationErrorResponse.mjs +2 -0
  163. package/esm/api/types/WebhookDelivery.d.mts +20 -0
  164. package/esm/api/types/WebhookDelivery.mjs +9 -0
  165. package/esm/api/types/WebhookEndpoint.d.mts +26 -0
  166. package/esm/api/types/WebhookEndpoint.mjs +13 -0
  167. package/esm/api/types/index.d.mts +6 -0
  168. package/esm/api/types/index.mjs +6 -0
  169. package/package.json +1 -1
@@ -14,76 +14,13 @@ export interface PostWithRelations {
14
14
  platformConfiguration: Record<string, unknown> | null;
15
15
  socialAccountId: string;
16
16
  url: string | null;
17
+ title: string | null;
18
+ postedAt: string | null;
19
+ errorMessage: string | null;
17
20
  createdAt: string;
18
21
  updatedAt: string;
19
22
  socialAccount: Schedulin.SocialAccount;
20
- media: PostWithRelations.Media.Item[];
23
+ media: Schedulin.PostMedia[];
24
+ thumbnail: Schedulin.PostMedia | null;
21
25
  tags: Schedulin.Tag[];
22
26
  }
23
- export declare namespace PostWithRelations {
24
- type Media = Media.Item[];
25
- namespace Media {
26
- interface Item {
27
- url: string;
28
- thumbnail_url?: (string | null) | undefined;
29
- thumbnail_timestamp_ms?: (number | null) | undefined;
30
- tags?: Item.Tags.Item[] | undefined;
31
- alt?: (string | null) | undefined;
32
- skip_processing?: boolean | undefined;
33
- }
34
- namespace Item {
35
- type Tags = Tags.Item[];
36
- namespace Tags {
37
- interface Item {
38
- id: string;
39
- type: Item.Type;
40
- platform: Item.Platform;
41
- x?: number | undefined;
42
- y?: number | undefined;
43
- }
44
- namespace Item {
45
- const Type: {
46
- readonly User: "user";
47
- readonly Business: "business";
48
- };
49
- type Type = (typeof Type)[keyof typeof Type];
50
- const Platform: {
51
- readonly Bluesky: "bluesky";
52
- readonly Facebook: "facebook";
53
- readonly GoogleBusinessProfile: "google_business_profile";
54
- readonly Instagram: "instagram";
55
- readonly Linkedin: "linkedin";
56
- readonly Pinterest: "pinterest";
57
- readonly Reddit: "reddit";
58
- readonly Snapchat: "snapchat";
59
- readonly Threads: "threads";
60
- readonly Tiktok: "tiktok";
61
- readonly Twitter: "twitter";
62
- readonly Youtube: "youtube";
63
- readonly Mastodon: "mastodon";
64
- readonly Telegram: "telegram";
65
- readonly Devto: "devto";
66
- readonly Hashnode: "hashnode";
67
- readonly Medium: "medium";
68
- readonly Wordpress: "wordpress";
69
- readonly Lemmy: "lemmy";
70
- readonly Nostr: "nostr";
71
- readonly Discord: "discord";
72
- readonly Dribbble: "dribbble";
73
- readonly Farcaster: "farcaster";
74
- readonly Kick: "kick";
75
- readonly Listmonk: "listmonk";
76
- readonly Mewe: "mewe";
77
- readonly Moltbook: "moltbook";
78
- readonly Skool: "skool";
79
- readonly Slack: "slack";
80
- readonly Twitch: "twitch";
81
- readonly Vk: "vk";
82
- readonly Whop: "whop";
83
- };
84
- type Platform = (typeof Platform)[keyof typeof Platform];
85
- }
86
- }
87
- }
88
- }
89
- }
@@ -1,57 +1,3 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.PostWithRelations = void 0;
5
- var PostWithRelations;
6
- (function (PostWithRelations) {
7
- let Media;
8
- (function (Media) {
9
- let Item;
10
- (function (Item_1) {
11
- let Tags;
12
- (function (Tags) {
13
- let Item;
14
- (function (Item) {
15
- Item.Type = {
16
- User: "user",
17
- Business: "business",
18
- };
19
- Item.Platform = {
20
- Bluesky: "bluesky",
21
- Facebook: "facebook",
22
- GoogleBusinessProfile: "google_business_profile",
23
- Instagram: "instagram",
24
- Linkedin: "linkedin",
25
- Pinterest: "pinterest",
26
- Reddit: "reddit",
27
- Snapchat: "snapchat",
28
- Threads: "threads",
29
- Tiktok: "tiktok",
30
- Twitter: "twitter",
31
- Youtube: "youtube",
32
- Mastodon: "mastodon",
33
- Telegram: "telegram",
34
- Devto: "devto",
35
- Hashnode: "hashnode",
36
- Medium: "medium",
37
- Wordpress: "wordpress",
38
- Lemmy: "lemmy",
39
- Nostr: "nostr",
40
- Discord: "discord",
41
- Dribbble: "dribbble",
42
- Farcaster: "farcaster",
43
- Kick: "kick",
44
- Listmonk: "listmonk",
45
- Mewe: "mewe",
46
- Moltbook: "moltbook",
47
- Skool: "skool",
48
- Slack: "slack",
49
- Twitch: "twitch",
50
- Vk: "vk",
51
- Whop: "whop",
52
- };
53
- })(Item = Tags.Item || (Tags.Item = {}));
54
- })(Tags = Item_1.Tags || (Item_1.Tags = {}));
55
- })(Item = Media.Item || (Media.Item = {}));
56
- })(Media = PostWithRelations.Media || (PostWithRelations.Media = {}));
57
- })(PostWithRelations || (exports.PostWithRelations = PostWithRelations = {}));
@@ -0,0 +1,17 @@
1
+ /**
2
+ * 429 rate-limit error. Per-key request limits return `code: "RATE_LIMITED"` (also mirrored under `error`); the per-user limiter returns `code: "TOO_MANY_REQUESTS"`. Honor the `Retry-After` header.
3
+ */
4
+ export interface RateLimitErrorResponse {
5
+ code: string;
6
+ status: number;
7
+ message?: string | undefined;
8
+ defined?: boolean | undefined;
9
+ data?: Record<string, unknown> | undefined;
10
+ error?: RateLimitErrorResponse.Error_ | undefined;
11
+ }
12
+ export declare namespace RateLimitErrorResponse {
13
+ interface Error_ {
14
+ code: string;
15
+ message: string;
16
+ }
17
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ /**
2
+ * 422 input validation error. `data.fieldErrors` maps each invalid field to its messages; `data.formErrors` holds errors not tied to one field.
3
+ */
4
+ export interface ValidationErrorResponse {
5
+ /** "INPUT_VALIDATION_FAILED" */
6
+ code: string;
7
+ status: number;
8
+ message?: string | undefined;
9
+ defined?: boolean | undefined;
10
+ data: ValidationErrorResponse.Data;
11
+ }
12
+ export declare namespace ValidationErrorResponse {
13
+ interface Data {
14
+ formErrors?: string[] | undefined;
15
+ fieldErrors?: Record<string, string[]> | undefined;
16
+ }
17
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
1
+ export interface WebhookDelivery {
2
+ id: string;
3
+ endpointId: string;
4
+ event: string;
5
+ payload: Record<string, unknown>;
6
+ status: WebhookDelivery.Status;
7
+ attempts: number;
8
+ responseStatus: number | null;
9
+ lastError: string | null;
10
+ deliveredAt: string | null;
11
+ createdAt: string;
12
+ }
13
+ export declare namespace WebhookDelivery {
14
+ const Status: {
15
+ readonly Pending: "PENDING";
16
+ readonly Success: "SUCCESS";
17
+ readonly Failed: "FAILED";
18
+ };
19
+ type Status = (typeof Status)[keyof typeof Status];
20
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.WebhookDelivery = void 0;
5
+ var WebhookDelivery;
6
+ (function (WebhookDelivery) {
7
+ WebhookDelivery.Status = {
8
+ Pending: "PENDING",
9
+ Success: "SUCCESS",
10
+ Failed: "FAILED",
11
+ };
12
+ })(WebhookDelivery || (exports.WebhookDelivery = WebhookDelivery = {}));
@@ -0,0 +1,26 @@
1
+ export interface WebhookEndpoint {
2
+ id: string;
3
+ url: string;
4
+ secret: string;
5
+ events: WebhookEndpoint.Events.Item[];
6
+ description: string | null;
7
+ enabled: boolean;
8
+ consecutiveFailures: number;
9
+ lastSuccessAt: string | null;
10
+ lastFailureAt: string | null;
11
+ disabledAt: string | null;
12
+ createdAt: string;
13
+ updatedAt: string;
14
+ }
15
+ export declare namespace WebhookEndpoint {
16
+ type Events = Events.Item[];
17
+ namespace Events {
18
+ const Item: {
19
+ readonly PostPublished: "post.published";
20
+ readonly PostFailed: "post.failed";
21
+ readonly GenerationCompleted: "generation.completed";
22
+ readonly GenerationFailed: "generation.failed";
23
+ };
24
+ type Item = (typeof Item)[keyof typeof Item];
25
+ }
26
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.WebhookEndpoint = void 0;
5
+ var WebhookEndpoint;
6
+ (function (WebhookEndpoint) {
7
+ let Events;
8
+ (function (Events) {
9
+ Events.Item = {
10
+ PostPublished: "post.published",
11
+ PostFailed: "post.failed",
12
+ GenerationCompleted: "generation.completed",
13
+ GenerationFailed: "generation.failed",
14
+ };
15
+ })(Events = WebhookEndpoint.Events || (WebhookEndpoint.Events = {}));
16
+ })(WebhookEndpoint || (exports.WebhookEndpoint = WebhookEndpoint = {}));
@@ -1,3 +1,4 @@
1
+ export * from "./AiGeneration.js";
1
2
  export * from "./AnalyticsStatus.js";
2
3
  export * from "./ErrorResponse.js";
3
4
  export * from "./ImageProcessingStatus.js";
@@ -9,11 +10,13 @@ export * from "./MediaUpdate.js";
9
10
  export * from "./OauthScope.js";
10
11
  export * from "./Post.js";
11
12
  export * from "./PostApprovalStatus.js";
13
+ export * from "./PostMedia.js";
12
14
  export * from "./PostPublishDraft.js";
13
15
  export * from "./PostSearch.js";
14
16
  export * from "./PostStatus.js";
15
17
  export * from "./PostWithRelations.js";
16
18
  export * from "./PresignedPost.js";
19
+ export * from "./RateLimitErrorResponse.js";
17
20
  export * from "./SocialAccount.js";
18
21
  export * from "./SocialAccountDisconnectedReason.js";
19
22
  export * from "./SocialAccountPublic.js";
@@ -22,3 +25,6 @@ export * from "./SocialPlatform.js";
22
25
  export * from "./Tag.js";
23
26
  export * from "./TagSearch.js";
24
27
  export * from "./TagUpsert.js";
28
+ export * from "./ValidationErrorResponse.js";
29
+ export * from "./WebhookDelivery.js";
30
+ export * from "./WebhookEndpoint.js";
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./AiGeneration.js"), exports);
17
18
  __exportStar(require("./AnalyticsStatus.js"), exports);
18
19
  __exportStar(require("./ErrorResponse.js"), exports);
19
20
  __exportStar(require("./ImageProcessingStatus.js"), exports);
@@ -25,11 +26,13 @@ __exportStar(require("./MediaUpdate.js"), exports);
25
26
  __exportStar(require("./OauthScope.js"), exports);
26
27
  __exportStar(require("./Post.js"), exports);
27
28
  __exportStar(require("./PostApprovalStatus.js"), exports);
29
+ __exportStar(require("./PostMedia.js"), exports);
28
30
  __exportStar(require("./PostPublishDraft.js"), exports);
29
31
  __exportStar(require("./PostSearch.js"), exports);
30
32
  __exportStar(require("./PostStatus.js"), exports);
31
33
  __exportStar(require("./PostWithRelations.js"), exports);
32
34
  __exportStar(require("./PresignedPost.js"), exports);
35
+ __exportStar(require("./RateLimitErrorResponse.js"), exports);
33
36
  __exportStar(require("./SocialAccount.js"), exports);
34
37
  __exportStar(require("./SocialAccountDisconnectedReason.js"), exports);
35
38
  __exportStar(require("./SocialAccountPublic.js"), exports);
@@ -38,3 +41,6 @@ __exportStar(require("./SocialPlatform.js"), exports);
38
41
  __exportStar(require("./Tag.js"), exports);
39
42
  __exportStar(require("./TagSearch.js"), exports);
40
43
  __exportStar(require("./TagUpsert.js"), exports);
44
+ __exportStar(require("./ValidationErrorResponse.js"), exports);
45
+ __exportStar(require("./WebhookDelivery.js"), exports);
46
+ __exportStar(require("./WebhookEndpoint.js"), exports);
@@ -0,0 +1,7 @@
1
+ import type * as core from "../../core/index.mjs";
2
+ import * as errors from "../../errors/index.mjs";
3
+ import type * as Schedulin from "../index.mjs";
4
+ export declare class BadRequestError extends errors.SchedulinError {
5
+ readonly body: Schedulin.ErrorResponse;
6
+ constructor(body: Schedulin.ErrorResponse, rawResponse?: core.RawResponse);
7
+ }
@@ -0,0 +1,17 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../errors/index.mjs";
3
+ export class BadRequestError extends errors.SchedulinError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "BadRequestError",
7
+ statusCode: 400,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = "BadRequestError";
16
+ }
17
+ }
@@ -0,0 +1,7 @@
1
+ import type * as core from "../../core/index.mjs";
2
+ import * as errors from "../../errors/index.mjs";
3
+ import type * as Schedulin from "../index.mjs";
4
+ export declare class ConflictError extends errors.SchedulinError {
5
+ readonly body: Schedulin.ErrorResponse;
6
+ constructor(body: Schedulin.ErrorResponse, rawResponse?: core.RawResponse);
7
+ }
@@ -0,0 +1,17 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../errors/index.mjs";
3
+ export class ConflictError extends errors.SchedulinError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "ConflictError",
7
+ statusCode: 409,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = "ConflictError";
16
+ }
17
+ }
@@ -0,0 +1,7 @@
1
+ import type * as core from "../../core/index.mjs";
2
+ import * as errors from "../../errors/index.mjs";
3
+ import type * as Schedulin from "../index.mjs";
4
+ export declare class ForbiddenError extends errors.SchedulinError {
5
+ readonly body: Schedulin.ErrorResponse;
6
+ constructor(body: Schedulin.ErrorResponse, rawResponse?: core.RawResponse);
7
+ }
@@ -0,0 +1,17 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../errors/index.mjs";
3
+ export class ForbiddenError extends errors.SchedulinError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "ForbiddenError",
7
+ statusCode: 403,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = "ForbiddenError";
16
+ }
17
+ }
@@ -0,0 +1,7 @@
1
+ import type * as core from "../../core/index.mjs";
2
+ import * as errors from "../../errors/index.mjs";
3
+ import type * as Schedulin from "../index.mjs";
4
+ export declare class NotFoundError extends errors.SchedulinError {
5
+ readonly body: Schedulin.ErrorResponse;
6
+ constructor(body: Schedulin.ErrorResponse, rawResponse?: core.RawResponse);
7
+ }
@@ -0,0 +1,17 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../errors/index.mjs";
3
+ export class NotFoundError extends errors.SchedulinError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "NotFoundError",
7
+ statusCode: 404,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = "NotFoundError";
16
+ }
17
+ }
@@ -0,0 +1,7 @@
1
+ import type * as core from "../../core/index.mjs";
2
+ import * as errors from "../../errors/index.mjs";
3
+ import type * as Schedulin from "../index.mjs";
4
+ export declare class PaymentRequiredError extends errors.SchedulinError {
5
+ readonly body: Schedulin.ErrorResponse;
6
+ constructor(body: Schedulin.ErrorResponse, rawResponse?: core.RawResponse);
7
+ }
@@ -0,0 +1,17 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../errors/index.mjs";
3
+ export class PaymentRequiredError extends errors.SchedulinError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "PaymentRequiredError",
7
+ statusCode: 402,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = "PaymentRequiredError";
16
+ }
17
+ }
@@ -0,0 +1,7 @@
1
+ import type * as core from "../../core/index.mjs";
2
+ import * as errors from "../../errors/index.mjs";
3
+ import type * as Schedulin from "../index.mjs";
4
+ export declare class TooManyRequestsError extends errors.SchedulinError {
5
+ readonly body: Schedulin.RateLimitErrorResponse;
6
+ constructor(body: Schedulin.RateLimitErrorResponse, rawResponse?: core.RawResponse);
7
+ }
@@ -0,0 +1,17 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../errors/index.mjs";
3
+ export class TooManyRequestsError extends errors.SchedulinError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "TooManyRequestsError",
7
+ statusCode: 429,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = "TooManyRequestsError";
16
+ }
17
+ }
@@ -0,0 +1,7 @@
1
+ import type * as core from "../../core/index.mjs";
2
+ import * as errors from "../../errors/index.mjs";
3
+ import type * as Schedulin from "../index.mjs";
4
+ export declare class UnprocessableEntityError extends errors.SchedulinError {
5
+ readonly body: Schedulin.ValidationErrorResponse;
6
+ constructor(body: Schedulin.ValidationErrorResponse, rawResponse?: core.RawResponse);
7
+ }
@@ -0,0 +1,17 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../errors/index.mjs";
3
+ export class UnprocessableEntityError extends errors.SchedulinError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "UnprocessableEntityError",
7
+ statusCode: 422,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = "UnprocessableEntityError";
16
+ }
17
+ }
@@ -1,2 +1,9 @@
1
+ export * from "./BadRequestError.mjs";
2
+ export * from "./ConflictError.mjs";
3
+ export * from "./ForbiddenError.mjs";
1
4
  export * from "./InternalServerError.mjs";
5
+ export * from "./NotFoundError.mjs";
6
+ export * from "./PaymentRequiredError.mjs";
7
+ export * from "./TooManyRequestsError.mjs";
2
8
  export * from "./UnauthorizedError.mjs";
9
+ export * from "./UnprocessableEntityError.mjs";
@@ -1,2 +1,9 @@
1
+ export * from "./BadRequestError.mjs";
2
+ export * from "./ConflictError.mjs";
3
+ export * from "./ForbiddenError.mjs";
1
4
  export * from "./InternalServerError.mjs";
5
+ export * from "./NotFoundError.mjs";
6
+ export * from "./PaymentRequiredError.mjs";
7
+ export * from "./TooManyRequestsError.mjs";
2
8
  export * from "./UnauthorizedError.mjs";
9
+ export * from "./UnprocessableEntityError.mjs";
@@ -16,7 +16,12 @@ export declare class AiClient {
16
16
  * @param {Schedulin.GenerateImageAiRequest} request
17
17
  * @param {AiClient.RequestOptions} requestOptions - Request-specific configuration.
18
18
  *
19
+ * @throws {@link Schedulin.BadRequestError}
19
20
  * @throws {@link Schedulin.UnauthorizedError}
21
+ * @throws {@link Schedulin.ForbiddenError}
22
+ * @throws {@link Schedulin.ConflictError}
23
+ * @throws {@link Schedulin.UnprocessableEntityError}
24
+ * @throws {@link Schedulin.TooManyRequestsError}
20
25
  * @throws {@link Schedulin.InternalServerError}
21
26
  * @throws {@link errors.SchedulinError}
22
27
  * @throws {@link errors.SchedulinTimeoutError}
@@ -26,7 +31,7 @@ export declare class AiClient {
26
31
  * prompt: "prompt"
27
32
  * })
28
33
  */
29
- generateImage(request: Schedulin.GenerateImageAiRequest, requestOptions?: AiClient.RequestOptions): core.HttpResponsePromise<unknown>;
34
+ generateImage(request: Schedulin.GenerateImageAiRequest, requestOptions?: AiClient.RequestOptions): core.HttpResponsePromise<Schedulin.GenerateImageAiResponse>;
30
35
  private __generateImage;
31
36
  /**
32
37
  * Get the status and details of a generation job
@@ -34,7 +39,11 @@ export declare class AiClient {
34
39
  * @param {Schedulin.GetGenerationAiRequest} request
35
40
  * @param {AiClient.RequestOptions} requestOptions - Request-specific configuration.
36
41
  *
42
+ * @throws {@link Schedulin.BadRequestError}
37
43
  * @throws {@link Schedulin.UnauthorizedError}
44
+ * @throws {@link Schedulin.ForbiddenError}
45
+ * @throws {@link Schedulin.UnprocessableEntityError}
46
+ * @throws {@link Schedulin.TooManyRequestsError}
38
47
  * @throws {@link Schedulin.InternalServerError}
39
48
  * @throws {@link errors.SchedulinError}
40
49
  * @throws {@link errors.SchedulinTimeoutError}
@@ -44,6 +53,6 @@ export declare class AiClient {
44
53
  * id: "id"
45
54
  * })
46
55
  */
47
- getGeneration(request: Schedulin.GetGenerationAiRequest, requestOptions?: AiClient.RequestOptions): core.HttpResponsePromise<unknown>;
56
+ getGeneration(request: Schedulin.GetGenerationAiRequest, requestOptions?: AiClient.RequestOptions): core.HttpResponsePromise<Schedulin.AiGeneration>;
48
57
  private __getGeneration;
49
58
  }
@@ -26,7 +26,12 @@ export class AiClient {
26
26
  * @param {Schedulin.GenerateImageAiRequest} request
27
27
  * @param {AiClient.RequestOptions} requestOptions - Request-specific configuration.
28
28
  *
29
+ * @throws {@link Schedulin.BadRequestError}
29
30
  * @throws {@link Schedulin.UnauthorizedError}
31
+ * @throws {@link Schedulin.ForbiddenError}
32
+ * @throws {@link Schedulin.ConflictError}
33
+ * @throws {@link Schedulin.UnprocessableEntityError}
34
+ * @throws {@link Schedulin.TooManyRequestsError}
30
35
  * @throws {@link Schedulin.InternalServerError}
31
36
  * @throws {@link errors.SchedulinError}
32
37
  * @throws {@link errors.SchedulinTimeoutError}
@@ -63,8 +68,18 @@ export class AiClient {
63
68
  }
64
69
  if (_response.error.reason === "status-code") {
65
70
  switch (_response.error.statusCode) {
71
+ case 400:
72
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
66
73
  case 401:
67
74
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
75
+ case 403:
76
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
77
+ case 409:
78
+ throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
79
+ case 422:
80
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
81
+ case 429:
82
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
68
83
  case 500:
69
84
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
70
85
  default:
@@ -84,7 +99,11 @@ export class AiClient {
84
99
  * @param {Schedulin.GetGenerationAiRequest} request
85
100
  * @param {AiClient.RequestOptions} requestOptions - Request-specific configuration.
86
101
  *
102
+ * @throws {@link Schedulin.BadRequestError}
87
103
  * @throws {@link Schedulin.UnauthorizedError}
104
+ * @throws {@link Schedulin.ForbiddenError}
105
+ * @throws {@link Schedulin.UnprocessableEntityError}
106
+ * @throws {@link Schedulin.TooManyRequestsError}
88
107
  * @throws {@link Schedulin.InternalServerError}
89
108
  * @throws {@link errors.SchedulinError}
90
109
  * @throws {@link errors.SchedulinTimeoutError}
@@ -126,8 +145,16 @@ export class AiClient {
126
145
  }
127
146
  if (_response.error.reason === "status-code") {
128
147
  switch (_response.error.statusCode) {
148
+ case 400:
149
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
129
150
  case 401:
130
151
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
152
+ case 403:
153
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
154
+ case 422:
155
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
156
+ case 429:
157
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
131
158
  case 500:
132
159
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
133
160
  default:
@@ -1 +1,2 @@
1
1
  export * from "./client/index.mjs";
2
+ export * from "./types/index.mjs";
@@ -1 +1,2 @@
1
1
  export * from "./client/index.mjs";
2
+ export * from "./types/index.mjs";
@@ -0,0 +1,3 @@
1
+ export interface GenerateImageAiResponse {
2
+ generationId: string;
3
+ }