@activepieces/piece-chargebee 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/package.json +17 -0
  2. package/src/index.d.ts +5 -0
  3. package/src/index.d.ts.map +1 -0
  4. package/src/index.js +57 -0
  5. package/src/index.js.map +1 -0
  6. package/src/lib/actions/cancel-subscription.d.ts +21 -0
  7. package/src/lib/actions/cancel-subscription.d.ts.map +1 -0
  8. package/src/lib/actions/cancel-subscription.js +168 -0
  9. package/src/lib/actions/cancel-subscription.js.map +1 -0
  10. package/src/lib/actions/create-customer.d.ts +29 -0
  11. package/src/lib/actions/create-customer.d.ts.map +1 -0
  12. package/src/lib/actions/create-customer.js +169 -0
  13. package/src/lib/actions/create-customer.js.map +1 -0
  14. package/src/lib/actions/create-subscription.d.ts +20 -0
  15. package/src/lib/actions/create-subscription.d.ts.map +1 -0
  16. package/src/lib/actions/create-subscription.js +119 -0
  17. package/src/lib/actions/create-subscription.js.map +1 -0
  18. package/src/lib/actions/get-customer.d.ts +7 -0
  19. package/src/lib/actions/get-customer.d.ts.map +1 -0
  20. package/src/lib/actions/get-customer.js +32 -0
  21. package/src/lib/actions/get-customer.js.map +1 -0
  22. package/src/lib/auth.d.ts +5 -0
  23. package/src/lib/auth.d.ts.map +1 -0
  24. package/src/lib/auth.js +46 -0
  25. package/src/lib/auth.js.map +1 -0
  26. package/src/lib/common/client.d.ts +15 -0
  27. package/src/lib/common/client.d.ts.map +1 -0
  28. package/src/lib/common/client.js +64 -0
  29. package/src/lib/common/client.js.map +1 -0
  30. package/src/lib/common/webhook.d.ts +4 -0
  31. package/src/lib/common/webhook.d.ts.map +1 -0
  32. package/src/lib/common/webhook.js +48 -0
  33. package/src/lib/common/webhook.js.map +1 -0
  34. package/src/lib/triggers/customer-created.d.ts +15 -0
  35. package/src/lib/triggers/customer-created.d.ts.map +1 -0
  36. package/src/lib/triggers/customer-created.js +68 -0
  37. package/src/lib/triggers/customer-created.js.map +1 -0
  38. package/src/lib/triggers/invoice-generated.d.ts +15 -0
  39. package/src/lib/triggers/invoice-generated.d.ts.map +1 -0
  40. package/src/lib/triggers/invoice-generated.js +61 -0
  41. package/src/lib/triggers/invoice-generated.js.map +1 -0
  42. package/src/lib/triggers/payment-failed.d.ts +15 -0
  43. package/src/lib/triggers/payment-failed.d.ts.map +1 -0
  44. package/src/lib/triggers/payment-failed.js +92 -0
  45. package/src/lib/triggers/payment-failed.js.map +1 -0
  46. package/src/lib/triggers/payment-succeeded.d.ts +15 -0
  47. package/src/lib/triggers/payment-succeeded.d.ts.map +1 -0
  48. package/src/lib/triggers/payment-succeeded.js +92 -0
  49. package/src/lib/triggers/payment-succeeded.js.map +1 -0
  50. package/src/lib/triggers/subscription-cancelled.d.ts +15 -0
  51. package/src/lib/triggers/subscription-cancelled.d.ts.map +1 -0
  52. package/src/lib/triggers/subscription-cancelled.js +84 -0
  53. package/src/lib/triggers/subscription-cancelled.js.map +1 -0
  54. package/src/lib/triggers/subscription-changed.d.ts +15 -0
  55. package/src/lib/triggers/subscription-changed.d.ts.map +1 -0
  56. package/src/lib/triggers/subscription-changed.js +84 -0
  57. package/src/lib/triggers/subscription-changed.js.map +1 -0
  58. package/src/lib/triggers/subscription-created.d.ts +15 -0
  59. package/src/lib/triggers/subscription-created.d.ts.map +1 -0
  60. package/src/lib/triggers/subscription-created.js +84 -0
  61. package/src/lib/triggers/subscription-created.js.map +1 -0
  62. package/src/lib/triggers/subscription-renewed.d.ts +15 -0
  63. package/src/lib/triggers/subscription-renewed.d.ts.map +1 -0
  64. package/src/lib/triggers/subscription-renewed.js +84 -0
  65. package/src/lib/triggers/subscription-renewed.js.map +1 -0
package/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@activepieces/piece-chargebee",
3
+ "version": "0.0.1",
4
+ "type": "commonjs",
5
+ "main": "./src/index.js",
6
+ "types": "./src/index.d.ts",
7
+ "dependencies": {
8
+ "tslib": "2.6.2",
9
+ "@activepieces/pieces-common": "0.12.1",
10
+ "@activepieces/pieces-framework": "0.26.2",
11
+ "@activepieces/shared": "0.58.0"
12
+ },
13
+ "scripts": {
14
+ "build": "tsc -p tsconfig.lib.json && cp package.json dist/",
15
+ "lint": "eslint 'src/**/*.ts'"
16
+ }
17
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ export declare const chargebee: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ site: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ }>>;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,SAAS;;;GAgCpB,CAAC"}
package/src/index.js ADDED
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.chargebee = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_common_1 = require("@activepieces/pieces-common");
6
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
7
+ const shared_1 = require("@activepieces/shared");
8
+ const cancel_subscription_1 = require("./lib/actions/cancel-subscription");
9
+ const create_customer_1 = require("./lib/actions/create-customer");
10
+ const create_subscription_1 = require("./lib/actions/create-subscription");
11
+ const get_customer_1 = require("./lib/actions/get-customer");
12
+ const auth_1 = require("./lib/auth");
13
+ const client_1 = require("./lib/common/client");
14
+ const customer_created_1 = require("./lib/triggers/customer-created");
15
+ const invoice_generated_1 = require("./lib/triggers/invoice-generated");
16
+ const payment_failed_1 = require("./lib/triggers/payment-failed");
17
+ const payment_succeeded_1 = require("./lib/triggers/payment-succeeded");
18
+ const subscription_cancelled_1 = require("./lib/triggers/subscription-cancelled");
19
+ const subscription_changed_1 = require("./lib/triggers/subscription-changed");
20
+ const subscription_created_1 = require("./lib/triggers/subscription-created");
21
+ const subscription_renewed_1 = require("./lib/triggers/subscription-renewed");
22
+ exports.chargebee = (0, pieces_framework_1.createPiece)({
23
+ displayName: 'Chargebee',
24
+ description: 'Subscription billing and revenue operations platform for managing customers and subscriptions.',
25
+ minimumSupportedRelease: '0.30.0',
26
+ logoUrl: 'https://cdn.activepieces.com/pieces/chargebee.png',
27
+ authors: ['Harmatta', 'sanket-a11y'],
28
+ categories: [shared_1.PieceCategory.ACCOUNTING, shared_1.PieceCategory.PAYMENT_PROCESSING],
29
+ auth: auth_1.chargebeeAuth,
30
+ actions: [
31
+ create_subscription_1.createSubscription,
32
+ cancel_subscription_1.cancelSubscription,
33
+ create_customer_1.createCustomer,
34
+ get_customer_1.getCustomer,
35
+ (0, pieces_common_1.createCustomApiCallAction)({
36
+ auth: auth_1.chargebeeAuth,
37
+ baseUrl: (auth) => { var _a; return (0, client_1.getChargebeeBaseUrl)((_a = auth === null || auth === void 0 ? void 0 : auth.props.site) !== null && _a !== void 0 ? _a : ''); },
38
+ authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
39
+ var _a, _b;
40
+ return ({
41
+ Authorization: (0, client_1.getChargebeeAuthHeader)((_b = (_a = auth === null || auth === void 0 ? void 0 : auth.props) === null || _a === void 0 ? void 0 : _a.api_key) !== null && _b !== void 0 ? _b : ''),
42
+ });
43
+ }),
44
+ }),
45
+ ],
46
+ triggers: [
47
+ subscription_created_1.subscriptionCreated,
48
+ subscription_cancelled_1.subscriptionCancelled,
49
+ subscription_renewed_1.subscriptionRenewed,
50
+ subscription_changed_1.subscriptionChanged,
51
+ payment_succeeded_1.paymentSucceeded,
52
+ payment_failed_1.paymentFailed,
53
+ invoice_generated_1.invoiceGenerated,
54
+ customer_created_1.customerCreated,
55
+ ],
56
+ });
57
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AA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
@@ -0,0 +1,21 @@
1
+ export declare const cancelSubscription: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ site: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ }>, {
5
+ subscription_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
+ cancel_option: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
7
+ cancel_at: import("@activepieces/pieces-framework").NumberProperty<false>;
8
+ cancel_reason_code: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
+ credit_option_for_current_term_charges: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
10
+ unbilled_charges_option: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
11
+ contract_term_cancel_option: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
12
+ account_receivables_handling: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
13
+ refundable_credits_handling: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
14
+ invoice_date: import("@activepieces/pieces-framework").NumberProperty<false>;
15
+ decommissioned: import("@activepieces/pieces-framework").CheckboxProperty<false>;
16
+ termination_fee_item_price_id: import("@activepieces/pieces-framework").ShortTextProperty<false>;
17
+ termination_fee_quantity: import("@activepieces/pieces-framework").NumberProperty<false>;
18
+ termination_fee_unit_price: import("@activepieces/pieces-framework").NumberProperty<false>;
19
+ termination_fee_service_period_days: import("@activepieces/pieces-framework").NumberProperty<false>;
20
+ }>;
21
+ //# sourceMappingURL=cancel-subscription.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel-subscription.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/cancel-subscription.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;EA8L7B,CAAC"}
@@ -0,0 +1,168 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cancelSubscription = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_common_1 = require("@activepieces/pieces-common");
6
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
7
+ const auth_1 = require("../auth");
8
+ const client_1 = require("../common/client");
9
+ exports.cancelSubscription = (0, pieces_framework_1.createAction)({
10
+ name: 'cancel_subscription',
11
+ auth: auth_1.chargebeeAuth,
12
+ displayName: 'Cancel Subscription',
13
+ description: 'Cancel a Chargebee subscription immediately, at end of term, or on a specific date.',
14
+ props: {
15
+ subscription_id: pieces_framework_1.Property.ShortText({
16
+ displayName: 'Subscription ID',
17
+ required: true,
18
+ }),
19
+ cancel_option: pieces_framework_1.Property.StaticDropdown({
20
+ displayName: 'Cancel Option',
21
+ description: 'When to cancel the subscription. Not applicable when the subscription has a contract term — use Contract Term Cancel Option instead.',
22
+ required: false,
23
+ options: {
24
+ options: [
25
+ { label: 'Immediately', value: 'immediately' },
26
+ { label: 'End of Term', value: 'end_of_term' },
27
+ { label: 'Specific Date', value: 'specific_date' },
28
+ { label: 'End of Billing Term', value: 'end_of_billing_term' },
29
+ ],
30
+ },
31
+ }),
32
+ cancel_at: pieces_framework_1.Property.Number({
33
+ displayName: 'Cancel At (Unix Seconds)',
34
+ description: 'UTC timestamp in seconds for when to cancel. Required when Cancel Option is "Specific Date".',
35
+ required: false,
36
+ }),
37
+ cancel_reason_code: pieces_framework_1.Property.ShortText({
38
+ displayName: 'Cancel Reason Code',
39
+ description: 'Reason code from Settings > Configure Chargebee > Reason Codes > Subscriptions > Subscription Cancellation. Case-sensitive.',
40
+ required: false,
41
+ }),
42
+ credit_option_for_current_term_charges: pieces_framework_1.Property.StaticDropdown({
43
+ displayName: 'Credit Option for Current Term Charges',
44
+ description: 'How to handle credits for current term charges when canceling immediately.',
45
+ required: false,
46
+ options: {
47
+ options: [
48
+ { label: 'None', value: 'none' },
49
+ { label: 'Prorate', value: 'prorate' },
50
+ { label: 'Full', value: 'full' },
51
+ ],
52
+ },
53
+ }),
54
+ unbilled_charges_option: pieces_framework_1.Property.StaticDropdown({
55
+ displayName: 'Unbilled Charges Option',
56
+ description: 'How to handle unbilled charges when canceling immediately.',
57
+ required: false,
58
+ options: {
59
+ options: [
60
+ { label: 'Invoice', value: 'invoice' },
61
+ { label: 'Delete', value: 'delete' },
62
+ ],
63
+ },
64
+ }),
65
+ contract_term_cancel_option: pieces_framework_1.Property.StaticDropdown({
66
+ displayName: 'Contract Term Cancel Option',
67
+ description: 'Required when the subscription has a contract term. Determines when to cancel the subscription and contract term.',
68
+ required: false,
69
+ options: {
70
+ options: [
71
+ { label: 'Terminate Immediately', value: 'terminate_immediately' },
72
+ { label: 'End of Contract Term', value: 'end_of_contract_term' },
73
+ { label: 'Specific Date', value: 'specific_date' },
74
+ {
75
+ label: 'End of Subscription Billing Term',
76
+ value: 'end_of_subscription_billing_term',
77
+ },
78
+ ],
79
+ },
80
+ }),
81
+ account_receivables_handling: pieces_framework_1.Property.StaticDropdown({
82
+ displayName: 'Account Receivables Handling',
83
+ description: 'How to handle past due invoices when canceling immediately.',
84
+ required: false,
85
+ options: {
86
+ options: [
87
+ { label: 'No Action', value: 'no_action' },
88
+ {
89
+ label: 'Schedule Payment Collection',
90
+ value: 'schedule_payment_collection',
91
+ },
92
+ { label: 'Write Off', value: 'write_off' },
93
+ ],
94
+ },
95
+ }),
96
+ refundable_credits_handling: pieces_framework_1.Property.StaticDropdown({
97
+ displayName: 'Refundable Credits Handling',
98
+ description: 'How to handle refundable credits when canceling immediately.',
99
+ required: false,
100
+ options: {
101
+ options: [
102
+ { label: 'No Action', value: 'no_action' },
103
+ { label: 'Schedule Refund', value: 'schedule_refund' },
104
+ ],
105
+ },
106
+ }),
107
+ invoice_date: pieces_framework_1.Property.Number({
108
+ displayName: 'Invoice Date (Unix Seconds)',
109
+ description: 'Document date displayed on the invoice PDF. Defaults to the current date. Provide to backdate the invoice.',
110
+ required: false,
111
+ }),
112
+ decommissioned: pieces_framework_1.Property.Checkbox({
113
+ displayName: 'Decommission',
114
+ description: 'When true, all subscription operations will be disabled except deletion. This is irreversible.',
115
+ required: false,
116
+ }),
117
+ termination_fee_item_price_id: pieces_framework_1.Property.ShortText({
118
+ displayName: 'Termination Fee Item Price ID',
119
+ description: 'The unique ID of the charge item price representing the termination fee. Used only when the subscription has a contract term.',
120
+ required: false,
121
+ }),
122
+ termination_fee_quantity: pieces_framework_1.Property.Number({
123
+ displayName: 'Termination Fee Quantity',
124
+ description: 'Quantity for the termination fee. Applicable only for quantity-based item prices.',
125
+ required: false,
126
+ }),
127
+ termination_fee_unit_price: pieces_framework_1.Property.Number({
128
+ displayName: 'Termination Fee Unit Price (cents)',
129
+ description: 'The termination fee in cents. For quantity-based items, this is the fee per unit.',
130
+ required: false,
131
+ }),
132
+ termination_fee_service_period_days: pieces_framework_1.Property.Number({
133
+ displayName: 'Termination Fee Service Period (Days)',
134
+ description: 'Service period of the termination fee in days, starting from the current date.',
135
+ required: false,
136
+ }),
137
+ },
138
+ run(context) {
139
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
140
+ const { subscription_id, cancel_option, cancel_at, cancel_reason_code, credit_option_for_current_term_charges, unbilled_charges_option, contract_term_cancel_option, account_receivables_handling, refundable_credits_handling, invoice_date, decommissioned, termination_fee_item_price_id, termination_fee_quantity, termination_fee_unit_price, termination_fee_service_period_days, } = context.propsValue;
141
+ const body = (0, client_1.cleanObject)({
142
+ cancel_option,
143
+ cancel_at,
144
+ cancel_reason_code,
145
+ credit_option_for_current_term_charges,
146
+ unbilled_charges_option,
147
+ contract_term_cancel_option,
148
+ account_receivables_handling,
149
+ refundable_credits_handling,
150
+ invoice_date,
151
+ decommissioned,
152
+ 'subscription_items[item_price_id][0]': termination_fee_item_price_id,
153
+ 'subscription_items[quantity][0]': termination_fee_quantity,
154
+ 'subscription_items[unit_price][0]': termination_fee_unit_price,
155
+ 'subscription_items[service_period_days][0]': termination_fee_service_period_days,
156
+ });
157
+ return yield (0, client_1.chargebeeRequest)({
158
+ site: context.auth.props.site,
159
+ apiKey: context.auth.props.api_key,
160
+ method: pieces_common_1.HttpMethod.POST,
161
+ path: `/subscriptions/${encodeURIComponent(subscription_id)}/cancel_for_items`,
162
+ contentType: 'application/x-www-form-urlencoded',
163
+ body,
164
+ });
165
+ });
166
+ },
167
+ });
168
+ //# sourceMappingURL=cancel-subscription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel-subscription.js","sourceRoot":"","sources":["../../../../src/lib/actions/cancel-subscription.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAAwE;AAExE,kCAAwC;AACxC,6CAAiE;AAEpD,QAAA,kBAAkB,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,oBAAa;IACnB,WAAW,EAAE,qBAAqB;IAClC,WAAW,EACT,qFAAqF;IACvF,KAAK,EAAE;QACL,eAAe,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAClC,WAAW,EAAE,iBAAiB;YAC9B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,aAAa,EAAE,2BAAQ,CAAC,cAAc,CAAC;YACrC,WAAW,EAAE,eAAe;YAC5B,WAAW,EACT,sIAAsI;YACxI,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE;oBAC9C,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE;oBAC9C,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE;oBAClD,EAAE,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,qBAAqB,EAAE;iBAC/D;aACF;SACF,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACzB,WAAW,EAAE,0BAA0B;YACvC,WAAW,EACT,8FAA8F;YAChG,QAAQ,EAAE,KAAK;SAChB,CAAC;QAC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;CACF,CAAC,CAAC"}
@@ -0,0 +1,29 @@
1
+ export declare const createCustomer: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ site: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ }>, {
5
+ id: import("@activepieces/pieces-framework").ShortTextProperty<false>;
6
+ first_name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ last_name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
+ email: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
+ company: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
+ phone: import("@activepieces/pieces-framework").ShortTextProperty<false>;
11
+ locale: import("@activepieces/pieces-framework").ShortTextProperty<false>;
12
+ preferred_currency_code: import("@activepieces/pieces-framework").ShortTextProperty<false>;
13
+ auto_collection: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
14
+ net_term_days: import("@activepieces/pieces-framework").NumberProperty<false>;
15
+ allow_direct_debit: import("@activepieces/pieces-framework").CheckboxProperty<false>;
16
+ vat_number: import("@activepieces/pieces-framework").ShortTextProperty<false>;
17
+ taxability: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
18
+ invoice_notes: import("@activepieces/pieces-framework").LongTextProperty<false>;
19
+ meta_data: import("@activepieces/pieces-framework").ObjectProperty<false>;
20
+ billing_address_first_name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
21
+ billing_address_last_name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
22
+ billing_address_line1: import("@activepieces/pieces-framework").ShortTextProperty<false>;
23
+ billing_address_line2: import("@activepieces/pieces-framework").ShortTextProperty<false>;
24
+ billing_address_city: import("@activepieces/pieces-framework").ShortTextProperty<false>;
25
+ billing_address_state: import("@activepieces/pieces-framework").ShortTextProperty<false>;
26
+ billing_address_zip: import("@activepieces/pieces-framework").ShortTextProperty<false>;
27
+ billing_address_country: import("@activepieces/pieces-framework").ShortTextProperty<false>;
28
+ }>;
29
+ //# sourceMappingURL=create-customer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-customer.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-customer.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsLzB,CAAC"}
@@ -0,0 +1,169 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createCustomer = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_common_1 = require("@activepieces/pieces-common");
6
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
7
+ const auth_1 = require("../auth");
8
+ const client_1 = require("../common/client");
9
+ exports.createCustomer = (0, pieces_framework_1.createAction)({
10
+ name: 'create_customer',
11
+ auth: auth_1.chargebeeAuth,
12
+ displayName: 'Create Customer',
13
+ description: 'Create a customer in Chargebee.',
14
+ props: {
15
+ id: pieces_framework_1.Property.ShortText({
16
+ displayName: 'Customer ID',
17
+ description: 'Optional custom customer identifier.',
18
+ required: false,
19
+ }),
20
+ first_name: pieces_framework_1.Property.ShortText({
21
+ displayName: 'First Name',
22
+ required: false,
23
+ }),
24
+ last_name: pieces_framework_1.Property.ShortText({
25
+ displayName: 'Last Name',
26
+ required: false,
27
+ }),
28
+ email: pieces_framework_1.Property.ShortText({
29
+ displayName: 'Email',
30
+ required: false,
31
+ }),
32
+ company: pieces_framework_1.Property.ShortText({
33
+ displayName: 'Company',
34
+ required: false,
35
+ }),
36
+ phone: pieces_framework_1.Property.ShortText({
37
+ displayName: 'Phone',
38
+ required: false,
39
+ }),
40
+ locale: pieces_framework_1.Property.ShortText({
41
+ displayName: 'Locale',
42
+ description: 'For example: en-US, fr-CA.',
43
+ required: false,
44
+ }),
45
+ preferred_currency_code: pieces_framework_1.Property.ShortText({
46
+ displayName: 'Preferred Currency Code',
47
+ description: 'ISO 4217 currency code (e.g. USD, EUR). Requires Multi-currency pricing to be enabled.',
48
+ required: false,
49
+ }),
50
+ auto_collection: pieces_framework_1.Property.StaticDropdown({
51
+ displayName: 'Auto Collection',
52
+ description: 'Whether invoices should be automatically charged when possible.',
53
+ required: false,
54
+ options: {
55
+ options: [
56
+ { label: 'On', value: 'on' },
57
+ { label: 'Off', value: 'off' },
58
+ ],
59
+ },
60
+ }),
61
+ net_term_days: pieces_framework_1.Property.Number({
62
+ displayName: 'Net Term Days',
63
+ description: 'Number of days within which the customer must pay their invoices.',
64
+ required: false,
65
+ }),
66
+ allow_direct_debit: pieces_framework_1.Property.Checkbox({
67
+ displayName: 'Allow Direct Debit',
68
+ description: 'Whether the customer can pay via Direct Debit.',
69
+ required: false,
70
+ }),
71
+ vat_number: pieces_framework_1.Property.ShortText({
72
+ displayName: 'VAT Number',
73
+ description: 'The VAT/tax registration number for the customer.',
74
+ required: false,
75
+ }),
76
+ taxability: pieces_framework_1.Property.StaticDropdown({
77
+ displayName: 'Taxability',
78
+ description: 'Specifies if the customer is liable for tax.',
79
+ required: false,
80
+ options: {
81
+ options: [
82
+ { label: 'Taxable', value: 'taxable' },
83
+ { label: 'Exempt', value: 'exempt' },
84
+ ],
85
+ },
86
+ }),
87
+ invoice_notes: pieces_framework_1.Property.LongText({
88
+ displayName: 'Invoice Notes',
89
+ description: 'A customer-facing note added to all invoices for this customer.',
90
+ required: false,
91
+ }),
92
+ meta_data: pieces_framework_1.Property.Object({
93
+ displayName: 'Metadata',
94
+ description: 'Key-value pairs to store extra information on the customer.',
95
+ required: false,
96
+ }),
97
+ billing_address_first_name: pieces_framework_1.Property.ShortText({
98
+ displayName: 'Billing Address: First Name',
99
+ required: false,
100
+ }),
101
+ billing_address_last_name: pieces_framework_1.Property.ShortText({
102
+ displayName: 'Billing Address: Last Name',
103
+ required: false,
104
+ }),
105
+ billing_address_line1: pieces_framework_1.Property.ShortText({
106
+ displayName: 'Billing Address: Line 1',
107
+ required: false,
108
+ }),
109
+ billing_address_line2: pieces_framework_1.Property.ShortText({
110
+ displayName: 'Billing Address: Line 2',
111
+ required: false,
112
+ }),
113
+ billing_address_city: pieces_framework_1.Property.ShortText({
114
+ displayName: 'Billing Address: City',
115
+ required: false,
116
+ }),
117
+ billing_address_state: pieces_framework_1.Property.ShortText({
118
+ displayName: 'Billing Address: State',
119
+ required: false,
120
+ }),
121
+ billing_address_zip: pieces_framework_1.Property.ShortText({
122
+ displayName: 'Billing Address: ZIP / Postal Code',
123
+ required: false,
124
+ }),
125
+ billing_address_country: pieces_framework_1.Property.ShortText({
126
+ displayName: 'Billing Address: Country',
127
+ description: 'Two-letter ISO 3166-1 alpha-2 country code (e.g. US, GB).',
128
+ required: false,
129
+ }),
130
+ },
131
+ run(context) {
132
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
133
+ const { id, first_name, last_name, email, company, phone, locale, preferred_currency_code, auto_collection, net_term_days, allow_direct_debit, vat_number, taxability, invoice_notes, meta_data, billing_address_first_name, billing_address_last_name, billing_address_line1, billing_address_line2, billing_address_city, billing_address_state, billing_address_zip, billing_address_country, } = context.propsValue;
134
+ return yield (0, client_1.chargebeeRequest)({
135
+ site: context.auth.props.site,
136
+ apiKey: context.auth.props.api_key,
137
+ method: pieces_common_1.HttpMethod.POST,
138
+ path: '/customers',
139
+ contentType: 'application/x-www-form-urlencoded',
140
+ body: (0, client_1.cleanObject)({
141
+ id,
142
+ first_name,
143
+ last_name,
144
+ email,
145
+ company,
146
+ phone,
147
+ locale,
148
+ preferred_currency_code,
149
+ auto_collection,
150
+ net_term_days,
151
+ allow_direct_debit,
152
+ vat_number,
153
+ taxability,
154
+ invoice_notes,
155
+ meta_data: meta_data ? JSON.stringify(meta_data) : undefined,
156
+ 'billing_address[first_name]': billing_address_first_name,
157
+ 'billing_address[last_name]': billing_address_last_name,
158
+ 'billing_address[line1]': billing_address_line1,
159
+ 'billing_address[line2]': billing_address_line2,
160
+ 'billing_address[city]': billing_address_city,
161
+ 'billing_address[state]': billing_address_state,
162
+ 'billing_address[zip]': billing_address_zip,
163
+ 'billing_address[country]': billing_address_country,
164
+ }),
165
+ });
166
+ });
167
+ },
168
+ });
169
+ //# sourceMappingURL=create-customer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-customer.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-customer.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAAwE;AAExE,kCAAwC;AACxC,6CAAiE;AAEpD,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,oBAAa;IACnB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,iCAAiC;IAC9C,KAAK,EAAE;QACL,EAAE,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACrB,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,sCAAsC;YACnD,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,SAAS;YACtB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,4BAA4B;YACzC,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,u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,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,aAAa,EACb,SAAS,EACT,0BAA0B,EAC1B,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,GACxB,GAAG,OAAO,CAAC,UAAU,CAAC;YAEvB,OAAO,MAAM,IAAA,yBAAgB,EAAC;gBAC5B,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI;gBAC7B,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO;gBAClC,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,IAAI,EAAE,YAAY;gBAClB,WAAW,EAAE,mCAAmC;gBAChD,IAAI,EAAE,IAAA,oBAAW,EAAC;oBAChB,EAAE;oBACF,UAAU;oBACV,SAAS;oBACT,KAAK;oBACL,OAAO;oBACP,KAAK;oBACL,MAAM;oBACN,uBAAuB;oBACvB,eAAe;oBACf,aAAa;oBACb,kBAAkB;oBAClB,UAAU;oBACV,UAAU;oBACV,aAAa;oBACb,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;oBAC5D,6BAA6B,EAAE,0BAA0B;oBACzD,4BAA4B,EAAE,yBAAyB;oBACvD,wBAAwB,EAAE,qBAAqB;oBAC/C,wBAAwB,EAAE,qBAAqB;oBAC/C,uBAAuB,EAAE,oBAAoB;oBAC7C,wBAAwB,EAAE,qBAAqB;oBAC/C,sBAAsB,EAAE,mBAAmB;oBAC3C,0BAA0B,EAAE,uBAAuB;iBACpD,CAAC;aACH,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ export declare const createSubscription: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ site: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ }>, {
5
+ customer_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
+ item_price_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
+ quantity: import("@activepieces/pieces-framework").NumberProperty<false>;
8
+ auto_collection: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
9
+ billing_cycles: import("@activepieces/pieces-framework").NumberProperty<false>;
10
+ trial_end: import("@activepieces/pieces-framework").NumberProperty<false>;
11
+ start_date: import("@activepieces/pieces-framework").NumberProperty<false>;
12
+ coupon_ids: import("@activepieces/pieces-framework").ShortTextProperty<false>;
13
+ po_number: import("@activepieces/pieces-framework").ShortTextProperty<false>;
14
+ invoice_notes: import("@activepieces/pieces-framework").LongTextProperty<false>;
15
+ payment_source_id: import("@activepieces/pieces-framework").ShortTextProperty<false>;
16
+ invoice_immediately: import("@activepieces/pieces-framework").CheckboxProperty<false>;
17
+ net_term_days: import("@activepieces/pieces-framework").NumberProperty<false>;
18
+ meta_data: import("@activepieces/pieces-framework").ObjectProperty<false>;
19
+ }>;
20
+ //# sourceMappingURL=create-subscription.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-subscription.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-subscription.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;EAsI7B,CAAC"}