@ouroboros/body 1.0.3 → 1.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouroboros/body",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Classes to communicate with Ouroboros Coding Inc. body services",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
package/src/Service.ts CHANGED
@@ -12,9 +12,7 @@
12
12
  import body from './';
13
13
 
14
14
  // Types
15
- import {
16
- onError, onErrorCode, onRequested, onRequesting, responseStruct
17
- } from './';
15
+ import { onError, onErrorCode, onRequested, onRequesting } from './';
18
16
 
19
17
  /**
20
18
  * Service
package/src/errors.d.ts CHANGED
@@ -11,6 +11,7 @@ export declare const REST_REQUEST_DATA = 100;
11
11
  export declare const REST_CONTENT_TYPE = 101;
12
12
  export declare const REST_AUTHORIZATION = 102;
13
13
  export declare const REST_LIST_TO_LONG = 103;
14
+ export declare const REST_LIST_INVALID_URI = 104;
14
15
  export declare const SERVICE_ACTION = 200;
15
16
  export declare const SERVICE_STATUS = 201;
16
17
  export declare const SERVICE_CONTENT_TYPE = 202;
@@ -31,3 +32,4 @@ export declare const DB_DELETE_FAILED = 1103;
31
32
  export declare const DB_UPDATE_FAILED = 1104;
32
33
  export declare const DB_KEY_BEING_USED = 1105;
33
34
  export declare const DB_ARCHIVED = 1106;
35
+ export declare const DB_REFERENCES = 1107;
package/src/errors.js CHANGED
@@ -12,6 +12,7 @@ export const REST_REQUEST_DATA = 100;
12
12
  export const REST_CONTENT_TYPE = 101;
13
13
  export const REST_AUTHORIZATION = 102;
14
14
  export const REST_LIST_TO_LONG = 103;
15
+ export const REST_LIST_INVALID_URI = 104;
15
16
  // Rest-OC Service related
16
17
  export const SERVICE_ACTION = 200;
17
18
  export const SERVICE_STATUS = 201;
@@ -35,3 +36,4 @@ export const DB_DELETE_FAILED = 1103;
35
36
  export const DB_UPDATE_FAILED = 1104;
36
37
  export const DB_KEY_BEING_USED = 1105;
37
38
  export const DB_ARCHIVED = 1106;
39
+ export const DB_REFERENCES = 1107;
package/src/errors.ts CHANGED
@@ -13,6 +13,7 @@ export const REST_REQUEST_DATA = 100
13
13
  export const REST_CONTENT_TYPE = 101
14
14
  export const REST_AUTHORIZATION = 102
15
15
  export const REST_LIST_TO_LONG = 103
16
+ export const REST_LIST_INVALID_URI = 104
16
17
 
17
18
  // Rest-OC Service related
18
19
  export const SERVICE_ACTION = 200
@@ -38,4 +39,5 @@ export const DB_CREATE_FAILED = 1102
38
39
  export const DB_DELETE_FAILED = 1103
39
40
  export const DB_UPDATE_FAILED = 1104
40
41
  export const DB_KEY_BEING_USED = 1105
41
- export const DB_ARCHIVED = 1106
42
+ export const DB_ARCHIVED = 1106
43
+ export const DB_REFERENCES = 1107
package/src/index.d.ts CHANGED
@@ -60,7 +60,7 @@ export type responseReject = (error: responseErrorStruct) => boolean;
60
60
  * @name Body
61
61
  */
62
62
  declare class Body {
63
- private domain;
63
+ domain: string;
64
64
  private error;
65
65
  private errorCode;
66
66
  private noSession;
package/src/index.ts CHANGED
@@ -77,7 +77,7 @@ const ACTIONS_TO_METHODS = {
77
77
  class Body {
78
78
 
79
79
  // The domain used to make requests to
80
- private domain: string = '';
80
+ public domain: string = '';
81
81
 
82
82
  // The function to call for http and related errors that need to be reported
83
83
  private error: onError | null = null;
@@ -352,9 +352,9 @@ class Body {
352
352
  }
353
353
 
354
354
  /**
355
- * On No Session
355
+ * On Error Code
356
356
  *
357
- * Sets callback for whenever a request gets a REST_AUTHORIZATION error
357
+ * Sets callback for whenever a request gets an error back
358
358
  *
359
359
  * @name onNoSession
360
360
  * @access public