rotacloud 2.3.15 → 2.3.16
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/interfaces/account-subscription.interface.d.ts +1 -0
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.js +1 -0
- package/dist/interfaces/invoice.interface.d.ts +4 -2
- package/dist/interfaces/payment.interface.d.ts +35 -0
- package/dist/interfaces/payment.interface.js +1 -0
- package/dist/main.d.ts +1 -1
- package/dist/service.d.ts +2 -2
- package/package.json +1 -1
- package/src/interfaces/account-subscription.interface.ts +1 -0
- package/src/interfaces/index.ts +1 -0
- package/src/interfaces/invoice.interface.ts +4 -3
- package/src/interfaces/payment.interface.ts +38 -0
- package/src/service.ts +2 -2
package/dist/interfaces/index.js
CHANGED
|
@@ -36,8 +36,6 @@ export interface Invoice {
|
|
|
36
36
|
subTotal: number | null;
|
|
37
37
|
tax: number | null;
|
|
38
38
|
lineItems: LineItem[] | null;
|
|
39
|
-
}
|
|
40
|
-
export interface InvoiceDownload {
|
|
41
39
|
downloadLink: string;
|
|
42
40
|
downloadLinkExpiresAt: string;
|
|
43
41
|
}
|
|
@@ -50,6 +48,10 @@ export interface LineItem {
|
|
|
50
48
|
entityDescription?: string;
|
|
51
49
|
}
|
|
52
50
|
export interface InvoiceQueryParameters {
|
|
51
|
+
/** The max number of items to return */
|
|
52
|
+
limit?: number;
|
|
53
|
+
/** The cursor after which the next page should be fetched. Comes from the previous page's response */
|
|
54
|
+
cursor?: string;
|
|
53
55
|
/** Invoice status to filter by */
|
|
54
56
|
status?: InvoiceStatus;
|
|
55
57
|
/** The date to filter from, e.g., 2025-01-01 */
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface PaymentSource {
|
|
2
|
+
id: string;
|
|
3
|
+
createdAt: string;
|
|
4
|
+
updatedAt: string;
|
|
5
|
+
status: 'valid' | 'expiring' | 'expired' | 'invalid' | 'pending_verification';
|
|
6
|
+
type: string;
|
|
7
|
+
deleted: boolean;
|
|
8
|
+
card: PaymentCardInfoV2;
|
|
9
|
+
}
|
|
10
|
+
export interface PaymentCardInfoV2 {
|
|
11
|
+
sourceId: string;
|
|
12
|
+
firstName: string;
|
|
13
|
+
lastName: string;
|
|
14
|
+
brand: string;
|
|
15
|
+
expMonth: number;
|
|
16
|
+
expYear: number;
|
|
17
|
+
last4: string;
|
|
18
|
+
type: string;
|
|
19
|
+
primary: boolean;
|
|
20
|
+
fundingType: 'credit' | 'debit' | 'prepaid' | 'not_known' | 'not_applicable';
|
|
21
|
+
}
|
|
22
|
+
export interface Country {
|
|
23
|
+
id: number;
|
|
24
|
+
name: string;
|
|
25
|
+
phone_prefix: string | null;
|
|
26
|
+
vat_rate: number | null;
|
|
27
|
+
allow_phone: boolean;
|
|
28
|
+
charge_vat: boolean;
|
|
29
|
+
require_vat_number: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface StairStep {
|
|
32
|
+
price: number;
|
|
33
|
+
endingUnit?: number;
|
|
34
|
+
startingUnit: number;
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/main.d.ts
CHANGED
|
@@ -80,7 +80,7 @@ export declare const createRotaCloudClient: (config: import("./interfaces/sdk-co
|
|
|
80
80
|
endpointVersion: "v2";
|
|
81
81
|
operations: ("get" | "list" | "listAll")[];
|
|
82
82
|
customOperations: {
|
|
83
|
-
get: (ctx: import("./ops.js").OperationContext, id: number) => import("./ops.js").RequestConfig<void, import("./interfaces/invoice.interface.js").Invoice
|
|
83
|
+
get: (ctx: import("./ops.js").OperationContext, id: number) => import("./ops.js").RequestConfig<void, import("./interfaces/invoice.interface.js").Invoice>;
|
|
84
84
|
};
|
|
85
85
|
};
|
|
86
86
|
leaveEmbargo: {
|
package/dist/service.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { ShiftDropRequest } from './interfaces/drop-request.interface.js';
|
|
|
9
9
|
import { ToilAllowanceQueryParams } from './interfaces/query-params/index.js';
|
|
10
10
|
import { LogbookEntry, LogbookQueryParameters } from './interfaces/logbook.interface.js';
|
|
11
11
|
import { Message } from './interfaces/message.interface.js';
|
|
12
|
-
import { Invoice
|
|
12
|
+
import { Invoice } from './interfaces/invoice.interface.js';
|
|
13
13
|
import { CreateUserRequest, CreateUserResponse } from './interfaces/user-v2.interface.js';
|
|
14
14
|
import { AddOrOnboard, UpdateUserWithOnboardingInfo } from './interfaces/onboarding.interface.js';
|
|
15
15
|
export type ServiceSpecification<CustomOp extends OpDef<unknown> = OpDef<any>> = {
|
|
@@ -125,7 +125,7 @@ export declare const SERVICES: {
|
|
|
125
125
|
endpointVersion: "v2";
|
|
126
126
|
operations: ("get" | "list" | "listAll")[];
|
|
127
127
|
customOperations: {
|
|
128
|
-
get: (ctx: OperationContext, id: number) => RequestConfig<void, Invoice
|
|
128
|
+
get: (ctx: OperationContext, id: number) => RequestConfig<void, Invoice>;
|
|
129
129
|
};
|
|
130
130
|
};
|
|
131
131
|
leaveEmbargo: {
|
package/package.json
CHANGED
package/src/interfaces/index.ts
CHANGED
|
@@ -38,9 +38,6 @@ export interface Invoice {
|
|
|
38
38
|
subTotal: number | null;
|
|
39
39
|
tax: number | null;
|
|
40
40
|
lineItems: LineItem[] | null;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface InvoiceDownload {
|
|
44
41
|
downloadLink: string;
|
|
45
42
|
downloadLinkExpiresAt: string;
|
|
46
43
|
}
|
|
@@ -55,6 +52,10 @@ export interface LineItem {
|
|
|
55
52
|
}
|
|
56
53
|
|
|
57
54
|
export interface InvoiceQueryParameters {
|
|
55
|
+
/** The max number of items to return */
|
|
56
|
+
limit?: number;
|
|
57
|
+
/** The cursor after which the next page should be fetched. Comes from the previous page's response */
|
|
58
|
+
cursor?: string;
|
|
58
59
|
/** Invoice status to filter by */
|
|
59
60
|
status?: InvoiceStatus;
|
|
60
61
|
/** The date to filter from, e.g., 2025-01-01 */
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface PaymentSource {
|
|
2
|
+
id: string;
|
|
3
|
+
createdAt: string;
|
|
4
|
+
updatedAt: string;
|
|
5
|
+
status: 'valid' | 'expiring' | 'expired' | 'invalid' | 'pending_verification';
|
|
6
|
+
type: string;
|
|
7
|
+
deleted: boolean;
|
|
8
|
+
card: PaymentCardInfoV2;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface PaymentCardInfoV2 {
|
|
12
|
+
sourceId: string;
|
|
13
|
+
firstName: string;
|
|
14
|
+
lastName: string;
|
|
15
|
+
brand: string;
|
|
16
|
+
expMonth: number;
|
|
17
|
+
expYear: number;
|
|
18
|
+
last4: string;
|
|
19
|
+
type: string;
|
|
20
|
+
primary: boolean;
|
|
21
|
+
fundingType: 'credit' | 'debit' | 'prepaid' | 'not_known' | 'not_applicable';
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface Country {
|
|
25
|
+
id: number;
|
|
26
|
+
name: string;
|
|
27
|
+
phone_prefix: string | null;
|
|
28
|
+
vat_rate: number | null;
|
|
29
|
+
allow_phone: boolean;
|
|
30
|
+
charge_vat: boolean;
|
|
31
|
+
require_vat_number: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface StairStep {
|
|
35
|
+
price: number;
|
|
36
|
+
endingUnit?: number;
|
|
37
|
+
startingUnit: number;
|
|
38
|
+
}
|
package/src/service.ts
CHANGED
|
@@ -34,7 +34,7 @@ import { ShiftDropRequest } from './interfaces/drop-request.interface.js';
|
|
|
34
34
|
import { ToilAllowanceQueryParams } from './interfaces/query-params/index.js';
|
|
35
35
|
import { LogbookEntry, LogbookQueryParameters } from './interfaces/logbook.interface.js';
|
|
36
36
|
import { Message } from './interfaces/message.interface.js';
|
|
37
|
-
import { Invoice
|
|
37
|
+
import { Invoice } from './interfaces/invoice.interface.js';
|
|
38
38
|
import { CreateUserRequest, CreateUserResponse, PartialUserV2 } from './interfaces/user-v2.interface.js';
|
|
39
39
|
import { AddOrOnboard, UpdateUserWithOnboardingInfo } from './interfaces/onboarding.interface.js';
|
|
40
40
|
|
|
@@ -187,7 +187,7 @@ export const SERVICES = {
|
|
|
187
187
|
endpointVersion: 'v2',
|
|
188
188
|
operations: ['get', 'list', 'listAll'],
|
|
189
189
|
customOperations: {
|
|
190
|
-
get: (ctx, id: number): RequestConfig<void, Invoice
|
|
190
|
+
get: (ctx, id: number): RequestConfig<void, Invoice> => ({
|
|
191
191
|
...ctx.request,
|
|
192
192
|
url: `${ctx.service.endpointVersion}/${ctx.service.endpoint}/${id}`,
|
|
193
193
|
method: 'GET',
|