@scalekit-sdk/node 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/README.md +11 -0
- package/buf.gen.yaml +2 -1
- package/lib/core.js +1 -1
- package/lib/core.js.map +1 -1
- package/lib/passwordless.d.ts +55 -0
- package/lib/passwordless.js +111 -0
- package/lib/passwordless.js.map +1 -0
- package/lib/pkg/grpc/scalekit/v1/auth/passwordless_connect.d.ts +37 -0
- package/lib/pkg/grpc/scalekit/v1/auth/passwordless_connect.js +45 -0
- package/lib/pkg/grpc/scalekit/v1/auth/passwordless_connect.js.map +1 -0
- package/lib/pkg/grpc/scalekit/v1/auth/passwordless_pb.d.ts +184 -0
- package/lib/pkg/grpc/scalekit/v1/auth/passwordless_pb.js +249 -0
- package/lib/pkg/grpc/scalekit/v1/auth/passwordless_pb.js.map +1 -0
- package/lib/pkg/grpc/scalekit/v1/connections/connections_connect.d.ts +10 -1
- package/lib/pkg/grpc/scalekit/v1/connections/connections_connect.js +9 -0
- package/lib/pkg/grpc/scalekit/v1/connections/connections_connect.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.d.ts +225 -3
- package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.js +228 -1
- package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/directories/directories_connect.d.ts +38 -2
- package/lib/pkg/grpc/scalekit/v1/directories/directories_connect.js +36 -0
- package/lib/pkg/grpc/scalekit/v1/directories/directories_connect.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/directories/directories_pb.d.ts +152 -3
- package/lib/pkg/grpc/scalekit/v1/directories/directories_pb.js +234 -3
- package/lib/pkg/grpc/scalekit/v1/directories/directories_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/domains/domains_connect.d.ts +11 -2
- package/lib/pkg/grpc/scalekit/v1/domains/domains_connect.js +9 -0
- package/lib/pkg/grpc/scalekit/v1/domains/domains_connect.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/domains/domains_pb.d.ts +36 -0
- package/lib/pkg/grpc/scalekit/v1/domains/domains_pb.js +38 -1
- package/lib/pkg/grpc/scalekit/v1/domains/domains_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/options/options_pb.d.ts +6 -2
- package/lib/pkg/grpc/scalekit/v1/options/options_pb.js +7 -2
- package/lib/pkg/grpc/scalekit/v1/options/options_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/organizations/organizations_connect.d.ts +37 -1
- package/lib/pkg/grpc/scalekit/v1/organizations/organizations_connect.js +36 -0
- package/lib/pkg/grpc/scalekit/v1/organizations/organizations_connect.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/organizations/organizations_pb.d.ts +233 -10
- package/lib/pkg/grpc/scalekit/v1/organizations/organizations_pb.js +325 -7
- package/lib/pkg/grpc/scalekit/v1/organizations/organizations_pb.js.map +1 -1
- package/lib/scalekit.d.ts +2 -0
- package/lib/scalekit.js +2 -0
- package/lib/scalekit.js.map +1 -1
- package/package.json +1 -1
- package/src/core.ts +1 -1
- package/src/passwordless.ts +135 -0
- package/src/pkg/grpc/scalekit/v1/auth/passwordless_connect.ts +44 -0
- package/src/pkg/grpc/scalekit/v1/auth/passwordless_pb.ts +330 -0
- package/src/pkg/grpc/scalekit/v1/connections/connections_connect.ts +10 -1
- package/src/pkg/grpc/scalekit/v1/connections/connections_pb.ts +366 -1
- package/src/pkg/grpc/scalekit/v1/directories/directories_connect.ts +38 -2
- package/src/pkg/grpc/scalekit/v1/directories/directories_pb.ts +283 -2
- package/src/pkg/grpc/scalekit/v1/domains/domains_connect.ts +11 -2
- package/src/pkg/grpc/scalekit/v1/domains/domains_pb.ts +56 -0
- package/src/pkg/grpc/scalekit/v1/options/options_pb.ts +8 -2
- package/src/pkg/grpc/scalekit/v1/organizations/organizations_connect.ts +37 -1
- package/src/pkg/grpc/scalekit/v1/organizations/organizations_pb.ts +435 -11
- package/src/scalekit.ts +6 -0
package/README.md
CHANGED
|
@@ -37,6 +37,17 @@ yarn add @scalekit-sdk/node
|
|
|
37
37
|
pnpm add @scalekit-sdk/node
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
#### Minimum Requirements
|
|
41
|
+
|
|
42
|
+
The Scalekit Node.js SDK has been tested with and requires the following:
|
|
43
|
+
|
|
44
|
+
| Component | Version |
|
|
45
|
+
| --------- | -------- |
|
|
46
|
+
| Node.js | 16.0.0+ |
|
|
47
|
+
|
|
48
|
+
> **Note:** While Node.js 16.0.0 is the minimum requirement, we recommend using Node.js versions >=18 LTS for improved performance and long-term support.
|
|
49
|
+
|
|
50
|
+
|
|
40
51
|
## Usage
|
|
41
52
|
|
|
42
53
|
Initialize the Scalekit client using the appropriate credentials. Refer code sample below.
|
package/buf.gen.yaml
CHANGED
package/lib/core.js
CHANGED
|
@@ -57,7 +57,7 @@ class CoreClient {
|
|
|
57
57
|
this.clientSecret = clientSecret;
|
|
58
58
|
this.keys = [];
|
|
59
59
|
this.accessToken = null;
|
|
60
|
-
this.sdkVersion = `Scalekit-Node/1.0.
|
|
60
|
+
this.sdkVersion = `Scalekit-Node/1.0.10`;
|
|
61
61
|
this.apiVersion = "20240430";
|
|
62
62
|
this.userAgent = `${this.sdkVersion} Node/${process.version} (${process.platform}; ${os_1.default.arch()})`;
|
|
63
63
|
this.axios = axios_1.default.create({ baseURL: envUrl });
|
package/lib/core.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAyD;AACzD,+CAAgF;AAEhF,4CAAoB;AACpB,4CAA6B;AAC7B,+CAA6C;AAC7C,mFAA4E;AAG/D,QAAA,OAAO,GAAG;IACrB,YAAY,EAAE,YAAY;IAC1B,eAAe,EAAE,eAAe;IA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CAC9C,IAAI,MAAM,CAAC,mBAAmB,EAAE,CAAC;oCAC/B,MAAM,CAAC,mBAAmB,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE;wCACxD,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,WAAW,EAAE,CAAC,CAAA;oCACjD,CAAC,CAAC,CAAA;gCACJ,CAAC;4BACH,CAAC,CAAC,CAAA;4BAEF,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;wBACvC,CAAC;oBACH,CAAC;oBACD,IAAI,sBAAsB,EAAE,CAAC;wBAC3B,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAC;wBAChC,OAAO,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,IAAI,EAAE,SAAS,GAAG,CAAC,CAAC,CAAC;oBACnD,CAAC;gBACH,CAAC;gBACD,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;KAAA;CACF;AAnHD,6BAmHC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import GrpcConnect from './connect';
|
|
2
|
+
import CoreClient from './core';
|
|
3
|
+
import { SendPasswordlessResponse, VerifyPasswordLessResponse, TemplateType } from './pkg/grpc/scalekit/v1/auth/passwordless_pb';
|
|
4
|
+
export default class PasswordlessClient {
|
|
5
|
+
private readonly grpcConncet;
|
|
6
|
+
private readonly coreClient;
|
|
7
|
+
private client;
|
|
8
|
+
constructor(grpcConncet: GrpcConnect, coreClient: CoreClient);
|
|
9
|
+
/**
|
|
10
|
+
* Send a passwordless authentication email
|
|
11
|
+
* @param {string} email The email address to send the passwordless link to
|
|
12
|
+
* @param {object} options The options for sending the passwordless email
|
|
13
|
+
* @param {TemplateType} options.template The template type (SIGNIN/SIGNUP)
|
|
14
|
+
* @param {string} options.state Optional state parameter to maintain state between request and callback
|
|
15
|
+
* @param {string} options.magiclinkRedirectUri Optional redirect URI for magic link authentication
|
|
16
|
+
* @param {number} options.expiresIn Optional expiration time in seconds (default: 3600)
|
|
17
|
+
* @returns {Promise<SendPasswordlessResponse>} The response containing:
|
|
18
|
+
* - authRequestId: Unique identifier for the passwordless authentication request
|
|
19
|
+
* - expiresAt: Expiration time in seconds since epoch
|
|
20
|
+
* - expiresIn: Expiration time in seconds
|
|
21
|
+
* - passwordlessType: Type of passwordless authentication (OTP/LINK/LINK_OTP)
|
|
22
|
+
*/
|
|
23
|
+
sendPasswordlessEmail(email: string, options?: {
|
|
24
|
+
template?: TemplateType;
|
|
25
|
+
state?: string;
|
|
26
|
+
magiclinkRedirectUri?: string;
|
|
27
|
+
expiresIn?: number;
|
|
28
|
+
}): Promise<SendPasswordlessResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* Verify a passwordless authentication code or link token
|
|
31
|
+
* @param {string} authRequestId The auth request ID from the send response
|
|
32
|
+
* @param {object} credential The credential to verify
|
|
33
|
+
* @param {string} credential.code The one-time code received via email
|
|
34
|
+
* @param {string} credential.linkToken The link token received via email
|
|
35
|
+
* @returns {Promise<VerifyPasswordLessResponse>} The response containing:
|
|
36
|
+
* - email: The email address that was verified
|
|
37
|
+
* - state: Optional state parameter that was passed in the send request
|
|
38
|
+
* - template: The template type used for the authentication
|
|
39
|
+
* - passwordlessType: Type of passwordless authentication used
|
|
40
|
+
*/
|
|
41
|
+
verifyPasswordlessEmail(authRequestId: string, credential: {
|
|
42
|
+
code?: string;
|
|
43
|
+
linkToken?: string;
|
|
44
|
+
}): Promise<VerifyPasswordLessResponse>;
|
|
45
|
+
/**
|
|
46
|
+
* Resend a passwordless authentication email
|
|
47
|
+
* @param {string} authRequestId The auth request ID from the original send response
|
|
48
|
+
* @returns {Promise<SendPasswordlessResponse>} The response containing:
|
|
49
|
+
* - authRequestId: New unique identifier for the passwordless authentication request
|
|
50
|
+
* - expiresAt: New expiration time in seconds since epoch
|
|
51
|
+
* - expiresIn: New expiration time in seconds
|
|
52
|
+
* - passwordlessType: Type of passwordless authentication (OTP/LINK/LINK_OTP)
|
|
53
|
+
*/
|
|
54
|
+
resendPasswordlessEmail(authRequestId: string): Promise<SendPasswordlessResponse>;
|
|
55
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const passwordless_connect_1 = require("./pkg/grpc/scalekit/v1/auth/passwordless_connect");
|
|
13
|
+
const passwordless_pb_1 = require("./pkg/grpc/scalekit/v1/auth/passwordless_pb");
|
|
14
|
+
class PasswordlessClient {
|
|
15
|
+
constructor(grpcConncet, coreClient) {
|
|
16
|
+
this.grpcConncet = grpcConncet;
|
|
17
|
+
this.coreClient = coreClient;
|
|
18
|
+
this.client = this.grpcConncet.createClient(passwordless_connect_1.PasswordlessService);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Send a passwordless authentication email
|
|
22
|
+
* @param {string} email The email address to send the passwordless link to
|
|
23
|
+
* @param {object} options The options for sending the passwordless email
|
|
24
|
+
* @param {TemplateType} options.template The template type (SIGNIN/SIGNUP)
|
|
25
|
+
* @param {string} options.state Optional state parameter to maintain state between request and callback
|
|
26
|
+
* @param {string} options.magiclinkRedirectUri Optional redirect URI for magic link authentication
|
|
27
|
+
* @param {number} options.expiresIn Optional expiration time in seconds (default: 3600)
|
|
28
|
+
* @returns {Promise<SendPasswordlessResponse>} The response containing:
|
|
29
|
+
* - authRequestId: Unique identifier for the passwordless authentication request
|
|
30
|
+
* - expiresAt: Expiration time in seconds since epoch
|
|
31
|
+
* - expiresIn: Expiration time in seconds
|
|
32
|
+
* - passwordlessType: Type of passwordless authentication (OTP/LINK/LINK_OTP)
|
|
33
|
+
*/
|
|
34
|
+
sendPasswordlessEmail(email, options) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
if (!email || typeof email !== 'string') {
|
|
37
|
+
throw new Error('Email must be a valid string');
|
|
38
|
+
}
|
|
39
|
+
let templateValue;
|
|
40
|
+
if (options === null || options === void 0 ? void 0 : options.template) {
|
|
41
|
+
if (typeof options.template === 'string') {
|
|
42
|
+
templateValue = passwordless_pb_1.TemplateType[options.template];
|
|
43
|
+
if (templateValue === undefined) {
|
|
44
|
+
throw new Error('Invalid template type');
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
templateValue = options.template;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if ((options === null || options === void 0 ? void 0 : options.state) && typeof options.state !== 'string') {
|
|
52
|
+
throw new Error('State must be a string');
|
|
53
|
+
}
|
|
54
|
+
if ((options === null || options === void 0 ? void 0 : options.magiclinkRedirectUri) && typeof options.magiclinkRedirectUri !== 'string') {
|
|
55
|
+
throw new Error('Magic link redirect URI must be a string');
|
|
56
|
+
}
|
|
57
|
+
const request = new passwordless_pb_1.SendPasswordlessRequest({
|
|
58
|
+
email,
|
|
59
|
+
template: templateValue,
|
|
60
|
+
state: options === null || options === void 0 ? void 0 : options.state,
|
|
61
|
+
magiclinkRedirectUri: options === null || options === void 0 ? void 0 : options.magiclinkRedirectUri,
|
|
62
|
+
expiresIn: options === null || options === void 0 ? void 0 : options.expiresIn
|
|
63
|
+
});
|
|
64
|
+
return this.coreClient.connectExec(this.client.sendPasswordlessEmail, request);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Verify a passwordless authentication code or link token
|
|
69
|
+
* @param {string} authRequestId The auth request ID from the send response
|
|
70
|
+
* @param {object} credential The credential to verify
|
|
71
|
+
* @param {string} credential.code The one-time code received via email
|
|
72
|
+
* @param {string} credential.linkToken The link token received via email
|
|
73
|
+
* @returns {Promise<VerifyPasswordLessResponse>} The response containing:
|
|
74
|
+
* - email: The email address that was verified
|
|
75
|
+
* - state: Optional state parameter that was passed in the send request
|
|
76
|
+
* - template: The template type used for the authentication
|
|
77
|
+
* - passwordlessType: Type of passwordless authentication used
|
|
78
|
+
*/
|
|
79
|
+
verifyPasswordlessEmail(authRequestId, credential) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
if (!credential.code && !credential.linkToken) {
|
|
82
|
+
throw new Error('Either code or linkToken must be provided');
|
|
83
|
+
}
|
|
84
|
+
const request = new passwordless_pb_1.VerifyPasswordLessRequest({
|
|
85
|
+
authRequestId,
|
|
86
|
+
authCredential: credential.code
|
|
87
|
+
? { case: "code", value: credential.code }
|
|
88
|
+
: { case: "linkToken", value: credential.linkToken }
|
|
89
|
+
});
|
|
90
|
+
return this.coreClient.connectExec(this.client.verifyPasswordlessEmail, request);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Resend a passwordless authentication email
|
|
95
|
+
* @param {string} authRequestId The auth request ID from the original send response
|
|
96
|
+
* @returns {Promise<SendPasswordlessResponse>} The response containing:
|
|
97
|
+
* - authRequestId: New unique identifier for the passwordless authentication request
|
|
98
|
+
* - expiresAt: New expiration time in seconds since epoch
|
|
99
|
+
* - expiresIn: New expiration time in seconds
|
|
100
|
+
* - passwordlessType: Type of passwordless authentication (OTP/LINK/LINK_OTP)
|
|
101
|
+
*/
|
|
102
|
+
resendPasswordlessEmail(authRequestId) {
|
|
103
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
return this.coreClient.connectExec(this.client.resendPasswordlessEmail, {
|
|
105
|
+
authRequestId
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
exports.default = PasswordlessClient;
|
|
111
|
+
//# sourceMappingURL=passwordless.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"passwordless.js","sourceRoot":"","sources":["../src/passwordless.ts"],"names":[],"mappings":";;;;;;;;;;;AAGA,2FAAuF;AACvF,iFAMqD;AAErD,MAAqB,kBAAkB;IAErC,YACmB,WAAwB,EACxB,UAAsB;QADtB,gBAAW,GAAX,WAAW,CAAa;QACxB,eAAU,GAAV,UAAU,CAAY;QAEvC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,0CAAmB,CAAC,CAAC;IACnE,CAAC;IAED;;;;;;;;;;;;;OAaG;IACG,qBAAqB,CACzB,KAAa,EACb,OAKC;;YAED,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;gBACxC,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;YAClD,CAAC;YAED,IAAI,aAAuC,CAAC;YAC5C,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,EAAE,CAAC;gBACtB,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;oBACzC,aAAa,GAAG,8BAAY,CAAC,OAAO,CAAC,QAAqC,CAAC,CAAC;oBAC5E,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;wBAChC,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;oBAC3C,CAAC;gBACH,CAAC;qBAAM,CAAC;oBACN,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC;gBACnC,CAAC;YACH,CAAC;YAED,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,KAAI,OAAO,OAAO,CAA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WAAW,CAChC,IAAI,CAAC,MAAM,CAAC,uBAAuB,EACnC,OAAO,CACR,CAAC;QACJ,CAAC;KAAA;IAED;;;;;;;;OAQG;IACG,uBAAuB,CAC3B,aAAqB;;YAErB,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAChC,IAAI,CAAC,MAAM,CAAC,uBAAuB,EACnC;gBACE,aAAa;aACd,CACF,CAAC;QACJ,CAAC;KAAA;CACF;AA1HD,qCA0HC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ResendPasswordlessRequest, SendPasswordlessRequest, SendPasswordlessResponse, VerifyPasswordLessRequest, VerifyPasswordLessResponse } from "./passwordless_pb.js";
|
|
2
|
+
import { MethodKind } from "@bufbuild/protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* @generated from service scalekit.v1.auth.passwordless.PasswordlessService
|
|
5
|
+
*/
|
|
6
|
+
export declare const PasswordlessService: {
|
|
7
|
+
readonly typeName: "scalekit.v1.auth.passwordless.PasswordlessService";
|
|
8
|
+
readonly methods: {
|
|
9
|
+
/**
|
|
10
|
+
* @generated from rpc scalekit.v1.auth.passwordless.PasswordlessService.SendPasswordlessEmail
|
|
11
|
+
*/
|
|
12
|
+
readonly sendPasswordlessEmail: {
|
|
13
|
+
readonly name: "SendPasswordlessEmail";
|
|
14
|
+
readonly I: typeof SendPasswordlessRequest;
|
|
15
|
+
readonly O: typeof SendPasswordlessResponse;
|
|
16
|
+
readonly kind: MethodKind.Unary;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* @generated from rpc scalekit.v1.auth.passwordless.PasswordlessService.VerifyPasswordlessEmail
|
|
20
|
+
*/
|
|
21
|
+
readonly verifyPasswordlessEmail: {
|
|
22
|
+
readonly name: "VerifyPasswordlessEmail";
|
|
23
|
+
readonly I: typeof VerifyPasswordLessRequest;
|
|
24
|
+
readonly O: typeof VerifyPasswordLessResponse;
|
|
25
|
+
readonly kind: MethodKind.Unary;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* @generated from rpc scalekit.v1.auth.passwordless.PasswordlessService.ResendPasswordlessEmail
|
|
29
|
+
*/
|
|
30
|
+
readonly resendPasswordlessEmail: {
|
|
31
|
+
readonly name: "ResendPasswordlessEmail";
|
|
32
|
+
readonly I: typeof ResendPasswordlessRequest;
|
|
33
|
+
readonly O: typeof SendPasswordlessResponse;
|
|
34
|
+
readonly kind: MethodKind.Unary;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts"
|
|
3
|
+
// @generated from file scalekit/v1/auth/passwordless.proto (package scalekit.v1.auth.passwordless, syntax proto3)
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
// @ts-nocheck
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.PasswordlessService = void 0;
|
|
8
|
+
const passwordless_pb_js_1 = require("./passwordless_pb.js");
|
|
9
|
+
const protobuf_1 = require("@bufbuild/protobuf");
|
|
10
|
+
/**
|
|
11
|
+
* @generated from service scalekit.v1.auth.passwordless.PasswordlessService
|
|
12
|
+
*/
|
|
13
|
+
exports.PasswordlessService = {
|
|
14
|
+
typeName: "scalekit.v1.auth.passwordless.PasswordlessService",
|
|
15
|
+
methods: {
|
|
16
|
+
/**
|
|
17
|
+
* @generated from rpc scalekit.v1.auth.passwordless.PasswordlessService.SendPasswordlessEmail
|
|
18
|
+
*/
|
|
19
|
+
sendPasswordlessEmail: {
|
|
20
|
+
name: "SendPasswordlessEmail",
|
|
21
|
+
I: passwordless_pb_js_1.SendPasswordlessRequest,
|
|
22
|
+
O: passwordless_pb_js_1.SendPasswordlessResponse,
|
|
23
|
+
kind: protobuf_1.MethodKind.Unary,
|
|
24
|
+
},
|
|
25
|
+
/**
|
|
26
|
+
* @generated from rpc scalekit.v1.auth.passwordless.PasswordlessService.VerifyPasswordlessEmail
|
|
27
|
+
*/
|
|
28
|
+
verifyPasswordlessEmail: {
|
|
29
|
+
name: "VerifyPasswordlessEmail",
|
|
30
|
+
I: passwordless_pb_js_1.VerifyPasswordLessRequest,
|
|
31
|
+
O: passwordless_pb_js_1.VerifyPasswordLessResponse,
|
|
32
|
+
kind: protobuf_1.MethodKind.Unary,
|
|
33
|
+
},
|
|
34
|
+
/**
|
|
35
|
+
* @generated from rpc scalekit.v1.auth.passwordless.PasswordlessService.ResendPasswordlessEmail
|
|
36
|
+
*/
|
|
37
|
+
resendPasswordlessEmail: {
|
|
38
|
+
name: "ResendPasswordlessEmail",
|
|
39
|
+
I: passwordless_pb_js_1.ResendPasswordlessRequest,
|
|
40
|
+
O: passwordless_pb_js_1.SendPasswordlessResponse,
|
|
41
|
+
kind: protobuf_1.MethodKind.Unary,
|
|
42
|
+
},
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=passwordless_connect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"passwordless_connect.js","sourceRoot":"","sources":["../../../../../../src/pkg/grpc/scalekit/v1/auth/passwordless_connect.ts"],"names":[],"mappings":";AAAA,wEAAwE;AACxE,kHAAkH;AAClH,oBAAoB;AACpB,cAAc;;;AAEd,6DAA2K;AAC3K,iDAAgD;AAEhD;;GAEG;AACU,QAAA,mBAAmB,GAAG;IACjC,QAAQ,EAAE,mDAAmD;IAC7D,OAAO,EAAE;QACP;;WAEG;QACH,qBAAqB,EAAE;YACrB,IAAI,EAAE,uBAAuB;YAC7B,CAAC,EAAE,4CAAuB;YAC1B,CAAC,EAAE,6CAAwB;YAC3B,IAAI,EAAE,qBAAU,CAAC,KAAK;SACvB;QACD;;WAEG;QACH,uBAAuB,EAAE;YACvB,IAAI,EAAE,yBAAyB;YAC/B,CAAC,EAAE,8CAAyB;YAC5B,CAAC,EAAE,+CAA0B;YAC7B,IAAI,EAAE,qBAAU,CAAC,KAAK;SACvB;QACD;;WAEG;QACH,uBAAuB,EAAE;YACvB,IAAI,EAAE,yBAAyB;YAC/B,CAAC,EAAE,8CAAyB;YAC5B,CAAC,EAAE,6CAAwB;YAC3B,IAAI,EAAE,qBAAU,CAAC,KAAK;SACvB;KACF;CACO,CAAC"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
|
2
|
+
import { Message, proto3 } from "@bufbuild/protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* @generated from enum scalekit.v1.auth.passwordless.TemplateType
|
|
5
|
+
*/
|
|
6
|
+
export declare enum TemplateType {
|
|
7
|
+
/**
|
|
8
|
+
* @generated from enum value: UNSPECIFIED = 0;
|
|
9
|
+
*/
|
|
10
|
+
UNSPECIFIED = 0,
|
|
11
|
+
/**
|
|
12
|
+
* @generated from enum value: SIGNIN = 1;
|
|
13
|
+
*/
|
|
14
|
+
SIGNIN = 1,
|
|
15
|
+
/**
|
|
16
|
+
* @generated from enum value: SIGNUP = 2;
|
|
17
|
+
*/
|
|
18
|
+
SIGNUP = 2
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @generated from enum scalekit.v1.auth.passwordless.PasswordlessType
|
|
22
|
+
*/
|
|
23
|
+
export declare enum PasswordlessType {
|
|
24
|
+
/**
|
|
25
|
+
* @generated from enum value: PASSWORDLESS_TYPE_UNSPECIFIED = 0;
|
|
26
|
+
*/
|
|
27
|
+
PASSWORDLESS_TYPE_UNSPECIFIED = 0,
|
|
28
|
+
/**
|
|
29
|
+
* @generated from enum value: OTP = 1;
|
|
30
|
+
*/
|
|
31
|
+
OTP = 1,
|
|
32
|
+
/**
|
|
33
|
+
* @generated from enum value: LINK = 2;
|
|
34
|
+
*/
|
|
35
|
+
LINK = 2,
|
|
36
|
+
/**
|
|
37
|
+
* @generated from enum value: LINK_OTP = 3;
|
|
38
|
+
*/
|
|
39
|
+
LINK_OTP = 3
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* @generated from message scalekit.v1.auth.passwordless.SendPasswordlessRequest
|
|
43
|
+
*/
|
|
44
|
+
export declare class SendPasswordlessRequest extends Message<SendPasswordlessRequest> {
|
|
45
|
+
/**
|
|
46
|
+
* @generated from field: string email = 1;
|
|
47
|
+
*/
|
|
48
|
+
email: string;
|
|
49
|
+
/**
|
|
50
|
+
* @generated from field: optional scalekit.v1.auth.passwordless.TemplateType template = 2;
|
|
51
|
+
*/
|
|
52
|
+
template?: TemplateType;
|
|
53
|
+
/**
|
|
54
|
+
* @generated from field: optional string magiclink_redirect_uri = 3;
|
|
55
|
+
*/
|
|
56
|
+
magiclinkRedirectUri?: string;
|
|
57
|
+
/**
|
|
58
|
+
* @generated from field: optional string state = 4;
|
|
59
|
+
*/
|
|
60
|
+
state?: string;
|
|
61
|
+
/**
|
|
62
|
+
* @generated from field: optional uint32 expires_in = 5;
|
|
63
|
+
*/
|
|
64
|
+
expiresIn?: number;
|
|
65
|
+
constructor(data?: PartialMessage<SendPasswordlessRequest>);
|
|
66
|
+
static readonly runtime: typeof proto3;
|
|
67
|
+
static readonly typeName = "scalekit.v1.auth.passwordless.SendPasswordlessRequest";
|
|
68
|
+
static readonly fields: FieldList;
|
|
69
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SendPasswordlessRequest;
|
|
70
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SendPasswordlessRequest;
|
|
71
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SendPasswordlessRequest;
|
|
72
|
+
static equals(a: SendPasswordlessRequest | PlainMessage<SendPasswordlessRequest> | undefined, b: SendPasswordlessRequest | PlainMessage<SendPasswordlessRequest> | undefined): boolean;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* @generated from message scalekit.v1.auth.passwordless.SendPasswordlessResponse
|
|
76
|
+
*/
|
|
77
|
+
export declare class SendPasswordlessResponse extends Message<SendPasswordlessResponse> {
|
|
78
|
+
/**
|
|
79
|
+
* @generated from field: string auth_request_id = 1;
|
|
80
|
+
*/
|
|
81
|
+
authRequestId: string;
|
|
82
|
+
/**
|
|
83
|
+
* @generated from field: int64 expires_at = 2;
|
|
84
|
+
*/
|
|
85
|
+
expiresAt: bigint;
|
|
86
|
+
/**
|
|
87
|
+
* @generated from field: uint32 expires_in = 3;
|
|
88
|
+
*/
|
|
89
|
+
expiresIn: number;
|
|
90
|
+
/**
|
|
91
|
+
* @generated from field: scalekit.v1.auth.passwordless.PasswordlessType passwordless_type = 4;
|
|
92
|
+
*/
|
|
93
|
+
passwordlessType: PasswordlessType;
|
|
94
|
+
constructor(data?: PartialMessage<SendPasswordlessResponse>);
|
|
95
|
+
static readonly runtime: typeof proto3;
|
|
96
|
+
static readonly typeName = "scalekit.v1.auth.passwordless.SendPasswordlessResponse";
|
|
97
|
+
static readonly fields: FieldList;
|
|
98
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SendPasswordlessResponse;
|
|
99
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SendPasswordlessResponse;
|
|
100
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SendPasswordlessResponse;
|
|
101
|
+
static equals(a: SendPasswordlessResponse | PlainMessage<SendPasswordlessResponse> | undefined, b: SendPasswordlessResponse | PlainMessage<SendPasswordlessResponse> | undefined): boolean;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* @generated from message scalekit.v1.auth.passwordless.VerifyPasswordLessRequest
|
|
105
|
+
*/
|
|
106
|
+
export declare class VerifyPasswordLessRequest extends Message<VerifyPasswordLessRequest> {
|
|
107
|
+
/**
|
|
108
|
+
* @generated from oneof scalekit.v1.auth.passwordless.VerifyPasswordLessRequest.auth_credential
|
|
109
|
+
*/
|
|
110
|
+
authCredential: {
|
|
111
|
+
/**
|
|
112
|
+
* @generated from field: string code = 1;
|
|
113
|
+
*/
|
|
114
|
+
value: string;
|
|
115
|
+
case: "code";
|
|
116
|
+
} | {
|
|
117
|
+
/**
|
|
118
|
+
* @generated from field: string link_token = 2;
|
|
119
|
+
*/
|
|
120
|
+
value: string;
|
|
121
|
+
case: "linkToken";
|
|
122
|
+
} | {
|
|
123
|
+
case: undefined;
|
|
124
|
+
value?: undefined;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* @generated from field: string auth_request_id = 3;
|
|
128
|
+
*/
|
|
129
|
+
authRequestId: string;
|
|
130
|
+
constructor(data?: PartialMessage<VerifyPasswordLessRequest>);
|
|
131
|
+
static readonly runtime: typeof proto3;
|
|
132
|
+
static readonly typeName = "scalekit.v1.auth.passwordless.VerifyPasswordLessRequest";
|
|
133
|
+
static readonly fields: FieldList;
|
|
134
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VerifyPasswordLessRequest;
|
|
135
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VerifyPasswordLessRequest;
|
|
136
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VerifyPasswordLessRequest;
|
|
137
|
+
static equals(a: VerifyPasswordLessRequest | PlainMessage<VerifyPasswordLessRequest> | undefined, b: VerifyPasswordLessRequest | PlainMessage<VerifyPasswordLessRequest> | undefined): boolean;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* @generated from message scalekit.v1.auth.passwordless.ResendPasswordlessRequest
|
|
141
|
+
*/
|
|
142
|
+
export declare class ResendPasswordlessRequest extends Message<ResendPasswordlessRequest> {
|
|
143
|
+
/**
|
|
144
|
+
* @generated from field: string auth_request_id = 1;
|
|
145
|
+
*/
|
|
146
|
+
authRequestId: string;
|
|
147
|
+
constructor(data?: PartialMessage<ResendPasswordlessRequest>);
|
|
148
|
+
static readonly runtime: typeof proto3;
|
|
149
|
+
static readonly typeName = "scalekit.v1.auth.passwordless.ResendPasswordlessRequest";
|
|
150
|
+
static readonly fields: FieldList;
|
|
151
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ResendPasswordlessRequest;
|
|
152
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ResendPasswordlessRequest;
|
|
153
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ResendPasswordlessRequest;
|
|
154
|
+
static equals(a: ResendPasswordlessRequest | PlainMessage<ResendPasswordlessRequest> | undefined, b: ResendPasswordlessRequest | PlainMessage<ResendPasswordlessRequest> | undefined): boolean;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* @generated from message scalekit.v1.auth.passwordless.VerifyPasswordLessResponse
|
|
158
|
+
*/
|
|
159
|
+
export declare class VerifyPasswordLessResponse extends Message<VerifyPasswordLessResponse> {
|
|
160
|
+
/**
|
|
161
|
+
* @generated from field: string email = 1;
|
|
162
|
+
*/
|
|
163
|
+
email: string;
|
|
164
|
+
/**
|
|
165
|
+
* @generated from field: optional string state = 2;
|
|
166
|
+
*/
|
|
167
|
+
state?: string;
|
|
168
|
+
/**
|
|
169
|
+
* @generated from field: optional scalekit.v1.auth.passwordless.TemplateType template = 3;
|
|
170
|
+
*/
|
|
171
|
+
template?: TemplateType;
|
|
172
|
+
/**
|
|
173
|
+
* @generated from field: scalekit.v1.auth.passwordless.PasswordlessType passwordless_type = 4;
|
|
174
|
+
*/
|
|
175
|
+
passwordlessType: PasswordlessType;
|
|
176
|
+
constructor(data?: PartialMessage<VerifyPasswordLessResponse>);
|
|
177
|
+
static readonly runtime: typeof proto3;
|
|
178
|
+
static readonly typeName = "scalekit.v1.auth.passwordless.VerifyPasswordLessResponse";
|
|
179
|
+
static readonly fields: FieldList;
|
|
180
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VerifyPasswordLessResponse;
|
|
181
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VerifyPasswordLessResponse;
|
|
182
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VerifyPasswordLessResponse;
|
|
183
|
+
static equals(a: VerifyPasswordLessResponse | PlainMessage<VerifyPasswordLessResponse> | undefined, b: VerifyPasswordLessResponse | PlainMessage<VerifyPasswordLessResponse> | undefined): boolean;
|
|
184
|
+
}
|