@relayapi/sdk 0.2.2
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/dist/api-promise.d.ts +2 -0
- package/dist/api-promise.js +18 -0
- package/dist/client.d.ts +225 -0
- package/dist/client.js +552 -0
- package/dist/core/api-promise.d.ts +45 -0
- package/dist/core/api-promise.js +83 -0
- package/dist/core/error.d.ts +45 -0
- package/dist/core/error.js +112 -0
- package/dist/core/resource.d.ts +5 -0
- package/dist/core/resource.js +10 -0
- package/dist/core/uploads.d.ts +2 -0
- package/dist/core/uploads.js +5 -0
- package/dist/error.d.ts +2 -0
- package/dist/error.js +18 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +26 -0
- package/dist/internal/builtin-types.d.ts +72 -0
- package/dist/internal/builtin-types.js +3 -0
- package/dist/internal/detect-platform.d.ts +14 -0
- package/dist/internal/detect-platform.js +161 -0
- package/dist/internal/errors.d.ts +2 -0
- package/dist/internal/errors.js +40 -0
- package/dist/internal/headers.d.ts +19 -0
- package/dist/internal/headers.js +78 -0
- package/dist/internal/parse.d.ts +11 -0
- package/dist/internal/parse.js +39 -0
- package/dist/internal/request-options.d.ts +74 -0
- package/dist/internal/request-options.js +13 -0
- package/dist/internal/shim-types.d.ts +16 -0
- package/dist/internal/shim-types.js +3 -0
- package/dist/internal/shims.d.ts +23 -0
- package/dist/internal/shims.js +90 -0
- package/dist/internal/to-file.d.ts +44 -0
- package/dist/internal/to-file.js +90 -0
- package/dist/internal/types.d.ts +68 -0
- package/dist/internal/types.js +3 -0
- package/dist/internal/uploads.d.ts +41 -0
- package/dist/internal/uploads.js +140 -0
- package/dist/internal/utils/base64.d.ts +2 -0
- package/dist/internal/utils/base64.js +37 -0
- package/dist/internal/utils/bytes.d.ts +3 -0
- package/dist/internal/utils/bytes.js +30 -0
- package/dist/internal/utils/env.d.ts +8 -0
- package/dist/internal/utils/env.js +21 -0
- package/dist/internal/utils/log.d.ts +36 -0
- package/dist/internal/utils/log.js +84 -0
- package/dist/internal/utils/path.d.ts +14 -0
- package/dist/internal/utils/path.js +78 -0
- package/dist/internal/utils/query.d.ts +4 -0
- package/dist/internal/utils/query.js +22 -0
- package/dist/internal/utils/sleep.d.ts +1 -0
- package/dist/internal/utils/sleep.js +6 -0
- package/dist/internal/utils/uuid.d.ts +4 -0
- package/dist/internal/utils/uuid.js +18 -0
- package/dist/internal/utils/values.d.ts +17 -0
- package/dist/internal/utils/values.js +111 -0
- package/dist/internal/utils.d.ts +7 -0
- package/dist/internal/utils.js +24 -0
- package/dist/resource.d.ts +2 -0
- package/dist/resource.js +18 -0
- package/dist/resources/account-groups.d.ts +52 -0
- package/dist/resources/account-groups.js +37 -0
- package/dist/resources/accounts/accounts.d.ts +148 -0
- package/dist/resources/accounts/accounts.js +101 -0
- package/dist/resources/accounts/facebook-pages.d.ts +48 -0
- package/dist/resources/accounts/facebook-pages.js +21 -0
- package/dist/resources/accounts/gmb-locations.d.ts +48 -0
- package/dist/resources/accounts/gmb-locations.js +21 -0
- package/dist/resources/accounts/health.d.ts +49 -0
- package/dist/resources/accounts/health.js +21 -0
- package/dist/resources/accounts/index.d.ts +8 -0
- package/dist/resources/accounts/index.js +20 -0
- package/dist/resources/accounts/linkedin-organizations.d.ts +52 -0
- package/dist/resources/accounts/linkedin-organizations.js +21 -0
- package/dist/resources/accounts/pinterest-boards.d.ts +48 -0
- package/dist/resources/accounts/pinterest-boards.js +21 -0
- package/dist/resources/accounts/reddit-flairs.d.ts +27 -0
- package/dist/resources/accounts/reddit-flairs.js +15 -0
- package/dist/resources/accounts/reddit-subreddits.d.ts +48 -0
- package/dist/resources/accounts/reddit-subreddits.js +21 -0
- package/dist/resources/accounts.d.ts +1 -0
- package/dist/resources/accounts.js +18 -0
- package/dist/resources/analytics/analytics.d.ts +369 -0
- package/dist/resources/analytics/analytics.js +84 -0
- package/dist/resources/analytics/index.d.ts +2 -0
- package/dist/resources/analytics/index.js +8 -0
- package/dist/resources/analytics/youtube.d.ts +49 -0
- package/dist/resources/analytics/youtube.js +14 -0
- package/dist/resources/analytics.d.ts +1 -0
- package/dist/resources/analytics.js +18 -0
- package/dist/resources/api-keys.d.ts +110 -0
- package/dist/resources/api-keys.js +32 -0
- package/dist/resources/connect/connect.d.ts +188 -0
- package/dist/resources/connect/connect.js +97 -0
- package/dist/resources/connect/facebook/facebook.d.ts +9 -0
- package/dist/resources/connect/facebook/facebook.js +48 -0
- package/dist/resources/connect/facebook/index.d.ts +2 -0
- package/dist/resources/connect/facebook/index.js +8 -0
- package/dist/resources/connect/facebook/pages.d.ts +70 -0
- package/dist/resources/connect/facebook/pages.js +20 -0
- package/dist/resources/connect/facebook.d.ts +1 -0
- package/dist/resources/connect/facebook.js +18 -0
- package/dist/resources/connect/googlebusiness/googlebusiness.d.ts +9 -0
- package/dist/resources/connect/googlebusiness/googlebusiness.js +48 -0
- package/dist/resources/connect/googlebusiness/index.d.ts +2 -0
- package/dist/resources/connect/googlebusiness/index.js +8 -0
- package/dist/resources/connect/googlebusiness/locations.d.ts +70 -0
- package/dist/resources/connect/googlebusiness/locations.js +20 -0
- package/dist/resources/connect/googlebusiness.d.ts +1 -0
- package/dist/resources/connect/googlebusiness.js +18 -0
- package/dist/resources/connect/index.d.ts +8 -0
- package/dist/resources/connect/index.js +20 -0
- package/dist/resources/connect/linkedin/index.d.ts +2 -0
- package/dist/resources/connect/linkedin/index.js +8 -0
- package/dist/resources/connect/linkedin/linkedin.d.ts +9 -0
- package/dist/resources/connect/linkedin/linkedin.js +48 -0
- package/dist/resources/connect/linkedin/organizations.d.ts +85 -0
- package/dist/resources/connect/linkedin/organizations.js +20 -0
- package/dist/resources/connect/linkedin.d.ts +1 -0
- package/dist/resources/connect/linkedin.js +18 -0
- package/dist/resources/connect/pinterest/boards.d.ts +70 -0
- package/dist/resources/connect/pinterest/boards.js +20 -0
- package/dist/resources/connect/pinterest/index.d.ts +2 -0
- package/dist/resources/connect/pinterest/index.js +8 -0
- package/dist/resources/connect/pinterest/pinterest.d.ts +9 -0
- package/dist/resources/connect/pinterest/pinterest.js +48 -0
- package/dist/resources/connect/pinterest.d.ts +1 -0
- package/dist/resources/connect/pinterest.js +18 -0
- package/dist/resources/connect/snapchat/index.d.ts +2 -0
- package/dist/resources/connect/snapchat/index.js +8 -0
- package/dist/resources/connect/snapchat/profiles.d.ts +74 -0
- package/dist/resources/connect/snapchat/profiles.js +20 -0
- package/dist/resources/connect/snapchat/snapchat.d.ts +9 -0
- package/dist/resources/connect/snapchat/snapchat.js +48 -0
- package/dist/resources/connect/snapchat.d.ts +1 -0
- package/dist/resources/connect/snapchat.js +18 -0
- package/dist/resources/connect/telegram.d.ts +122 -0
- package/dist/resources/connect/telegram.js +26 -0
- package/dist/resources/connect/whatsapp.d.ts +92 -0
- package/dist/resources/connect/whatsapp.js +26 -0
- package/dist/resources/connect.d.ts +1 -0
- package/dist/resources/connect.js +18 -0
- package/dist/resources/connections.d.ts +55 -0
- package/dist/resources/connections.js +14 -0
- package/dist/resources/inbox/comments/comments.d.ts +220 -0
- package/dist/resources/inbox/comments/comments.js +83 -0
- package/dist/resources/inbox/comments/hide.d.ts +36 -0
- package/dist/resources/inbox/comments/hide.js +21 -0
- package/dist/resources/inbox/comments/index.d.ts +3 -0
- package/dist/resources/inbox/comments/index.js +10 -0
- package/dist/resources/inbox/comments/like.d.ts +36 -0
- package/dist/resources/inbox/comments/like.js +21 -0
- package/dist/resources/inbox/comments.d.ts +1 -0
- package/dist/resources/inbox/comments.js +18 -0
- package/dist/resources/inbox/inbox.d.ts +17 -0
- package/dist/resources/inbox/inbox.js +56 -0
- package/dist/resources/inbox/index.d.ts +4 -0
- package/dist/resources/inbox/index.js +12 -0
- package/dist/resources/inbox/messages.d.ts +205 -0
- package/dist/resources/inbox/messages.js +40 -0
- package/dist/resources/inbox/reviews/index.d.ts +2 -0
- package/dist/resources/inbox/reviews/index.js +8 -0
- package/dist/resources/inbox/reviews/reply.d.ts +38 -0
- package/dist/resources/inbox/reviews/reply.js +21 -0
- package/dist/resources/inbox/reviews/reviews.d.ts +76 -0
- package/dist/resources/inbox/reviews/reviews.js +54 -0
- package/dist/resources/inbox/reviews.d.ts +1 -0
- package/dist/resources/inbox/reviews.js +18 -0
- package/dist/resources/inbox.d.ts +1 -0
- package/dist/resources/inbox.js +18 -0
- package/dist/resources/index.d.ts +16 -0
- package/dist/resources/index.js +36 -0
- package/dist/resources/media.d.ts +177 -0
- package/dist/resources/media.js +51 -0
- package/dist/resources/posts/index.d.ts +2 -0
- package/dist/resources/posts/index.js +8 -0
- package/dist/resources/posts/logs.d.ts +134 -0
- package/dist/resources/posts/logs.js +31 -0
- package/dist/resources/posts/posts.d.ts +607 -0
- package/dist/resources/posts/posts.js +149 -0
- package/dist/resources/posts.d.ts +1 -0
- package/dist/resources/posts.js +18 -0
- package/dist/resources/queue/index.d.ts +2 -0
- package/dist/resources/queue/index.js +8 -0
- package/dist/resources/queue/queue.d.ts +42 -0
- package/dist/resources/queue/queue.js +60 -0
- package/dist/resources/queue/slots.d.ts +215 -0
- package/dist/resources/queue/slots.js +36 -0
- package/dist/resources/queue.d.ts +1 -0
- package/dist/resources/queue.js +18 -0
- package/dist/resources/reddit.d.ts +186 -0
- package/dist/resources/reddit.js +20 -0
- package/dist/resources/tools/index.d.ts +3 -0
- package/dist/resources/tools/index.js +10 -0
- package/dist/resources/tools/instagram.d.ts +41 -0
- package/dist/resources/tools/instagram.js +22 -0
- package/dist/resources/tools/tools.d.ts +13 -0
- package/dist/resources/tools/tools.js +52 -0
- package/dist/resources/tools/validate.d.ts +689 -0
- package/dist/resources/tools/validate.js +63 -0
- package/dist/resources/tools.d.ts +1 -0
- package/dist/resources/tools.js +18 -0
- package/dist/resources/twitter/bookmark.d.ts +48 -0
- package/dist/resources/twitter/bookmark.js +20 -0
- package/dist/resources/twitter/follow.d.ts +48 -0
- package/dist/resources/twitter/follow.js +20 -0
- package/dist/resources/twitter/index.d.ts +4 -0
- package/dist/resources/twitter/index.js +12 -0
- package/dist/resources/twitter/retweet.d.ts +48 -0
- package/dist/resources/twitter/retweet.js +20 -0
- package/dist/resources/twitter/twitter.d.ts +17 -0
- package/dist/resources/twitter/twitter.js +56 -0
- package/dist/resources/twitter.d.ts +1 -0
- package/dist/resources/twitter.js +18 -0
- package/dist/resources/usage.d.ts +97 -0
- package/dist/resources/usage.js +14 -0
- package/dist/resources/webhooks.d.ts +205 -0
- package/dist/resources/webhooks.js +50 -0
- package/dist/resources/whatsapp/broadcasts.d.ts +291 -0
- package/dist/resources/whatsapp/broadcasts.js +49 -0
- package/dist/resources/whatsapp/business-profile.d.ts +85 -0
- package/dist/resources/whatsapp/business-profile.js +20 -0
- package/dist/resources/whatsapp/contacts.d.ts +250 -0
- package/dist/resources/whatsapp/contacts.js +49 -0
- package/dist/resources/whatsapp/groups.d.ts +87 -0
- package/dist/resources/whatsapp/groups.js +31 -0
- package/dist/resources/whatsapp/index.d.ts +6 -0
- package/dist/resources/whatsapp/index.js +16 -0
- package/dist/resources/whatsapp/templates.d.ts +250 -0
- package/dist/resources/whatsapp/templates.js +39 -0
- package/dist/resources/whatsapp/whatsapp.d.ts +148 -0
- package/dist/resources/whatsapp/whatsapp.js +76 -0
- package/dist/resources/whatsapp.d.ts +1 -0
- package/dist/resources/whatsapp.js +18 -0
- package/dist/resources.d.ts +1 -0
- package/dist/resources.js +17 -0
- package/dist/uploads.d.ts +2 -0
- package/dist/uploads.js +18 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +5 -0
- package/package.json +28 -0
- package/src/index.ts +22 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.AccountGroups = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource");
|
|
6
|
+
const headers_1 = require("../internal/headers");
|
|
7
|
+
const path_1 = require("../internal/utils/path");
|
|
8
|
+
class AccountGroups extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create an account group
|
|
11
|
+
*/
|
|
12
|
+
create(body, options) {
|
|
13
|
+
return this._client.post('/v1/account-groups', { body, ...options });
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Update an account group
|
|
17
|
+
*/
|
|
18
|
+
update(id, body = {}, options) {
|
|
19
|
+
return this._client.put((0, path_1.path) `/v1/account-groups/${id}`, { body, ...options });
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* List account groups
|
|
23
|
+
*/
|
|
24
|
+
list(query, options) {
|
|
25
|
+
return this._client.get('/v1/account-groups', { query, ...options });
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Delete an account group
|
|
29
|
+
*/
|
|
30
|
+
delete(id, options) {
|
|
31
|
+
return this._client.delete((0, path_1.path) `/v1/account-groups/${id}`, {
|
|
32
|
+
...options,
|
|
33
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.AccountGroups = AccountGroups;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { APIResource } from '../../core/resource';
|
|
2
|
+
import * as FacebookPagesAPI from './facebook-pages';
|
|
3
|
+
import { FacebookPageRetrieveResponse, FacebookPageSetDefaultParams, FacebookPageSetDefaultResponse, FacebookPages } from './facebook-pages';
|
|
4
|
+
import * as GmbLocationsAPI from './gmb-locations';
|
|
5
|
+
import { GmbLocationRetrieveResponse, GmbLocationSetDefaultParams, GmbLocationSetDefaultResponse, GmbLocations } from './gmb-locations';
|
|
6
|
+
import * as HealthAPI from './health';
|
|
7
|
+
import { Health, HealthListResponse, HealthRetrieveResponse } from './health';
|
|
8
|
+
import * as LinkedinOrganizationsAPI from './linkedin-organizations';
|
|
9
|
+
import { LinkedinOrganizationRetrieveResponse, LinkedinOrganizationSwitchTypeParams, LinkedinOrganizationSwitchTypeResponse, LinkedinOrganizations } from './linkedin-organizations';
|
|
10
|
+
import * as PinterestBoardsAPI from './pinterest-boards';
|
|
11
|
+
import { PinterestBoardRetrieveResponse, PinterestBoardSetDefaultParams, PinterestBoardSetDefaultResponse, PinterestBoards } from './pinterest-boards';
|
|
12
|
+
import * as RedditFlairsAPI from './reddit-flairs';
|
|
13
|
+
import { RedditFlairRetrieveParams, RedditFlairRetrieveResponse, RedditFlairs } from './reddit-flairs';
|
|
14
|
+
import * as RedditSubredditsAPI from './reddit-subreddits';
|
|
15
|
+
import { RedditSubredditRetrieveResponse, RedditSubredditSetDefaultParams, RedditSubredditSetDefaultResponse, RedditSubreddits } from './reddit-subreddits';
|
|
16
|
+
import { APIPromise } from '../../core/api-promise';
|
|
17
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
18
|
+
export declare class Accounts extends APIResource {
|
|
19
|
+
health: HealthAPI.Health;
|
|
20
|
+
redditFlairs: RedditFlairsAPI.RedditFlairs;
|
|
21
|
+
facebookPages: FacebookPagesAPI.FacebookPages;
|
|
22
|
+
linkedinOrganizations: LinkedinOrganizationsAPI.LinkedinOrganizations;
|
|
23
|
+
pinterestBoards: PinterestBoardsAPI.PinterestBoards;
|
|
24
|
+
redditSubreddits: RedditSubredditsAPI.RedditSubreddits;
|
|
25
|
+
gmbLocations: GmbLocationsAPI.GmbLocations;
|
|
26
|
+
/**
|
|
27
|
+
* Get a connected account
|
|
28
|
+
*/
|
|
29
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<AccountRetrieveResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Update account metadata
|
|
32
|
+
*/
|
|
33
|
+
update(id: string, body?: AccountUpdateParams | null | undefined, options?: RequestOptions): APIPromise<AccountUpdateResponse>;
|
|
34
|
+
/**
|
|
35
|
+
* List connected accounts
|
|
36
|
+
*/
|
|
37
|
+
list(query?: AccountListParams | null | undefined, options?: RequestOptions): APIPromise<AccountListResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Disconnect a social account
|
|
40
|
+
*/
|
|
41
|
+
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
42
|
+
}
|
|
43
|
+
export interface AccountGroup {
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
}
|
|
47
|
+
export interface AccountRetrieveResponse {
|
|
48
|
+
/**
|
|
49
|
+
* Account ID
|
|
50
|
+
*/
|
|
51
|
+
id: string;
|
|
52
|
+
avatar_url: string | null;
|
|
53
|
+
connected_at: string;
|
|
54
|
+
display_name: string | null;
|
|
55
|
+
metadata: {
|
|
56
|
+
[key: string]: unknown;
|
|
57
|
+
} | null;
|
|
58
|
+
group: AccountGroup | null;
|
|
59
|
+
platform: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
|
|
60
|
+
platform_account_id: string;
|
|
61
|
+
updated_at: string;
|
|
62
|
+
username: string | null;
|
|
63
|
+
}
|
|
64
|
+
export interface AccountUpdateResponse {
|
|
65
|
+
/**
|
|
66
|
+
* Account ID
|
|
67
|
+
*/
|
|
68
|
+
id: string;
|
|
69
|
+
avatar_url: string | null;
|
|
70
|
+
connected_at: string;
|
|
71
|
+
display_name: string | null;
|
|
72
|
+
metadata: {
|
|
73
|
+
[key: string]: unknown;
|
|
74
|
+
} | null;
|
|
75
|
+
group: AccountGroup | null;
|
|
76
|
+
platform: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
|
|
77
|
+
platform_account_id: string;
|
|
78
|
+
updated_at: string;
|
|
79
|
+
username: string | null;
|
|
80
|
+
}
|
|
81
|
+
export interface AccountListResponse {
|
|
82
|
+
data: Array<AccountListResponse.Data>;
|
|
83
|
+
/**
|
|
84
|
+
* Whether more items exist
|
|
85
|
+
*/
|
|
86
|
+
has_more: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Cursor for next page
|
|
89
|
+
*/
|
|
90
|
+
next_cursor: string | null;
|
|
91
|
+
}
|
|
92
|
+
export declare namespace AccountListResponse {
|
|
93
|
+
interface Data {
|
|
94
|
+
/**
|
|
95
|
+
* Account ID
|
|
96
|
+
*/
|
|
97
|
+
id: string;
|
|
98
|
+
avatar_url: string | null;
|
|
99
|
+
connected_at: string;
|
|
100
|
+
display_name: string | null;
|
|
101
|
+
metadata: {
|
|
102
|
+
[key: string]: unknown;
|
|
103
|
+
} | null;
|
|
104
|
+
group: AccountGroup | null;
|
|
105
|
+
platform: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
|
|
106
|
+
platform_account_id: string;
|
|
107
|
+
updated_at: string;
|
|
108
|
+
username: string | null;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
export interface AccountUpdateParams {
|
|
112
|
+
display_name?: string;
|
|
113
|
+
metadata?: {
|
|
114
|
+
[key: string]: unknown;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Group ID (null to ungroup)
|
|
118
|
+
*/
|
|
119
|
+
group_id?: string | null;
|
|
120
|
+
}
|
|
121
|
+
export interface AccountListParams {
|
|
122
|
+
/**
|
|
123
|
+
* Pagination cursor
|
|
124
|
+
*/
|
|
125
|
+
cursor?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Number of items per page
|
|
128
|
+
*/
|
|
129
|
+
limit?: number;
|
|
130
|
+
/**
|
|
131
|
+
* Filter by group ID
|
|
132
|
+
*/
|
|
133
|
+
group_id?: string;
|
|
134
|
+
/**
|
|
135
|
+
* Only show ungrouped accounts
|
|
136
|
+
*/
|
|
137
|
+
ungrouped?: boolean;
|
|
138
|
+
}
|
|
139
|
+
export declare namespace Accounts {
|
|
140
|
+
export { type AccountRetrieveResponse as AccountRetrieveResponse, type AccountUpdateResponse as AccountUpdateResponse, type AccountListResponse as AccountListResponse, type AccountUpdateParams as AccountUpdateParams, type AccountListParams as AccountListParams, };
|
|
141
|
+
export { Health as Health, type HealthRetrieveResponse as HealthRetrieveResponse, type HealthListResponse as HealthListResponse, };
|
|
142
|
+
export { RedditFlairs as RedditFlairs, type RedditFlairRetrieveResponse as RedditFlairRetrieveResponse, type RedditFlairRetrieveParams as RedditFlairRetrieveParams, };
|
|
143
|
+
export { FacebookPages as FacebookPages, type FacebookPageRetrieveResponse as FacebookPageRetrieveResponse, type FacebookPageSetDefaultResponse as FacebookPageSetDefaultResponse, type FacebookPageSetDefaultParams as FacebookPageSetDefaultParams, };
|
|
144
|
+
export { LinkedinOrganizations as LinkedinOrganizations, type LinkedinOrganizationRetrieveResponse as LinkedinOrganizationRetrieveResponse, type LinkedinOrganizationSwitchTypeResponse as LinkedinOrganizationSwitchTypeResponse, type LinkedinOrganizationSwitchTypeParams as LinkedinOrganizationSwitchTypeParams, };
|
|
145
|
+
export { PinterestBoards as PinterestBoards, type PinterestBoardRetrieveResponse as PinterestBoardRetrieveResponse, type PinterestBoardSetDefaultResponse as PinterestBoardSetDefaultResponse, type PinterestBoardSetDefaultParams as PinterestBoardSetDefaultParams, };
|
|
146
|
+
export { RedditSubreddits as RedditSubreddits, type RedditSubredditRetrieveResponse as RedditSubredditRetrieveResponse, type RedditSubredditSetDefaultResponse as RedditSubredditSetDefaultResponse, type RedditSubredditSetDefaultParams as RedditSubredditSetDefaultParams, };
|
|
147
|
+
export { GmbLocations as GmbLocations, type GmbLocationRetrieveResponse as GmbLocationRetrieveResponse, type GmbLocationSetDefaultResponse as GmbLocationSetDefaultResponse, type GmbLocationSetDefaultParams as GmbLocationSetDefaultParams, };
|
|
148
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.Accounts = void 0;
|
|
38
|
+
const resource_1 = require("../../core/resource");
|
|
39
|
+
const FacebookPagesAPI = __importStar(require("./facebook-pages"));
|
|
40
|
+
const facebook_pages_1 = require("./facebook-pages");
|
|
41
|
+
const GmbLocationsAPI = __importStar(require("./gmb-locations"));
|
|
42
|
+
const gmb_locations_1 = require("./gmb-locations");
|
|
43
|
+
const HealthAPI = __importStar(require("./health"));
|
|
44
|
+
const health_1 = require("./health");
|
|
45
|
+
const LinkedinOrganizationsAPI = __importStar(require("./linkedin-organizations"));
|
|
46
|
+
const linkedin_organizations_1 = require("./linkedin-organizations");
|
|
47
|
+
const PinterestBoardsAPI = __importStar(require("./pinterest-boards"));
|
|
48
|
+
const pinterest_boards_1 = require("./pinterest-boards");
|
|
49
|
+
const RedditFlairsAPI = __importStar(require("./reddit-flairs"));
|
|
50
|
+
const reddit_flairs_1 = require("./reddit-flairs");
|
|
51
|
+
const RedditSubredditsAPI = __importStar(require("./reddit-subreddits"));
|
|
52
|
+
const reddit_subreddits_1 = require("./reddit-subreddits");
|
|
53
|
+
const headers_1 = require("../../internal/headers");
|
|
54
|
+
const path_1 = require("../../internal/utils/path");
|
|
55
|
+
class Accounts extends resource_1.APIResource {
|
|
56
|
+
constructor() {
|
|
57
|
+
super(...arguments);
|
|
58
|
+
this.health = new HealthAPI.Health(this._client);
|
|
59
|
+
this.redditFlairs = new RedditFlairsAPI.RedditFlairs(this._client);
|
|
60
|
+
this.facebookPages = new FacebookPagesAPI.FacebookPages(this._client);
|
|
61
|
+
this.linkedinOrganizations = new LinkedinOrganizationsAPI.LinkedinOrganizations(this._client);
|
|
62
|
+
this.pinterestBoards = new PinterestBoardsAPI.PinterestBoards(this._client);
|
|
63
|
+
this.redditSubreddits = new RedditSubredditsAPI.RedditSubreddits(this._client);
|
|
64
|
+
this.gmbLocations = new GmbLocationsAPI.GmbLocations(this._client);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Get a connected account
|
|
68
|
+
*/
|
|
69
|
+
retrieve(id, options) {
|
|
70
|
+
return this._client.get((0, path_1.path) `/v1/accounts/${id}`, options);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Update account metadata
|
|
74
|
+
*/
|
|
75
|
+
update(id, body = {}, options) {
|
|
76
|
+
return this._client.patch((0, path_1.path) `/v1/accounts/${id}`, { body, ...options });
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* List connected accounts
|
|
80
|
+
*/
|
|
81
|
+
list(query = {}, options) {
|
|
82
|
+
return this._client.get('/v1/accounts', { query, ...options });
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Disconnect a social account
|
|
86
|
+
*/
|
|
87
|
+
delete(id, options) {
|
|
88
|
+
return this._client.delete((0, path_1.path) `/v1/accounts/${id}`, {
|
|
89
|
+
...options,
|
|
90
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
exports.Accounts = Accounts;
|
|
95
|
+
Accounts.Health = health_1.Health;
|
|
96
|
+
Accounts.RedditFlairs = reddit_flairs_1.RedditFlairs;
|
|
97
|
+
Accounts.FacebookPages = facebook_pages_1.FacebookPages;
|
|
98
|
+
Accounts.LinkedinOrganizations = linkedin_organizations_1.LinkedinOrganizations;
|
|
99
|
+
Accounts.PinterestBoards = pinterest_boards_1.PinterestBoards;
|
|
100
|
+
Accounts.RedditSubreddits = reddit_subreddits_1.RedditSubreddits;
|
|
101
|
+
Accounts.GmbLocations = gmb_locations_1.GmbLocations;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { APIResource } from '../../core/resource';
|
|
2
|
+
import { APIPromise } from '../../core/api-promise';
|
|
3
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
4
|
+
export declare class FacebookPages extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Fetch Facebook pages for an account
|
|
7
|
+
*/
|
|
8
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<FacebookPageRetrieveResponse>;
|
|
9
|
+
/**
|
|
10
|
+
* Set default Facebook page
|
|
11
|
+
*/
|
|
12
|
+
setDefault(id: string, body: FacebookPageSetDefaultParams, options?: RequestOptions): APIPromise<FacebookPageSetDefaultResponse>;
|
|
13
|
+
}
|
|
14
|
+
export interface FacebookPageRetrieveResponse {
|
|
15
|
+
data: Array<FacebookPageRetrieveResponse.Data>;
|
|
16
|
+
}
|
|
17
|
+
export declare namespace FacebookPageRetrieveResponse {
|
|
18
|
+
interface Data {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
access_token?: string;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export interface FacebookPageSetDefaultResponse {
|
|
25
|
+
/**
|
|
26
|
+
* Account ID
|
|
27
|
+
*/
|
|
28
|
+
id: string;
|
|
29
|
+
avatar_url: string | null;
|
|
30
|
+
connected_at: string;
|
|
31
|
+
display_name: string | null;
|
|
32
|
+
metadata: {
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
} | null;
|
|
35
|
+
platform: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
|
|
36
|
+
platform_account_id: string;
|
|
37
|
+
updated_at: string;
|
|
38
|
+
username: string | null;
|
|
39
|
+
}
|
|
40
|
+
export interface FacebookPageSetDefaultParams {
|
|
41
|
+
/**
|
|
42
|
+
* Facebook page ID to set as default
|
|
43
|
+
*/
|
|
44
|
+
page_id: string;
|
|
45
|
+
}
|
|
46
|
+
export declare namespace FacebookPages {
|
|
47
|
+
export { type FacebookPageRetrieveResponse as FacebookPageRetrieveResponse, type FacebookPageSetDefaultResponse as FacebookPageSetDefaultResponse, type FacebookPageSetDefaultParams as FacebookPageSetDefaultParams, };
|
|
48
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.FacebookPages = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource");
|
|
6
|
+
const path_1 = require("../../internal/utils/path");
|
|
7
|
+
class FacebookPages extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Fetch Facebook pages for an account
|
|
10
|
+
*/
|
|
11
|
+
retrieve(id, options) {
|
|
12
|
+
return this._client.get((0, path_1.path) `/v1/accounts/${id}/facebook-pages`, options);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Set default Facebook page
|
|
16
|
+
*/
|
|
17
|
+
setDefault(id, body, options) {
|
|
18
|
+
return this._client.put((0, path_1.path) `/v1/accounts/${id}/facebook-pages`, { body, ...options });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.FacebookPages = FacebookPages;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { APIResource } from '../../core/resource';
|
|
2
|
+
import { APIPromise } from '../../core/api-promise';
|
|
3
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
4
|
+
export declare class GmbLocations extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Fetch Google My Business locations
|
|
7
|
+
*/
|
|
8
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<GmbLocationRetrieveResponse>;
|
|
9
|
+
/**
|
|
10
|
+
* Set default GMB location
|
|
11
|
+
*/
|
|
12
|
+
setDefault(id: string, body: GmbLocationSetDefaultParams, options?: RequestOptions): APIPromise<GmbLocationSetDefaultResponse>;
|
|
13
|
+
}
|
|
14
|
+
export interface GmbLocationRetrieveResponse {
|
|
15
|
+
data: Array<GmbLocationRetrieveResponse.Data>;
|
|
16
|
+
}
|
|
17
|
+
export declare namespace GmbLocationRetrieveResponse {
|
|
18
|
+
interface Data {
|
|
19
|
+
id: string;
|
|
20
|
+
address: string | null;
|
|
21
|
+
name: string;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export interface GmbLocationSetDefaultResponse {
|
|
25
|
+
/**
|
|
26
|
+
* Account ID
|
|
27
|
+
*/
|
|
28
|
+
id: string;
|
|
29
|
+
avatar_url: string | null;
|
|
30
|
+
connected_at: string;
|
|
31
|
+
display_name: string | null;
|
|
32
|
+
metadata: {
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
} | null;
|
|
35
|
+
platform: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
|
|
36
|
+
platform_account_id: string;
|
|
37
|
+
updated_at: string;
|
|
38
|
+
username: string | null;
|
|
39
|
+
}
|
|
40
|
+
export interface GmbLocationSetDefaultParams {
|
|
41
|
+
/**
|
|
42
|
+
* Google My Business location ID to set as default
|
|
43
|
+
*/
|
|
44
|
+
location_id: string;
|
|
45
|
+
}
|
|
46
|
+
export declare namespace GmbLocations {
|
|
47
|
+
export { type GmbLocationRetrieveResponse as GmbLocationRetrieveResponse, type GmbLocationSetDefaultResponse as GmbLocationSetDefaultResponse, type GmbLocationSetDefaultParams as GmbLocationSetDefaultParams, };
|
|
48
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.GmbLocations = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource");
|
|
6
|
+
const path_1 = require("../../internal/utils/path");
|
|
7
|
+
class GmbLocations extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Fetch Google My Business locations
|
|
10
|
+
*/
|
|
11
|
+
retrieve(id, options) {
|
|
12
|
+
return this._client.get((0, path_1.path) `/v1/accounts/${id}/gmb-locations`, options);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Set default GMB location
|
|
16
|
+
*/
|
|
17
|
+
setDefault(id, body, options) {
|
|
18
|
+
return this._client.put((0, path_1.path) `/v1/accounts/${id}/gmb-locations`, { body, ...options });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.GmbLocations = GmbLocations;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { APIResource } from '../../core/resource';
|
|
2
|
+
import { APIPromise } from '../../core/api-promise';
|
|
3
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
4
|
+
export declare class Health extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Check health of a single connected account
|
|
7
|
+
*/
|
|
8
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<HealthRetrieveResponse>;
|
|
9
|
+
/**
|
|
10
|
+
* Check health of all connected accounts
|
|
11
|
+
*/
|
|
12
|
+
list(options?: RequestOptions): APIPromise<HealthListResponse>;
|
|
13
|
+
}
|
|
14
|
+
export interface HealthRetrieveResponse {
|
|
15
|
+
id: string;
|
|
16
|
+
healthy: boolean;
|
|
17
|
+
platform: string;
|
|
18
|
+
token_expires_at: string | null;
|
|
19
|
+
username: string | null;
|
|
20
|
+
error?: HealthRetrieveResponse.Error;
|
|
21
|
+
}
|
|
22
|
+
export declare namespace HealthRetrieveResponse {
|
|
23
|
+
interface Error {
|
|
24
|
+
code: string;
|
|
25
|
+
message: string;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export interface HealthListResponse {
|
|
29
|
+
data: Array<HealthListResponse.Data>;
|
|
30
|
+
}
|
|
31
|
+
export declare namespace HealthListResponse {
|
|
32
|
+
interface Data {
|
|
33
|
+
id: string;
|
|
34
|
+
healthy: boolean;
|
|
35
|
+
platform: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
|
|
36
|
+
token_expires_at: string | null;
|
|
37
|
+
username: string | null;
|
|
38
|
+
error?: Data.Error;
|
|
39
|
+
}
|
|
40
|
+
namespace Data {
|
|
41
|
+
interface Error {
|
|
42
|
+
code: string;
|
|
43
|
+
message: string;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export declare namespace Health {
|
|
48
|
+
export { type HealthRetrieveResponse as HealthRetrieveResponse, type HealthListResponse as HealthListResponse, };
|
|
49
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Health = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource");
|
|
6
|
+
const path_1 = require("../../internal/utils/path");
|
|
7
|
+
class Health extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Check health of a single connected account
|
|
10
|
+
*/
|
|
11
|
+
retrieve(id, options) {
|
|
12
|
+
return this._client.get((0, path_1.path) `/v1/accounts/${id}/health`, options);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Check health of all connected accounts
|
|
16
|
+
*/
|
|
17
|
+
list(options) {
|
|
18
|
+
return this._client.get('/v1/accounts/health', options);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.Health = Health;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { Accounts, type AccountRetrieveResponse, type AccountUpdateResponse, type AccountListResponse, type AccountUpdateParams, type AccountListParams, } from './accounts';
|
|
2
|
+
export { FacebookPages, type FacebookPageRetrieveResponse, type FacebookPageSetDefaultResponse, type FacebookPageSetDefaultParams, } from './facebook-pages';
|
|
3
|
+
export { GmbLocations, type GmbLocationRetrieveResponse, type GmbLocationSetDefaultResponse, type GmbLocationSetDefaultParams, } from './gmb-locations';
|
|
4
|
+
export { Health, type HealthRetrieveResponse, type HealthListResponse } from './health';
|
|
5
|
+
export { LinkedinOrganizations, type LinkedinOrganizationRetrieveResponse, type LinkedinOrganizationSwitchTypeResponse, type LinkedinOrganizationSwitchTypeParams, } from './linkedin-organizations';
|
|
6
|
+
export { PinterestBoards, type PinterestBoardRetrieveResponse, type PinterestBoardSetDefaultResponse, type PinterestBoardSetDefaultParams, } from './pinterest-boards';
|
|
7
|
+
export { RedditFlairs, type RedditFlairRetrieveResponse, type RedditFlairRetrieveParams, } from './reddit-flairs';
|
|
8
|
+
export { RedditSubreddits, type RedditSubredditRetrieveResponse, type RedditSubredditSetDefaultResponse, type RedditSubredditSetDefaultParams, } from './reddit-subreddits';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.RedditSubreddits = exports.RedditFlairs = exports.PinterestBoards = exports.LinkedinOrganizations = exports.Health = exports.GmbLocations = exports.FacebookPages = exports.Accounts = void 0;
|
|
5
|
+
var accounts_1 = require("./accounts");
|
|
6
|
+
Object.defineProperty(exports, "Accounts", { enumerable: true, get: function () { return accounts_1.Accounts; } });
|
|
7
|
+
var facebook_pages_1 = require("./facebook-pages");
|
|
8
|
+
Object.defineProperty(exports, "FacebookPages", { enumerable: true, get: function () { return facebook_pages_1.FacebookPages; } });
|
|
9
|
+
var gmb_locations_1 = require("./gmb-locations");
|
|
10
|
+
Object.defineProperty(exports, "GmbLocations", { enumerable: true, get: function () { return gmb_locations_1.GmbLocations; } });
|
|
11
|
+
var health_1 = require("./health");
|
|
12
|
+
Object.defineProperty(exports, "Health", { enumerable: true, get: function () { return health_1.Health; } });
|
|
13
|
+
var linkedin_organizations_1 = require("./linkedin-organizations");
|
|
14
|
+
Object.defineProperty(exports, "LinkedinOrganizations", { enumerable: true, get: function () { return linkedin_organizations_1.LinkedinOrganizations; } });
|
|
15
|
+
var pinterest_boards_1 = require("./pinterest-boards");
|
|
16
|
+
Object.defineProperty(exports, "PinterestBoards", { enumerable: true, get: function () { return pinterest_boards_1.PinterestBoards; } });
|
|
17
|
+
var reddit_flairs_1 = require("./reddit-flairs");
|
|
18
|
+
Object.defineProperty(exports, "RedditFlairs", { enumerable: true, get: function () { return reddit_flairs_1.RedditFlairs; } });
|
|
19
|
+
var reddit_subreddits_1 = require("./reddit-subreddits");
|
|
20
|
+
Object.defineProperty(exports, "RedditSubreddits", { enumerable: true, get: function () { return reddit_subreddits_1.RedditSubreddits; } });
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { APIResource } from '../../core/resource';
|
|
2
|
+
import { APIPromise } from '../../core/api-promise';
|
|
3
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
4
|
+
export declare class LinkedinOrganizations extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Fetch LinkedIn organizations for an account
|
|
7
|
+
*/
|
|
8
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<LinkedinOrganizationRetrieveResponse>;
|
|
9
|
+
/**
|
|
10
|
+
* Switch LinkedIn account type
|
|
11
|
+
*/
|
|
12
|
+
switchType(id: string, body: LinkedinOrganizationSwitchTypeParams, options?: RequestOptions): APIPromise<LinkedinOrganizationSwitchTypeResponse>;
|
|
13
|
+
}
|
|
14
|
+
export interface LinkedinOrganizationRetrieveResponse {
|
|
15
|
+
data: Array<LinkedinOrganizationRetrieveResponse.Data>;
|
|
16
|
+
}
|
|
17
|
+
export declare namespace LinkedinOrganizationRetrieveResponse {
|
|
18
|
+
interface Data {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
vanity_name: string | null;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export interface LinkedinOrganizationSwitchTypeResponse {
|
|
25
|
+
/**
|
|
26
|
+
* Account ID
|
|
27
|
+
*/
|
|
28
|
+
id: string;
|
|
29
|
+
avatar_url: string | null;
|
|
30
|
+
connected_at: string;
|
|
31
|
+
display_name: string | null;
|
|
32
|
+
metadata: {
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
} | null;
|
|
35
|
+
platform: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
|
|
36
|
+
platform_account_id: string;
|
|
37
|
+
updated_at: string;
|
|
38
|
+
username: string | null;
|
|
39
|
+
}
|
|
40
|
+
export interface LinkedinOrganizationSwitchTypeParams {
|
|
41
|
+
/**
|
|
42
|
+
* Account type to switch to
|
|
43
|
+
*/
|
|
44
|
+
account_type: 'personal' | 'organization';
|
|
45
|
+
/**
|
|
46
|
+
* LinkedIn organization ID
|
|
47
|
+
*/
|
|
48
|
+
organization_id: string;
|
|
49
|
+
}
|
|
50
|
+
export declare namespace LinkedinOrganizations {
|
|
51
|
+
export { type LinkedinOrganizationRetrieveResponse as LinkedinOrganizationRetrieveResponse, type LinkedinOrganizationSwitchTypeResponse as LinkedinOrganizationSwitchTypeResponse, type LinkedinOrganizationSwitchTypeParams as LinkedinOrganizationSwitchTypeParams, };
|
|
52
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.LinkedinOrganizations = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource");
|
|
6
|
+
const path_1 = require("../../internal/utils/path");
|
|
7
|
+
class LinkedinOrganizations extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Fetch LinkedIn organizations for an account
|
|
10
|
+
*/
|
|
11
|
+
retrieve(id, options) {
|
|
12
|
+
return this._client.get((0, path_1.path) `/v1/accounts/${id}/linkedin-organizations`, options);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Switch LinkedIn account type
|
|
16
|
+
*/
|
|
17
|
+
switchType(id, body, options) {
|
|
18
|
+
return this._client.put((0, path_1.path) `/v1/accounts/${id}/linkedin-organizations`, { body, ...options });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.LinkedinOrganizations = LinkedinOrganizations;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { APIResource } from '../../core/resource';
|
|
2
|
+
import { APIPromise } from '../../core/api-promise';
|
|
3
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
4
|
+
export declare class PinterestBoards extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Fetch Pinterest boards for an account
|
|
7
|
+
*/
|
|
8
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<PinterestBoardRetrieveResponse>;
|
|
9
|
+
/**
|
|
10
|
+
* Set default Pinterest board
|
|
11
|
+
*/
|
|
12
|
+
setDefault(id: string, body: PinterestBoardSetDefaultParams, options?: RequestOptions): APIPromise<PinterestBoardSetDefaultResponse>;
|
|
13
|
+
}
|
|
14
|
+
export interface PinterestBoardRetrieveResponse {
|
|
15
|
+
data: Array<PinterestBoardRetrieveResponse.Data>;
|
|
16
|
+
}
|
|
17
|
+
export declare namespace PinterestBoardRetrieveResponse {
|
|
18
|
+
interface Data {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
url: string | null;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export interface PinterestBoardSetDefaultResponse {
|
|
25
|
+
/**
|
|
26
|
+
* Account ID
|
|
27
|
+
*/
|
|
28
|
+
id: string;
|
|
29
|
+
avatar_url: string | null;
|
|
30
|
+
connected_at: string;
|
|
31
|
+
display_name: string | null;
|
|
32
|
+
metadata: {
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
} | null;
|
|
35
|
+
platform: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
|
|
36
|
+
platform_account_id: string;
|
|
37
|
+
updated_at: string;
|
|
38
|
+
username: string | null;
|
|
39
|
+
}
|
|
40
|
+
export interface PinterestBoardSetDefaultParams {
|
|
41
|
+
/**
|
|
42
|
+
* Pinterest board ID to set as default
|
|
43
|
+
*/
|
|
44
|
+
board_id: string;
|
|
45
|
+
}
|
|
46
|
+
export declare namespace PinterestBoards {
|
|
47
|
+
export { type PinterestBoardRetrieveResponse as PinterestBoardRetrieveResponse, type PinterestBoardSetDefaultResponse as PinterestBoardSetDefaultResponse, type PinterestBoardSetDefaultParams as PinterestBoardSetDefaultParams, };
|
|
48
|
+
}
|