@whop/cli 0.10.0 → 0.10.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.js +743 -45
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
external_exports
|
|
6
6
|
} from "./chunk-KFCNNWPI.js";
|
|
7
7
|
|
|
8
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
8
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/Cli.js
|
|
9
9
|
var Cli_exports = {};
|
|
10
10
|
__export(Cli_exports, {
|
|
11
11
|
collectSkillCommands: () => collectSkillCommands,
|
|
@@ -106,7 +106,7 @@ function extractSegmentPart(segment, segmentTokenStart, segmentTokenCount, targe
|
|
|
106
106
|
return segment.slice(charStart, charEnd);
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
109
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/internal/helpers.js
|
|
110
110
|
function isRecord(value) {
|
|
111
111
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
112
112
|
}
|
|
@@ -154,7 +154,7 @@ function suggest(input, candidates) {
|
|
|
154
154
|
return best;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
157
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/Completions.js
|
|
158
158
|
function register(shell, name) {
|
|
159
159
|
switch (shell) {
|
|
160
160
|
case "bash":
|
|
@@ -417,7 +417,7 @@ let _incur_complete_${id} = {|spans|
|
|
|
417
417
|
}`;
|
|
418
418
|
}
|
|
419
419
|
|
|
420
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
420
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/Errors.js
|
|
421
421
|
var BaseError = class extends Error {
|
|
422
422
|
name = "Incur.BaseError";
|
|
423
423
|
/** The short, human-readable error message (without details). */
|
|
@@ -491,7 +491,7 @@ function walk(error, fn) {
|
|
|
491
491
|
return current;
|
|
492
492
|
}
|
|
493
493
|
|
|
494
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
494
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/Fetch.js
|
|
495
495
|
var reservedFlags = /* @__PURE__ */ new Set(["method", "body", "data", "header"]);
|
|
496
496
|
var reservedShort = { X: "method", d: "data", H: "header" };
|
|
497
497
|
function parseArgv(argv2) {
|
|
@@ -627,7 +627,7 @@ async function parseResponse(response) {
|
|
|
627
627
|
};
|
|
628
628
|
}
|
|
629
629
|
|
|
630
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
630
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/Filter.js
|
|
631
631
|
function parse(expression) {
|
|
632
632
|
const paths = [];
|
|
633
633
|
const tokens = [];
|
|
@@ -1127,7 +1127,7 @@ function resolveOptions(options) {
|
|
|
1127
1127
|
};
|
|
1128
1128
|
}
|
|
1129
1129
|
|
|
1130
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
1130
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/internal/json.js
|
|
1131
1131
|
function stringify(value, space) {
|
|
1132
1132
|
return JSON.stringify(value, (_key, value2) => {
|
|
1133
1133
|
if (typeof value2 === "bigint")
|
|
@@ -1139,7 +1139,7 @@ function normalize(value) {
|
|
|
1139
1139
|
return JSON.parse(stringify(value));
|
|
1140
1140
|
}
|
|
1141
1141
|
|
|
1142
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
1142
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/internal/yaml.js
|
|
1143
1143
|
import { createRequire } from "module";
|
|
1144
1144
|
var cached;
|
|
1145
1145
|
async function load() {
|
|
@@ -1151,7 +1151,7 @@ function loadSync() {
|
|
|
1151
1151
|
return cached;
|
|
1152
1152
|
}
|
|
1153
1153
|
|
|
1154
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
1154
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/Formatter.js
|
|
1155
1155
|
function format2(value, fmt = "toon") {
|
|
1156
1156
|
if (value == null)
|
|
1157
1157
|
return "";
|
|
@@ -1259,7 +1259,7 @@ ${String(val)}`;
|
|
|
1259
1259
|
return kvTable(obj);
|
|
1260
1260
|
}
|
|
1261
1261
|
|
|
1262
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
1262
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/Parser.js
|
|
1263
1263
|
function parse2(argv2, options = {}) {
|
|
1264
1264
|
const { args: argsSchema, options: optionsSchema, alias, defaults } = options;
|
|
1265
1265
|
const optionNames = createOptionNames(optionsSchema, alias);
|
|
@@ -1676,7 +1676,7 @@ function defaultEnvSource() {
|
|
|
1676
1676
|
return {};
|
|
1677
1677
|
}
|
|
1678
1678
|
|
|
1679
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
1679
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/internal/command.js
|
|
1680
1680
|
var sentinel = Symbol.for("incur.sentinel");
|
|
1681
1681
|
async function execute(command, options) {
|
|
1682
1682
|
const { argv: argv2, inputOptions: inputOptions2, agent, format: format3, formatExplicit, name, path: path8, version, envSource = process.env, env: envSchema, globals = {}, vars: varsSchema, middlewares = [], request: request2 } = options;
|
|
@@ -1925,7 +1925,7 @@ function findBuiltinSubcommand(builtin, token) {
|
|
|
1925
1925
|
return builtin.subcommands?.find((sub) => sub.name === token || sub.aliases?.includes(token));
|
|
1926
1926
|
}
|
|
1927
1927
|
|
|
1928
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
1928
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/Help.js
|
|
1929
1929
|
function formatRoot(name, options = {}) {
|
|
1930
1930
|
const { aliases, configFlag, description, globals, version, commands = [], root = false } = options;
|
|
1931
1931
|
const lines = [];
|
|
@@ -2211,7 +2211,7 @@ function redact(value) {
|
|
|
2211
2211
|
return `****${value.slice(-4)}`;
|
|
2212
2212
|
}
|
|
2213
2213
|
|
|
2214
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
2214
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/internal/cta.js
|
|
2215
2215
|
function formatCtaBlock(name, block) {
|
|
2216
2216
|
if (!block || block.commands.length === 0)
|
|
2217
2217
|
return void 0;
|
|
@@ -2234,7 +2234,7 @@ function formatCta(name, cta) {
|
|
|
2234
2234
|
return { command: cmd, ...cta.description ? { description: cta.description } : void 0 };
|
|
2235
2235
|
}
|
|
2236
2236
|
|
|
2237
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
2237
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/internal/pm.js
|
|
2238
2238
|
function detectRunner() {
|
|
2239
2239
|
const userAgent = process.env.npm_config_user_agent ?? "";
|
|
2240
2240
|
const execPath = process.env.npm_execpath ?? "";
|
|
@@ -2245,7 +2245,7 @@ function detectRunner() {
|
|
|
2245
2245
|
return "npx";
|
|
2246
2246
|
}
|
|
2247
2247
|
|
|
2248
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
2248
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/Schema.js
|
|
2249
2249
|
function toJsonSchema(schema) {
|
|
2250
2250
|
const result = external_exports.toJSONSchema(schema, {
|
|
2251
2251
|
unrepresentable: "any",
|
|
@@ -2259,7 +2259,7 @@ function toJsonSchema(schema) {
|
|
|
2259
2259
|
return result;
|
|
2260
2260
|
}
|
|
2261
2261
|
|
|
2262
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
2262
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/Mcp.js
|
|
2263
2263
|
async function serve(name, version, commands, options = {}) {
|
|
2264
2264
|
const stdio = importStdioModule();
|
|
2265
2265
|
const mcp = await import("./dist-2MZJLO2W.js");
|
|
@@ -2594,7 +2594,7 @@ function buildToolSchema(args, options) {
|
|
|
2594
2594
|
return { type: "object", properties };
|
|
2595
2595
|
}
|
|
2596
2596
|
|
|
2597
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
2597
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/Openapi.js
|
|
2598
2598
|
var Openapi_exports = {};
|
|
2599
2599
|
__export(Openapi_exports, {
|
|
2600
2600
|
coerceIfNeeded: () => coerceIfNeeded,
|
|
@@ -2604,7 +2604,7 @@ __export(Openapi_exports, {
|
|
|
2604
2604
|
toZod: () => toZod
|
|
2605
2605
|
});
|
|
2606
2606
|
|
|
2607
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
2607
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/internal/dereference.js
|
|
2608
2608
|
function dereference(root) {
|
|
2609
2609
|
const cache = /* @__PURE__ */ new Map();
|
|
2610
2610
|
return walk2(root, root, cache);
|
|
@@ -2656,7 +2656,7 @@ function resolvePointer(root, pointer) {
|
|
|
2656
2656
|
return current;
|
|
2657
2657
|
}
|
|
2658
2658
|
|
|
2659
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
2659
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/Openapi.js
|
|
2660
2660
|
function fromCli(cli2, options = {}) {
|
|
2661
2661
|
const commands = toCommands.get(cli2);
|
|
2662
2662
|
if (!commands)
|
|
@@ -3251,7 +3251,7 @@ function coerceIfNeeded(schema) {
|
|
|
3251
3251
|
return desc ? coerced.describe(desc) : coerced;
|
|
3252
3252
|
}
|
|
3253
3253
|
|
|
3254
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
3254
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/McpSource.js
|
|
3255
3255
|
var protocolVersion = "2025-06-18";
|
|
3256
3256
|
async function resolve2(source, options = {}) {
|
|
3257
3257
|
const session = sourceSession(source);
|
|
@@ -3418,7 +3418,7 @@ function resultValue(result) {
|
|
|
3418
3418
|
return textItems;
|
|
3419
3419
|
}
|
|
3420
3420
|
|
|
3421
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
3421
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/Skill.js
|
|
3422
3422
|
import { createHash } from "crypto";
|
|
3423
3423
|
function index(name, commands, description) {
|
|
3424
3424
|
const lines = [`# ${name}`];
|
|
@@ -3662,7 +3662,7 @@ function resolveTypeName2(prop) {
|
|
|
3662
3662
|
return "unknown";
|
|
3663
3663
|
}
|
|
3664
3664
|
|
|
3665
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
3665
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/SyncMcp.js
|
|
3666
3666
|
import { execFile } from "child_process";
|
|
3667
3667
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
3668
3668
|
import { homedir } from "os";
|
|
@@ -3674,7 +3674,7 @@ async function register2(name, options = {}) {
|
|
|
3674
3674
|
const ampOnly = targetAgents.length === 1 && targetAgents[0] === "amp";
|
|
3675
3675
|
const agents = [];
|
|
3676
3676
|
if (!ampOnly) {
|
|
3677
|
-
const args = [command, "--name", name, "-y"];
|
|
3677
|
+
const args = [...addMcpCommandArgs(command), "--name", name, "-y"];
|
|
3678
3678
|
if (options.global !== false)
|
|
3679
3679
|
args.push("-g");
|
|
3680
3680
|
for (const agent of targetAgents.filter((a) => a !== "amp"))
|
|
@@ -3772,6 +3772,15 @@ function detectPackageSpecifier(name) {
|
|
|
3772
3772
|
}
|
|
3773
3773
|
return name;
|
|
3774
3774
|
}
|
|
3775
|
+
function addMcpCommandArgs(command) {
|
|
3776
|
+
const [bin, ...binArgs] = splitCommand(command);
|
|
3777
|
+
if (!bin || !looksLikePath(bin))
|
|
3778
|
+
return [command];
|
|
3779
|
+
return [bin, ...binArgs.flatMap((arg) => ["--args", arg])];
|
|
3780
|
+
}
|
|
3781
|
+
function looksLikePath(input) {
|
|
3782
|
+
return input.startsWith("/") || input.startsWith("~/") || input.startsWith("./") || input.startsWith("../") || /^[A-Za-z]:[\\/]/.test(input);
|
|
3783
|
+
}
|
|
3775
3784
|
function splitCommand(input) {
|
|
3776
3785
|
const tokens = [];
|
|
3777
3786
|
let current = "";
|
|
@@ -3809,13 +3818,13 @@ function exec(cmd, args) {
|
|
|
3809
3818
|
});
|
|
3810
3819
|
}
|
|
3811
3820
|
|
|
3812
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
3821
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/SyncSkills.js
|
|
3813
3822
|
import fsSync from "fs";
|
|
3814
3823
|
import fs2 from "fs/promises";
|
|
3815
3824
|
import os2 from "os";
|
|
3816
3825
|
import path2 from "path";
|
|
3817
3826
|
|
|
3818
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
3827
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/internal/agents.js
|
|
3819
3828
|
import * as fs from "fs";
|
|
3820
3829
|
import * as os from "os";
|
|
3821
3830
|
import * as path from "path";
|
|
@@ -4095,7 +4104,7 @@ function resolveParent(dir) {
|
|
|
4095
4104
|
}
|
|
4096
4105
|
}
|
|
4097
4106
|
|
|
4098
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
4107
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/SyncSkills.js
|
|
4099
4108
|
async function sync(name, commands, options = {}) {
|
|
4100
4109
|
const { depth = 1, description, global = true } = options;
|
|
4101
4110
|
const cwd = options.cwd ?? (global ? resolvePackageRoot() : process.cwd());
|
|
@@ -4256,7 +4265,7 @@ function readHash(name) {
|
|
|
4256
4265
|
return readMeta(name)?.hash;
|
|
4257
4266
|
}
|
|
4258
4267
|
|
|
4259
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
4268
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+b0550076a7a66790e4d30db38103d8a91602b6cb/node_modules/incur/dist/Cli.js
|
|
4260
4269
|
var destructiveCommandHint = "Confirm with the user before executing this destructive command.";
|
|
4261
4270
|
function create(nameOrDefinition, definition) {
|
|
4262
4271
|
const name = typeof nameOrDefinition === "string" ? nameOrDefinition : nameOrDefinition.name;
|
|
@@ -7060,6 +7069,12 @@ var native_spec_default = {
|
|
|
7060
7069
|
summary: "List Accounts",
|
|
7061
7070
|
tags: [
|
|
7062
7071
|
"Accounts"
|
|
7072
|
+
],
|
|
7073
|
+
"x-codeSamples": [
|
|
7074
|
+
{
|
|
7075
|
+
lang: "JavaScript",
|
|
7076
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const account of client.accounts.list()) {\n console.log(account.id);\n}"
|
|
7077
|
+
}
|
|
7063
7078
|
]
|
|
7064
7079
|
},
|
|
7065
7080
|
post: {
|
|
@@ -7129,6 +7144,12 @@ var native_spec_default = {
|
|
|
7129
7144
|
summary: "Create Account",
|
|
7130
7145
|
tags: [
|
|
7131
7146
|
"Accounts"
|
|
7147
|
+
],
|
|
7148
|
+
"x-codeSamples": [
|
|
7149
|
+
{
|
|
7150
|
+
lang: "JavaScript",
|
|
7151
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst account = await client.accounts.create();\n\nconsole.log(account.id);"
|
|
7152
|
+
}
|
|
7132
7153
|
]
|
|
7133
7154
|
}
|
|
7134
7155
|
},
|
|
@@ -7167,6 +7188,12 @@ var native_spec_default = {
|
|
|
7167
7188
|
tags: [
|
|
7168
7189
|
"Accounts"
|
|
7169
7190
|
],
|
|
7191
|
+
"x-codeSamples": [
|
|
7192
|
+
{
|
|
7193
|
+
lang: "JavaScript",
|
|
7194
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst account = await client.accounts.me();\n\nconsole.log(account.id);"
|
|
7195
|
+
}
|
|
7196
|
+
],
|
|
7170
7197
|
parameters: []
|
|
7171
7198
|
}
|
|
7172
7199
|
},
|
|
@@ -7219,6 +7246,12 @@ var native_spec_default = {
|
|
|
7219
7246
|
summary: "Retrieve Account",
|
|
7220
7247
|
tags: [
|
|
7221
7248
|
"Accounts"
|
|
7249
|
+
],
|
|
7250
|
+
"x-codeSamples": [
|
|
7251
|
+
{
|
|
7252
|
+
lang: "JavaScript",
|
|
7253
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst account = await client.accounts.retrieve('account_id');\n\nconsole.log(account.id);"
|
|
7254
|
+
}
|
|
7222
7255
|
]
|
|
7223
7256
|
},
|
|
7224
7257
|
patch: {
|
|
@@ -7722,6 +7755,12 @@ var native_spec_default = {
|
|
|
7722
7755
|
summary: "Update Account",
|
|
7723
7756
|
tags: [
|
|
7724
7757
|
"Accounts"
|
|
7758
|
+
],
|
|
7759
|
+
"x-codeSamples": [
|
|
7760
|
+
{
|
|
7761
|
+
lang: "JavaScript",
|
|
7762
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst account = await client.accounts.update('account_id');\n\nconsole.log(account.id);"
|
|
7763
|
+
}
|
|
7725
7764
|
]
|
|
7726
7765
|
}
|
|
7727
7766
|
},
|
|
@@ -8058,6 +8097,12 @@ var native_spec_default = {
|
|
|
8058
8097
|
summary: "Register LLC",
|
|
8059
8098
|
tags: [
|
|
8060
8099
|
"Accounts"
|
|
8100
|
+
],
|
|
8101
|
+
"x-codeSamples": [
|
|
8102
|
+
{
|
|
8103
|
+
lang: "JavaScript",
|
|
8104
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.accounts.registerLlc('account_id', {\n business_info: {\n business_type: 'business_type',\n formation_state: 'AL',\n industry_group: 'industry_group',\n industry_type: 'industry_type',\n legal_name: 'legal_name',\n },\n founders: [\n {\n address: {\n city: 'city',\n country: 'country',\n line1: 'line1',\n postal_code: 'postal_code',\n state: 'state',\n },\n email: 'email',\n first_name: 'first_name',\n is_primary: true,\n last_name: 'last_name',\n ownership_percentage: 0,\n phone: 'phone',\n },\n ],\n});\n\nconsole.log(response.checkout_session_id);"
|
|
8105
|
+
}
|
|
8061
8106
|
]
|
|
8062
8107
|
}
|
|
8063
8108
|
},
|
|
@@ -8215,10 +8260,20 @@ var native_spec_default = {
|
|
|
8215
8260
|
"object",
|
|
8216
8261
|
"null"
|
|
8217
8262
|
]
|
|
8263
|
+
},
|
|
8264
|
+
ads_reporting_currency: {
|
|
8265
|
+
description: "Lowercase ISO currency code, such as `usd` or `eur`, used to display ad spend and stats. Defaults to `usd`.",
|
|
8266
|
+
type: "string"
|
|
8267
|
+
},
|
|
8268
|
+
ads_scheduling_timezone: {
|
|
8269
|
+
description: "IANA timezone (e.g. `America/New_York`) used to interpret campaign start/end times and to bucket reports. Defaults to `America/New_York` until explicitly overridden.",
|
|
8270
|
+
type: "string"
|
|
8218
8271
|
}
|
|
8219
8272
|
},
|
|
8220
8273
|
required: [
|
|
8221
|
-
"ads_payment_methods"
|
|
8274
|
+
"ads_payment_methods",
|
|
8275
|
+
"ads_reporting_currency",
|
|
8276
|
+
"ads_scheduling_timezone"
|
|
8222
8277
|
],
|
|
8223
8278
|
type: "object"
|
|
8224
8279
|
}
|
|
@@ -8246,6 +8301,12 @@ var native_spec_default = {
|
|
|
8246
8301
|
tags: [
|
|
8247
8302
|
"Accounts"
|
|
8248
8303
|
],
|
|
8304
|
+
"x-codeSamples": [
|
|
8305
|
+
{
|
|
8306
|
+
lang: "JavaScript",
|
|
8307
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst preference = await client.accounts.preferences.retrieve('account_id');\n\nconsole.log(preference.ads_payment_methods);"
|
|
8308
|
+
}
|
|
8309
|
+
],
|
|
8249
8310
|
parameters: [
|
|
8250
8311
|
{
|
|
8251
8312
|
description: "Account ID, prefixed `biz_`.",
|
|
@@ -8326,6 +8387,14 @@ var native_spec_default = {
|
|
|
8326
8387
|
"primary"
|
|
8327
8388
|
],
|
|
8328
8389
|
type: "object"
|
|
8390
|
+
},
|
|
8391
|
+
ads_reporting_currency: {
|
|
8392
|
+
description: "Lowercase ISO currency code, such as `usd` or `eur`, used to display ad spend and stats. Defaults to `usd`.",
|
|
8393
|
+
type: "string"
|
|
8394
|
+
},
|
|
8395
|
+
ads_scheduling_timezone: {
|
|
8396
|
+
description: "IANA timezone (e.g. `America/New_York`) used to interpret campaign start/end times and to bucket reports. Cannot be cleared once set \u2014 pass a new value to change it.",
|
|
8397
|
+
type: "string"
|
|
8329
8398
|
}
|
|
8330
8399
|
},
|
|
8331
8400
|
type: "object"
|
|
@@ -8484,10 +8553,20 @@ var native_spec_default = {
|
|
|
8484
8553
|
"object",
|
|
8485
8554
|
"null"
|
|
8486
8555
|
]
|
|
8556
|
+
},
|
|
8557
|
+
ads_reporting_currency: {
|
|
8558
|
+
description: "Lowercase ISO currency code, such as `usd` or `eur`, used to display ad spend and stats. Defaults to `usd`.",
|
|
8559
|
+
type: "string"
|
|
8560
|
+
},
|
|
8561
|
+
ads_scheduling_timezone: {
|
|
8562
|
+
description: "IANA timezone (e.g. `America/New_York`) used to interpret campaign start/end times and to bucket reports. Defaults to `America/New_York` until explicitly overridden.",
|
|
8563
|
+
type: "string"
|
|
8487
8564
|
}
|
|
8488
8565
|
},
|
|
8489
8566
|
required: [
|
|
8490
|
-
"ads_payment_methods"
|
|
8567
|
+
"ads_payment_methods",
|
|
8568
|
+
"ads_reporting_currency",
|
|
8569
|
+
"ads_scheduling_timezone"
|
|
8491
8570
|
],
|
|
8492
8571
|
type: "object"
|
|
8493
8572
|
}
|
|
@@ -8522,6 +8601,12 @@ var native_spec_default = {
|
|
|
8522
8601
|
summary: "Update Account Preferences",
|
|
8523
8602
|
tags: [
|
|
8524
8603
|
"Accounts"
|
|
8604
|
+
],
|
|
8605
|
+
"x-codeSamples": [
|
|
8606
|
+
{
|
|
8607
|
+
lang: "JavaScript",
|
|
8608
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst preference = await client.accounts.preferences.update('account_id');\n\nconsole.log(preference.ads_payment_methods);"
|
|
8609
|
+
}
|
|
8525
8610
|
]
|
|
8526
8611
|
}
|
|
8527
8612
|
},
|
|
@@ -8581,6 +8666,12 @@ var native_spec_default = {
|
|
|
8581
8666
|
summary: "List Recommended Actions",
|
|
8582
8667
|
tags: [
|
|
8583
8668
|
"Accounts"
|
|
8669
|
+
],
|
|
8670
|
+
"x-codeSamples": [
|
|
8671
|
+
{
|
|
8672
|
+
lang: "JavaScript",
|
|
8673
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.accounts.recommendActions('account_id');\n\nconsole.log(response.data);"
|
|
8674
|
+
}
|
|
8584
8675
|
]
|
|
8585
8676
|
}
|
|
8586
8677
|
},
|
|
@@ -8815,6 +8906,12 @@ var native_spec_default = {
|
|
|
8815
8906
|
summary: "List Ad Campaigns",
|
|
8816
8907
|
tags: [
|
|
8817
8908
|
"Ad Campaigns"
|
|
8909
|
+
],
|
|
8910
|
+
"x-codeSamples": [
|
|
8911
|
+
{
|
|
8912
|
+
lang: "JavaScript",
|
|
8913
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const adCampaign of client.adCampaigns.list()) {\n console.log(adCampaign.id);\n}"
|
|
8914
|
+
}
|
|
8818
8915
|
]
|
|
8819
8916
|
},
|
|
8820
8917
|
post: {
|
|
@@ -8948,6 +9045,12 @@ var native_spec_default = {
|
|
|
8948
9045
|
summary: "Create an Ad Campaign",
|
|
8949
9046
|
tags: [
|
|
8950
9047
|
"Ad Campaigns"
|
|
9048
|
+
],
|
|
9049
|
+
"x-codeSamples": [
|
|
9050
|
+
{
|
|
9051
|
+
lang: "JavaScript",
|
|
9052
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst adCampaign = await client.adCampaigns.create({\n objective: 'awareness',\n platform: 'meta',\n title: 'title',\n});\n\nconsole.log(adCampaign.id);"
|
|
9053
|
+
}
|
|
8951
9054
|
]
|
|
8952
9055
|
}
|
|
8953
9056
|
},
|
|
@@ -8982,6 +9085,12 @@ var native_spec_default = {
|
|
|
8982
9085
|
tags: [
|
|
8983
9086
|
"Ad Campaigns"
|
|
8984
9087
|
],
|
|
9088
|
+
"x-codeSamples": [
|
|
9089
|
+
{
|
|
9090
|
+
lang: "JavaScript",
|
|
9091
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst adCampaign = await client.adCampaigns.delete('id');\n\nconsole.log(adCampaign);"
|
|
9092
|
+
}
|
|
9093
|
+
],
|
|
8985
9094
|
parameters: [
|
|
8986
9095
|
{
|
|
8987
9096
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -9067,6 +9176,12 @@ var native_spec_default = {
|
|
|
9067
9176
|
summary: "Retrieve an Ad Campaign",
|
|
9068
9177
|
tags: [
|
|
9069
9178
|
"Ad Campaigns"
|
|
9179
|
+
],
|
|
9180
|
+
"x-codeSamples": [
|
|
9181
|
+
{
|
|
9182
|
+
lang: "JavaScript",
|
|
9183
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst adCampaign = await client.adCampaigns.retrieve('id');\n\nconsole.log(adCampaign.id);"
|
|
9184
|
+
}
|
|
9070
9185
|
]
|
|
9071
9186
|
},
|
|
9072
9187
|
patch: {
|
|
@@ -9160,6 +9275,12 @@ var native_spec_default = {
|
|
|
9160
9275
|
summary: "Update an Ad Campaign",
|
|
9161
9276
|
tags: [
|
|
9162
9277
|
"Ad Campaigns"
|
|
9278
|
+
],
|
|
9279
|
+
"x-codeSamples": [
|
|
9280
|
+
{
|
|
9281
|
+
lang: "JavaScript",
|
|
9282
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst adCampaign = await client.adCampaigns.update('id');\n\nconsole.log(adCampaign.id);"
|
|
9283
|
+
}
|
|
9163
9284
|
]
|
|
9164
9285
|
}
|
|
9165
9286
|
},
|
|
@@ -9190,6 +9311,12 @@ var native_spec_default = {
|
|
|
9190
9311
|
tags: [
|
|
9191
9312
|
"Ad Campaigns"
|
|
9192
9313
|
],
|
|
9314
|
+
"x-codeSamples": [
|
|
9315
|
+
{
|
|
9316
|
+
lang: "JavaScript",
|
|
9317
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst adCampaign = await client.adCampaigns.pause('id');\n\nconsole.log(adCampaign.id);"
|
|
9318
|
+
}
|
|
9319
|
+
],
|
|
9193
9320
|
parameters: [
|
|
9194
9321
|
{
|
|
9195
9322
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -9233,6 +9360,12 @@ var native_spec_default = {
|
|
|
9233
9360
|
tags: [
|
|
9234
9361
|
"Ad Campaigns"
|
|
9235
9362
|
],
|
|
9363
|
+
"x-codeSamples": [
|
|
9364
|
+
{
|
|
9365
|
+
lang: "JavaScript",
|
|
9366
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst adCampaign = await client.adCampaigns.unpause('id');\n\nconsole.log(adCampaign.id);"
|
|
9367
|
+
}
|
|
9368
|
+
],
|
|
9236
9369
|
parameters: [
|
|
9237
9370
|
{
|
|
9238
9371
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -9480,6 +9613,12 @@ var native_spec_default = {
|
|
|
9480
9613
|
summary: "List Ad Groups",
|
|
9481
9614
|
tags: [
|
|
9482
9615
|
"Ad Groups"
|
|
9616
|
+
],
|
|
9617
|
+
"x-codeSamples": [
|
|
9618
|
+
{
|
|
9619
|
+
lang: "JavaScript",
|
|
9620
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const adGroup of client.adGroups.list()) {\n console.log(adGroup.id);\n}"
|
|
9621
|
+
}
|
|
9483
9622
|
]
|
|
9484
9623
|
},
|
|
9485
9624
|
post: {
|
|
@@ -10090,6 +10229,12 @@ var native_spec_default = {
|
|
|
10090
10229
|
summary: "Create an Ad Group",
|
|
10091
10230
|
tags: [
|
|
10092
10231
|
"Ad Groups"
|
|
10232
|
+
],
|
|
10233
|
+
"x-codeSamples": [
|
|
10234
|
+
{
|
|
10235
|
+
lang: "JavaScript",
|
|
10236
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst adGroup = await client.adGroups.create({ ad_campaign_id: 'ad_campaign_id' });\n\nconsole.log(adGroup.id);"
|
|
10237
|
+
}
|
|
10093
10238
|
]
|
|
10094
10239
|
}
|
|
10095
10240
|
},
|
|
@@ -10124,6 +10269,12 @@ var native_spec_default = {
|
|
|
10124
10269
|
tags: [
|
|
10125
10270
|
"Ad Groups"
|
|
10126
10271
|
],
|
|
10272
|
+
"x-codeSamples": [
|
|
10273
|
+
{
|
|
10274
|
+
lang: "JavaScript",
|
|
10275
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst adGroup = await client.adGroups.delete('id');\n\nconsole.log(adGroup);"
|
|
10276
|
+
}
|
|
10277
|
+
],
|
|
10127
10278
|
parameters: [
|
|
10128
10279
|
{
|
|
10129
10280
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -10209,6 +10360,12 @@ var native_spec_default = {
|
|
|
10209
10360
|
summary: "Retrieve an Ad Group",
|
|
10210
10361
|
tags: [
|
|
10211
10362
|
"Ad Groups"
|
|
10363
|
+
],
|
|
10364
|
+
"x-codeSamples": [
|
|
10365
|
+
{
|
|
10366
|
+
lang: "JavaScript",
|
|
10367
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst adGroup = await client.adGroups.retrieve('id');\n\nconsole.log(adGroup.id);"
|
|
10368
|
+
}
|
|
10212
10369
|
]
|
|
10213
10370
|
},
|
|
10214
10371
|
patch: {
|
|
@@ -10813,6 +10970,12 @@ var native_spec_default = {
|
|
|
10813
10970
|
summary: "Update an Ad Group",
|
|
10814
10971
|
tags: [
|
|
10815
10972
|
"Ad Groups"
|
|
10973
|
+
],
|
|
10974
|
+
"x-codeSamples": [
|
|
10975
|
+
{
|
|
10976
|
+
lang: "JavaScript",
|
|
10977
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst adGroup = await client.adGroups.update('id');\n\nconsole.log(adGroup.id);"
|
|
10978
|
+
}
|
|
10816
10979
|
]
|
|
10817
10980
|
}
|
|
10818
10981
|
},
|
|
@@ -10843,6 +11006,12 @@ var native_spec_default = {
|
|
|
10843
11006
|
tags: [
|
|
10844
11007
|
"Ad Groups"
|
|
10845
11008
|
],
|
|
11009
|
+
"x-codeSamples": [
|
|
11010
|
+
{
|
|
11011
|
+
lang: "JavaScript",
|
|
11012
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst adGroup = await client.adGroups.pause('id');\n\nconsole.log(adGroup.id);"
|
|
11013
|
+
}
|
|
11014
|
+
],
|
|
10846
11015
|
parameters: [
|
|
10847
11016
|
{
|
|
10848
11017
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -10886,6 +11055,12 @@ var native_spec_default = {
|
|
|
10886
11055
|
tags: [
|
|
10887
11056
|
"Ad Groups"
|
|
10888
11057
|
],
|
|
11058
|
+
"x-codeSamples": [
|
|
11059
|
+
{
|
|
11060
|
+
lang: "JavaScript",
|
|
11061
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst adGroup = await client.adGroups.unpause('id');\n\nconsole.log(adGroup.id);"
|
|
11062
|
+
}
|
|
11063
|
+
],
|
|
10889
11064
|
parameters: [
|
|
10890
11065
|
{
|
|
10891
11066
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -11151,6 +11326,12 @@ var native_spec_default = {
|
|
|
11151
11326
|
summary: "List Ads",
|
|
11152
11327
|
tags: [
|
|
11153
11328
|
"Ads"
|
|
11329
|
+
],
|
|
11330
|
+
"x-codeSamples": [
|
|
11331
|
+
{
|
|
11332
|
+
lang: "JavaScript",
|
|
11333
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const ad of client.ads.list()) {\n console.log(ad.id);\n}"
|
|
11334
|
+
}
|
|
11154
11335
|
]
|
|
11155
11336
|
},
|
|
11156
11337
|
post: {
|
|
@@ -11531,6 +11712,12 @@ var native_spec_default = {
|
|
|
11531
11712
|
summary: "Create an Ad",
|
|
11532
11713
|
tags: [
|
|
11533
11714
|
"Ads"
|
|
11715
|
+
],
|
|
11716
|
+
"x-codeSamples": [
|
|
11717
|
+
{
|
|
11718
|
+
lang: "JavaScript",
|
|
11719
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst ad = await client.ads.create();\n\nconsole.log(ad.id);"
|
|
11720
|
+
}
|
|
11534
11721
|
]
|
|
11535
11722
|
}
|
|
11536
11723
|
},
|
|
@@ -11565,6 +11752,12 @@ var native_spec_default = {
|
|
|
11565
11752
|
tags: [
|
|
11566
11753
|
"Ads"
|
|
11567
11754
|
],
|
|
11755
|
+
"x-codeSamples": [
|
|
11756
|
+
{
|
|
11757
|
+
lang: "JavaScript",
|
|
11758
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst ad = await client.ads.delete('id');\n\nconsole.log(ad);"
|
|
11759
|
+
}
|
|
11760
|
+
],
|
|
11568
11761
|
parameters: [
|
|
11569
11762
|
{
|
|
11570
11763
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -11650,6 +11843,12 @@ var native_spec_default = {
|
|
|
11650
11843
|
summary: "Retrieve an Ad",
|
|
11651
11844
|
tags: [
|
|
11652
11845
|
"Ads"
|
|
11846
|
+
],
|
|
11847
|
+
"x-codeSamples": [
|
|
11848
|
+
{
|
|
11849
|
+
lang: "JavaScript",
|
|
11850
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst ad = await client.ads.retrieve('id');\n\nconsole.log(ad.id);"
|
|
11851
|
+
}
|
|
11653
11852
|
]
|
|
11654
11853
|
},
|
|
11655
11854
|
patch: {
|
|
@@ -12023,6 +12222,12 @@ var native_spec_default = {
|
|
|
12023
12222
|
summary: "Update an Ad",
|
|
12024
12223
|
tags: [
|
|
12025
12224
|
"Ads"
|
|
12225
|
+
],
|
|
12226
|
+
"x-codeSamples": [
|
|
12227
|
+
{
|
|
12228
|
+
lang: "JavaScript",
|
|
12229
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst ad = await client.ads.update('id');\n\nconsole.log(ad.id);"
|
|
12230
|
+
}
|
|
12026
12231
|
]
|
|
12027
12232
|
}
|
|
12028
12233
|
},
|
|
@@ -12053,6 +12258,12 @@ var native_spec_default = {
|
|
|
12053
12258
|
tags: [
|
|
12054
12259
|
"Ads"
|
|
12055
12260
|
],
|
|
12261
|
+
"x-codeSamples": [
|
|
12262
|
+
{
|
|
12263
|
+
lang: "JavaScript",
|
|
12264
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst ad = await client.ads.pause('id');\n\nconsole.log(ad.id);"
|
|
12265
|
+
}
|
|
12266
|
+
],
|
|
12056
12267
|
parameters: [
|
|
12057
12268
|
{
|
|
12058
12269
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -12096,6 +12307,12 @@ var native_spec_default = {
|
|
|
12096
12307
|
tags: [
|
|
12097
12308
|
"Ads"
|
|
12098
12309
|
],
|
|
12310
|
+
"x-codeSamples": [
|
|
12311
|
+
{
|
|
12312
|
+
lang: "JavaScript",
|
|
12313
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst ad = await client.ads.unpause('id');\n\nconsole.log(ad.id);"
|
|
12314
|
+
}
|
|
12315
|
+
],
|
|
12099
12316
|
parameters: [
|
|
12100
12317
|
{
|
|
12101
12318
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -12358,6 +12575,12 @@ var native_spec_default = {
|
|
|
12358
12575
|
summary: "List App Logs",
|
|
12359
12576
|
tags: [
|
|
12360
12577
|
"Apps"
|
|
12578
|
+
],
|
|
12579
|
+
"x-codeSamples": [
|
|
12580
|
+
{
|
|
12581
|
+
lang: "JavaScript",
|
|
12582
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.apps.logs('id');\n\nconsole.log(response.data);"
|
|
12583
|
+
}
|
|
12361
12584
|
]
|
|
12362
12585
|
}
|
|
12363
12586
|
},
|
|
@@ -12483,6 +12706,12 @@ var native_spec_default = {
|
|
|
12483
12706
|
summary: "List Audiences",
|
|
12484
12707
|
tags: [
|
|
12485
12708
|
"Audiences"
|
|
12709
|
+
],
|
|
12710
|
+
"x-codeSamples": [
|
|
12711
|
+
{
|
|
12712
|
+
lang: "JavaScript",
|
|
12713
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const audience of client.audiences.list({ account_id: 'account_id' })) {\n console.log(audience.id);\n}"
|
|
12714
|
+
}
|
|
12486
12715
|
]
|
|
12487
12716
|
},
|
|
12488
12717
|
post: {
|
|
@@ -12606,6 +12835,12 @@ var native_spec_default = {
|
|
|
12606
12835
|
summary: "Create Audience",
|
|
12607
12836
|
tags: [
|
|
12608
12837
|
"Audiences"
|
|
12838
|
+
],
|
|
12839
|
+
"x-codeSamples": [
|
|
12840
|
+
{
|
|
12841
|
+
lang: "JavaScript",
|
|
12842
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst audience = await client.audiences.create({ account_id: 'account_id' });\n\nconsole.log(audience);"
|
|
12843
|
+
}
|
|
12609
12844
|
]
|
|
12610
12845
|
}
|
|
12611
12846
|
},
|
|
@@ -12654,6 +12889,12 @@ var native_spec_default = {
|
|
|
12654
12889
|
summary: "Delete Audience",
|
|
12655
12890
|
tags: [
|
|
12656
12891
|
"Audiences"
|
|
12892
|
+
],
|
|
12893
|
+
"x-codeSamples": [
|
|
12894
|
+
{
|
|
12895
|
+
lang: "JavaScript",
|
|
12896
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst audience = await client.audiences.delete('audience_id');\n\nconsole.log(audience.success);"
|
|
12897
|
+
}
|
|
12657
12898
|
]
|
|
12658
12899
|
}
|
|
12659
12900
|
},
|
|
@@ -12869,6 +13110,12 @@ var native_spec_default = {
|
|
|
12869
13110
|
summary: "List Bounties",
|
|
12870
13111
|
tags: [
|
|
12871
13112
|
"Bounties"
|
|
13113
|
+
],
|
|
13114
|
+
"x-codeSamples": [
|
|
13115
|
+
{
|
|
13116
|
+
lang: "JavaScript",
|
|
13117
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const bountyListItem of client.bounties.list()) {\n console.log(bountyListItem.id);\n}"
|
|
13118
|
+
}
|
|
12872
13119
|
]
|
|
12873
13120
|
},
|
|
12874
13121
|
post: {
|
|
@@ -12994,6 +13241,12 @@ var native_spec_default = {
|
|
|
12994
13241
|
summary: "Create Bounty",
|
|
12995
13242
|
tags: [
|
|
12996
13243
|
"Bounties"
|
|
13244
|
+
],
|
|
13245
|
+
"x-codeSamples": [
|
|
13246
|
+
{
|
|
13247
|
+
lang: "JavaScript",
|
|
13248
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst bounty = await client.bounties.create({\n description: 'description',\n gross_reward_amount: 0,\n title: 'title',\n});\n\nconsole.log(bounty.id);"
|
|
13249
|
+
}
|
|
12997
13250
|
]
|
|
12998
13251
|
}
|
|
12999
13252
|
},
|
|
@@ -13028,6 +13281,12 @@ var native_spec_default = {
|
|
|
13028
13281
|
tags: [
|
|
13029
13282
|
"Bounties"
|
|
13030
13283
|
],
|
|
13284
|
+
"x-codeSamples": [
|
|
13285
|
+
{
|
|
13286
|
+
lang: "JavaScript",
|
|
13287
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst bounty = await client.bounties.retrieve('id');\n\nconsole.log(bounty.id);"
|
|
13288
|
+
}
|
|
13289
|
+
],
|
|
13031
13290
|
parameters: [
|
|
13032
13291
|
{
|
|
13033
13292
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -13245,6 +13504,12 @@ var native_spec_default = {
|
|
|
13245
13504
|
summary: "List Bounty Submissions",
|
|
13246
13505
|
tags: [
|
|
13247
13506
|
"Bounty Submissions"
|
|
13507
|
+
],
|
|
13508
|
+
"x-codeSamples": [
|
|
13509
|
+
{
|
|
13510
|
+
lang: "JavaScript",
|
|
13511
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const bountySubmission of client.bountySubmissions.list()) {\n console.log(bountySubmission.id);\n}"
|
|
13512
|
+
}
|
|
13248
13513
|
]
|
|
13249
13514
|
},
|
|
13250
13515
|
post: {
|
|
@@ -13359,6 +13624,12 @@ var native_spec_default = {
|
|
|
13359
13624
|
summary: "Create Bounty Submission",
|
|
13360
13625
|
tags: [
|
|
13361
13626
|
"Bounty Submissions"
|
|
13627
|
+
],
|
|
13628
|
+
"x-codeSamples": [
|
|
13629
|
+
{
|
|
13630
|
+
lang: "JavaScript",
|
|
13631
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst bountySubmission = await client.bountySubmissions.create({ bounty_id: 'bounty_id' });\n\nconsole.log(bountySubmission.id);"
|
|
13632
|
+
}
|
|
13362
13633
|
]
|
|
13363
13634
|
}
|
|
13364
13635
|
},
|
|
@@ -13659,6 +13930,12 @@ var native_spec_default = {
|
|
|
13659
13930
|
summary: "List Cards",
|
|
13660
13931
|
tags: [
|
|
13661
13932
|
"Cards"
|
|
13933
|
+
],
|
|
13934
|
+
"x-codeSamples": [
|
|
13935
|
+
{
|
|
13936
|
+
lang: "JavaScript",
|
|
13937
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst cards = await client.cards.list();\n\nconsole.log(cards.data);"
|
|
13938
|
+
}
|
|
13662
13939
|
]
|
|
13663
13940
|
},
|
|
13664
13941
|
post: {
|
|
@@ -14023,6 +14300,12 @@ var native_spec_default = {
|
|
|
14023
14300
|
summary: "Create Card",
|
|
14024
14301
|
tags: [
|
|
14025
14302
|
"Cards"
|
|
14303
|
+
],
|
|
14304
|
+
"x-codeSamples": [
|
|
14305
|
+
{
|
|
14306
|
+
lang: "JavaScript",
|
|
14307
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst card = await client.cards.create();\n\nconsole.log(card.id);"
|
|
14308
|
+
}
|
|
14026
14309
|
]
|
|
14027
14310
|
}
|
|
14028
14311
|
},
|
|
@@ -14309,6 +14592,12 @@ var native_spec_default = {
|
|
|
14309
14592
|
summary: "Retrieve Card",
|
|
14310
14593
|
tags: [
|
|
14311
14594
|
"Cards"
|
|
14595
|
+
],
|
|
14596
|
+
"x-codeSamples": [
|
|
14597
|
+
{
|
|
14598
|
+
lang: "JavaScript",
|
|
14599
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst card = await client.cards.retrieve('card_id');\n\nconsole.log(card.id);"
|
|
14600
|
+
}
|
|
14312
14601
|
]
|
|
14313
14602
|
},
|
|
14314
14603
|
patch: {
|
|
@@ -14678,6 +14967,12 @@ var native_spec_default = {
|
|
|
14678
14967
|
summary: "Update Card",
|
|
14679
14968
|
tags: [
|
|
14680
14969
|
"Cards"
|
|
14970
|
+
],
|
|
14971
|
+
"x-codeSamples": [
|
|
14972
|
+
{
|
|
14973
|
+
lang: "JavaScript",
|
|
14974
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst card = await client.cards.update('card_id');\n\nconsole.log(card.id);"
|
|
14975
|
+
}
|
|
14681
14976
|
]
|
|
14682
14977
|
}
|
|
14683
14978
|
},
|
|
@@ -15025,6 +15320,12 @@ var native_spec_default = {
|
|
|
15025
15320
|
summary: "List checkout configurations",
|
|
15026
15321
|
tags: [
|
|
15027
15322
|
"Checkout Configurations"
|
|
15323
|
+
],
|
|
15324
|
+
"x-codeSamples": [
|
|
15325
|
+
{
|
|
15326
|
+
lang: "JavaScript",
|
|
15327
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const checkoutConfigurationListResponse of client.checkoutConfigurations.list({\n company_id: 'company_id',\n})) {\n console.log(checkoutConfigurationListResponse.id);\n}"
|
|
15328
|
+
}
|
|
15028
15329
|
]
|
|
15029
15330
|
},
|
|
15030
15331
|
post: {
|
|
@@ -15502,6 +15803,12 @@ var native_spec_default = {
|
|
|
15502
15803
|
summary: "Create a checkout configuration",
|
|
15503
15804
|
tags: [
|
|
15504
15805
|
"Checkout Configurations"
|
|
15806
|
+
],
|
|
15807
|
+
"x-codeSamples": [
|
|
15808
|
+
{
|
|
15809
|
+
lang: "JavaScript",
|
|
15810
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst checkoutConfiguration = await client.checkoutConfigurations.create();\n\nconsole.log(checkoutConfiguration.id);"
|
|
15811
|
+
}
|
|
15505
15812
|
]
|
|
15506
15813
|
}
|
|
15507
15814
|
},
|
|
@@ -15531,6 +15838,12 @@ var native_spec_default = {
|
|
|
15531
15838
|
tags: [
|
|
15532
15839
|
"Checkout Configurations"
|
|
15533
15840
|
],
|
|
15841
|
+
"x-codeSamples": [
|
|
15842
|
+
{
|
|
15843
|
+
lang: "JavaScript",
|
|
15844
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.checkoutConfigurations.delete('id');"
|
|
15845
|
+
}
|
|
15846
|
+
],
|
|
15534
15847
|
parameters: [
|
|
15535
15848
|
{
|
|
15536
15849
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -15754,6 +16067,12 @@ var native_spec_default = {
|
|
|
15754
16067
|
tags: [
|
|
15755
16068
|
"Checkout Configurations"
|
|
15756
16069
|
],
|
|
16070
|
+
"x-codeSamples": [
|
|
16071
|
+
{
|
|
16072
|
+
lang: "JavaScript",
|
|
16073
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst checkoutConfiguration = await client.checkoutConfigurations.retrieve('id');\n\nconsole.log(checkoutConfiguration.id);"
|
|
16074
|
+
}
|
|
16075
|
+
],
|
|
15757
16076
|
parameters: [
|
|
15758
16077
|
{
|
|
15759
16078
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -16047,6 +16366,12 @@ var native_spec_default = {
|
|
|
16047
16366
|
summary: "Create Deposit",
|
|
16048
16367
|
tags: [
|
|
16049
16368
|
"Deposits"
|
|
16369
|
+
],
|
|
16370
|
+
"x-codeSamples": [
|
|
16371
|
+
{
|
|
16372
|
+
lang: "JavaScript",
|
|
16373
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst deposit = await client.deposits.create({ destination: 'string' });\n\nconsole.log(deposit.account_id);"
|
|
16374
|
+
}
|
|
16050
16375
|
]
|
|
16051
16376
|
}
|
|
16052
16377
|
},
|
|
@@ -16417,6 +16742,12 @@ var native_spec_default = {
|
|
|
16417
16742
|
summary: "List Events",
|
|
16418
16743
|
tags: [
|
|
16419
16744
|
"Events"
|
|
16745
|
+
],
|
|
16746
|
+
"x-codeSamples": [
|
|
16747
|
+
{
|
|
16748
|
+
lang: "JavaScript",
|
|
16749
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const eventListResponse of client.events.list()) {\n console.log(eventListResponse.id);\n}"
|
|
16750
|
+
}
|
|
16420
16751
|
]
|
|
16421
16752
|
},
|
|
16422
16753
|
post: {
|
|
@@ -17081,6 +17412,12 @@ var native_spec_default = {
|
|
|
17081
17412
|
summary: "Create Event",
|
|
17082
17413
|
tags: [
|
|
17083
17414
|
"Events"
|
|
17415
|
+
],
|
|
17416
|
+
"x-codeSamples": [
|
|
17417
|
+
{
|
|
17418
|
+
lang: "JavaScript",
|
|
17419
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst event = await client.events.create({\n account_id: 'account_id',\n event_name: 'course_completed',\n});\n\nconsole.log(event.id);"
|
|
17420
|
+
}
|
|
17084
17421
|
]
|
|
17085
17422
|
}
|
|
17086
17423
|
},
|
|
@@ -17279,6 +17616,12 @@ var native_spec_default = {
|
|
|
17279
17616
|
summary: "List Financial Activity",
|
|
17280
17617
|
tags: [
|
|
17281
17618
|
"Ledgers"
|
|
17619
|
+
],
|
|
17620
|
+
"x-codeSamples": [
|
|
17621
|
+
{
|
|
17622
|
+
lang: "JavaScript",
|
|
17623
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst financialActivities = await client.financialActivity.list();\n\nconsole.log(financialActivities.data);"
|
|
17624
|
+
}
|
|
17282
17625
|
]
|
|
17283
17626
|
}
|
|
17284
17627
|
},
|
|
@@ -17684,6 +18027,12 @@ var native_spec_default = {
|
|
|
17684
18027
|
summary: "Generate Media Asset",
|
|
17685
18028
|
tags: [
|
|
17686
18029
|
"Media"
|
|
18030
|
+
],
|
|
18031
|
+
"x-codeSamples": [
|
|
18032
|
+
{
|
|
18033
|
+
lang: "JavaScript",
|
|
18034
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst mediaAsset = await client.media.generate({ prompt: 'prompt', type: 'video' });\n\nconsole.log(mediaAsset.id);"
|
|
18035
|
+
}
|
|
17687
18036
|
]
|
|
17688
18037
|
}
|
|
17689
18038
|
},
|
|
@@ -17728,6 +18077,12 @@ var native_spec_default = {
|
|
|
17728
18077
|
summary: "Retrieve Media Asset",
|
|
17729
18078
|
tags: [
|
|
17730
18079
|
"Media"
|
|
18080
|
+
],
|
|
18081
|
+
"x-codeSamples": [
|
|
18082
|
+
{
|
|
18083
|
+
lang: "JavaScript",
|
|
18084
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst mediaAsset = await client.media.retrieve('id');\n\nconsole.log(mediaAsset.id);"
|
|
18085
|
+
}
|
|
17731
18086
|
]
|
|
17732
18087
|
}
|
|
17733
18088
|
},
|
|
@@ -17782,6 +18137,12 @@ var native_spec_default = {
|
|
|
17782
18137
|
tags: [
|
|
17783
18138
|
"Partners"
|
|
17784
18139
|
],
|
|
18140
|
+
"x-codeSamples": [
|
|
18141
|
+
{
|
|
18142
|
+
lang: "JavaScript",
|
|
18143
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst partner = await client.partners.create();\n\nconsole.log(partner.referral_link);"
|
|
18144
|
+
}
|
|
18145
|
+
],
|
|
17785
18146
|
parameters: [
|
|
17786
18147
|
{
|
|
17787
18148
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -18249,6 +18610,12 @@ var native_spec_default = {
|
|
|
18249
18610
|
summary: "List a partner's referred businesses",
|
|
18250
18611
|
tags: [
|
|
18251
18612
|
"Partners"
|
|
18613
|
+
],
|
|
18614
|
+
"x-codeSamples": [
|
|
18615
|
+
{
|
|
18616
|
+
lang: "JavaScript",
|
|
18617
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const businessListResponse of client.partners.businesses.list()) {\n console.log(businessListResponse.id);\n}"
|
|
18618
|
+
}
|
|
18252
18619
|
]
|
|
18253
18620
|
}
|
|
18254
18621
|
},
|
|
@@ -18543,6 +18910,12 @@ var native_spec_default = {
|
|
|
18543
18910
|
tags: [
|
|
18544
18911
|
"Partners"
|
|
18545
18912
|
],
|
|
18913
|
+
"x-codeSamples": [
|
|
18914
|
+
{
|
|
18915
|
+
lang: "JavaScript",
|
|
18916
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst business = await client.partners.businesses.retrieve('id');\n\nconsole.log(business.id);"
|
|
18917
|
+
}
|
|
18918
|
+
],
|
|
18546
18919
|
parameters: [
|
|
18547
18920
|
{
|
|
18548
18921
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -18799,10 +19172,12 @@ var native_spec_default = {
|
|
|
18799
19172
|
]
|
|
18800
19173
|
},
|
|
18801
19174
|
income_source: {
|
|
18802
|
-
description: "Which income source the commission is on: product-sales gross profit
|
|
19175
|
+
description: "Which income source the commission is on: product-sales gross profit, Whop Ads spend billed to the business, platform balance transfer fees, or Whop Card interchange.",
|
|
18803
19176
|
enum: [
|
|
18804
19177
|
"sales",
|
|
18805
|
-
"ad_spend"
|
|
19178
|
+
"ad_spend",
|
|
19179
|
+
"transfer",
|
|
19180
|
+
"card_interchange"
|
|
18806
19181
|
],
|
|
18807
19182
|
example: "sales",
|
|
18808
19183
|
type: "string"
|
|
@@ -18932,11 +19307,75 @@ var native_spec_default = {
|
|
|
18932
19307
|
"null"
|
|
18933
19308
|
]
|
|
18934
19309
|
},
|
|
19310
|
+
{
|
|
19311
|
+
properties: {
|
|
19312
|
+
created_at: {
|
|
19313
|
+
format: "date-time",
|
|
19314
|
+
type: "string"
|
|
19315
|
+
},
|
|
19316
|
+
currency: {
|
|
19317
|
+
type: "string"
|
|
19318
|
+
},
|
|
19319
|
+
id: {
|
|
19320
|
+
type: "string"
|
|
19321
|
+
},
|
|
19322
|
+
object: {
|
|
19323
|
+
enum: [
|
|
19324
|
+
"transfer"
|
|
19325
|
+
],
|
|
19326
|
+
type: "string"
|
|
19327
|
+
}
|
|
19328
|
+
},
|
|
19329
|
+
required: [
|
|
19330
|
+
"object",
|
|
19331
|
+
"id",
|
|
19332
|
+
"currency",
|
|
19333
|
+
"created_at"
|
|
19334
|
+
],
|
|
19335
|
+
type: "object"
|
|
19336
|
+
},
|
|
19337
|
+
{
|
|
19338
|
+
properties: {
|
|
19339
|
+
created_at: {
|
|
19340
|
+
format: "date-time",
|
|
19341
|
+
type: "string"
|
|
19342
|
+
},
|
|
19343
|
+
currency: {
|
|
19344
|
+
type: [
|
|
19345
|
+
"string",
|
|
19346
|
+
"null"
|
|
19347
|
+
]
|
|
19348
|
+
},
|
|
19349
|
+
id: {
|
|
19350
|
+
type: "string"
|
|
19351
|
+
},
|
|
19352
|
+
merchant_name: {
|
|
19353
|
+
type: [
|
|
19354
|
+
"string",
|
|
19355
|
+
"null"
|
|
19356
|
+
]
|
|
19357
|
+
},
|
|
19358
|
+
object: {
|
|
19359
|
+
enum: [
|
|
19360
|
+
"card_transaction"
|
|
19361
|
+
],
|
|
19362
|
+
type: "string"
|
|
19363
|
+
}
|
|
19364
|
+
},
|
|
19365
|
+
required: [
|
|
19366
|
+
"object",
|
|
19367
|
+
"id",
|
|
19368
|
+
"currency",
|
|
19369
|
+
"merchant_name",
|
|
19370
|
+
"created_at"
|
|
19371
|
+
],
|
|
19372
|
+
type: "object"
|
|
19373
|
+
},
|
|
18935
19374
|
{
|
|
18936
19375
|
type: "null"
|
|
18937
19376
|
}
|
|
18938
19377
|
],
|
|
18939
|
-
description: "The resource that generated the
|
|
19378
|
+
description: "The resource that generated the earning: the customer payment receipt for sales and ad spend earnings, the balance transfer for transfer earnings, or the card transaction for card interchange earnings."
|
|
18940
19379
|
},
|
|
18941
19380
|
second_tier: {
|
|
18942
19381
|
description: "Whether this earning is a second-tier (grandparent) commission.",
|
|
@@ -18955,7 +19394,7 @@ var native_spec_default = {
|
|
|
18955
19394
|
type: "string"
|
|
18956
19395
|
},
|
|
18957
19396
|
transaction_amount_usd: {
|
|
18958
|
-
description: "The
|
|
19397
|
+
description: "The underlying transaction amount the commission's income comes from, in USD.",
|
|
18959
19398
|
type: "string"
|
|
18960
19399
|
}
|
|
18961
19400
|
},
|
|
@@ -19035,12 +19474,18 @@ var native_spec_default = {
|
|
|
19035
19474
|
summary: "List a partner's referred business earnings",
|
|
19036
19475
|
tags: [
|
|
19037
19476
|
"Partners"
|
|
19477
|
+
],
|
|
19478
|
+
"x-codeSamples": [
|
|
19479
|
+
{
|
|
19480
|
+
lang: "JavaScript",
|
|
19481
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const earningListResponse of client.partners.businesses.earnings.list('id')) {\n console.log(earningListResponse.id);\n}"
|
|
19482
|
+
}
|
|
19038
19483
|
]
|
|
19039
19484
|
}
|
|
19040
19485
|
},
|
|
19041
19486
|
"/partners/leaderboard": {
|
|
19042
19487
|
get: {
|
|
19043
|
-
description: "Ranks referrers by partner business earnings \u2014 all-time by default, or over the current day, month, year, or trailing 30 days
|
|
19488
|
+
description: "Ranks referrers by partner business earnings \u2014 all-time by default, or over the current day, month, year, or trailing 30 days. Authentication is optional: authenticated callers also get their own standing, anonymous callers get the rankings alone.",
|
|
19044
19489
|
operationId: "leaderboard",
|
|
19045
19490
|
parameters: [
|
|
19046
19491
|
{
|
|
@@ -19261,17 +19706,10 @@ var native_spec_default = {
|
|
|
19261
19706
|
"400": {
|
|
19262
19707
|
$ref: "#/components/responses/InvalidParameters",
|
|
19263
19708
|
description: "invalid period"
|
|
19264
|
-
},
|
|
19265
|
-
"401": {
|
|
19266
|
-
$ref: "#/components/responses/Unauthorized",
|
|
19267
|
-
description: "missing or invalid authentication"
|
|
19268
|
-
},
|
|
19269
|
-
"403": {
|
|
19270
|
-
$ref: "#/components/responses/Forbidden",
|
|
19271
|
-
description: "credential lacks the referral-read scope"
|
|
19272
19709
|
}
|
|
19273
19710
|
},
|
|
19274
19711
|
security: [
|
|
19712
|
+
{},
|
|
19275
19713
|
{
|
|
19276
19714
|
bearerAuth: [
|
|
19277
19715
|
"partner:basic:read"
|
|
@@ -19281,6 +19719,12 @@ var native_spec_default = {
|
|
|
19281
19719
|
summary: "Retrieve the partner leaderboard",
|
|
19282
19720
|
tags: [
|
|
19283
19721
|
"Partners"
|
|
19722
|
+
],
|
|
19723
|
+
"x-codeSamples": [
|
|
19724
|
+
{
|
|
19725
|
+
lang: "JavaScript",
|
|
19726
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.partners.leaderboard();\n\nconsole.log(response.leaders);"
|
|
19727
|
+
}
|
|
19284
19728
|
]
|
|
19285
19729
|
}
|
|
19286
19730
|
},
|
|
@@ -19474,6 +19918,12 @@ var native_spec_default = {
|
|
|
19474
19918
|
summary: "List the users the caller referred",
|
|
19475
19919
|
tags: [
|
|
19476
19920
|
"Partners"
|
|
19921
|
+
],
|
|
19922
|
+
"x-codeSamples": [
|
|
19923
|
+
{
|
|
19924
|
+
lang: "JavaScript",
|
|
19925
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.partners.referredUsers();\n\nconsole.log(response.data);"
|
|
19926
|
+
}
|
|
19477
19927
|
]
|
|
19478
19928
|
}
|
|
19479
19929
|
},
|
|
@@ -19766,6 +20216,12 @@ var native_spec_default = {
|
|
|
19766
20216
|
summary: "List Payouts",
|
|
19767
20217
|
tags: [
|
|
19768
20218
|
"Payouts"
|
|
20219
|
+
],
|
|
20220
|
+
"x-codeSamples": [
|
|
20221
|
+
{
|
|
20222
|
+
lang: "JavaScript",
|
|
20223
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const payoutListResponse of client.payouts.list()) {\n console.log(payoutListResponse.id);\n}"
|
|
20224
|
+
}
|
|
19769
20225
|
]
|
|
19770
20226
|
},
|
|
19771
20227
|
post: {
|
|
@@ -19978,6 +20434,12 @@ var native_spec_default = {
|
|
|
19978
20434
|
summary: "Create Payout",
|
|
19979
20435
|
tags: [
|
|
19980
20436
|
"Payouts"
|
|
20437
|
+
],
|
|
20438
|
+
"x-codeSamples": [
|
|
20439
|
+
{
|
|
20440
|
+
lang: "JavaScript",
|
|
20441
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst payout = await client.payouts.create({\n account_id: 'account_id',\n amount: 0,\n payout_method_id: 'payout_method_id',\n});\n\nconsole.log(payout.id);"
|
|
20442
|
+
}
|
|
19981
20443
|
]
|
|
19982
20444
|
}
|
|
19983
20445
|
},
|
|
@@ -20644,6 +21106,12 @@ var native_spec_default = {
|
|
|
20644
21106
|
summary: "List Payout Methods",
|
|
20645
21107
|
tags: [
|
|
20646
21108
|
"Payouts"
|
|
21109
|
+
],
|
|
21110
|
+
"x-codeSamples": [
|
|
21111
|
+
{
|
|
21112
|
+
lang: "JavaScript",
|
|
21113
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const methodListResponse of client.payouts.methods.list()) {\n console.log(methodListResponse.id);\n}"
|
|
21114
|
+
}
|
|
20647
21115
|
]
|
|
20648
21116
|
},
|
|
20649
21117
|
post: {
|
|
@@ -20854,6 +21322,12 @@ var native_spec_default = {
|
|
|
20854
21322
|
summary: "Create Payout Method",
|
|
20855
21323
|
tags: [
|
|
20856
21324
|
"Payouts"
|
|
21325
|
+
],
|
|
21326
|
+
"x-codeSamples": [
|
|
21327
|
+
{
|
|
21328
|
+
lang: "JavaScript",
|
|
21329
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst method = await client.payouts.methods.create({\n destination_id: 'destination_id',\n fields: { foo: 'string' },\n nickname: 'nickname',\n});\n\nconsole.log(method.id);"
|
|
21330
|
+
}
|
|
20857
21331
|
]
|
|
20858
21332
|
}
|
|
20859
21333
|
},
|
|
@@ -21155,6 +21629,12 @@ var native_spec_default = {
|
|
|
21155
21629
|
summary: "List People",
|
|
21156
21630
|
tags: [
|
|
21157
21631
|
"People"
|
|
21632
|
+
],
|
|
21633
|
+
"x-codeSamples": [
|
|
21634
|
+
{
|
|
21635
|
+
lang: "JavaScript",
|
|
21636
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const personListResponse of client.people.list()) {\n console.log(personListResponse.id);\n}"
|
|
21637
|
+
}
|
|
21158
21638
|
]
|
|
21159
21639
|
}
|
|
21160
21640
|
},
|
|
@@ -21373,6 +21853,12 @@ var native_spec_default = {
|
|
|
21373
21853
|
summary: "Retrieve Person",
|
|
21374
21854
|
tags: [
|
|
21375
21855
|
"People"
|
|
21856
|
+
],
|
|
21857
|
+
"x-codeSamples": [
|
|
21858
|
+
{
|
|
21859
|
+
lang: "JavaScript",
|
|
21860
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst person = await client.people.retrieve('person_id');\n\nconsole.log(person.data);"
|
|
21861
|
+
}
|
|
21376
21862
|
]
|
|
21377
21863
|
}
|
|
21378
21864
|
},
|
|
@@ -21596,6 +22082,12 @@ var native_spec_default = {
|
|
|
21596
22082
|
summary: "List Plans",
|
|
21597
22083
|
tags: [
|
|
21598
22084
|
"Plans"
|
|
22085
|
+
],
|
|
22086
|
+
"x-codeSamples": [
|
|
22087
|
+
{
|
|
22088
|
+
lang: "JavaScript",
|
|
22089
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const planListResponse of client.plans.list({ account_id: 'account_id' })) {\n console.log(planListResponse.id);\n}"
|
|
22090
|
+
}
|
|
21599
22091
|
]
|
|
21600
22092
|
},
|
|
21601
22093
|
post: {
|
|
@@ -21870,6 +22362,12 @@ var native_spec_default = {
|
|
|
21870
22362
|
summary: "Create Plan",
|
|
21871
22363
|
tags: [
|
|
21872
22364
|
"Plans"
|
|
22365
|
+
],
|
|
22366
|
+
"x-codeSamples": [
|
|
22367
|
+
{
|
|
22368
|
+
lang: "JavaScript",
|
|
22369
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst plan = await client.plans.create();\n\nconsole.log(plan.id);"
|
|
22370
|
+
}
|
|
21873
22371
|
]
|
|
21874
22372
|
}
|
|
21875
22373
|
},
|
|
@@ -21905,6 +22403,12 @@ var native_spec_default = {
|
|
|
21905
22403
|
tags: [
|
|
21906
22404
|
"Plans"
|
|
21907
22405
|
],
|
|
22406
|
+
"x-codeSamples": [
|
|
22407
|
+
{
|
|
22408
|
+
lang: "JavaScript",
|
|
22409
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst plan = await client.plans.delete('id');\n\nconsole.log(plan);"
|
|
22410
|
+
}
|
|
22411
|
+
],
|
|
21908
22412
|
parameters: [
|
|
21909
22413
|
{
|
|
21910
22414
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -21948,6 +22452,12 @@ var native_spec_default = {
|
|
|
21948
22452
|
tags: [
|
|
21949
22453
|
"Plans"
|
|
21950
22454
|
],
|
|
22455
|
+
"x-codeSamples": [
|
|
22456
|
+
{
|
|
22457
|
+
lang: "JavaScript",
|
|
22458
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst plan = await client.plans.retrieve('id');\n\nconsole.log(plan.id);"
|
|
22459
|
+
}
|
|
22460
|
+
],
|
|
21951
22461
|
parameters: [
|
|
21952
22462
|
{
|
|
21953
22463
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -22238,6 +22748,12 @@ var native_spec_default = {
|
|
|
22238
22748
|
summary: "Update Plan",
|
|
22239
22749
|
tags: [
|
|
22240
22750
|
"Plans"
|
|
22751
|
+
],
|
|
22752
|
+
"x-codeSamples": [
|
|
22753
|
+
{
|
|
22754
|
+
lang: "JavaScript",
|
|
22755
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst plan = await client.plans.update('id');\n\nconsole.log(plan.id);"
|
|
22756
|
+
}
|
|
22241
22757
|
]
|
|
22242
22758
|
}
|
|
22243
22759
|
},
|
|
@@ -22551,6 +23067,12 @@ var native_spec_default = {
|
|
|
22551
23067
|
summary: "Calculate Tax",
|
|
22552
23068
|
tags: [
|
|
22553
23069
|
"Plans"
|
|
23070
|
+
],
|
|
23071
|
+
"x-codeSamples": [
|
|
23072
|
+
{
|
|
23073
|
+
lang: "JavaScript",
|
|
23074
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.plans.calculateTax('id');\n\nconsole.log(response.currency);"
|
|
23075
|
+
}
|
|
22554
23076
|
]
|
|
22555
23077
|
}
|
|
22556
23078
|
},
|
|
@@ -22725,6 +23247,12 @@ var native_spec_default = {
|
|
|
22725
23247
|
summary: "List Products",
|
|
22726
23248
|
tags: [
|
|
22727
23249
|
"Products"
|
|
23250
|
+
],
|
|
23251
|
+
"x-codeSamples": [
|
|
23252
|
+
{
|
|
23253
|
+
lang: "JavaScript",
|
|
23254
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const productListItem of client.products.list({ company_id: 'company_id' })) {\n console.log(productListItem.id);\n}"
|
|
23255
|
+
}
|
|
22728
23256
|
]
|
|
22729
23257
|
},
|
|
22730
23258
|
post: {
|
|
@@ -22887,6 +23415,12 @@ var native_spec_default = {
|
|
|
22887
23415
|
summary: "Create Product",
|
|
22888
23416
|
tags: [
|
|
22889
23417
|
"Products"
|
|
23418
|
+
],
|
|
23419
|
+
"x-codeSamples": [
|
|
23420
|
+
{
|
|
23421
|
+
lang: "JavaScript",
|
|
23422
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst product = await client.products.create({ title: 'title' });\n\nconsole.log(product.id);"
|
|
23423
|
+
}
|
|
22890
23424
|
]
|
|
22891
23425
|
}
|
|
22892
23426
|
},
|
|
@@ -22925,6 +23459,12 @@ var native_spec_default = {
|
|
|
22925
23459
|
tags: [
|
|
22926
23460
|
"Products"
|
|
22927
23461
|
],
|
|
23462
|
+
"x-codeSamples": [
|
|
23463
|
+
{
|
|
23464
|
+
lang: "JavaScript",
|
|
23465
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst product = await client.products.delete('id');\n\nconsole.log(product);"
|
|
23466
|
+
}
|
|
23467
|
+
],
|
|
22928
23468
|
parameters: [
|
|
22929
23469
|
{
|
|
22930
23470
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -22968,6 +23508,12 @@ var native_spec_default = {
|
|
|
22968
23508
|
tags: [
|
|
22969
23509
|
"Products"
|
|
22970
23510
|
],
|
|
23511
|
+
"x-codeSamples": [
|
|
23512
|
+
{
|
|
23513
|
+
lang: "JavaScript",
|
|
23514
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst product = await client.products.retrieve('id');\n\nconsole.log(product.id);"
|
|
23515
|
+
}
|
|
23516
|
+
],
|
|
22971
23517
|
parameters: [
|
|
22972
23518
|
{
|
|
22973
23519
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -23085,6 +23631,12 @@ var native_spec_default = {
|
|
|
23085
23631
|
summary: "Update Product",
|
|
23086
23632
|
tags: [
|
|
23087
23633
|
"Products"
|
|
23634
|
+
],
|
|
23635
|
+
"x-codeSamples": [
|
|
23636
|
+
{
|
|
23637
|
+
lang: "JavaScript",
|
|
23638
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst product = await client.products.update('id');\n\nconsole.log(product.id);"
|
|
23639
|
+
}
|
|
23088
23640
|
]
|
|
23089
23641
|
}
|
|
23090
23642
|
},
|
|
@@ -23289,6 +23841,12 @@ var native_spec_default = {
|
|
|
23289
23841
|
summary: "List Social Accounts",
|
|
23290
23842
|
tags: [
|
|
23291
23843
|
"Social Accounts"
|
|
23844
|
+
],
|
|
23845
|
+
"x-codeSamples": [
|
|
23846
|
+
{
|
|
23847
|
+
lang: "JavaScript",
|
|
23848
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const socialAccount of client.socialAccounts.list()) {\n console.log(socialAccount.id);\n}"
|
|
23849
|
+
}
|
|
23292
23850
|
]
|
|
23293
23851
|
},
|
|
23294
23852
|
post: {
|
|
@@ -23355,6 +23913,12 @@ var native_spec_default = {
|
|
|
23355
23913
|
summary: "Create a Social Account",
|
|
23356
23914
|
tags: [
|
|
23357
23915
|
"Social Accounts"
|
|
23916
|
+
],
|
|
23917
|
+
"x-codeSamples": [
|
|
23918
|
+
{
|
|
23919
|
+
lang: "JavaScript",
|
|
23920
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst socialAccount = await client.socialAccounts.create({ platform: 'facebook' });\n\nconsole.log(socialAccount.id);"
|
|
23921
|
+
}
|
|
23358
23922
|
]
|
|
23359
23923
|
}
|
|
23360
23924
|
},
|
|
@@ -23447,6 +24011,12 @@ var native_spec_default = {
|
|
|
23447
24011
|
summary: "Connect a Social Account",
|
|
23448
24012
|
tags: [
|
|
23449
24013
|
"Social Accounts"
|
|
24014
|
+
],
|
|
24015
|
+
"x-codeSamples": [
|
|
24016
|
+
{
|
|
24017
|
+
lang: "JavaScript",
|
|
24018
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.socialAccounts.connect({ platform: 'meta_business' });\n\nconsole.log(response.authorize_url);"
|
|
24019
|
+
}
|
|
23450
24020
|
]
|
|
23451
24021
|
}
|
|
23452
24022
|
},
|
|
@@ -23525,6 +24095,12 @@ var native_spec_default = {
|
|
|
23525
24095
|
summary: "Delete a Social Account",
|
|
23526
24096
|
tags: [
|
|
23527
24097
|
"Social Accounts"
|
|
24098
|
+
],
|
|
24099
|
+
"x-codeSamples": [
|
|
24100
|
+
{
|
|
24101
|
+
lang: "JavaScript",
|
|
24102
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst socialAccount = await client.socialAccounts.delete('id');\n\nconsole.log(socialAccount);"
|
|
24103
|
+
}
|
|
23528
24104
|
]
|
|
23529
24105
|
}
|
|
23530
24106
|
},
|
|
@@ -23646,6 +24222,12 @@ var native_spec_default = {
|
|
|
23646
24222
|
summary: "List Social Account Posts",
|
|
23647
24223
|
tags: [
|
|
23648
24224
|
"Social Accounts"
|
|
24225
|
+
],
|
|
24226
|
+
"x-codeSamples": [
|
|
24227
|
+
{
|
|
24228
|
+
lang: "JavaScript",
|
|
24229
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.socialAccounts.posts('id', { account_id: 'account_id' });\n\nconsole.log(response.data);"
|
|
24230
|
+
}
|
|
23649
24231
|
]
|
|
23650
24232
|
}
|
|
23651
24233
|
},
|
|
@@ -23734,6 +24316,12 @@ var native_spec_default = {
|
|
|
23734
24316
|
tags: [
|
|
23735
24317
|
"Stats"
|
|
23736
24318
|
],
|
|
24319
|
+
"x-codeSamples": [
|
|
24320
|
+
{
|
|
24321
|
+
lang: "JavaScript",
|
|
24322
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst stats = await client.stats.list();\n\nconsole.log(stats.data);"
|
|
24323
|
+
}
|
|
24324
|
+
],
|
|
23737
24325
|
parameters: [
|
|
23738
24326
|
{
|
|
23739
24327
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -24094,6 +24682,12 @@ var native_spec_default = {
|
|
|
24094
24682
|
summary: "Retrieve Metric",
|
|
24095
24683
|
tags: [
|
|
24096
24684
|
"Stats"
|
|
24685
|
+
],
|
|
24686
|
+
"x-codeSamples": [
|
|
24687
|
+
{
|
|
24688
|
+
lang: "JavaScript",
|
|
24689
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst stat = await client.stats.retrieve('metric', { from: 'from', to: 'to' });\n\nconsole.log(stat.data);"
|
|
24690
|
+
}
|
|
24097
24691
|
]
|
|
24098
24692
|
}
|
|
24099
24693
|
},
|
|
@@ -24191,6 +24785,12 @@ var native_spec_default = {
|
|
|
24191
24785
|
summary: "List Swaps",
|
|
24192
24786
|
tags: [
|
|
24193
24787
|
"Swaps"
|
|
24788
|
+
],
|
|
24789
|
+
"x-codeSamples": [
|
|
24790
|
+
{
|
|
24791
|
+
lang: "JavaScript",
|
|
24792
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst swaps = await client.swaps.list({ account_id: 'account_id' });\n\nconsole.log(swaps.data);"
|
|
24793
|
+
}
|
|
24194
24794
|
]
|
|
24195
24795
|
},
|
|
24196
24796
|
post: {
|
|
@@ -24338,6 +24938,12 @@ var native_spec_default = {
|
|
|
24338
24938
|
summary: "Create Swap",
|
|
24339
24939
|
tags: [
|
|
24340
24940
|
"Swaps"
|
|
24941
|
+
],
|
|
24942
|
+
"x-codeSamples": [
|
|
24943
|
+
{
|
|
24944
|
+
lang: "JavaScript",
|
|
24945
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst swap = await client.swaps.create({\n account_id: 'account_id',\n amount: 'amount',\n from_token: 'from_token',\n to_token: 'to_token',\n});\n\nconsole.log(swap.id);"
|
|
24946
|
+
}
|
|
24341
24947
|
]
|
|
24342
24948
|
}
|
|
24343
24949
|
},
|
|
@@ -24537,6 +25143,12 @@ var native_spec_default = {
|
|
|
24537
25143
|
summary: "Create Swap Quote",
|
|
24538
25144
|
tags: [
|
|
24539
25145
|
"Swaps"
|
|
25146
|
+
],
|
|
25147
|
+
"x-codeSamples": [
|
|
25148
|
+
{
|
|
25149
|
+
lang: "JavaScript",
|
|
25150
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop();\n\nconst response = await client.swaps.createQuote({\n amount: 'amount',\n from_token: 'from_token',\n to_token: 'to_token',\n});\n\nconsole.log(response.bridge_fee);"
|
|
25151
|
+
}
|
|
24540
25152
|
]
|
|
24541
25153
|
}
|
|
24542
25154
|
},
|
|
@@ -24630,6 +25242,12 @@ var native_spec_default = {
|
|
|
24630
25242
|
summary: "Retrieve Swap",
|
|
24631
25243
|
tags: [
|
|
24632
25244
|
"Swaps"
|
|
25245
|
+
],
|
|
25246
|
+
"x-codeSamples": [
|
|
25247
|
+
{
|
|
25248
|
+
lang: "JavaScript",
|
|
25249
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst swap = await client.swaps.retrieve('id');\n\nconsole.log(swap.id);"
|
|
25250
|
+
}
|
|
24633
25251
|
]
|
|
24634
25252
|
}
|
|
24635
25253
|
},
|
|
@@ -24869,6 +25487,12 @@ var native_spec_default = {
|
|
|
24869
25487
|
summary: "List Transfers",
|
|
24870
25488
|
tags: [
|
|
24871
25489
|
"Transfers"
|
|
25490
|
+
],
|
|
25491
|
+
"x-codeSamples": [
|
|
25492
|
+
{
|
|
25493
|
+
lang: "JavaScript",
|
|
25494
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const transferListResponse of client.transfers.list()) {\n console.log(transferListResponse.id);\n}"
|
|
25495
|
+
}
|
|
24872
25496
|
]
|
|
24873
25497
|
},
|
|
24874
25498
|
post: {
|
|
@@ -25330,6 +25954,12 @@ var native_spec_default = {
|
|
|
25330
25954
|
summary: "Create Transfer",
|
|
25331
25955
|
tags: [
|
|
25332
25956
|
"Transfers"
|
|
25957
|
+
],
|
|
25958
|
+
"x-codeSamples": [
|
|
25959
|
+
{
|
|
25960
|
+
lang: "JavaScript",
|
|
25961
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst transfer = await client.transfers.create({ amount: 0, origin_id: 'origin_id' });\n\nconsole.log(transfer);"
|
|
25962
|
+
}
|
|
25333
25963
|
]
|
|
25334
25964
|
}
|
|
25335
25965
|
},
|
|
@@ -25571,6 +26201,12 @@ var native_spec_default = {
|
|
|
25571
26201
|
tags: [
|
|
25572
26202
|
"Transfers"
|
|
25573
26203
|
],
|
|
26204
|
+
"x-codeSamples": [
|
|
26205
|
+
{
|
|
26206
|
+
lang: "JavaScript",
|
|
26207
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst transfer = await client.transfers.retrieve('id');\n\nconsole.log(transfer.id);"
|
|
26208
|
+
}
|
|
26209
|
+
],
|
|
25574
26210
|
parameters: [
|
|
25575
26211
|
{
|
|
25576
26212
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -25708,6 +26344,12 @@ var native_spec_default = {
|
|
|
25708
26344
|
summary: "List Users",
|
|
25709
26345
|
tags: [
|
|
25710
26346
|
"Users"
|
|
26347
|
+
],
|
|
26348
|
+
"x-codeSamples": [
|
|
26349
|
+
{
|
|
26350
|
+
lang: "JavaScript",
|
|
26351
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const user of client.users.list()) {\n console.log(user.id);\n}"
|
|
26352
|
+
}
|
|
25711
26353
|
]
|
|
25712
26354
|
}
|
|
25713
26355
|
},
|
|
@@ -25787,6 +26429,12 @@ var native_spec_default = {
|
|
|
25787
26429
|
summary: "Update Current User",
|
|
25788
26430
|
tags: [
|
|
25789
26431
|
"Users"
|
|
26432
|
+
],
|
|
26433
|
+
"x-codeSamples": [
|
|
26434
|
+
{
|
|
26435
|
+
lang: "JavaScript",
|
|
26436
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst user = await client.users.updateMe();\n\nconsole.log(user.id);"
|
|
26437
|
+
}
|
|
25790
26438
|
]
|
|
25791
26439
|
}
|
|
25792
26440
|
},
|
|
@@ -25892,6 +26540,12 @@ var native_spec_default = {
|
|
|
25892
26540
|
summary: "Retrieve User",
|
|
25893
26541
|
tags: [
|
|
25894
26542
|
"Users"
|
|
26543
|
+
],
|
|
26544
|
+
"x-codeSamples": [
|
|
26545
|
+
{
|
|
26546
|
+
lang: "JavaScript",
|
|
26547
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst user = await client.users.retrieve('id');\n\nconsole.log(user.id);"
|
|
26548
|
+
}
|
|
25895
26549
|
]
|
|
25896
26550
|
},
|
|
25897
26551
|
patch: {
|
|
@@ -25974,6 +26628,12 @@ var native_spec_default = {
|
|
|
25974
26628
|
summary: "Update User",
|
|
25975
26629
|
tags: [
|
|
25976
26630
|
"Users"
|
|
26631
|
+
],
|
|
26632
|
+
"x-codeSamples": [
|
|
26633
|
+
{
|
|
26634
|
+
lang: "JavaScript",
|
|
26635
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst user = await client.users.update('id');\n\nconsole.log(user.id);"
|
|
26636
|
+
}
|
|
25977
26637
|
]
|
|
25978
26638
|
}
|
|
25979
26639
|
},
|
|
@@ -26019,6 +26679,12 @@ var native_spec_default = {
|
|
|
26019
26679
|
tags: [
|
|
26020
26680
|
"Users"
|
|
26021
26681
|
],
|
|
26682
|
+
"x-codeSamples": [
|
|
26683
|
+
{
|
|
26684
|
+
lang: "JavaScript",
|
|
26685
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.users.checkAccess('resource_id', { id: 'id' });\n\nconsole.log(response.access_level);"
|
|
26686
|
+
}
|
|
26687
|
+
],
|
|
26022
26688
|
parameters: [
|
|
26023
26689
|
{
|
|
26024
26690
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -26088,6 +26754,12 @@ var native_spec_default = {
|
|
|
26088
26754
|
tags: [
|
|
26089
26755
|
"Users"
|
|
26090
26756
|
],
|
|
26757
|
+
"x-codeSamples": [
|
|
26758
|
+
{
|
|
26759
|
+
lang: "JavaScript",
|
|
26760
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.users.recommendActions('id');\n\nconsole.log(response.data);"
|
|
26761
|
+
}
|
|
26762
|
+
],
|
|
26091
26763
|
parameters: [
|
|
26092
26764
|
{
|
|
26093
26765
|
$ref: "#/components/parameters/ApiVersionDate"
|
|
@@ -26431,6 +27103,12 @@ var native_spec_default = {
|
|
|
26431
27103
|
summary: "List Verifications",
|
|
26432
27104
|
tags: [
|
|
26433
27105
|
"Verifications"
|
|
27106
|
+
],
|
|
27107
|
+
"x-codeSamples": [
|
|
27108
|
+
{
|
|
27109
|
+
lang: "JavaScript",
|
|
27110
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst verifications = await client.verifications.list({ account_id: 'account_id' });\n\nconsole.log(verifications.data);"
|
|
27111
|
+
}
|
|
26434
27112
|
]
|
|
26435
27113
|
},
|
|
26436
27114
|
post: {
|
|
@@ -27186,6 +27864,12 @@ var native_spec_default = {
|
|
|
27186
27864
|
summary: "Create Verification",
|
|
27187
27865
|
tags: [
|
|
27188
27866
|
"Verifications"
|
|
27867
|
+
],
|
|
27868
|
+
"x-codeSamples": [
|
|
27869
|
+
{
|
|
27870
|
+
lang: "JavaScript",
|
|
27871
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst verification = await client.verifications.create({ account_id: 'account_id' });\n\nconsole.log(verification.id);"
|
|
27872
|
+
}
|
|
27189
27873
|
]
|
|
27190
27874
|
}
|
|
27191
27875
|
},
|
|
@@ -27476,6 +28160,12 @@ var native_spec_default = {
|
|
|
27476
28160
|
summary: "Retrieve Verification",
|
|
27477
28161
|
tags: [
|
|
27478
28162
|
"Verifications"
|
|
28163
|
+
],
|
|
28164
|
+
"x-codeSamples": [
|
|
28165
|
+
{
|
|
28166
|
+
lang: "JavaScript",
|
|
28167
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst verification = await client.verifications.retrieve('verification_id');\n\nconsole.log(verification.id);"
|
|
28168
|
+
}
|
|
27479
28169
|
]
|
|
27480
28170
|
},
|
|
27481
28171
|
patch: {
|
|
@@ -28090,6 +28780,12 @@ var native_spec_default = {
|
|
|
28090
28780
|
summary: "Update Verification",
|
|
28091
28781
|
tags: [
|
|
28092
28782
|
"Verifications"
|
|
28783
|
+
],
|
|
28784
|
+
"x-codeSamples": [
|
|
28785
|
+
{
|
|
28786
|
+
lang: "JavaScript",
|
|
28787
|
+
source: "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst verification = await client.verifications.update('verification_id');\n\nconsole.log(verification.id);"
|
|
28788
|
+
}
|
|
28093
28789
|
]
|
|
28094
28790
|
}
|
|
28095
28791
|
}
|
|
@@ -39644,7 +40340,7 @@ import { createRequire as createRequire2 } from "module";
|
|
|
39644
40340
|
// src/lib/build-info.ts
|
|
39645
40341
|
var buildChannel = true ? "npm" : "dev";
|
|
39646
40342
|
var buildTarget = typeof WHOP_CLI_TARGET === "string" ? WHOP_CLI_TARGET : null;
|
|
39647
|
-
var buildVersion = true ? "0.10.
|
|
40343
|
+
var buildVersion = true ? "0.10.1" : null;
|
|
39648
40344
|
function isHomebrewPath(execPath, env = process.env) {
|
|
39649
40345
|
if (/[/\\](Cellar|homebrew|linuxbrew)[/\\]/.test(execPath)) return true;
|
|
39650
40346
|
const prefix = env.HOMEBREW_PREFIX?.trim();
|
|
@@ -40163,6 +40859,8 @@ var WHOP_SCOPES = [
|
|
|
40163
40859
|
"membership:update",
|
|
40164
40860
|
"notification:create",
|
|
40165
40861
|
"openid",
|
|
40862
|
+
"partner:basic:read",
|
|
40863
|
+
"partner:create",
|
|
40166
40864
|
"payment:basic:read",
|
|
40167
40865
|
"payment:charge",
|
|
40168
40866
|
"payment:dispute",
|
|
@@ -44401,7 +45099,7 @@ function sleep2(ms) {
|
|
|
44401
45099
|
// package.json
|
|
44402
45100
|
var package_default = {
|
|
44403
45101
|
name: "@whop/cli",
|
|
44404
|
-
version: "0.10.
|
|
45102
|
+
version: "0.10.1",
|
|
44405
45103
|
description: "The Whop CLI \u2014 build and manage Whop apps from your terminal. Human and agent friendly.",
|
|
44406
45104
|
keywords: [
|
|
44407
45105
|
"agent",
|
|
@@ -44460,7 +45158,7 @@ var package_default = {
|
|
|
44460
45158
|
devDependencies: {
|
|
44461
45159
|
"@types/node": "25.3.5",
|
|
44462
45160
|
fflate: "0.8.2",
|
|
44463
|
-
incur: "github:whopio/incur#
|
|
45161
|
+
incur: "github:whopio/incur#b0550076a7a66790e4d30db38103d8a91602b6cb",
|
|
44464
45162
|
tsup: "8.5.0",
|
|
44465
45163
|
tsx: "4.19.4",
|
|
44466
45164
|
typescript: "5.9.3",
|