@verdocs/js-sdk 3.10.22 → 3.10.24

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.
@@ -25,10 +25,3 @@ export declare const getOrganization: (endpoint: VerdocsEndpoint, organizationId
25
25
  * Update an organization.
26
26
  */
27
27
  export declare const updateOrganization: (endpoint: VerdocsEndpoint, organizationId: string, params: any) => Promise<IOrganization>;
28
- /**
29
- * Check if an organization name is available. Typically used during the sign-up process. This endpoint is rate-limited
30
- * to prevent abuse. Developers experiencing problems with testing new applications should contact support.
31
- */
32
- export declare const isOrgAvailable: (endpoint: VerdocsEndpoint, name: string) => Promise<{
33
- result: 'TAKEN' | 'AVAILABLE';
34
- }>;
@@ -43,12 +43,3 @@ export var updateOrganization = function (endpoint, organizationId, params) {
43
43
  .patch("/organizations/".concat(organizationId), params)
44
44
  .then(function (r) { return r.data; });
45
45
  };
46
- /**
47
- * Check if an organization name is available. Typically used during the sign-up process. This endpoint is rate-limited
48
- * to prevent abuse. Developers experiencing problems with testing new applications should contact support.
49
- */
50
- export var isOrgAvailable = function (endpoint, name) {
51
- return endpoint.api //
52
- .post('/organizations/check-availability', { name: name }, { baseURL: endpoint.getBaseURLv2() })
53
- .then(function (r) { return r.data; });
54
- };
@@ -4,7 +4,6 @@ export type TEnvironment = 'verdocs' | 'verdocs-stage';
4
4
  export type TSessionChangedListener = (endpoint: VerdocsEndpoint, session: TSession) => void;
5
5
  export interface VerdocsEndpointOptions {
6
6
  baseURL?: string;
7
- baseURLv2?: string;
8
7
  timeout?: number;
9
8
  environment?: TEnvironment;
10
9
  sessionType?: TSessionType;
@@ -35,7 +34,6 @@ export declare class VerdocsEndpoint {
35
34
  private environment;
36
35
  private sessionType;
37
36
  private baseURL;
38
- private baseURLv2;
39
37
  private clientID;
40
38
  private timeout;
41
39
  private token;
@@ -72,11 +70,6 @@ export declare class VerdocsEndpoint {
72
70
  * Get the current base URL. This should rarely be anything other than 'https://api.verdocs.com'.
73
71
  */
74
72
  getBaseURL(): string;
75
- /**
76
- * Get the current base URL for the v2 APIs.
77
- * This should rarely be anything other than 'https://api-v2.verdocs.com'.
78
- */
79
- getBaseURLv2(): string;
80
73
  /**
81
74
  * Get the current client ID, if set.
82
75
  */
@@ -128,17 +121,6 @@ export declare class VerdocsEndpoint {
128
121
  * ```
129
122
  */
130
123
  setBaseURL(url: string): VerdocsEndpoint;
131
- /**
132
- * Set the base URL for API calls. Should be called only upon direction from Verdocs Customer Solutions Engineering.
133
- *
134
- * ```typescript
135
- * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
136
- *
137
- * const endpoint = new VerdocsEndpoint();
138
- * endpoint.setBaseURL('https://api.verdocs.com');
139
- * ```
140
- */
141
- setBaseURLv2(url: string): VerdocsEndpoint;
142
124
  /**
143
125
  * Set the Client ID for Verdocs API calls.
144
126
  *
@@ -31,7 +31,6 @@ var requestLogger = function (r) {
31
31
  * .setTimeout(5000);
32
32
  * ```
33
33
  */
34
- // TODO: Research issue with Beta URL
35
34
  var VerdocsEndpoint = /** @class */ (function () {
36
35
  /**
37
36
  * Create a new VerdocsEndpoint to call Verdocs platform services.
@@ -47,7 +46,6 @@ var VerdocsEndpoint = /** @class */ (function () {
47
46
  this.baseURL = (window.location.origin === 'https://beta.verdocs.com'
48
47
  ? 'https://stage-api.verdocs.com'
49
48
  : 'https://api.verdocs.com');
50
- this.baseURLv2 = 'https://api-v2.verdocs.com';
51
49
  this.clientID = 'not-set';
52
50
  this.timeout = 60000;
53
51
  this.token = null;
@@ -60,13 +58,13 @@ var VerdocsEndpoint = /** @class */ (function () {
60
58
  * with Envelopes.
61
59
  */
62
60
  this.session = null;
63
- this.baseURL = (options === null || options === void 0 ? void 0 : options.baseURL) || 'https://api.verdocs.com';
64
- this.baseURLv2 = (options === null || options === void 0 ? void 0 : options.baseURLv2) || 'https://api-v2.verdocs.com';
65
- this.timeout = (options === null || options === void 0 ? void 0 : options.timeout) || 60000;
66
- this.environment = (options === null || options === void 0 ? void 0 : options.environment) || 'verdocs';
67
- this.sessionType = (options === null || options === void 0 ? void 0 : options.sessionType) || 'user';
68
- this.clientID = (options === null || options === void 0 ? void 0 : options.clientID) || 'not-set';
61
+ this.baseURL = (options === null || options === void 0 ? void 0 : options.baseURL) || this.baseURL;
62
+ this.timeout = (options === null || options === void 0 ? void 0 : options.timeout) || this.timeout;
63
+ this.environment = (options === null || options === void 0 ? void 0 : options.environment) || this.environment;
64
+ this.sessionType = (options === null || options === void 0 ? void 0 : options.sessionType) || this.sessionType;
65
+ this.clientID = (options === null || options === void 0 ? void 0 : options.clientID) || this.clientID;
69
66
  this.api = axios.create({ baseURL: this.baseURL, timeout: this.timeout });
67
+ window.console.log('[JS_SDK] Initializing', this.baseURL, window.location.origin);
70
68
  // We set the default retries to zero because we only actually want this feature on certain calls for now
71
69
  axiosRetry(this.api, {
72
70
  retries: 0,
@@ -104,13 +102,6 @@ var VerdocsEndpoint = /** @class */ (function () {
104
102
  VerdocsEndpoint.prototype.getBaseURL = function () {
105
103
  return this.baseURL;
106
104
  };
107
- /**
108
- * Get the current base URL for the v2 APIs.
109
- * This should rarely be anything other than 'https://api-v2.verdocs.com'.
110
- */
111
- VerdocsEndpoint.prototype.getBaseURLv2 = function () {
112
- return this.baseURLv2;
113
- };
114
105
  /**
115
106
  * Get the current client ID, if set.
116
107
  */
@@ -178,21 +169,6 @@ var VerdocsEndpoint = /** @class */ (function () {
178
169
  this.api.defaults.baseURL = url;
179
170
  return this;
180
171
  };
181
- /**
182
- * Set the base URL for API calls. Should be called only upon direction from Verdocs Customer Solutions Engineering.
183
- *
184
- * ```typescript
185
- * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
186
- *
187
- * const endpoint = new VerdocsEndpoint();
188
- * endpoint.setBaseURL('https://api.verdocs.com');
189
- * ```
190
- */
191
- VerdocsEndpoint.prototype.setBaseURLv2 = function (url) {
192
- this.baseURLv2 = url;
193
- // NOTE: We do not set this on the Axios instance because v1 is still the standard.
194
- return this;
195
- };
196
172
  /**
197
173
  * Set the Client ID for Verdocs API calls.
198
174
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdocs/js-sdk",
3
- "version": "3.10.22",
3
+ "version": "3.10.24",
4
4
  "private": false,
5
5
  "homepage": "https://github.com/Verdocs/js-sdk",
6
6
  "description": "Verdocs JS SDK",