shred-api-client 2.0.9 → 2.0.10-rc.1
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/index.d.mts +2596 -0
- package/dist/index.d.ts +2596 -15
- package/dist/index.js +1788 -40
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1747 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +6 -5
- package/dist/api/AppConfig.api.d.ts +0 -9
- package/dist/api/AppConfig.api.js +0 -42
- package/dist/api/Email.api.d.ts +0 -10
- package/dist/api/Email.api.js +0 -42
- package/dist/api/Goal.api.d.ts +0 -10
- package/dist/api/Goal.api.js +0 -42
- package/dist/api/Note.api.d.ts +0 -13
- package/dist/api/Note.api.js +0 -60
- package/dist/api/Notification.api.d.ts +0 -18
- package/dist/api/Notification.api.js +0 -80
- package/dist/api/Project.api.d.ts +0 -26
- package/dist/api/Project.api.js +0 -122
- package/dist/api/Prompt.api.d.ts +0 -14
- package/dist/api/Prompt.api.js +0 -41
- package/dist/api/Subscription.api.d.ts +0 -18
- package/dist/api/Subscription.api.js +0 -69
- package/dist/api/Tenant.api.d.ts +0 -14
- package/dist/api/Tenant.api.js +0 -47
- package/dist/api/Track.api.d.ts +0 -9
- package/dist/api/Track.api.js +0 -19
- package/dist/api/User.api.d.ts +0 -25
- package/dist/api/User.api.js +0 -98
- package/dist/model/Api.d.ts +0 -26
- package/dist/model/Api.js +0 -33
- package/dist/model/Context.d.ts +0 -5
- package/dist/model/Context.js +0 -2
- package/dist/model/Env.d.ts +0 -2
- package/dist/model/Env.js +0 -2
- package/dist/model/app-config/AppConfig.api.d.ts +0 -9
- package/dist/model/app-config/AppConfig.api.js +0 -9
- package/dist/model/app-config/index.d.ts +0 -1
- package/dist/model/app-config/index.js +0 -17
- package/dist/model/asset/Asset.schema.d.ts +0 -43
- package/dist/model/asset/Asset.schema.js +0 -19
- package/dist/model/asset/index.d.ts +0 -2
- package/dist/model/asset/index.js +0 -5
- package/dist/model/core/APIResponse.d.ts +0 -6
- package/dist/model/core/APIResponse.js +0 -2
- package/dist/model/core/Query.d.ts +0 -15
- package/dist/model/core/Query.js +0 -2
- package/dist/model/core/index.d.ts +0 -2
- package/dist/model/core/index.js +0 -18
- package/dist/model/email/Email.api.d.ts +0 -11
- package/dist/model/email/Email.api.js +0 -9
- package/dist/model/email/Email.schema.d.ts +0 -15
- package/dist/model/email/Email.schema.js +0 -9
- package/dist/model/email/index.d.ts +0 -3
- package/dist/model/email/index.js +0 -20
- package/dist/model/exceptions/ConflictException.d.ts +0 -4
- package/dist/model/exceptions/ConflictException.js +0 -13
- package/dist/model/exceptions/ForbiddenException.d.ts +0 -4
- package/dist/model/exceptions/ForbiddenException.js +0 -13
- package/dist/model/exceptions/InvalidArgumentException.d.ts +0 -4
- package/dist/model/exceptions/InvalidArgumentException.js +0 -13
- package/dist/model/exceptions/ResourceNotFoundException.d.ts +0 -4
- package/dist/model/exceptions/ResourceNotFoundException.js +0 -13
- package/dist/model/exceptions/ShredException.d.ts +0 -4
- package/dist/model/exceptions/ShredException.js +0 -10
- package/dist/model/exceptions/UnauthorizedException.d.ts +0 -4
- package/dist/model/exceptions/UnauthorizedException.js +0 -13
- package/dist/model/exceptions/index.d.ts +0 -16
- package/dist/model/exceptions/index.js +0 -20
- package/dist/model/goal/Goal.api.d.ts +0 -11
- package/dist/model/goal/Goal.api.js +0 -6
- package/dist/model/goal/Goal.schema.d.ts +0 -154
- package/dist/model/goal/Goal.schema.js +0 -26
- package/dist/model/goal/index.d.ts +0 -3
- package/dist/model/goal/index.js +0 -22
- package/dist/model/note/Note.api.d.ts +0 -26
- package/dist/model/note/Note.api.js +0 -21
- package/dist/model/note/Note.schema.d.ts +0 -141
- package/dist/model/note/Note.schema.js +0 -30
- package/dist/model/note/index.d.ts +0 -3
- package/dist/model/note/index.js +0 -21
- package/dist/model/notification/Notification.api.d.ts +0 -47
- package/dist/model/notification/Notification.api.js +0 -13
- package/dist/model/notification/Notification.schema.d.ts +0 -454
- package/dist/model/notification/Notification.schema.js +0 -111
- package/dist/model/notification/index.d.ts +0 -3
- package/dist/model/notification/index.js +0 -30
- package/dist/model/project/Project.api.d.ts +0 -83
- package/dist/model/project/Project.api.js +0 -26
- package/dist/model/project/Project.schema.d.ts +0 -209
- package/dist/model/project/Project.schema.js +0 -60
- package/dist/model/project/index.d.ts +0 -3
- package/dist/model/project/index.js +0 -24
- package/dist/model/prompt/Prompt.api.d.ts +0 -31
- package/dist/model/prompt/Prompt.api.js +0 -25
- package/dist/model/prompt/Prompt.schema.d.ts +0 -165
- package/dist/model/prompt/Prompt.schema.js +0 -24
- package/dist/model/prompt/index.d.ts +0 -3
- package/dist/model/prompt/index.js +0 -22
- package/dist/model/subscription/Subscription.api.d.ts +0 -59
- package/dist/model/subscription/Subscription.api.js +0 -49
- package/dist/model/subscription/Subscription.schema.d.ts +0 -314
- package/dist/model/subscription/Subscription.schema.js +0 -53
- package/dist/model/subscription/index.d.ts +0 -3
- package/dist/model/subscription/index.js +0 -25
- package/dist/model/tenant/Tenant.api.d.ts +0 -35
- package/dist/model/tenant/Tenant.api.js +0 -29
- package/dist/model/tenant/Tenant.schema.d.ts +0 -342
- package/dist/model/tenant/Tenant.schema.js +0 -29
- package/dist/model/tenant/index.d.ts +0 -3
- package/dist/model/tenant/index.js +0 -21
- package/dist/model/track/Track.api.d.ts +0 -10
- package/dist/model/track/Track.api.js +0 -9
- package/dist/model/track/Track.schema.d.ts +0 -44
- package/dist/model/track/Track.schema.js +0 -14
- package/dist/model/track/index.d.ts +0 -3
- package/dist/model/track/index.js +0 -21
- package/dist/model/user/User.api.d.ts +0 -86
- package/dist/model/user/User.api.js +0 -21
- package/dist/model/user/User.schema.d.ts +0 -117
- package/dist/model/user/User.schema.js +0 -42
- package/dist/model/user/index.d.ts +0 -3
- package/dist/model/user/index.js +0 -23
- package/dist/util/HTTPClient.d.ts +0 -5
- package/dist/util/HTTPClient.js +0 -71
- package/dist/util/parseQuery.d.ts +0 -2
- package/dist/util/parseQuery.js +0 -25
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare enum Role {
|
|
3
|
-
USER = "User",
|
|
4
|
-
EDITOR = "Editor",
|
|
5
|
-
QA = "QA",
|
|
6
|
-
ADMIN = "ADMIN",
|
|
7
|
-
SYSTEM = "SYSTEM"
|
|
8
|
-
}
|
|
9
|
-
export declare enum System {
|
|
10
|
-
APP = "APP",
|
|
11
|
-
EDITOR = "EDITOR",
|
|
12
|
-
QA = "QA",
|
|
13
|
-
ADMIN = "ADMIN"
|
|
14
|
-
}
|
|
15
|
-
export declare const PreferencesSchema: z.ZodObject<{
|
|
16
|
-
primaryColor: z.ZodOptional<z.ZodString>;
|
|
17
|
-
secondaryColor: z.ZodOptional<z.ZodString>;
|
|
18
|
-
facebookLink: z.ZodOptional<z.ZodString>;
|
|
19
|
-
instagramLink: z.ZodOptional<z.ZodString>;
|
|
20
|
-
bRoll: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
-
logo: z.ZodOptional<z.ZodString>;
|
|
22
|
-
}, "strip", z.ZodTypeAny, {
|
|
23
|
-
primaryColor?: string | undefined;
|
|
24
|
-
secondaryColor?: string | undefined;
|
|
25
|
-
facebookLink?: string | undefined;
|
|
26
|
-
instagramLink?: string | undefined;
|
|
27
|
-
bRoll?: boolean | undefined;
|
|
28
|
-
logo?: string | undefined;
|
|
29
|
-
}, {
|
|
30
|
-
primaryColor?: string | undefined;
|
|
31
|
-
secondaryColor?: string | undefined;
|
|
32
|
-
facebookLink?: string | undefined;
|
|
33
|
-
instagramLink?: string | undefined;
|
|
34
|
-
bRoll?: boolean | undefined;
|
|
35
|
-
logo?: string | undefined;
|
|
36
|
-
}>;
|
|
37
|
-
export declare const UserSchema: z.ZodObject<{
|
|
38
|
-
id: z.ZodString;
|
|
39
|
-
name: z.ZodString;
|
|
40
|
-
email: z.ZodString;
|
|
41
|
-
fcmToken: z.ZodOptional<z.ZodString>;
|
|
42
|
-
profession: z.ZodOptional<z.ZodString>;
|
|
43
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
44
|
-
preferences: z.ZodOptional<z.ZodObject<{
|
|
45
|
-
primaryColor: z.ZodOptional<z.ZodString>;
|
|
46
|
-
secondaryColor: z.ZodOptional<z.ZodString>;
|
|
47
|
-
facebookLink: z.ZodOptional<z.ZodString>;
|
|
48
|
-
instagramLink: z.ZodOptional<z.ZodString>;
|
|
49
|
-
bRoll: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
-
logo: z.ZodOptional<z.ZodString>;
|
|
51
|
-
}, "strip", z.ZodTypeAny, {
|
|
52
|
-
primaryColor?: string | undefined;
|
|
53
|
-
secondaryColor?: string | undefined;
|
|
54
|
-
facebookLink?: string | undefined;
|
|
55
|
-
instagramLink?: string | undefined;
|
|
56
|
-
bRoll?: boolean | undefined;
|
|
57
|
-
logo?: string | undefined;
|
|
58
|
-
}, {
|
|
59
|
-
primaryColor?: string | undefined;
|
|
60
|
-
secondaryColor?: string | undefined;
|
|
61
|
-
facebookLink?: string | undefined;
|
|
62
|
-
instagramLink?: string | undefined;
|
|
63
|
-
bRoll?: boolean | undefined;
|
|
64
|
-
logo?: string | undefined;
|
|
65
|
-
}>>;
|
|
66
|
-
tenantId: z.ZodOptional<z.ZodString>;
|
|
67
|
-
editorId: z.ZodOptional<z.ZodString>;
|
|
68
|
-
timezone: z.ZodOptional<z.ZodString>;
|
|
69
|
-
experienceId: z.ZodOptional<z.ZodString>;
|
|
70
|
-
customerId: z.ZodString;
|
|
71
|
-
role: z.ZodNativeEnum<typeof Role>;
|
|
72
|
-
}, "strip", z.ZodTypeAny, {
|
|
73
|
-
email: string;
|
|
74
|
-
id: string;
|
|
75
|
-
name: string;
|
|
76
|
-
customerId: string;
|
|
77
|
-
role: Role;
|
|
78
|
-
timezone?: string | undefined;
|
|
79
|
-
tenantId?: string | undefined;
|
|
80
|
-
preferences?: {
|
|
81
|
-
primaryColor?: string | undefined;
|
|
82
|
-
secondaryColor?: string | undefined;
|
|
83
|
-
facebookLink?: string | undefined;
|
|
84
|
-
instagramLink?: string | undefined;
|
|
85
|
-
bRoll?: boolean | undefined;
|
|
86
|
-
logo?: string | undefined;
|
|
87
|
-
} | undefined;
|
|
88
|
-
fcmToken?: string | undefined;
|
|
89
|
-
profession?: string | undefined;
|
|
90
|
-
photoUrl?: string | undefined;
|
|
91
|
-
editorId?: string | undefined;
|
|
92
|
-
experienceId?: string | undefined;
|
|
93
|
-
}, {
|
|
94
|
-
email: string;
|
|
95
|
-
id: string;
|
|
96
|
-
name: string;
|
|
97
|
-
customerId: string;
|
|
98
|
-
role: Role;
|
|
99
|
-
timezone?: string | undefined;
|
|
100
|
-
tenantId?: string | undefined;
|
|
101
|
-
preferences?: {
|
|
102
|
-
primaryColor?: string | undefined;
|
|
103
|
-
secondaryColor?: string | undefined;
|
|
104
|
-
facebookLink?: string | undefined;
|
|
105
|
-
instagramLink?: string | undefined;
|
|
106
|
-
bRoll?: boolean | undefined;
|
|
107
|
-
logo?: string | undefined;
|
|
108
|
-
} | undefined;
|
|
109
|
-
fcmToken?: string | undefined;
|
|
110
|
-
profession?: string | undefined;
|
|
111
|
-
photoUrl?: string | undefined;
|
|
112
|
-
editorId?: string | undefined;
|
|
113
|
-
experienceId?: string | undefined;
|
|
114
|
-
}>;
|
|
115
|
-
export type User = z.infer<typeof UserSchema>;
|
|
116
|
-
export type Preferences = z.infer<typeof PreferencesSchema>;
|
|
117
|
-
export type Update = Pick<User, "name" | "profession" | "preferences" | "photoUrl" | "fcmToken" | "timezone" | "experienceId">;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserSchema = exports.PreferencesSchema = exports.System = exports.Role = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
var Role;
|
|
6
|
-
(function (Role) {
|
|
7
|
-
Role["USER"] = "User";
|
|
8
|
-
Role["EDITOR"] = "Editor";
|
|
9
|
-
Role["QA"] = "QA";
|
|
10
|
-
Role["ADMIN"] = "ADMIN";
|
|
11
|
-
Role["SYSTEM"] = "SYSTEM";
|
|
12
|
-
})(Role || (exports.Role = Role = {}));
|
|
13
|
-
var System;
|
|
14
|
-
(function (System) {
|
|
15
|
-
System["APP"] = "APP";
|
|
16
|
-
System["EDITOR"] = "EDITOR";
|
|
17
|
-
System["QA"] = "QA";
|
|
18
|
-
System["ADMIN"] = "ADMIN";
|
|
19
|
-
})(System || (exports.System = System = {}));
|
|
20
|
-
exports.PreferencesSchema = zod_1.z.object({
|
|
21
|
-
primaryColor: zod_1.z.string().optional(),
|
|
22
|
-
secondaryColor: zod_1.z.string().optional(),
|
|
23
|
-
facebookLink: zod_1.z.string().optional(),
|
|
24
|
-
instagramLink: zod_1.z.string().optional(),
|
|
25
|
-
bRoll: zod_1.z.boolean().optional(),
|
|
26
|
-
logo: zod_1.z.string().optional(),
|
|
27
|
-
});
|
|
28
|
-
exports.UserSchema = zod_1.z.object({
|
|
29
|
-
id: zod_1.z.string(),
|
|
30
|
-
name: zod_1.z.string(),
|
|
31
|
-
email: zod_1.z.string().email(),
|
|
32
|
-
fcmToken: zod_1.z.string().optional(),
|
|
33
|
-
profession: zod_1.z.string().optional(),
|
|
34
|
-
photoUrl: zod_1.z.string().optional(),
|
|
35
|
-
preferences: exports.PreferencesSchema.optional(),
|
|
36
|
-
tenantId: zod_1.z.string().optional(),
|
|
37
|
-
editorId: zod_1.z.string().optional(),
|
|
38
|
-
timezone: zod_1.z.string().optional(),
|
|
39
|
-
experienceId: zod_1.z.string().optional(),
|
|
40
|
-
customerId: zod_1.z.string(),
|
|
41
|
-
role: zod_1.z.nativeEnum(Role),
|
|
42
|
-
});
|
package/dist/model/user/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.System = exports.Role = exports.PreferencesSchema = exports.UserSchema = void 0;
|
|
18
|
-
var User_schema_1 = require("./User.schema");
|
|
19
|
-
Object.defineProperty(exports, "UserSchema", { enumerable: true, get: function () { return User_schema_1.UserSchema; } });
|
|
20
|
-
Object.defineProperty(exports, "PreferencesSchema", { enumerable: true, get: function () { return User_schema_1.PreferencesSchema; } });
|
|
21
|
-
Object.defineProperty(exports, "Role", { enumerable: true, get: function () { return User_schema_1.Role; } });
|
|
22
|
-
Object.defineProperty(exports, "System", { enumerable: true, get: function () { return User_schema_1.System; } });
|
|
23
|
-
__exportStar(require("./User.api"), exports);
|
package/dist/util/HTTPClient.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const axios_1 = __importStar(require("axios"));
|
|
27
|
-
const HOSTS = {
|
|
28
|
-
prod: "https://api.shreditapp.com",
|
|
29
|
-
staging: "https://api.staging.shreditapp.com",
|
|
30
|
-
local: "https://api.staging.shreditapp.com",
|
|
31
|
-
};
|
|
32
|
-
const OLD_HOSTS = {
|
|
33
|
-
prod: "https://api.shredmedia.co",
|
|
34
|
-
staging: "https://api-staging.shredmedia.co",
|
|
35
|
-
local: "https://api-staging.shredmedia.co",
|
|
36
|
-
};
|
|
37
|
-
class HTTPClient {
|
|
38
|
-
async makeRequest(env, uri, method, data, context, useLegacyApi) {
|
|
39
|
-
var _a;
|
|
40
|
-
const hostDict = useLegacyApi ? OLD_HOSTS : HOSTS;
|
|
41
|
-
const host = hostDict[env] || hostDict.staging;
|
|
42
|
-
const config = {
|
|
43
|
-
method: method,
|
|
44
|
-
url: host + uri,
|
|
45
|
-
headers: {
|
|
46
|
-
Authorization: (context === null || context === void 0 ? void 0 : context.token) && `Bearer ${context.token}`,
|
|
47
|
-
"X-Request-ID": ((context === null || context === void 0 ? void 0 : context.requestId) && context.requestId) || "",
|
|
48
|
-
"Content-Type": useLegacyApi
|
|
49
|
-
? "application/x-www-form-urlencoded"
|
|
50
|
-
: "application/json",
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
if (method !== "GET" && data) {
|
|
54
|
-
config.data = data;
|
|
55
|
-
}
|
|
56
|
-
try {
|
|
57
|
-
const response = await (0, axios_1.default)(config);
|
|
58
|
-
return response.data;
|
|
59
|
-
}
|
|
60
|
-
catch (error) {
|
|
61
|
-
if ((0, axios_1.isAxiosError)(error)) {
|
|
62
|
-
const axiosError = error;
|
|
63
|
-
throw ((_a = axiosError.response) === null || _a === void 0 ? void 0 : _a.data) || axiosError;
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
throw error;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
exports.default = HTTPClient;
|
package/dist/util/parseQuery.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildQueryString = void 0;
|
|
4
|
-
const buildQueryString = (query) => {
|
|
5
|
-
const params = {};
|
|
6
|
-
if (query.perPage) {
|
|
7
|
-
params["perPage"] = [String(query.perPage)];
|
|
8
|
-
}
|
|
9
|
-
if (query.cursor !== undefined && query.cursor !== null) {
|
|
10
|
-
params["cursor"] = [String(query.cursor)];
|
|
11
|
-
}
|
|
12
|
-
if (query.orderBy) {
|
|
13
|
-
params["orderBy"] = [
|
|
14
|
-
`${String(query.orderBy.field)}:${query.orderBy.direction}`,
|
|
15
|
-
];
|
|
16
|
-
}
|
|
17
|
-
if (query.wheres && query.wheres.length > 0) {
|
|
18
|
-
params["wheres"] = query.wheres.map((w) => `${String(w.field)}:${String(w.operation)}:${String(w.value)}`);
|
|
19
|
-
}
|
|
20
|
-
const queryString = Object.entries(params)
|
|
21
|
-
.flatMap(([key, values]) => values.map((value) => `${key}=${encodeURIComponent(value)}`))
|
|
22
|
-
.join("&");
|
|
23
|
-
return queryString ? `?${queryString}` : "";
|
|
24
|
-
};
|
|
25
|
-
exports.buildQueryString = buildQueryString;
|