@fonoster/sdk 0.9.19 → 0.9.20
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/node/Users.d.ts +19 -1
- package/dist/node/Users.js +27 -0
- package/dist/node/client/types/IdentityClient.d.ts +2 -1
- package/dist/node/generated/node/identity_grpc_pb.js +22 -0
- package/dist/node/generated/node/identity_pb.js +152 -0
- package/dist/node/generated/web/IdentityServiceClientPb.ts +43 -0
- package/dist/node/generated/web/identity_pb.d.ts +18 -0
- package/dist/node/generated/web/identity_pb.js +152 -0
- package/dist/node/tsconfig.tsbuildinfo +1 -1
- package/dist/web/fonoster.min.js +1 -1
- package/dist/web/index.esm.js +1 -1
- package/package.json +4 -4
package/dist/node/Users.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseApiObject, CreateUserRequest, ResetPasswordRequest, UpdateUserRequest, User } from "@fonoster/types";
|
|
1
|
+
import { BaseApiObject, CreateUserRequest, ResetPasswordRequest, UpdateUserRequest, User, CreateUserWithOauth2CodeRequest, ExchangeCredentialsResponse } from "@fonoster/types";
|
|
2
2
|
import { FonosterClient } from "./client/types";
|
|
3
3
|
/**
|
|
4
4
|
* @classdesc Fonoster Users, part of the Fonoster Identity subsystem,
|
|
@@ -57,6 +57,24 @@ declare class Users {
|
|
|
57
57
|
* .catch(console.error); // an error occurred
|
|
58
58
|
*/
|
|
59
59
|
createUser(request: CreateUserRequest): Promise<BaseApiObject>;
|
|
60
|
+
/**
|
|
61
|
+
* Create a new User using an OAuth2 code and return the id, access, and refresh tokens for the User.
|
|
62
|
+
*
|
|
63
|
+
* @param {CreateUserWithOauth2CodeRequest} request - The request object with the OAuth2 code
|
|
64
|
+
* @param {string} request.code - The OAuth2 code of the User
|
|
65
|
+
* @return {Promise<ExchangeCredentialsResponse>} - The response object that contains the id, access, and refresh tokens
|
|
66
|
+
* @example
|
|
67
|
+
* const users = new SDK.Users(client); // Existing client object
|
|
68
|
+
*
|
|
69
|
+
* const request = {
|
|
70
|
+
* code: "fd4d78beb31aa25b93de"
|
|
71
|
+
* };
|
|
72
|
+
*
|
|
73
|
+
* users.createUserWithOauth2Code(request)
|
|
74
|
+
* .then(console.log) // successful response
|
|
75
|
+
* .catch(console.error); // an error occurred
|
|
76
|
+
*/
|
|
77
|
+
createUserWithOauth2Code(request: CreateUserWithOauth2CodeRequest): Promise<ExchangeCredentialsResponse>;
|
|
60
78
|
/**
|
|
61
79
|
* Retrieves an existing User in the Workspace.
|
|
62
80
|
*
|
package/dist/node/Users.js
CHANGED
|
@@ -70,6 +70,33 @@ class Users {
|
|
|
70
70
|
request
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Create a new User using an OAuth2 code and return the id, access, and refresh tokens for the User.
|
|
75
|
+
*
|
|
76
|
+
* @param {CreateUserWithOauth2CodeRequest} request - The request object with the OAuth2 code
|
|
77
|
+
* @param {string} request.code - The OAuth2 code of the User
|
|
78
|
+
* @return {Promise<ExchangeCredentialsResponse>} - The response object that contains the id, access, and refresh tokens
|
|
79
|
+
* @example
|
|
80
|
+
* const users = new SDK.Users(client); // Existing client object
|
|
81
|
+
*
|
|
82
|
+
* const request = {
|
|
83
|
+
* code: "fd4d78beb31aa25b93de"
|
|
84
|
+
* };
|
|
85
|
+
*
|
|
86
|
+
* users.createUserWithOauth2Code(request)
|
|
87
|
+
* .then(console.log) // successful response
|
|
88
|
+
* .catch(console.error); // an error occurred
|
|
89
|
+
*/
|
|
90
|
+
async createUserWithOauth2Code(request) {
|
|
91
|
+
console.log("request", request);
|
|
92
|
+
const client = this.client.getIdentityClient();
|
|
93
|
+
return await (0, makeRpcRequest_1.makeRpcRequest)({
|
|
94
|
+
method: client.createUserWithOauth2Code.bind(client),
|
|
95
|
+
requestPBObjectConstructor: identity_pb_1.CreateUserWithOauth2CodeRequest,
|
|
96
|
+
metadata: this.client.getMetadata(),
|
|
97
|
+
request
|
|
98
|
+
});
|
|
99
|
+
}
|
|
73
100
|
/**
|
|
74
101
|
* Retrieves an existing User in the Workspace.
|
|
75
102
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateApiKeyRequest, CreateApiKeyResponse, CreateUserRequest, CreateUserResponse, CreateWorkspaceRequest, DeleteApiKeyRequest, DeleteApiKeyResponse, DeleteUserRequest, DeleteUserResponse, DeleteWorkspaceRequest, DeleteWorkspaceResponse, ExchangeApiKeyRequest, ExchangeApiKeyResponse, ExchangeCredentialsRequest, ExchangeCredentialsResponse, ExchangeOauth2CodeRequest, ExchangeOauth2CodeResponse, ExchangeRefreshTokenRequest, ExchangeRefreshTokenResponse, GetUserRequest, GetWorkspaceRequest, InviteUserToWorkspaceRequest, InviteUserToWorkspaceResponse, ListApiKeysRequest, ListApiKeysResponse, ListWorkspacesRequest, ListWorkspacesResponse, RegenerateApiKeyRequest, RegenerateApiKeyResponse, RemoveUserFromWorkspaceRequest, RemoveUserFromWorkspaceResponse, ResendWorkspaceMembershipInvitationRequest, ResendWorkspaceMembershipInvitationResponse, ListWorkspaceMembersRequest, ListWorkspaceMembersResponse, SendVerificationCodeRequest, SendResetPasswordCodeRequest, ResetPasswordRequest, UpdateUserRequest, UpdateWorkspaceRequest, UpdateWorkspaceResponse, User, VerifyCodeRequest, Workspace } from "../../generated/web/identity_pb";
|
|
1
|
+
import { CreateApiKeyRequest, CreateApiKeyResponse, CreateUserRequest, CreateUserWithOauth2CodeRequest, CreateUserResponse, CreateWorkspaceRequest, DeleteApiKeyRequest, DeleteApiKeyResponse, DeleteUserRequest, DeleteUserResponse, DeleteWorkspaceRequest, DeleteWorkspaceResponse, ExchangeApiKeyRequest, ExchangeApiKeyResponse, ExchangeCredentialsRequest, ExchangeCredentialsResponse, ExchangeOauth2CodeRequest, ExchangeOauth2CodeResponse, ExchangeRefreshTokenRequest, ExchangeRefreshTokenResponse, GetUserRequest, GetWorkspaceRequest, InviteUserToWorkspaceRequest, InviteUserToWorkspaceResponse, ListApiKeysRequest, ListApiKeysResponse, ListWorkspacesRequest, ListWorkspacesResponse, RegenerateApiKeyRequest, RegenerateApiKeyResponse, RemoveUserFromWorkspaceRequest, RemoveUserFromWorkspaceResponse, ResendWorkspaceMembershipInvitationRequest, ResendWorkspaceMembershipInvitationResponse, ListWorkspaceMembersRequest, ListWorkspaceMembersResponse, SendVerificationCodeRequest, SendResetPasswordCodeRequest, ResetPasswordRequest, UpdateUserRequest, UpdateWorkspaceRequest, UpdateWorkspaceResponse, User, VerifyCodeRequest, Workspace } from "../../generated/web/identity_pb";
|
|
2
2
|
import { ClientFunction } from "../types";
|
|
3
3
|
type IdentityClient = {
|
|
4
4
|
createApiKey: ClientFunction<CreateApiKeyRequest, CreateApiKeyResponse>;
|
|
@@ -10,6 +10,7 @@ type IdentityClient = {
|
|
|
10
10
|
exchangeOauth2Code: ClientFunction<ExchangeOauth2CodeRequest, ExchangeOauth2CodeResponse>;
|
|
11
11
|
exchangeRefreshToken: ClientFunction<ExchangeRefreshTokenRequest, ExchangeRefreshTokenResponse>;
|
|
12
12
|
createUser: ClientFunction<CreateUserRequest, CreateUserResponse>;
|
|
13
|
+
createUserWithOauth2Code: ClientFunction<CreateUserWithOauth2CodeRequest, ExchangeCredentialsResponse>;
|
|
13
14
|
getUser: ClientFunction<GetUserRequest, User>;
|
|
14
15
|
updateUser: ClientFunction<UpdateUserRequest, CreateUserResponse>;
|
|
15
16
|
deleteUser: ClientFunction<DeleteUserRequest, DeleteUserResponse>;
|
|
@@ -67,6 +67,17 @@ function deserialize_fonoster_identity_v1beta2_CreateUserResponse(buffer_arg) {
|
|
|
67
67
|
return identity_pb.CreateUserResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
function serialize_fonoster_identity_v1beta2_CreateUserWithOauth2CodeRequest(arg) {
|
|
71
|
+
if (!(arg instanceof identity_pb.CreateUserWithOauth2CodeRequest)) {
|
|
72
|
+
throw new Error('Expected argument of type fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest');
|
|
73
|
+
}
|
|
74
|
+
return Buffer.from(arg.serializeBinary());
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function deserialize_fonoster_identity_v1beta2_CreateUserWithOauth2CodeRequest(buffer_arg) {
|
|
78
|
+
return identity_pb.CreateUserWithOauth2CodeRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
79
|
+
}
|
|
80
|
+
|
|
70
81
|
function serialize_fonoster_identity_v1beta2_CreateWorkspaceRequest(arg) {
|
|
71
82
|
if (!(arg instanceof identity_pb.CreateWorkspaceRequest)) {
|
|
72
83
|
throw new Error('Expected argument of type fonoster.identity.v1beta2.CreateWorkspaceRequest');
|
|
@@ -687,6 +698,17 @@ createUser: {
|
|
|
687
698
|
responseSerialize: serialize_fonoster_identity_v1beta2_CreateUserResponse,
|
|
688
699
|
responseDeserialize: deserialize_fonoster_identity_v1beta2_CreateUserResponse,
|
|
689
700
|
},
|
|
701
|
+
createUserWithOauth2Code: {
|
|
702
|
+
path: '/fonoster.identity.v1beta2.Identity/CreateUserWithOauth2Code',
|
|
703
|
+
requestStream: false,
|
|
704
|
+
responseStream: false,
|
|
705
|
+
requestType: identity_pb.CreateUserWithOauth2CodeRequest,
|
|
706
|
+
responseType: identity_pb.ExchangeCredentialsResponse,
|
|
707
|
+
requestSerialize: serialize_fonoster_identity_v1beta2_CreateUserWithOauth2CodeRequest,
|
|
708
|
+
requestDeserialize: deserialize_fonoster_identity_v1beta2_CreateUserWithOauth2CodeRequest,
|
|
709
|
+
responseSerialize: serialize_fonoster_identity_v1beta2_ExchangeCredentialsResponse,
|
|
710
|
+
responseDeserialize: deserialize_fonoster_identity_v1beta2_ExchangeCredentialsResponse,
|
|
711
|
+
},
|
|
690
712
|
getUser: {
|
|
691
713
|
path: '/fonoster.identity.v1beta2.Identity/GetUser',
|
|
692
714
|
requestStream: false,
|
|
@@ -29,6 +29,7 @@ goog.exportSymbol('proto.fonoster.identity.v1beta2.CreateApiKeyRequest', null, g
|
|
|
29
29
|
goog.exportSymbol('proto.fonoster.identity.v1beta2.CreateApiKeyResponse', null, global);
|
|
30
30
|
goog.exportSymbol('proto.fonoster.identity.v1beta2.CreateUserRequest', null, global);
|
|
31
31
|
goog.exportSymbol('proto.fonoster.identity.v1beta2.CreateUserResponse', null, global);
|
|
32
|
+
goog.exportSymbol('proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest', null, global);
|
|
32
33
|
goog.exportSymbol('proto.fonoster.identity.v1beta2.CreateWorkspaceRequest', null, global);
|
|
33
34
|
goog.exportSymbol('proto.fonoster.identity.v1beta2.CreateWorkspaceResponse', null, global);
|
|
34
35
|
goog.exportSymbol('proto.fonoster.identity.v1beta2.DeleteApiKeyRequest', null, global);
|
|
@@ -517,6 +518,27 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
517
518
|
*/
|
|
518
519
|
proto.fonoster.identity.v1beta2.CreateUserResponse.displayName = 'proto.fonoster.identity.v1beta2.CreateUserResponse';
|
|
519
520
|
}
|
|
521
|
+
/**
|
|
522
|
+
* Generated by JsPbCodeGenerator.
|
|
523
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
524
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
525
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
526
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
527
|
+
* valid.
|
|
528
|
+
* @extends {jspb.Message}
|
|
529
|
+
* @constructor
|
|
530
|
+
*/
|
|
531
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest = function(opt_data) {
|
|
532
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
533
|
+
};
|
|
534
|
+
goog.inherits(proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest, jspb.Message);
|
|
535
|
+
if (goog.DEBUG && !COMPILED) {
|
|
536
|
+
/**
|
|
537
|
+
* @public
|
|
538
|
+
* @override
|
|
539
|
+
*/
|
|
540
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.displayName = 'proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest';
|
|
541
|
+
}
|
|
520
542
|
/**
|
|
521
543
|
* Generated by JsPbCodeGenerator.
|
|
522
544
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
@@ -4600,6 +4622,136 @@ proto.fonoster.identity.v1beta2.CreateUserResponse.prototype.setRef = function(v
|
|
|
4600
4622
|
|
|
4601
4623
|
|
|
4602
4624
|
|
|
4625
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
4626
|
+
/**
|
|
4627
|
+
* Creates an object representation of this proto.
|
|
4628
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
4629
|
+
* Optional fields that are not set will be set to undefined.
|
|
4630
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
4631
|
+
* For the list of reserved names please see:
|
|
4632
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
4633
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
4634
|
+
* JSPB instance for transitional soy proto support:
|
|
4635
|
+
* http://goto/soy-param-migration
|
|
4636
|
+
* @return {!Object}
|
|
4637
|
+
*/
|
|
4638
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.prototype.toObject = function(opt_includeInstance) {
|
|
4639
|
+
return proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.toObject(opt_includeInstance, this);
|
|
4640
|
+
};
|
|
4641
|
+
|
|
4642
|
+
|
|
4643
|
+
/**
|
|
4644
|
+
* Static version of the {@see toObject} method.
|
|
4645
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
4646
|
+
* the JSPB instance for transitional soy proto support:
|
|
4647
|
+
* http://goto/soy-param-migration
|
|
4648
|
+
* @param {!proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest} msg The msg instance to transform.
|
|
4649
|
+
* @return {!Object}
|
|
4650
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
4651
|
+
*/
|
|
4652
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.toObject = function(includeInstance, msg) {
|
|
4653
|
+
var f, obj = {
|
|
4654
|
+
code: jspb.Message.getFieldWithDefault(msg, 1, "")
|
|
4655
|
+
};
|
|
4656
|
+
|
|
4657
|
+
if (includeInstance) {
|
|
4658
|
+
obj.$jspbMessageInstance = msg;
|
|
4659
|
+
}
|
|
4660
|
+
return obj;
|
|
4661
|
+
};
|
|
4662
|
+
}
|
|
4663
|
+
|
|
4664
|
+
|
|
4665
|
+
/**
|
|
4666
|
+
* Deserializes binary data (in protobuf wire format).
|
|
4667
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
4668
|
+
* @return {!proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest}
|
|
4669
|
+
*/
|
|
4670
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.deserializeBinary = function(bytes) {
|
|
4671
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
4672
|
+
var msg = new proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest;
|
|
4673
|
+
return proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.deserializeBinaryFromReader(msg, reader);
|
|
4674
|
+
};
|
|
4675
|
+
|
|
4676
|
+
|
|
4677
|
+
/**
|
|
4678
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
4679
|
+
* given reader into the given message object.
|
|
4680
|
+
* @param {!proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest} msg The message object to deserialize into.
|
|
4681
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
4682
|
+
* @return {!proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest}
|
|
4683
|
+
*/
|
|
4684
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
4685
|
+
while (reader.nextField()) {
|
|
4686
|
+
if (reader.isEndGroup()) {
|
|
4687
|
+
break;
|
|
4688
|
+
}
|
|
4689
|
+
var field = reader.getFieldNumber();
|
|
4690
|
+
switch (field) {
|
|
4691
|
+
case 1:
|
|
4692
|
+
var value = /** @type {string} */ (reader.readString());
|
|
4693
|
+
msg.setCode(value);
|
|
4694
|
+
break;
|
|
4695
|
+
default:
|
|
4696
|
+
reader.skipField();
|
|
4697
|
+
break;
|
|
4698
|
+
}
|
|
4699
|
+
}
|
|
4700
|
+
return msg;
|
|
4701
|
+
};
|
|
4702
|
+
|
|
4703
|
+
|
|
4704
|
+
/**
|
|
4705
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
4706
|
+
* @return {!Uint8Array}
|
|
4707
|
+
*/
|
|
4708
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.prototype.serializeBinary = function() {
|
|
4709
|
+
var writer = new jspb.BinaryWriter();
|
|
4710
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.serializeBinaryToWriter(this, writer);
|
|
4711
|
+
return writer.getResultBuffer();
|
|
4712
|
+
};
|
|
4713
|
+
|
|
4714
|
+
|
|
4715
|
+
/**
|
|
4716
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
4717
|
+
* format), writing to the given BinaryWriter.
|
|
4718
|
+
* @param {!proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest} message
|
|
4719
|
+
* @param {!jspb.BinaryWriter} writer
|
|
4720
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
4721
|
+
*/
|
|
4722
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.serializeBinaryToWriter = function(message, writer) {
|
|
4723
|
+
var f = undefined;
|
|
4724
|
+
f = message.getCode();
|
|
4725
|
+
if (f.length > 0) {
|
|
4726
|
+
writer.writeString(
|
|
4727
|
+
1,
|
|
4728
|
+
f
|
|
4729
|
+
);
|
|
4730
|
+
}
|
|
4731
|
+
};
|
|
4732
|
+
|
|
4733
|
+
|
|
4734
|
+
/**
|
|
4735
|
+
* optional string code = 1;
|
|
4736
|
+
* @return {string}
|
|
4737
|
+
*/
|
|
4738
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.prototype.getCode = function() {
|
|
4739
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
4740
|
+
};
|
|
4741
|
+
|
|
4742
|
+
|
|
4743
|
+
/**
|
|
4744
|
+
* @param {string} value
|
|
4745
|
+
* @return {!proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest} returns this
|
|
4746
|
+
*/
|
|
4747
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.prototype.setCode = function(value) {
|
|
4748
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
4749
|
+
};
|
|
4750
|
+
|
|
4751
|
+
|
|
4752
|
+
|
|
4753
|
+
|
|
4754
|
+
|
|
4603
4755
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
4604
4756
|
/**
|
|
4605
4757
|
* Creates an object representation of this proto.
|
|
@@ -470,6 +470,49 @@ export class IdentityClient {
|
|
|
470
470
|
this.methodDescriptorCreateUser);
|
|
471
471
|
}
|
|
472
472
|
|
|
473
|
+
methodDescriptorCreateUserWithOauth2Code = new grpcWeb.MethodDescriptor(
|
|
474
|
+
'/fonoster.identity.v1beta2.Identity/CreateUserWithOauth2Code',
|
|
475
|
+
grpcWeb.MethodType.UNARY,
|
|
476
|
+
identity_pb.CreateUserWithOauth2CodeRequest,
|
|
477
|
+
identity_pb.ExchangeCredentialsResponse,
|
|
478
|
+
(request: identity_pb.CreateUserWithOauth2CodeRequest) => {
|
|
479
|
+
return request.serializeBinary();
|
|
480
|
+
},
|
|
481
|
+
identity_pb.ExchangeCredentialsResponse.deserializeBinary
|
|
482
|
+
);
|
|
483
|
+
|
|
484
|
+
createUserWithOauth2Code(
|
|
485
|
+
request: identity_pb.CreateUserWithOauth2CodeRequest,
|
|
486
|
+
metadata?: grpcWeb.Metadata | null): Promise<identity_pb.ExchangeCredentialsResponse>;
|
|
487
|
+
|
|
488
|
+
createUserWithOauth2Code(
|
|
489
|
+
request: identity_pb.CreateUserWithOauth2CodeRequest,
|
|
490
|
+
metadata: grpcWeb.Metadata | null,
|
|
491
|
+
callback: (err: grpcWeb.RpcError,
|
|
492
|
+
response: identity_pb.ExchangeCredentialsResponse) => void): grpcWeb.ClientReadableStream<identity_pb.ExchangeCredentialsResponse>;
|
|
493
|
+
|
|
494
|
+
createUserWithOauth2Code(
|
|
495
|
+
request: identity_pb.CreateUserWithOauth2CodeRequest,
|
|
496
|
+
metadata?: grpcWeb.Metadata | null,
|
|
497
|
+
callback?: (err: grpcWeb.RpcError,
|
|
498
|
+
response: identity_pb.ExchangeCredentialsResponse) => void) {
|
|
499
|
+
if (callback !== undefined) {
|
|
500
|
+
return this.client_.rpcCall(
|
|
501
|
+
this.hostname_ +
|
|
502
|
+
'/fonoster.identity.v1beta2.Identity/CreateUserWithOauth2Code',
|
|
503
|
+
request,
|
|
504
|
+
metadata || {},
|
|
505
|
+
this.methodDescriptorCreateUserWithOauth2Code,
|
|
506
|
+
callback);
|
|
507
|
+
}
|
|
508
|
+
return this.client_.unaryCall(
|
|
509
|
+
this.hostname_ +
|
|
510
|
+
'/fonoster.identity.v1beta2.Identity/CreateUserWithOauth2Code',
|
|
511
|
+
request,
|
|
512
|
+
metadata || {},
|
|
513
|
+
this.methodDescriptorCreateUserWithOauth2Code);
|
|
514
|
+
}
|
|
515
|
+
|
|
473
516
|
methodDescriptorGetUser = new grpcWeb.MethodDescriptor(
|
|
474
517
|
'/fonoster.identity.v1beta2.Identity/GetUser',
|
|
475
518
|
grpcWeb.MethodType.UNARY,
|
|
@@ -473,6 +473,24 @@ export namespace CreateUserResponse {
|
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
475
|
|
|
476
|
+
export class CreateUserWithOauth2CodeRequest extends jspb.Message {
|
|
477
|
+
getCode(): string;
|
|
478
|
+
setCode(value: string): CreateUserWithOauth2CodeRequest;
|
|
479
|
+
|
|
480
|
+
serializeBinary(): Uint8Array;
|
|
481
|
+
toObject(includeInstance?: boolean): CreateUserWithOauth2CodeRequest.AsObject;
|
|
482
|
+
static toObject(includeInstance: boolean, msg: CreateUserWithOauth2CodeRequest): CreateUserWithOauth2CodeRequest.AsObject;
|
|
483
|
+
static serializeBinaryToWriter(message: CreateUserWithOauth2CodeRequest, writer: jspb.BinaryWriter): void;
|
|
484
|
+
static deserializeBinary(bytes: Uint8Array): CreateUserWithOauth2CodeRequest;
|
|
485
|
+
static deserializeBinaryFromReader(message: CreateUserWithOauth2CodeRequest, reader: jspb.BinaryReader): CreateUserWithOauth2CodeRequest;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
export namespace CreateUserWithOauth2CodeRequest {
|
|
489
|
+
export type AsObject = {
|
|
490
|
+
code: string,
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
476
494
|
export class GetUserRequest extends jspb.Message {
|
|
477
495
|
getRef(): string;
|
|
478
496
|
setRef(value: string): GetUserRequest;
|
|
@@ -29,6 +29,7 @@ goog.exportSymbol('proto.fonoster.identity.v1beta2.CreateApiKeyRequest', null, g
|
|
|
29
29
|
goog.exportSymbol('proto.fonoster.identity.v1beta2.CreateApiKeyResponse', null, global);
|
|
30
30
|
goog.exportSymbol('proto.fonoster.identity.v1beta2.CreateUserRequest', null, global);
|
|
31
31
|
goog.exportSymbol('proto.fonoster.identity.v1beta2.CreateUserResponse', null, global);
|
|
32
|
+
goog.exportSymbol('proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest', null, global);
|
|
32
33
|
goog.exportSymbol('proto.fonoster.identity.v1beta2.CreateWorkspaceRequest', null, global);
|
|
33
34
|
goog.exportSymbol('proto.fonoster.identity.v1beta2.CreateWorkspaceResponse', null, global);
|
|
34
35
|
goog.exportSymbol('proto.fonoster.identity.v1beta2.DeleteApiKeyRequest', null, global);
|
|
@@ -517,6 +518,27 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
517
518
|
*/
|
|
518
519
|
proto.fonoster.identity.v1beta2.CreateUserResponse.displayName = 'proto.fonoster.identity.v1beta2.CreateUserResponse';
|
|
519
520
|
}
|
|
521
|
+
/**
|
|
522
|
+
* Generated by JsPbCodeGenerator.
|
|
523
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
524
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
525
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
526
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
527
|
+
* valid.
|
|
528
|
+
* @extends {jspb.Message}
|
|
529
|
+
* @constructor
|
|
530
|
+
*/
|
|
531
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest = function(opt_data) {
|
|
532
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
533
|
+
};
|
|
534
|
+
goog.inherits(proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest, jspb.Message);
|
|
535
|
+
if (goog.DEBUG && !COMPILED) {
|
|
536
|
+
/**
|
|
537
|
+
* @public
|
|
538
|
+
* @override
|
|
539
|
+
*/
|
|
540
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.displayName = 'proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest';
|
|
541
|
+
}
|
|
520
542
|
/**
|
|
521
543
|
* Generated by JsPbCodeGenerator.
|
|
522
544
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
@@ -4600,6 +4622,136 @@ proto.fonoster.identity.v1beta2.CreateUserResponse.prototype.setRef = function(v
|
|
|
4600
4622
|
|
|
4601
4623
|
|
|
4602
4624
|
|
|
4625
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
4626
|
+
/**
|
|
4627
|
+
* Creates an object representation of this proto.
|
|
4628
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
4629
|
+
* Optional fields that are not set will be set to undefined.
|
|
4630
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
4631
|
+
* For the list of reserved names please see:
|
|
4632
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
4633
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
4634
|
+
* JSPB instance for transitional soy proto support:
|
|
4635
|
+
* http://goto/soy-param-migration
|
|
4636
|
+
* @return {!Object}
|
|
4637
|
+
*/
|
|
4638
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.prototype.toObject = function(opt_includeInstance) {
|
|
4639
|
+
return proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.toObject(opt_includeInstance, this);
|
|
4640
|
+
};
|
|
4641
|
+
|
|
4642
|
+
|
|
4643
|
+
/**
|
|
4644
|
+
* Static version of the {@see toObject} method.
|
|
4645
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
4646
|
+
* the JSPB instance for transitional soy proto support:
|
|
4647
|
+
* http://goto/soy-param-migration
|
|
4648
|
+
* @param {!proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest} msg The msg instance to transform.
|
|
4649
|
+
* @return {!Object}
|
|
4650
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
4651
|
+
*/
|
|
4652
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.toObject = function(includeInstance, msg) {
|
|
4653
|
+
var f, obj = {
|
|
4654
|
+
code: jspb.Message.getFieldWithDefault(msg, 1, "")
|
|
4655
|
+
};
|
|
4656
|
+
|
|
4657
|
+
if (includeInstance) {
|
|
4658
|
+
obj.$jspbMessageInstance = msg;
|
|
4659
|
+
}
|
|
4660
|
+
return obj;
|
|
4661
|
+
};
|
|
4662
|
+
}
|
|
4663
|
+
|
|
4664
|
+
|
|
4665
|
+
/**
|
|
4666
|
+
* Deserializes binary data (in protobuf wire format).
|
|
4667
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
4668
|
+
* @return {!proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest}
|
|
4669
|
+
*/
|
|
4670
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.deserializeBinary = function(bytes) {
|
|
4671
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
4672
|
+
var msg = new proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest;
|
|
4673
|
+
return proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.deserializeBinaryFromReader(msg, reader);
|
|
4674
|
+
};
|
|
4675
|
+
|
|
4676
|
+
|
|
4677
|
+
/**
|
|
4678
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
4679
|
+
* given reader into the given message object.
|
|
4680
|
+
* @param {!proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest} msg The message object to deserialize into.
|
|
4681
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
4682
|
+
* @return {!proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest}
|
|
4683
|
+
*/
|
|
4684
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
4685
|
+
while (reader.nextField()) {
|
|
4686
|
+
if (reader.isEndGroup()) {
|
|
4687
|
+
break;
|
|
4688
|
+
}
|
|
4689
|
+
var field = reader.getFieldNumber();
|
|
4690
|
+
switch (field) {
|
|
4691
|
+
case 1:
|
|
4692
|
+
var value = /** @type {string} */ (reader.readString());
|
|
4693
|
+
msg.setCode(value);
|
|
4694
|
+
break;
|
|
4695
|
+
default:
|
|
4696
|
+
reader.skipField();
|
|
4697
|
+
break;
|
|
4698
|
+
}
|
|
4699
|
+
}
|
|
4700
|
+
return msg;
|
|
4701
|
+
};
|
|
4702
|
+
|
|
4703
|
+
|
|
4704
|
+
/**
|
|
4705
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
4706
|
+
* @return {!Uint8Array}
|
|
4707
|
+
*/
|
|
4708
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.prototype.serializeBinary = function() {
|
|
4709
|
+
var writer = new jspb.BinaryWriter();
|
|
4710
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.serializeBinaryToWriter(this, writer);
|
|
4711
|
+
return writer.getResultBuffer();
|
|
4712
|
+
};
|
|
4713
|
+
|
|
4714
|
+
|
|
4715
|
+
/**
|
|
4716
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
4717
|
+
* format), writing to the given BinaryWriter.
|
|
4718
|
+
* @param {!proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest} message
|
|
4719
|
+
* @param {!jspb.BinaryWriter} writer
|
|
4720
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
4721
|
+
*/
|
|
4722
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.serializeBinaryToWriter = function(message, writer) {
|
|
4723
|
+
var f = undefined;
|
|
4724
|
+
f = message.getCode();
|
|
4725
|
+
if (f.length > 0) {
|
|
4726
|
+
writer.writeString(
|
|
4727
|
+
1,
|
|
4728
|
+
f
|
|
4729
|
+
);
|
|
4730
|
+
}
|
|
4731
|
+
};
|
|
4732
|
+
|
|
4733
|
+
|
|
4734
|
+
/**
|
|
4735
|
+
* optional string code = 1;
|
|
4736
|
+
* @return {string}
|
|
4737
|
+
*/
|
|
4738
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.prototype.getCode = function() {
|
|
4739
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
4740
|
+
};
|
|
4741
|
+
|
|
4742
|
+
|
|
4743
|
+
/**
|
|
4744
|
+
* @param {string} value
|
|
4745
|
+
* @return {!proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest} returns this
|
|
4746
|
+
*/
|
|
4747
|
+
proto.fonoster.identity.v1beta2.CreateUserWithOauth2CodeRequest.prototype.setCode = function(value) {
|
|
4748
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
4749
|
+
};
|
|
4750
|
+
|
|
4751
|
+
|
|
4752
|
+
|
|
4753
|
+
|
|
4754
|
+
|
|
4603
4755
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
4604
4756
|
/**
|
|
4605
4757
|
* Creates an object representation of this proto.
|