@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
package/src/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export declare const stripeAuth: import("@activepieces/pieces-framework").SecretTextProperty<true>;
2
- export declare const stripe: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").SecretTextProperty<true>>;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAuCA,eAAO,MAAM,UAAU,mEAuBrB,CAAC;AAEH,eAAO,MAAM,MAAM,mHA6DjB,CAAC"}
package/src/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAIqC;AACrC,qEAAwE;AACxE,iDAAqD;AACrD,mEAAqE;AACrE,iEAAmE;AACnE,uEAAyE;AACzE,mEAAqE;AACrE,6DAA+D;AAC/D,2DAA6D;AAC7D,qEAAuE;AACvE,iEAAmE;AACnE,6EAA+E;AAC/E,yDAA2D;AAC3D,2DAA6D;AAC7D,iFAAkF;AAClF,+EAAiF;AACjF,yDAA2D;AAC3D,2DAA6D;AAC7D,qEAAsE;AACtE,6EAA+E;AAC/E,yFAA0F;AAC1F,mEAAqE;AACrE,+EAAgF;AAChF,iEAAmE;AACnE,6DAA+D;AAC/D,2EAA6E;AAC7E,2EAA6E;AAC7E,qEAAuE;AACvE,mEAAqE;AACrE,+DAAiE;AACjE,2EAA4E;AAC5E,mFAAoF;AACpF,mFAAoF;AACpF,6DAA+D;AAElD,QAAA,UAAU,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC7C,WAAW,EAAE,gBAAgB;IAC7B,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,gDAAgD;IAC7D,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACvB,IAAI,CAAC;YACH,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC3B,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,qCAAqC;gBAC1C,OAA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AiB;QACjB,oCAAmB;QACnB,wCAAqB;QACrB,4BAAe;QACf,8BAAgB;QAChB,mDAA0B;QAC1B,kDAA0B;QAC1B,4BAAe;QACf,8BAAgB;QAChB,uCAAoB;QACpB,gDAAyB;QACzB,2DAA8B;KAC/B;CACF,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare const stripeCancelSubscription: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- subscription: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
3
- cancel_at_period_end: import("@activepieces/pieces-framework").CheckboxProperty<false>;
4
- }>;
5
- //# sourceMappingURL=cancel-subscription.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cancel-subscription.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/cancel-subscription.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,wBAAwB;;;EA6BnC,CAAC"}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stripeCancelSubscription = 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.stripeCancelSubscription = (0, pieces_framework_1.createAction)({
9
- name: 'cancel_subscription',
10
- auth: __1.stripeAuth,
11
- displayName: 'Cancel Subscription',
12
- description: 'Cancel an existing subscription, either immediately or at the end of the current billing period.',
13
- props: {
14
- subscription: common_1.stripeCommon.subscription,
15
- cancel_at_period_end: pieces_framework_1.Property.Checkbox({
16
- displayName: 'Cancel at Period End',
17
- description: 'If true, the subscription remains active until the end of the current billing period. If false, it cancels immediately.',
18
- required: false,
19
- defaultValue: false,
20
- }),
21
- },
22
- run(context) {
23
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
24
- const { subscription, cancel_at_period_end } = context.propsValue;
25
- const client = (0, common_1.getClient)(context.auth.secret_text);
26
- if (cancel_at_period_end) {
27
- return yield client.subscriptions.update(subscription, {
28
- cancel_at_period_end: true,
29
- });
30
- }
31
- else {
32
- return yield client.subscriptions.cancel(subscription);
33
- }
34
- });
35
- },
36
- });
37
- //# sourceMappingURL=cancel-subscription.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cancel-subscription.js","sourceRoot":"","sources":["../../../../src/lib/actions/cancel-subscription.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,6BAAmC;AACnC,sCAAoD;AAEvC,QAAA,wBAAwB,GAAG,IAAA,+BAAY,EAAC;IACnD,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,qBAAqB;IAClC,WAAW,EACT,kGAAkG;IACpG,KAAK,EAAE;QACL,YAAY,EAAE,qBAAY,CAAC,YAAY;QACvC,oBAAoB,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtC,WAAW,EAAE,sBAAsB;YACnC,WAAW,EACT,yHAAyH;YAC3H,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,KAAK;SACpB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,YAAY,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAElE,MAAM,MAAM,GAAG,IAAA,kBAAS,EAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAEnD,IAAI,oBAAoB,EAAE,CAAC;gBACzB,OAAO,MAAM,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,YAAY,EAAE;oBACrD,oBAAoB,EAAE,IAAI;iBAC3B,CAAC,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,OAAO,MAAM,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;YACzD,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,12 +0,0 @@
1
- export declare const stripeCreateCustomer: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- description: import("@activepieces/pieces-framework").LongTextProperty<false>;
5
- phone: import("@activepieces/pieces-framework").ShortTextProperty<false>;
6
- line1: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
- postal_code: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
- city: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
- state: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
- country: import("@activepieces/pieces-framework").ShortTextProperty<false>;
11
- }>;
12
- //# sourceMappingURL=create-customer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-customer.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-customer.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB;;;;;;;;;;EA2E/B,CAAC"}
@@ -1,86 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stripeCreateCustomer = 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.stripeCreateCustomer = (0, pieces_framework_1.createAction)({
9
- name: 'create_customer',
10
- auth: __1.stripeAuth,
11
- displayName: 'Create Customer',
12
- description: 'Create a customer in stripe',
13
- props: {
14
- email: pieces_framework_1.Property.ShortText({
15
- displayName: 'Email',
16
- description: undefined,
17
- required: true,
18
- }),
19
- name: pieces_framework_1.Property.ShortText({
20
- displayName: 'Name',
21
- required: true,
22
- }),
23
- description: pieces_framework_1.Property.LongText({
24
- displayName: 'Description',
25
- required: false,
26
- }),
27
- phone: pieces_framework_1.Property.ShortText({
28
- displayName: 'Phone',
29
- required: false,
30
- }),
31
- line1: pieces_framework_1.Property.ShortText({
32
- displayName: 'Address Line 1',
33
- required: false,
34
- }),
35
- postal_code: pieces_framework_1.Property.ShortText({
36
- displayName: 'Postal Code',
37
- required: false,
38
- }),
39
- city: pieces_framework_1.Property.ShortText({
40
- displayName: 'City',
41
- required: false,
42
- }),
43
- state: pieces_framework_1.Property.ShortText({
44
- displayName: 'State',
45
- required: false,
46
- }),
47
- country: pieces_framework_1.Property.ShortText({
48
- displayName: 'Country',
49
- required: false,
50
- }),
51
- },
52
- run(context) {
53
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
54
- const customer = {
55
- email: context.propsValue.email,
56
- name: context.propsValue.name,
57
- description: context.propsValue.description,
58
- phone: context.propsValue.phone,
59
- address: {
60
- line1: context.propsValue.line1,
61
- postal_code: context.propsValue.postal_code,
62
- city: context.propsValue.city,
63
- state: context.propsValue.state,
64
- country: context.propsValue.country,
65
- },
66
- };
67
- const response = yield pieces_common_1.httpClient.sendRequest({
68
- method: pieces_common_1.HttpMethod.POST,
69
- url: 'https://api.stripe.com/v1/customers',
70
- headers: {
71
- Authorization: 'Bearer ' + context.auth.secret_text,
72
- 'Content-Type': 'application/x-www-form-urlencoded',
73
- },
74
- body: {
75
- email: customer.email,
76
- name: customer.name,
77
- description: customer.description,
78
- phone: customer.phone,
79
- address: customer.address,
80
- },
81
- });
82
- return response.body;
83
- });
84
- },
85
- });
86
- //# sourceMappingURL=create-customer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-customer.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-customer.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,6BAAmC;AAEtB,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,6BAA6B;IAC1C,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,SAAS;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AAC,UAAU,CAAC,WAAW;oBAC3C,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;oBAC7B,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;oBAC/B,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO;iBACpC;aACF,CAAC;YACF,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,qCAAqC;gBAC1C,OAAO,EAAE;oBACP,aAAa,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW;oBACnD,cAAc,EAAE,mCAAmC;iBACpD;gBACD,IAAI,EAAE;oBACJ,KAAK,EAAE,QAAQ,CAAC,KAAK;oBACrB,IAAI,EAAE,QAAQ,CAAC,IAAI;oBACnB,WAAW,EAAE,QAAQ,CAAC,WAAW;oBACjC,KAAK,EAAE,QAAQ,CAAC,KAAK;oBACrB,OAAO,EAAE,QAAQ,CAAC,OAAO;iBAC1B;aACF,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,6 +0,0 @@
1
- export declare const stripeCreateInvoice: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- customer_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- currency: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- description: import("@activepieces/pieces-framework").LongTextProperty<false>;
5
- }>;
6
- //# sourceMappingURL=create-invoice.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-invoice.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-invoice.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB;;;;EA4C9B,CAAC"}
@@ -1,54 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stripeCreateInvoice = 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.stripeCreateInvoice = (0, pieces_framework_1.createAction)({
9
- name: 'create_invoice',
10
- auth: __1.stripeAuth,
11
- displayName: 'Create Invoice',
12
- description: 'Create an Invoice in stripe',
13
- props: {
14
- customer_id: pieces_framework_1.Property.ShortText({
15
- displayName: 'Customer ID',
16
- description: 'Stripe Customer ID',
17
- required: true,
18
- }),
19
- currency: pieces_framework_1.Property.ShortText({
20
- displayName: 'Currency',
21
- description: 'Currency for the invoice (e.g., USD)',
22
- required: true,
23
- }),
24
- description: pieces_framework_1.Property.LongText({
25
- displayName: 'Description',
26
- description: 'Description for the invoice',
27
- required: false,
28
- }),
29
- },
30
- run(context) {
31
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
32
- const invoice = {
33
- customer: context.propsValue.customer_id,
34
- currency: context.propsValue.currency,
35
- description: context.propsValue.description,
36
- };
37
- const response = yield pieces_common_1.httpClient.sendRequest({
38
- method: pieces_common_1.HttpMethod.POST,
39
- url: 'https://api.stripe.com/v1/invoices',
40
- headers: {
41
- Authorization: 'Bearer ' + context.auth.secret_text,
42
- 'Content-Type': 'application/x-www-form-urlencoded',
43
- },
44
- body: {
45
- customer: invoice.customer,
46
- currency: invoice.currency,
47
- description: invoice.description,
48
- },
49
- });
50
- return response.body;
51
- });
52
- },
53
- });
54
- //# sourceMappingURL=create-invoice.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-invoice.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-invoice.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,6BAAmC;AAEtB,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC9C,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,6BAA6B;IAC1C,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,oBAAoB;YACjC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,sCAAsC;YACnD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,OAAO,GAAG;gBACd,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,WAAW;gBACxC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ;gBACrC,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,WAAW;aAC5C,CAAC;YAEF,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,oCAAoC;gBACzC,OAAO,EAAE;oBACP,aAAa,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW;oBACnD,cAAc,EAAE,mCAAmC;iBACpD;gBACD,IAAI,EAAE;oBACJ,QAAQ,EAAE,OAAO,CAAC,QAAQ;oBAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ;oBAC1B,WAAW,EAAE,OAAO,CAAC,WAAW;iBACjC;aACF,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,11 +0,0 @@
1
- export declare const stripeCreatePaymentIntent: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- amount: import("@activepieces/pieces-framework").NumberProperty<true>;
3
- currency: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
4
- customer: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
5
- payment_method: import("@activepieces/pieces-framework").ShortTextProperty<false>;
6
- confirm: import("@activepieces/pieces-framework").CheckboxProperty<false>;
7
- return_url: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
- description: import("@activepieces/pieces-framework").LongTextProperty<false>;
9
- receipt_email: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
- }>;
11
- //# sourceMappingURL=create-payment-intent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-payment-intent.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-payment-intent.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,yBAAyB;;;;;;;;;EAkHpC,CAAC"}
@@ -1,108 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stripeCreatePaymentIntent = 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.stripeCreatePaymentIntent = (0, pieces_framework_1.createAction)({
10
- name: 'create_payment_intent',
11
- auth: __1.stripeAuth,
12
- displayName: 'Create Payment (Payment Intent)',
13
- description: 'Creates a new payment intent to start a payment flow.',
14
- props: {
15
- amount: pieces_framework_1.Property.Number({
16
- displayName: 'Amount',
17
- description: 'The amount to charge, in a decimal format (e.g., 10.50 for $10.50).',
18
- required: true,
19
- }),
20
- currency: pieces_framework_1.Property.StaticDropdown({
21
- displayName: 'Currency',
22
- description: 'The three-letter ISO code for the currency.',
23
- required: true,
24
- options: {
25
- options: [
26
- { label: 'US Dollar', value: 'usd' },
27
- { label: 'Euro', value: 'eur' },
28
- { label: 'Pound Sterling', value: 'gbp' },
29
- { label: 'Australian Dollar', value: 'aud' },
30
- { label: 'Canadian Dollar', value: 'cad' },
31
- { label: 'Swiss Franc', value: 'chf' },
32
- { label: 'Chinese Yuan', value: 'cny' },
33
- { label: 'Japanese Yen', value: 'jpy' },
34
- { label: 'Indian Rupee', value: 'inr' },
35
- { label: 'Singapore Dollar', value: 'sgd' },
36
- ],
37
- },
38
- }),
39
- customer: common_1.stripeCommon.customer,
40
- payment_method: pieces_framework_1.Property.ShortText({
41
- displayName: 'Payment Method ID',
42
- description: 'The ID of the Payment Method to attach (e.g., `pm_...`). Required if you want to confirm the payment immediately.',
43
- required: false,
44
- }),
45
- confirm: pieces_framework_1.Property.Checkbox({
46
- displayName: 'Confirm Payment Immediately',
47
- description: 'If true, Stripe will attempt to charge the provided payment method. A `Payment Method ID` is required.',
48
- required: false,
49
- defaultValue: false,
50
- }),
51
- return_url: pieces_framework_1.Property.ShortText({
52
- displayName: 'Return URL',
53
- description: 'The URL to redirect your customer back to after they authenticate their payment. Required when confirming the payment.',
54
- required: false,
55
- }),
56
- description: pieces_framework_1.Property.LongText({
57
- displayName: 'Description',
58
- required: false,
59
- }),
60
- receipt_email: pieces_framework_1.Property.ShortText({
61
- displayName: 'Receipt Email',
62
- description: "The email address to send a receipt to. This will override the customer's email address.",
63
- required: false,
64
- }),
65
- },
66
- run(context) {
67
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
68
- const { amount, currency, customer, payment_method, confirm, return_url, description, receipt_email, } = context.propsValue;
69
- if (confirm && !payment_method) {
70
- throw new Error("A Payment Method ID is required when 'Confirm Payment' is set to true.");
71
- }
72
- if (confirm && !return_url) {
73
- throw new Error("A Return URL is required when 'Confirm Payment' is set to true.");
74
- }
75
- const amountInCents = Math.round(amount * 100);
76
- const body = {
77
- amount: amountInCents,
78
- currency: currency,
79
- };
80
- if (customer)
81
- body.customer = customer;
82
- if (payment_method)
83
- body.payment_method = payment_method;
84
- if (confirm)
85
- body.confirm = confirm;
86
- if (return_url)
87
- body.return_url = return_url;
88
- if (description)
89
- body.description = description;
90
- if (receipt_email)
91
- body.receipt_email = receipt_email;
92
- const response = yield pieces_common_1.httpClient.sendRequest({
93
- method: pieces_common_1.HttpMethod.POST,
94
- url: `${common_1.stripeCommon.baseUrl}/payment_intents`,
95
- authentication: {
96
- type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
97
- token: context.auth.secret_text,
98
- },
99
- headers: {
100
- 'Content-Type': 'application/x-www-form-urlencoded',
101
- },
102
- body: body,
103
- });
104
- return response.body;
105
- });
106
- },
107
- });
108
- //# sourceMappingURL=create-payment-intent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-payment-intent.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-payment-intent.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,6BAAmC;AACnC,sCAAyC;AAE5B,QAAA,yBAAyB,GAAG,IAAA,+BAAY,EAAC;IACpD,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,iCAAiC;IAC9C,WAAW,EAAE,uDAAuD;IACpE,KAAK,EAAE;QACL,MAAM,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACtB,WAAW,EAAE,QAAQ;YACrB,WAAW,EACT,qEAAqE;YACvE,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,mBAAmB,EAAE,KAAK,EAAE,KAAK,EAAE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C"}
@@ -1,9 +0,0 @@
1
- export declare const stripeCreatePaymentLink: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- line_items: import("@activepieces/pieces-framework").ArrayProperty<true>;
3
- after_completion_type: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
4
- after_completion_redirect_url: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
- allow_promotion_codes: import("@activepieces/pieces-framework").CheckboxProperty<false>;
6
- billing_address_collection: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
7
- metadata: import("@activepieces/pieces-framework").JsonProperty<false>;
8
- }>;
9
- //# sourceMappingURL=create-payment-link.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-payment-link.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-payment-link.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,uBAAuB;;;;;;;EAgGlC,CAAC"}
@@ -1,92 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stripeCreatePaymentLink = 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.stripeCreatePaymentLink = (0, pieces_framework_1.createAction)({
9
- name: 'create_payment_link',
10
- auth: __1.stripeAuth,
11
- displayName: 'Create Payment Link',
12
- description: 'Creates a shareable, Stripe-hosted payment link for one-time purchases or subscriptions.',
13
- props: {
14
- line_items: pieces_framework_1.Property.Array({
15
- displayName: 'Line Items',
16
- description: 'The products and quantities to include in the payment link.',
17
- required: true,
18
- properties: {
19
- price: pieces_framework_1.Property.ShortText({
20
- displayName: 'Price ID',
21
- description: 'The ID of the price object (e.g., price_1J2X3Y4Z...). Find this in your Stripe Dashboard under Products.',
22
- required: true,
23
- }),
24
- quantity: pieces_framework_1.Property.Number({
25
- displayName: 'Quantity',
26
- required: true,
27
- }),
28
- },
29
- }),
30
- after_completion_type: pieces_framework_1.Property.StaticDropdown({
31
- displayName: 'After Completion Behavior',
32
- description: "Controls the behavior after the purchase is complete. Defaults to showing Stripe's hosted confirmation page.",
33
- required: false,
34
- options: {
35
- options: [
36
- { label: 'Show Confirmation Page', value: 'hosted_confirmation' },
37
- { label: 'Redirect to URL', value: 'redirect' },
38
- ],
39
- },
40
- }),
41
- after_completion_redirect_url: pieces_framework_1.Property.ShortText({
42
- displayName: 'Redirect URL',
43
- description: 'The URL to redirect the customer to after a successful purchase. Only used if the behavior is set to "Redirect to URL".',
44
- required: false,
45
- }),
46
- allow_promotion_codes: pieces_framework_1.Property.Checkbox({
47
- displayName: 'Allow Promotion Codes',
48
- description: 'Enables the user to enter a promotion code on the Payment Link page.',
49
- required: false,
50
- }),
51
- billing_address_collection: pieces_framework_1.Property.StaticDropdown({
52
- displayName: 'Billing Address Collection',
53
- description: 'Describes whether Checkout should collect the customer’s billing address.',
54
- required: false,
55
- options: {
56
- options: [
57
- { label: 'Auto', value: 'auto' },
58
- { label: 'Required', value: 'required' },
59
- ],
60
- },
61
- }),
62
- metadata: pieces_framework_1.Property.Json({
63
- displayName: 'Metadata',
64
- required: false,
65
- }),
66
- },
67
- run(context) {
68
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
69
- const client = (0, common_1.getClient)(context.auth.secret_text);
70
- const props = context.propsValue;
71
- const params = {
72
- line_items: props.line_items,
73
- allow_promotion_codes: props.allow_promotion_codes,
74
- billing_address_collection: props.billing_address_collection,
75
- metadata: props.metadata,
76
- };
77
- if (props.after_completion_type) {
78
- params.after_completion = {
79
- type: props.after_completion_type,
80
- };
81
- if (props.after_completion_type === 'redirect' &&
82
- props.after_completion_redirect_url) {
83
- params.after_completion.redirect = {
84
- url: props.after_completion_redirect_url,
85
- };
86
- }
87
- }
88
- return yield client.paymentLinks.create(params);
89
- });
90
- },
91
- });
92
- //# sourceMappingURL=create-payment-link.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-payment-link.js","sour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"}
@@ -1,8 +0,0 @@
1
- export declare const stripeCreatePrice: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- product: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
3
- unit_amount: import("@activepieces/pieces-framework").NumberProperty<true>;
4
- currency: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
5
- recurring_interval: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
6
- recurring_interval_count: import("@activepieces/pieces-framework").NumberProperty<false>;
7
- }>;
8
- //# sourceMappingURL=create-price.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-price.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-price.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,iBAAiB;;;;;;EA+F5B,CAAC"}
@@ -1,92 +0,0 @@
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.secret_text,
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-price.js","sourceRoot":"","sources":["../../../../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,EAAE;oBAC1C,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE;oBACtC,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,EAAE;oBACvC,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,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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,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,9 +0,0 @@
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
- }>;
9
- //# sourceMappingURL=create-product.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-product.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-product.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,mBAAmB;;;;;;;EA+E9B,CAAC"}