@postpeer/node 0.6.0 → 0.7.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.
Files changed (157) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/api-promise.d.mts +1 -0
  3. package/api-promise.d.mts.map +1 -1
  4. package/api-promise.d.ts +1 -0
  5. package/api-promise.d.ts.map +1 -1
  6. package/api-promise.mjs +1 -0
  7. package/api-promise.mjs.map +1 -1
  8. package/client.d.mts.map +1 -1
  9. package/client.d.ts.map +1 -1
  10. package/client.mjs.map +1 -1
  11. package/core/api-promise.d.mts.map +1 -1
  12. package/core/api-promise.d.ts.map +1 -1
  13. package/core/api-promise.mjs.map +1 -1
  14. package/core/error.mjs.map +1 -1
  15. package/core/resource.d.mts.map +1 -1
  16. package/core/resource.d.ts.map +1 -1
  17. package/core/uploads.d.mts.map +1 -1
  18. package/core/uploads.d.ts.map +1 -1
  19. package/core/uploads.mjs.map +1 -1
  20. package/error.d.mts +1 -0
  21. package/error.d.mts.map +1 -1
  22. package/error.d.ts +1 -0
  23. package/error.d.ts.map +1 -1
  24. package/error.mjs +1 -0
  25. package/error.mjs.map +1 -1
  26. package/index.d.mts.map +1 -1
  27. package/index.d.ts.map +1 -1
  28. package/index.mjs.map +1 -1
  29. package/internal/detect-platform.mjs.map +1 -1
  30. package/internal/headers.mjs.map +1 -1
  31. package/internal/parse.d.mts.map +1 -1
  32. package/internal/parse.d.ts.map +1 -1
  33. package/internal/parse.mjs.map +1 -1
  34. package/internal/qs/formats.d.mts.map +1 -1
  35. package/internal/qs/formats.d.ts.map +1 -1
  36. package/internal/qs/index.d.mts +2 -2
  37. package/internal/qs/index.d.mts.map +1 -1
  38. package/internal/qs/index.d.ts +2 -2
  39. package/internal/qs/index.d.ts.map +1 -1
  40. package/internal/qs/index.mjs.map +1 -1
  41. package/internal/qs/stringify.d.mts.map +1 -1
  42. package/internal/qs/stringify.d.ts.map +1 -1
  43. package/internal/qs/stringify.mjs.map +1 -1
  44. package/internal/qs/utils.d.mts.map +1 -1
  45. package/internal/qs/utils.d.ts.map +1 -1
  46. package/internal/qs/utils.mjs.map +1 -1
  47. package/internal/request-options.d.mts.map +1 -1
  48. package/internal/request-options.d.ts.map +1 -1
  49. package/internal/shims.d.mts +6 -0
  50. package/internal/shims.d.mts.map +1 -1
  51. package/internal/shims.d.ts +6 -0
  52. package/internal/shims.d.ts.map +1 -1
  53. package/internal/to-file.d.mts.map +1 -1
  54. package/internal/to-file.d.ts.map +1 -1
  55. package/internal/to-file.mjs.map +1 -1
  56. package/internal/types.d.mts +4 -4
  57. package/internal/types.d.mts.map +1 -1
  58. package/internal/types.d.ts +4 -4
  59. package/internal/types.d.ts.map +1 -1
  60. package/internal/uploads.d.mts.map +1 -1
  61. package/internal/uploads.d.ts.map +1 -1
  62. package/internal/uploads.mjs.map +1 -1
  63. package/internal/utils/base64.mjs.map +1 -1
  64. package/internal/utils/log.d.mts.map +1 -1
  65. package/internal/utils/log.d.ts.map +1 -1
  66. package/internal/utils/log.js +5 -3
  67. package/internal/utils/log.js.map +1 -1
  68. package/internal/utils/log.mjs +5 -3
  69. package/internal/utils/log.mjs.map +1 -1
  70. package/internal/utils/path.mjs.map +1 -1
  71. package/internal/utils/query.mjs.map +1 -1
  72. package/internal/utils/values.mjs.map +1 -1
  73. package/internal/utils.d.mts.map +1 -1
  74. package/internal/utils.d.ts.map +1 -1
  75. package/internal/utils.mjs.map +1 -1
  76. package/package.json +1 -1
  77. package/resource.d.mts +1 -0
  78. package/resource.d.mts.map +1 -1
  79. package/resource.d.ts +1 -0
  80. package/resource.d.ts.map +1 -1
  81. package/resource.mjs +1 -0
  82. package/resource.mjs.map +1 -1
  83. package/resources/connect/connect.d.mts +6 -1
  84. package/resources/connect/connect.d.mts.map +1 -1
  85. package/resources/connect/connect.d.ts +6 -1
  86. package/resources/connect/connect.d.ts.map +1 -1
  87. package/resources/connect/connect.js.map +1 -1
  88. package/resources/connect/connect.mjs.map +1 -1
  89. package/resources/connect/index.d.mts.map +1 -1
  90. package/resources/connect/index.d.ts.map +1 -1
  91. package/resources/connect/index.mjs.map +1 -1
  92. package/resources/connect/integrations.d.mts +21 -7
  93. package/resources/connect/integrations.d.mts.map +1 -1
  94. package/resources/connect/integrations.d.ts +21 -7
  95. package/resources/connect/integrations.d.ts.map +1 -1
  96. package/resources/connect/integrations.mjs.map +1 -1
  97. package/resources/connect.d.mts.map +1 -1
  98. package/resources/connect.d.ts.map +1 -1
  99. package/resources/connect.mjs.map +1 -1
  100. package/resources/health.d.mts.map +1 -1
  101. package/resources/health.d.ts.map +1 -1
  102. package/resources/health.mjs.map +1 -1
  103. package/resources/index.d.mts.map +1 -1
  104. package/resources/index.d.ts.map +1 -1
  105. package/resources/index.mjs.map +1 -1
  106. package/resources/media.d.mts.map +1 -1
  107. package/resources/media.d.ts.map +1 -1
  108. package/resources/media.mjs.map +1 -1
  109. package/resources/platforms.d.mts +1 -1
  110. package/resources/platforms.d.mts.map +1 -1
  111. package/resources/platforms.d.ts +1 -1
  112. package/resources/platforms.d.ts.map +1 -1
  113. package/resources/platforms.mjs.map +1 -1
  114. package/resources/posts/index.d.mts +1 -1
  115. package/resources/posts/index.d.mts.map +1 -1
  116. package/resources/posts/index.d.ts +1 -1
  117. package/resources/posts/index.d.ts.map +1 -1
  118. package/resources/posts/index.js.map +1 -1
  119. package/resources/posts/index.mjs.map +1 -1
  120. package/resources/posts/posts.d.mts +28 -7
  121. package/resources/posts/posts.d.mts.map +1 -1
  122. package/resources/posts/posts.d.ts +28 -7
  123. package/resources/posts/posts.d.ts.map +1 -1
  124. package/resources/posts/posts.js.map +1 -1
  125. package/resources/posts/posts.mjs.map +1 -1
  126. package/resources/posts/scheduled.d.mts +20 -4
  127. package/resources/posts/scheduled.d.mts.map +1 -1
  128. package/resources/posts/scheduled.d.ts +20 -4
  129. package/resources/posts/scheduled.d.ts.map +1 -1
  130. package/resources/posts/scheduled.js +4 -3
  131. package/resources/posts/scheduled.js.map +1 -1
  132. package/resources/posts/scheduled.mjs +4 -3
  133. package/resources/posts/scheduled.mjs.map +1 -1
  134. package/resources/posts.d.mts.map +1 -1
  135. package/resources/posts.d.ts.map +1 -1
  136. package/resources/posts.mjs.map +1 -1
  137. package/resources.d.mts.map +1 -1
  138. package/resources.d.ts.map +1 -1
  139. package/resources.mjs.map +1 -1
  140. package/src/internal/utils/log.ts +4 -2
  141. package/src/resources/connect/connect.ts +16 -1
  142. package/src/resources/connect/integrations.ts +43 -9
  143. package/src/resources/platforms.ts +10 -1
  144. package/src/resources/posts/index.ts +1 -0
  145. package/src/resources/posts/posts.ts +78 -5
  146. package/src/resources/posts/scheduled.ts +37 -4
  147. package/src/version.ts +1 -1
  148. package/uploads.d.mts +1 -0
  149. package/uploads.d.mts.map +1 -1
  150. package/uploads.d.ts +1 -0
  151. package/uploads.d.ts.map +1 -1
  152. package/uploads.mjs +1 -0
  153. package/uploads.mjs.map +1 -1
  154. package/version.d.mts +1 -1
  155. package/version.d.ts +1 -1
  156. package/version.js +1 -1
  157. package/version.mjs +1 -1
@@ -3,14 +3,15 @@ import { APIPromise } from "../../core/api-promise.mjs";
3
3
  import { RequestOptions } from "../../internal/request-options.mjs";
4
4
  export declare class Scheduled extends APIResource {
5
5
  /**
6
- * List all scheduled posts
6
+ * Returns a paginated list of scheduled posts. Use `limit` + `offset` to page
7
+ * through the results.
7
8
  *
8
9
  * @example
9
10
  * ```ts
10
11
  * const scheduleds = await client.posts.scheduled.list();
11
12
  * ```
12
13
  */
13
- list(options?: RequestOptions): APIPromise<ScheduledListResponse>;
14
+ list(query?: ScheduledListParams | null | undefined, options?: RequestOptions): APIPromise<ScheduledListResponse>;
14
15
  /**
15
16
  * Cancel a scheduled post (moves it back to draft)
16
17
  *
@@ -38,6 +39,10 @@ export declare class Scheduled extends APIResource {
38
39
  export interface ScheduledListResponse {
39
40
  posts: Array<ScheduledListResponse.Post>;
40
41
  success: boolean;
42
+ /**
43
+ * Total matched scheduled posts across all pages
44
+ */
45
+ total: number;
41
46
  }
42
47
  export declare namespace ScheduledListResponse {
43
48
  interface Post {
@@ -66,7 +71,7 @@ export declare namespace ScheduledListResponse {
66
71
  }
67
72
  namespace Post {
68
73
  interface Platform {
69
- platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
74
+ platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky' | 'facebook' | 'threads';
70
75
  status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
71
76
  }
72
77
  interface MediaItem {
@@ -89,6 +94,17 @@ export interface ScheduledRescheduleResponse {
89
94
  scheduledFor: string;
90
95
  success: boolean;
91
96
  }
97
+ export interface ScheduledListParams {
98
+ /**
99
+ * Page size (max 100)
100
+ */
101
+ limit?: number;
102
+ /**
103
+ * Number of scheduled posts to skip
104
+ */
105
+ offset?: number;
106
+ sort?: 'asc' | 'desc';
107
+ }
92
108
  export interface ScheduledRescheduleParams {
93
109
  /**
94
110
  * New ISO 8601 datetime to schedule the post
@@ -100,6 +116,6 @@ export interface ScheduledRescheduleParams {
100
116
  timezone?: string;
101
117
  }
102
118
  export declare namespace Scheduled {
103
- export { type ScheduledListResponse as ScheduledListResponse, type ScheduledCancelResponse as ScheduledCancelResponse, type ScheduledRescheduleResponse as ScheduledRescheduleResponse, type ScheduledRescheduleParams as ScheduledRescheduleParams, };
119
+ export { type ScheduledListResponse as ScheduledListResponse, type ScheduledCancelResponse as ScheduledCancelResponse, type ScheduledRescheduleResponse as ScheduledRescheduleResponse, type ScheduledListParams as ScheduledListParams, type ScheduledRescheduleParams as ScheduledRescheduleParams, };
104
120
  }
105
121
  //# sourceMappingURL=scheduled.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scheduled.d.mts","sourceRoot":"","sources":["../../src/resources/posts/scheduled.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EA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CAClB;AAED,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,MAAM,CAAC;IAEhB,YAAY,EAAE,MAAM,CAAC;IAErB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
@@ -3,14 +3,15 @@ import { APIPromise } from "../../core/api-promise.js";
3
3
  import { RequestOptions } from "../../internal/request-options.js";
4
4
  export declare class Scheduled extends APIResource {
5
5
  /**
6
- * List all scheduled posts
6
+ * Returns a paginated list of scheduled posts. Use `limit` + `offset` to page
7
+ * through the results.
7
8
  *
8
9
  * @example
9
10
  * ```ts
10
11
  * const scheduleds = await client.posts.scheduled.list();
11
12
  * ```
12
13
  */
13
- list(options?: RequestOptions): APIPromise<ScheduledListResponse>;
14
+ list(query?: ScheduledListParams | null | undefined, options?: RequestOptions): APIPromise<ScheduledListResponse>;
14
15
  /**
15
16
  * Cancel a scheduled post (moves it back to draft)
16
17
  *
@@ -38,6 +39,10 @@ export declare class Scheduled extends APIResource {
38
39
  export interface ScheduledListResponse {
39
40
  posts: Array<ScheduledListResponse.Post>;
40
41
  success: boolean;
42
+ /**
43
+ * Total matched scheduled posts across all pages
44
+ */
45
+ total: number;
41
46
  }
42
47
  export declare namespace ScheduledListResponse {
43
48
  interface Post {
@@ -66,7 +71,7 @@ export declare namespace ScheduledListResponse {
66
71
  }
67
72
  namespace Post {
68
73
  interface Platform {
69
- platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
74
+ platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky' | 'facebook' | 'threads';
70
75
  status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
71
76
  }
72
77
  interface MediaItem {
@@ -89,6 +94,17 @@ export interface ScheduledRescheduleResponse {
89
94
  scheduledFor: string;
90
95
  success: boolean;
91
96
  }
97
+ export interface ScheduledListParams {
98
+ /**
99
+ * Page size (max 100)
100
+ */
101
+ limit?: number;
102
+ /**
103
+ * Number of scheduled posts to skip
104
+ */
105
+ offset?: number;
106
+ sort?: 'asc' | 'desc';
107
+ }
92
108
  export interface ScheduledRescheduleParams {
93
109
  /**
94
110
  * New ISO 8601 datetime to schedule the post
@@ -100,6 +116,6 @@ export interface ScheduledRescheduleParams {
100
116
  timezone?: string;
101
117
  }
102
118
  export declare namespace Scheduled {
103
- export { type ScheduledListResponse as ScheduledListResponse, type ScheduledCancelResponse as ScheduledCancelResponse, type ScheduledRescheduleResponse as ScheduledRescheduleResponse, type ScheduledRescheduleParams as ScheduledRescheduleParams, };
119
+ export { type ScheduledListResponse as ScheduledListResponse, type ScheduledCancelResponse as ScheduledCancelResponse, type ScheduledRescheduleResponse as ScheduledRescheduleResponse, type ScheduledListParams as ScheduledListParams, type ScheduledRescheduleParams as ScheduledRescheduleParams, };
104
120
  }
105
121
  //# sourceMappingURL=scheduled.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scheduled.d.ts","sourceRoot":"","sources":["../../src/resources/posts/scheduled.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAA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AAO,CAAC;CAClB;AAED,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,MAAM,CAAC;IAEhB,YAAY,EAAE,MAAM,CAAC;IAErB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
@@ -6,15 +6,16 @@ const resource_1 = require("../../core/resource.js");
6
6
  const path_1 = require("../../internal/utils/path.js");
7
7
  class Scheduled extends resource_1.APIResource {
8
8
  /**
9
- * List all scheduled posts
9
+ * Returns a paginated list of scheduled posts. Use `limit` + `offset` to page
10
+ * through the results.
10
11
  *
11
12
  * @example
12
13
  * ```ts
13
14
  * const scheduleds = await client.posts.scheduled.list();
14
15
  * ```
15
16
  */
16
- list(options) {
17
- return this._client.get('/v1/posts/scheduled/', options);
17
+ list(query = {}, options) {
18
+ return this._client.get('/v1/posts/scheduled/', { query, ...options });
18
19
  }
19
20
  /**
20
21
  * Cancel a scheduled post (moves it back to draft)
@@ -1 +1 @@
1
- {"version":3,"file":"scheduled.js","sourceRoot":"","sources":["../../src/resources/posts/scheduled.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD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CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,uBAAuB,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;CACF;AAjDD,8BAiDC"}
@@ -3,15 +3,16 @@ import { APIResource } from "../../core/resource.mjs";
3
3
  import { path } from "../../internal/utils/path.mjs";
4
4
  export class Scheduled extends APIResource {
5
5
  /**
6
- * List all scheduled posts
6
+ * Returns a paginated list of scheduled posts. Use `limit` + `offset` to page
7
+ * through the results.
7
8
  *
8
9
  * @example
9
10
  * ```ts
10
11
  * const scheduleds = await client.posts.scheduled.list();
11
12
  * ```
12
13
  */
13
- list(options) {
14
- return this._client.get('/v1/posts/scheduled/', options);
14
+ list(query = {}, options) {
15
+ return this._client.get('/v1/posts/scheduled/', { query, ...options });
15
16
  }
16
17
  /**
17
18
  * Cancel a scheduled post (moves it back to draft)
@@ -1 +1 @@
1
- {"version":3,"file":"scheduled.mjs","sourceRoot":"","sources":["../../src/resources/posts/scheduled.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;;;;OAOG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,uBAAuB,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;;OAUG;IACH,UAAU,CACR,MAAc,EACd,IAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,uBAAuB,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;CACF"}
1
+ {"version":3,"file":"scheduled.mjs","sourceRoot":"","sources":["../../src/resources/posts/scheduled.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAGlD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;;;;;OAQG;IACH,IAAI,CACF,QAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,uBAAuB,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;;OAUG;IACH,UAAU,CACR,MAAc,EACd,IAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,uBAAuB,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"posts.d.mts","sourceRoot":"","sources":["../src/resources/posts.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"posts.d.mts","sourceRoot":"","sources":["../src/resources/posts.ts"],"names":[],"mappings":"AAEA,kCAA8B"}
@@ -1 +1 @@
1
- {"version":3,"file":"posts.d.ts","sourceRoot":"","sources":["../src/resources/posts.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"posts.d.ts","sourceRoot":"","sources":["../src/resources/posts.ts"],"names":[],"mappings":"AAEA,iCAA8B"}
@@ -1 +1 @@
1
- {"version":3,"file":"posts.mjs","sourceRoot":"","sources":["../src/resources/posts.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
1
+ {"version":3,"file":"posts.mjs","sourceRoot":"","sources":["../src/resources/posts.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,kCAA8B"}
@@ -1 +1 @@
1
- {"version":3,"file":"resources.d.mts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"resources.d.mts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":"AAAA,sCAAkC"}
@@ -1 +1 @@
1
- {"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":"AAAA,qCAAkC"}
package/resources.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"resources.mjs","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"resources.mjs","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":"AAAA,sCAAkC"}
@@ -106,10 +106,12 @@ export const formatRequestDetails = (details: {
106
106
  ([name, value]) => [
107
107
  name,
108
108
  (
109
- name.toLowerCase() === 'x-access-key' ||
110
109
  name.toLowerCase() === 'authorization' ||
110
+ name.toLowerCase() === 'api-key' ||
111
+ name.toLowerCase() === 'x-api-key' ||
111
112
  name.toLowerCase() === 'cookie' ||
112
- name.toLowerCase() === 'set-cookie'
113
+ name.toLowerCase() === 'set-cookie' ||
114
+ name.toLowerCase() === 'x-access-key'
113
115
  ) ?
114
116
  '***'
115
117
  : value,
@@ -19,7 +19,16 @@ export class Connect extends APIResource {
19
19
  * Get OAuth URL for a platform
20
20
  */
21
21
  getOAuthURL(
22
- platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky',
22
+ platform:
23
+ | 'twitter'
24
+ | 'instagram'
25
+ | 'youtube'
26
+ | 'tiktok'
27
+ | 'pinterest'
28
+ | 'linkedin'
29
+ | 'bluesky'
30
+ | 'facebook'
31
+ | 'threads',
23
32
  query: ConnectGetOAuthURLParams | null | undefined = {},
24
33
  options?: RequestOptions,
25
34
  ): APIPromise<ConnectGetOAuthURLResponse> {
@@ -32,6 +41,12 @@ export interface ConnectGetOAuthURLResponse {
32
41
  }
33
42
 
34
43
  export interface ConnectGetOAuthURLParams {
44
+ /**
45
+ * Profile to associate the resulting integration with. Must belong to the same
46
+ * project. Omit to connect without a profile.
47
+ */
48
+ profileId?: string;
49
+
35
50
  /**
36
51
  * URL to redirect to after a successful connection
37
52
  */
@@ -27,10 +27,6 @@ export class Integrations extends APIResource {
27
27
  export interface IntegrationListResponse {
28
28
  integrations: Array<IntegrationListResponse.Integration>;
29
29
 
30
- limit: number;
31
-
32
- page: number;
33
-
34
30
  success: boolean;
35
31
 
36
32
  /**
@@ -58,12 +54,27 @@ export namespace IntegrationListResponse {
58
54
  */
59
55
  imageUrl: string | null;
60
56
 
61
- platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
57
+ platform:
58
+ | 'twitter'
59
+ | 'instagram'
60
+ | 'youtube'
61
+ | 'tiktok'
62
+ | 'pinterest'
63
+ | 'linkedin'
64
+ | 'bluesky'
65
+ | 'facebook'
66
+ | 'threads';
62
67
 
63
68
  /**
64
69
  * The user ID on the platform, or null if not yet retrieved
65
70
  */
66
71
  platformUserId: string | null;
72
+
73
+ /**
74
+ * Profile this integration belongs to, or null if it was connected without a
75
+ * profile
76
+ */
77
+ profileId: string | null;
67
78
  }
68
79
  }
69
80
 
@@ -75,16 +86,39 @@ export interface IntegrationDisconnectResponse {
75
86
 
76
87
  export interface IntegrationListParams {
77
88
  /**
78
- * Page size (1-100)
89
+ * Page size (max 100)
79
90
  */
80
91
  limit?: number;
81
92
 
82
93
  /**
83
- * Page number
94
+ * Number of integrations to skip
95
+ */
96
+ offset?: number;
97
+
98
+ platform?:
99
+ | 'twitter'
100
+ | 'instagram'
101
+ | 'youtube'
102
+ | 'tiktok'
103
+ | 'pinterest'
104
+ | 'linkedin'
105
+ | 'bluesky'
106
+ | 'facebook'
107
+ | 'threads';
108
+
109
+ /**
110
+ * Filter to integrations belonging to this profile. Pass "null" (literal string)
111
+ * to filter to integrations with no profile.
112
+ */
113
+ profileId?: string;
114
+
115
+ /**
116
+ * Case-insensitive search across the connected account name (displayName) and the
117
+ * platform user ID.
84
118
  */
85
- page?: number;
119
+ q?: string;
86
120
 
87
- platform?: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
121
+ sort?: 'asc' | 'desc';
88
122
  }
89
123
 
90
124
  export declare namespace Integrations {
@@ -19,7 +19,16 @@ export interface PlatformListResponse {
19
19
 
20
20
  export namespace PlatformListResponse {
21
21
  export interface Platform {
22
- name: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
22
+ name:
23
+ | 'twitter'
24
+ | 'instagram'
25
+ | 'youtube'
26
+ | 'tiktok'
27
+ | 'pinterest'
28
+ | 'linkedin'
29
+ | 'bluesky'
30
+ | 'facebook'
31
+ | 'threads';
23
32
 
24
33
  status: 'prod' | 'beta' | 'dev';
25
34
  }
@@ -15,5 +15,6 @@ export {
15
15
  type ScheduledListResponse,
16
16
  type ScheduledCancelResponse,
17
17
  type ScheduledRescheduleResponse,
18
+ type ScheduledListParams,
18
19
  type ScheduledRescheduleParams,
19
20
  } from './scheduled';
@@ -5,6 +5,7 @@ import * as ScheduledAPI from './scheduled';
5
5
  import {
6
6
  Scheduled,
7
7
  ScheduledCancelResponse,
8
+ ScheduledListParams,
8
9
  ScheduledListResponse,
9
10
  ScheduledRescheduleParams,
10
11
  ScheduledRescheduleResponse,
@@ -100,7 +101,16 @@ export interface PostCreateResponse {
100
101
 
101
102
  export namespace PostCreateResponse {
102
103
  export interface Platform {
103
- platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
104
+ platform:
105
+ | 'twitter'
106
+ | 'instagram'
107
+ | 'youtube'
108
+ | 'tiktok'
109
+ | 'pinterest'
110
+ | 'linkedin'
111
+ | 'bluesky'
112
+ | 'facebook'
113
+ | 'threads';
104
114
 
105
115
  success: boolean;
106
116
 
@@ -173,9 +183,24 @@ export namespace PostRetrieveResponse {
173
183
  }
174
184
 
175
185
  export interface Platform {
186
+ /**
187
+ * Per-platform text override that was used for this platform. Null when the
188
+ * top-level `content` was used.
189
+ */
190
+ content: string | null;
191
+
176
192
  errorMessage: string | null;
177
193
 
178
- platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
194
+ platform:
195
+ | 'twitter'
196
+ | 'instagram'
197
+ | 'youtube'
198
+ | 'tiktok'
199
+ | 'pinterest'
200
+ | 'linkedin'
201
+ | 'bluesky'
202
+ | 'facebook'
203
+ | 'threads';
179
204
 
180
205
  platformPostId: string | null;
181
206
 
@@ -249,9 +274,24 @@ export namespace PostListResponse {
249
274
  }
250
275
 
251
276
  export interface Platform {
277
+ /**
278
+ * Per-platform text override that was used for this platform. Null when the
279
+ * top-level `content` was used.
280
+ */
281
+ content: string | null;
282
+
252
283
  errorMessage: string | null;
253
284
 
254
- platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
285
+ platform:
286
+ | 'twitter'
287
+ | 'instagram'
288
+ | 'youtube'
289
+ | 'tiktok'
290
+ | 'pinterest'
291
+ | 'linkedin'
292
+ | 'bluesky'
293
+ | 'facebook'
294
+ | 'threads';
255
295
 
256
296
  platformPostId: string | null;
257
297
 
@@ -312,7 +352,23 @@ export namespace PostCreateParams {
312
352
  */
313
353
  accountId: string;
314
354
 
315
- platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
355
+ platform:
356
+ | 'twitter'
357
+ | 'instagram'
358
+ | 'youtube'
359
+ | 'tiktok'
360
+ | 'pinterest'
361
+ | 'linkedin'
362
+ | 'bluesky'
363
+ | 'facebook'
364
+ | 'threads';
365
+
366
+ /**
367
+ * Optional per-platform text override. Use when you want to change the text for
368
+ * this platform because different platforms talk differently. When omitted, the
369
+ * top-level `content` is used.
370
+ */
371
+ content?: string;
316
372
 
317
373
  /**
318
374
  * Platform-specific options. See TwitterConfigurations, YouTubeConfigurations,
@@ -359,7 +415,23 @@ export interface PostListParams {
359
415
  /**
360
416
  * Filter by platform (repeatable — OR logic)
361
417
  */
362
- platform?: Array<'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky'>;
418
+ platform?: Array<
419
+ | 'twitter'
420
+ | 'instagram'
421
+ | 'youtube'
422
+ | 'tiktok'
423
+ | 'pinterest'
424
+ | 'linkedin'
425
+ | 'bluesky'
426
+ | 'facebook'
427
+ | 'threads'
428
+ >;
429
+
430
+ /**
431
+ * Filter to posts targeting an integration bound to this profile. Pass "null"
432
+ * (literal string) to filter to posts whose integrations have no profile.
433
+ */
434
+ profileId?: string;
363
435
 
364
436
  /**
365
437
  * ISO 8601 lower bound on scheduledFor
@@ -394,6 +466,7 @@ export declare namespace Posts {
394
466
  type ScheduledListResponse as ScheduledListResponse,
395
467
  type ScheduledCancelResponse as ScheduledCancelResponse,
396
468
  type ScheduledRescheduleResponse as ScheduledRescheduleResponse,
469
+ type ScheduledListParams as ScheduledListParams,
397
470
  type ScheduledRescheduleParams as ScheduledRescheduleParams,
398
471
  };
399
472
  }
@@ -7,15 +7,19 @@ import { path } from '../../internal/utils/path';
7
7
 
8
8
  export class Scheduled extends APIResource {
9
9
  /**
10
- * List all scheduled posts
10
+ * Returns a paginated list of scheduled posts. Use `limit` + `offset` to page
11
+ * through the results.
11
12
  *
12
13
  * @example
13
14
  * ```ts
14
15
  * const scheduleds = await client.posts.scheduled.list();
15
16
  * ```
16
17
  */
17
- list(options?: RequestOptions): APIPromise<ScheduledListResponse> {
18
- return this._client.get('/v1/posts/scheduled/', options);
18
+ list(
19
+ query: ScheduledListParams | null | undefined = {},
20
+ options?: RequestOptions,
21
+ ): APIPromise<ScheduledListResponse> {
22
+ return this._client.get('/v1/posts/scheduled/', { query, ...options });
19
23
  }
20
24
 
21
25
  /**
@@ -56,6 +60,11 @@ export interface ScheduledListResponse {
56
60
  posts: Array<ScheduledListResponse.Post>;
57
61
 
58
62
  success: boolean;
63
+
64
+ /**
65
+ * Total matched scheduled posts across all pages
66
+ */
67
+ total: number;
59
68
  }
60
69
 
61
70
  export namespace ScheduledListResponse {
@@ -92,7 +101,16 @@ export namespace ScheduledListResponse {
92
101
 
93
102
  export namespace Post {
94
103
  export interface Platform {
95
- platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
104
+ platform:
105
+ | 'twitter'
106
+ | 'instagram'
107
+ | 'youtube'
108
+ | 'tiktok'
109
+ | 'pinterest'
110
+ | 'linkedin'
111
+ | 'bluesky'
112
+ | 'facebook'
113
+ | 'threads';
96
114
 
97
115
  status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
98
116
  }
@@ -125,6 +143,20 @@ export interface ScheduledRescheduleResponse {
125
143
  success: boolean;
126
144
  }
127
145
 
146
+ export interface ScheduledListParams {
147
+ /**
148
+ * Page size (max 100)
149
+ */
150
+ limit?: number;
151
+
152
+ /**
153
+ * Number of scheduled posts to skip
154
+ */
155
+ offset?: number;
156
+
157
+ sort?: 'asc' | 'desc';
158
+ }
159
+
128
160
  export interface ScheduledRescheduleParams {
129
161
  /**
130
162
  * New ISO 8601 datetime to schedule the post
@@ -142,6 +174,7 @@ export declare namespace Scheduled {
142
174
  type ScheduledListResponse as ScheduledListResponse,
143
175
  type ScheduledCancelResponse as ScheduledCancelResponse,
144
176
  type ScheduledRescheduleResponse as ScheduledRescheduleResponse,
177
+ type ScheduledListParams as ScheduledListParams,
145
178
  type ScheduledRescheduleParams as ScheduledRescheduleParams,
146
179
  };
147
180
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.6.0'; // x-release-please-version
1
+ export const VERSION = '0.7.0'; // x-release-please-version
package/uploads.d.mts CHANGED
@@ -1,2 +1,3 @@
1
+ /** @deprecated Import from ./core/uploads instead */
1
2
  export * from "./core/uploads.mjs";
2
3
  //# sourceMappingURL=uploads.d.mts.map
package/uploads.d.mts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,mCAA+B"}
package/uploads.d.ts CHANGED
@@ -1,2 +1,3 @@
1
+ /** @deprecated Import from ./core/uploads instead */
1
2
  export * from "./core/uploads.js";
2
3
  //# sourceMappingURL=uploads.d.ts.map
package/uploads.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,kCAA+B"}
package/uploads.mjs CHANGED
@@ -1,2 +1,3 @@
1
+ /** @deprecated Import from ./core/uploads instead */
1
2
  export * from "./core/uploads.mjs";
2
3
  //# sourceMappingURL=uploads.mjs.map
package/uploads.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,mCAA+B"}
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.6.0";
1
+ export declare const VERSION = "0.7.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.6.0";
1
+ export declare const VERSION = "0.7.0";
2
2
  //# sourceMappingURL=version.d.ts.map