@appsemble/utils 0.34.21 → 0.35.3-test.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/api/components/parameters/index.d.ts +1 -0
- package/api/components/parameters/index.js +1 -0
- package/api/components/parameters/organizationSubscriptionId.d.ts +9 -0
- package/api/components/parameters/organizationSubscriptionId.js +8 -0
- package/api/components/responses/organizationSubscription.d.ts +2 -0
- package/api/components/responses/organizationSubscription.js +11 -0
- package/api/components/responses/organizationSubscriptionPrice.d.ts +2 -0
- package/api/components/responses/organizationSubscriptionPrice.js +11 -0
- package/api/components/schemas/AppPaymentSettings.d.ts +2 -0
- package/api/components/schemas/AppPaymentSettings.js +24 -0
- package/api/components/schemas/Organization.js +36 -0
- package/api/components/schemas/OrganizationSubscription.d.ts +2 -0
- package/api/components/schemas/OrganizationSubscription.js +42 -0
- package/api/components/schemas/OrganizationSubscriptionsPrice.d.ts +2 -0
- package/api/components/schemas/OrganizationSubscriptionsPrice.js +25 -0
- package/api/components/schemas/index.d.ts +1 -0
- package/api/components/schemas/index.js +1 -0
- package/api/paths/apps/appId/clonable-assets.js +20 -0
- package/api/paths/apps/appId/clonable-resources.js +20 -0
- package/api/paths/{group-invites → apps/appId/group-invites}/token/respond.js +1 -0
- package/api/paths/{group-invites → apps/appId/group-invites}/token.js +1 -0
- package/api/paths/{group-members → apps/appId/group-members}/groupMemberId/role.js +4 -1
- package/api/paths/{group-members → apps/appId/group-members}/groupMemberId.js +4 -1
- package/api/paths/{groups → apps/appId/groups}/groupId/invites/resend.js +4 -1
- package/api/paths/{groups → apps/appId/groups}/groupId/invites.js +1 -0
- package/api/paths/{groups → apps/appId/groups}/groupId/members.js +1 -0
- package/api/paths/{groups → apps/appId/groups}/groupId.js +1 -0
- package/api/paths/{app-invites → apps/appId/invites}/token/respond.js +1 -0
- package/api/paths/{app-invites → apps/appId/invites}/token.js +1 -0
- package/api/paths/{app-members → apps/appId/members}/appMemberId/picture.js +1 -0
- package/api/paths/apps/appId/members/appMemberId/properties.d.ts +2 -0
- package/api/paths/{app-members → apps/appId/members}/appMemberId/properties.js +1 -0
- package/api/paths/apps/appId/members/appMemberId/role.d.ts +2 -0
- package/api/paths/{app-members → apps/appId/members}/appMemberId/role.js +1 -0
- package/api/paths/{app-members → apps/appId/members}/appMemberId.js +1 -0
- package/api/paths/apps/appId/paymentSettings.d.ts +2 -0
- package/api/paths/apps/appId/paymentSettings.js +91 -0
- package/api/paths/apps/appId/payments/acceptPayment.d.ts +2 -0
- package/api/paths/apps/appId/payments/acceptPayment.js +340 -0
- package/api/paths/apps/appId/payments/createCheckout.d.ts +2 -0
- package/api/paths/apps/appId/payments/createCheckout.js +48 -0
- package/api/paths/apps/appId.js +16 -0
- package/api/paths/index.d.ts +24 -14
- package/api/paths/index.js +48 -28
- package/api/paths/organizationSubscriptions/organizationSubscriptionId.d.ts +2 -0
- package/api/paths/organizationSubscriptions/organizationSubscriptionId.js +39 -0
- package/api/paths/organizationSubscriptions.d.ts +2 -0
- package/api/paths/organizationSubscriptions.js +23 -0
- package/api/paths/organizations/organizationId/organizationSubscription.d.ts +2 -0
- package/api/paths/organizations/organizationId/organizationSubscription.js +13 -0
- package/api/paths/organizations/organizationId/organizationSubscriptionPrice.d.ts +2 -0
- package/api/paths/organizations/organizationId/organizationSubscriptionPrice.js +33 -0
- package/api/paths/organizations/organizationId/subscription.d.ts +2 -0
- package/api/paths/organizations/organizationId/subscription.js +13 -0
- package/api/paths/organizations/organizationId.js +24 -0
- package/api/paths/organizations.js +24 -0
- package/api/paths/payments/acceptPayment.d.ts +2 -0
- package/api/paths/payments/acceptPayment.js +340 -0
- package/api/paths/payments/payment.d.ts +2 -0
- package/api/paths/payments/payment.js +40 -0
- package/api/tags/index.js +4 -0
- package/package.json +3 -3
- /package/api/paths/{app-invites/token.d.ts → apps/appId/clonable-assets.d.ts} +0 -0
- /package/api/paths/{app-invites/token/respond.d.ts → apps/appId/clonable-resources.d.ts} +0 -0
- /package/api/paths/{group-invites → apps/appId/group-invites}/token/respond.d.ts +0 -0
- /package/api/paths/{group-invites → apps/appId/group-invites}/token.d.ts +0 -0
- /package/api/paths/{app-members/appMemberId → apps/appId/group-members/groupMemberId}/role.d.ts +0 -0
- /package/api/paths/{group-members → apps/appId/group-members}/groupMemberId.d.ts +0 -0
- /package/api/paths/{groups → apps/appId/groups}/groupId/invites/resend.d.ts +0 -0
- /package/api/paths/{groups → apps/appId/groups}/groupId/invites.d.ts +0 -0
- /package/api/paths/{groups → apps/appId/groups}/groupId/members.d.ts +0 -0
- /package/api/paths/{groups → apps/appId/groups}/groupId.d.ts +0 -0
- /package/api/paths/{app-members/appMemberId/picture.d.ts → apps/appId/invites/token/respond.d.ts} +0 -0
- /package/api/paths/{app-members/appMemberId.d.ts → apps/appId/invites/token.d.ts} +0 -0
- /package/api/paths/{group-members/groupMemberId/role.d.ts → apps/appId/members/appMemberId/picture.d.ts} +0 -0
- /package/api/paths/{app-members/appMemberId/properties.d.ts → apps/appId/members/appMemberId.d.ts} +0 -0
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
export const pathItems = {
|
|
2
|
+
post: {
|
|
3
|
+
tags: ['main', 'payments'],
|
|
4
|
+
description: 'Accept a payment.',
|
|
5
|
+
operationId: 'acceptPayment',
|
|
6
|
+
requestBody: {
|
|
7
|
+
description: 'Information about the payment sent by Stripe.',
|
|
8
|
+
required: true,
|
|
9
|
+
content: {
|
|
10
|
+
'application/json': {
|
|
11
|
+
schema: {
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {
|
|
14
|
+
id: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
},
|
|
17
|
+
object: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
},
|
|
20
|
+
api_version: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
},
|
|
23
|
+
created: {
|
|
24
|
+
type: 'number',
|
|
25
|
+
},
|
|
26
|
+
data: {
|
|
27
|
+
type: 'object',
|
|
28
|
+
properties: {
|
|
29
|
+
object: {
|
|
30
|
+
type: 'object',
|
|
31
|
+
properties: {
|
|
32
|
+
id: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
},
|
|
35
|
+
object: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
},
|
|
38
|
+
account_country: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
},
|
|
41
|
+
account_name: {
|
|
42
|
+
type: 'string',
|
|
43
|
+
},
|
|
44
|
+
account_tax_ids: {
|
|
45
|
+
type: 'string',
|
|
46
|
+
},
|
|
47
|
+
amount_due: {
|
|
48
|
+
type: 'number',
|
|
49
|
+
},
|
|
50
|
+
amount_paid: {
|
|
51
|
+
type: 'number',
|
|
52
|
+
},
|
|
53
|
+
amount_remaining: {
|
|
54
|
+
type: 'number',
|
|
55
|
+
},
|
|
56
|
+
amount_shipping: {
|
|
57
|
+
type: 'number',
|
|
58
|
+
},
|
|
59
|
+
application: {
|
|
60
|
+
type: 'string',
|
|
61
|
+
},
|
|
62
|
+
application_fee_amount: {
|
|
63
|
+
type: 'number',
|
|
64
|
+
},
|
|
65
|
+
attempt_count: {
|
|
66
|
+
type: 'number',
|
|
67
|
+
},
|
|
68
|
+
attempted: {
|
|
69
|
+
type: 'boolean',
|
|
70
|
+
},
|
|
71
|
+
auto_advance: {
|
|
72
|
+
type: 'boolean',
|
|
73
|
+
},
|
|
74
|
+
automatic_tax: {
|
|
75
|
+
type: 'object',
|
|
76
|
+
},
|
|
77
|
+
automatically_finalizes_at: {
|
|
78
|
+
type: 'number',
|
|
79
|
+
},
|
|
80
|
+
billing_reason: {
|
|
81
|
+
type: 'string',
|
|
82
|
+
},
|
|
83
|
+
charge: {
|
|
84
|
+
type: 'string',
|
|
85
|
+
},
|
|
86
|
+
collection_method: {
|
|
87
|
+
type: 'string',
|
|
88
|
+
},
|
|
89
|
+
created: {
|
|
90
|
+
type: 'number',
|
|
91
|
+
},
|
|
92
|
+
currency: {
|
|
93
|
+
type: 'string',
|
|
94
|
+
},
|
|
95
|
+
custom_fields: {
|
|
96
|
+
type: 'array',
|
|
97
|
+
items: {
|
|
98
|
+
type: 'object',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
customer: {
|
|
102
|
+
type: 'string',
|
|
103
|
+
},
|
|
104
|
+
customer_address: {
|
|
105
|
+
type: 'object',
|
|
106
|
+
},
|
|
107
|
+
customer_email: {
|
|
108
|
+
type: 'string',
|
|
109
|
+
},
|
|
110
|
+
customer_name: {
|
|
111
|
+
type: 'string',
|
|
112
|
+
},
|
|
113
|
+
customer_phone: {
|
|
114
|
+
type: 'string',
|
|
115
|
+
},
|
|
116
|
+
customer_shipping: {
|
|
117
|
+
type: 'object',
|
|
118
|
+
},
|
|
119
|
+
customer_tax_exempt: {
|
|
120
|
+
type: 'string',
|
|
121
|
+
},
|
|
122
|
+
customer_tax_ids: {
|
|
123
|
+
type: 'array',
|
|
124
|
+
items: {
|
|
125
|
+
type: 'object',
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
default_payment_method: {
|
|
129
|
+
type: 'string',
|
|
130
|
+
},
|
|
131
|
+
default_source: {
|
|
132
|
+
type: 'string',
|
|
133
|
+
},
|
|
134
|
+
default_tax_rates: {
|
|
135
|
+
type: 'array',
|
|
136
|
+
items: {
|
|
137
|
+
type: 'object',
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
description: {
|
|
141
|
+
type: 'string',
|
|
142
|
+
},
|
|
143
|
+
discount: {
|
|
144
|
+
type: 'object',
|
|
145
|
+
},
|
|
146
|
+
discounts: {
|
|
147
|
+
type: 'array',
|
|
148
|
+
items: {
|
|
149
|
+
type: 'string',
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
due_date: {
|
|
153
|
+
type: 'number',
|
|
154
|
+
},
|
|
155
|
+
effective_at: {
|
|
156
|
+
type: 'number',
|
|
157
|
+
},
|
|
158
|
+
ending_balance: {
|
|
159
|
+
type: 'number',
|
|
160
|
+
},
|
|
161
|
+
footer: {
|
|
162
|
+
type: 'string',
|
|
163
|
+
},
|
|
164
|
+
from_invoice: {
|
|
165
|
+
type: 'object',
|
|
166
|
+
},
|
|
167
|
+
hosted_invoice_url: {
|
|
168
|
+
type: 'string',
|
|
169
|
+
},
|
|
170
|
+
invoice_pdf: {
|
|
171
|
+
type: 'string',
|
|
172
|
+
},
|
|
173
|
+
issuer: {
|
|
174
|
+
type: 'object',
|
|
175
|
+
},
|
|
176
|
+
last_finalization_error: {
|
|
177
|
+
type: 'object',
|
|
178
|
+
},
|
|
179
|
+
latest_revision: {
|
|
180
|
+
type: 'string',
|
|
181
|
+
},
|
|
182
|
+
lines: {
|
|
183
|
+
type: 'object',
|
|
184
|
+
},
|
|
185
|
+
livemode: {
|
|
186
|
+
type: 'boolean',
|
|
187
|
+
},
|
|
188
|
+
metadata: {
|
|
189
|
+
type: 'object',
|
|
190
|
+
properties: {
|
|
191
|
+
id: {
|
|
192
|
+
type: 'number',
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
next_payment_attempt: {
|
|
197
|
+
type: 'number',
|
|
198
|
+
},
|
|
199
|
+
number: {
|
|
200
|
+
type: 'string',
|
|
201
|
+
},
|
|
202
|
+
on_behalf_of: {
|
|
203
|
+
type: 'string',
|
|
204
|
+
},
|
|
205
|
+
paid: {
|
|
206
|
+
type: 'boolean',
|
|
207
|
+
},
|
|
208
|
+
paid_out_of_band: {
|
|
209
|
+
type: 'boolean',
|
|
210
|
+
},
|
|
211
|
+
payment_intent: {
|
|
212
|
+
type: 'string',
|
|
213
|
+
},
|
|
214
|
+
payment_settings: {
|
|
215
|
+
type: 'object',
|
|
216
|
+
},
|
|
217
|
+
period_end: {
|
|
218
|
+
type: 'number',
|
|
219
|
+
},
|
|
220
|
+
period_start: {
|
|
221
|
+
type: 'number',
|
|
222
|
+
},
|
|
223
|
+
post_payment_credit_notes_amount: {
|
|
224
|
+
type: 'number',
|
|
225
|
+
},
|
|
226
|
+
pre_payment_credit_notes_amount: {
|
|
227
|
+
type: 'number',
|
|
228
|
+
},
|
|
229
|
+
quote: {
|
|
230
|
+
type: 'string',
|
|
231
|
+
},
|
|
232
|
+
receipt_number: {
|
|
233
|
+
type: 'string',
|
|
234
|
+
},
|
|
235
|
+
rendering: {
|
|
236
|
+
type: 'object',
|
|
237
|
+
},
|
|
238
|
+
shipping_cost: {
|
|
239
|
+
type: 'object',
|
|
240
|
+
},
|
|
241
|
+
shipping_details: {
|
|
242
|
+
type: 'object',
|
|
243
|
+
},
|
|
244
|
+
starting_balance: {
|
|
245
|
+
type: 'number',
|
|
246
|
+
},
|
|
247
|
+
statement_descriptor: {
|
|
248
|
+
type: 'string',
|
|
249
|
+
},
|
|
250
|
+
status: {
|
|
251
|
+
type: 'string',
|
|
252
|
+
},
|
|
253
|
+
status_transitions: {
|
|
254
|
+
type: 'object',
|
|
255
|
+
},
|
|
256
|
+
subscription: {
|
|
257
|
+
type: 'string',
|
|
258
|
+
},
|
|
259
|
+
subscription_details: {
|
|
260
|
+
type: 'object',
|
|
261
|
+
},
|
|
262
|
+
subtotal: {
|
|
263
|
+
type: 'number',
|
|
264
|
+
},
|
|
265
|
+
subtotal_excluding_tax: {
|
|
266
|
+
type: 'number',
|
|
267
|
+
},
|
|
268
|
+
tax: {
|
|
269
|
+
type: 'number',
|
|
270
|
+
},
|
|
271
|
+
test_clock: {
|
|
272
|
+
type: 'string',
|
|
273
|
+
},
|
|
274
|
+
total: {
|
|
275
|
+
type: 'number',
|
|
276
|
+
},
|
|
277
|
+
total_discount_amounts: {
|
|
278
|
+
type: 'array',
|
|
279
|
+
items: {
|
|
280
|
+
type: 'object',
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
total_excluding_tax: {
|
|
284
|
+
type: 'number',
|
|
285
|
+
},
|
|
286
|
+
total_pretax_credit_amounts: {
|
|
287
|
+
type: 'array',
|
|
288
|
+
items: {
|
|
289
|
+
type: 'object',
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
total_tax_amounts: {
|
|
293
|
+
type: 'array',
|
|
294
|
+
items: {
|
|
295
|
+
type: 'object',
|
|
296
|
+
},
|
|
297
|
+
},
|
|
298
|
+
transfer_data: {
|
|
299
|
+
type: 'object',
|
|
300
|
+
},
|
|
301
|
+
webhooks_delivered_at: {
|
|
302
|
+
type: 'number',
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
livemode: {
|
|
309
|
+
type: 'boolean',
|
|
310
|
+
},
|
|
311
|
+
pending_webhooks: {
|
|
312
|
+
type: 'number',
|
|
313
|
+
},
|
|
314
|
+
request: {
|
|
315
|
+
type: 'object',
|
|
316
|
+
properties: {
|
|
317
|
+
id: {
|
|
318
|
+
type: 'string',
|
|
319
|
+
},
|
|
320
|
+
idempotency_key: {
|
|
321
|
+
type: 'string',
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
type: {
|
|
326
|
+
type: 'string',
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
responses: {
|
|
334
|
+
200: {
|
|
335
|
+
description: 'Response sent to Stripe, should be 200 OK if we receive the webhook, regardless of our internals.',
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
};
|
|
340
|
+
//# sourceMappingURL=acceptPayment.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export const pathItems = {
|
|
2
|
+
post: {
|
|
3
|
+
tags: ['main', 'payments'],
|
|
4
|
+
description: 'Send an invoice.',
|
|
5
|
+
operationId: 'sendInvoice',
|
|
6
|
+
responses: {
|
|
7
|
+
200: {
|
|
8
|
+
description: 'Whether the invoice has been succesfully created and sent to Stripe.',
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
parameters: [
|
|
12
|
+
{
|
|
13
|
+
in: 'query',
|
|
14
|
+
name: 'organizationId',
|
|
15
|
+
description: 'Organization that we want to invoice.',
|
|
16
|
+
schema: { type: 'string' },
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
in: 'query',
|
|
20
|
+
name: 'subscriptionType',
|
|
21
|
+
description: 'Subscription plan that we want to invoice for.',
|
|
22
|
+
schema: { type: 'string' },
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
in: 'query',
|
|
26
|
+
name: 'period',
|
|
27
|
+
description: 'Renewal period for which we want to invoice.',
|
|
28
|
+
schema: { type: 'string' },
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
in: 'query',
|
|
32
|
+
name: 'couponCode',
|
|
33
|
+
description: 'Coupon code that will be applied to the subscription.',
|
|
34
|
+
schema: { type: 'string' },
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
security: [{ studio: [] }],
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=payment.js.map
|
package/api/tags/index.js
CHANGED
|
@@ -87,6 +87,10 @@ export const tags = [
|
|
|
87
87
|
name: 'organization',
|
|
88
88
|
description: 'Operations related to organizations',
|
|
89
89
|
},
|
|
90
|
+
{
|
|
91
|
+
name: 'organization-subscription',
|
|
92
|
+
description: 'Operations related to organizationSubscriptions',
|
|
93
|
+
},
|
|
90
94
|
{
|
|
91
95
|
name: 'rating',
|
|
92
96
|
description: 'Operations related to ratings',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsemble/utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.3-test.0",
|
|
4
4
|
"description": "Utility functions used in Appsemble internally",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"test": "vitest"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@appsemble/types": "0.
|
|
43
|
-
"@appsemble/lang-sdk": "0.
|
|
42
|
+
"@appsemble/types": "0.35.3-test.0",
|
|
43
|
+
"@appsemble/lang-sdk": "0.35.3-test.0",
|
|
44
44
|
"@odata/parser": "^0.2.14",
|
|
45
45
|
"axios": "^1.0.0",
|
|
46
46
|
"cron-parser": "^4.0.0",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/api/paths/{app-members/appMemberId → apps/appId/group-members/groupMemberId}/role.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/api/paths/{app-members/appMemberId/picture.d.ts → apps/appId/invites/token/respond.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/api/paths/{app-members/appMemberId/properties.d.ts → apps/appId/members/appMemberId.d.ts}
RENAMED
|
File without changes
|