shred-api-client 1.1.19 → 1.2.0
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/index.d.ts +2 -0
- package/dist/index.js +6 -1
- package/dist/model/Tenant.schema.d.ts +3 -1
- package/dist/model/exceptions/ConflictException.d.ts +4 -0
- package/dist/model/exceptions/ConflictException.js +13 -0
- package/dist/model/exceptions/InvalidArgumentException.d.ts +4 -0
- package/dist/model/exceptions/InvalidArgumentException.js +13 -0
- package/dist/model/exceptions/ResourceNotFoundException.d.ts +4 -0
- package/dist/model/exceptions/ResourceNotFoundException.js +13 -0
- package/dist/model/exceptions/ShredException.d.ts +4 -0
- package/dist/model/exceptions/ShredException.js +10 -0
- package/dist/model/exceptions/index.d.ts +11 -0
- package/dist/model/exceptions/index.js +15 -0
- package/dist/namespace.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -13,10 +13,15 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
13
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
16
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Role = void 0;
|
|
20
|
+
exports.Exceptions = exports.Role = void 0;
|
|
18
21
|
const Api_1 = require("./model/Api");
|
|
19
22
|
const User_schema_1 = require("./model/User.schema");
|
|
20
23
|
Object.defineProperty(exports, "Role", { enumerable: true, get: function () { return User_schema_1.Role; } });
|
|
24
|
+
const exceptions_1 = __importDefault(require("./model/exceptions/"));
|
|
25
|
+
exports.Exceptions = exceptions_1.default;
|
|
21
26
|
exports.default = Api_1.ShredAPI;
|
|
22
27
|
__exportStar(require("./namespace"), exports);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Subscription } from "./Subscription.schema";
|
|
1
2
|
type Preferences = {
|
|
2
3
|
iconUrl: string;
|
|
3
4
|
logoUrl: string;
|
|
@@ -10,9 +11,10 @@ type Tenant = {
|
|
|
10
11
|
isActive: boolean;
|
|
11
12
|
isSubscriptionActive: boolean;
|
|
12
13
|
preferences: Preferences;
|
|
13
|
-
inviteCode
|
|
14
|
+
inviteCode: string;
|
|
14
15
|
totalUsersAllowed: number;
|
|
15
16
|
currentUsersSize?: number;
|
|
16
17
|
allowedProducts?: string[];
|
|
18
|
+
subscription?: Subscription;
|
|
17
19
|
};
|
|
18
20
|
export { Tenant };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const ShredException_1 = __importDefault(require("./ShredException"));
|
|
7
|
+
class ConflictException extends ShredException_1.default {
|
|
8
|
+
constructor(message) {
|
|
9
|
+
super(message, 409);
|
|
10
|
+
this.name = "ConflictException";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.default = ConflictException;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const ShredException_1 = __importDefault(require("./ShredException"));
|
|
7
|
+
class InvalidArgumentException extends ShredException_1.default {
|
|
8
|
+
constructor(message) {
|
|
9
|
+
super(message, 400);
|
|
10
|
+
this.name = "InvalidArgumentException";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.default = InvalidArgumentException;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const ShredException_1 = __importDefault(require("./ShredException"));
|
|
7
|
+
class ResourceNotFoundException extends ShredException_1.default {
|
|
8
|
+
constructor(message) {
|
|
9
|
+
super(message, 404);
|
|
10
|
+
this.name = "ResourceNotFoundException";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.default = ResourceNotFoundException;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class ShredException extends Error {
|
|
4
|
+
constructor(message, status) {
|
|
5
|
+
super(message);
|
|
6
|
+
this.name = "ShredException";
|
|
7
|
+
this.status = status;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.default = ShredException;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import ConflictException from "./ConflictException";
|
|
2
|
+
import InvalidArgumentException from "./InvalidArgumentException";
|
|
3
|
+
import ResourceNotFoundException from "./ResourceNotFoundException";
|
|
4
|
+
import ShredException from "./ShredException";
|
|
5
|
+
declare const _default: {
|
|
6
|
+
ConflictException: typeof ConflictException;
|
|
7
|
+
InvalidArgumentException: typeof InvalidArgumentException;
|
|
8
|
+
ResourceNotFoundException: typeof ResourceNotFoundException;
|
|
9
|
+
ShredException: typeof ShredException;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const ConflictException_1 = __importDefault(require("./ConflictException"));
|
|
7
|
+
const InvalidArgumentException_1 = __importDefault(require("./InvalidArgumentException"));
|
|
8
|
+
const ResourceNotFoundException_1 = __importDefault(require("./ResourceNotFoundException"));
|
|
9
|
+
const ShredException_1 = __importDefault(require("./ShredException"));
|
|
10
|
+
exports.default = {
|
|
11
|
+
ConflictException: ConflictException_1.default,
|
|
12
|
+
InvalidArgumentException: InvalidArgumentException_1.default,
|
|
13
|
+
ResourceNotFoundException: ResourceNotFoundException_1.default,
|
|
14
|
+
ShredException: ShredException_1.default,
|
|
15
|
+
};
|
package/dist/namespace.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Product as TProduct, Subscription as TSubscription } from "./model/Subscription.schema";
|
|
2
2
|
import { User as TUser, Role as TRole } from "./model/User.schema";
|
|
3
|
+
import { Tenant as TTenant } from "./model/Tenant.schema";
|
|
3
4
|
import { Prompt as TPrompt, Script as TScript, Category as TCategory } from "./model/Prompt.schema";
|
|
4
5
|
export declare namespace Permissions {
|
|
5
6
|
type Role = TRole;
|
|
6
7
|
}
|
|
7
8
|
export declare namespace Shred {
|
|
9
|
+
type Tenant = TTenant;
|
|
8
10
|
type Product = TProduct;
|
|
9
11
|
type Subscription = TSubscription;
|
|
10
12
|
type User = TUser;
|