@activepieces/piece-stripe 0.6.8 → 0.6.10

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 (137) hide show
  1. package/package.json +7 -13
  2. package/src/index.js +26 -127
  3. package/src/index.d.ts +0 -3
  4. package/src/index.d.ts.map +0 -1
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/cancel-subscription.d.ts +0 -5
  7. package/src/lib/actions/cancel-subscription.d.ts.map +0 -1
  8. package/src/lib/actions/cancel-subscription.js +0 -37
  9. package/src/lib/actions/cancel-subscription.js.map +0 -1
  10. package/src/lib/actions/create-customer.d.ts +0 -12
  11. package/src/lib/actions/create-customer.d.ts.map +0 -1
  12. package/src/lib/actions/create-customer.js +0 -86
  13. package/src/lib/actions/create-customer.js.map +0 -1
  14. package/src/lib/actions/create-invoice.d.ts +0 -6
  15. package/src/lib/actions/create-invoice.d.ts.map +0 -1
  16. package/src/lib/actions/create-invoice.js +0 -54
  17. package/src/lib/actions/create-invoice.js.map +0 -1
  18. package/src/lib/actions/create-payment-intent.d.ts +0 -11
  19. package/src/lib/actions/create-payment-intent.d.ts.map +0 -1
  20. package/src/lib/actions/create-payment-intent.js +0 -108
  21. package/src/lib/actions/create-payment-intent.js.map +0 -1
  22. package/src/lib/actions/create-payment-link.d.ts +0 -9
  23. package/src/lib/actions/create-payment-link.d.ts.map +0 -1
  24. package/src/lib/actions/create-payment-link.js +0 -92
  25. package/src/lib/actions/create-payment-link.js.map +0 -1
  26. package/src/lib/actions/create-price.d.ts +0 -8
  27. package/src/lib/actions/create-price.d.ts.map +0 -1
  28. package/src/lib/actions/create-price.js +0 -92
  29. package/src/lib/actions/create-price.js.map +0 -1
  30. package/src/lib/actions/create-product.d.ts +0 -9
  31. package/src/lib/actions/create-product.d.ts.map +0 -1
  32. package/src/lib/actions/create-product.js +0 -84
  33. package/src/lib/actions/create-product.js.map +0 -1
  34. package/src/lib/actions/create-refund.d.ts +0 -7
  35. package/src/lib/actions/create-refund.d.ts.map +0 -1
  36. package/src/lib/actions/create-refund.js +0 -72
  37. package/src/lib/actions/create-refund.js.map +0 -1
  38. package/src/lib/actions/create-subscription.d.ts +0 -10
  39. package/src/lib/actions/create-subscription.d.ts.map +0 -1
  40. package/src/lib/actions/create-subscription.js +0 -105
  41. package/src/lib/actions/create-subscription.js.map +0 -1
  42. package/src/lib/actions/deactivate-payment-link.d.ts +0 -4
  43. package/src/lib/actions/deactivate-payment-link.d.ts.map +0 -1
  44. package/src/lib/actions/deactivate-payment-link.js +0 -26
  45. package/src/lib/actions/deactivate-payment-link.js.map +0 -1
  46. package/src/lib/actions/find-invoice.d.ts +0 -4
  47. package/src/lib/actions/find-invoice.d.ts.map +0 -1
  48. package/src/lib/actions/find-invoice.js +0 -32
  49. package/src/lib/actions/find-invoice.js.map +0 -1
  50. package/src/lib/actions/retrieve-customer.d.ts +0 -4
  51. package/src/lib/actions/retrieve-customer.d.ts.map +0 -1
  52. package/src/lib/actions/retrieve-customer.js +0 -37
  53. package/src/lib/actions/retrieve-customer.js.map +0 -1
  54. package/src/lib/actions/retrieve-invoice.d.ts +0 -4
  55. package/src/lib/actions/retrieve-invoice.d.ts.map +0 -1
  56. package/src/lib/actions/retrieve-invoice.js +0 -32
  57. package/src/lib/actions/retrieve-invoice.js.map +0 -1
  58. package/src/lib/actions/retrieve-payment-intent.d.ts +0 -4
  59. package/src/lib/actions/retrieve-payment-intent.d.ts.map +0 -1
  60. package/src/lib/actions/retrieve-payment-intent.js +0 -32
  61. package/src/lib/actions/retrieve-payment-intent.js.map +0 -1
  62. package/src/lib/actions/retrieve-payout.d.ts +0 -4
  63. package/src/lib/actions/retrieve-payout.d.ts.map +0 -1
  64. package/src/lib/actions/retrieve-payout.js +0 -32
  65. package/src/lib/actions/retrieve-payout.js.map +0 -1
  66. package/src/lib/actions/search-customer.d.ts +0 -4
  67. package/src/lib/actions/search-customer.d.ts.map +0 -1
  68. package/src/lib/actions/search-customer.js +0 -42
  69. package/src/lib/actions/search-customer.js.map +0 -1
  70. package/src/lib/actions/search-subscriptions.d.ts +0 -11
  71. package/src/lib/actions/search-subscriptions.d.ts.map +0 -1
  72. package/src/lib/actions/search-subscriptions.js +0 -194
  73. package/src/lib/actions/search-subscriptions.js.map +0 -1
  74. package/src/lib/actions/update-customer.d.ts +0 -13
  75. package/src/lib/actions/update-customer.d.ts.map +0 -1
  76. package/src/lib/actions/update-customer.js +0 -95
  77. package/src/lib/actions/update-customer.js.map +0 -1
  78. package/src/lib/common/index.d.ts +0 -18
  79. package/src/lib/common/index.d.ts.map +0 -1
  80. package/src/lib/common/index.js +0 -405
  81. package/src/lib/common/index.js.map +0 -1
  82. package/src/lib/common/types.d.ts +0 -59
  83. package/src/lib/common/types.d.ts.map +0 -1
  84. package/src/lib/common/types.js +0 -3
  85. package/src/lib/common/types.js.map +0 -1
  86. package/src/lib/trigger/canceled-subscription.d.ts +0 -11
  87. package/src/lib/trigger/canceled-subscription.d.ts.map +0 -1
  88. package/src/lib/trigger/canceled-subscription.js +0 -113
  89. package/src/lib/trigger/canceled-subscription.js.map +0 -1
  90. package/src/lib/trigger/checkout-session-completed.d.ts +0 -11
  91. package/src/lib/trigger/checkout-session-completed.d.ts.map +0 -1
  92. package/src/lib/trigger/checkout-session-completed.js +0 -91
  93. package/src/lib/trigger/checkout-session-completed.js.map +0 -1
  94. package/src/lib/trigger/invoice-payment-failed.d.ts +0 -11
  95. package/src/lib/trigger/invoice-payment-failed.d.ts.map +0 -1
  96. package/src/lib/trigger/invoice-payment-failed.js +0 -101
  97. package/src/lib/trigger/invoice-payment-failed.js.map +0 -1
  98. package/src/lib/trigger/new-charge.d.ts +0 -3
  99. package/src/lib/trigger/new-charge.d.ts.map +0 -1
  100. package/src/lib/trigger/new-charge.js +0 -96
  101. package/src/lib/trigger/new-charge.js.map +0 -1
  102. package/src/lib/trigger/new-customer.d.ts +0 -3
  103. package/src/lib/trigger/new-customer.d.ts.map +0 -1
  104. package/src/lib/trigger/new-customer.js +0 -91
  105. package/src/lib/trigger/new-customer.js.map +0 -1
  106. package/src/lib/trigger/new-dispute.d.ts +0 -15
  107. package/src/lib/trigger/new-dispute.d.ts.map +0 -1
  108. package/src/lib/trigger/new-dispute.js +0 -99
  109. package/src/lib/trigger/new-dispute.js.map +0 -1
  110. package/src/lib/trigger/new-invoice.d.ts +0 -19
  111. package/src/lib/trigger/new-invoice.d.ts.map +0 -1
  112. package/src/lib/trigger/new-invoice.js +0 -114
  113. package/src/lib/trigger/new-invoice.js.map +0 -1
  114. package/src/lib/trigger/new-payment-link.d.ts +0 -3
  115. package/src/lib/trigger/new-payment-link.d.ts.map +0 -1
  116. package/src/lib/trigger/new-payment-link.js +0 -76
  117. package/src/lib/trigger/new-payment-link.js.map +0 -1
  118. package/src/lib/trigger/new-payment.d.ts +0 -3
  119. package/src/lib/trigger/new-payment.d.ts.map +0 -1
  120. package/src/lib/trigger/new-payment.js +0 -158
  121. package/src/lib/trigger/new-payment.js.map +0 -1
  122. package/src/lib/trigger/new-refund.d.ts +0 -15
  123. package/src/lib/trigger/new-refund.d.ts.map +0 -1
  124. package/src/lib/trigger/new-refund.js +0 -91
  125. package/src/lib/trigger/new-refund.js.map +0 -1
  126. package/src/lib/trigger/new-subscription.d.ts +0 -3
  127. package/src/lib/trigger/new-subscription.d.ts.map +0 -1
  128. package/src/lib/trigger/new-subscription.js +0 -197
  129. package/src/lib/trigger/new-subscription.js.map +0 -1
  130. package/src/lib/trigger/payment-failed.d.ts +0 -3
  131. package/src/lib/trigger/payment-failed.d.ts.map +0 -1
  132. package/src/lib/trigger/payment-failed.js +0 -204
  133. package/src/lib/trigger/payment-failed.js.map +0 -1
  134. package/src/lib/trigger/updated-subscription.d.ts +0 -15
  135. package/src/lib/trigger/updated-subscription.d.ts.map +0 -1
  136. package/src/lib/trigger/updated-subscription.js +0 -127
  137. package/src/lib/trigger/updated-subscription.js.map +0 -1
@@ -1,84 +0,0 @@
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.secret_text,
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-product.js","sourceRoot":"","sources":["../../../../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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AE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW;iBAChC;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"}
@@ -1,7 +0,0 @@
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, import("@activepieces/pieces-framework").SecretTextProperty<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
- }>;
7
- //# sourceMappingURL=create-refund.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-refund.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-refund.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,kBAAkB;;;;;EAkE7B,CAAC"}
@@ -1,72 +0,0 @@
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.secret_text,
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-refund.js","sourceRoot":"","sources":["../../../../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;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AC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;oBACpC,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC,GAAI,QAAmC,CAAC,GAAG,CAAC,CAAC;gBACvE,CAAC,CAAC,CAAC;YACL,CAAC;YAED,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,CAAC,WAAW;iBAChC;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"}
@@ -1,10 +0,0 @@
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, import("@activepieces/pieces-framework").SecretTextProperty<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
- }>;
10
- //# sourceMappingURL=create-subscription.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-subscription.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-subscription.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,wBAAwB;;;;;;;;EAiHnC,CAAC"}
@@ -1,105 +0,0 @@
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.secret_text,
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-subscription.js","sourceRoot":"","sources":["../../../../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,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WAAW;iBAChC;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"}
@@ -1,4 +0,0 @@
1
- export declare const stripeDeactivatePaymentLink: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- payment_link_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
3
- }>;
4
- //# sourceMappingURL=deactivate-payment-link.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deactivate-payment-link.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/deactivate-payment-link.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,2BAA2B;;EAgBtC,CAAC"}
@@ -1,26 +0,0 @@
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.secret_text);
20
- return yield client.paymentLinks.update(payment_link_id, {
21
- active: false,
22
- });
23
- });
24
- },
25
- });
26
- //# sourceMappingURL=deactivate-payment-link.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deactivate-payment-link.js","sourceRoot":"","sources":["../../../../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,WAAW,CAAC,CAAC;YACnD,OAAO,MAAM,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,eAAe,EAAE;gBACvD,MAAM,EAAE,KAAK;aACd,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,4 +0,0 @@
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, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
3
- }>;
4
- //# sourceMappingURL=find-invoice.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"find-invoice.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/find-invoice.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,iBAAiB;;EAsB5B,CAAC"}
@@ -1,32 +0,0 @@
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.secret_text,
26
- },
27
- });
28
- return response.body;
29
- });
30
- },
31
- });
32
- //# sourceMappingURL=find-invoice.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"find-invoice.js","sourceRoot":"","sources":["../../../../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,CAAC,WAAW;iBAChC;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare const stripeRetrieveCustomer: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- }>;
4
- //# sourceMappingURL=retrieve-customer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retrieve-customer.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/retrieve-customer.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,sBAAsB;;EA4BjC,CAAC"}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stripeRetrieveCustomer = 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
- exports.stripeRetrieveCustomer = (0, pieces_framework_1.createAction)({
9
- name: 'retrieve_customer',
10
- auth: __1.stripeAuth,
11
- displayName: 'Retrieve Customer',
12
- description: 'Retrieve a customer in stripe by id',
13
- props: {
14
- id: pieces_framework_1.Property.ShortText({
15
- displayName: 'ID',
16
- description: undefined,
17
- required: true,
18
- }),
19
- },
20
- run(context) {
21
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
22
- const customer = {
23
- id: context.propsValue.id,
24
- };
25
- const response = yield pieces_common_1.httpClient.sendRequest({
26
- method: pieces_common_1.HttpMethod.GET,
27
- url: `https://api.stripe.com/v1/customers/${customer.id}`,
28
- authentication: {
29
- type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
30
- token: context.auth.secret_text,
31
- },
32
- });
33
- return response.body;
34
- });
35
- },
36
- });
37
- //# sourceMappingURL=retrieve-customer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retrieve-customer.js","sourceRoot":"","sources":["../../../../src/lib/actions/retrieve-customer.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,6BAAmC;AAEtB,QAAA,sBAAsB,GAAG,IAAA,+BAAY,EAAC;IACjD,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,qCAAqC;IAClD,KAAK,EAAE;QACL,EAAE,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACrB,WAAW,EAAE,IAAI;YACjB,WAAW,EAAE,SAAS;YACtB,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,QAAQ,GAAG;gBACf,EAAE,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE;aAC1B,CAAC;YAEF,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,uCAAuC,QAAQ,CAAC,EAAE,EAAE;gBACzD,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW;iBAChC;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,4 +0,0 @@
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, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
3
- }>;
4
- //# sourceMappingURL=retrieve-invoice.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retrieve-invoice.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/retrieve-invoice.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,qBAAqB;;EAsBhC,CAAC"}
@@ -1,32 +0,0 @@
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.secret_text,
26
- },
27
- });
28
- return response.body;
29
- });
30
- },
31
- });
32
- //# sourceMappingURL=retrieve-invoice.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retrieve-invoice.js","sourceRoot":"","sources":["../../../../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,CAAC,WAAW;iBAChC;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,4 +0,0 @@
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, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
3
- }>;
4
- //# sourceMappingURL=retrieve-payment-intent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retrieve-payment-intent.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/retrieve-payment-intent.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,2BAA2B;;EAuBtC,CAAC"}
@@ -1,32 +0,0 @@
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.secret_text,
26
- },
27
- });
28
- return response.body;
29
- });
30
- },
31
- });
32
- //# sourceMappingURL=retrieve-payment-intent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retrieve-payment-intent.js","sourceRoot":"","sources":["../../../../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,CAAC,WAAW;iBAChC;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,4 +0,0 @@
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, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
3
- }>;
4
- //# sourceMappingURL=retrieve-payout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retrieve-payout.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/retrieve-payout.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,oBAAoB;;EAsB/B,CAAC"}
@@ -1,32 +0,0 @@
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.secret_text,
26
- },
27
- });
28
- return response.body;
29
- });
30
- },
31
- });
32
- //# sourceMappingURL=retrieve-payout.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retrieve-payout.js","sourceRoot":"","sources":["../../../../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,CAAC,WAAW;iBAChC;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare const stripeSearchCustomer: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- }>;
4
- //# sourceMappingURL=search-customer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"search-customer.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/search-customer.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB;;EA8B/B,CAAC"}