@platfformx/proto-contracts 1.0.10 → 1.0.11
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/gen/ts/auth-service/account.d.ts +93 -0
- package/dist/gen/ts/auth-service/auth.d.ts +77 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -27
- package/dist/paths/proto-paths.d.ts +4 -0
- package/package.json +13 -1
- package/.github/workflows/publish.npm.yml +0 -34
- package/eslint.config.mjs +0 -35
- package/index.ts +0 -4
- package/src/paths/proto-paths.ts +0 -6
- package/tsconfig.json +0 -14
- /package/{src/paths/index.ts → dist/paths/index.d.ts} +0 -0
- /package/dist/{src/paths → paths}/index.js +0 -0
- /package/dist/{src/paths → paths}/proto-paths.js +0 -0
- /package/{src/registry/grpc.registry.ts → dist/registry/grpc.registry.d.ts} +0 -0
- /package/dist/{src/registry → registry}/grpc.registry.js +0 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
export declare const protobufPackage = "auth_service.v1";
|
|
3
|
+
export interface GetAccountRequest {
|
|
4
|
+
userId: string;
|
|
5
|
+
}
|
|
6
|
+
export interface GetAccountResponse {
|
|
7
|
+
userId: string;
|
|
8
|
+
email?: string | undefined;
|
|
9
|
+
phone?: string | undefined;
|
|
10
|
+
username?: string | undefined;
|
|
11
|
+
isPhoneVerified: boolean;
|
|
12
|
+
isEmailVerified: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface InitEmailChangeRequest {
|
|
15
|
+
userId: string;
|
|
16
|
+
email: string;
|
|
17
|
+
}
|
|
18
|
+
export interface InitEmailChangeResponse {
|
|
19
|
+
verificationId: string;
|
|
20
|
+
}
|
|
21
|
+
export interface InitPhoneChangeRequest {
|
|
22
|
+
userId: string;
|
|
23
|
+
phone: string;
|
|
24
|
+
}
|
|
25
|
+
export interface InitPhoneChangeResponse {
|
|
26
|
+
verificationId: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ConfirmEmailChangeRequest {
|
|
29
|
+
userId: string;
|
|
30
|
+
email: string;
|
|
31
|
+
verificationId: string;
|
|
32
|
+
code: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ConfirmEmailChangeResponse {
|
|
35
|
+
}
|
|
36
|
+
export interface ConfirmPhoneChangeRequest {
|
|
37
|
+
userId: string;
|
|
38
|
+
phone: string;
|
|
39
|
+
verificationId: string;
|
|
40
|
+
code: string;
|
|
41
|
+
}
|
|
42
|
+
export interface ConfirmPhoneChangeResponse {
|
|
43
|
+
}
|
|
44
|
+
export interface PatchAccountRequest {
|
|
45
|
+
userId: string;
|
|
46
|
+
username?: string | undefined;
|
|
47
|
+
displayName?: string | undefined;
|
|
48
|
+
email?: string | undefined;
|
|
49
|
+
phone?: string | undefined;
|
|
50
|
+
}
|
|
51
|
+
export interface PatchAccountResponse {
|
|
52
|
+
userId: string;
|
|
53
|
+
username?: string | undefined;
|
|
54
|
+
displayName?: string | undefined;
|
|
55
|
+
phone?: string | undefined;
|
|
56
|
+
email?: string | undefined;
|
|
57
|
+
isPhoneVerified: boolean;
|
|
58
|
+
isEmailVerified: boolean;
|
|
59
|
+
}
|
|
60
|
+
export interface ChangePasswordRequest {
|
|
61
|
+
userId: string;
|
|
62
|
+
oldPassword: string;
|
|
63
|
+
newPasword: string;
|
|
64
|
+
}
|
|
65
|
+
export interface ChangePasswordResponse {
|
|
66
|
+
}
|
|
67
|
+
export interface LinkOAuthRequest {
|
|
68
|
+
userId: string;
|
|
69
|
+
oauthToken: string;
|
|
70
|
+
}
|
|
71
|
+
export interface LinkOAuthResponse {
|
|
72
|
+
}
|
|
73
|
+
export declare const AUTH_SERVICE_V1_PACKAGE_NAME = "auth_service.v1";
|
|
74
|
+
export interface AccountServiceClient {
|
|
75
|
+
getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
|
|
76
|
+
patchAccount(request: PatchAccountRequest): Observable<PatchAccountResponse>;
|
|
77
|
+
initEmailChange(request: InitEmailChangeRequest): Observable<InitEmailChangeResponse>;
|
|
78
|
+
initPhoneChange(request: InitPhoneChangeRequest): Observable<InitPhoneChangeResponse>;
|
|
79
|
+
confirmEmailChange(request: ConfirmEmailChangeRequest): Observable<ConfirmEmailChangeResponse>;
|
|
80
|
+
confirmPhoneChange(request: ConfirmPhoneChangeRequest): Observable<ConfirmPhoneChangeResponse>;
|
|
81
|
+
linkOAuth(request: LinkOAuthRequest): Observable<LinkOAuthResponse>;
|
|
82
|
+
}
|
|
83
|
+
export interface AccountServiceController {
|
|
84
|
+
getAccount(request: GetAccountRequest): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
|
|
85
|
+
patchAccount(request: PatchAccountRequest): Promise<PatchAccountResponse> | Observable<PatchAccountResponse> | PatchAccountResponse;
|
|
86
|
+
initEmailChange(request: InitEmailChangeRequest): Promise<InitEmailChangeResponse> | Observable<InitEmailChangeResponse> | InitEmailChangeResponse;
|
|
87
|
+
initPhoneChange(request: InitPhoneChangeRequest): Promise<InitPhoneChangeResponse> | Observable<InitPhoneChangeResponse> | InitPhoneChangeResponse;
|
|
88
|
+
confirmEmailChange(request: ConfirmEmailChangeRequest): Promise<ConfirmEmailChangeResponse> | Observable<ConfirmEmailChangeResponse> | ConfirmEmailChangeResponse;
|
|
89
|
+
confirmPhoneChange(request: ConfirmPhoneChangeRequest): Promise<ConfirmPhoneChangeResponse> | Observable<ConfirmPhoneChangeResponse> | ConfirmPhoneChangeResponse;
|
|
90
|
+
linkOAuth(request: LinkOAuthRequest): Promise<LinkOAuthResponse> | Observable<LinkOAuthResponse> | LinkOAuthResponse;
|
|
91
|
+
}
|
|
92
|
+
export declare function AccountServiceControllerMethods(): (constructor: Function) => void;
|
|
93
|
+
export declare const ACCOUNT_SERVICE_NAME = "AccountService";
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
export declare const protobufPackage = "auth_service.v1";
|
|
3
|
+
/** Shared */
|
|
4
|
+
export declare enum OAuthProvider {
|
|
5
|
+
OAUTH_PROVIDER_UNSPECIFIED = 0,
|
|
6
|
+
OAUTH_PROVIDER_GOOGLE = 1,
|
|
7
|
+
OAUTH_PROVIDER_GITHUB = 2,
|
|
8
|
+
OAUTH_PROVIDER_TELEGRAM = 3,
|
|
9
|
+
UNRECOGNIZED = -1
|
|
10
|
+
}
|
|
11
|
+
/** Create account */
|
|
12
|
+
export interface CreateAccountRequest {
|
|
13
|
+
credentials: UserCredentials | undefined;
|
|
14
|
+
}
|
|
15
|
+
export interface CreateAccountResponse {
|
|
16
|
+
userId: string;
|
|
17
|
+
accessToken: string;
|
|
18
|
+
refreshToken: string;
|
|
19
|
+
user: UserProfile | undefined;
|
|
20
|
+
}
|
|
21
|
+
/** Authenticate credentials */
|
|
22
|
+
export interface AuthenticationRequest {
|
|
23
|
+
credentials: UserCredentials | undefined;
|
|
24
|
+
}
|
|
25
|
+
export interface AuthenticationResponse {
|
|
26
|
+
userId: string;
|
|
27
|
+
accessToken: string;
|
|
28
|
+
refreshToken: string;
|
|
29
|
+
user: UserProfile | undefined;
|
|
30
|
+
}
|
|
31
|
+
/** AuthenticateWithOAuth */
|
|
32
|
+
export interface OAuthSessionRequest {
|
|
33
|
+
provider: OAuthProvider;
|
|
34
|
+
token: string;
|
|
35
|
+
}
|
|
36
|
+
export interface OAuthSessionResponse {
|
|
37
|
+
userId: string;
|
|
38
|
+
accessToken: string;
|
|
39
|
+
refreshToken: string;
|
|
40
|
+
user: UserProfile | undefined;
|
|
41
|
+
isNewUser: boolean;
|
|
42
|
+
}
|
|
43
|
+
/** Tokens */
|
|
44
|
+
export interface TokenRefreshRequest {
|
|
45
|
+
refreshToken: string;
|
|
46
|
+
}
|
|
47
|
+
export interface TokenRefreshResponse {
|
|
48
|
+
accessToken: string;
|
|
49
|
+
refreshToken: string;
|
|
50
|
+
}
|
|
51
|
+
export interface UserCredentials {
|
|
52
|
+
email?: string | undefined;
|
|
53
|
+
phone?: string | undefined;
|
|
54
|
+
username?: string | undefined;
|
|
55
|
+
password: string;
|
|
56
|
+
}
|
|
57
|
+
export interface UserProfile {
|
|
58
|
+
email?: string | undefined;
|
|
59
|
+
phone?: string | undefined;
|
|
60
|
+
username?: string | undefined;
|
|
61
|
+
displayName?: string | undefined;
|
|
62
|
+
}
|
|
63
|
+
export declare const AUTH_SERVICE_V1_PACKAGE_NAME = "auth_service.v1";
|
|
64
|
+
export interface AuthServiceClient {
|
|
65
|
+
createAccount(request: CreateAccountRequest): Observable<CreateAccountResponse>;
|
|
66
|
+
authenticate(request: AuthenticationRequest): Observable<AuthenticationResponse>;
|
|
67
|
+
authenticateWithOAuth(request: OAuthSessionRequest): Observable<OAuthSessionResponse>;
|
|
68
|
+
refreshTokens(request: TokenRefreshRequest): Observable<TokenRefreshResponse>;
|
|
69
|
+
}
|
|
70
|
+
export interface AuthServiceController {
|
|
71
|
+
createAccount(request: CreateAccountRequest): Promise<CreateAccountResponse> | Observable<CreateAccountResponse> | CreateAccountResponse;
|
|
72
|
+
authenticate(request: AuthenticationRequest): Promise<AuthenticationResponse> | Observable<AuthenticationResponse> | AuthenticationResponse;
|
|
73
|
+
authenticateWithOAuth(request: OAuthSessionRequest): Promise<OAuthSessionResponse> | Observable<OAuthSessionResponse> | OAuthSessionResponse;
|
|
74
|
+
refreshTokens(request: TokenRefreshRequest): Promise<TokenRefreshResponse> | Observable<TokenRefreshResponse> | TokenRefreshResponse;
|
|
75
|
+
}
|
|
76
|
+
export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
|
|
77
|
+
export declare const AUTH_SERVICE_NAME = "AuthService";
|
package/dist/index.d.ts
ADDED
package/dist/index.js
CHANGED
|
@@ -10,34 +10,9 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
15
|
};
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
|
|
40
|
-
__exportStar(require("./
|
|
41
|
-
__exportStar(require("./src/paths/proto-paths"), exports);
|
|
42
|
-
exports.Auth = __importStar(require("./gen/ts/auth-service/auth"));
|
|
43
|
-
exports.Account = __importStar(require("./gen/ts/auth-service/account"));
|
|
17
|
+
__exportStar(require("./paths/index"), exports);
|
|
18
|
+
__exportStar(require("./paths/proto-paths"), exports);
|
package/package.json
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platfformx/proto-contracts",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"proto",
|
|
10
|
+
"gen"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
7
19
|
"publishConfig": {
|
|
8
20
|
"access": "public"
|
|
9
21
|
},
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
name: Publish Build
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
build:
|
|
10
|
-
name: Build job
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
|
|
13
|
-
steps:
|
|
14
|
-
- name: Checkout repository
|
|
15
|
-
uses: actions/checkout@v4
|
|
16
|
-
|
|
17
|
-
- name: Setup Node.js
|
|
18
|
-
uses: actions/setup-node@v4
|
|
19
|
-
with:
|
|
20
|
-
node-version: 20
|
|
21
|
-
|
|
22
|
-
- name: Install protoc
|
|
23
|
-
run: |
|
|
24
|
-
sudo apt-get update
|
|
25
|
-
sudo apt-get install -y protobuf-compiler
|
|
26
|
-
|
|
27
|
-
- name: Install dependencies
|
|
28
|
-
run: yarn install --frozen-lockfile
|
|
29
|
-
|
|
30
|
-
- name: Generate Ts protobuf
|
|
31
|
-
run: yarn run generate
|
|
32
|
-
|
|
33
|
-
- name: Build
|
|
34
|
-
run: yarn run build
|
package/eslint.config.mjs
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
import eslint from '@eslint/js';
|
|
3
|
-
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
4
|
-
import globals from 'globals';
|
|
5
|
-
import tseslint from 'typescript-eslint';
|
|
6
|
-
|
|
7
|
-
export default tseslint.config(
|
|
8
|
-
{
|
|
9
|
-
ignores: ['eslint.config.mjs', 'dist/**'],
|
|
10
|
-
},
|
|
11
|
-
eslint.configs.recommended,
|
|
12
|
-
...tseslint.configs.recommendedTypeChecked,
|
|
13
|
-
eslintPluginPrettierRecommended,
|
|
14
|
-
{
|
|
15
|
-
languageOptions: {
|
|
16
|
-
globals: {
|
|
17
|
-
...globals.node,
|
|
18
|
-
...globals.jest,
|
|
19
|
-
},
|
|
20
|
-
sourceType: 'commonjs',
|
|
21
|
-
parserOptions: {
|
|
22
|
-
projectService: true,
|
|
23
|
-
tsconfigRootDir: import.meta.dirname,
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
rules: {
|
|
29
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
30
|
-
'@typescript-eslint/no-floating-promises': 'warn',
|
|
31
|
-
'@typescript-eslint/no-unsafe-argument': 'warn',
|
|
32
|
-
'prettier/prettier': ['error', { endOfLine: 'auto' }],
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
);
|
package/index.ts
DELETED
package/src/paths/proto-paths.ts
DELETED
package/tsconfig.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "commonjs",
|
|
4
|
-
"target": "es2024",
|
|
5
|
-
"outDir": "./dist",
|
|
6
|
-
"strict": true,
|
|
7
|
-
"esModuleInterop": true,
|
|
8
|
-
"skipLibCheck": true,
|
|
9
|
-
"forceConsistentCasingInFileNames": true,
|
|
10
|
-
"strictNullChecks": false,
|
|
11
|
-
"types": ["node"]
|
|
12
|
-
},
|
|
13
|
-
"include": ["src/**/*", "gen/**/*", "index.ts"]
|
|
14
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|