washday-sdk 0.0.5 → 0.0.7

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/index.js CHANGED
@@ -1,13 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const get_1 = require("./customers/get");
4
- function WashdayClient(apiToken) {
4
+ const WashdayClient = function WashdayClient(apiToken) {
5
5
  this.apiToken = apiToken;
6
- WashdayClient.prototype.customers = { apiToken };
7
- }
8
- ;
6
+ };
9
7
  WashdayClient.prototype.customers = {
10
8
  getCustomerById: get_1.getCustomerById,
11
9
  getCustomerHighlightsById: get_1.getCustomerHighlightsById
12
10
  };
11
+ // Set the apiToken on the WashdayClient prototype
12
+ Object.defineProperty(WashdayClient.prototype.customers, 'apiToken', {
13
+ get: function () {
14
+ return this.apiToken;
15
+ },
16
+ enumerable: true,
17
+ configurable: true
18
+ });
13
19
  exports.default = WashdayClient;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/api/index.ts CHANGED
@@ -7,15 +7,22 @@ type WashdayClientConstructor = {
7
7
  };
8
8
  };
9
9
 
10
- function WashdayClient(this: WashdayClientInstance, apiToken: string) {
10
+ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: WashdayClientInstance, apiToken: string) {
11
11
  this.apiToken = apiToken;
12
- WashdayClient.prototype.customers = { apiToken };
13
- };
12
+ } as any;
14
13
 
15
14
  WashdayClient.prototype.customers = {
16
15
  getCustomerById: getCustomerById,
17
16
  getCustomerHighlightsById: getCustomerHighlightsById
18
17
  };
19
18
 
19
+ // Set the apiToken on the WashdayClient prototype
20
+ Object.defineProperty(WashdayClient.prototype.customers, 'apiToken', {
21
+ get: function () {
22
+ return this.apiToken;
23
+ },
24
+ enumerable: true,
25
+ configurable: true
26
+ });
20
27
 
21
28
  export default WashdayClient;