lazo-sdk 0.1.3 → 0.1.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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@ export class LazoClient {
22
22
  * Create a record for the given resource (e.g. "contacts", "deals").
23
23
  */
24
24
  async createRecord(resource, data) {
25
- return this.request(`/api/${resource}`, {
25
+ return this.request(`/api/resources/${resource}`, {
26
26
  method: "POST",
27
27
  body: JSON.stringify(data),
28
28
  });
@@ -48,7 +48,7 @@ export class LazoClient {
48
48
  * Fetch a single record by id.
49
49
  */
50
50
  async getRecord(resource, id) {
51
- return this.request(`/api/${resource}/${encodeURIComponent(id)}`);
51
+ return this.request(`/api/resources/${resource}/${encodeURIComponent(id)}`);
52
52
  }
53
53
  async request(path, init = {}) {
54
54
  const res = await fetch(`${this.baseUrl}${path}`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lazo-sdk",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "TypeScript SDK for the Lazo CRM API",
5
5
  "author": "Juan Daniel <juan.sanchez@stallionstudios.net>",
6
6
  "repository": {
@@ -18,7 +18,8 @@
18
18
  ],
19
19
  "scripts": {
20
20
  "build": "tsc",
21
- "test": "node --import tsx --test test/*.test.ts"
21
+ "test": "node --import tsx --test test/*.test.ts",
22
+ "publish": "npm run build && npm version patch -m \"chore: release v%s [ci bump]\" && git push --follow-tags"
22
23
  },
23
24
  "license": "MIT",
24
25
  "devDependencies": {