rutter-ts 0.3.0 → 0.3.2

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
@@ -12,9 +12,12 @@ var RutterConnectionsApi = class {
12
12
  constructor(client) {
13
13
  this.client = client;
14
14
  }
15
- async create(params) {
16
- const endpoint = "/connections";
17
- const response = await this.client.post(endpoint, params);
15
+ async create(params = {}) {
16
+ const endpoint = "/connections/create";
17
+ const response = await this.client.post(
18
+ endpoint,
19
+ Object.keys(params).length > 0 ? params : void 0
20
+ );
18
21
  const result = chunkJCJXW7AE_cjs.zConnectionResponse.safeParse(response);
19
22
  if (!result.success) {
20
23
  throw new chunkLPP3MIOV_cjs.RutterSchemaMismatchError(
package/dist/api.d.cts CHANGED
@@ -10,8 +10,8 @@ type TGetAccessTokenConnectionResponse = z__default.infer<typeof zGetAccessToken
10
10
  declare class RutterConnectionsApi {
11
11
  private readonly client;
12
12
  constructor(client: RutterClient);
13
- create(params: {
14
- platform: string;
13
+ create(params?: {
14
+ platform?: string;
15
15
  }): Promise<TConnectionResponse>;
16
16
  list(): Promise<TListConnectionsResponse>;
17
17
  get(accessToken: string): Promise<TGetAccessTokenConnectionResponse>;
package/dist/api.d.ts CHANGED
@@ -10,8 +10,8 @@ type TGetAccessTokenConnectionResponse = z__default.infer<typeof zGetAccessToken
10
10
  declare class RutterConnectionsApi {
11
11
  private readonly client;
12
12
  constructor(client: RutterClient);
13
- create(params: {
14
- platform: string;
13
+ create(params?: {
14
+ platform?: string;
15
15
  }): Promise<TConnectionResponse>;
16
16
  list(): Promise<TListConnectionsResponse>;
17
17
  get(accessToken: string): Promise<TGetAccessTokenConnectionResponse>;
package/dist/api.js CHANGED
@@ -6,9 +6,12 @@ var RutterConnectionsApi = class {
6
6
  constructor(client) {
7
7
  this.client = client;
8
8
  }
9
- async create(params) {
10
- const endpoint = "/connections";
11
- const response = await this.client.post(endpoint, params);
9
+ async create(params = {}) {
10
+ const endpoint = "/connections/create";
11
+ const response = await this.client.post(
12
+ endpoint,
13
+ Object.keys(params).length > 0 ? params : void 0
14
+ );
12
15
  const result = zConnectionResponse.safeParse(response);
13
16
  if (!result.success) {
14
17
  throw new RutterSchemaMismatchError(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rutter-ts",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "TypeScript SDK for the Rutter API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",