@scalekit-sdk/node 1.0.9 → 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
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { PromiseClient } from '@connectrpc/connect';
|
|
2
|
+
import GrpcConnect from './connect';
|
|
3
|
+
import CoreClient from './core';
|
|
4
|
+
import { PasswordlessService } from './pkg/grpc/scalekit/v1/auth/passwordless_connect';
|
|
5
|
+
import {
|
|
6
|
+
SendPasswordlessResponse,
|
|
7
|
+
VerifyPasswordLessResponse,
|
|
8
|
+
TemplateType,
|
|
9
|
+
SendPasswordlessRequest,
|
|
10
|
+
VerifyPasswordLessRequest
|
|
11
|
+
} from './pkg/grpc/scalekit/v1/auth/passwordless_pb';
|
|
12
|
+
|
|
13
|
+
export default class PasswordlessClient {
|
|
14
|
+
private client: PromiseClient<typeof PasswordlessService>;
|
|
15
|
+
constructor(
|
|
16
|
+
private readonly grpcConncet: GrpcConnect,
|
|
17
|
+
private readonly coreClient: CoreClient
|
|
18
|
+
) {
|
|
19
|
+
this.client = this.grpcConncet.createClient(PasswordlessService);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Send a passwordless authentication email
|
|
24
|
+
* @param {string} email The email address to send the passwordless link to
|
|
25
|
+
* @param {object} options The options for sending the passwordless email
|
|
26
|
+
* @param {TemplateType} options.template The template type (SIGNIN/SIGNUP)
|
|
27
|
+
* @param {string} options.state Optional state parameter to maintain state between request and callback
|
|
28
|
+
* @param {string} options.magiclinkRedirectUri Optional redirect URI for magic link authentication
|
|
29
|
+
* @param {number} options.expiresIn Optional expiration time in seconds (default: 3600)
|
|
30
|
+
* @returns {Promise<SendPasswordlessResponse>} The response containing:
|
|
31
|
+
* - authRequestId: Unique identifier for the passwordless authentication request
|
|
32
|
+
* - expiresAt: Expiration time in seconds since epoch
|
|
33
|
+
* - expiresIn: Expiration time in seconds
|
|
34
|
+
* - passwordlessType: Type of passwordless authentication (OTP/LINK/LINK_OTP)
|
|
35
|
+
*/
|
|
36
|
+
async sendPasswordlessEmail(
|
|
37
|
+
email: string,
|
|
38
|
+
options?: {
|
|
39
|
+
template?: TemplateType;
|
|
40
|
+
state?: string;
|
|
41
|
+
magiclinkRedirectUri?: string;
|
|
42
|
+
expiresIn?: number;
|
|
43
|
+
}
|
|
44
|
+
): Promise<SendPasswordlessResponse> {
|
|
45
|
+
if (!email || typeof email !== 'string') {
|
|
46
|
+
throw new Error('Email must be a valid string');
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
let templateValue: TemplateType | undefined;
|
|
50
|
+
if (options?.template) {
|
|
51
|
+
if (typeof options.template === 'string') {
|
|
52
|
+
templateValue = TemplateType[options.template as keyof typeof TemplateType];
|
|
53
|
+
if (templateValue === undefined) {
|
|
54
|
+
throw new Error('Invalid template type');
|
|
55
|
+
}
|
|
56
|
+
} else {
|
|
57
|
+
templateValue = options.template;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (options?.state && typeof options.state !== 'string') {
|
|
62
|
+
throw new Error('State must be a string');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (options?.magiclinkRedirectUri && typeof options.magiclinkRedirectUri !== 'string') {
|
|
66
|
+
throw new Error('Magic link redirect URI must be a string');
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const request: SendPasswordlessRequest = new SendPasswordlessRequest({
|
|
70
|
+
email,
|
|
71
|
+
template: templateValue,
|
|
72
|
+
state: options?.state,
|
|
73
|
+
magiclinkRedirectUri: options?.magiclinkRedirectUri,
|
|
74
|
+
expiresIn: options?.expiresIn
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
return this.coreClient.connectExec(
|
|
78
|
+
this.client.sendPasswordlessEmail,
|
|
79
|
+
request
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Verify a passwordless authentication code or link token
|
|
85
|
+
* @param {string} authRequestId The auth request ID from the send response
|
|
86
|
+
* @param {object} credential The credential to verify
|
|
87
|
+
* @param {string} credential.code The one-time code received via email
|
|
88
|
+
* @param {string} credential.linkToken The link token received via email
|
|
89
|
+
* @returns {Promise<VerifyPasswordLessResponse>} The response containing:
|
|
90
|
+
* - email: The email address that was verified
|
|
91
|
+
* - state: Optional state parameter that was passed in the send request
|
|
92
|
+
* - template: The template type used for the authentication
|
|
93
|
+
* - passwordlessType: Type of passwordless authentication used
|
|
94
|
+
*/
|
|
95
|
+
async verifyPasswordlessEmail(
|
|
96
|
+
authRequestId: string,
|
|
97
|
+
credential: { code?: string; linkToken?: string }
|
|
98
|
+
): Promise<VerifyPasswordLessResponse> {
|
|
99
|
+
if (!credential.code && !credential.linkToken) {
|
|
100
|
+
throw new Error('Either code or linkToken must be provided');
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const request = new VerifyPasswordLessRequest({
|
|
104
|
+
authRequestId,
|
|
105
|
+
authCredential: credential.code
|
|
106
|
+
? { case: "code", value: credential.code }
|
|
107
|
+
: { case: "linkToken", value: credential.linkToken! }
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
return this.coreClient.connectExec(
|
|
111
|
+
this.client.verifyPasswordlessEmail,
|
|
112
|
+
request
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Resend a passwordless authentication email
|
|
118
|
+
* @param {string} authRequestId The auth request ID from the original send response
|
|
119
|
+
* @returns {Promise<SendPasswordlessResponse>} The response containing:
|
|
120
|
+
* - authRequestId: New unique identifier for the passwordless authentication request
|
|
121
|
+
* - expiresAt: New expiration time in seconds since epoch
|
|
122
|
+
* - expiresIn: New expiration time in seconds
|
|
123
|
+
* - passwordlessType: Type of passwordless authentication (OTP/LINK/LINK_OTP)
|
|
124
|
+
*/
|
|
125
|
+
async resendPasswordlessEmail(
|
|
126
|
+
authRequestId: string
|
|
127
|
+
): Promise<SendPasswordlessResponse> {
|
|
128
|
+
return this.coreClient.connectExec(
|
|
129
|
+
this.client.resendPasswordlessEmail,
|
|
130
|
+
{
|
|
131
|
+
authRequestId
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts"
|
|
2
|
+
// @generated from file scalekit/v1/auth/passwordless.proto (package scalekit.v1.auth.passwordless, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
|
|
6
|
+
import { ResendPasswordlessRequest, SendPasswordlessRequest, SendPasswordlessResponse, VerifyPasswordLessRequest, VerifyPasswordLessResponse } from "./passwordless_pb.js";
|
|
7
|
+
import { MethodKind } from "@bufbuild/protobuf";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @generated from service scalekit.v1.auth.passwordless.PasswordlessService
|
|
11
|
+
*/
|
|
12
|
+
export const PasswordlessService = {
|
|
13
|
+
typeName: "scalekit.v1.auth.passwordless.PasswordlessService",
|
|
14
|
+
methods: {
|
|
15
|
+
/**
|
|
16
|
+
* @generated from rpc scalekit.v1.auth.passwordless.PasswordlessService.SendPasswordlessEmail
|
|
17
|
+
*/
|
|
18
|
+
sendPasswordlessEmail: {
|
|
19
|
+
name: "SendPasswordlessEmail",
|
|
20
|
+
I: SendPasswordlessRequest,
|
|
21
|
+
O: SendPasswordlessResponse,
|
|
22
|
+
kind: MethodKind.Unary,
|
|
23
|
+
},
|
|
24
|
+
/**
|
|
25
|
+
* @generated from rpc scalekit.v1.auth.passwordless.PasswordlessService.VerifyPasswordlessEmail
|
|
26
|
+
*/
|
|
27
|
+
verifyPasswordlessEmail: {
|
|
28
|
+
name: "VerifyPasswordlessEmail",
|
|
29
|
+
I: VerifyPasswordLessRequest,
|
|
30
|
+
O: VerifyPasswordLessResponse,
|
|
31
|
+
kind: MethodKind.Unary,
|
|
32
|
+
},
|
|
33
|
+
/**
|
|
34
|
+
* @generated from rpc scalekit.v1.auth.passwordless.PasswordlessService.ResendPasswordlessEmail
|
|
35
|
+
*/
|
|
36
|
+
resendPasswordlessEmail: {
|
|
37
|
+
name: "ResendPasswordlessEmail",
|
|
38
|
+
I: ResendPasswordlessRequest,
|
|
39
|
+
O: SendPasswordlessResponse,
|
|
40
|
+
kind: MethodKind.Unary,
|
|
41
|
+
},
|
|
42
|
+
}
|
|
43
|
+
} as const;
|
|
44
|
+
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
|
|
2
|
+
// @generated from file scalekit/v1/auth/passwordless.proto (package scalekit.v1.auth.passwordless, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
|
|
6
|
+
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
|
7
|
+
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @generated from enum scalekit.v1.auth.passwordless.TemplateType
|
|
11
|
+
*/
|
|
12
|
+
export enum TemplateType {
|
|
13
|
+
/**
|
|
14
|
+
* @generated from enum value: UNSPECIFIED = 0;
|
|
15
|
+
*/
|
|
16
|
+
UNSPECIFIED = 0,
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @generated from enum value: SIGNIN = 1;
|
|
20
|
+
*/
|
|
21
|
+
SIGNIN = 1,
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @generated from enum value: SIGNUP = 2;
|
|
25
|
+
*/
|
|
26
|
+
SIGNUP = 2,
|
|
27
|
+
}
|
|
28
|
+
// Retrieve enum metadata with: proto3.getEnumType(TemplateType)
|
|
29
|
+
proto3.util.setEnumType(TemplateType, "scalekit.v1.auth.passwordless.TemplateType", [
|
|
30
|
+
{ no: 0, name: "UNSPECIFIED" },
|
|
31
|
+
{ no: 1, name: "SIGNIN" },
|
|
32
|
+
{ no: 2, name: "SIGNUP" },
|
|
33
|
+
]);
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @generated from enum scalekit.v1.auth.passwordless.PasswordlessType
|
|
37
|
+
*/
|
|
38
|
+
export enum PasswordlessType {
|
|
39
|
+
/**
|
|
40
|
+
* @generated from enum value: PASSWORDLESS_TYPE_UNSPECIFIED = 0;
|
|
41
|
+
*/
|
|
42
|
+
PASSWORDLESS_TYPE_UNSPECIFIED = 0,
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @generated from enum value: OTP = 1;
|
|
46
|
+
*/
|
|
47
|
+
OTP = 1,
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @generated from enum value: LINK = 2;
|
|
51
|
+
*/
|
|
52
|
+
LINK = 2,
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @generated from enum value: LINK_OTP = 3;
|
|
56
|
+
*/
|
|
57
|
+
LINK_OTP = 3,
|
|
58
|
+
}
|
|
59
|
+
// Retrieve enum metadata with: proto3.getEnumType(PasswordlessType)
|
|
60
|
+
proto3.util.setEnumType(PasswordlessType, "scalekit.v1.auth.passwordless.PasswordlessType", [
|
|
61
|
+
{ no: 0, name: "PASSWORDLESS_TYPE_UNSPECIFIED" },
|
|
62
|
+
{ no: 1, name: "OTP" },
|
|
63
|
+
{ no: 2, name: "LINK" },
|
|
64
|
+
{ no: 3, name: "LINK_OTP" },
|
|
65
|
+
]);
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @generated from message scalekit.v1.auth.passwordless.SendPasswordlessRequest
|
|
69
|
+
*/
|
|
70
|
+
export class SendPasswordlessRequest extends Message<SendPasswordlessRequest> {
|
|
71
|
+
/**
|
|
72
|
+
* @generated from field: string email = 1;
|
|
73
|
+
*/
|
|
74
|
+
email = "";
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @generated from field: optional scalekit.v1.auth.passwordless.TemplateType template = 2;
|
|
78
|
+
*/
|
|
79
|
+
template?: TemplateType;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @generated from field: optional string magiclink_redirect_uri = 3;
|
|
83
|
+
*/
|
|
84
|
+
magiclinkRedirectUri?: string;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @generated from field: optional string state = 4;
|
|
88
|
+
*/
|
|
89
|
+
state?: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @generated from field: optional uint32 expires_in = 5;
|
|
93
|
+
*/
|
|
94
|
+
expiresIn?: number;
|
|
95
|
+
|
|
96
|
+
constructor(data?: PartialMessage<SendPasswordlessRequest>) {
|
|
97
|
+
super();
|
|
98
|
+
proto3.util.initPartial(data, this);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
102
|
+
static readonly typeName = "scalekit.v1.auth.passwordless.SendPasswordlessRequest";
|
|
103
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
104
|
+
{ no: 1, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
105
|
+
{ no: 2, name: "template", kind: "enum", T: proto3.getEnumType(TemplateType), opt: true },
|
|
106
|
+
{ no: 3, name: "magiclink_redirect_uri", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
107
|
+
{ no: 4, name: "state", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
108
|
+
{ no: 5, name: "expires_in", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
|
|
109
|
+
]);
|
|
110
|
+
|
|
111
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SendPasswordlessRequest {
|
|
112
|
+
return new SendPasswordlessRequest().fromBinary(bytes, options);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SendPasswordlessRequest {
|
|
116
|
+
return new SendPasswordlessRequest().fromJson(jsonValue, options);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SendPasswordlessRequest {
|
|
120
|
+
return new SendPasswordlessRequest().fromJsonString(jsonString, options);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
static equals(a: SendPasswordlessRequest | PlainMessage<SendPasswordlessRequest> | undefined, b: SendPasswordlessRequest | PlainMessage<SendPasswordlessRequest> | undefined): boolean {
|
|
124
|
+
return proto3.util.equals(SendPasswordlessRequest, a, b);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @generated from message scalekit.v1.auth.passwordless.SendPasswordlessResponse
|
|
130
|
+
*/
|
|
131
|
+
export class SendPasswordlessResponse extends Message<SendPasswordlessResponse> {
|
|
132
|
+
/**
|
|
133
|
+
* @generated from field: string auth_request_id = 1;
|
|
134
|
+
*/
|
|
135
|
+
authRequestId = "";
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @generated from field: int64 expires_at = 2;
|
|
139
|
+
*/
|
|
140
|
+
expiresAt = protoInt64.zero;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* @generated from field: uint32 expires_in = 3;
|
|
144
|
+
*/
|
|
145
|
+
expiresIn = 0;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* @generated from field: scalekit.v1.auth.passwordless.PasswordlessType passwordless_type = 4;
|
|
149
|
+
*/
|
|
150
|
+
passwordlessType = PasswordlessType.PASSWORDLESS_TYPE_UNSPECIFIED;
|
|
151
|
+
|
|
152
|
+
constructor(data?: PartialMessage<SendPasswordlessResponse>) {
|
|
153
|
+
super();
|
|
154
|
+
proto3.util.initPartial(data, this);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
158
|
+
static readonly typeName = "scalekit.v1.auth.passwordless.SendPasswordlessResponse";
|
|
159
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
160
|
+
{ no: 1, name: "auth_request_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
161
|
+
{ no: 2, name: "expires_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
|
|
162
|
+
{ no: 3, name: "expires_in", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
|
|
163
|
+
{ no: 4, name: "passwordless_type", kind: "enum", T: proto3.getEnumType(PasswordlessType) },
|
|
164
|
+
]);
|
|
165
|
+
|
|
166
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SendPasswordlessResponse {
|
|
167
|
+
return new SendPasswordlessResponse().fromBinary(bytes, options);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SendPasswordlessResponse {
|
|
171
|
+
return new SendPasswordlessResponse().fromJson(jsonValue, options);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SendPasswordlessResponse {
|
|
175
|
+
return new SendPasswordlessResponse().fromJsonString(jsonString, options);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
static equals(a: SendPasswordlessResponse | PlainMessage<SendPasswordlessResponse> | undefined, b: SendPasswordlessResponse | PlainMessage<SendPasswordlessResponse> | undefined): boolean {
|
|
179
|
+
return proto3.util.equals(SendPasswordlessResponse, a, b);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* @generated from message scalekit.v1.auth.passwordless.VerifyPasswordLessRequest
|
|
185
|
+
*/
|
|
186
|
+
export class VerifyPasswordLessRequest extends Message<VerifyPasswordLessRequest> {
|
|
187
|
+
/**
|
|
188
|
+
* @generated from oneof scalekit.v1.auth.passwordless.VerifyPasswordLessRequest.auth_credential
|
|
189
|
+
*/
|
|
190
|
+
authCredential: {
|
|
191
|
+
/**
|
|
192
|
+
* @generated from field: string code = 1;
|
|
193
|
+
*/
|
|
194
|
+
value: string;
|
|
195
|
+
case: "code";
|
|
196
|
+
} | {
|
|
197
|
+
/**
|
|
198
|
+
* @generated from field: string link_token = 2;
|
|
199
|
+
*/
|
|
200
|
+
value: string;
|
|
201
|
+
case: "linkToken";
|
|
202
|
+
} | { case: undefined; value?: undefined } = { case: undefined };
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* @generated from field: string auth_request_id = 3;
|
|
206
|
+
*/
|
|
207
|
+
authRequestId = "";
|
|
208
|
+
|
|
209
|
+
constructor(data?: PartialMessage<VerifyPasswordLessRequest>) {
|
|
210
|
+
super();
|
|
211
|
+
proto3.util.initPartial(data, this);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
215
|
+
static readonly typeName = "scalekit.v1.auth.passwordless.VerifyPasswordLessRequest";
|
|
216
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
217
|
+
{ no: 1, name: "code", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "auth_credential" },
|
|
218
|
+
{ no: 2, name: "link_token", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "auth_credential" },
|
|
219
|
+
{ no: 3, name: "auth_request_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
220
|
+
]);
|
|
221
|
+
|
|
222
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VerifyPasswordLessRequest {
|
|
223
|
+
return new VerifyPasswordLessRequest().fromBinary(bytes, options);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VerifyPasswordLessRequest {
|
|
227
|
+
return new VerifyPasswordLessRequest().fromJson(jsonValue, options);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VerifyPasswordLessRequest {
|
|
231
|
+
return new VerifyPasswordLessRequest().fromJsonString(jsonString, options);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
static equals(a: VerifyPasswordLessRequest | PlainMessage<VerifyPasswordLessRequest> | undefined, b: VerifyPasswordLessRequest | PlainMessage<VerifyPasswordLessRequest> | undefined): boolean {
|
|
235
|
+
return proto3.util.equals(VerifyPasswordLessRequest, a, b);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* @generated from message scalekit.v1.auth.passwordless.ResendPasswordlessRequest
|
|
241
|
+
*/
|
|
242
|
+
export class ResendPasswordlessRequest extends Message<ResendPasswordlessRequest> {
|
|
243
|
+
/**
|
|
244
|
+
* @generated from field: string auth_request_id = 1;
|
|
245
|
+
*/
|
|
246
|
+
authRequestId = "";
|
|
247
|
+
|
|
248
|
+
constructor(data?: PartialMessage<ResendPasswordlessRequest>) {
|
|
249
|
+
super();
|
|
250
|
+
proto3.util.initPartial(data, this);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
254
|
+
static readonly typeName = "scalekit.v1.auth.passwordless.ResendPasswordlessRequest";
|
|
255
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
256
|
+
{ no: 1, name: "auth_request_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
257
|
+
]);
|
|
258
|
+
|
|
259
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ResendPasswordlessRequest {
|
|
260
|
+
return new ResendPasswordlessRequest().fromBinary(bytes, options);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ResendPasswordlessRequest {
|
|
264
|
+
return new ResendPasswordlessRequest().fromJson(jsonValue, options);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ResendPasswordlessRequest {
|
|
268
|
+
return new ResendPasswordlessRequest().fromJsonString(jsonString, options);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
static equals(a: ResendPasswordlessRequest | PlainMessage<ResendPasswordlessRequest> | undefined, b: ResendPasswordlessRequest | PlainMessage<ResendPasswordlessRequest> | undefined): boolean {
|
|
272
|
+
return proto3.util.equals(ResendPasswordlessRequest, a, b);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* @generated from message scalekit.v1.auth.passwordless.VerifyPasswordLessResponse
|
|
278
|
+
*/
|
|
279
|
+
export class VerifyPasswordLessResponse extends Message<VerifyPasswordLessResponse> {
|
|
280
|
+
/**
|
|
281
|
+
* @generated from field: string email = 1;
|
|
282
|
+
*/
|
|
283
|
+
email = "";
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* @generated from field: optional string state = 2;
|
|
287
|
+
*/
|
|
288
|
+
state?: string;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* @generated from field: optional scalekit.v1.auth.passwordless.TemplateType template = 3;
|
|
292
|
+
*/
|
|
293
|
+
template?: TemplateType;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* @generated from field: scalekit.v1.auth.passwordless.PasswordlessType passwordless_type = 4;
|
|
297
|
+
*/
|
|
298
|
+
passwordlessType = PasswordlessType.PASSWORDLESS_TYPE_UNSPECIFIED;
|
|
299
|
+
|
|
300
|
+
constructor(data?: PartialMessage<VerifyPasswordLessResponse>) {
|
|
301
|
+
super();
|
|
302
|
+
proto3.util.initPartial(data, this);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
306
|
+
static readonly typeName = "scalekit.v1.auth.passwordless.VerifyPasswordLessResponse";
|
|
307
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
308
|
+
{ no: 1, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
309
|
+
{ no: 2, name: "state", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
310
|
+
{ no: 3, name: "template", kind: "enum", T: proto3.getEnumType(TemplateType), opt: true },
|
|
311
|
+
{ no: 4, name: "passwordless_type", kind: "enum", T: proto3.getEnumType(PasswordlessType) },
|
|
312
|
+
]);
|
|
313
|
+
|
|
314
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VerifyPasswordLessResponse {
|
|
315
|
+
return new VerifyPasswordLessResponse().fromBinary(bytes, options);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VerifyPasswordLessResponse {
|
|
319
|
+
return new VerifyPasswordLessResponse().fromJson(jsonValue, options);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VerifyPasswordLessResponse {
|
|
323
|
+
return new VerifyPasswordLessResponse().fromJsonString(jsonString, options);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
static equals(a: VerifyPasswordLessResponse | PlainMessage<VerifyPasswordLessResponse> | undefined, b: VerifyPasswordLessResponse | PlainMessage<VerifyPasswordLessResponse> | undefined): boolean {
|
|
327
|
+
return proto3.util.equals(VerifyPasswordLessResponse, a, b);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
// @ts-nocheck
|
|
5
5
|
|
|
6
|
-
import { CreateConnectionRequest, CreateConnectionResponse, CreateEnvironmentConnectionRequest, DeleteConnectionRequest, DeleteEnvironmentConnectionRequest, GetConnectionRequest, GetConnectionResponse, GetEnvironmentConnectionRequest, GetProvidersRequest, GetProvidersResponse, ListConnectionsRequest, ListConnectionsResponse, ToggleConnectionRequest, ToggleConnectionResponse, ToggleEnvironmentConnectionRequest, UpdateConnectionRequest, UpdateConnectionResponse, UpdateEnvironmentConnectionRequest } from "./connections_pb.js";
|
|
6
|
+
import { CreateConnectionRequest, CreateConnectionResponse, CreateEnvironmentConnectionRequest, DeleteConnectionRequest, DeleteEnvironmentConnectionRequest, GetConnectionRequest, GetConnectionResponse, GetConnectionTestResultRequest, GetConnectionTestResultResponse, GetEnvironmentConnectionRequest, GetProvidersRequest, GetProvidersResponse, ListConnectionsRequest, ListConnectionsResponse, ToggleConnectionRequest, ToggleConnectionResponse, ToggleEnvironmentConnectionRequest, UpdateConnectionRequest, UpdateConnectionResponse, UpdateEnvironmentConnectionRequest } from "./connections_pb.js";
|
|
7
7
|
import { Empty, MethodKind } from "@bufbuild/protobuf";
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -138,6 +138,15 @@ export const ConnectionService = {
|
|
|
138
138
|
O: ToggleConnectionResponse,
|
|
139
139
|
kind: MethodKind.Unary,
|
|
140
140
|
},
|
|
141
|
+
/**
|
|
142
|
+
* @generated from rpc scalekit.v1.connections.ConnectionService.GetConnectionTestResult
|
|
143
|
+
*/
|
|
144
|
+
getConnectionTestResult: {
|
|
145
|
+
name: "GetConnectionTestResult",
|
|
146
|
+
I: GetConnectionTestResultRequest,
|
|
147
|
+
O: GetConnectionTestResultResponse,
|
|
148
|
+
kind: MethodKind.Unary,
|
|
149
|
+
},
|
|
141
150
|
}
|
|
142
151
|
} as const;
|
|
143
152
|
|