@riocrypto/common 1.0.427 → 1.0.429
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/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/build/models/business-user.d.ts +2 -0
- package/build/models/business-user.js +3 -0
- package/build/services/s3.d.ts +5 -0
- package/build/services/s3.js +21 -0
- package/build/types/authorization-type.d.ts +1 -0
- package/build/types/authorization-type.js +1 -0
- package/build/types/business-user-input.d.ts +1 -0
- package/build/types/business-user-update.d.ts +1 -0
- package/build/types/business-user.d.ts +1 -0
- package/build/types/user.d.ts +1 -0
- package/package.json +2 -1
package/build/index.d.ts
CHANGED
|
@@ -146,6 +146,7 @@ export * from "./classes/USStateAsset";
|
|
|
146
146
|
export * from "./classes/WyrePaymentMethodAsset";
|
|
147
147
|
export * from "./services/apiKey";
|
|
148
148
|
export * from "./services/password";
|
|
149
|
+
export * from "./services/s3";
|
|
149
150
|
export * from "./models/admin-auth";
|
|
150
151
|
export * from "./models/auth";
|
|
151
152
|
export * from "./models/business-user";
|
package/build/index.js
CHANGED
|
@@ -163,6 +163,7 @@ __exportStar(require("./classes/USStateAsset"), exports);
|
|
|
163
163
|
__exportStar(require("./classes/WyrePaymentMethodAsset"), exports);
|
|
164
164
|
__exportStar(require("./services/apiKey"), exports);
|
|
165
165
|
__exportStar(require("./services/password"), exports);
|
|
166
|
+
__exportStar(require("./services/s3"), exports);
|
|
166
167
|
__exportStar(require("./models/admin-auth"), exports);
|
|
167
168
|
__exportStar(require("./models/auth"), exports);
|
|
168
169
|
__exportStar(require("./models/business-user"), exports);
|
|
@@ -7,6 +7,7 @@ import { UserAttribute } from "../types/user-attribute";
|
|
|
7
7
|
import { UserType } from "../types/user-type";
|
|
8
8
|
import { Mongoose, Model, Document } from "mongoose";
|
|
9
9
|
interface BusinessUserAttrs {
|
|
10
|
+
authId?: string;
|
|
10
11
|
type: UserType;
|
|
11
12
|
companyName: string;
|
|
12
13
|
legalRepresentative: string;
|
|
@@ -31,6 +32,7 @@ interface BusinessUserModel extends Model<BusinessUserDoc> {
|
|
|
31
32
|
build(attrs: BusinessUserAttrs): BusinessUserDoc;
|
|
32
33
|
}
|
|
33
34
|
interface BusinessUserDoc extends Document {
|
|
35
|
+
authId?: string;
|
|
34
36
|
type: UserType;
|
|
35
37
|
companyName: string;
|
|
36
38
|
legalRepresentative: string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.s3 = void 0;
|
|
4
|
+
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
5
|
+
class s3 {
|
|
6
|
+
constructor() {
|
|
7
|
+
this._client = new client_s3_1.S3Client({
|
|
8
|
+
endpoint: process.env.S3_ENDPOINT,
|
|
9
|
+
forcePathStyle: false,
|
|
10
|
+
region: process.env.S3_REGION,
|
|
11
|
+
credentials: {
|
|
12
|
+
accessKeyId: process.env.S3_ACCESS_KEY,
|
|
13
|
+
secretAccessKey: process.env.S3_SECRET_KEY, // Secret access key defined through an environment variable.
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
get client() {
|
|
18
|
+
return this._client;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.s3 = s3;
|
|
@@ -5,6 +5,7 @@ var AuthorizationType;
|
|
|
5
5
|
(function (AuthorizationType) {
|
|
6
6
|
AuthorizationType["UserNoKYC"] = "newUserNoKYC";
|
|
7
7
|
AuthorizationType["User"] = "user";
|
|
8
|
+
AuthorizationType["Broker"] = "broker";
|
|
8
9
|
AuthorizationType["Admin"] = "admin";
|
|
9
10
|
AuthorizationType["Partner"] = "partner";
|
|
10
11
|
AuthorizationType["Auth"] = "auth";
|
|
@@ -5,6 +5,7 @@ import { PlatformFeeRange } from "./platform-fee-range";
|
|
|
5
5
|
import { USState } from "./us-state";
|
|
6
6
|
import { UserAttribute } from "./user-attribute";
|
|
7
7
|
export interface BusinessUserInput {
|
|
8
|
+
authId?: string;
|
|
8
9
|
companyName: string;
|
|
9
10
|
legalRepresentative: string;
|
|
10
11
|
phoneNumber?: string;
|
|
@@ -4,6 +4,7 @@ import { Language } from "./language";
|
|
|
4
4
|
import { PlatformFeeRange } from "./platform-fee-range";
|
|
5
5
|
import { UserAttribute } from "./user-attribute";
|
|
6
6
|
export interface BusinessUserUpdate {
|
|
7
|
+
authId?: string;
|
|
7
8
|
companyName?: string;
|
|
8
9
|
legalRepresentative?: string;
|
|
9
10
|
phoneNumber?: string;
|
package/build/types/user.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.429",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"typescript": "^4.7.4"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
+
"@aws-sdk/client-s3": "^3.297.0",
|
|
23
24
|
"@types/express": "^4.17.13",
|
|
24
25
|
"axios": "^0.27.2",
|
|
25
26
|
"express": "^4.18.1",
|