rutter-ts 0.3.4 → 0.3.5

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/api.cjs CHANGED
@@ -61,7 +61,11 @@ var RutterConnectionsApi = class {
61
61
  }
62
62
  async exchangeToken(params) {
63
63
  const endpoint = "/item/public_token/exchange";
64
- const response = await this.client.post(endpoint, params);
64
+ const response = await this.client.post(endpoint, {
65
+ ...params,
66
+ client_id: this.client.clientId,
67
+ secret: this.client.clientSecret
68
+ });
65
69
  const result = chunkJCJXW7AE_cjs.zExchangeTokenResponse.safeParse(response);
66
70
  if (!result.success) {
67
71
  throw new chunkLPP3MIOV_cjs.RutterSchemaMismatchError(
package/dist/api.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import z__default from 'zod';
2
- import { b as RutterClient, c as RutterPaginationParams, d as RutterQueryParams } from './client-sPbSz2i_.cjs';
2
+ import { b as RutterClient, c as RutterPaginationParams, d as RutterQueryParams } from './client-DPjGawJr.cjs';
3
3
  import { zConnectionResponse, zListConnectionsResponse, zExchangeTokenResponse, zDeleteConnectionResponse, zCompanyInfo20240430ResponseWithConnection, zListAccountResponseWithConnection, zAccountResponseWithConnection, zListInvoiceResponseWithConnection, zInvoiceResponseWithConnection, CreateInvoice, zCreateInvoiceResponse, CreateAccountingCustomer, zCreateAccountingCustomerResponse } from './generated.cjs';
4
4
 
5
5
  declare const zGetAccessTokenConnectionResponse: z__default.ZodObject<{
package/dist/api.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import z__default from 'zod';
2
- import { b as RutterClient, c as RutterPaginationParams, d as RutterQueryParams } from './client-sPbSz2i_.js';
2
+ import { b as RutterClient, c as RutterPaginationParams, d as RutterQueryParams } from './client-DPjGawJr.js';
3
3
  import { zConnectionResponse, zListConnectionsResponse, zExchangeTokenResponse, zDeleteConnectionResponse, zCompanyInfo20240430ResponseWithConnection, zListAccountResponseWithConnection, zAccountResponseWithConnection, zListInvoiceResponseWithConnection, zInvoiceResponseWithConnection, CreateInvoice, zCreateInvoiceResponse, CreateAccountingCustomer, zCreateAccountingCustomerResponse } from './generated.js';
4
4
 
5
5
  declare const zGetAccessTokenConnectionResponse: z__default.ZodObject<{
package/dist/api.js CHANGED
@@ -55,7 +55,11 @@ var RutterConnectionsApi = class {
55
55
  }
56
56
  async exchangeToken(params) {
57
57
  const endpoint = "/item/public_token/exchange";
58
- const response = await this.client.post(endpoint, params);
58
+ const response = await this.client.post(endpoint, {
59
+ ...params,
60
+ client_id: this.client.clientId,
61
+ secret: this.client.clientSecret
62
+ });
59
63
  const result = zExchangeTokenResponse.safeParse(response);
60
64
  if (!result.success) {
61
65
  throw new RutterSchemaMismatchError(
@@ -19,8 +19,8 @@ interface RutterRequestOptions {
19
19
 
20
20
  declare class RutterClient {
21
21
  readonly baseUrl: string;
22
- private readonly clientId;
23
- private readonly clientSecret;
22
+ readonly clientId: string;
23
+ readonly clientSecret: string;
24
24
  constructor(baseUrl: string, clientId: string, clientSecret: string);
25
25
  private get authHeader();
26
26
  private request;
@@ -19,8 +19,8 @@ interface RutterRequestOptions {
19
19
 
20
20
  declare class RutterClient {
21
21
  readonly baseUrl: string;
22
- private readonly clientId;
23
- private readonly clientSecret;
22
+ readonly clientId: string;
23
+ readonly clientSecret: string;
24
24
  constructor(baseUrl: string, clientId: string, clientSecret: string);
25
25
  private get authHeader();
26
26
  private request;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RutterErrorMetadata, a as RutterErrorBody } from './client-sPbSz2i_.cjs';
2
- export { b as RutterClient, c as RutterPaginationParams, d as RutterQueryParams, e as RutterRequestOptions } from './client-sPbSz2i_.cjs';
1
+ import { R as RutterErrorMetadata, a as RutterErrorBody } from './client-DPjGawJr.cjs';
2
+ export { b as RutterClient, c as RutterPaginationParams, d as RutterQueryParams, e as RutterRequestOptions } from './client-DPjGawJr.cjs';
3
3
 
4
4
  declare class RutterError extends Error {
5
5
  readonly status: number;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RutterErrorMetadata, a as RutterErrorBody } from './client-sPbSz2i_.js';
2
- export { b as RutterClient, c as RutterPaginationParams, d as RutterQueryParams, e as RutterRequestOptions } from './client-sPbSz2i_.js';
1
+ import { R as RutterErrorMetadata, a as RutterErrorBody } from './client-DPjGawJr.js';
2
+ export { b as RutterClient, c as RutterPaginationParams, d as RutterQueryParams, e as RutterRequestOptions } from './client-DPjGawJr.js';
3
3
 
4
4
  declare class RutterError extends Error {
5
5
  readonly status: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rutter-ts",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "TypeScript SDK for the Rutter API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",