@use_socials/sdk 0.1.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.
@@ -0,0 +1,42 @@
1
+ /**
2
+ * use-socials API
3
+ * Social media publishing API as a service. Allows app builders to let their users post to YouTube, TikTok, Instagram, and Pinterest.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Configuration } from './configuration';
13
+ import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
+ export declare const BASE_PATH: string;
15
+ export declare const COLLECTION_FORMATS: {
16
+ csv: string;
17
+ ssv: string;
18
+ tsv: string;
19
+ pipes: string;
20
+ };
21
+ export interface RequestArgs {
22
+ url: string;
23
+ options: RawAxiosRequestConfig;
24
+ }
25
+ export declare class BaseAPI {
26
+ protected basePath: string;
27
+ protected axios: AxiosInstance;
28
+ protected configuration: Configuration | undefined;
29
+ constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
30
+ }
31
+ export declare class RequiredError extends Error {
32
+ field: string;
33
+ constructor(field: string, msg?: string);
34
+ }
35
+ interface ServerMap {
36
+ [key: string]: {
37
+ url: string;
38
+ description: string;
39
+ }[];
40
+ }
41
+ export declare const operationServerMap: ServerMap;
42
+ export {};
@@ -0,0 +1,41 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * use-socials API
5
+ * Social media publishing API as a service. Allows app builders to let their users post to YouTube, TikTok, Instagram, and Pinterest.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import globalAxios from 'axios';
15
+ export const BASE_PATH = "http://localhost:8080".replace(/\/+$/, "");
16
+ export const COLLECTION_FORMATS = {
17
+ csv: ",",
18
+ ssv: " ",
19
+ tsv: "\t",
20
+ pipes: "|",
21
+ };
22
+ export class BaseAPI {
23
+ constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
24
+ var _a;
25
+ this.basePath = basePath;
26
+ this.axios = axios;
27
+ if (configuration) {
28
+ this.configuration = configuration;
29
+ this.basePath = (_a = configuration.basePath) !== null && _a !== void 0 ? _a : basePath;
30
+ }
31
+ }
32
+ }
33
+ ;
34
+ export class RequiredError extends Error {
35
+ constructor(field, msg) {
36
+ super(msg);
37
+ this.field = field;
38
+ this.name = "RequiredError";
39
+ }
40
+ }
41
+ export const operationServerMap = {};
@@ -0,0 +1,196 @@
1
+ import type { AxiosInstance, RawAxiosRequestConfig } from "axios";
2
+ import { type HandlersPresignMediaRequest, type HandlersWaitlistResponse } from "./api";
3
+ export type UseSocialsPlatform = "youtube" | "tiktok" | "instagram" | "pinterest";
4
+ export type UseSocialsPostStatus = "PUBLISHING" | "PUBLISHED" | "FAILED";
5
+ export type UseSocialsPostTargetStatus = "PENDING" | "PUBLISHING" | "PUBLISHED" | "FAILED";
6
+ export type UseSocialsTaskStatus = "PENDING" | "PROCESSING" | "PUBLISHED" | "FAILED";
7
+ export type UseSocialsClientOptions = {
8
+ apiKey: string;
9
+ baseUrl?: string;
10
+ baseOptions?: RawAxiosRequestConfig;
11
+ axios?: AxiosInstance;
12
+ };
13
+ export type UseSocialsUser = {
14
+ userId: string;
15
+ externalId: string;
16
+ };
17
+ export type UseSocialsAccount = {
18
+ id: string;
19
+ platform: string;
20
+ platformAccountId: string;
21
+ platformUsername: string | null;
22
+ status: string;
23
+ createdAt: string;
24
+ };
25
+ export type UseSocialsOAuthCallback = {
26
+ status: "connected";
27
+ };
28
+ export type UseSocialsPost = {
29
+ id: string;
30
+ userId: string;
31
+ status: UseSocialsPostStatus;
32
+ title: string | null;
33
+ content: object;
34
+ mediaItems: UseSocialsPostMediaItem[];
35
+ targets: UseSocialsPostTarget[];
36
+ createdAt: string;
37
+ updatedAt: string;
38
+ };
39
+ export type UseSocialsPostTarget = {
40
+ id: string;
41
+ platform: string;
42
+ status: UseSocialsPostTargetStatus;
43
+ socialAccountId: string;
44
+ platformUsername: string | null;
45
+ platformPostId: string | null;
46
+ platformPostUrl: string | null;
47
+ error: string | null;
48
+ publishedAt: string | null;
49
+ retryCount: number;
50
+ };
51
+ export type UseSocialsPostMediaItem = {
52
+ id: string;
53
+ url: string;
54
+ type: string;
55
+ filename: string | null;
56
+ mimeType: string | null;
57
+ size: number;
58
+ };
59
+ export type UseSocialsRetryPostTargetResult = {
60
+ targetId: string;
61
+ status: string;
62
+ };
63
+ export type UseSocialsPostTask = {
64
+ id: string;
65
+ status: UseSocialsTaskStatus;
66
+ socialAccountId: string;
67
+ mediaUrl: string;
68
+ content: object;
69
+ platformPostId: string | null;
70
+ platformPostUrl: string | null;
71
+ error: string | null;
72
+ attempts: number;
73
+ maxAttempts: number;
74
+ createdAt: string;
75
+ updatedAt: string;
76
+ lastAttemptAt: string | null;
77
+ };
78
+ export type YouTubePostContent = {
79
+ title: string;
80
+ description?: string;
81
+ tags?: string[];
82
+ privacyStatus?: "public" | "private" | "unlisted";
83
+ thumbnailUrl?: string;
84
+ };
85
+ export type TikTokPostContent = {
86
+ title: string;
87
+ privacyLevel?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY";
88
+ disableDuet?: boolean;
89
+ disableComment?: boolean;
90
+ disableStitch?: boolean;
91
+ };
92
+ export type InstagramPostContent = {
93
+ caption?: string;
94
+ mediaType?: "REELS" | "IMAGE";
95
+ shareToFeed?: boolean;
96
+ };
97
+ export type PinterestPostContent = {
98
+ title?: string;
99
+ description?: string;
100
+ link?: string;
101
+ boardId?: string;
102
+ };
103
+ export type UseSocialsPostContent = YouTubePostContent | TikTokPostContent | InstagramPostContent | PinterestPostContent | Record<string, unknown>;
104
+ export type UseSocialsPresignedMedia = {
105
+ mediaId: string;
106
+ uploadUrl: string;
107
+ publicUrl: string;
108
+ key: string;
109
+ expiresAt: string;
110
+ contentType: string;
111
+ };
112
+ export type UseSocialsCompletedMedia = {
113
+ mediaId: string;
114
+ publicUrl: string;
115
+ contentType: string;
116
+ size: number;
117
+ status: string;
118
+ };
119
+ export declare class UseSocialsClient {
120
+ private readonly healthApi;
121
+ private readonly mediaApi;
122
+ private readonly oauthApi;
123
+ private readonly postsApi;
124
+ private readonly publishApi;
125
+ private readonly usersApi;
126
+ private readonly waitlistApi;
127
+ readonly health: {
128
+ get: () => Promise<Record<string, string>>;
129
+ };
130
+ readonly users: {
131
+ create: (args: {
132
+ externalId: string;
133
+ }) => Promise<UseSocialsUser>;
134
+ };
135
+ readonly accounts: {
136
+ list: (args: {
137
+ userId: string;
138
+ }) => Promise<UseSocialsAccount[]>;
139
+ disconnect: (args: {
140
+ userId: string;
141
+ accountId: string;
142
+ }) => Promise<void>;
143
+ };
144
+ readonly oauth: {
145
+ getUrl: (args: {
146
+ platform: UseSocialsPlatform;
147
+ userId: string;
148
+ redirectUrl?: string;
149
+ }) => Promise<string>;
150
+ callback: (args: {
151
+ platform: UseSocialsPlatform;
152
+ code: string;
153
+ state: string;
154
+ }) => Promise<UseSocialsOAuthCallback>;
155
+ };
156
+ readonly posts: {
157
+ create: (args: {
158
+ userId: string;
159
+ socialAccountId: string;
160
+ socialAccountIds?: string[];
161
+ mediaUrl: string;
162
+ content: UseSocialsPostContent;
163
+ idempotencyKey?: string;
164
+ }) => Promise<UseSocialsPost>;
165
+ list: (args: {
166
+ userId: string;
167
+ }) => Promise<UseSocialsPost[]>;
168
+ get: (args: {
169
+ userId: string;
170
+ postId: string;
171
+ }) => Promise<UseSocialsPost>;
172
+ retry: (args: {
173
+ userId: string;
174
+ postId: string;
175
+ targetId: string;
176
+ }) => Promise<UseSocialsRetryPostTargetResult>;
177
+ };
178
+ readonly postsTask: {
179
+ get: (args: {
180
+ jobId: string;
181
+ }) => Promise<UseSocialsPostTask>;
182
+ };
183
+ readonly media: {
184
+ presign: (args: HandlersPresignMediaRequest) => Promise<UseSocialsPresignedMedia>;
185
+ complete: (args: {
186
+ mediaId: string;
187
+ }) => Promise<UseSocialsCompletedMedia>;
188
+ };
189
+ readonly waitlist: {
190
+ join: (args: {
191
+ email: string;
192
+ }) => Promise<HandlersWaitlistResponse>;
193
+ };
194
+ constructor(options: UseSocialsClientOptions);
195
+ }
196
+ export declare function createUseSocialsClient(options: UseSocialsClientOptions): UseSocialsClient;
@@ -0,0 +1,270 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { HealthApi, MediaApi, OauthApi, PostsApi, PublishApi, UsersApi, WaitlistApi, } from "./api";
11
+ import { Configuration } from "./configuration";
12
+ const DEFAULT_BASE_URL = "https://api.usesocials.com";
13
+ function getRequiredString(value, field) {
14
+ if (!value)
15
+ throw new Error(`useSocials response missing ${field}`);
16
+ return value;
17
+ }
18
+ function getOptionalString(value) {
19
+ return value !== null && value !== void 0 ? value : null;
20
+ }
21
+ function getRequiredObject(value, field) {
22
+ if (value === undefined || value === null) {
23
+ throw new Error(`useSocials response missing ${field}`);
24
+ }
25
+ return value;
26
+ }
27
+ function getRequiredNumber(value, field) {
28
+ if (value === undefined || value === null) {
29
+ throw new Error(`useSocials response missing ${field}`);
30
+ }
31
+ return value;
32
+ }
33
+ function getPostStatus(value) {
34
+ switch (value) {
35
+ case "PUBLISHING":
36
+ case "PUBLISHED":
37
+ case "FAILED":
38
+ return value;
39
+ default:
40
+ throw new Error(`useSocials returned unknown post status: ${value !== null && value !== void 0 ? value : "undefined"}`);
41
+ }
42
+ }
43
+ function getPostTargetStatus(value) {
44
+ switch (value) {
45
+ case "PENDING":
46
+ case "PUBLISHING":
47
+ case "PUBLISHED":
48
+ case "FAILED":
49
+ return value;
50
+ default:
51
+ throw new Error(`useSocials returned unknown post target status: ${value !== null && value !== void 0 ? value : "undefined"}`);
52
+ }
53
+ }
54
+ function getTaskStatus(value) {
55
+ switch (value) {
56
+ case "PENDING":
57
+ case "PROCESSING":
58
+ case "PUBLISHED":
59
+ case "FAILED":
60
+ return value;
61
+ default:
62
+ throw new Error(`useSocials returned unknown task status: ${value !== null && value !== void 0 ? value : "undefined"}`);
63
+ }
64
+ }
65
+ function getOptionalObject(value) {
66
+ var _a;
67
+ return (_a = value) !== null && _a !== void 0 ? _a : {};
68
+ }
69
+ function mapOAuthCallback(data) {
70
+ const status = getRequiredString(data.status, "oauth.status");
71
+ if (status !== "connected") {
72
+ throw new Error(`useSocials returned unknown oauth status: ${status}`);
73
+ }
74
+ return { status: "connected" };
75
+ }
76
+ function mapAccount(data) {
77
+ return {
78
+ id: getRequiredString(data.id, "account.id"),
79
+ platform: getRequiredString(data.platform, "account.platform"),
80
+ platformAccountId: getRequiredString(data.platformAccountId, "account.platformAccountId"),
81
+ platformUsername: getOptionalString(data.platformUsername),
82
+ status: getRequiredString(data.status, "account.status"),
83
+ createdAt: getRequiredString(data.createdAt, "account.createdAt"),
84
+ };
85
+ }
86
+ function mapPost(data) {
87
+ var _a, _b;
88
+ return {
89
+ id: getRequiredString(data.id, "post.id"),
90
+ userId: getRequiredString(data.createdByUserId, "post.createdByUserId"),
91
+ status: getPostStatus(data.status),
92
+ title: getOptionalString(data.title),
93
+ content: getOptionalObject(data.content),
94
+ mediaItems: ((_a = data.mediaItems) !== null && _a !== void 0 ? _a : []).map(mapPostMediaItem),
95
+ targets: ((_b = data.targets) !== null && _b !== void 0 ? _b : []).map(mapPostTarget),
96
+ createdAt: getRequiredString(data.createdAt, "post.createdAt"),
97
+ updatedAt: getRequiredString(data.updatedAt, "post.updatedAt"),
98
+ };
99
+ }
100
+ function mapPostTask(data) {
101
+ var _a, _b;
102
+ return {
103
+ id: getRequiredString(data.id, "postTask.id"),
104
+ status: getTaskStatus(data.status),
105
+ socialAccountId: getRequiredString(data.socialAccountId, "postTask.socialAccountId"),
106
+ mediaUrl: getRequiredString(data.mediaUrl, "postTask.mediaUrl"),
107
+ content: getOptionalObject(data.content),
108
+ platformPostId: getOptionalString(data.platformPostId),
109
+ platformPostUrl: getOptionalString(data.platformPostUrl),
110
+ error: getOptionalString(data.error),
111
+ attempts: (_a = data.attempts) !== null && _a !== void 0 ? _a : 0,
112
+ maxAttempts: (_b = data.maxAttempts) !== null && _b !== void 0 ? _b : 0,
113
+ createdAt: getRequiredString(data.createdAt, "postTask.createdAt"),
114
+ updatedAt: getRequiredString(data.updatedAt, "postTask.updatedAt"),
115
+ lastAttemptAt: getOptionalString(data.lastAttemptAt),
116
+ };
117
+ }
118
+ function mapPostTarget(data) {
119
+ return {
120
+ id: getRequiredString(data.id, "postTarget.id"),
121
+ platform: getRequiredString(data.platform, "postTarget.platform"),
122
+ status: getPostTargetStatus(data.status),
123
+ socialAccountId: getRequiredString(data.socialAccountId, "postTarget.socialAccountId"),
124
+ platformUsername: getOptionalString(data.platformUsername),
125
+ platformPostId: getOptionalString(data.platformPostId),
126
+ platformPostUrl: getOptionalString(data.platformPostUrl),
127
+ error: getOptionalString(data.error),
128
+ publishedAt: getOptionalString(data.publishedAt),
129
+ retryCount: getRequiredNumber(data.retryCount, "postTarget.retryCount"),
130
+ };
131
+ }
132
+ function mapPostMediaItem(data) {
133
+ var _a;
134
+ return {
135
+ id: getRequiredString(data.id, "postMediaItem.id"),
136
+ url: getRequiredString(data.url, "postMediaItem.url"),
137
+ type: getRequiredString(data.type, "postMediaItem.type"),
138
+ filename: getOptionalString(data.filename),
139
+ mimeType: getOptionalString(data.mimeType),
140
+ size: (_a = data.sizeBytes) !== null && _a !== void 0 ? _a : 0,
141
+ };
142
+ }
143
+ function mapRetryPostTarget(data) {
144
+ return {
145
+ targetId: getRequiredString(data.targetId, "postTarget.targetId"),
146
+ status: getRequiredString(data.status, "postTarget.status"),
147
+ };
148
+ }
149
+ function mapUser(data) {
150
+ return {
151
+ userId: getRequiredString(data.userId, "user.userId"),
152
+ externalId: getRequiredString(data.externalId, "user.externalId"),
153
+ };
154
+ }
155
+ function mapPresignedMedia(data) {
156
+ return {
157
+ mediaId: getRequiredString(data.mediaId, "media.mediaId"),
158
+ uploadUrl: getRequiredString(data.uploadUrl, "media.uploadUrl"),
159
+ publicUrl: getRequiredString(data.publicUrl, "media.publicUrl"),
160
+ key: getRequiredString(data.key, "media.key"),
161
+ expiresAt: getRequiredString(data.expiresAt, "media.expiresAt"),
162
+ contentType: getRequiredString(data.contentType, "media.contentType"),
163
+ };
164
+ }
165
+ function mapCompletedMedia(data) {
166
+ return {
167
+ mediaId: getRequiredString(data.mediaId, "media.mediaId"),
168
+ publicUrl: getRequiredString(data.publicUrl, "media.publicUrl"),
169
+ contentType: getRequiredString(data.contentType, "media.contentType"),
170
+ size: getRequiredNumber(data.size, "media.size"),
171
+ status: getRequiredString(data.status, "media.status"),
172
+ };
173
+ }
174
+ export class UseSocialsClient {
175
+ constructor(options) {
176
+ var _a;
177
+ const configuration = new Configuration({
178
+ apiKey: options.apiKey,
179
+ basePath: (_a = options.baseUrl) !== null && _a !== void 0 ? _a : DEFAULT_BASE_URL,
180
+ baseOptions: options.baseOptions,
181
+ });
182
+ this.healthApi = new HealthApi(configuration, undefined, options.axios);
183
+ this.mediaApi = new MediaApi(configuration, undefined, options.axios);
184
+ this.oauthApi = new OauthApi(configuration, undefined, options.axios);
185
+ this.postsApi = new PostsApi(configuration, undefined, options.axios);
186
+ this.publishApi = new PublishApi(configuration, undefined, options.axios);
187
+ this.usersApi = new UsersApi(configuration, undefined, options.axios);
188
+ this.waitlistApi = new WaitlistApi(configuration, undefined, options.axios);
189
+ this.health = {
190
+ get: () => __awaiter(this, void 0, void 0, function* () {
191
+ const { data } = yield this.healthApi.healthGet();
192
+ return data;
193
+ }),
194
+ };
195
+ this.users = {
196
+ create: (_a) => __awaiter(this, [_a], void 0, function* ({ externalId }) {
197
+ const { data } = yield this.usersApi.apiV1UsersPost({ externalId });
198
+ return mapUser(data);
199
+ }),
200
+ };
201
+ this.accounts = {
202
+ list: (_a) => __awaiter(this, [_a], void 0, function* ({ userId }) {
203
+ const { data } = yield this.usersApi.apiV1UsersUserIdAccountsGet(userId);
204
+ return data.map(mapAccount);
205
+ }),
206
+ disconnect: (_a) => __awaiter(this, [_a], void 0, function* ({ userId, accountId }) {
207
+ yield this.usersApi.apiV1UsersUserIdAccountsAccountIdDelete(userId, accountId);
208
+ }),
209
+ };
210
+ this.oauth = {
211
+ getUrl: (_a) => __awaiter(this, [_a], void 0, function* ({ platform, userId, redirectUrl }) {
212
+ const { data } = yield this.oauthApi.apiV1OauthPlatformUrlGet(platform, userId, redirectUrl);
213
+ return getRequiredString(data.url, "oauth.url");
214
+ }),
215
+ callback: (_a) => __awaiter(this, [_a], void 0, function* ({ platform, code, state }) {
216
+ const { data } = yield this.oauthApi.apiV1OauthPlatformCallbackGet(platform, code, state);
217
+ return mapOAuthCallback(data);
218
+ }),
219
+ };
220
+ this.posts = {
221
+ create: (_a) => __awaiter(this, [_a], void 0, function* ({ userId, socialAccountId, socialAccountIds, mediaUrl, content, idempotencyKey, }) {
222
+ const body = {
223
+ socialAccountId,
224
+ socialAccountIds,
225
+ mediaUrl,
226
+ content,
227
+ };
228
+ const { data } = yield this.postsApi.apiV1UsersUserIdPostsPost(userId, body, idempotencyKey);
229
+ return mapPost(data);
230
+ }),
231
+ list: (_a) => __awaiter(this, [_a], void 0, function* ({ userId }) {
232
+ const { data } = yield this.postsApi.apiV1UsersUserIdPostsGet(userId);
233
+ return data.map(mapPost);
234
+ }),
235
+ get: (_a) => __awaiter(this, [_a], void 0, function* ({ userId, postId }) {
236
+ const { data } = yield this.postsApi.apiV1UsersUserIdPostsPostIdGet(userId, postId);
237
+ return mapPost(data);
238
+ }),
239
+ retry: (_a) => __awaiter(this, [_a], void 0, function* ({ userId, postId, targetId }) {
240
+ const { data } = yield this.postsApi.apiV1UsersUserIdPostsPostIdTargetsTargetIdRetryPost(userId, postId, targetId);
241
+ return mapRetryPostTarget(data);
242
+ }),
243
+ };
244
+ this.postsTask = {
245
+ get: (_a) => __awaiter(this, [_a], void 0, function* ({ jobId }) {
246
+ const { data } = yield this.publishApi.apiV1PublishJobsJobIdGet(jobId);
247
+ return mapPostTask(data);
248
+ }),
249
+ };
250
+ this.media = {
251
+ presign: (args) => __awaiter(this, void 0, void 0, function* () {
252
+ const { data } = yield this.mediaApi.apiV1MediaPresignPost(args);
253
+ return mapPresignedMedia(data);
254
+ }),
255
+ complete: (_a) => __awaiter(this, [_a], void 0, function* ({ mediaId }) {
256
+ const { data } = yield this.mediaApi.apiV1MediaMediaIdCompletePost(mediaId);
257
+ return mapCompletedMedia(data);
258
+ }),
259
+ };
260
+ this.waitlist = {
261
+ join: (_a) => __awaiter(this, [_a], void 0, function* ({ email }) {
262
+ const { data } = yield this.waitlistApi.waitlistPost({ email });
263
+ return data;
264
+ }),
265
+ };
266
+ }
267
+ }
268
+ export function createUseSocialsClient(options) {
269
+ return new UseSocialsClient(options);
270
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * use-socials API
3
+ * Social media publishing API as a service. Allows app builders to let their users post to YouTube, TikTok, Instagram, and Pinterest.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Configuration } from "./configuration";
13
+ import type { RequestArgs } from "./base";
14
+ import type { AxiosInstance, AxiosResponse } from 'axios';
15
+ export declare const DUMMY_BASE_URL = "https://example.com";
16
+ /**
17
+ *
18
+ * @throws {RequiredError}
19
+ */
20
+ export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
21
+ export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
22
+ export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
23
+ export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
24
+ export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
25
+ export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
26
+ /**
27
+ * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
28
+ * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
29
+ * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
30
+ */
31
+ export declare const replaceWithSerializableTypeIfNeeded: (key: string, value: any) => any;
32
+ export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
33
+ export declare const toPathString: (url: URL) => string;
34
+ export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;