@internxt/sdk 1.11.1 → 1.11.3
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/dist/drive/backups/types.d.ts +3 -27
- package/dist/drive/storage/types.d.ts +2 -7
- package/dist/drive/trash/types.d.ts +2 -7
- package/dist/network/errors/codes.js +1 -1
- package/dist/network/types.js +1 -1
- package/dist/payments/checkout.d.ts +4 -3
- package/dist/payments/checkout.js +6 -3
- package/dist/payments/types/index.d.ts +2 -0
- package/dist/schema.d.ts +8887 -0
- package/package.json +6 -4
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
mac: string;
|
|
5
|
-
userId: number;
|
|
6
|
-
createdAt: string;
|
|
7
|
-
updatedAt: string;
|
|
8
|
-
size: number;
|
|
9
|
-
platform: string | null;
|
|
10
|
-
}
|
|
11
|
-
export interface DeviceBackup {
|
|
12
|
-
id: number;
|
|
13
|
-
path: string;
|
|
14
|
-
name: string;
|
|
15
|
-
fileId?: string;
|
|
16
|
-
deviceId: number;
|
|
17
|
-
userId: number;
|
|
18
|
-
interval: number;
|
|
19
|
-
size?: number;
|
|
20
|
-
bucket: string;
|
|
21
|
-
createdAt: string;
|
|
22
|
-
updatedAt: string;
|
|
23
|
-
encrypt_version: string;
|
|
24
|
-
hash?: string;
|
|
25
|
-
enabled: boolean;
|
|
26
|
-
lastBackupAt?: string;
|
|
27
|
-
}
|
|
1
|
+
import { components } from '../../schema';
|
|
2
|
+
export type Device = components['schemas']['DeviceDto'];
|
|
3
|
+
export type DeviceBackup = components['schemas']['DeviceAsFolder'];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { paths } from '../../schema';
|
|
1
2
|
import { SharingMeta } from '../share/types';
|
|
2
3
|
import { UserResumeData } from '../users/types';
|
|
3
4
|
export interface DriveFolderData {
|
|
@@ -383,13 +384,7 @@ export type UsageResponseV2 = {
|
|
|
383
384
|
export interface FetchLimitResponse {
|
|
384
385
|
maxSpaceBytes: number;
|
|
385
386
|
}
|
|
386
|
-
export
|
|
387
|
-
items: Array<{
|
|
388
|
-
id?: string;
|
|
389
|
-
uuid?: string;
|
|
390
|
-
type: string;
|
|
391
|
-
}>;
|
|
392
|
-
}
|
|
387
|
+
export type AddItemsToTrashPayload = paths['/storage/trash/add']['post']['requestBody']['content']['application/json'];
|
|
393
388
|
export interface SearchResult {
|
|
394
389
|
id: string;
|
|
395
390
|
itemId: string;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
id?: string;
|
|
4
|
-
uuid?: string;
|
|
5
|
-
type: string;
|
|
6
|
-
}>;
|
|
7
|
-
}
|
|
1
|
+
import { paths } from '../../schema';
|
|
2
|
+
export type AddItemsToTrashPayload = paths['/storage/trash/add']['post']['requestBody']['content']['application/json'];
|
|
8
3
|
export interface DeleteFilePayload {
|
|
9
4
|
fileId: number;
|
|
10
5
|
folderId: number;
|
package/dist/network/types.js
CHANGED
|
@@ -14,10 +14,11 @@ export declare class Checkout {
|
|
|
14
14
|
* @param companyVatId - The VAT ID of the company (optional)
|
|
15
15
|
* @returns The customer ID and the user token used to create a subscription or payment intent
|
|
16
16
|
*/
|
|
17
|
-
getCustomerId({ customerName, postalCode, country, companyVatId, }: {
|
|
17
|
+
getCustomerId({ customerName, postalCode, country, captchaToken, companyVatId, }: {
|
|
18
18
|
customerName: string;
|
|
19
19
|
postalCode: string;
|
|
20
20
|
country: string;
|
|
21
|
+
captchaToken: string;
|
|
21
22
|
companyVatId?: string;
|
|
22
23
|
}): Promise<{
|
|
23
24
|
customerId: string;
|
|
@@ -37,7 +38,7 @@ export declare class Checkout {
|
|
|
37
38
|
* - `subscriptionId`: The ID of the subscription (optional)
|
|
38
39
|
* - `paymentIntentId`: The ID of the payment intent (optional)
|
|
39
40
|
*/
|
|
40
|
-
createSubscription({ customerId, priceId, token, currency, promoCodeId, quantity, }: CreateSubscriptionPayload): Promise<CreatedSubscriptionData>;
|
|
41
|
+
createSubscription({ customerId, priceId, token, currency, captchaToken, promoCodeId, quantity, }: CreateSubscriptionPayload): Promise<CreatedSubscriptionData>;
|
|
41
42
|
/**
|
|
42
43
|
* @description Creates a payment intent for a given customer
|
|
43
44
|
* @param customerId - The ID of the customer
|
|
@@ -55,7 +56,7 @@ export declare class Checkout {
|
|
|
55
56
|
* - `payload.url`: The URL of the invoice
|
|
56
57
|
* - `payload.qrUrl`: The QR code URL of the invoice
|
|
57
58
|
*/
|
|
58
|
-
createPaymentIntent({ customerId, priceId, token, currency, promoCodeId, }: CreatePaymentIntentPayload): Promise<PaymentIntent>;
|
|
59
|
+
createPaymentIntent({ customerId, priceId, token, currency, captchaToken, promoCodeId, }: CreatePaymentIntentPayload): Promise<PaymentIntent>;
|
|
59
60
|
/**
|
|
60
61
|
* @description Fetch a requested price by its ID and its tax rate
|
|
61
62
|
* @param priceId - The ID of the price
|
|
@@ -31,11 +31,12 @@ var Checkout = /** @class */ (function () {
|
|
|
31
31
|
* @returns The customer ID and the user token used to create a subscription or payment intent
|
|
32
32
|
*/
|
|
33
33
|
Checkout.prototype.getCustomerId = function (_a) {
|
|
34
|
-
var customerName = _a.customerName, postalCode = _a.postalCode, country = _a.country, companyVatId = _a.companyVatId;
|
|
34
|
+
var customerName = _a.customerName, postalCode = _a.postalCode, country = _a.country, captchaToken = _a.captchaToken, companyVatId = _a.companyVatId;
|
|
35
35
|
var query = new URLSearchParams();
|
|
36
36
|
query.set('customerName', customerName);
|
|
37
37
|
query.set('country', country);
|
|
38
38
|
query.set('postalCode', postalCode);
|
|
39
|
+
query.set('captchaToken', captchaToken);
|
|
39
40
|
if (companyVatId !== undefined)
|
|
40
41
|
query.set('companyVatId', companyVatId);
|
|
41
42
|
return this.client.get("/checkout/customer?".concat(query.toString()), this.authHeaders());
|
|
@@ -55,12 +56,13 @@ var Checkout = /** @class */ (function () {
|
|
|
55
56
|
* - `paymentIntentId`: The ID of the payment intent (optional)
|
|
56
57
|
*/
|
|
57
58
|
Checkout.prototype.createSubscription = function (_a) {
|
|
58
|
-
var customerId = _a.customerId, priceId = _a.priceId, token = _a.token, currency = _a.currency, promoCodeId = _a.promoCodeId, quantity = _a.quantity;
|
|
59
|
+
var customerId = _a.customerId, priceId = _a.priceId, token = _a.token, currency = _a.currency, captchaToken = _a.captchaToken, promoCodeId = _a.promoCodeId, quantity = _a.quantity;
|
|
59
60
|
return this.client.post('/checkout/subscription', {
|
|
60
61
|
customerId: customerId,
|
|
61
62
|
priceId: priceId,
|
|
62
63
|
token: token,
|
|
63
64
|
currency: currency,
|
|
65
|
+
captchaToken: captchaToken,
|
|
64
66
|
promoCodeId: promoCodeId,
|
|
65
67
|
quantity: quantity,
|
|
66
68
|
}, this.authHeaders());
|
|
@@ -83,12 +85,13 @@ var Checkout = /** @class */ (function () {
|
|
|
83
85
|
* - `payload.qrUrl`: The QR code URL of the invoice
|
|
84
86
|
*/
|
|
85
87
|
Checkout.prototype.createPaymentIntent = function (_a) {
|
|
86
|
-
var customerId = _a.customerId, priceId = _a.priceId, token = _a.token, currency = _a.currency, promoCodeId = _a.promoCodeId;
|
|
88
|
+
var customerId = _a.customerId, priceId = _a.priceId, token = _a.token, currency = _a.currency, captchaToken = _a.captchaToken, promoCodeId = _a.promoCodeId;
|
|
87
89
|
return this.client.post('/checkout/payment-intent', {
|
|
88
90
|
customerId: customerId,
|
|
89
91
|
priceId: priceId,
|
|
90
92
|
token: token,
|
|
91
93
|
currency: currency,
|
|
94
|
+
captchaToken: captchaToken,
|
|
92
95
|
promoCodeId: promoCodeId,
|
|
93
96
|
}, this.authHeaders());
|
|
94
97
|
};
|
|
@@ -3,6 +3,7 @@ export interface CreateSubscriptionPayload {
|
|
|
3
3
|
customerId: string;
|
|
4
4
|
priceId: string;
|
|
5
5
|
token: string;
|
|
6
|
+
captchaToken: string;
|
|
6
7
|
currency?: string;
|
|
7
8
|
promoCodeId?: string;
|
|
8
9
|
quantity?: number;
|
|
@@ -12,6 +13,7 @@ export interface CreatePaymentIntentPayload {
|
|
|
12
13
|
priceId: string;
|
|
13
14
|
token: string;
|
|
14
15
|
currency: string;
|
|
16
|
+
captchaToken: string;
|
|
15
17
|
promoCodeId?: string;
|
|
16
18
|
}
|
|
17
19
|
export interface PaymentMethodVerificationPayload {
|