@whop/cli 0.1.0 → 0.3.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-3MQ6MQGV.js → api-A6NYSDKW.js} +4 -4
- package/dist/{chunk-ET6QSHSA.js → chunk-4WNH276N.js} +778 -131
- package/dist/chunk-4WNH276N.js.map +1 -0
- package/dist/index.js +1290 -477
- package/dist/index.js.map +1 -1
- package/dist/vite.d.ts +5 -0
- package/dist/vite.js +811 -0
- package/dist/vite.js.map +1 -0
- package/package.json +12 -3
- package/dist/chunk-ET6QSHSA.js.map +0 -1
- /package/dist/{api-3MQ6MQGV.js.map → api-A6NYSDKW.js.map} +0 -0
|
@@ -541,7 +541,7 @@ var native_spec_default = {
|
|
|
541
541
|
"string",
|
|
542
542
|
"null"
|
|
543
543
|
],
|
|
544
|
-
description: "ID of the tax classification code applied by default to the account's products."
|
|
544
|
+
description: "ID of the tax classification code applied by default to the account's products. See the available [product categories](https://docs.numeral.com/essentials/product-categories)."
|
|
545
545
|
},
|
|
546
546
|
business_address: {
|
|
547
547
|
type: "object",
|
|
@@ -4701,7 +4701,7 @@ var native_spec_default = {
|
|
|
4701
4701
|
]
|
|
4702
4702
|
}
|
|
4703
4703
|
],
|
|
4704
|
-
description: "Ranks referrers by business referral earnings \u2014 all-time by default, or over the current day, month, or
|
|
4704
|
+
description: "Ranks referrers by business referral earnings \u2014 all-time by default, or over the current day, month, year, or trailing 30 days \u2014 and includes the caller's own standing.",
|
|
4705
4705
|
operationId: "businesses-leaderboard",
|
|
4706
4706
|
parameters: [
|
|
4707
4707
|
{
|
|
@@ -4717,11 +4717,12 @@ var native_spec_default = {
|
|
|
4717
4717
|
"day",
|
|
4718
4718
|
"month",
|
|
4719
4719
|
"year",
|
|
4720
|
+
"last_30_days",
|
|
4720
4721
|
"all_time"
|
|
4721
4722
|
],
|
|
4722
4723
|
default: "all_time"
|
|
4723
4724
|
},
|
|
4724
|
-
description: "Time window for the rankings. `day`, `month`, and `year` count earnings since the start of the current calendar day, month, or year; `all_time` ranks lifetime earnings."
|
|
4725
|
+
description: "Time window for the rankings. `day`, `month`, and `year` count earnings since the start of the current calendar day, month, or year; `last_30_days` counts earnings over the trailing 30 days; `all_time` ranks lifetime earnings."
|
|
4725
4726
|
}
|
|
4726
4727
|
],
|
|
4727
4728
|
responses: {
|
|
@@ -7805,7 +7806,7 @@ var native_spec_default = {
|
|
|
7805
7806
|
},
|
|
7806
7807
|
{}
|
|
7807
7808
|
],
|
|
7808
|
-
description: "Tracks a conversion or engagement event for
|
|
7809
|
+
description: "Tracks a conversion or engagement event for an account.",
|
|
7809
7810
|
operationId: "create",
|
|
7810
7811
|
parameters: [],
|
|
7811
7812
|
responses: {
|
|
@@ -7834,6 +7835,10 @@ var native_spec_default = {
|
|
|
7834
7835
|
schema: {
|
|
7835
7836
|
type: "object",
|
|
7836
7837
|
properties: {
|
|
7838
|
+
account_id: {
|
|
7839
|
+
type: "string",
|
|
7840
|
+
description: "The account to associate with this event."
|
|
7841
|
+
},
|
|
7837
7842
|
action_source: {
|
|
7838
7843
|
oneOf: [
|
|
7839
7844
|
{
|
|
@@ -7857,11 +7862,6 @@ var native_spec_default = {
|
|
|
7857
7862
|
],
|
|
7858
7863
|
description: "Where the event originated."
|
|
7859
7864
|
},
|
|
7860
|
-
company_id: {
|
|
7861
|
-
type: "string",
|
|
7862
|
-
description: "The company to associate with this event.",
|
|
7863
|
-
example: "biz_xxxxxxxxxxxxxx"
|
|
7864
|
-
},
|
|
7865
7865
|
context: {
|
|
7866
7866
|
type: [
|
|
7867
7867
|
"object",
|
|
@@ -8305,26 +8305,26 @@ var native_spec_default = {
|
|
|
8305
8305
|
],
|
|
8306
8306
|
description: "An anonymous identifier for the user."
|
|
8307
8307
|
},
|
|
8308
|
-
|
|
8308
|
+
external_id: {
|
|
8309
8309
|
type: [
|
|
8310
8310
|
"string",
|
|
8311
8311
|
"null"
|
|
8312
8312
|
],
|
|
8313
|
-
description: "
|
|
8313
|
+
description: "An external identifier for the user."
|
|
8314
8314
|
},
|
|
8315
|
-
|
|
8315
|
+
linked_anonymous_id: {
|
|
8316
8316
|
type: [
|
|
8317
8317
|
"string",
|
|
8318
8318
|
"null"
|
|
8319
8319
|
],
|
|
8320
|
-
description: "A
|
|
8320
|
+
description: "A second anonymous identifier to link to this user (e.g. captured across an iframe boundary)."
|
|
8321
8321
|
},
|
|
8322
|
-
|
|
8322
|
+
linked_wuid: {
|
|
8323
8323
|
type: [
|
|
8324
8324
|
"string",
|
|
8325
8325
|
"null"
|
|
8326
8326
|
],
|
|
8327
|
-
description: "
|
|
8327
|
+
description: "A wuid from a linked frame, captured across an iframe boundary."
|
|
8328
8328
|
},
|
|
8329
8329
|
member_id: {
|
|
8330
8330
|
type: [
|
|
@@ -8458,7 +8458,7 @@ var native_spec_default = {
|
|
|
8458
8458
|
}
|
|
8459
8459
|
},
|
|
8460
8460
|
required: [
|
|
8461
|
-
"
|
|
8461
|
+
"account_id",
|
|
8462
8462
|
"event_name"
|
|
8463
8463
|
],
|
|
8464
8464
|
description: "Parameters for CreateConversion"
|
|
@@ -8615,6 +8615,56 @@ var native_spec_default = {
|
|
|
8615
8615
|
"null"
|
|
8616
8616
|
]
|
|
8617
8617
|
},
|
|
8618
|
+
questions: {
|
|
8619
|
+
type: [
|
|
8620
|
+
"array",
|
|
8621
|
+
"null"
|
|
8622
|
+
],
|
|
8623
|
+
items: {
|
|
8624
|
+
type: "object",
|
|
8625
|
+
properties: {
|
|
8626
|
+
id: {
|
|
8627
|
+
type: [
|
|
8628
|
+
"string",
|
|
8629
|
+
"null"
|
|
8630
|
+
]
|
|
8631
|
+
},
|
|
8632
|
+
key: {
|
|
8633
|
+
type: [
|
|
8634
|
+
"string",
|
|
8635
|
+
"null"
|
|
8636
|
+
]
|
|
8637
|
+
},
|
|
8638
|
+
question: {
|
|
8639
|
+
type: [
|
|
8640
|
+
"string",
|
|
8641
|
+
"null"
|
|
8642
|
+
]
|
|
8643
|
+
},
|
|
8644
|
+
type: {
|
|
8645
|
+
type: [
|
|
8646
|
+
"string",
|
|
8647
|
+
"null"
|
|
8648
|
+
]
|
|
8649
|
+
},
|
|
8650
|
+
options: {
|
|
8651
|
+
type: [
|
|
8652
|
+
"array",
|
|
8653
|
+
"null"
|
|
8654
|
+
],
|
|
8655
|
+
items: {
|
|
8656
|
+
type: "string"
|
|
8657
|
+
}
|
|
8658
|
+
},
|
|
8659
|
+
answer: {
|
|
8660
|
+
type: [
|
|
8661
|
+
"string",
|
|
8662
|
+
"null"
|
|
8663
|
+
]
|
|
8664
|
+
}
|
|
8665
|
+
}
|
|
8666
|
+
}
|
|
8667
|
+
},
|
|
8618
8668
|
context: {
|
|
8619
8669
|
type: [
|
|
8620
8670
|
"object",
|
|
@@ -9058,6 +9108,15 @@ var native_spec_default = {
|
|
|
9058
9108
|
},
|
|
9059
9109
|
description: "Grouping granularity for report rows."
|
|
9060
9110
|
},
|
|
9111
|
+
{
|
|
9112
|
+
name: "timezone",
|
|
9113
|
+
in: "query",
|
|
9114
|
+
required: false,
|
|
9115
|
+
schema: {
|
|
9116
|
+
type: "string"
|
|
9117
|
+
},
|
|
9118
|
+
description: "IANA timezone (for example `America/New_York`) used to bucket report periods and to interpret calendar-day boundaries for balance snapshots. Defaults to UTC. from_date/to_date remain exact Unix instants regardless of this setting. Platform-wide (global) reports are UTC-only and reject other timezones."
|
|
9119
|
+
},
|
|
9061
9120
|
{
|
|
9062
9121
|
name: "cumulative",
|
|
9063
9122
|
in: "query",
|
|
@@ -9106,6 +9165,17 @@ var native_spec_default = {
|
|
|
9106
9165
|
amount: {
|
|
9107
9166
|
type: "number"
|
|
9108
9167
|
},
|
|
9168
|
+
profit_and_loss_section: {
|
|
9169
|
+
type: [
|
|
9170
|
+
"string",
|
|
9171
|
+
"null"
|
|
9172
|
+
],
|
|
9173
|
+
enum: [
|
|
9174
|
+
"revenue",
|
|
9175
|
+
"cost_of_revenue",
|
|
9176
|
+
null
|
|
9177
|
+
]
|
|
9178
|
+
},
|
|
9109
9179
|
account_type: {
|
|
9110
9180
|
type: [
|
|
9111
9181
|
"string",
|
|
@@ -9189,6 +9259,574 @@ var native_spec_default = {
|
|
|
9189
9259
|
}
|
|
9190
9260
|
}
|
|
9191
9261
|
},
|
|
9262
|
+
"/payouts/methods": {
|
|
9263
|
+
get: {
|
|
9264
|
+
summary: "List Payout Methods",
|
|
9265
|
+
tags: [
|
|
9266
|
+
"Payouts"
|
|
9267
|
+
],
|
|
9268
|
+
security: [
|
|
9269
|
+
{
|
|
9270
|
+
bearerAuth: [
|
|
9271
|
+
"payout:destination:read"
|
|
9272
|
+
]
|
|
9273
|
+
}
|
|
9274
|
+
],
|
|
9275
|
+
description: "Lists the saved payout methods (bank accounts, digital wallets, crypto addresses) that an account or user can withdraw to, most recently added first. Pass exactly one of account_id (a biz_ identifier) or user_id (a user_ identifier). Pass an amount to additionally get a fee and delivery quote per method for withdrawing that amount.",
|
|
9276
|
+
operationId: "methods",
|
|
9277
|
+
parameters: [
|
|
9278
|
+
{
|
|
9279
|
+
$ref: "#/components/parameters/ApiVersionDate"
|
|
9280
|
+
},
|
|
9281
|
+
{
|
|
9282
|
+
name: "account_id",
|
|
9283
|
+
in: "query",
|
|
9284
|
+
required: false,
|
|
9285
|
+
schema: {
|
|
9286
|
+
type: "string"
|
|
9287
|
+
},
|
|
9288
|
+
description: "The owning account ID (a biz_ identifier). Provide this or user_id."
|
|
9289
|
+
},
|
|
9290
|
+
{
|
|
9291
|
+
name: "user_id",
|
|
9292
|
+
in: "query",
|
|
9293
|
+
required: false,
|
|
9294
|
+
schema: {
|
|
9295
|
+
type: "string"
|
|
9296
|
+
},
|
|
9297
|
+
description: "The owning user ID (a user_ identifier). Provide this or account_id."
|
|
9298
|
+
},
|
|
9299
|
+
{
|
|
9300
|
+
name: "status",
|
|
9301
|
+
in: "query",
|
|
9302
|
+
required: false,
|
|
9303
|
+
schema: {
|
|
9304
|
+
type: "string",
|
|
9305
|
+
enum: [
|
|
9306
|
+
"created",
|
|
9307
|
+
"active",
|
|
9308
|
+
"broken"
|
|
9309
|
+
]
|
|
9310
|
+
},
|
|
9311
|
+
description: "Optional status filter. `created` means saved but unused, `active` means a payout through it succeeded, `broken` means the last payout failed and the method needs fixing."
|
|
9312
|
+
},
|
|
9313
|
+
{
|
|
9314
|
+
name: "amount",
|
|
9315
|
+
in: "query",
|
|
9316
|
+
required: false,
|
|
9317
|
+
schema: {
|
|
9318
|
+
type: "number"
|
|
9319
|
+
},
|
|
9320
|
+
description: "Optional withdrawal amount in whole currency units, for example `250.00`. When provided, each method includes a quote with the estimated fee, amount received, and delivery date for that amount."
|
|
9321
|
+
},
|
|
9322
|
+
{
|
|
9323
|
+
name: "currency",
|
|
9324
|
+
in: "query",
|
|
9325
|
+
required: false,
|
|
9326
|
+
schema: {
|
|
9327
|
+
type: "string",
|
|
9328
|
+
default: "usd"
|
|
9329
|
+
},
|
|
9330
|
+
description: "Currency code of the amount, for example `usd`. Only meaningful with amount."
|
|
9331
|
+
},
|
|
9332
|
+
{
|
|
9333
|
+
name: "include_available",
|
|
9334
|
+
in: "query",
|
|
9335
|
+
required: false,
|
|
9336
|
+
schema: {
|
|
9337
|
+
type: "boolean",
|
|
9338
|
+
default: false
|
|
9339
|
+
},
|
|
9340
|
+
description: "When true, the response also carries available_destinations \u2014 payout rails the account could add as a new payout method, with per-currency quotes when an amount is provided."
|
|
9341
|
+
},
|
|
9342
|
+
{
|
|
9343
|
+
name: "first",
|
|
9344
|
+
in: "query",
|
|
9345
|
+
required: false,
|
|
9346
|
+
schema: {
|
|
9347
|
+
type: "integer",
|
|
9348
|
+
default: 20,
|
|
9349
|
+
maximum: 100
|
|
9350
|
+
},
|
|
9351
|
+
description: "Number of payout methods to return from the start of the window. Capped at 25 when an amount is provided."
|
|
9352
|
+
},
|
|
9353
|
+
{
|
|
9354
|
+
name: "after",
|
|
9355
|
+
in: "query",
|
|
9356
|
+
required: false,
|
|
9357
|
+
schema: {
|
|
9358
|
+
type: "string"
|
|
9359
|
+
},
|
|
9360
|
+
description: "Cursor to fetch the page after (from page_info.end_cursor)."
|
|
9361
|
+
},
|
|
9362
|
+
{
|
|
9363
|
+
name: "last",
|
|
9364
|
+
in: "query",
|
|
9365
|
+
required: false,
|
|
9366
|
+
schema: {
|
|
9367
|
+
type: "integer",
|
|
9368
|
+
maximum: 100
|
|
9369
|
+
},
|
|
9370
|
+
description: "Number of payout methods to return from the end of the window."
|
|
9371
|
+
},
|
|
9372
|
+
{
|
|
9373
|
+
name: "before",
|
|
9374
|
+
in: "query",
|
|
9375
|
+
required: false,
|
|
9376
|
+
schema: {
|
|
9377
|
+
type: "string"
|
|
9378
|
+
},
|
|
9379
|
+
description: "Cursor to fetch the page before (from page_info.start_cursor)."
|
|
9380
|
+
}
|
|
9381
|
+
],
|
|
9382
|
+
responses: {
|
|
9383
|
+
"200": {
|
|
9384
|
+
description: "internal stablecoin destinations omitted",
|
|
9385
|
+
content: {
|
|
9386
|
+
"application/json": {
|
|
9387
|
+
schema: {
|
|
9388
|
+
type: "object",
|
|
9389
|
+
properties: {
|
|
9390
|
+
data: {
|
|
9391
|
+
type: "array",
|
|
9392
|
+
items: {
|
|
9393
|
+
type: "object",
|
|
9394
|
+
properties: {
|
|
9395
|
+
object: {
|
|
9396
|
+
type: "string",
|
|
9397
|
+
enum: [
|
|
9398
|
+
"payout_method"
|
|
9399
|
+
]
|
|
9400
|
+
},
|
|
9401
|
+
id: {
|
|
9402
|
+
type: "string",
|
|
9403
|
+
description: "Payout method ID."
|
|
9404
|
+
},
|
|
9405
|
+
status: {
|
|
9406
|
+
type: "string",
|
|
9407
|
+
enum: [
|
|
9408
|
+
"created",
|
|
9409
|
+
"active",
|
|
9410
|
+
"broken"
|
|
9411
|
+
],
|
|
9412
|
+
description: "Lifecycle status: `created` means saved but unused, `active` means a payout succeeded through it, `broken` means the last payout failed."
|
|
9413
|
+
},
|
|
9414
|
+
is_default: {
|
|
9415
|
+
type: "boolean",
|
|
9416
|
+
description: "Whether this is the default payout method for the account."
|
|
9417
|
+
},
|
|
9418
|
+
nickname: {
|
|
9419
|
+
type: [
|
|
9420
|
+
"string",
|
|
9421
|
+
"null"
|
|
9422
|
+
],
|
|
9423
|
+
description: "User-defined label for the payout method."
|
|
9424
|
+
},
|
|
9425
|
+
account_reference: {
|
|
9426
|
+
type: [
|
|
9427
|
+
"string",
|
|
9428
|
+
"null"
|
|
9429
|
+
],
|
|
9430
|
+
description: "Masked identifier for the destination, such as the last four digits of a bank account."
|
|
9431
|
+
},
|
|
9432
|
+
institution_name: {
|
|
9433
|
+
type: [
|
|
9434
|
+
"string",
|
|
9435
|
+
"null"
|
|
9436
|
+
],
|
|
9437
|
+
description: "Name of the bank or institution receiving payouts."
|
|
9438
|
+
},
|
|
9439
|
+
payer_name: {
|
|
9440
|
+
type: [
|
|
9441
|
+
"string",
|
|
9442
|
+
"null"
|
|
9443
|
+
],
|
|
9444
|
+
description: "Display name of the payout rail, such as `ACH Bank Deposit`."
|
|
9445
|
+
},
|
|
9446
|
+
destination_currency: {
|
|
9447
|
+
type: "string",
|
|
9448
|
+
description: "Currency payouts are delivered in for this method."
|
|
9449
|
+
},
|
|
9450
|
+
created_at: {
|
|
9451
|
+
type: "string",
|
|
9452
|
+
format: "date-time",
|
|
9453
|
+
description: "When the payout method was added."
|
|
9454
|
+
},
|
|
9455
|
+
payout_destination: {
|
|
9456
|
+
type: [
|
|
9457
|
+
"object",
|
|
9458
|
+
"null"
|
|
9459
|
+
],
|
|
9460
|
+
description: "The payout rail this method delivers through.",
|
|
9461
|
+
properties: {
|
|
9462
|
+
name: {
|
|
9463
|
+
type: [
|
|
9464
|
+
"string",
|
|
9465
|
+
"null"
|
|
9466
|
+
],
|
|
9467
|
+
description: "Payout destination display name."
|
|
9468
|
+
},
|
|
9469
|
+
icon_url: {
|
|
9470
|
+
type: [
|
|
9471
|
+
"string",
|
|
9472
|
+
"null"
|
|
9473
|
+
],
|
|
9474
|
+
description: "Payout destination icon URL."
|
|
9475
|
+
},
|
|
9476
|
+
delivery_type: {
|
|
9477
|
+
type: "string",
|
|
9478
|
+
description: "How funds are delivered, for example `bank_deposit`."
|
|
9479
|
+
},
|
|
9480
|
+
supports_standard_delivery: {
|
|
9481
|
+
type: "boolean"
|
|
9482
|
+
},
|
|
9483
|
+
supports_instant_delivery: {
|
|
9484
|
+
type: "boolean"
|
|
9485
|
+
}
|
|
9486
|
+
},
|
|
9487
|
+
required: [
|
|
9488
|
+
"name",
|
|
9489
|
+
"icon_url",
|
|
9490
|
+
"delivery_type",
|
|
9491
|
+
"supports_standard_delivery",
|
|
9492
|
+
"supports_instant_delivery"
|
|
9493
|
+
]
|
|
9494
|
+
},
|
|
9495
|
+
quote: {
|
|
9496
|
+
type: [
|
|
9497
|
+
"object",
|
|
9498
|
+
"null"
|
|
9499
|
+
],
|
|
9500
|
+
description: "Fee and delivery estimate for withdrawing the requested amount through this method. Null unless an amount was provided, or when the estimate is unavailable.",
|
|
9501
|
+
properties: {
|
|
9502
|
+
amount: {
|
|
9503
|
+
type: "number",
|
|
9504
|
+
format: "float",
|
|
9505
|
+
description: "The withdrawal amount the quote is for."
|
|
9506
|
+
},
|
|
9507
|
+
currency: {
|
|
9508
|
+
type: "string",
|
|
9509
|
+
description: "Currency of the quoted amount."
|
|
9510
|
+
},
|
|
9511
|
+
exchange_rate: {
|
|
9512
|
+
type: "number",
|
|
9513
|
+
format: "float",
|
|
9514
|
+
description: "Exchange rate from the withdrawal currency to the destination currency."
|
|
9515
|
+
},
|
|
9516
|
+
min_limit: {
|
|
9517
|
+
type: "number",
|
|
9518
|
+
format: "float",
|
|
9519
|
+
description: "Minimum withdrawal amount for this method, in the withdrawal currency."
|
|
9520
|
+
},
|
|
9521
|
+
max_limit: {
|
|
9522
|
+
type: [
|
|
9523
|
+
"number",
|
|
9524
|
+
"null"
|
|
9525
|
+
],
|
|
9526
|
+
format: "float",
|
|
9527
|
+
description: "Maximum withdrawal amount for this method, in the withdrawal currency."
|
|
9528
|
+
},
|
|
9529
|
+
standard: {
|
|
9530
|
+
type: [
|
|
9531
|
+
"object",
|
|
9532
|
+
"null"
|
|
9533
|
+
],
|
|
9534
|
+
description: "Standard-delivery estimate. Null if the method does not support standard delivery, or the amount does not cover the fee.",
|
|
9535
|
+
properties: {
|
|
9536
|
+
fee: {
|
|
9537
|
+
type: "number",
|
|
9538
|
+
format: "float",
|
|
9539
|
+
description: "Total fee charged, in the withdrawal currency."
|
|
9540
|
+
},
|
|
9541
|
+
total_received: {
|
|
9542
|
+
type: "number",
|
|
9543
|
+
format: "float",
|
|
9544
|
+
description: "Amount delivered after fees, in the withdrawal currency."
|
|
9545
|
+
},
|
|
9546
|
+
estimated_arrival: {
|
|
9547
|
+
type: "string",
|
|
9548
|
+
format: "date-time",
|
|
9549
|
+
description: "Estimated time the funds become available."
|
|
9550
|
+
}
|
|
9551
|
+
},
|
|
9552
|
+
required: [
|
|
9553
|
+
"fee",
|
|
9554
|
+
"total_received",
|
|
9555
|
+
"estimated_arrival"
|
|
9556
|
+
]
|
|
9557
|
+
},
|
|
9558
|
+
instant: {
|
|
9559
|
+
type: [
|
|
9560
|
+
"object",
|
|
9561
|
+
"null"
|
|
9562
|
+
],
|
|
9563
|
+
description: "Instant-delivery estimate. Null if the method does not support instant delivery, instant delivery is unavailable for the account, or the amount does not cover the fee.",
|
|
9564
|
+
properties: {
|
|
9565
|
+
fee: {
|
|
9566
|
+
type: "number",
|
|
9567
|
+
format: "float",
|
|
9568
|
+
description: "Total fee charged, in the withdrawal currency."
|
|
9569
|
+
},
|
|
9570
|
+
total_received: {
|
|
9571
|
+
type: "number",
|
|
9572
|
+
format: "float",
|
|
9573
|
+
description: "Amount delivered after fees, in the withdrawal currency."
|
|
9574
|
+
},
|
|
9575
|
+
estimated_arrival: {
|
|
9576
|
+
type: "string",
|
|
9577
|
+
format: "date-time",
|
|
9578
|
+
description: "Estimated time the funds become available."
|
|
9579
|
+
}
|
|
9580
|
+
},
|
|
9581
|
+
required: [
|
|
9582
|
+
"fee",
|
|
9583
|
+
"total_received",
|
|
9584
|
+
"estimated_arrival"
|
|
9585
|
+
]
|
|
9586
|
+
}
|
|
9587
|
+
},
|
|
9588
|
+
required: [
|
|
9589
|
+
"amount",
|
|
9590
|
+
"currency",
|
|
9591
|
+
"exchange_rate",
|
|
9592
|
+
"min_limit",
|
|
9593
|
+
"max_limit",
|
|
9594
|
+
"standard",
|
|
9595
|
+
"instant"
|
|
9596
|
+
]
|
|
9597
|
+
}
|
|
9598
|
+
},
|
|
9599
|
+
required: [
|
|
9600
|
+
"object",
|
|
9601
|
+
"id",
|
|
9602
|
+
"status",
|
|
9603
|
+
"is_default",
|
|
9604
|
+
"nickname",
|
|
9605
|
+
"account_reference",
|
|
9606
|
+
"institution_name",
|
|
9607
|
+
"payer_name",
|
|
9608
|
+
"destination_currency",
|
|
9609
|
+
"created_at",
|
|
9610
|
+
"payout_destination",
|
|
9611
|
+
"quote"
|
|
9612
|
+
]
|
|
9613
|
+
}
|
|
9614
|
+
},
|
|
9615
|
+
available_destinations: {
|
|
9616
|
+
type: "array",
|
|
9617
|
+
description: "Payout rails the account could add as a new payout method. Only present when include_available is true; empty when the account has no payout setup yet.",
|
|
9618
|
+
items: {
|
|
9619
|
+
type: "object",
|
|
9620
|
+
properties: {
|
|
9621
|
+
object: {
|
|
9622
|
+
type: "string",
|
|
9623
|
+
enum: [
|
|
9624
|
+
"payout_destination"
|
|
9625
|
+
]
|
|
9626
|
+
},
|
|
9627
|
+
id: {
|
|
9628
|
+
type: "string",
|
|
9629
|
+
description: "Payout destination ID."
|
|
9630
|
+
},
|
|
9631
|
+
name: {
|
|
9632
|
+
type: [
|
|
9633
|
+
"string",
|
|
9634
|
+
"null"
|
|
9635
|
+
],
|
|
9636
|
+
description: "Payout destination display name."
|
|
9637
|
+
},
|
|
9638
|
+
icon_url: {
|
|
9639
|
+
type: [
|
|
9640
|
+
"string",
|
|
9641
|
+
"null"
|
|
9642
|
+
],
|
|
9643
|
+
description: "Payout destination icon URL."
|
|
9644
|
+
},
|
|
9645
|
+
delivery_type: {
|
|
9646
|
+
type: "string",
|
|
9647
|
+
description: "How funds are delivered, for example `bank_deposit`."
|
|
9648
|
+
},
|
|
9649
|
+
supports_standard_delivery: {
|
|
9650
|
+
type: "boolean"
|
|
9651
|
+
},
|
|
9652
|
+
supports_instant_delivery: {
|
|
9653
|
+
type: "boolean"
|
|
9654
|
+
},
|
|
9655
|
+
quotes: {
|
|
9656
|
+
type: [
|
|
9657
|
+
"array",
|
|
9658
|
+
"null"
|
|
9659
|
+
],
|
|
9660
|
+
description: "Fee and delivery estimates for withdrawing the requested amount through this destination, one per destination currency. Null unless an amount was provided.",
|
|
9661
|
+
items: {
|
|
9662
|
+
type: "object",
|
|
9663
|
+
properties: {
|
|
9664
|
+
destination_currency: {
|
|
9665
|
+
type: "string",
|
|
9666
|
+
description: "Currency the funds are delivered in."
|
|
9667
|
+
},
|
|
9668
|
+
amount: {
|
|
9669
|
+
type: "number",
|
|
9670
|
+
format: "float",
|
|
9671
|
+
description: "The withdrawal amount the quote is for."
|
|
9672
|
+
},
|
|
9673
|
+
currency: {
|
|
9674
|
+
type: "string",
|
|
9675
|
+
description: "Currency of the quoted amount."
|
|
9676
|
+
},
|
|
9677
|
+
exchange_rate: {
|
|
9678
|
+
type: "number",
|
|
9679
|
+
format: "float",
|
|
9680
|
+
description: "Exchange rate from the withdrawal currency to the destination currency."
|
|
9681
|
+
},
|
|
9682
|
+
min_limit: {
|
|
9683
|
+
type: "number",
|
|
9684
|
+
format: "float",
|
|
9685
|
+
description: "Minimum withdrawal amount, in the withdrawal currency."
|
|
9686
|
+
},
|
|
9687
|
+
max_limit: {
|
|
9688
|
+
type: [
|
|
9689
|
+
"number",
|
|
9690
|
+
"null"
|
|
9691
|
+
],
|
|
9692
|
+
format: "float",
|
|
9693
|
+
description: "Maximum withdrawal amount, in the withdrawal currency."
|
|
9694
|
+
},
|
|
9695
|
+
standard: {
|
|
9696
|
+
type: [
|
|
9697
|
+
"object",
|
|
9698
|
+
"null"
|
|
9699
|
+
],
|
|
9700
|
+
description: "Standard-delivery estimate. Null if unsupported or the amount does not cover the fee.",
|
|
9701
|
+
properties: {
|
|
9702
|
+
fee: {
|
|
9703
|
+
type: "number",
|
|
9704
|
+
format: "float"
|
|
9705
|
+
},
|
|
9706
|
+
total_received: {
|
|
9707
|
+
type: "number",
|
|
9708
|
+
format: "float"
|
|
9709
|
+
},
|
|
9710
|
+
estimated_arrival: {
|
|
9711
|
+
type: "string",
|
|
9712
|
+
format: "date-time"
|
|
9713
|
+
}
|
|
9714
|
+
},
|
|
9715
|
+
required: [
|
|
9716
|
+
"fee",
|
|
9717
|
+
"total_received",
|
|
9718
|
+
"estimated_arrival"
|
|
9719
|
+
]
|
|
9720
|
+
},
|
|
9721
|
+
instant: {
|
|
9722
|
+
type: [
|
|
9723
|
+
"object",
|
|
9724
|
+
"null"
|
|
9725
|
+
],
|
|
9726
|
+
description: "Instant-delivery estimate. Null if unsupported, unavailable for the account, or the amount does not cover the fee.",
|
|
9727
|
+
properties: {
|
|
9728
|
+
fee: {
|
|
9729
|
+
type: "number",
|
|
9730
|
+
format: "float"
|
|
9731
|
+
},
|
|
9732
|
+
total_received: {
|
|
9733
|
+
type: "number",
|
|
9734
|
+
format: "float"
|
|
9735
|
+
},
|
|
9736
|
+
estimated_arrival: {
|
|
9737
|
+
type: "string",
|
|
9738
|
+
format: "date-time"
|
|
9739
|
+
}
|
|
9740
|
+
},
|
|
9741
|
+
required: [
|
|
9742
|
+
"fee",
|
|
9743
|
+
"total_received",
|
|
9744
|
+
"estimated_arrival"
|
|
9745
|
+
]
|
|
9746
|
+
}
|
|
9747
|
+
},
|
|
9748
|
+
required: [
|
|
9749
|
+
"destination_currency",
|
|
9750
|
+
"amount",
|
|
9751
|
+
"currency",
|
|
9752
|
+
"exchange_rate",
|
|
9753
|
+
"min_limit",
|
|
9754
|
+
"max_limit",
|
|
9755
|
+
"standard",
|
|
9756
|
+
"instant"
|
|
9757
|
+
]
|
|
9758
|
+
}
|
|
9759
|
+
}
|
|
9760
|
+
},
|
|
9761
|
+
required: [
|
|
9762
|
+
"object",
|
|
9763
|
+
"id",
|
|
9764
|
+
"name",
|
|
9765
|
+
"icon_url",
|
|
9766
|
+
"delivery_type",
|
|
9767
|
+
"supports_standard_delivery",
|
|
9768
|
+
"supports_instant_delivery",
|
|
9769
|
+
"quotes"
|
|
9770
|
+
]
|
|
9771
|
+
}
|
|
9772
|
+
},
|
|
9773
|
+
page_info: {
|
|
9774
|
+
type: "object",
|
|
9775
|
+
properties: {
|
|
9776
|
+
has_next_page: {
|
|
9777
|
+
type: "boolean"
|
|
9778
|
+
},
|
|
9779
|
+
end_cursor: {
|
|
9780
|
+
type: [
|
|
9781
|
+
"string",
|
|
9782
|
+
"null"
|
|
9783
|
+
]
|
|
9784
|
+
},
|
|
9785
|
+
has_previous_page: {
|
|
9786
|
+
type: "boolean"
|
|
9787
|
+
},
|
|
9788
|
+
start_cursor: {
|
|
9789
|
+
type: [
|
|
9790
|
+
"string",
|
|
9791
|
+
"null"
|
|
9792
|
+
]
|
|
9793
|
+
}
|
|
9794
|
+
},
|
|
9795
|
+
required: [
|
|
9796
|
+
"has_next_page",
|
|
9797
|
+
"end_cursor",
|
|
9798
|
+
"has_previous_page",
|
|
9799
|
+
"start_cursor"
|
|
9800
|
+
]
|
|
9801
|
+
}
|
|
9802
|
+
},
|
|
9803
|
+
required: [
|
|
9804
|
+
"data",
|
|
9805
|
+
"page_info"
|
|
9806
|
+
]
|
|
9807
|
+
}
|
|
9808
|
+
}
|
|
9809
|
+
}
|
|
9810
|
+
},
|
|
9811
|
+
"400": {
|
|
9812
|
+
description: "neither account_id nor user_id provided",
|
|
9813
|
+
$ref: "#/components/responses/InvalidParameters"
|
|
9814
|
+
},
|
|
9815
|
+
"401": {
|
|
9816
|
+
description: "missing or invalid authentication",
|
|
9817
|
+
$ref: "#/components/responses/Unauthorized"
|
|
9818
|
+
},
|
|
9819
|
+
"403": {
|
|
9820
|
+
description: "credential lacks the destination-read scope",
|
|
9821
|
+
$ref: "#/components/responses/Forbidden"
|
|
9822
|
+
},
|
|
9823
|
+
"404": {
|
|
9824
|
+
description: "no ledger for that owner is visible to the credential",
|
|
9825
|
+
$ref: "#/components/responses/NotFound"
|
|
9826
|
+
}
|
|
9827
|
+
}
|
|
9828
|
+
}
|
|
9829
|
+
},
|
|
9192
9830
|
"/payouts": {
|
|
9193
9831
|
get: {
|
|
9194
9832
|
summary: "List Payouts",
|
|
@@ -11464,7 +12102,7 @@ var native_spec_default = {
|
|
|
11464
12102
|
"string",
|
|
11465
12103
|
"null"
|
|
11466
12104
|
],
|
|
11467
|
-
description: "The unique identifier of the tax classification code."
|
|
12105
|
+
description: "The unique identifier of the tax classification code. See the available [product categories](https://docs.numeral.com/essentials/product-categories)."
|
|
11468
12106
|
},
|
|
11469
12107
|
redirect_purchase_url: {
|
|
11470
12108
|
type: [
|
|
@@ -11479,6 +12117,13 @@ var native_spec_default = {
|
|
|
11479
12117
|
"null"
|
|
11480
12118
|
],
|
|
11481
12119
|
description: "Whether to collect a shipping address at checkout."
|
|
12120
|
+
},
|
|
12121
|
+
send_welcome_message: {
|
|
12122
|
+
type: [
|
|
12123
|
+
"boolean",
|
|
12124
|
+
"null"
|
|
12125
|
+
],
|
|
12126
|
+
description: "Whether to send an automated welcome message via support chat when a user joins this product. Defaults to true."
|
|
11482
12127
|
}
|
|
11483
12128
|
},
|
|
11484
12129
|
required: [
|
|
@@ -11623,7 +12268,14 @@ var native_spec_default = {
|
|
|
11623
12268
|
"string",
|
|
11624
12269
|
"null"
|
|
11625
12270
|
],
|
|
11626
|
-
description: "The unique identifier of the tax classification code."
|
|
12271
|
+
description: "The unique identifier of the tax classification code. See the available [product categories](https://docs.numeral.com/essentials/product-categories)."
|
|
12272
|
+
},
|
|
12273
|
+
send_welcome_message: {
|
|
12274
|
+
type: [
|
|
12275
|
+
"boolean",
|
|
12276
|
+
"null"
|
|
12277
|
+
],
|
|
12278
|
+
description: "Whether to send an automated welcome message via support chat when a user joins this product."
|
|
11627
12279
|
}
|
|
11628
12280
|
}
|
|
11629
12281
|
}
|
|
@@ -16865,12 +17517,13 @@ var native_spec_default = {
|
|
|
16865
17517
|
"payment_failed",
|
|
16866
17518
|
"all_ads_rejected",
|
|
16867
17519
|
"draft",
|
|
17520
|
+
"no_ad_groups",
|
|
17521
|
+
"no_ads",
|
|
16868
17522
|
"paused",
|
|
17523
|
+
"processing",
|
|
16869
17524
|
"issues",
|
|
16870
17525
|
"scheduled",
|
|
16871
17526
|
"completed",
|
|
16872
|
-
"no_ad_groups",
|
|
16873
|
-
"no_ads",
|
|
16874
17527
|
"ad_groups_off",
|
|
16875
17528
|
"active"
|
|
16876
17529
|
],
|
|
@@ -17307,13 +17960,13 @@ var native_spec_default = {
|
|
|
17307
17960
|
enum: [
|
|
17308
17961
|
"all_ads_rejected",
|
|
17309
17962
|
"rejected",
|
|
17963
|
+
"no_ads",
|
|
17310
17964
|
"campaign_paused",
|
|
17311
17965
|
"paused",
|
|
17312
17966
|
"processing",
|
|
17313
17967
|
"issues",
|
|
17314
17968
|
"scheduled",
|
|
17315
17969
|
"completed",
|
|
17316
|
-
"no_ads",
|
|
17317
17970
|
"ads_off",
|
|
17318
17971
|
"learning_limited",
|
|
17319
17972
|
"learning",
|
|
@@ -20174,7 +20827,7 @@ import fs4 from "fs";
|
|
|
20174
20827
|
import os4 from "os";
|
|
20175
20828
|
import path4 from "path";
|
|
20176
20829
|
|
|
20177
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
20830
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/Cli.js
|
|
20178
20831
|
var Cli_exports = {};
|
|
20179
20832
|
__export(Cli_exports, {
|
|
20180
20833
|
collectSkillCommands: () => collectSkillCommands,
|
|
@@ -20275,7 +20928,7 @@ function extractSegmentPart(segment, segmentTokenStart, segmentTokenCount, targe
|
|
|
20275
20928
|
return segment.slice(charStart, charEnd);
|
|
20276
20929
|
}
|
|
20277
20930
|
|
|
20278
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
20931
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/internal/helpers.js
|
|
20279
20932
|
function isRecord(value) {
|
|
20280
20933
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
20281
20934
|
}
|
|
@@ -20323,7 +20976,7 @@ function suggest(input, candidates) {
|
|
|
20323
20976
|
return best;
|
|
20324
20977
|
}
|
|
20325
20978
|
|
|
20326
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
20979
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/Completions.js
|
|
20327
20980
|
function register(shell, name) {
|
|
20328
20981
|
switch (shell) {
|
|
20329
20982
|
case "bash":
|
|
@@ -20586,7 +21239,7 @@ let _incur_complete_${id} = {|spans|
|
|
|
20586
21239
|
}`;
|
|
20587
21240
|
}
|
|
20588
21241
|
|
|
20589
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
21242
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/Errors.js
|
|
20590
21243
|
var BaseError = class extends Error {
|
|
20591
21244
|
name = "Incur.BaseError";
|
|
20592
21245
|
/** The short, human-readable error message (without details). */
|
|
@@ -20660,7 +21313,7 @@ function walk(error, fn) {
|
|
|
20660
21313
|
return current;
|
|
20661
21314
|
}
|
|
20662
21315
|
|
|
20663
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
21316
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/Fetch.js
|
|
20664
21317
|
var reservedFlags = /* @__PURE__ */ new Set(["method", "body", "data", "header"]);
|
|
20665
21318
|
var reservedShort = { X: "method", d: "data", H: "header" };
|
|
20666
21319
|
function parseArgv(argv) {
|
|
@@ -20796,7 +21449,7 @@ async function parseResponse(response) {
|
|
|
20796
21449
|
};
|
|
20797
21450
|
}
|
|
20798
21451
|
|
|
20799
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
21452
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/Filter.js
|
|
20800
21453
|
function parse(expression) {
|
|
20801
21454
|
const paths = [];
|
|
20802
21455
|
const tokens = [];
|
|
@@ -21296,7 +21949,7 @@ function resolveOptions(options) {
|
|
|
21296
21949
|
};
|
|
21297
21950
|
}
|
|
21298
21951
|
|
|
21299
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
21952
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/internal/json.js
|
|
21300
21953
|
function stringify(value, space) {
|
|
21301
21954
|
return JSON.stringify(value, (_key, value2) => {
|
|
21302
21955
|
if (typeof value2 === "bigint")
|
|
@@ -21308,7 +21961,7 @@ function normalize(value) {
|
|
|
21308
21961
|
return JSON.parse(stringify(value));
|
|
21309
21962
|
}
|
|
21310
21963
|
|
|
21311
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
21964
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/internal/yaml.js
|
|
21312
21965
|
import { createRequire } from "module";
|
|
21313
21966
|
var cached;
|
|
21314
21967
|
async function load() {
|
|
@@ -21320,7 +21973,7 @@ function loadSync() {
|
|
|
21320
21973
|
return cached;
|
|
21321
21974
|
}
|
|
21322
21975
|
|
|
21323
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
21976
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/Formatter.js
|
|
21324
21977
|
function format2(value, fmt = "toon") {
|
|
21325
21978
|
if (value == null)
|
|
21326
21979
|
return "";
|
|
@@ -21428,7 +22081,7 @@ ${String(val)}`;
|
|
|
21428
22081
|
return kvTable(obj);
|
|
21429
22082
|
}
|
|
21430
22083
|
|
|
21431
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
22084
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/Parser.js
|
|
21432
22085
|
function parse2(argv, options = {}) {
|
|
21433
22086
|
const { args: argsSchema, options: optionsSchema, alias, defaults } = options;
|
|
21434
22087
|
const optionNames = createOptionNames(optionsSchema, alias);
|
|
@@ -21788,7 +22441,7 @@ function defaultEnvSource() {
|
|
|
21788
22441
|
return {};
|
|
21789
22442
|
}
|
|
21790
22443
|
|
|
21791
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
22444
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/internal/command.js
|
|
21792
22445
|
var sentinel = Symbol.for("incur.sentinel");
|
|
21793
22446
|
async function execute(command, options) {
|
|
21794
22447
|
const { argv, inputOptions, agent, format: format3, formatExplicit, name, path: path6, version, envSource = process.env, env: envSchema, globals = {}, vars: varsSchema, middlewares = [] } = options;
|
|
@@ -22035,7 +22688,7 @@ function findBuiltinSubcommand(builtin, token) {
|
|
|
22035
22688
|
return builtin.subcommands?.find((sub) => sub.name === token || sub.aliases?.includes(token));
|
|
22036
22689
|
}
|
|
22037
22690
|
|
|
22038
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
22691
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/Help.js
|
|
22039
22692
|
function formatRoot(name, options = {}) {
|
|
22040
22693
|
const { aliases, configFlag, description, globals, version, commands = [], root = false } = options;
|
|
22041
22694
|
const lines = [];
|
|
@@ -22321,7 +22974,7 @@ function redact(value) {
|
|
|
22321
22974
|
return `****${value.slice(-4)}`;
|
|
22322
22975
|
}
|
|
22323
22976
|
|
|
22324
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
22977
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/internal/cta.js
|
|
22325
22978
|
function formatCtaBlock(name, block) {
|
|
22326
22979
|
if (!block || block.commands.length === 0)
|
|
22327
22980
|
return void 0;
|
|
@@ -22344,7 +22997,7 @@ function formatCta(name, cta) {
|
|
|
22344
22997
|
return { command: cmd, ...cta.description ? { description: cta.description } : void 0 };
|
|
22345
22998
|
}
|
|
22346
22999
|
|
|
22347
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
23000
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/internal/pm.js
|
|
22348
23001
|
function detectRunner() {
|
|
22349
23002
|
const userAgent = process.env.npm_config_user_agent ?? "";
|
|
22350
23003
|
const execPath = process.env.npm_execpath ?? "";
|
|
@@ -22355,7 +23008,7 @@ function detectRunner() {
|
|
|
22355
23008
|
return "npx";
|
|
22356
23009
|
}
|
|
22357
23010
|
|
|
22358
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
23011
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/Schema.js
|
|
22359
23012
|
function toJsonSchema(schema) {
|
|
22360
23013
|
const result = external_exports.toJSONSchema(schema, {
|
|
22361
23014
|
unrepresentable: "any",
|
|
@@ -22369,7 +23022,7 @@ function toJsonSchema(schema) {
|
|
|
22369
23022
|
return result;
|
|
22370
23023
|
}
|
|
22371
23024
|
|
|
22372
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
23025
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/Mcp.js
|
|
22373
23026
|
async function serve(name, version, commands, options = {}) {
|
|
22374
23027
|
const stdio = importStdioModule();
|
|
22375
23028
|
const mcp = await import("./dist-2MZJLO2W.js");
|
|
@@ -22538,7 +23191,7 @@ function buildToolSchema(args, options) {
|
|
|
22538
23191
|
return { type: "object", properties };
|
|
22539
23192
|
}
|
|
22540
23193
|
|
|
22541
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
23194
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/internal/dereference.js
|
|
22542
23195
|
function dereference(root) {
|
|
22543
23196
|
const cache = /* @__PURE__ */ new Map();
|
|
22544
23197
|
return walk2(root, root, cache);
|
|
@@ -22590,7 +23243,7 @@ function resolvePointer(root, pointer) {
|
|
|
22590
23243
|
return current;
|
|
22591
23244
|
}
|
|
22592
23245
|
|
|
22593
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
23246
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/Openapi.js
|
|
22594
23247
|
function fromCli(cli, options = {}) {
|
|
22595
23248
|
const commands = toCommands.get(cli);
|
|
22596
23249
|
if (!commands)
|
|
@@ -23109,7 +23762,7 @@ function coerceIfNeeded(schema) {
|
|
|
23109
23762
|
return desc ? coerced.describe(desc) : coerced;
|
|
23110
23763
|
}
|
|
23111
23764
|
|
|
23112
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
23765
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/Skill.js
|
|
23113
23766
|
import { createHash } from "crypto";
|
|
23114
23767
|
function index(name, commands, description) {
|
|
23115
23768
|
const lines = [`# ${name}`];
|
|
@@ -23353,7 +24006,7 @@ function resolveTypeName2(prop) {
|
|
|
23353
24006
|
return "unknown";
|
|
23354
24007
|
}
|
|
23355
24008
|
|
|
23356
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
24009
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/SyncMcp.js
|
|
23357
24010
|
import { execFile } from "child_process";
|
|
23358
24011
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
23359
24012
|
import { homedir } from "os";
|
|
@@ -23492,13 +24145,13 @@ function exec(cmd, args) {
|
|
|
23492
24145
|
});
|
|
23493
24146
|
}
|
|
23494
24147
|
|
|
23495
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
24148
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/SyncSkills.js
|
|
23496
24149
|
import fsSync from "fs";
|
|
23497
24150
|
import fs2 from "fs/promises";
|
|
23498
24151
|
import os2 from "os";
|
|
23499
24152
|
import path2 from "path";
|
|
23500
24153
|
|
|
23501
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
24154
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/internal/agents.js
|
|
23502
24155
|
import * as fs from "fs";
|
|
23503
24156
|
import * as os from "os";
|
|
23504
24157
|
import * as path from "path";
|
|
@@ -23778,7 +24431,7 @@ function resolveParent(dir) {
|
|
|
23778
24431
|
}
|
|
23779
24432
|
}
|
|
23780
24433
|
|
|
23781
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
24434
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/SyncSkills.js
|
|
23782
24435
|
async function sync(name, commands, options = {}) {
|
|
23783
24436
|
const { depth = 1, description, global = true } = options;
|
|
23784
24437
|
const cwd = options.cwd ?? (global ? resolvePackageRoot() : process.cwd());
|
|
@@ -23939,7 +24592,7 @@ function readHash(name) {
|
|
|
23939
24592
|
return readMeta(name)?.hash;
|
|
23940
24593
|
}
|
|
23941
24594
|
|
|
23942
|
-
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+
|
|
24595
|
+
// ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+4b9ca91dc02472db944fb103984ffc4a13251b6f/node_modules/incur/dist/Cli.js
|
|
23943
24596
|
var destructiveCommandHint = "Confirm with the user before executing this destructive command.";
|
|
23944
24597
|
function create(nameOrDefinition, definition) {
|
|
23945
24598
|
const name = typeof nameOrDefinition === "string" ? nameOrDefinition : nameOrDefinition.name;
|
|
@@ -26341,35 +26994,16 @@ var Identity = external_exports.object({
|
|
|
26341
26994
|
route: external_exports.string().optional().describe("The account's public route"),
|
|
26342
26995
|
email: external_exports.string().optional().describe("User email address (oauth only)")
|
|
26343
26996
|
});
|
|
26344
|
-
var Profile = external_exports.
|
|
26345
|
-
(
|
|
26346
|
-
|
|
26347
|
-
|
|
26348
|
-
|
|
26349
|
-
|
|
26350
|
-
|
|
26351
|
-
|
|
26352
|
-
|
|
26353
|
-
|
|
26354
|
-
companyId: profile.accountId ?? profile.companyId,
|
|
26355
|
-
companyTitle: profile.accountTitle ?? profile.companyTitle,
|
|
26356
|
-
companyRoute: profile.accountRoute ?? profile.companyRoute
|
|
26357
|
-
};
|
|
26358
|
-
},
|
|
26359
|
-
external_exports.object({
|
|
26360
|
-
name: external_exports.string().describe("The local profile name"),
|
|
26361
|
-
method: AuthMethod,
|
|
26362
|
-
accountId: external_exports.string().optional(),
|
|
26363
|
-
accountTitle: external_exports.string().optional(),
|
|
26364
|
-
accountRoute: external_exports.string().optional(),
|
|
26365
|
-
companyId: external_exports.string().optional(),
|
|
26366
|
-
companyTitle: external_exports.string().optional(),
|
|
26367
|
-
companyRoute: external_exports.string().optional(),
|
|
26368
|
-
userId: external_exports.string().optional(),
|
|
26369
|
-
userEmail: external_exports.string().optional(),
|
|
26370
|
-
createdAt: external_exports.string().describe("ISO timestamp of when the profile was first created")
|
|
26371
|
-
})
|
|
26372
|
-
);
|
|
26997
|
+
var Profile = external_exports.object({
|
|
26998
|
+
name: external_exports.string().describe("The local profile name"),
|
|
26999
|
+
method: AuthMethod,
|
|
27000
|
+
accountId: external_exports.string().optional(),
|
|
27001
|
+
accountTitle: external_exports.string().optional(),
|
|
27002
|
+
accountRoute: external_exports.string().optional(),
|
|
27003
|
+
userId: external_exports.string().optional(),
|
|
27004
|
+
userEmail: external_exports.string().optional(),
|
|
27005
|
+
createdAt: external_exports.string().describe("ISO timestamp of when the profile was first created")
|
|
27006
|
+
});
|
|
26373
27007
|
|
|
26374
27008
|
// src/auth/config.ts
|
|
26375
27009
|
var Config = external_exports.object({
|
|
@@ -26443,6 +27077,7 @@ import { createRequire as createRequire2 } from "module";
|
|
|
26443
27077
|
// src/lib/build-info.ts
|
|
26444
27078
|
var buildChannel = true ? "npm" : "dev";
|
|
26445
27079
|
var buildTarget = typeof WHOP_CLI_TARGET === "string" ? WHOP_CLI_TARGET : null;
|
|
27080
|
+
var buildVersion = true ? "0.3.0" : null;
|
|
26446
27081
|
function isHomebrewPath(execPath, env = process.env) {
|
|
26447
27082
|
if (/[/\\](Cellar|homebrew|linuxbrew)[/\\]/.test(execPath)) return true;
|
|
26448
27083
|
const prefix = env.HOMEBREW_PREFIX?.trim();
|
|
@@ -26774,17 +27409,17 @@ async function promptApiKey() {
|
|
|
26774
27409
|
});
|
|
26775
27410
|
return ensure(key).trim();
|
|
26776
27411
|
}
|
|
26777
|
-
async function
|
|
27412
|
+
async function selectAccount(accounts) {
|
|
26778
27413
|
const id = await select({
|
|
26779
27414
|
message: "Which business account do you want to use?",
|
|
26780
|
-
options:
|
|
26781
|
-
value:
|
|
26782
|
-
label:
|
|
26783
|
-
hint:
|
|
27415
|
+
options: accounts.map((account) => ({
|
|
27416
|
+
value: account.id,
|
|
27417
|
+
label: account.title,
|
|
27418
|
+
hint: account.id
|
|
26784
27419
|
}))
|
|
26785
27420
|
});
|
|
26786
27421
|
const chosen = ensure(id);
|
|
26787
|
-
const match =
|
|
27422
|
+
const match = accounts.find((account) => account.id === chosen);
|
|
26788
27423
|
if (!match) {
|
|
26789
27424
|
throw new Error(
|
|
26790
27425
|
`Selected business account "${chosen}" is no longer available.`
|
|
@@ -26852,7 +27487,9 @@ var WHOP_SCOPES = [
|
|
|
26852
27487
|
"courses:update",
|
|
26853
27488
|
"custom_emoji:update",
|
|
26854
27489
|
"developer:basic:read",
|
|
27490
|
+
"developer:create_app",
|
|
26855
27491
|
"developer:manage_builds",
|
|
27492
|
+
"developer:update_app",
|
|
26856
27493
|
"dms:channel:manage",
|
|
26857
27494
|
"dms:message:manage",
|
|
26858
27495
|
"dms:read",
|
|
@@ -27026,61 +27663,61 @@ var OAuthError = class extends Error {
|
|
|
27026
27663
|
this.name = "OAuthError";
|
|
27027
27664
|
}
|
|
27028
27665
|
};
|
|
27029
|
-
async function
|
|
27666
|
+
async function resolveOAuthAccount(accessToken, opts) {
|
|
27030
27667
|
const whop = new Whop2({ apiKey: accessToken, baseURL: apiBaseUrl() });
|
|
27031
27668
|
const s = opts.agent ? null : startSpinner("Loading your business accounts\u2026");
|
|
27032
|
-
const
|
|
27033
|
-
const
|
|
27669
|
+
const MAX_ACCOUNTS = 1e3;
|
|
27670
|
+
const accounts = [];
|
|
27034
27671
|
try {
|
|
27035
|
-
for await (const
|
|
27036
|
-
|
|
27037
|
-
id:
|
|
27038
|
-
title:
|
|
27039
|
-
route:
|
|
27672
|
+
for await (const account of whop.companies.list({ first: 100 })) {
|
|
27673
|
+
accounts.push({
|
|
27674
|
+
id: account.id,
|
|
27675
|
+
title: account.title,
|
|
27676
|
+
route: account.route
|
|
27040
27677
|
});
|
|
27041
|
-
if (opts.
|
|
27042
|
-
if (
|
|
27678
|
+
if (opts.accountId && account.id === opts.accountId) break;
|
|
27679
|
+
if (accounts.length >= MAX_ACCOUNTS) break;
|
|
27043
27680
|
}
|
|
27044
27681
|
} catch {
|
|
27045
27682
|
s?.stop("Couldn't load your business accounts.");
|
|
27046
|
-
if (opts.
|
|
27683
|
+
if (opts.accountId) {
|
|
27047
27684
|
throw new OAuthError(
|
|
27048
|
-
"
|
|
27049
|
-
`Couldn't load your business accounts to verify "${opts.
|
|
27685
|
+
"ACCOUNT_LOOKUP_FAILED",
|
|
27686
|
+
`Couldn't load your business accounts to verify "${opts.accountId}". Please try again.`
|
|
27050
27687
|
);
|
|
27051
27688
|
}
|
|
27052
27689
|
return null;
|
|
27053
27690
|
}
|
|
27054
|
-
if (opts.
|
|
27055
|
-
const match =
|
|
27691
|
+
if (opts.accountId) {
|
|
27692
|
+
const match = accounts.find((account) => account.id === opts.accountId);
|
|
27056
27693
|
if (!match) {
|
|
27057
27694
|
s?.stop("");
|
|
27058
|
-
const available =
|
|
27695
|
+
const available = accounts.length ? accounts.map((account) => account.id).join(", ") : "none \u2014 this user has no business accounts yet";
|
|
27059
27696
|
throw new OAuthError(
|
|
27060
|
-
"
|
|
27061
|
-
`No business account "${opts.
|
|
27697
|
+
"ACCOUNT_NOT_FOUND",
|
|
27698
|
+
`No business account "${opts.accountId}" for this user. Available: ${available}.`
|
|
27062
27699
|
);
|
|
27063
27700
|
}
|
|
27064
27701
|
s?.stop(`Using ${match.title}.`);
|
|
27065
27702
|
return match;
|
|
27066
27703
|
}
|
|
27067
|
-
if (
|
|
27704
|
+
if (accounts.length === 0) {
|
|
27068
27705
|
s?.stop("No business account found on your account.");
|
|
27069
27706
|
return null;
|
|
27070
27707
|
}
|
|
27071
|
-
if (
|
|
27072
|
-
s?.stop(`Using ${
|
|
27073
|
-
return
|
|
27708
|
+
if (accounts.length === 1) {
|
|
27709
|
+
s?.stop(`Using ${accounts[0].title}.`);
|
|
27710
|
+
return accounts[0];
|
|
27074
27711
|
}
|
|
27075
27712
|
if (opts.agent) {
|
|
27076
27713
|
s?.stop("");
|
|
27077
27714
|
throw new OAuthError(
|
|
27078
|
-
"
|
|
27079
|
-
`You can manage ${
|
|
27715
|
+
"MULTIPLE_ACCOUNTS",
|
|
27716
|
+
`You can manage ${accounts.length} business accounts \u2014 pass --account-id to choose one: ${accounts.map((account) => `${account.id} (${account.title})`).join(", ")}.`
|
|
27080
27717
|
);
|
|
27081
27718
|
}
|
|
27082
|
-
s?.stop(`Found ${
|
|
27083
|
-
return
|
|
27719
|
+
s?.stop(`Found ${accounts.length} business accounts.`);
|
|
27720
|
+
return selectAccount(accounts);
|
|
27084
27721
|
}
|
|
27085
27722
|
async function performOAuthLogin(input) {
|
|
27086
27723
|
const { verifier, challenge } = generatePKCE();
|
|
@@ -27115,7 +27752,7 @@ ${authUrl}`);
|
|
|
27115
27752
|
}
|
|
27116
27753
|
const base = oauthBaseUrl();
|
|
27117
27754
|
let identity = {};
|
|
27118
|
-
let
|
|
27755
|
+
let accountIdentity = null;
|
|
27119
27756
|
try {
|
|
27120
27757
|
const res = await fetch(`${base}/oauth/userinfo`, {
|
|
27121
27758
|
headers: { Authorization: `Bearer ${tokens.accessToken}` }
|
|
@@ -27126,9 +27763,9 @@ ${authUrl}`);
|
|
|
27126
27763
|
}
|
|
27127
27764
|
} catch {
|
|
27128
27765
|
}
|
|
27129
|
-
|
|
27766
|
+
accountIdentity = await resolveOAuthAccount(tokens.accessToken, {
|
|
27130
27767
|
agent: input.agent ?? false,
|
|
27131
|
-
|
|
27768
|
+
accountId: input.accountId
|
|
27132
27769
|
});
|
|
27133
27770
|
const name = input.profile ?? deriveProfileName(identity);
|
|
27134
27771
|
const existed = listProfiles().some((p) => p.name === name);
|
|
@@ -27140,7 +27777,7 @@ ${authUrl}`);
|
|
|
27140
27777
|
method: "oauth",
|
|
27141
27778
|
secret: tokens.refreshToken,
|
|
27142
27779
|
identity,
|
|
27143
|
-
|
|
27780
|
+
accountIdentity: accountIdentity ?? void 0,
|
|
27144
27781
|
accessToken: tokens.accessToken,
|
|
27145
27782
|
tokenExpiresAt
|
|
27146
27783
|
});
|
|
@@ -27219,16 +27856,13 @@ function upsertProfile(input, env = process.env) {
|
|
|
27219
27856
|
(profile2) => profile2.name === input.name
|
|
27220
27857
|
);
|
|
27221
27858
|
const isOauth = input.method === "oauth";
|
|
27222
|
-
const account = isOauth ? input.
|
|
27859
|
+
const account = isOauth ? input.accountIdentity : input.identity;
|
|
27223
27860
|
const profile = {
|
|
27224
27861
|
name: input.name,
|
|
27225
27862
|
method: input.method,
|
|
27226
27863
|
accountId: account?.id,
|
|
27227
27864
|
accountTitle: account?.title,
|
|
27228
27865
|
accountRoute: account?.route,
|
|
27229
|
-
companyId: account?.id,
|
|
27230
|
-
companyTitle: account?.title,
|
|
27231
|
-
companyRoute: account?.route,
|
|
27232
27866
|
userId: isOauth ? input.identity.id : void 0,
|
|
27233
27867
|
userEmail: isOauth ? input.identity.email : void 0,
|
|
27234
27868
|
createdAt: existing?.createdAt ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -27247,6 +27881,17 @@ function upsertProfile(input, env = process.env) {
|
|
|
27247
27881
|
setSecret(input.name, secret);
|
|
27248
27882
|
return profile;
|
|
27249
27883
|
}
|
|
27884
|
+
function setActiveProfileAccount(identity, env = process.env) {
|
|
27885
|
+
const config = readConfig(env);
|
|
27886
|
+
const profile = config.profiles.find(
|
|
27887
|
+
(candidate) => candidate.name === config.activeProfile
|
|
27888
|
+
);
|
|
27889
|
+
if (!profile) return;
|
|
27890
|
+
profile.accountId = identity.id;
|
|
27891
|
+
profile.accountTitle = identity.title;
|
|
27892
|
+
profile.accountRoute = identity.route;
|
|
27893
|
+
writeConfig(config, env);
|
|
27894
|
+
}
|
|
27250
27895
|
function removeProfile(name, env = process.env) {
|
|
27251
27896
|
const config = readConfig(env);
|
|
27252
27897
|
const existed = config.profiles.some((profile) => profile.name === name);
|
|
@@ -27353,7 +27998,7 @@ function filterSpecByTag(spec, tag) {
|
|
|
27353
27998
|
}
|
|
27354
27999
|
return { ...spec, paths };
|
|
27355
28000
|
}
|
|
27356
|
-
var
|
|
28001
|
+
var ACCOUNT_FIELDS = ["company_id", "account_id"];
|
|
27357
28002
|
function findOperation(method, pathname) {
|
|
27358
28003
|
const paths = native_spec_default.paths;
|
|
27359
28004
|
if (!paths) return null;
|
|
@@ -27388,28 +28033,28 @@ function extractApiMessage(payload) {
|
|
|
27388
28033
|
}
|
|
27389
28034
|
return void 0;
|
|
27390
28035
|
}
|
|
27391
|
-
var
|
|
28036
|
+
var envAccountId = null;
|
|
27392
28037
|
function normalizeApiKey(key) {
|
|
27393
28038
|
return key.replace(/^Bearer\s+/i, "").trim();
|
|
27394
28039
|
}
|
|
27395
|
-
async function
|
|
27396
|
-
if (profile?.
|
|
28040
|
+
async function resolveAccountId(profile, apiKey) {
|
|
28041
|
+
if (profile?.accountId) return profile.accountId;
|
|
27397
28042
|
const envKey = process.env.WHOP_API_KEY ? normalizeApiKey(process.env.WHOP_API_KEY) : void 0;
|
|
27398
28043
|
if (!profile && envKey && apiKey === envKey) {
|
|
27399
|
-
|
|
28044
|
+
envAccountId ??= validateApiKey(envKey, apiBaseUrl()).then(
|
|
27400
28045
|
(result) => result.status === "valid" || result.status === "underscoped" ? result.identity.id : void 0
|
|
27401
28046
|
).catch(() => void 0);
|
|
27402
|
-
const resolved = await
|
|
27403
|
-
if (resolved === void 0)
|
|
28047
|
+
const resolved = await envAccountId;
|
|
28048
|
+
if (resolved === void 0) envAccountId = null;
|
|
27404
28049
|
return resolved;
|
|
27405
28050
|
}
|
|
27406
28051
|
return void 0;
|
|
27407
28052
|
}
|
|
27408
|
-
async function
|
|
28053
|
+
async function resolveActiveAccountId() {
|
|
27409
28054
|
const profile = getActiveProfile();
|
|
27410
28055
|
const rawKey = profile ? await getValidAccessToken(profile) : process.env.WHOP_API_KEY ?? null;
|
|
27411
28056
|
if (!rawKey) return void 0;
|
|
27412
|
-
return
|
|
28057
|
+
return resolveAccountId(profile, normalizeApiKey(rawKey));
|
|
27413
28058
|
}
|
|
27414
28059
|
function createWhopFetch() {
|
|
27415
28060
|
return async (request) => {
|
|
@@ -27422,14 +28067,14 @@ function createWhopFetch() {
|
|
|
27422
28067
|
const token = normalizeApiKey(rawKey);
|
|
27423
28068
|
const incomingUrl = new URL(request.url);
|
|
27424
28069
|
const op = findOperation(request.method, incomingUrl.pathname);
|
|
27425
|
-
const
|
|
28070
|
+
const accountId = await resolveAccountId(profile, token);
|
|
27426
28071
|
const method = request.method.toUpperCase();
|
|
27427
28072
|
let body = request.body ? await request.text() : void 0;
|
|
27428
|
-
if (op &&
|
|
28073
|
+
if (op && accountId) {
|
|
27429
28074
|
if (method === "GET" || method === "DELETE" || method === "HEAD") {
|
|
27430
|
-
for (const name of
|
|
28075
|
+
for (const name of ACCOUNT_FIELDS) {
|
|
27431
28076
|
if (!incomingUrl.searchParams.has(name) && declaresQueryParam(op, name)) {
|
|
27432
|
-
incomingUrl.searchParams.set(name,
|
|
28077
|
+
incomingUrl.searchParams.set(name, accountId);
|
|
27433
28078
|
}
|
|
27434
28079
|
}
|
|
27435
28080
|
} else {
|
|
@@ -27437,10 +28082,10 @@ function createWhopFetch() {
|
|
|
27437
28082
|
if (parsed && typeof parsed === "object") {
|
|
27438
28083
|
const rec = parsed;
|
|
27439
28084
|
let changed = false;
|
|
27440
|
-
for (const name of
|
|
28085
|
+
for (const name of ACCOUNT_FIELDS) {
|
|
27441
28086
|
if (name === "company_id" && rec.plan_id != null) continue;
|
|
27442
28087
|
if (rec[name] == null && declaresBodyProp(op, name)) {
|
|
27443
|
-
rec[name] =
|
|
28088
|
+
rec[name] = accountId;
|
|
27444
28089
|
changed = true;
|
|
27445
28090
|
}
|
|
27446
28091
|
}
|
|
@@ -27486,6 +28131,7 @@ export {
|
|
|
27486
28131
|
configDir,
|
|
27487
28132
|
readConfig,
|
|
27488
28133
|
buildTarget,
|
|
28134
|
+
buildVersion,
|
|
27489
28135
|
detectChannel,
|
|
27490
28136
|
getSecret,
|
|
27491
28137
|
PromptCancelledError,
|
|
@@ -27500,11 +28146,12 @@ export {
|
|
|
27500
28146
|
getActiveProfile,
|
|
27501
28147
|
deriveProfileName,
|
|
27502
28148
|
upsertProfile,
|
|
28149
|
+
setActiveProfileAccount,
|
|
27503
28150
|
removeProfile,
|
|
27504
28151
|
removeAllProfiles,
|
|
27505
28152
|
switchProfile,
|
|
27506
28153
|
filterSpecByTag,
|
|
27507
|
-
|
|
28154
|
+
resolveActiveAccountId,
|
|
27508
28155
|
createWhopFetch
|
|
27509
28156
|
};
|
|
27510
|
-
//# sourceMappingURL=chunk-
|
|
28157
|
+
//# sourceMappingURL=chunk-4WNH276N.js.map
|