@postpeer/node 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/client.d.mts +3 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -3
- package/client.d.ts.map +1 -1
- package/client.js +14 -3
- package/client.js.map +1 -1
- package/client.mjs +14 -3
- package/client.mjs.map +1 -1
- package/internal/types.d.mts +6 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +6 -6
- package/internal/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/connect/connect.d.mts +3 -3
- package/resources/connect/connect.d.mts.map +1 -1
- package/resources/connect/connect.d.ts +3 -3
- package/resources/connect/connect.d.ts.map +1 -1
- package/resources/connect/connect.js.map +1 -1
- package/resources/connect/connect.mjs +1 -1
- package/resources/connect/connect.mjs.map +1 -1
- package/resources/connect/index.d.mts +1 -1
- package/resources/connect/index.d.mts.map +1 -1
- package/resources/connect/index.d.ts +1 -1
- package/resources/connect/index.d.ts.map +1 -1
- package/resources/connect/index.js.map +1 -1
- package/resources/connect/index.mjs.map +1 -1
- package/resources/connect/integrations.d.mts +21 -4
- package/resources/connect/integrations.d.mts.map +1 -1
- package/resources/connect/integrations.d.ts +21 -4
- package/resources/connect/integrations.d.ts.map +1 -1
- package/resources/connect/integrations.js +3 -3
- package/resources/connect/integrations.js.map +1 -1
- package/resources/connect/integrations.mjs +3 -3
- package/resources/connect/integrations.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/platforms.d.mts +1 -1
- package/resources/platforms.d.mts.map +1 -1
- package/resources/platforms.d.ts +1 -1
- package/resources/platforms.d.ts.map +1 -1
- package/resources/posts/index.d.mts +1 -1
- package/resources/posts/index.d.mts.map +1 -1
- package/resources/posts/index.d.ts +1 -1
- package/resources/posts/index.d.ts.map +1 -1
- package/resources/posts/index.js.map +1 -1
- package/resources/posts/index.mjs.map +1 -1
- package/resources/posts/posts.d.mts +106 -264
- package/resources/posts/posts.d.mts.map +1 -1
- package/resources/posts/posts.d.ts +106 -264
- package/resources/posts/posts.d.ts.map +1 -1
- package/resources/posts/posts.js.map +1 -1
- package/resources/posts/posts.mjs.map +1 -1
- package/resources/posts/scheduled.d.mts +2 -8
- package/resources/posts/scheduled.d.mts.map +1 -1
- package/resources/posts/scheduled.d.ts +2 -8
- package/resources/posts/scheduled.d.ts.map +1 -1
- package/src/client.ts +15 -5
- package/src/internal/types.ts +6 -8
- package/src/resources/connect/connect.ts +8 -2
- package/src/resources/connect/index.ts +1 -0
- package/src/resources/connect/integrations.ts +31 -4
- package/src/resources/index.ts +0 -1
- package/src/resources/platforms.ts +1 -1
- package/src/resources/posts/index.ts +0 -1
- package/src/resources/posts/posts.ts +146 -329
- package/src/resources/posts/scheduled.ts +2 -8
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/internal/types.ts
CHANGED
|
@@ -40,7 +40,6 @@ type OverloadedParameters<T> =
|
|
|
40
40
|
: T extends (...args: infer A) => unknown ? A
|
|
41
41
|
: never;
|
|
42
42
|
|
|
43
|
-
/* eslint-disable */
|
|
44
43
|
/**
|
|
45
44
|
* These imports attempt to get types from a parent package's dependencies.
|
|
46
45
|
* Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which
|
|
@@ -63,19 +62,18 @@ type OverloadedParameters<T> =
|
|
|
63
62
|
*
|
|
64
63
|
* [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition
|
|
65
64
|
*/
|
|
66
|
-
/** @ts-ignore For users with \@types/node */
|
|
65
|
+
/** @ts-ignore For users with \@types/node */ /* prettier-ignore */
|
|
67
66
|
type UndiciTypesRequestInit = NotAny<import('../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit>;
|
|
68
|
-
/** @ts-ignore For users with undici */
|
|
67
|
+
/** @ts-ignore For users with undici */ /* prettier-ignore */
|
|
69
68
|
type UndiciRequestInit = NotAny<import('../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici/index.d.ts').RequestInit>;
|
|
70
|
-
/** @ts-ignore For users with \@types/bun */
|
|
69
|
+
/** @ts-ignore For users with \@types/bun */ /* prettier-ignore */
|
|
71
70
|
type BunRequestInit = globalThis.FetchRequestInit;
|
|
72
|
-
/** @ts-ignore For users with node-fetch@2 */
|
|
71
|
+
/** @ts-ignore For users with node-fetch@2 */ /* prettier-ignore */
|
|
73
72
|
type NodeFetch2RequestInit = NotAny<import('../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit>;
|
|
74
|
-
/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */
|
|
73
|
+
/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ /* prettier-ignore */
|
|
75
74
|
type NodeFetch3RequestInit = NotAny<import('../node_modules/node-fetch').RequestInit> | NotAny<import('../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/node-fetch').RequestInit>;
|
|
76
|
-
/** @ts-ignore For users who use Deno */
|
|
75
|
+
/** @ts-ignore For users who use Deno */ /* prettier-ignore */
|
|
77
76
|
type FetchRequestInit = NonNullable<OverloadedParameters<typeof fetch>[1]>;
|
|
78
|
-
/* eslint-enable */
|
|
79
77
|
|
|
80
78
|
type RequestInits =
|
|
81
79
|
| NotAny<UndiciTypesRequestInit>
|
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as IntegrationsAPI from './integrations';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
IntegrationDisconnectResponse,
|
|
7
|
+
IntegrationListParams,
|
|
8
|
+
IntegrationListResponse,
|
|
9
|
+
Integrations,
|
|
10
|
+
} from './integrations';
|
|
6
11
|
import { APIPromise } from '../../core/api-promise';
|
|
7
12
|
import { RequestOptions } from '../../internal/request-options';
|
|
8
13
|
import { path } from '../../internal/utils/path';
|
|
@@ -14,7 +19,7 @@ export class Connect extends APIResource {
|
|
|
14
19
|
* Get OAuth URL for a platform
|
|
15
20
|
*/
|
|
16
21
|
getOAuthURL(
|
|
17
|
-
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin',
|
|
22
|
+
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky',
|
|
18
23
|
query: ConnectGetOAuthURLParams | null | undefined = {},
|
|
19
24
|
options?: RequestOptions,
|
|
20
25
|
): APIPromise<ConnectGetOAuthURLResponse> {
|
|
@@ -45,5 +50,6 @@ export declare namespace Connect {
|
|
|
45
50
|
Integrations as Integrations,
|
|
46
51
|
type IntegrationListResponse as IntegrationListResponse,
|
|
47
52
|
type IntegrationDisconnectResponse as IntegrationDisconnectResponse,
|
|
53
|
+
type IntegrationListParams as IntegrationListParams,
|
|
48
54
|
};
|
|
49
55
|
}
|
|
@@ -7,10 +7,13 @@ import { path } from '../../internal/utils/path';
|
|
|
7
7
|
|
|
8
8
|
export class Integrations extends APIResource {
|
|
9
9
|
/**
|
|
10
|
-
* List
|
|
10
|
+
* List integrations connected to this project
|
|
11
11
|
*/
|
|
12
|
-
list(
|
|
13
|
-
|
|
12
|
+
list(
|
|
13
|
+
query: IntegrationListParams | null | undefined = {},
|
|
14
|
+
options?: RequestOptions,
|
|
15
|
+
): APIPromise<IntegrationListResponse> {
|
|
16
|
+
return this._client.get('/v1/connect/integrations', { query, ...options });
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
/**
|
|
@@ -24,7 +27,16 @@ export class Integrations extends APIResource {
|
|
|
24
27
|
export interface IntegrationListResponse {
|
|
25
28
|
integrations: Array<IntegrationListResponse.Integration>;
|
|
26
29
|
|
|
30
|
+
limit: number;
|
|
31
|
+
|
|
32
|
+
page: number;
|
|
33
|
+
|
|
27
34
|
success: boolean;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Total matched integrations across all pages
|
|
38
|
+
*/
|
|
39
|
+
total: number;
|
|
28
40
|
}
|
|
29
41
|
|
|
30
42
|
export namespace IntegrationListResponse {
|
|
@@ -46,7 +58,7 @@ export namespace IntegrationListResponse {
|
|
|
46
58
|
*/
|
|
47
59
|
imageUrl: string | null;
|
|
48
60
|
|
|
49
|
-
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin';
|
|
61
|
+
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
|
|
50
62
|
|
|
51
63
|
/**
|
|
52
64
|
* The user ID on the platform, or null if not yet retrieved
|
|
@@ -61,9 +73,24 @@ export interface IntegrationDisconnectResponse {
|
|
|
61
73
|
success: boolean;
|
|
62
74
|
}
|
|
63
75
|
|
|
76
|
+
export interface IntegrationListParams {
|
|
77
|
+
/**
|
|
78
|
+
* Page size (1-100)
|
|
79
|
+
*/
|
|
80
|
+
limit?: number;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Page number
|
|
84
|
+
*/
|
|
85
|
+
page?: number;
|
|
86
|
+
|
|
87
|
+
platform?: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
|
|
88
|
+
}
|
|
89
|
+
|
|
64
90
|
export declare namespace Integrations {
|
|
65
91
|
export {
|
|
66
92
|
type IntegrationListResponse as IntegrationListResponse,
|
|
67
93
|
type IntegrationDisconnectResponse as IntegrationDisconnectResponse,
|
|
94
|
+
type IntegrationListParams as IntegrationListParams,
|
|
68
95
|
};
|
|
69
96
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface PlatformListResponse {
|
|
|
19
19
|
|
|
20
20
|
export namespace PlatformListResponse {
|
|
21
21
|
export interface Platform {
|
|
22
|
-
name: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin';
|
|
22
|
+
name: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
|
|
23
23
|
|
|
24
24
|
status: 'prod' | 'beta' | 'dev';
|
|
25
25
|
}
|