@stacksjs/payments 0.58.73 → 0.59.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/README.md +0 -1
- package/dist/drivers/stripe.d.ts +35 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +68 -44
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -53,7 +53,6 @@ For casual chit-chat with others using this package:
|
|
|
53
53
|
|
|
54
54
|
Many thanks to the following core technologies & people who have contributed to this package:
|
|
55
55
|
|
|
56
|
-
- [pathe](https://github.com/unjs/pathe)
|
|
57
56
|
- [Chris Breuer](https://github.com/chrisbbreuer)
|
|
58
57
|
- [All Contributors](../../contributors)
|
|
59
58
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import Stripe from 'stripe';
|
|
2
|
+
export declare const paymentIntent: {
|
|
3
|
+
create: (params: Stripe.PaymentIntentCreateParams) => Promise<Stripe.Response<Stripe.PaymentIntent>>;
|
|
4
|
+
retrieve: (stripeId: string) => Promise<Stripe.Response<Stripe.PaymentIntent>>;
|
|
5
|
+
update: (stripeId: string, params: Stripe.PaymentIntentCreateParams) => Promise<Stripe.Response<Stripe.PaymentIntent>>;
|
|
6
|
+
cancel: (stripeId: string) => Promise<Stripe.Response<Stripe.PaymentIntent>>;
|
|
7
|
+
};
|
|
8
|
+
export declare const balance: {
|
|
9
|
+
retrieve: () => Promise<Stripe.Response<Stripe.Balance>>;
|
|
10
|
+
};
|
|
11
|
+
export declare const customer: {
|
|
12
|
+
create: (params: Stripe.CustomerCreateParams) => Promise<Stripe.Response<Stripe.Customer>>;
|
|
13
|
+
update: (stripeId: string, params: Stripe.CustomerCreateParams) => Promise<Stripe.Response<Stripe.Customer>>;
|
|
14
|
+
retrieve: (stripeId: string) => Promise<Stripe.Response<Stripe.Customer | Stripe.DeletedCustomer>>;
|
|
15
|
+
};
|
|
16
|
+
export declare const charge: {
|
|
17
|
+
create: (params: Stripe.ChargeCreateParams) => Promise<Stripe.Response<Stripe.Charge>>;
|
|
18
|
+
update: (stripeId: string, params: Stripe.ChargeCreateParams) => Promise<Stripe.Response<Stripe.Charge>>;
|
|
19
|
+
retrieve: (stripeId: string) => Promise<Stripe.Response<Stripe.Charge>>;
|
|
20
|
+
capture: (stripeId: string) => Promise<Stripe.Response<Stripe.Charge>>;
|
|
21
|
+
};
|
|
22
|
+
export declare const balanceTransactions: {
|
|
23
|
+
retrieve: (stripeId: string) => Promise<void>;
|
|
24
|
+
list: (limit: number) => Promise<void>;
|
|
25
|
+
};
|
|
26
|
+
export declare const dispute: {
|
|
27
|
+
retrieve: (stripeId: string) => Promise<Stripe.Response<Stripe.Dispute>>;
|
|
28
|
+
update: (stripeId: string, params: Stripe.DisputeUpdateParams) => Promise<Stripe.Response<Stripe.Dispute>>;
|
|
29
|
+
close: (stripeId: string) => Promise<Stripe.Response<Stripe.Dispute>>;
|
|
30
|
+
list: (limit: number) => Promise<Stripe.Response<Stripe.ApiList<Stripe.Dispute>>>;
|
|
31
|
+
};
|
|
32
|
+
export declare const events: {
|
|
33
|
+
retrieve: (stripeId: string) => Promise<void>;
|
|
34
|
+
list: (limit: number) => Promise<void>;
|
|
35
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as stripe from './drivers/stripe';
|
package/dist/index.js
CHANGED
|
@@ -1239,7 +1239,9 @@ var require_side_channel = __commonJS((exports, module) => {
|
|
|
1239
1239
|
var $mapSet = callBound("Map.prototype.set", true);
|
|
1240
1240
|
var $mapHas = callBound("Map.prototype.has", true);
|
|
1241
1241
|
var listGetNode = function(list, key) {
|
|
1242
|
-
|
|
1242
|
+
var prev = list;
|
|
1243
|
+
var curr;
|
|
1244
|
+
for (;(curr = prev.next) !== null; prev = curr) {
|
|
1243
1245
|
if (curr.key === key) {
|
|
1244
1246
|
prev.next = curr.next;
|
|
1245
1247
|
curr.next = list.next;
|
|
@@ -2516,6 +2518,11 @@ __export(exports_resources, {
|
|
|
2516
2518
|
return TaxRates;
|
|
2517
2519
|
}
|
|
2518
2520
|
},
|
|
2521
|
+
TaxIds: () => {
|
|
2522
|
+
{
|
|
2523
|
+
return TaxIds;
|
|
2524
|
+
}
|
|
2525
|
+
},
|
|
2519
2526
|
TaxCodes: () => {
|
|
2520
2527
|
{
|
|
2521
2528
|
return TaxCodes;
|
|
@@ -4389,6 +4396,7 @@ var Accounts2 = StripeResource.extend({
|
|
|
4389
4396
|
method: "POST",
|
|
4390
4397
|
fullPath: "/v1/accounts/{account}/reject"
|
|
4391
4398
|
}),
|
|
4399
|
+
retrieveCurrent: stripeMethod56({ method: "GET", fullPath: "/v1/account" }),
|
|
4392
4400
|
retrieveCapability: stripeMethod56({
|
|
4393
4401
|
method: "GET",
|
|
4394
4402
|
fullPath: "/v1/accounts/{account}/capabilities/{capability}"
|
|
@@ -4581,14 +4589,14 @@ var Customers2 = StripeResource.extend({
|
|
|
4581
4589
|
methodType: "list"
|
|
4582
4590
|
}),
|
|
4583
4591
|
del: stripeMethod68({ method: "DELETE", fullPath: "/v1/customers/{customer}" }),
|
|
4584
|
-
createFundingInstructions: stripeMethod68({
|
|
4585
|
-
method: "POST",
|
|
4586
|
-
fullPath: "/v1/customers/{customer}/funding_instructions"
|
|
4587
|
-
}),
|
|
4588
4592
|
createBalanceTransaction: stripeMethod68({
|
|
4589
4593
|
method: "POST",
|
|
4590
4594
|
fullPath: "/v1/customers/{customer}/balance_transactions"
|
|
4591
4595
|
}),
|
|
4596
|
+
createFundingInstructions: stripeMethod68({
|
|
4597
|
+
method: "POST",
|
|
4598
|
+
fullPath: "/v1/customers/{customer}/funding_instructions"
|
|
4599
|
+
}),
|
|
4592
4600
|
createSource: stripeMethod68({
|
|
4593
4601
|
method: "POST",
|
|
4594
4602
|
fullPath: "/v1/customers/{customer}/sources"
|
|
@@ -4609,11 +4617,6 @@ var Customers2 = StripeResource.extend({
|
|
|
4609
4617
|
method: "DELETE",
|
|
4610
4618
|
fullPath: "/v1/customers/{customer}/tax_ids/{id}"
|
|
4611
4619
|
}),
|
|
4612
|
-
listPaymentMethods: stripeMethod68({
|
|
4613
|
-
method: "GET",
|
|
4614
|
-
fullPath: "/v1/customers/{customer}/payment_methods",
|
|
4615
|
-
methodType: "list"
|
|
4616
|
-
}),
|
|
4617
4620
|
listBalanceTransactions: stripeMethod68({
|
|
4618
4621
|
method: "GET",
|
|
4619
4622
|
fullPath: "/v1/customers/{customer}/balance_transactions",
|
|
@@ -4624,6 +4627,11 @@ var Customers2 = StripeResource.extend({
|
|
|
4624
4627
|
fullPath: "/v1/customers/{customer}/cash_balance_transactions",
|
|
4625
4628
|
methodType: "list"
|
|
4626
4629
|
}),
|
|
4630
|
+
listPaymentMethods: stripeMethod68({
|
|
4631
|
+
method: "GET",
|
|
4632
|
+
fullPath: "/v1/customers/{customer}/payment_methods",
|
|
4633
|
+
methodType: "list"
|
|
4634
|
+
}),
|
|
4627
4635
|
listSources: stripeMethod68({
|
|
4628
4636
|
method: "GET",
|
|
4629
4637
|
fullPath: "/v1/customers/{customer}/sources",
|
|
@@ -4634,10 +4642,6 @@ var Customers2 = StripeResource.extend({
|
|
|
4634
4642
|
fullPath: "/v1/customers/{customer}/tax_ids",
|
|
4635
4643
|
methodType: "list"
|
|
4636
4644
|
}),
|
|
4637
|
-
retrievePaymentMethod: stripeMethod68({
|
|
4638
|
-
method: "GET",
|
|
4639
|
-
fullPath: "/v1/customers/{customer}/payment_methods/{payment_method}"
|
|
4640
|
-
}),
|
|
4641
4645
|
retrieveBalanceTransaction: stripeMethod68({
|
|
4642
4646
|
method: "GET",
|
|
4643
4647
|
fullPath: "/v1/customers/{customer}/balance_transactions/{transaction}"
|
|
@@ -4650,6 +4654,10 @@ var Customers2 = StripeResource.extend({
|
|
|
4650
4654
|
method: "GET",
|
|
4651
4655
|
fullPath: "/v1/customers/{customer}/cash_balance_transactions/{transaction}"
|
|
4652
4656
|
}),
|
|
4657
|
+
retrievePaymentMethod: stripeMethod68({
|
|
4658
|
+
method: "GET",
|
|
4659
|
+
fullPath: "/v1/customers/{customer}/payment_methods/{payment_method}"
|
|
4660
|
+
}),
|
|
4653
4661
|
retrieveSource: stripeMethod68({
|
|
4654
4662
|
method: "GET",
|
|
4655
4663
|
fullPath: "/v1/customers/{customer}/sources/{id}"
|
|
@@ -4877,6 +4885,10 @@ var Invoices = StripeResource.extend({
|
|
|
4877
4885
|
method: "POST",
|
|
4878
4886
|
fullPath: "/v1/invoices/{invoice}/send"
|
|
4879
4887
|
}),
|
|
4888
|
+
updateLineItem: stripeMethod76({
|
|
4889
|
+
method: "POST",
|
|
4890
|
+
fullPath: "/v1/invoices/{invoice}/lines/{line_item_id}"
|
|
4891
|
+
}),
|
|
4880
4892
|
voidInvoice: stripeMethod76({
|
|
4881
4893
|
method: "POST",
|
|
4882
4894
|
fullPath: "/v1/invoices/{invoice}/void"
|
|
@@ -5396,84 +5408,96 @@ var TaxCodes = StripeResource.extend({
|
|
|
5396
5408
|
methodType: "list"
|
|
5397
5409
|
})
|
|
5398
5410
|
});
|
|
5399
|
-
// ../../../../node_modules/stripe/esm/resources/
|
|
5411
|
+
// ../../../../node_modules/stripe/esm/resources/TaxIds.js
|
|
5400
5412
|
var stripeMethod100 = StripeResource.method;
|
|
5401
|
-
var
|
|
5402
|
-
create: stripeMethod100({ method: "POST", fullPath: "/v1/
|
|
5403
|
-
retrieve: stripeMethod100({ method: "GET", fullPath: "/v1/
|
|
5404
|
-
update: stripeMethod100({ method: "POST", fullPath: "/v1/tax_rates/{tax_rate}" }),
|
|
5413
|
+
var TaxIds = StripeResource.extend({
|
|
5414
|
+
create: stripeMethod100({ method: "POST", fullPath: "/v1/tax_ids" }),
|
|
5415
|
+
retrieve: stripeMethod100({ method: "GET", fullPath: "/v1/tax_ids/{id}" }),
|
|
5405
5416
|
list: stripeMethod100({
|
|
5417
|
+
method: "GET",
|
|
5418
|
+
fullPath: "/v1/tax_ids",
|
|
5419
|
+
methodType: "list"
|
|
5420
|
+
}),
|
|
5421
|
+
del: stripeMethod100({ method: "DELETE", fullPath: "/v1/tax_ids/{id}" })
|
|
5422
|
+
});
|
|
5423
|
+
// ../../../../node_modules/stripe/esm/resources/TaxRates.js
|
|
5424
|
+
var stripeMethod101 = StripeResource.method;
|
|
5425
|
+
var TaxRates = StripeResource.extend({
|
|
5426
|
+
create: stripeMethod101({ method: "POST", fullPath: "/v1/tax_rates" }),
|
|
5427
|
+
retrieve: stripeMethod101({ method: "GET", fullPath: "/v1/tax_rates/{tax_rate}" }),
|
|
5428
|
+
update: stripeMethod101({ method: "POST", fullPath: "/v1/tax_rates/{tax_rate}" }),
|
|
5429
|
+
list: stripeMethod101({
|
|
5406
5430
|
method: "GET",
|
|
5407
5431
|
fullPath: "/v1/tax_rates",
|
|
5408
5432
|
methodType: "list"
|
|
5409
5433
|
})
|
|
5410
5434
|
});
|
|
5411
5435
|
// ../../../../node_modules/stripe/esm/resources/Tokens.js
|
|
5412
|
-
var
|
|
5436
|
+
var stripeMethod102 = StripeResource.method;
|
|
5413
5437
|
var Tokens2 = StripeResource.extend({
|
|
5414
|
-
create:
|
|
5415
|
-
retrieve:
|
|
5438
|
+
create: stripeMethod102({ method: "POST", fullPath: "/v1/tokens" }),
|
|
5439
|
+
retrieve: stripeMethod102({ method: "GET", fullPath: "/v1/tokens/{token}" })
|
|
5416
5440
|
});
|
|
5417
5441
|
// ../../../../node_modules/stripe/esm/resources/Topups.js
|
|
5418
|
-
var
|
|
5442
|
+
var stripeMethod103 = StripeResource.method;
|
|
5419
5443
|
var Topups = StripeResource.extend({
|
|
5420
|
-
create:
|
|
5421
|
-
retrieve:
|
|
5422
|
-
update:
|
|
5423
|
-
list:
|
|
5444
|
+
create: stripeMethod103({ method: "POST", fullPath: "/v1/topups" }),
|
|
5445
|
+
retrieve: stripeMethod103({ method: "GET", fullPath: "/v1/topups/{topup}" }),
|
|
5446
|
+
update: stripeMethod103({ method: "POST", fullPath: "/v1/topups/{topup}" }),
|
|
5447
|
+
list: stripeMethod103({
|
|
5424
5448
|
method: "GET",
|
|
5425
5449
|
fullPath: "/v1/topups",
|
|
5426
5450
|
methodType: "list"
|
|
5427
5451
|
}),
|
|
5428
|
-
cancel:
|
|
5452
|
+
cancel: stripeMethod103({ method: "POST", fullPath: "/v1/topups/{topup}/cancel" })
|
|
5429
5453
|
});
|
|
5430
5454
|
// ../../../../node_modules/stripe/esm/resources/Transfers.js
|
|
5431
|
-
var
|
|
5455
|
+
var stripeMethod104 = StripeResource.method;
|
|
5432
5456
|
var Transfers = StripeResource.extend({
|
|
5433
|
-
create:
|
|
5434
|
-
retrieve:
|
|
5435
|
-
update:
|
|
5436
|
-
list:
|
|
5457
|
+
create: stripeMethod104({ method: "POST", fullPath: "/v1/transfers" }),
|
|
5458
|
+
retrieve: stripeMethod104({ method: "GET", fullPath: "/v1/transfers/{transfer}" }),
|
|
5459
|
+
update: stripeMethod104({ method: "POST", fullPath: "/v1/transfers/{transfer}" }),
|
|
5460
|
+
list: stripeMethod104({
|
|
5437
5461
|
method: "GET",
|
|
5438
5462
|
fullPath: "/v1/transfers",
|
|
5439
5463
|
methodType: "list"
|
|
5440
5464
|
}),
|
|
5441
|
-
createReversal:
|
|
5465
|
+
createReversal: stripeMethod104({
|
|
5442
5466
|
method: "POST",
|
|
5443
5467
|
fullPath: "/v1/transfers/{id}/reversals"
|
|
5444
5468
|
}),
|
|
5445
|
-
listReversals:
|
|
5469
|
+
listReversals: stripeMethod104({
|
|
5446
5470
|
method: "GET",
|
|
5447
5471
|
fullPath: "/v1/transfers/{id}/reversals",
|
|
5448
5472
|
methodType: "list"
|
|
5449
5473
|
}),
|
|
5450
|
-
retrieveReversal:
|
|
5474
|
+
retrieveReversal: stripeMethod104({
|
|
5451
5475
|
method: "GET",
|
|
5452
5476
|
fullPath: "/v1/transfers/{transfer}/reversals/{id}"
|
|
5453
5477
|
}),
|
|
5454
|
-
updateReversal:
|
|
5478
|
+
updateReversal: stripeMethod104({
|
|
5455
5479
|
method: "POST",
|
|
5456
5480
|
fullPath: "/v1/transfers/{transfer}/reversals/{id}"
|
|
5457
5481
|
})
|
|
5458
5482
|
});
|
|
5459
5483
|
// ../../../../node_modules/stripe/esm/resources/WebhookEndpoints.js
|
|
5460
|
-
var
|
|
5484
|
+
var stripeMethod105 = StripeResource.method;
|
|
5461
5485
|
var WebhookEndpoints = StripeResource.extend({
|
|
5462
|
-
create:
|
|
5463
|
-
retrieve:
|
|
5486
|
+
create: stripeMethod105({ method: "POST", fullPath: "/v1/webhook_endpoints" }),
|
|
5487
|
+
retrieve: stripeMethod105({
|
|
5464
5488
|
method: "GET",
|
|
5465
5489
|
fullPath: "/v1/webhook_endpoints/{webhook_endpoint}"
|
|
5466
5490
|
}),
|
|
5467
|
-
update:
|
|
5491
|
+
update: stripeMethod105({
|
|
5468
5492
|
method: "POST",
|
|
5469
5493
|
fullPath: "/v1/webhook_endpoints/{webhook_endpoint}"
|
|
5470
5494
|
}),
|
|
5471
|
-
list:
|
|
5495
|
+
list: stripeMethod105({
|
|
5472
5496
|
method: "GET",
|
|
5473
5497
|
fullPath: "/v1/webhook_endpoints",
|
|
5474
5498
|
methodType: "list"
|
|
5475
5499
|
}),
|
|
5476
|
-
del:
|
|
5500
|
+
del: stripeMethod105({
|
|
5477
5501
|
method: "DELETE",
|
|
5478
5502
|
fullPath: "/v1/webhook_endpoints/{webhook_endpoint}"
|
|
5479
5503
|
})
|
|
@@ -5970,7 +5994,7 @@ function createWebhooks(platformFunctions) {
|
|
|
5970
5994
|
|
|
5971
5995
|
// ../../../../node_modules/stripe/esm/stripe.core.js
|
|
5972
5996
|
function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
|
|
5973
|
-
Stripe.PACKAGE_VERSION = "14.
|
|
5997
|
+
Stripe.PACKAGE_VERSION = "14.19.0";
|
|
5974
5998
|
Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: "node", publisher: "stripe", uname: null, typescript: false }, determineProcessUserAgentProperties());
|
|
5975
5999
|
Stripe.StripeResource = StripeResource;
|
|
5976
6000
|
Stripe.resources = exports_resources;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/payments",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.59.1",
|
|
5
5
|
"description": "The Stacks payments package. Currently supporting Stripe.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@stacksjs/utils": "latest",
|
|
54
|
-
"@stripe/stripe-js": "^3.0.
|
|
55
|
-
"stripe": "^14.
|
|
54
|
+
"@stripe/stripe-js": "^3.0.7",
|
|
55
|
+
"stripe": "^14.19.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@stacksjs/config": "latest",
|