@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,14 @@
|
|
|
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.Youtube = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource");
|
|
6
|
+
class Youtube extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Get YouTube daily views and watch time
|
|
9
|
+
*/
|
|
10
|
+
getDailyViews(query, options) {
|
|
11
|
+
return this._client.get('/v1/analytics/youtube/daily-views', { query, ...options });
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.Youtube = Youtube;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './analytics/index';
|
|
@@ -0,0 +1,18 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
__exportStar(require("./analytics/index"), exports);
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { APIResource } from '../core/resource';
|
|
2
|
+
import { APIPromise } from '../core/api-promise';
|
|
3
|
+
import { RequestOptions } from '../internal/request-options';
|
|
4
|
+
export declare class APIKeys extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new API key. The full key is returned only once in the response — store
|
|
7
|
+
* it securely.
|
|
8
|
+
*/
|
|
9
|
+
create(body: APIKeyCreateParams, options?: RequestOptions): APIPromise<APIKeyCreateResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* List API keys
|
|
12
|
+
*/
|
|
13
|
+
list(query?: APIKeyListParams | null | undefined, options?: RequestOptions): APIPromise<APIKeyListResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Delete an API key
|
|
16
|
+
*/
|
|
17
|
+
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
18
|
+
}
|
|
19
|
+
export interface APIKeyCreateResponse {
|
|
20
|
+
/**
|
|
21
|
+
* API key ID
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* Creation timestamp
|
|
26
|
+
*/
|
|
27
|
+
created_at: string;
|
|
28
|
+
/**
|
|
29
|
+
* Expiration timestamp
|
|
30
|
+
*/
|
|
31
|
+
expires_at: string | null;
|
|
32
|
+
/**
|
|
33
|
+
* Full API key (shown once, store securely)
|
|
34
|
+
*/
|
|
35
|
+
key: string;
|
|
36
|
+
/**
|
|
37
|
+
* API key name
|
|
38
|
+
*/
|
|
39
|
+
name: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* Key prefix
|
|
42
|
+
*/
|
|
43
|
+
prefix: string;
|
|
44
|
+
}
|
|
45
|
+
export interface APIKeyListResponse {
|
|
46
|
+
data: Array<APIKeyListResponse.Data>;
|
|
47
|
+
/**
|
|
48
|
+
* Whether more items exist
|
|
49
|
+
*/
|
|
50
|
+
has_more: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Cursor for next page
|
|
53
|
+
*/
|
|
54
|
+
next_cursor: string | null;
|
|
55
|
+
}
|
|
56
|
+
export declare namespace APIKeyListResponse {
|
|
57
|
+
interface Data {
|
|
58
|
+
/**
|
|
59
|
+
* API key ID
|
|
60
|
+
*/
|
|
61
|
+
id: string;
|
|
62
|
+
/**
|
|
63
|
+
* Creation timestamp
|
|
64
|
+
*/
|
|
65
|
+
created_at: string;
|
|
66
|
+
/**
|
|
67
|
+
* Whether the key is active
|
|
68
|
+
*/
|
|
69
|
+
enabled: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Expiration timestamp
|
|
72
|
+
*/
|
|
73
|
+
expires_at: string | null;
|
|
74
|
+
/**
|
|
75
|
+
* API key name
|
|
76
|
+
*/
|
|
77
|
+
name: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Key prefix (e.g. rlay*live*)
|
|
80
|
+
*/
|
|
81
|
+
prefix: string | null;
|
|
82
|
+
/**
|
|
83
|
+
* First 8 characters of the key (preview)
|
|
84
|
+
*/
|
|
85
|
+
start: string;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
export interface APIKeyCreateParams {
|
|
89
|
+
/**
|
|
90
|
+
* Name for the API key
|
|
91
|
+
*/
|
|
92
|
+
name: string;
|
|
93
|
+
/**
|
|
94
|
+
* Number of days until the key expires
|
|
95
|
+
*/
|
|
96
|
+
expires_in_days?: number;
|
|
97
|
+
}
|
|
98
|
+
export interface APIKeyListParams {
|
|
99
|
+
/**
|
|
100
|
+
* Pagination cursor
|
|
101
|
+
*/
|
|
102
|
+
cursor?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Number of items per page
|
|
105
|
+
*/
|
|
106
|
+
limit?: number;
|
|
107
|
+
}
|
|
108
|
+
export declare namespace APIKeys {
|
|
109
|
+
export { type APIKeyCreateResponse as APIKeyCreateResponse, type APIKeyListResponse as APIKeyListResponse, type APIKeyCreateParams as APIKeyCreateParams, type APIKeyListParams as APIKeyListParams, };
|
|
110
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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.APIKeys = 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 APIKeys extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create a new API key. The full key is returned only once in the response — store
|
|
11
|
+
* it securely.
|
|
12
|
+
*/
|
|
13
|
+
create(body, options) {
|
|
14
|
+
return this._client.post('/v1/api-keys', { body, ...options });
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* List API keys
|
|
18
|
+
*/
|
|
19
|
+
list(query = {}, options) {
|
|
20
|
+
return this._client.get('/v1/api-keys', { query, ...options });
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Delete an API key
|
|
24
|
+
*/
|
|
25
|
+
delete(id, options) {
|
|
26
|
+
return this._client.delete((0, path_1.path) `/v1/api-keys/${id}`, {
|
|
27
|
+
...options,
|
|
28
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.APIKeys = APIKeys;
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { APIResource } from '../../core/resource';
|
|
2
|
+
import * as TelegramAPI from './telegram';
|
|
3
|
+
import { Telegram, TelegramConnectDirectlyParams, TelegramConnectDirectlyResponse, TelegramInitiateConnectionResponse, TelegramPollConnectionStatusParams, TelegramPollConnectionStatusResponse } from './telegram';
|
|
4
|
+
import * as WhatsappAPI from './whatsapp';
|
|
5
|
+
import { Whatsapp, WhatsappCompleteEmbeddedSignupParams, WhatsappCompleteEmbeddedSignupResponse, WhatsappConnectViaCredentialsParams, WhatsappConnectViaCredentialsResponse, WhatsappGetSDKConfigResponse } from './whatsapp';
|
|
6
|
+
import * as FacebookAPI from './facebook/facebook';
|
|
7
|
+
import { Facebook } from './facebook/facebook';
|
|
8
|
+
import * as GooglebusinessAPI from './googlebusiness/googlebusiness';
|
|
9
|
+
import { Googlebusiness } from './googlebusiness/googlebusiness';
|
|
10
|
+
import * as LinkedinAPI from './linkedin/linkedin';
|
|
11
|
+
import { Linkedin } from './linkedin/linkedin';
|
|
12
|
+
import * as PinterestAPI from './pinterest/pinterest';
|
|
13
|
+
import { Pinterest } from './pinterest/pinterest';
|
|
14
|
+
import * as SnapchatAPI from './snapchat/snapchat';
|
|
15
|
+
import { Snapchat } from './snapchat/snapchat';
|
|
16
|
+
import { APIPromise } from '../../core/api-promise';
|
|
17
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
18
|
+
export declare class Connect extends APIResource {
|
|
19
|
+
telegram: TelegramAPI.Telegram;
|
|
20
|
+
whatsapp: WhatsappAPI.Whatsapp;
|
|
21
|
+
facebook: FacebookAPI.Facebook;
|
|
22
|
+
linkedin: LinkedinAPI.Linkedin;
|
|
23
|
+
pinterest: PinterestAPI.Pinterest;
|
|
24
|
+
googlebusiness: GooglebusinessAPI.Googlebusiness;
|
|
25
|
+
snapchat: SnapchatAPI.Snapchat;
|
|
26
|
+
/**
|
|
27
|
+
* Exchange OAuth code for tokens and save the account.
|
|
28
|
+
*/
|
|
29
|
+
completeOAuthCallback(platform: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'threads' | 'snapchat' | 'googlebusiness' | 'mastodon', body: ConnectCompleteOAuthCallbackParams, options?: RequestOptions): APIPromise<ConnectCompleteOAuthCallbackResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Connect Bluesky via app password
|
|
32
|
+
*/
|
|
33
|
+
createBlueskyConnection(body: ConnectCreateBlueskyConnectionParams, options?: RequestOptions): APIPromise<ConnectCreateBlueskyConnectionResponse>;
|
|
34
|
+
/**
|
|
35
|
+
* One-time use, expires after 10 minutes. For headless OAuth flows.
|
|
36
|
+
*/
|
|
37
|
+
fetchPendingData(query: ConnectFetchPendingDataParams, options?: RequestOptions): APIPromise<ConnectFetchPendingDataResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Returns an auth_url to redirect the user for OAuth authorization.
|
|
40
|
+
*/
|
|
41
|
+
startOAuthFlow(platform: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'threads' | 'snapchat' | 'googlebusiness' | 'mastodon', query?: ConnectStartOAuthFlowParams | null | undefined, options?: RequestOptions): APIPromise<ConnectStartOAuthFlowResponse>;
|
|
42
|
+
}
|
|
43
|
+
export interface ConnectCompleteOAuthCallbackResponse {
|
|
44
|
+
account: ConnectCompleteOAuthCallbackResponse.Account;
|
|
45
|
+
}
|
|
46
|
+
export declare namespace ConnectCompleteOAuthCallbackResponse {
|
|
47
|
+
interface Account {
|
|
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
|
+
platform: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
|
|
59
|
+
platform_account_id: string;
|
|
60
|
+
updated_at: string;
|
|
61
|
+
username: string | null;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export interface ConnectCreateBlueskyConnectionResponse {
|
|
65
|
+
account: ConnectCreateBlueskyConnectionResponse.Account;
|
|
66
|
+
}
|
|
67
|
+
export declare namespace ConnectCreateBlueskyConnectionResponse {
|
|
68
|
+
interface Account {
|
|
69
|
+
/**
|
|
70
|
+
* Account ID
|
|
71
|
+
*/
|
|
72
|
+
id: string;
|
|
73
|
+
avatar_url: string | null;
|
|
74
|
+
connected_at: string;
|
|
75
|
+
display_name: string | null;
|
|
76
|
+
metadata: {
|
|
77
|
+
[key: string]: unknown;
|
|
78
|
+
} | null;
|
|
79
|
+
platform: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
|
|
80
|
+
platform_account_id: string;
|
|
81
|
+
updated_at: string;
|
|
82
|
+
username: string | null;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
export interface ConnectFetchPendingDataResponse {
|
|
86
|
+
platform: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
|
|
87
|
+
/**
|
|
88
|
+
* Token to use for secondary selection
|
|
89
|
+
*/
|
|
90
|
+
temp_token: string;
|
|
91
|
+
/**
|
|
92
|
+
* Basic user profile from the platform
|
|
93
|
+
*/
|
|
94
|
+
user_profile: ConnectFetchPendingDataResponse.UserProfile;
|
|
95
|
+
/**
|
|
96
|
+
* Pinterest boards available
|
|
97
|
+
*/
|
|
98
|
+
boards?: Array<{
|
|
99
|
+
[key: string]: unknown;
|
|
100
|
+
}>;
|
|
101
|
+
/**
|
|
102
|
+
* Google Business locations available
|
|
103
|
+
*/
|
|
104
|
+
locations?: Array<{
|
|
105
|
+
[key: string]: unknown;
|
|
106
|
+
}>;
|
|
107
|
+
/**
|
|
108
|
+
* LinkedIn organizations available
|
|
109
|
+
*/
|
|
110
|
+
organizations?: Array<{
|
|
111
|
+
[key: string]: unknown;
|
|
112
|
+
}>;
|
|
113
|
+
/**
|
|
114
|
+
* Facebook pages available
|
|
115
|
+
*/
|
|
116
|
+
pages?: Array<{
|
|
117
|
+
[key: string]: unknown;
|
|
118
|
+
}>;
|
|
119
|
+
/**
|
|
120
|
+
* Snapchat profiles available
|
|
121
|
+
*/
|
|
122
|
+
profiles?: Array<{
|
|
123
|
+
[key: string]: unknown;
|
|
124
|
+
}>;
|
|
125
|
+
}
|
|
126
|
+
export declare namespace ConnectFetchPendingDataResponse {
|
|
127
|
+
/**
|
|
128
|
+
* Basic user profile from the platform
|
|
129
|
+
*/
|
|
130
|
+
interface UserProfile {
|
|
131
|
+
id: string;
|
|
132
|
+
avatar_url: string | null;
|
|
133
|
+
name: string | null;
|
|
134
|
+
username: string | null;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
export interface ConnectStartOAuthFlowResponse {
|
|
138
|
+
/**
|
|
139
|
+
* URL to redirect the user for OAuth authorization
|
|
140
|
+
*/
|
|
141
|
+
auth_url: string;
|
|
142
|
+
}
|
|
143
|
+
export interface ConnectCompleteOAuthCallbackParams {
|
|
144
|
+
/**
|
|
145
|
+
* OAuth authorization code
|
|
146
|
+
*/
|
|
147
|
+
code: string;
|
|
148
|
+
/**
|
|
149
|
+
* Redirect URL used during the OAuth flow (must match)
|
|
150
|
+
*/
|
|
151
|
+
redirect_url?: string;
|
|
152
|
+
}
|
|
153
|
+
export interface ConnectCreateBlueskyConnectionParams {
|
|
154
|
+
/**
|
|
155
|
+
* Bluesky app password
|
|
156
|
+
*/
|
|
157
|
+
app_password: string;
|
|
158
|
+
/**
|
|
159
|
+
* Bluesky handle (e.g. user.bsky.social)
|
|
160
|
+
*/
|
|
161
|
+
handle: string;
|
|
162
|
+
}
|
|
163
|
+
export interface ConnectFetchPendingDataParams {
|
|
164
|
+
/**
|
|
165
|
+
* Temporary token from headless OAuth flow
|
|
166
|
+
*/
|
|
167
|
+
token: string;
|
|
168
|
+
}
|
|
169
|
+
export interface ConnectStartOAuthFlowParams {
|
|
170
|
+
/**
|
|
171
|
+
* Set to "true" for headless mode (returns data instead of redirecting)
|
|
172
|
+
*/
|
|
173
|
+
headless?: string;
|
|
174
|
+
/**
|
|
175
|
+
* URL to redirect after OAuth completes
|
|
176
|
+
*/
|
|
177
|
+
redirect_url?: string;
|
|
178
|
+
}
|
|
179
|
+
export declare namespace Connect {
|
|
180
|
+
export { type ConnectCompleteOAuthCallbackResponse as ConnectCompleteOAuthCallbackResponse, type ConnectCreateBlueskyConnectionResponse as ConnectCreateBlueskyConnectionResponse, type ConnectFetchPendingDataResponse as ConnectFetchPendingDataResponse, type ConnectStartOAuthFlowResponse as ConnectStartOAuthFlowResponse, type ConnectCompleteOAuthCallbackParams as ConnectCompleteOAuthCallbackParams, type ConnectCreateBlueskyConnectionParams as ConnectCreateBlueskyConnectionParams, type ConnectFetchPendingDataParams as ConnectFetchPendingDataParams, type ConnectStartOAuthFlowParams as ConnectStartOAuthFlowParams, };
|
|
181
|
+
export { Telegram as Telegram, type TelegramConnectDirectlyResponse as TelegramConnectDirectlyResponse, type TelegramInitiateConnectionResponse as TelegramInitiateConnectionResponse, type TelegramPollConnectionStatusResponse as TelegramPollConnectionStatusResponse, type TelegramConnectDirectlyParams as TelegramConnectDirectlyParams, type TelegramPollConnectionStatusParams as TelegramPollConnectionStatusParams, };
|
|
182
|
+
export { Whatsapp as Whatsapp, type WhatsappCompleteEmbeddedSignupResponse as WhatsappCompleteEmbeddedSignupResponse, type WhatsappConnectViaCredentialsResponse as WhatsappConnectViaCredentialsResponse, type WhatsappGetSDKConfigResponse as WhatsappGetSDKConfigResponse, type WhatsappCompleteEmbeddedSignupParams as WhatsappCompleteEmbeddedSignupParams, type WhatsappConnectViaCredentialsParams as WhatsappConnectViaCredentialsParams, };
|
|
183
|
+
export { Facebook as Facebook };
|
|
184
|
+
export { Linkedin as Linkedin };
|
|
185
|
+
export { Pinterest as Pinterest };
|
|
186
|
+
export { Googlebusiness as Googlebusiness };
|
|
187
|
+
export { Snapchat as Snapchat };
|
|
188
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
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.Connect = void 0;
|
|
38
|
+
const resource_1 = require("../../core/resource");
|
|
39
|
+
const TelegramAPI = __importStar(require("./telegram"));
|
|
40
|
+
const telegram_1 = require("./telegram");
|
|
41
|
+
const WhatsappAPI = __importStar(require("./whatsapp"));
|
|
42
|
+
const whatsapp_1 = require("./whatsapp");
|
|
43
|
+
const FacebookAPI = __importStar(require("./facebook/facebook"));
|
|
44
|
+
const facebook_1 = require("./facebook/facebook");
|
|
45
|
+
const GooglebusinessAPI = __importStar(require("./googlebusiness/googlebusiness"));
|
|
46
|
+
const googlebusiness_1 = require("./googlebusiness/googlebusiness");
|
|
47
|
+
const LinkedinAPI = __importStar(require("./linkedin/linkedin"));
|
|
48
|
+
const linkedin_1 = require("./linkedin/linkedin");
|
|
49
|
+
const PinterestAPI = __importStar(require("./pinterest/pinterest"));
|
|
50
|
+
const pinterest_1 = require("./pinterest/pinterest");
|
|
51
|
+
const SnapchatAPI = __importStar(require("./snapchat/snapchat"));
|
|
52
|
+
const snapchat_1 = require("./snapchat/snapchat");
|
|
53
|
+
const path_1 = require("../../internal/utils/path");
|
|
54
|
+
class Connect extends resource_1.APIResource {
|
|
55
|
+
constructor() {
|
|
56
|
+
super(...arguments);
|
|
57
|
+
this.telegram = new TelegramAPI.Telegram(this._client);
|
|
58
|
+
this.whatsapp = new WhatsappAPI.Whatsapp(this._client);
|
|
59
|
+
this.facebook = new FacebookAPI.Facebook(this._client);
|
|
60
|
+
this.linkedin = new LinkedinAPI.Linkedin(this._client);
|
|
61
|
+
this.pinterest = new PinterestAPI.Pinterest(this._client);
|
|
62
|
+
this.googlebusiness = new GooglebusinessAPI.Googlebusiness(this._client);
|
|
63
|
+
this.snapchat = new SnapchatAPI.Snapchat(this._client);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Exchange OAuth code for tokens and save the account.
|
|
67
|
+
*/
|
|
68
|
+
completeOAuthCallback(platform, body, options) {
|
|
69
|
+
return this._client.post((0, path_1.path) `/v1/connect/${platform}`, { body, ...options });
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Connect Bluesky via app password
|
|
73
|
+
*/
|
|
74
|
+
createBlueskyConnection(body, options) {
|
|
75
|
+
return this._client.post('/v1/connect/bluesky', { body, ...options });
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* One-time use, expires after 10 minutes. For headless OAuth flows.
|
|
79
|
+
*/
|
|
80
|
+
fetchPendingData(query, options) {
|
|
81
|
+
return this._client.get('/v1/connect/pending-data', { query, ...options });
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Returns an auth_url to redirect the user for OAuth authorization.
|
|
85
|
+
*/
|
|
86
|
+
startOAuthFlow(platform, query = {}, options) {
|
|
87
|
+
return this._client.get((0, path_1.path) `/v1/connect/${platform}`, { query, ...options });
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
exports.Connect = Connect;
|
|
91
|
+
Connect.Telegram = telegram_1.Telegram;
|
|
92
|
+
Connect.Whatsapp = whatsapp_1.Whatsapp;
|
|
93
|
+
Connect.Facebook = facebook_1.Facebook;
|
|
94
|
+
Connect.Linkedin = linkedin_1.Linkedin;
|
|
95
|
+
Connect.Pinterest = pinterest_1.Pinterest;
|
|
96
|
+
Connect.Googlebusiness = googlebusiness_1.Googlebusiness;
|
|
97
|
+
Connect.Snapchat = snapchat_1.Snapchat;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { APIResource } from '../../../core/resource';
|
|
2
|
+
import * as PagesAPI from './pages';
|
|
3
|
+
import { PageListResponse, PageSelectParams, PageSelectResponse, Pages } from './pages';
|
|
4
|
+
export declare class Facebook extends APIResource {
|
|
5
|
+
pages: PagesAPI.Pages;
|
|
6
|
+
}
|
|
7
|
+
export declare namespace Facebook {
|
|
8
|
+
export { Pages as Pages, type PageListResponse as PageListResponse, type PageSelectResponse as PageSelectResponse, type PageSelectParams as PageSelectParams, };
|
|
9
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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.Facebook = void 0;
|
|
38
|
+
const resource_1 = require("../../../core/resource");
|
|
39
|
+
const PagesAPI = __importStar(require("./pages"));
|
|
40
|
+
const pages_1 = require("./pages");
|
|
41
|
+
class Facebook extends resource_1.APIResource {
|
|
42
|
+
constructor() {
|
|
43
|
+
super(...arguments);
|
|
44
|
+
this.pages = new PagesAPI.Pages(this._client);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.Facebook = Facebook;
|
|
48
|
+
Facebook.Pages = pages_1.Pages;
|
|
@@ -0,0 +1,8 @@
|
|
|
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.Pages = exports.Facebook = void 0;
|
|
5
|
+
var facebook_1 = require("./facebook");
|
|
6
|
+
Object.defineProperty(exports, "Facebook", { enumerable: true, get: function () { return facebook_1.Facebook; } });
|
|
7
|
+
var pages_1 = require("./pages");
|
|
8
|
+
Object.defineProperty(exports, "Pages", { enumerable: true, get: function () { return pages_1.Pages; } });
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { APIResource } from '../../../core/resource';
|
|
2
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
3
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
4
|
+
export declare class Pages extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* List Facebook Pages after OAuth
|
|
7
|
+
*/
|
|
8
|
+
list(options?: RequestOptions): APIPromise<PageListResponse>;
|
|
9
|
+
/**
|
|
10
|
+
* Select Facebook Page to connect
|
|
11
|
+
*/
|
|
12
|
+
select(body: PageSelectParams, options?: RequestOptions): APIPromise<PageSelectResponse>;
|
|
13
|
+
}
|
|
14
|
+
export interface PageListResponse {
|
|
15
|
+
pages: Array<PageListResponse.Page>;
|
|
16
|
+
}
|
|
17
|
+
export declare namespace PageListResponse {
|
|
18
|
+
interface Page {
|
|
19
|
+
/**
|
|
20
|
+
* Facebook page ID
|
|
21
|
+
*/
|
|
22
|
+
id: string;
|
|
23
|
+
/**
|
|
24
|
+
* Page name
|
|
25
|
+
*/
|
|
26
|
+
name: string;
|
|
27
|
+
/**
|
|
28
|
+
* Page category
|
|
29
|
+
*/
|
|
30
|
+
category?: string | null;
|
|
31
|
+
/**
|
|
32
|
+
* Page profile picture URL
|
|
33
|
+
*/
|
|
34
|
+
picture_url?: string | null;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export interface PageSelectResponse {
|
|
38
|
+
account: PageSelectResponse.Account;
|
|
39
|
+
}
|
|
40
|
+
export declare namespace PageSelectResponse {
|
|
41
|
+
interface Account {
|
|
42
|
+
/**
|
|
43
|
+
* Account ID
|
|
44
|
+
*/
|
|
45
|
+
id: string;
|
|
46
|
+
avatar_url: string | null;
|
|
47
|
+
connected_at: string;
|
|
48
|
+
display_name: string | null;
|
|
49
|
+
metadata: {
|
|
50
|
+
[key: string]: unknown;
|
|
51
|
+
} | null;
|
|
52
|
+
platform: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
|
|
53
|
+
platform_account_id: string;
|
|
54
|
+
updated_at: string;
|
|
55
|
+
username: string | null;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export interface PageSelectParams {
|
|
59
|
+
/**
|
|
60
|
+
* Token from pending data or OAuth flow
|
|
61
|
+
*/
|
|
62
|
+
connect_token: string;
|
|
63
|
+
/**
|
|
64
|
+
* Selected Facebook page ID
|
|
65
|
+
*/
|
|
66
|
+
page_id: string;
|
|
67
|
+
}
|
|
68
|
+
export declare namespace Pages {
|
|
69
|
+
export { type PageListResponse as PageListResponse, type PageSelectResponse as PageSelectResponse, type PageSelectParams as PageSelectParams, };
|
|
70
|
+
}
|
|
@@ -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.Pages = void 0;
|
|
5
|
+
const resource_1 = require("../../../core/resource");
|
|
6
|
+
class Pages extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* List Facebook Pages after OAuth
|
|
9
|
+
*/
|
|
10
|
+
list(options) {
|
|
11
|
+
return this._client.get('/v1/connect/facebook/pages', options);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Select Facebook Page to connect
|
|
15
|
+
*/
|
|
16
|
+
select(body, options) {
|
|
17
|
+
return this._client.post('/v1/connect/facebook/pages', { body, ...options });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.Pages = Pages;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './facebook/index';
|
|
@@ -0,0 +1,18 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
__exportStar(require("./facebook/index"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { APIResource } from '../../../core/resource';
|
|
2
|
+
import * as LocationsAPI from './locations';
|
|
3
|
+
import { LocationListResponse, LocationSelectParams, LocationSelectResponse, Locations } from './locations';
|
|
4
|
+
export declare class Googlebusiness extends APIResource {
|
|
5
|
+
locations: LocationsAPI.Locations;
|
|
6
|
+
}
|
|
7
|
+
export declare namespace Googlebusiness {
|
|
8
|
+
export { Locations as Locations, type LocationListResponse as LocationListResponse, type LocationSelectResponse as LocationSelectResponse, type LocationSelectParams as LocationSelectParams, };
|
|
9
|
+
}
|