@activepieces/piece-stripe 0.5.14 → 0.5.16

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.
Files changed (89) hide show
  1. package/package.json +3 -3
  2. package/src/i18n/de.json +151 -3
  3. package/src/i18n/es.json +151 -3
  4. package/src/i18n/fr.json +151 -3
  5. package/src/i18n/ja.json +151 -3
  6. package/src/i18n/nl.json +151 -3
  7. package/src/i18n/pt.json +151 -3
  8. package/src/i18n/translation.json +151 -3
  9. package/src/i18n/zh.json +151 -3
  10. package/src/index.js +55 -1
  11. package/src/index.js.map +1 -1
  12. package/src/lib/actions/cancel-subscription.d.ts +4 -0
  13. package/src/lib/actions/cancel-subscription.js +37 -0
  14. package/src/lib/actions/cancel-subscription.js.map +1 -0
  15. package/src/lib/actions/create-payment-intent.d.ts +10 -0
  16. package/src/lib/actions/create-payment-intent.js +108 -0
  17. package/src/lib/actions/create-payment-intent.js.map +1 -0
  18. package/src/lib/actions/create-payment-link.d.ts +8 -0
  19. package/src/lib/actions/create-payment-link.js +92 -0
  20. package/src/lib/actions/create-payment-link.js.map +1 -0
  21. package/src/lib/actions/create-price.d.ts +7 -0
  22. package/src/lib/actions/create-price.js +92 -0
  23. package/src/lib/actions/create-price.js.map +1 -0
  24. package/src/lib/actions/create-product.d.ts +8 -0
  25. package/src/lib/actions/create-product.js +84 -0
  26. package/src/lib/actions/create-product.js.map +1 -0
  27. package/src/lib/actions/create-refund.d.ts +6 -0
  28. package/src/lib/actions/create-refund.js +72 -0
  29. package/src/lib/actions/create-refund.js.map +1 -0
  30. package/src/lib/actions/create-subscription.d.ts +9 -0
  31. package/src/lib/actions/create-subscription.js +105 -0
  32. package/src/lib/actions/create-subscription.js.map +1 -0
  33. package/src/lib/actions/deactivate-payment-link.d.ts +3 -0
  34. package/src/lib/actions/deactivate-payment-link.js +26 -0
  35. package/src/lib/actions/deactivate-payment-link.js.map +1 -0
  36. package/src/lib/actions/find-invoice.d.ts +3 -0
  37. package/src/lib/actions/find-invoice.js +32 -0
  38. package/src/lib/actions/find-invoice.js.map +1 -0
  39. package/src/lib/actions/retrieve-invoice.d.ts +3 -0
  40. package/src/lib/actions/retrieve-invoice.js +32 -0
  41. package/src/lib/actions/retrieve-invoice.js.map +1 -0
  42. package/src/lib/actions/retrieve-payment-intent.d.ts +3 -0
  43. package/src/lib/actions/retrieve-payment-intent.js +32 -0
  44. package/src/lib/actions/retrieve-payment-intent.js.map +1 -0
  45. package/src/lib/actions/retrieve-payout.d.ts +3 -0
  46. package/src/lib/actions/retrieve-payout.js +32 -0
  47. package/src/lib/actions/retrieve-payout.js.map +1 -0
  48. package/src/lib/actions/update-customer.d.ts +12 -0
  49. package/src/lib/actions/update-customer.js +95 -0
  50. package/src/lib/actions/update-customer.js.map +1 -0
  51. package/src/lib/common/index.d.ts +10 -0
  52. package/src/lib/common/index.js +360 -7
  53. package/src/lib/common/index.js.map +1 -1
  54. package/src/lib/common/types.d.ts +58 -0
  55. package/src/lib/common/types.js +3 -0
  56. package/src/lib/common/types.js.map +1 -0
  57. package/src/lib/trigger/canceled-subscription.d.ts +8 -0
  58. package/src/lib/trigger/canceled-subscription.js +113 -0
  59. package/src/lib/trigger/canceled-subscription.js.map +1 -0
  60. package/src/lib/trigger/checkout-session-completed.d.ts +8 -0
  61. package/src/lib/trigger/checkout-session-completed.js +91 -0
  62. package/src/lib/trigger/checkout-session-completed.js.map +1 -0
  63. package/src/lib/trigger/invoice-payment-failed.d.ts +8 -0
  64. package/src/lib/trigger/invoice-payment-failed.js +101 -0
  65. package/src/lib/trigger/invoice-payment-failed.js.map +1 -0
  66. package/src/lib/trigger/new-charge.d.ts +2 -0
  67. package/src/lib/trigger/new-charge.js +94 -0
  68. package/src/lib/trigger/new-charge.js.map +1 -0
  69. package/src/lib/trigger/new-customer.js +20 -0
  70. package/src/lib/trigger/new-customer.js.map +1 -1
  71. package/src/lib/trigger/new-dispute.d.ts +11 -0
  72. package/src/lib/trigger/new-dispute.js +98 -0
  73. package/src/lib/trigger/new-dispute.js.map +1 -0
  74. package/src/lib/trigger/new-invoice.d.ts +14 -0
  75. package/src/lib/trigger/new-invoice.js +114 -0
  76. package/src/lib/trigger/new-invoice.js.map +1 -0
  77. package/src/lib/trigger/new-payment-link.d.ts +2 -0
  78. package/src/lib/trigger/new-payment-link.js +76 -0
  79. package/src/lib/trigger/new-payment-link.js.map +1 -0
  80. package/src/lib/trigger/new-payment.js +21 -0
  81. package/src/lib/trigger/new-payment.js.map +1 -1
  82. package/src/lib/trigger/new-refund.d.ts +11 -0
  83. package/src/lib/trigger/new-refund.js +91 -0
  84. package/src/lib/trigger/new-refund.js.map +1 -0
  85. package/src/lib/trigger/payment-failed.js +21 -0
  86. package/src/lib/trigger/payment-failed.js.map +1 -1
  87. package/src/lib/trigger/updated-subscription.d.ts +11 -0
  88. package/src/lib/trigger/updated-subscription.js +127 -0
  89. package/src/lib/trigger/updated-subscription.js.map +1 -0
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stripeCreatePrice = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const pieces_common_1 = require("@activepieces/pieces-common");
7
+ const __1 = require("../..");
8
+ const common_1 = require("../common");
9
+ exports.stripeCreatePrice = (0, pieces_framework_1.createAction)({
10
+ name: 'create_price',
11
+ auth: __1.stripeAuth,
12
+ displayName: 'Create Price',
13
+ description: 'Create a price (one-time or recurring), associated with a product.',
14
+ props: {
15
+ product: common_1.stripeCommon.product,
16
+ unit_amount: pieces_framework_1.Property.Number({
17
+ displayName: 'Unit Amount',
18
+ description: 'The price amount as a decimal, for example, 25.50 for $25.50.',
19
+ required: true,
20
+ }),
21
+ currency: pieces_framework_1.Property.StaticDropdown({
22
+ displayName: 'Currency',
23
+ description: 'The three-letter ISO code for the currency.',
24
+ required: true,
25
+ options: {
26
+ options: [
27
+ { label: 'US Dollar', value: 'usd' },
28
+ { label: 'Euro', value: 'eur' },
29
+ { label: 'Pound Sterling', value: 'gbp' },
30
+ { label: 'Indian Rupee', value: 'inr' },
31
+ { label: 'Australian Dollar', value: 'aud' },
32
+ { label: 'Canadian Dollar', value: 'cad' },
33
+ { label: 'Swiss Franc', value: 'chf' },
34
+ { label: 'Chinese Yuan', value: 'cny' },
35
+ { label: 'Japanese Yen', value: 'jpy' },
36
+ { label: 'Singapore Dollar', value: 'sgd' },
37
+ ],
38
+ },
39
+ }),
40
+ recurring_interval: pieces_framework_1.Property.StaticDropdown({
41
+ displayName: 'Billing Interval',
42
+ description: "Specify the billing frequency. Select 'One-Time' for a single, non-recurring payment.",
43
+ required: true,
44
+ defaultValue: 'one_time',
45
+ options: {
46
+ options: [
47
+ { label: 'One-Time', value: 'one_time' },
48
+ { label: 'Daily', value: 'day' },
49
+ { label: 'Weekly', value: 'week' },
50
+ { label: 'Monthly', value: 'month' },
51
+ { label: 'Yearly', value: 'year' },
52
+ ],
53
+ },
54
+ }),
55
+ recurring_interval_count: pieces_framework_1.Property.Number({
56
+ displayName: 'Interval Count',
57
+ description: 'The number of intervals between subscription billings (e.g., for billing every 3 months, set Interval to Monthly and Interval Count to 3). Only used for recurring prices.',
58
+ required: false,
59
+ }),
60
+ },
61
+ run(context) {
62
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
63
+ const { product, unit_amount, currency, recurring_interval, recurring_interval_count, } = context.propsValue;
64
+ const unitAmountInCents = Math.round(unit_amount * 100);
65
+ const body = {
66
+ product: product,
67
+ unit_amount: unitAmountInCents,
68
+ currency: currency,
69
+ };
70
+ if (recurring_interval !== 'one_time') {
71
+ body['recurring[interval]'] = recurring_interval;
72
+ if (recurring_interval_count) {
73
+ body['recurring[interval_count]'] = recurring_interval_count;
74
+ }
75
+ }
76
+ const response = yield pieces_common_1.httpClient.sendRequest({
77
+ method: pieces_common_1.HttpMethod.POST,
78
+ url: `${common_1.stripeCommon.baseUrl}/prices`,
79
+ authentication: {
80
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
81
+ token: context.auth,
82
+ },
83
+ headers: {
84
+ 'Content-Type': 'application/x-www-form-urlencoded',
85
+ },
86
+ body: body,
87
+ });
88
+ return response.body;
89
+ });
90
+ },
91
+ });
92
+ //# sourceMappingURL=create-price.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-price.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/stripe/src/lib/actions/create-price.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,6BAAmC;AACnC,sCAAyC;AAE5B,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,cAAc;IAC3B,WAAW,EACT,oEAAoE;IACtE,KAAK,EAAE;QACL,OAAO,EAAE,qBAAY,CAAC,OAAO;QAC7B,WAAW,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC3B,WAAW,EAAE,aAAa;YAC1B,WAAW,EACT,+DAA+D;YACjE,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAChC,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,6CAA6C;YAC1D,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE;oBACpC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE;oBAC/B,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,EAAE;oBACzC,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,EAAE;oBACvC,EAAE,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,KAAK,EAAE;oBAC5C,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,EA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9B,QAAQ,EAAE,QAAQ;aACnB,CAAC;YAEF,IAAI,kBAAkB,KAAK,UAAU,EAAE,CAAC;gBACtC,IAAI,CAAC,qBAAqB,CAAC,GAAG,kBAAkB,CAAC;gBACjD,IAAI,wBAAwB,EAAE,CAAC;oBAC7B,IAAI,CAAC,2BAA2B,CAAC,GAAG,wBAAwB,CAAC;gBAC/D,CAAC;YACH,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,GAAG,qBAAY,CAAC,OAAO,SAAS;gBACrC,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI;iBACpB;gBACD,OAAO,EAAE;oBACP,cAAc,EAAE,mCAAmC;iBACpD;gBACD,IAAI,EAAE,IAAI;aACX,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare const stripeCreateProduct: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ description: import("@activepieces/pieces-framework").LongTextProperty<false>;
4
+ active: import("@activepieces/pieces-framework").CheckboxProperty<false>;
5
+ images: import("@activepieces/pieces-framework").ArrayProperty<false>;
6
+ url: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ metadata: import("@activepieces/pieces-framework").JsonProperty<false>;
8
+ }>;
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stripeCreateProduct = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const pieces_common_1 = require("@activepieces/pieces-common");
7
+ const __1 = require("../..");
8
+ const common_1 = require("../common");
9
+ exports.stripeCreateProduct = (0, pieces_framework_1.createAction)({
10
+ name: 'create_product',
11
+ auth: __1.stripeAuth,
12
+ displayName: 'Create Product',
13
+ description: 'Create a new product object in Stripe.',
14
+ props: {
15
+ name: pieces_framework_1.Property.ShortText({
16
+ displayName: 'Product Name',
17
+ description: 'The product’s name, meant to be displayable to the customer.',
18
+ required: true,
19
+ }),
20
+ description: pieces_framework_1.Property.LongText({
21
+ displayName: 'Description',
22
+ description: 'The product’s description, meant to be displayable to the customer.',
23
+ required: false,
24
+ }),
25
+ active: pieces_framework_1.Property.Checkbox({
26
+ displayName: 'Active',
27
+ description: 'Whether the product is currently available for purchase. Defaults to true.',
28
+ required: false,
29
+ }),
30
+ images: pieces_framework_1.Property.Array({
31
+ displayName: 'Image URLs',
32
+ description: 'A list of up to 8 URLs of images for this product.',
33
+ required: false,
34
+ }),
35
+ url: pieces_framework_1.Property.ShortText({
36
+ displayName: 'Product URL',
37
+ description: 'A publicly-accessible online page for this product.',
38
+ required: false,
39
+ }),
40
+ metadata: pieces_framework_1.Property.Json({
41
+ displayName: 'Metadata',
42
+ description: 'A set of key-value pairs to store additional information about the product.',
43
+ required: false,
44
+ }),
45
+ },
46
+ run(context) {
47
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
48
+ const { name, description, active, images, url, metadata } = context.propsValue;
49
+ const body = {
50
+ name: name,
51
+ };
52
+ if (description)
53
+ body.description = description;
54
+ if (active !== undefined)
55
+ body.active = active;
56
+ if (url)
57
+ body.url = url;
58
+ if (images && Array.isArray(images)) {
59
+ images.forEach((image, index) => {
60
+ body[`images[${index}]`] = image;
61
+ });
62
+ }
63
+ if (metadata && typeof metadata === 'object') {
64
+ Object.keys(metadata).forEach((key) => {
65
+ body[`metadata[${key}]`] = metadata[key];
66
+ });
67
+ }
68
+ const response = yield pieces_common_1.httpClient.sendRequest({
69
+ method: pieces_common_1.HttpMethod.POST,
70
+ url: `${common_1.stripeCommon.baseUrl}/products`,
71
+ authentication: {
72
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
73
+ token: context.auth,
74
+ },
75
+ headers: {
76
+ 'Content-Type': 'application/x-www-form-urlencoded',
77
+ },
78
+ body: body,
79
+ });
80
+ return response.body;
81
+ });
82
+ },
83
+ });
84
+ //# sourceMappingURL=create-product.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-product.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/stripe/src/lib/actions/create-product.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,6BAAmC;AACnC,sCAAyC;AAE5B,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC9C,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,wCAAwC;IACrD,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,cAAc;YAC3B,WAAW,EACT,8DAA8D;YAChE,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EACT,qEAAqE;YACvE,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACxB,WAAW,EAAE,QAAQ;YACrB,WAAW,EACT,4EAA4E;YAC9E,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACrB,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,oDAAoD;YACjE,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,GAAG,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACtB,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,qDAAqD;YAClE,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,QAAQ,EAAE,2BAAQ,C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K,EAAE,OAAO,CAAC,IAAI;iBACpB;gBACD,OAAO,EAAE;oBACP,cAAc,EAAE,mCAAmC;iBACpD;gBACD,IAAI,EAAE,IAAI;aACX,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const stripeCreateRefund: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ payment_intent: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
3
+ amount: import("@activepieces/pieces-framework").NumberProperty<false>;
4
+ reason: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
5
+ metadata: import("@activepieces/pieces-framework").JsonProperty<false>;
6
+ }>;
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stripeCreateRefund = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const pieces_common_1 = require("@activepieces/pieces-common");
7
+ const __1 = require("../..");
8
+ const common_1 = require("../common");
9
+ exports.stripeCreateRefund = (0, pieces_framework_1.createAction)({
10
+ name: 'create_refund',
11
+ auth: __1.stripeAuth,
12
+ displayName: 'Create a Refund',
13
+ description: 'Create a full or partial refund for a payment.',
14
+ props: {
15
+ payment_intent: common_1.stripeCommon.paymentIntent,
16
+ amount: pieces_framework_1.Property.Number({
17
+ displayName: 'Amount',
18
+ description: 'The amount to refund (e.g., 12.99). If left blank, a full refund will be issued.',
19
+ required: false,
20
+ }),
21
+ reason: pieces_framework_1.Property.StaticDropdown({
22
+ displayName: 'Reason',
23
+ description: 'An optional reason for the refund.',
24
+ required: false,
25
+ options: {
26
+ options: [
27
+ { label: 'Duplicate', value: 'duplicate' },
28
+ { label: 'Fraudulent', value: 'fraudulent' },
29
+ { label: 'Requested by Customer', value: 'requested_by_customer' },
30
+ ],
31
+ },
32
+ }),
33
+ metadata: pieces_framework_1.Property.Json({
34
+ displayName: 'Metadata',
35
+ description: 'A set of key-value pairs to store additional information about the refund.',
36
+ required: false,
37
+ }),
38
+ },
39
+ run(context) {
40
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
41
+ const { payment_intent, amount, reason, metadata } = context.propsValue;
42
+ const body = {
43
+ payment_intent: payment_intent,
44
+ };
45
+ if (amount !== undefined && amount !== null) {
46
+ body.amount = Math.round(amount * 100);
47
+ }
48
+ if (reason) {
49
+ body.reason = reason;
50
+ }
51
+ if (metadata && typeof metadata === 'object') {
52
+ Object.keys(metadata).forEach((key) => {
53
+ body[`metadata[${key}]`] = metadata[key];
54
+ });
55
+ }
56
+ const response = yield pieces_common_1.httpClient.sendRequest({
57
+ method: pieces_common_1.HttpMethod.POST,
58
+ url: `${common_1.stripeCommon.baseUrl}/refunds`,
59
+ authentication: {
60
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
61
+ token: context.auth,
62
+ },
63
+ headers: {
64
+ 'Content-Type': 'application/x-www-form-urlencoded',
65
+ },
66
+ body: body,
67
+ });
68
+ return response.body;
69
+ });
70
+ },
71
+ });
72
+ //# sourceMappingURL=create-refund.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-refund.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/stripe/src/lib/actions/create-refund.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,6BAAmC;AACnC,sCAAyC;AAE5B,QAAA,kBAAkB,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,gDAAgD;IAC7D,KAAK,EAAE;QACL,cAAc,EAAE,qBAAY,CAAC,aAAa;QAC1C,MAAM,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACtB,WAAW,EAAE,QAAQ;YACrB,WAAW,EACT,kFAAkF;YACpF,QAAQ,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ED,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,GAAG,qBAAY,CAAC,OAAO,UAAU;gBACtC,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI;iBACpB;gBACD,OAAO,EAAE;oBACP,cAAc,EAAE,mCAAmC;iBACpD;gBACD,IAAI,EAAE,IAAI;aACX,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare const stripeCreateSubscription: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ customer: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
3
+ items: import("@activepieces/pieces-framework").ArrayProperty<true> | import("@activepieces/pieces-framework").ArrayProperty<false>;
4
+ collection_method: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
5
+ days_until_due: import("@activepieces/pieces-framework").NumberProperty<false>;
6
+ trial_period_days: import("@activepieces/pieces-framework").NumberProperty<false>;
7
+ default_payment_method: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
+ metadata: import("@activepieces/pieces-framework").JsonProperty<false>;
9
+ }>;
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stripeCreateSubscription = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const pieces_common_1 = require("@activepieces/pieces-common");
7
+ const __1 = require("../..");
8
+ const common_1 = require("../common");
9
+ exports.stripeCreateSubscription = (0, pieces_framework_1.createAction)({
10
+ name: 'create_subscription',
11
+ auth: __1.stripeAuth,
12
+ displayName: 'Create Subscription',
13
+ description: 'Start a subscription for a customer with specified items/prices.',
14
+ props: {
15
+ customer: common_1.stripeCommon.customer,
16
+ items: pieces_framework_1.Property.Array({
17
+ displayName: 'Subscription Items',
18
+ description: 'A list of prices to subscribe the customer to.',
19
+ required: true,
20
+ properties: {
21
+ price: pieces_framework_1.Property.ShortText({
22
+ displayName: 'Price ID',
23
+ description: 'The ID of the price object (e.g., price_...). You can find this in your Stripe Dashboard under Products.',
24
+ required: true,
25
+ }),
26
+ quantity: pieces_framework_1.Property.Number({
27
+ displayName: 'Quantity',
28
+ description: 'The number of units of this price to subscribe to. Defaults to 1.',
29
+ required: false,
30
+ }),
31
+ },
32
+ }),
33
+ collection_method: pieces_framework_1.Property.StaticDropdown({
34
+ displayName: 'Collection Method',
35
+ description: "How to collect payment. 'charge_automatically' will try to bill the default payment method. 'send_invoice' will email an invoice.",
36
+ required: false,
37
+ options: {
38
+ options: [
39
+ { label: 'Charge Automatically', value: 'charge_automatically' },
40
+ { label: 'Send Invoice', value: 'send_invoice' },
41
+ ],
42
+ },
43
+ }),
44
+ days_until_due: pieces_framework_1.Property.Number({
45
+ displayName: 'Days Until Due',
46
+ description: "Number of days before an invoice is due. Required if Collection Method is 'Send Invoice'.",
47
+ required: false,
48
+ }),
49
+ trial_period_days: pieces_framework_1.Property.Number({
50
+ displayName: 'Trial Period (Days)',
51
+ description: 'Integer representing the number of trial days the customer receives before the subscription bills for the first time.',
52
+ required: false,
53
+ }),
54
+ default_payment_method: pieces_framework_1.Property.ShortText({
55
+ displayName: 'Default Payment Method ID',
56
+ description: 'ID of the default payment method for the subscription (e.g., `pm_...`).',
57
+ required: false,
58
+ }),
59
+ metadata: pieces_framework_1.Property.Json({
60
+ displayName: 'Metadata',
61
+ required: false,
62
+ }),
63
+ },
64
+ run(context) {
65
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
66
+ const { customer, items, collection_method, days_until_due, trial_period_days, default_payment_method, metadata, } = context.propsValue;
67
+ const body = {
68
+ customer,
69
+ collection_method,
70
+ days_until_due,
71
+ trial_period_days,
72
+ default_payment_method,
73
+ metadata,
74
+ };
75
+ Object.keys(body).forEach((key) => {
76
+ if (body[key] === undefined || body[key] === null) {
77
+ delete body[key];
78
+ }
79
+ });
80
+ if (items && Array.isArray(items)) {
81
+ items.forEach((item, index) => {
82
+ const typedItem = item;
83
+ body[`items[${index}][price]`] = typedItem.price;
84
+ if (typedItem.quantity) {
85
+ body[`items[${index}][quantity]`] = typedItem.quantity;
86
+ }
87
+ });
88
+ }
89
+ const response = yield pieces_common_1.httpClient.sendRequest({
90
+ method: pieces_common_1.HttpMethod.POST,
91
+ url: `${common_1.stripeCommon.baseUrl}/subscriptions`,
92
+ authentication: {
93
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
94
+ token: context.auth,
95
+ },
96
+ headers: {
97
+ 'Content-Type': 'application/x-www-form-urlencoded',
98
+ },
99
+ body: body,
100
+ });
101
+ return response.body;
102
+ });
103
+ },
104
+ });
105
+ //# sourceMappingURL=create-subscription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-subscription.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/stripe/src/lib/actions/create-subscription.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,6BAAmC;AACnC,sCAAyC;AAE5B,QAAA,wBAAwB,GAAG,IAAA,+BAAY,EAAC;IACnD,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,qBAAqB;IAClC,WAAW,EACT,kEAAkE;IACpE,KAAK,EAAE;QACL,QAAQ,EAAE,qBAAY,CAAC,QAAQ;QAC/B,KAAK,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACpB,WAAW,EAAE,oBAAoB;YACjC,WAAW,EAAE,gDAAgD;YAC7D,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE;gBACV,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;oBACxB,WAAW,EAAE,UAAU;oBACvB,WAAW,EACT,0GAA0G;oBAC5G,QAAQ,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@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ payment_link_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
3
+ }>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stripeDeactivatePaymentLink = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const __1 = require("../..");
7
+ const common_1 = require("../common");
8
+ exports.stripeDeactivatePaymentLink = (0, pieces_framework_1.createAction)({
9
+ name: 'deactivate_payment_link',
10
+ auth: __1.stripeAuth,
11
+ displayName: 'Deactivate Payment Link',
12
+ description: 'Disable or deactivate a Payment Link so it can no longer be used.',
13
+ props: {
14
+ payment_link_id: common_1.stripeCommon.paymentLink,
15
+ },
16
+ run(context) {
17
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
18
+ const { payment_link_id } = context.propsValue;
19
+ const client = (0, common_1.getClient)(context.auth);
20
+ return yield client.paymentLinks.update(payment_link_id, {
21
+ active: false,
22
+ });
23
+ });
24
+ },
25
+ });
26
+ //# sourceMappingURL=deactivate-payment-link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deactivate-payment-link.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/stripe/src/lib/actions/deactivate-payment-link.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,6BAAmC;AACnC,sCAAoD;AAEvC,QAAA,2BAA2B,GAAG,IAAA,+BAAY,EAAC;IACtD,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,yBAAyB;IACtC,WAAW,EACT,mEAAmE;IACrE,KAAK,EAAE;QACL,eAAe,EAAE,qBAAY,CAAC,WAAW;KAC1C;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC/C,MAAM,MAAM,GAAG,IAAA,kBAAS,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACvC,OAAO,MAAM,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,eAAe,EAAE;gBACvD,MAAM,EAAE,KAAK;aACd,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const stripeFindInvoice: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ invoice_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
3
+ }>;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stripeFindInvoice = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const pieces_common_1 = require("@activepieces/pieces-common");
7
+ const __1 = require("../..");
8
+ const common_1 = require("../common");
9
+ exports.stripeFindInvoice = (0, pieces_framework_1.createAction)({
10
+ name: 'find_invoice',
11
+ auth: __1.stripeAuth,
12
+ displayName: 'Find Invoice',
13
+ description: 'Finds an invoice by its unique ID.',
14
+ props: {
15
+ invoice_id: common_1.stripeCommon.invoice,
16
+ },
17
+ run(context) {
18
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
19
+ const { invoice_id } = context.propsValue;
20
+ const response = yield pieces_common_1.httpClient.sendRequest({
21
+ method: pieces_common_1.HttpMethod.GET,
22
+ url: `${common_1.stripeCommon.baseUrl}/invoices/${invoice_id}`,
23
+ authentication: {
24
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
25
+ token: context.auth,
26
+ },
27
+ });
28
+ return response.body;
29
+ });
30
+ },
31
+ });
32
+ //# sourceMappingURL=find-invoice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-invoice.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/stripe/src/lib/actions/find-invoice.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAIqC;AACrC,6BAAmC;AACnC,sCAAyC;AAE5B,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,oCAAoC;IACjD,KAAK,EAAE;QACL,UAAU,EAAE,qBAAY,CAAC,OAAO;KACjC;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAE1C,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,GAAG,qBAAY,CAAC,OAAO,aAAa,UAAU,EAAE;gBACrD,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI;iBACpB;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const stripeRetrieveInvoice: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ invoice_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
3
+ }>;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stripeRetrieveInvoice = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const pieces_common_1 = require("@activepieces/pieces-common");
7
+ const __1 = require("../..");
8
+ const common_1 = require("../common");
9
+ exports.stripeRetrieveInvoice = (0, pieces_framework_1.createAction)({
10
+ name: 'retrieve_invoice',
11
+ auth: __1.stripeAuth,
12
+ displayName: 'Retrieve an Invoice',
13
+ description: 'Retrieves the details of an existing invoice by its ID.',
14
+ props: {
15
+ invoice_id: common_1.stripeCommon.invoice,
16
+ },
17
+ run(context) {
18
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
19
+ const { invoice_id } = context.propsValue;
20
+ const response = yield pieces_common_1.httpClient.sendRequest({
21
+ method: pieces_common_1.HttpMethod.GET,
22
+ url: `${common_1.stripeCommon.baseUrl}/invoices/${invoice_id}`,
23
+ authentication: {
24
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
25
+ token: context.auth,
26
+ },
27
+ });
28
+ return response.body;
29
+ });
30
+ },
31
+ });
32
+ //# sourceMappingURL=retrieve-invoice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retrieve-invoice.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/stripe/src/lib/actions/retrieve-invoice.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAIqC;AACrC,6BAAmC;AACnC,sCAAyC;AAE5B,QAAA,qBAAqB,GAAG,IAAA,+BAAY,EAAC;IAChD,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,yDAAyD;IACtE,KAAK,EAAE;QACL,UAAU,EAAE,qBAAY,CAAC,OAAO;KACjC;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAE1C,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,GAAG,qBAAY,CAAC,OAAO,aAAa,UAAU,EAAE;gBACrD,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI;iBACpB;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const stripeRetrievePaymentIntent: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ payment_intent_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
3
+ }>;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stripeRetrievePaymentIntent = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const pieces_common_1 = require("@activepieces/pieces-common");
7
+ const __1 = require("../..");
8
+ const common_1 = require("../common");
9
+ exports.stripeRetrievePaymentIntent = (0, pieces_framework_1.createAction)({
10
+ name: 'retrieve_payment_intent',
11
+ auth: __1.stripeAuth,
12
+ displayName: 'Find Payment (by Payment Intent ID)',
13
+ description: 'Retrieves the details of a payment by its unique Payment Intent ID.',
14
+ props: {
15
+ payment_intent_id: common_1.stripeCommon.paymentIntent,
16
+ },
17
+ run(context) {
18
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
19
+ const { payment_intent_id } = context.propsValue;
20
+ const response = yield pieces_common_1.httpClient.sendRequest({
21
+ method: pieces_common_1.HttpMethod.GET,
22
+ url: `${common_1.stripeCommon.baseUrl}/payment_intents/${payment_intent_id}`,
23
+ authentication: {
24
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
25
+ token: context.auth,
26
+ },
27
+ });
28
+ return response.body;
29
+ });
30
+ },
31
+ });
32
+ //# sourceMappingURL=retrieve-payment-intent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retrieve-payment-intent.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/stripe/src/lib/actions/retrieve-payment-intent.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAIqC;AACrC,6BAAmC;AACnC,sCAAyC;AAE5B,QAAA,2BAA2B,GAAG,IAAA,+BAAY,EAAC;IACtD,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,qCAAqC;IAClD,WAAW,EACT,qEAAqE;IACvE,KAAK,EAAE;QACL,iBAAiB,EAAE,qBAAY,CAAC,aAAa;KAC9C;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAEjD,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,GAAG,qBAAY,CAAC,OAAO,oBAAoB,iBAAiB,EAAE;gBACnE,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI;iBACpB;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const stripeRetrievePayout: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ payout_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
3
+ }>;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stripeRetrievePayout = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const pieces_common_1 = require("@activepieces/pieces-common");
7
+ const __1 = require("../..");
8
+ const common_1 = require("../common");
9
+ exports.stripeRetrievePayout = (0, pieces_framework_1.createAction)({
10
+ name: 'retrieve_payout',
11
+ auth: __1.stripeAuth,
12
+ displayName: 'Retrieve a Payout',
13
+ description: 'Retrieves the details of an existing payout by its ID.',
14
+ props: {
15
+ payout_id: common_1.stripeCommon.payout,
16
+ },
17
+ run(context) {
18
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
19
+ const { payout_id } = context.propsValue;
20
+ const response = yield pieces_common_1.httpClient.sendRequest({
21
+ method: pieces_common_1.HttpMethod.GET,
22
+ url: `${common_1.stripeCommon.baseUrl}/payouts/${payout_id}`,
23
+ authentication: {
24
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
25
+ token: context.auth,
26
+ },
27
+ });
28
+ return response.body;
29
+ });
30
+ },
31
+ });
32
+ //# sourceMappingURL=retrieve-payout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retrieve-payout.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/stripe/src/lib/actions/retrieve-payout.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAIqC;AACrC,6BAAmC;AACnC,sCAAyC;AAE5B,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,wDAAwD;IACrE,KAAK,EAAE;QACL,SAAS,EAAE,qBAAY,CAAC,MAAM;KAC/B;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAEzC,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,GAAG,qBAAY,CAAC,OAAO,YAAY,SAAS,EAAE;gBACnD,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI;iBACpB;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ export declare const stripeUpdateCustomer: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ customer: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
3
+ email: import("@activepieces/pieces-framework").ShortTextProperty<false>;
4
+ name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
+ description: import("@activepieces/pieces-framework").LongTextProperty<false>;
6
+ phone: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ line1: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
+ postal_code: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
+ city: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
+ state: import("@activepieces/pieces-framework").ShortTextProperty<false>;
11
+ country: import("@activepieces/pieces-framework").ShortTextProperty<false>;
12
+ }>;