@whop/cli 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{api-E6Y2WAEG.js → api-P7EWPZKG.js} +2 -2
- package/dist/{chunk-X34EUMEM.js → chunk-GKKJXDPK.js} +16912 -16707
- package/dist/chunk-GKKJXDPK.js.map +1 -0
- package/dist/index.js +153 -191
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/skills/whop-accounts/SKILL.md +22 -0
- package/skills/whop-ad-campaigns/SKILL.md +24 -0
- package/skills/whop-ad-groups/SKILL.md +24 -0
- package/skills/whop-ads/SKILL.md +24 -0
- package/skills/whop-audiences/SKILL.md +20 -0
- package/skills/whop-cards/SKILL.md +21 -0
- package/skills/whop-checkout-configurations/SKILL.md +21 -0
- package/skills/whop-deposits/SKILL.md +19 -0
- package/skills/whop-ledgers/SKILL.md +19 -0
- package/skills/whop-payouts/SKILL.md +19 -0
- package/skills/whop-plans/SKILL.md +23 -0
- package/skills/whop-products/SKILL.md +22 -0
- package/skills/whop-referrals/SKILL.md +22 -0
- package/skills/whop-swaps/SKILL.md +21 -0
- package/skills/whop-transfers/SKILL.md +20 -0
- package/skills/whop-users/SKILL.md +22 -0
- package/skills/whop-verifications/SKILL.md +21 -0
- package/dist/chunk-X34EUMEM.js.map +0 -1
- /package/dist/{api-E6Y2WAEG.js.map → api-P7EWPZKG.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -35,101 +35,145 @@ import {
|
|
|
35
35
|
switchProfile,
|
|
36
36
|
upsertProfile,
|
|
37
37
|
validateApiKey
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-GKKJXDPK.js";
|
|
39
39
|
import {
|
|
40
40
|
external_exports
|
|
41
41
|
} from "./chunk-KFCNNWPI.js";
|
|
42
42
|
|
|
43
43
|
// src/api/groups.json
|
|
44
44
|
var groups_default = [
|
|
45
|
-
|
|
46
|
-
"accounts",
|
|
47
|
-
"Accounts"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
"
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
"
|
|
131
|
-
|
|
132
|
-
|
|
45
|
+
{
|
|
46
|
+
name: "accounts",
|
|
47
|
+
tag: "Accounts",
|
|
48
|
+
description: "A business on Whop: profile, wallet, capabilities, settings.",
|
|
49
|
+
group: "Core Resources"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "users",
|
|
53
|
+
tag: "Users",
|
|
54
|
+
description: "A person on Whop: profile and connected identities.",
|
|
55
|
+
group: "Core Resources"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "stats",
|
|
59
|
+
tag: "Stats",
|
|
60
|
+
description: "Aggregated financial time series for reporting.",
|
|
61
|
+
group: "Core Resources"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "ledgers",
|
|
65
|
+
tag: "Ledgers",
|
|
66
|
+
description: "The activity feed behind an account or user's balance.",
|
|
67
|
+
group: "Money"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "payouts",
|
|
71
|
+
tag: "Payouts",
|
|
72
|
+
description: "Send money from a balance to a bank or wallet.",
|
|
73
|
+
group: "Money"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "cards",
|
|
77
|
+
tag: "Cards",
|
|
78
|
+
description: "Issue cards that spend from a balance.",
|
|
79
|
+
group: "Money"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: "transfers",
|
|
83
|
+
tag: "Transfers",
|
|
84
|
+
description: "Move funds between Whop accounts and users.",
|
|
85
|
+
group: "Money"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "deposits",
|
|
89
|
+
tag: "Deposits",
|
|
90
|
+
description: "Add funds to a balance.",
|
|
91
|
+
group: "Money"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: "swaps",
|
|
95
|
+
tag: "Swaps",
|
|
96
|
+
description: "Convert a balance between currencies.",
|
|
97
|
+
group: "Money"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: "verifications",
|
|
101
|
+
tag: "Verifications",
|
|
102
|
+
description: "Identity review required before payouts and card issuing.",
|
|
103
|
+
group: "Money"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "products",
|
|
107
|
+
tag: "Products",
|
|
108
|
+
description: "The things you sell. Each owns plans and a store page.",
|
|
109
|
+
group: "Commerce"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: "plans",
|
|
113
|
+
tag: "Plans",
|
|
114
|
+
description: "Pricing for a product: one-time, recurring, trials, stock.",
|
|
115
|
+
group: "Commerce"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: "checkout-configurations",
|
|
119
|
+
tag: "Checkout Configurations",
|
|
120
|
+
description: "Turn a plan into a shareable, prefilled checkout link.",
|
|
121
|
+
group: "Commerce"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: "referrals",
|
|
125
|
+
tag: "Referrals",
|
|
126
|
+
description: "Track who referred a purchase and what they earn.",
|
|
127
|
+
group: "Commerce"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "people",
|
|
131
|
+
tag: "People",
|
|
132
|
+
description: "Visitors and customers of an account, aggregated from pixel events.",
|
|
133
|
+
group: "Tracking"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: "events",
|
|
137
|
+
tag: "Events",
|
|
138
|
+
description: "Conversion and engagement events tracked for attribution.",
|
|
139
|
+
group: "Tracking"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: "ads",
|
|
143
|
+
tag: "Ads",
|
|
144
|
+
description: "The creative: copy, assets, and destination URL.",
|
|
145
|
+
group: "Ads"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: "ad-campaigns",
|
|
149
|
+
tag: "Ad Campaigns",
|
|
150
|
+
description: "Platform, objective, and budget for a set of ads.",
|
|
151
|
+
group: "Ads"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: "ad-groups",
|
|
155
|
+
tag: "Ad Groups",
|
|
156
|
+
description: "Audience, placements, and schedule within a campaign.",
|
|
157
|
+
group: "Ads"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: "audiences",
|
|
161
|
+
tag: "Audiences",
|
|
162
|
+
description: "Reusable targeting lists for ad groups.",
|
|
163
|
+
group: "Ads"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: "media",
|
|
167
|
+
tag: "Media",
|
|
168
|
+
description: "AI-generated assets, billed from a balance, attachable wherever files are accepted.",
|
|
169
|
+
group: "Media"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: "social-accounts",
|
|
173
|
+
tag: "Social Accounts",
|
|
174
|
+
description: "Connected Facebook and Instagram accounts that run ads.",
|
|
175
|
+
group: "Identity"
|
|
176
|
+
}
|
|
133
177
|
];
|
|
134
178
|
|
|
135
179
|
// src/auth/commands.ts
|
|
@@ -318,7 +362,7 @@ async function loginAdapter(c2) {
|
|
|
318
362
|
const accountId = getActiveProfile()?.accountId ?? "";
|
|
319
363
|
if (accountId) {
|
|
320
364
|
try {
|
|
321
|
-
const { createWhopFetch: createWhopFetch2 } = await import("./api-
|
|
365
|
+
const { createWhopFetch: createWhopFetch2 } = await import("./api-P7EWPZKG.js");
|
|
322
366
|
const fetch3 = createWhopFetch2();
|
|
323
367
|
const res = await fetch3(
|
|
324
368
|
new Request(
|
|
@@ -2340,7 +2384,7 @@ ${c.success("\u2713 Your store is fully set up.")}`);
|
|
|
2340
2384
|
// package.json
|
|
2341
2385
|
var package_default = {
|
|
2342
2386
|
name: "@whop/cli",
|
|
2343
|
-
version: "0.
|
|
2387
|
+
version: "0.6.0",
|
|
2344
2388
|
description: "The Whop CLI \u2014 build and manage Whop apps from your terminal. Human and agent friendly.",
|
|
2345
2389
|
keywords: [
|
|
2346
2390
|
"agent",
|
|
@@ -2361,7 +2405,8 @@ var package_default = {
|
|
|
2361
2405
|
"whop-cli": "dist/index.js"
|
|
2362
2406
|
},
|
|
2363
2407
|
files: [
|
|
2364
|
-
"dist"
|
|
2408
|
+
"dist",
|
|
2409
|
+
"skills"
|
|
2365
2410
|
],
|
|
2366
2411
|
type: "module",
|
|
2367
2412
|
exports: {
|
|
@@ -2913,7 +2958,9 @@ var HANDWRITTEN_GROUPS = [
|
|
|
2913
2958
|
var HANDWRITTEN_GROUP_NAMES = new Set(
|
|
2914
2959
|
HANDWRITTEN_GROUPS.map(({ name }) => name)
|
|
2915
2960
|
);
|
|
2916
|
-
var API_GROUPS = groups_default.
|
|
2961
|
+
var API_GROUPS = groups_default.filter(
|
|
2962
|
+
({ name }) => !HANDWRITTEN_GROUP_NAMES.has(name)
|
|
2963
|
+
);
|
|
2917
2964
|
var COMMAND_GROUPS = [...API_GROUPS, ...HANDWRITTEN_GROUPS];
|
|
2918
2965
|
async function registerHandwrittenGroups(cli2) {
|
|
2919
2966
|
for (const group of HANDWRITTEN_GROUPS) await group.register(cli2);
|
|
@@ -3007,6 +3054,11 @@ var cli = Cli_exports.create("whop", {
|
|
|
3007
3054
|
description: "Build and manage Whop apps from your terminal.",
|
|
3008
3055
|
renderer: render,
|
|
3009
3056
|
sync: {
|
|
3057
|
+
// Shipped skill files generated by scripts/sync-spec.ts from the
|
|
3058
|
+
// spec's own tag copy (x-whop-summary + description, authored in
|
|
3059
|
+
// backend/openapi/v1/tags.yml). A matching directory name overrides
|
|
3060
|
+
// the auto-generated skill for that command group.
|
|
3061
|
+
include: ["skills/*"],
|
|
3010
3062
|
suggestions: [
|
|
3011
3063
|
"start selling on Whop",
|
|
3012
3064
|
"show my Whop business accounts",
|
|
@@ -3058,100 +3110,12 @@ cli.use(async (c2, next) => {
|
|
|
3058
3110
|
return next();
|
|
3059
3111
|
});
|
|
3060
3112
|
await registerHandwrittenGroups(cli);
|
|
3061
|
-
for (const { name, tag } of API_GROUPS) {
|
|
3062
|
-
cli.command(name, { fetch: fetch2, openapi: spec(tag) });
|
|
3113
|
+
for (const { name, tag, description } of API_GROUPS) {
|
|
3114
|
+
cli.command(name, { description, fetch: fetch2, openapi: spec(tag) });
|
|
3063
3115
|
}
|
|
3064
3116
|
var cli_default = cli;
|
|
3065
3117
|
|
|
3066
|
-
// src/api/api-structure.json
|
|
3067
|
-
var api_structure_default = [
|
|
3068
|
-
{
|
|
3069
|
-
group: "Core Resources",
|
|
3070
|
-
tags: [
|
|
3071
|
-
"Accounts",
|
|
3072
|
-
"Users",
|
|
3073
|
-
"Webhooks",
|
|
3074
|
-
"Stats"
|
|
3075
|
-
]
|
|
3076
|
-
},
|
|
3077
|
-
{
|
|
3078
|
-
group: "Money",
|
|
3079
|
-
tags: [
|
|
3080
|
-
"Ledgers",
|
|
3081
|
-
"Payouts",
|
|
3082
|
-
"Cards",
|
|
3083
|
-
"Transfers",
|
|
3084
|
-
"Deposits",
|
|
3085
|
-
"Swaps",
|
|
3086
|
-
"Payout Methods",
|
|
3087
|
-
"Verifications"
|
|
3088
|
-
]
|
|
3089
|
-
},
|
|
3090
|
-
{
|
|
3091
|
-
group: "Commerce",
|
|
3092
|
-
tags: [
|
|
3093
|
-
"Products",
|
|
3094
|
-
"Plans",
|
|
3095
|
-
"Checkout Configurations",
|
|
3096
|
-
"Referrals"
|
|
3097
|
-
]
|
|
3098
|
-
},
|
|
3099
|
-
{
|
|
3100
|
-
group: "Tracking",
|
|
3101
|
-
tags: [
|
|
3102
|
-
"People",
|
|
3103
|
-
"Events"
|
|
3104
|
-
]
|
|
3105
|
-
},
|
|
3106
|
-
{
|
|
3107
|
-
group: "Ads",
|
|
3108
|
-
tags: [
|
|
3109
|
-
"Ads",
|
|
3110
|
-
"Ad Campaigns",
|
|
3111
|
-
"Ad Groups",
|
|
3112
|
-
"Audiences"
|
|
3113
|
-
]
|
|
3114
|
-
},
|
|
3115
|
-
{
|
|
3116
|
-
group: "Media",
|
|
3117
|
-
tags: [
|
|
3118
|
-
"Media"
|
|
3119
|
-
]
|
|
3120
|
-
},
|
|
3121
|
-
{
|
|
3122
|
-
group: "Identity",
|
|
3123
|
-
tags: [
|
|
3124
|
-
"Social Accounts"
|
|
3125
|
-
]
|
|
3126
|
-
}
|
|
3127
|
-
];
|
|
3128
|
-
|
|
3129
|
-
// src/api/tag-descriptions.json
|
|
3130
|
-
var tag_descriptions_default = {
|
|
3131
|
-
Accounts: "Your Whop account",
|
|
3132
|
-
Users: "Users on your platform",
|
|
3133
|
-
Stats: "Platform-wide statistics",
|
|
3134
|
-
Ledgers: "Transaction history",
|
|
3135
|
-
Payouts: "Withdraw earnings",
|
|
3136
|
-
Cards: "Issued virtual cards",
|
|
3137
|
-
Transfers: "Move funds between accounts",
|
|
3138
|
-
Deposits: "Add funds to your balance",
|
|
3139
|
-
Swaps: "Convert between currencies",
|
|
3140
|
-
Verifications: "Identity verification status",
|
|
3141
|
-
Products: "What you're selling",
|
|
3142
|
-
Plans: "Pricing for your products",
|
|
3143
|
-
"Checkout Configurations": "Optional / advanced: customize the checkout page",
|
|
3144
|
-
Referrals: "Referral programs",
|
|
3145
|
-
Ads: "Ad creatives",
|
|
3146
|
-
"Ad Campaigns": "Top-level campaign organization",
|
|
3147
|
-
"Ad Groups": "Sets of related ads",
|
|
3148
|
-
Audiences: "Who sees your ads",
|
|
3149
|
-
"Social Accounts": "Linked social profiles"
|
|
3150
|
-
};
|
|
3151
|
-
|
|
3152
3118
|
// src/lib/grouped-help.ts
|
|
3153
|
-
var descriptions = tag_descriptions_default;
|
|
3154
|
-
var toCliName = (tag) => tag.toLowerCase().replace(/\s+/g, "-");
|
|
3155
3119
|
var SECTION_LABELS = {
|
|
3156
3120
|
"get-started": "Get Started",
|
|
3157
3121
|
auth: "Auth"
|
|
@@ -3188,14 +3152,12 @@ var handwrittenSection = (section) => ({
|
|
|
3188
3152
|
});
|
|
3189
3153
|
function buildGroupedHelp(version, description) {
|
|
3190
3154
|
const lines = [];
|
|
3191
|
-
const
|
|
3192
|
-
const
|
|
3193
|
-
label
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
}))
|
|
3198
|
-
})).filter((section) => section.commands.length > 0);
|
|
3155
|
+
const apiSections = [];
|
|
3156
|
+
for (const { name, description: description2, group } of API_GROUPS) {
|
|
3157
|
+
let section = apiSections.find((s) => s.label === group);
|
|
3158
|
+
if (!section) apiSections.push(section = { label: group, commands: [] });
|
|
3159
|
+
section.commands.push({ name, description: description2 });
|
|
3160
|
+
}
|
|
3199
3161
|
const commerceSections = apiSections.filter(
|
|
3200
3162
|
(section) => section.label.toLowerCase() === "commerce"
|
|
3201
3163
|
);
|