@aderis-erp/cli 1.0.4 → 1.0.8
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/commands/access-groups.js +5 -5
- package/dist/commands/{access-groups 3.d.ts → account-transaction-allocations.d.ts} +1 -1
- package/dist/commands/{async-endpoints-internal.js → account-transaction-allocations.js} +19 -15
- package/dist/commands/account-transactions.js +7 -7
- package/dist/commands/accounts.js +5 -5
- package/dist/commands/agent-runs.js +5 -5
- package/dist/commands/audit-log.js +5 -5
- package/dist/commands/auth/login.js +1 -2
- package/dist/commands/auth/tenant.d.ts +1 -1
- package/dist/commands/auth/tenant.js +11 -11
- package/dist/commands/auth.js +1 -1
- package/dist/commands/bank-accounts.js +5 -5
- package/dist/commands/bank-integrations.js +5 -5
- package/dist/commands/business-partners---contacts.js +5 -5
- package/dist/commands/business-partners.js +5 -5
- package/dist/commands/credit-card-accounts.js +5 -5
- package/dist/commands/documents.js +5 -5
- package/dist/commands/dunning-configs.js +5 -5
- package/dist/commands/dunning-reminders.js +5 -5
- package/dist/commands/dunning-runs.js +5 -5
- package/dist/commands/employees.js +5 -5
- package/dist/commands/event-processor-mappings.js +5 -5
- package/dist/commands/files-internal.js +5 -5
- package/dist/commands/health.js +5 -5
- package/dist/commands/inbox.js +5 -5
- package/dist/commands/integrations.js +5 -5
- package/dist/commands/item-categories.js +5 -5
- package/dist/commands/items.js +5 -5
- package/dist/commands/journal-lines.js +5 -5
- package/dist/commands/journals.js +5 -5
- package/dist/commands/ledgers.js +5 -5
- package/dist/commands/office-locations.js +5 -5
- package/dist/commands/payment-method-ledger-mappings.js +5 -5
- package/dist/commands/payment-methods.js +5 -5
- package/dist/commands/payment-runs.js +5 -5
- package/dist/commands/payment-terms.js +5 -5
- package/dist/commands/price-lists.js +5 -5
- package/dist/commands/processor-mappings.js +5 -5
- package/dist/commands/processors.js +5 -5
- package/dist/commands/reports.js +5 -5
- package/dist/commands/salary-types.js +5 -5
- package/dist/commands/sales-invoices.js +5 -5
- package/dist/commands/sales-orders.js +5 -5
- package/dist/commands/tags.js +5 -5
- package/dist/commands/tax-codes.js +5 -5
- package/dist/commands/tax-matrix.js +5 -5
- package/dist/commands/tenants.js +5 -5
- package/dist/commands/text-templates.js +5 -5
- package/dist/commands/tools.js +5 -5
- package/dist/commands/{price-lists 3.d.ts → vat-declaration.d.ts} +2 -2
- package/dist/commands/{webhooks 3.js → vat-declaration.js} +33 -25
- package/dist/commands/vendor-invoices.js +5 -5
- package/dist/commands/webhooks.js +5 -5
- package/dist/commands/workflows.js +5 -5
- package/dist/lib/api-client.d.ts +3 -2
- package/dist/lib/api-client.js +4 -0
- package/dist/lib/auth.js +1 -0
- package/oclif.manifest.json +696 -6069
- package/package.json +15 -13
- package/dist/commands/access-groups 3.js +0 -1072
- package/dist/commands/accounts 2.d.ts +0 -41
- package/dist/commands/accounts 2.js +0 -1078
- package/dist/commands/async-endpoints-internal 3.d.ts +0 -40
- package/dist/commands/async-endpoints-internal 3.js +0 -1062
- package/dist/commands/async-endpoints-internal.d.ts +0 -40
- package/dist/commands/audit-log 3.d.ts +0 -40
- package/dist/commands/audit-log 3.js +0 -1066
- package/dist/commands/business-partners 3.d.ts +0 -41
- package/dist/commands/business-partners 3.js +0 -1078
- package/dist/commands/business-partners---contacts 3.d.ts +0 -42
- package/dist/commands/business-partners---contacts 3.js +0 -1072
- package/dist/commands/credit-card-accounts 3.d.ts +0 -42
- package/dist/commands/credit-card-accounts 3.js +0 -1084
- package/dist/commands/dunning-configs 3.d.ts +0 -40
- package/dist/commands/dunning-configs 3.js +0 -1072
- package/dist/commands/dunning-runs 3.d.ts +0 -40
- package/dist/commands/dunning-runs 3.js +0 -1061
- package/dist/commands/event-processor-mappings 3.d.ts +0 -40
- package/dist/commands/event-processor-mappings 3.js +0 -1071
- package/dist/commands/files-internal 3.d.ts +0 -40
- package/dist/commands/files-internal 3.js +0 -1073
- package/dist/commands/health 3.d.ts +0 -40
- package/dist/commands/health 3.js +0 -1067
- package/dist/commands/inbox 3.d.ts +0 -40
- package/dist/commands/inbox 3.js +0 -1065
- package/dist/commands/integrations 3.d.ts +0 -41
- package/dist/commands/integrations 3.js +0 -1067
- package/dist/commands/item-categories 3.d.ts +0 -40
- package/dist/commands/item-categories 3.js +0 -1072
- package/dist/commands/items 3.d.ts +0 -40
- package/dist/commands/items 3.js +0 -1072
- package/dist/commands/journals 3.d.ts +0 -42
- package/dist/commands/journals 3.js +0 -1088
- package/dist/commands/office-locations 3.d.ts +0 -40
- package/dist/commands/office-locations 3.js +0 -1072
- package/dist/commands/payment-method-ledger-mappings 3.d.ts +0 -41
- package/dist/commands/payment-method-ledger-mappings 3.js +0 -1066
- package/dist/commands/payment-methods 3.d.ts +0 -40
- package/dist/commands/payment-methods 3.js +0 -1072
- package/dist/commands/payment-runs 3.d.ts +0 -42
- package/dist/commands/payment-runs 3.js +0 -1087
- package/dist/commands/payment-terms 3.d.ts +0 -40
- package/dist/commands/payment-terms 3.js +0 -1073
- package/dist/commands/price-lists 3.js +0 -1078
- package/dist/commands/processor-mappings 2.d.ts +0 -40
- package/dist/commands/processor-mappings 2.js +0 -1070
- package/dist/commands/reconciliation 3.d.ts +0 -40
- package/dist/commands/reconciliation 3.js +0 -1069
- package/dist/commands/reconciliation.d.ts +0 -40
- package/dist/commands/reconciliation.js +0 -1071
- package/dist/commands/salary-types 3.d.ts +0 -40
- package/dist/commands/salary-types 3.js +0 -1072
- package/dist/commands/sales-invoices 3.d.ts +0 -43
- package/dist/commands/sales-invoices 3.js +0 -1100
- package/dist/commands/sales-orders 3.d.ts +0 -43
- package/dist/commands/sales-orders 3.js +0 -1098
- package/dist/commands/tags 3.d.ts +0 -40
- package/dist/commands/tags 3.js +0 -1072
- package/dist/commands/tax-codes 3.d.ts +0 -40
- package/dist/commands/tax-codes 3.js +0 -1075
- package/dist/commands/text-templates 3.d.ts +0 -40
- package/dist/commands/text-templates 3.js +0 -1072
- package/dist/commands/webhooks 3.d.ts +0 -40
|
@@ -6,25 +6,30 @@ const HAS_IMPORT = true;
|
|
|
6
6
|
const HAS_EXPORT = true;
|
|
7
7
|
const HAS_CAMT053 = false;
|
|
8
8
|
const NESTED_IMPORTS = [];
|
|
9
|
-
const SUBCOMMANDS = [...["list", "create", "
|
|
9
|
+
const SUBCOMMANDS = [...["list", "create", "preview", "get", "update", "regenerate", "replace", "fields-contributions", "fields-contributions-export", "approve", "mark-as-filed", "xml"], ...(HAS_IMPORT ? ['import'] : []), ...(HAS_EXPORT ? ['export'] : []), ...NESTED_IMPORTS.map(n => `import-${n}`)];
|
|
10
10
|
const ENDPOINTS = {
|
|
11
|
-
'list': { method: 'GET', path: '/v1/
|
|
12
|
-
'create': { method: 'POST', path: '/v1/
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
11
|
+
'list': { method: 'GET', path: '/v1/vat-declaration', summary: 'List VAT reports (paginated)', pathParams: [], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
12
|
+
'create': { method: 'POST', path: '/v1/vat-declaration', summary: 'Create a VAT declaration report (always async-accepted)', pathParams: [], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
13
|
+
'preview': { method: 'GET', path: '/v1/vat-declaration/preview', summary: 'Preview the in-scope counts and late entries for a candidate period', pathParams: [], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
14
|
+
'get': { method: 'GET', path: '/v1/vat-declaration/{id}', summary: 'Get a VAT report by id (this is the polling endpoint for async generation)', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
15
|
+
'update': { method: 'PATCH', path: '/v1/vat-declaration/{id}', summary: 'Update manualAdjustments and/or generalInfo on a DRAFT report', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['manualAdjustments'] },
|
|
16
|
+
'regenerate': { method: 'POST', path: '/v1/vat-declaration/{id}/regenerate', summary: 'Re-run the full generation pipeline on a DRAFT report', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
17
|
+
'replace': { method: 'POST', path: '/v1/vat-declaration/{id}/replace', summary: 'Create a corrective DRAFT (Berichtigungsabrechnung) from a FILED report', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
18
|
+
'fields-contributions': { method: 'GET', path: '/v1/vat-declaration/{id}/fields/{fieldId}/contributions', summary: 'Drill into the contributions for a single Ziffer', pathParams: ['id', 'fieldId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
19
|
+
'fields-contributions-export': { method: 'GET', path: '/v1/vat-declaration/{id}/fields/{fieldId}/contributions/export', summary: 'Export the drill-down result set as an Excel workbook', pathParams: ['id', 'fieldId'], hasBody: false, isMultipart: false, isBinaryResponse: true, bodyArrayFields: [] },
|
|
20
|
+
'approve': { method: 'POST', path: '/v1/vat-declaration/{id}/approve', summary: 'Approve a VAT report and produce the eCH-0217 XML submission file.', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
21
|
+
'mark-as-filed': { method: 'POST', path: '/v1/vat-declaration/{id}/mark-as-filed', summary: 'Record the ESTV filing reference for a FINALIZED VAT report.', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
22
|
+
'xml': { method: 'GET', path: '/v1/vat-declaration/{id}/xml', summary: 'Download the eCH-0217 XML submission file for a FINALIZED or FILED VAT report.', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: true, bodyArrayFields: [] },
|
|
18
23
|
};
|
|
19
|
-
export default class
|
|
20
|
-
static description = 'Manage
|
|
24
|
+
export default class VatDeclaration extends Command {
|
|
25
|
+
static description = 'Manage vat declaration';
|
|
21
26
|
static examples = [
|
|
22
|
-
'<%= config.bin %>
|
|
23
|
-
'<%= config.bin %>
|
|
24
|
-
'<%= config.bin %>
|
|
25
|
-
'<%= config.bin %>
|
|
26
|
-
'<%= config.bin %>
|
|
27
|
-
'<%= config.bin %>
|
|
27
|
+
'<%= config.bin %> vat-declaration list',
|
|
28
|
+
'<%= config.bin %> vat-declaration get <id>',
|
|
29
|
+
'<%= config.bin %> vat-declaration create --data \'{...}\'',
|
|
30
|
+
'<%= config.bin %> vat-declaration update <id> --set field=value',
|
|
31
|
+
'<%= config.bin %> vat-declaration import --file data.json',
|
|
32
|
+
'<%= config.bin %> vat-declaration export --csv > vat-declaration.csv',
|
|
28
33
|
];
|
|
29
34
|
static args = {
|
|
30
35
|
action: Args.string({ description: 'Action: ' + SUBCOMMANDS.join(', '), required: true }),
|
|
@@ -38,6 +43,7 @@ export default class Webhooks extends Command {
|
|
|
38
43
|
data: Flags.string({ char: 'd', description: 'JSON data for request body' }),
|
|
39
44
|
file: Flags.string({ char: 'f', description: 'Read request body from file' }),
|
|
40
45
|
set: Flags.string({ char: 's', description: 'Set individual field (e.g. --set firstName=John)', multiple: true }),
|
|
46
|
+
'field-id': Flags.string({ description: 'Path param: fieldId' }),
|
|
41
47
|
page: Flags.string({ description: 'Page number' }),
|
|
42
48
|
limit: Flags.string({ description: 'Items per page' }),
|
|
43
49
|
include: Flags.string({ description: 'Relations to include' }),
|
|
@@ -50,7 +56,7 @@ export default class Webhooks extends Command {
|
|
|
50
56
|
'show-http-request': Flags.boolean({ description: 'Show HTTP request details (method, URL, body)' }),
|
|
51
57
|
};
|
|
52
58
|
async run() {
|
|
53
|
-
const { args, flags } = await this.parse(
|
|
59
|
+
const { args, flags } = await this.parse(VatDeclaration);
|
|
54
60
|
// Handle import action specially
|
|
55
61
|
if (args.action === 'import') {
|
|
56
62
|
if (!HAS_IMPORT)
|
|
@@ -83,11 +89,6 @@ export default class Webhooks extends Command {
|
|
|
83
89
|
const endpoint = ENDPOINTS[args.action];
|
|
84
90
|
if (!endpoint)
|
|
85
91
|
this.error(`Unknown action: ${args.action}. Available: ${SUBCOMMANDS.join(', ')}`);
|
|
86
|
-
const context = flags.context ? getContext(flags.context) : getCurrentContext();
|
|
87
|
-
if (!context)
|
|
88
|
-
this.error('No context configured. Run: aderis auth login --new');
|
|
89
|
-
if (!context.tokens)
|
|
90
|
-
this.error('Not logged in. Run: aderis auth login');
|
|
91
92
|
let apiPath = endpoint.path;
|
|
92
93
|
for (let i = 0; i < endpoint.pathParams.length; i++) {
|
|
93
94
|
const param = endpoint.pathParams[i];
|
|
@@ -96,7 +97,7 @@ export default class Webhooks extends Command {
|
|
|
96
97
|
// First path param always comes from positional argument
|
|
97
98
|
value = args.id;
|
|
98
99
|
if (!value)
|
|
99
|
-
this.error('Missing required argument: id. Usage: aderis
|
|
100
|
+
this.error('Missing required argument: id. Usage: aderis vat-declaration <action> <id>');
|
|
100
101
|
}
|
|
101
102
|
else {
|
|
102
103
|
const flagName = param.replace(/\./g, '-').replace(/([A-Z])/g, '-$1').toLowerCase().replace(/^-/, '');
|
|
@@ -106,6 +107,11 @@ export default class Webhooks extends Command {
|
|
|
106
107
|
}
|
|
107
108
|
apiPath = apiPath.replace(`{${param}}`, String(value));
|
|
108
109
|
}
|
|
110
|
+
const context = flags.context ? getContext(flags.context) : getCurrentContext();
|
|
111
|
+
if (!context)
|
|
112
|
+
this.error('No context configured. Run: aderis auth login --new');
|
|
113
|
+
if (!context.tokens)
|
|
114
|
+
this.error('Not logged in. Run: aderis auth login');
|
|
109
115
|
const queryParams = {};
|
|
110
116
|
if (flags.page)
|
|
111
117
|
queryParams.page = flags.page;
|
|
@@ -165,7 +171,9 @@ export default class Webhooks extends Command {
|
|
|
165
171
|
data = form;
|
|
166
172
|
}
|
|
167
173
|
else if (endpoint.hasBody) {
|
|
168
|
-
|
|
174
|
+
// For binary-response endpoints, --file is the output path, not a JSON
|
|
175
|
+
// input file — skip the read-as-body branch.
|
|
176
|
+
if (flags.file && !endpoint.isBinaryResponse) {
|
|
169
177
|
const fsModule = await import('node:fs');
|
|
170
178
|
try {
|
|
171
179
|
data = JSON.parse(fsModule.readFileSync(flags.file, 'utf-8'));
|
|
@@ -688,7 +696,7 @@ export default class Webhooks extends Command {
|
|
|
688
696
|
}
|
|
689
697
|
async runNestedImport(suffix, parentId, flags) {
|
|
690
698
|
if (!parentId) {
|
|
691
|
-
this.error(`Missing required argument: id. Usage: aderis
|
|
699
|
+
this.error(`Missing required argument: id. Usage: aderis vat-declaration import-${suffix} <parent-id> --file data.json`);
|
|
692
700
|
}
|
|
693
701
|
const context = flags.context ? getContext(flags.context) : getCurrentContext();
|
|
694
702
|
if (!context)
|
|
@@ -114,11 +114,6 @@ export default class VendorInvoices extends Command {
|
|
|
114
114
|
const endpoint = ENDPOINTS[args.action];
|
|
115
115
|
if (!endpoint)
|
|
116
116
|
this.error(`Unknown action: ${args.action}. Available: ${SUBCOMMANDS.join(', ')}`);
|
|
117
|
-
const context = flags.context ? getContext(flags.context) : getCurrentContext();
|
|
118
|
-
if (!context)
|
|
119
|
-
this.error('No context configured. Run: aderis auth login --new');
|
|
120
|
-
if (!context.tokens)
|
|
121
|
-
this.error('Not logged in. Run: aderis auth login');
|
|
122
117
|
let apiPath = endpoint.path;
|
|
123
118
|
for (let i = 0; i < endpoint.pathParams.length; i++) {
|
|
124
119
|
const param = endpoint.pathParams[i];
|
|
@@ -137,6 +132,11 @@ export default class VendorInvoices extends Command {
|
|
|
137
132
|
}
|
|
138
133
|
apiPath = apiPath.replace(`{${param}}`, String(value));
|
|
139
134
|
}
|
|
135
|
+
const context = flags.context ? getContext(flags.context) : getCurrentContext();
|
|
136
|
+
if (!context)
|
|
137
|
+
this.error('No context configured. Run: aderis auth login --new');
|
|
138
|
+
if (!context.tokens)
|
|
139
|
+
this.error('Not logged in. Run: aderis auth login');
|
|
140
140
|
const queryParams = {};
|
|
141
141
|
if (flags.page)
|
|
142
142
|
queryParams.page = flags.page;
|
|
@@ -83,11 +83,6 @@ export default class Webhooks extends Command {
|
|
|
83
83
|
const endpoint = ENDPOINTS[args.action];
|
|
84
84
|
if (!endpoint)
|
|
85
85
|
this.error(`Unknown action: ${args.action}. Available: ${SUBCOMMANDS.join(', ')}`);
|
|
86
|
-
const context = flags.context ? getContext(flags.context) : getCurrentContext();
|
|
87
|
-
if (!context)
|
|
88
|
-
this.error('No context configured. Run: aderis auth login --new');
|
|
89
|
-
if (!context.tokens)
|
|
90
|
-
this.error('Not logged in. Run: aderis auth login');
|
|
91
86
|
let apiPath = endpoint.path;
|
|
92
87
|
for (let i = 0; i < endpoint.pathParams.length; i++) {
|
|
93
88
|
const param = endpoint.pathParams[i];
|
|
@@ -106,6 +101,11 @@ export default class Webhooks extends Command {
|
|
|
106
101
|
}
|
|
107
102
|
apiPath = apiPath.replace(`{${param}}`, String(value));
|
|
108
103
|
}
|
|
104
|
+
const context = flags.context ? getContext(flags.context) : getCurrentContext();
|
|
105
|
+
if (!context)
|
|
106
|
+
this.error('No context configured. Run: aderis auth login --new');
|
|
107
|
+
if (!context.tokens)
|
|
108
|
+
this.error('Not logged in. Run: aderis auth login');
|
|
109
109
|
const queryParams = {};
|
|
110
110
|
if (flags.page)
|
|
111
111
|
queryParams.page = flags.page;
|
|
@@ -75,11 +75,6 @@ export default class Workflows extends Command {
|
|
|
75
75
|
const endpoint = ENDPOINTS[args.action];
|
|
76
76
|
if (!endpoint)
|
|
77
77
|
this.error(`Unknown action: ${args.action}. Available: ${SUBCOMMANDS.join(', ')}`);
|
|
78
|
-
const context = flags.context ? getContext(flags.context) : getCurrentContext();
|
|
79
|
-
if (!context)
|
|
80
|
-
this.error('No context configured. Run: aderis auth login --new');
|
|
81
|
-
if (!context.tokens)
|
|
82
|
-
this.error('Not logged in. Run: aderis auth login');
|
|
83
78
|
let apiPath = endpoint.path;
|
|
84
79
|
for (let i = 0; i < endpoint.pathParams.length; i++) {
|
|
85
80
|
const param = endpoint.pathParams[i];
|
|
@@ -98,6 +93,11 @@ export default class Workflows extends Command {
|
|
|
98
93
|
}
|
|
99
94
|
apiPath = apiPath.replace(`{${param}}`, String(value));
|
|
100
95
|
}
|
|
96
|
+
const context = flags.context ? getContext(flags.context) : getCurrentContext();
|
|
97
|
+
if (!context)
|
|
98
|
+
this.error('No context configured. Run: aderis auth login --new');
|
|
99
|
+
if (!context.tokens)
|
|
100
|
+
this.error('Not logged in. Run: aderis auth login');
|
|
101
101
|
const queryParams = {};
|
|
102
102
|
if (flags.page)
|
|
103
103
|
queryParams.page = flags.page;
|
package/dist/lib/api-client.d.ts
CHANGED
|
@@ -25,10 +25,10 @@ export declare class ApiError extends Error {
|
|
|
25
25
|
data?: unknown | undefined;
|
|
26
26
|
constructor(message: string, status: number, data?: unknown | undefined);
|
|
27
27
|
}
|
|
28
|
-
export declare function createApiClient(contextName?: string, options?: {
|
|
28
|
+
export declare function createApiClient(contextName?: string, options?: boolean | {
|
|
29
29
|
acceptAny?: boolean;
|
|
30
30
|
binary?: boolean;
|
|
31
|
-
}
|
|
31
|
+
}): Promise<AxiosInstance>;
|
|
32
32
|
export declare function apiRequest<T = unknown>(method: string, path: string, options?: {
|
|
33
33
|
acceptAny?: boolean;
|
|
34
34
|
binary?: boolean;
|
|
@@ -36,6 +36,7 @@ export declare function apiRequest<T = unknown>(method: string, path: string, op
|
|
|
36
36
|
contextName?: string;
|
|
37
37
|
data?: unknown;
|
|
38
38
|
params?: Record<string, unknown>;
|
|
39
|
+
responseType?: 'arraybuffer' | 'json' | 'stream' | 'text';
|
|
39
40
|
}): Promise<ApiResponse<T>>;
|
|
40
41
|
export declare function apiGet<T = unknown>(path: string, params?: Record<string, unknown>, contextName?: string): Promise<ApiResponse<T>>;
|
|
41
42
|
export declare function apiPost<T = unknown>(path: string, data?: unknown, contextName?: string): Promise<ApiResponse<T>>;
|
package/dist/lib/api-client.js
CHANGED
|
@@ -109,6 +109,10 @@ export async function apiRequest(method, path, options = {}) {
|
|
|
109
109
|
if (options.contentType) {
|
|
110
110
|
config.headers = { ...config.headers, 'Content-Type': options.contentType };
|
|
111
111
|
}
|
|
112
|
+
// Override responseType if specified (takes precedence over client-level default)
|
|
113
|
+
if (options.responseType) {
|
|
114
|
+
config.responseType = options.responseType;
|
|
115
|
+
}
|
|
112
116
|
const response = await client.request(config);
|
|
113
117
|
return {
|
|
114
118
|
data: response.data,
|
package/dist/lib/auth.js
CHANGED
|
@@ -160,6 +160,7 @@ export async function login(context, options = {}) {
|
|
|
160
160
|
const authorizationUrl = buildAuthorizeUrl(context, pkce, state, options);
|
|
161
161
|
return new Promise((resolve, reject) => {
|
|
162
162
|
const connections = new Set();
|
|
163
|
+
// eslint-disable-next-line prefer-const -- assigned after server creation; closure captures the reference safely
|
|
163
164
|
let timeoutId;
|
|
164
165
|
const server = http.createServer(async (req, res) => {
|
|
165
166
|
const url = new URL(req.url || '', `http://localhost:${CALLBACK_PORT}`);
|