user_account.proto
path mgmt/v1alpha1/user_account.proto
package mgmt.v1alpha1
Messages
AcceptTeamAccountInviteRequest
Name | Type | Description |
---|---|---|
token | string | The token that the user will use to accept the invite. |
AcceptTeamAccountInviteResponse
Name | Type | Description |
---|---|---|
account | UserAccount | The account that the user was invited to. |
AccountInvite
Name | Type | Description |
---|---|---|
id | string | The unique identifier of the invite. |
account_id | string | The unique identifier of the account to invite the user to. |
sender_user_id | string | The unique identifier of the user that sent the invite. |
email | string | The email of the user to invite. |
token | string | The token that the user will use to accept the invite. |
accepted | bool | Whether or not the invite has been accepted. |
created_at | google.protobuf.Timestamp | The time when the invite was created. |
updated_at | google.protobuf.Timestamp | The time when the invite was last updated. |
expires_at | google.protobuf.Timestamp | The time when the invite expires. |
role | AccountRole | The role of the user to invite. Only used if RBAC is enabled. |
AccountOnboardingConfig
Name | Type | Description |
---|---|---|
has_completed_onboarding | bool | Whether or not the account has completed onboarding. |
AccountTemporalConfig
Name | Type | Description |
---|---|---|
url | string | The temporal url for the account. |
namespace | string | The temporal namespace for the account. |
sync_job_queue_name | string | The temporal sync job queue name for the account. |
AccountUser
Name | Type | Description |
---|---|---|
id | string | The unique identifier of the user. |
name | string | The name of the user (if there is one) |
image | string | The image of the user (if there is one) |
email | string | The email of the user. |
role | AccountRole | The role of the user in the account. If RBAC is not enabled, will be unspecified. |
ConvertPersonalToTeamAccountRequest
Name | Type | Description |
---|---|---|
name | string | The name of the team account |
account_id | optional string | Optionally provide the personal account to convert. This may be used in break-glass scenarios where there are multiple personal accounts And we want to convert one of them. If not provided, it will find the first one and convert it, leaving the other. |
ConvertPersonalToTeamAccountResponse
Name | Type | Description |
---|---|---|
account_id | string | The id of the team account (will be the same identifier as the personal account) |
checkout_session_url | optional string | If NeosyncCloud, will respond with a checkout session url so they can setup billing |
new_personal_account_id | string | The identifier of the newly created personal account |
CreateTeamAccountRequest
Name | Type | Description |
---|---|---|
name | string | The name of the team account |
CreateTeamAccountResponse
Name | Type | Description |
---|---|---|
account_id | string | The unique identifier of the team account that was created. |
checkout_session_url | optional string | If NeosyncCloud, will respond with a checkout session url so they can setup billing |
GetAccountBillingCheckoutSessionRequest
Name | Type | Description |
---|---|---|
account_id | string | The unique identifier of the account to get the billing checkout session for. |
GetAccountBillingCheckoutSessionResponse
Name | Type | Description |
---|---|---|
checkout_session_url | string | The url that will be redirected to |
GetAccountBillingPortalSessionRequest
Name | Type | Description |
---|---|---|
account_id | string | The unique identifier of the account to get the billing portal session for. |
GetAccountBillingPortalSessionResponse
Name | Type | Description |
---|---|---|
portal_session_url | string | The url that will be redirected to |
GetAccountOnboardingConfigRequest
Name | Type | Description |
---|---|---|
account_id | string | The unique identifier of the account to get the onboarding config for. |
GetAccountOnboardingConfigResponse
Name | Type | Description |
---|---|---|
config | AccountOnboardingConfig | The onboarding config for the account. |
GetAccountStatusRequest
Name | Type | Description |
---|---|---|
account_id | string | The unique identifier of the account to get the status for. |
GetAccountStatusResponse
Name | Type | Description |
---|---|---|
used_record_count | uint64 | A count of the currently used records for the current billing period. This may go over the allowed record count depending on when the record count is polled by the metric system. |
allowed_record_count | optional uint64 | The allowed record count. It will be null if there is no limit. |
subscription_status | BillingStatus | The current subscription status determined by the billing system. |
GetAccountTemporalConfigRequest
Name | Type | Description |
---|---|---|
account_id | string | The unique identifier of the account to get the temporal config for. |
GetAccountTemporalConfigResponse
Name | Type | Description |
---|---|---|
config | AccountTemporalConfig | The temporal config for the account. |
GetBillingAccountsRequest
Name | Type | Description |
---|---|---|
account_ids | repeated string | Optional list of account identifiers to filter the response by |
GetBillingAccountsResponse
Name | Type | Description |
---|---|---|
accounts | repeated UserAccount | The list of accounts that have a billing id. |
GetSystemInformationRequest
Name | Type | Description |
---|
GetSystemInformationResponse
Name | Type | Description |
---|---|---|
version | string | The Git tagged version |
commit | string | The Git commit |
compiler | string | The Go compiler flag that was used to build this version of Neosync |
platform | string | The Go platform flag that was used to build this version of Neosync |
build_date | google.protobuf.Timestamp | The time when the build was created |
license | SystemLicense | The license information for the system |
GetTeamAccountInvitesRequest
Name | Type | Description |
---|---|---|
account_id | string | The unique identifier of the account to get the invites for. |
GetTeamAccountInvitesResponse
Name | Type | Description |
---|---|---|
invites | repeated AccountInvite | The list of invites for the account. |
GetTeamAccountMembersRequest
Name | Type | Description |
---|---|---|
account_id | string | The unique identifier of the account to get the members for. |
GetTeamAccountMembersResponse
Name | Type | Description |
---|---|---|
users | repeated AccountUser |
GetUserAccountsRequest
Name | Type | Description |
---|
GetUserAccountsResponse
Name | Type | Description |
---|---|---|
accounts | repeated UserAccount | The list of accounts that the user belongs to. |
GetUserRequest
Name | Type | Description |
---|
GetUserResponse
Name | Type | Description |
---|---|---|
user_id | string | The unique identifier of the user that was retrieved. |
InviteUserToTeamAccountRequest
Name | Type | Description |
---|---|---|
account_id | string | The unique identifier of the account to invite the user to. |
email | string | The email of the user to invite. |
role | optional AccountRole | The role of the user to invite. Only used if RBAC is enabled. |
InviteUserToTeamAccountResponse
Name | Type | Description |
---|---|---|
invite | AccountInvite | The invite that was created. |
IsAccountStatusValidRequest
Name | Type | Description |
---|---|---|
account_id | string | The unique identifier of the account to get the status for. |
requested_record_count | optional uint64 | An optional count of records to be added to the current usage for validation. |
IsAccountStatusValidResponse
Name | Type | Description |
---|---|---|
is_valid | bool | Whether or not the account is valid. |
reason | optional string | If the account is not valid, a reason for why may be provided. |
should_poll | bool | Whether or not the process should decide to continue polling for validitiy updates |
account_status | AccountStatus | The current status of the account. Default is valid. |
trial_expires_at | optional google.protobuf.Timestamp | The time when the trial expires |
IsUserInAccountRequest
Name | Type | Description |
---|---|---|
account_id | string | The unique identifier of the account to check if the user is in. |
IsUserInAccountResponse
Name | Type | Description |
---|---|---|
ok | bool | Whether or not the user is in the account. |
RemoveTeamAccountInviteRequest
Name | Type | Description |
---|---|---|
id | string | The unique identifier of the invite to remove. |
RemoveTeamAccountInviteResponse
Name | Type | Description |
---|
RemoveTeamAccountMemberRequest
Name | Type | Description |
---|---|---|
user_id | string | The unique identifier of the user to remove from the account. |
account_id | string | The unique identifier of the account to remove the user from. |
RemoveTeamAccountMemberResponse
Name | Type | Description |
---|
SetAccountOnboardingConfigRequest
Name | Type | Description |
---|---|---|
account_id | string | The unique identifier of the account to set the onboarding config for. |
config | AccountOnboardingConfig | The onboarding config to set for the account. |
SetAccountOnboardingConfigResponse
Name | Type | Description |
---|---|---|
config | AccountOnboardingConfig | The onboarding config that was set for the account. |
SetAccountTemporalConfigRequest
Name | Type | Description |
---|---|---|
account_id | string | The unique identifier of the account to set the temporal config for. |
config | AccountTemporalConfig | The temporal config to set for the account. |
SetAccountTemporalConfigResponse
Name | Type | Description |
---|---|---|
config | AccountTemporalConfig | The temporal config that was set for the account. |
SetBillingMeterEventRequest
Name | Type | Description |
---|---|---|
account_id | string | The unique identifier of the account to apply this metered event to. |
event_name | string | The metered event name |
value | string | The value of the meter for the given time |
event_id | string | The unique identifier of this metered event |
timestamp | optional uint64 | The time of the event in Unix Epoch format. Defaults to the current timestamp if not specified. |
SetBillingMeterEventResponse
Name | Type | Description |
---|
SetPersonalAccountRequest
Name | Type | Description |
---|
SetPersonalAccountResponse
Name | Type | Description |
---|---|---|
account_id | string | The unique identifier of the personal account that was created. |
SetUserRequest
Name | Type | Description |
---|
SetUserResponse
Name | Type | Description |
---|---|---|
user_id | string | The unique identifier of the user that was created. |
SetUserRoleRequest
Name | Type | Description |
---|---|---|
account_id | string | The unique identifier of the account to apply this role to. |
user_id | string | The unique identifier of the user that this will be applied to. |
role | AccountRole | The role that this user will obtain. |
SetUserRoleResponse
Name | Type | Description |
---|
SystemLicense
Name | Type | Description |
---|---|---|
is_valid | bool | Whether or not a valid license was found |
expires_at | google.protobuf.Timestamp | The time when the license expires |
is_neosync_cloud | bool | Whether or not the license is for NeosyncCloud |
UserAccount
Name | Type | Description |
---|---|---|
id | string | The unique identifier of the account |
name | string | The account slug |
type | UserAccountType | The type of account |
has_stripe_customer_id | bool | Whether or not the account has an associated stripe customer id |
Enums
AccountRole
Name | Number | Description |
---|---|---|
ACCOUNT_ROLE_UNSPECIFIED | 0 | Default value, this should not be used, but will default to ACCOUNT_ROLE_JOB_VIEWER |
ACCOUNT_ROLE_ADMIN | 1 | Admin, can do anything in the account. |
ACCOUNT_ROLE_JOB_DEVELOPER | 2 | Can view, edit jobs and connections |
ACCOUNT_ROLE_JOB_VIEWER | 3 | Can view |
ACCOUNT_ROLE_JOB_EXECUTOR | 4 | Can view and execute |
AccountStatus
Name | Number | Description |
---|---|---|
ACCOUNT_STATUS_REASON_UNSPECIFIED | 0 | Default value, should be used when no reason is specified |
ACCOUNT_STATUS_ACCOUNT_IN_EXPIRED_STATE | 3 | Account is currently in an expired state |
ACCOUNT_STATUS_ACCOUNT_TRIAL_ACTIVE | 4 | The account is currently in an active trial period |
ACCOUNT_STATUS_ACCOUNT_TRIAL_EXPIRED | 5 | The account is past the active trial period |
BillingStatus
Name | Number | Description |
---|---|---|
BILLING_STATUS_UNSPECIFIED | 0 | |
BILLING_STATUS_ACTIVE | 1 | Corresponds to a billing subscription and rolls up various states into active This may be split into the future to be more granular and mirror the underlying billing system |
BILLING_STATUS_EXPIRED | 2 | If the system could not find any active subscriptions |
BILLING_STATUS_TRIAL_ACTIVE | 3 | The account does not have an active subscription and is in a valid trial period |
BILLING_STATUS_TRIAL_EXPIRED | 4 | The account does not have an active subscription and the trial period has ended |
UserAccountType
Name | Number | Description |
---|---|---|
USER_ACCOUNT_TYPE_UNSPECIFIED | 0 | |
USER_ACCOUNT_TYPE_PERSONAL | 1 | A personal account is an account that is owned by a single user. |
USER_ACCOUNT_TYPE_TEAM | 2 | A team account is an account that is owned by a team of users. |
USER_ACCOUNT_TYPE_ENTERPRISE | 3 | An enterprise account is an account that is owned by an enterprise. |
Services
UserAccountService
Service that manages users, accounts, and billing
GetUser
Method | GetUser |
---|---|
Request | GetUserRequest |
Response | GetUserResponse |
Description | Retrieves the current user. |
SetUser
Method | SetUser |
---|---|
Request | SetUserRequest |
Response | SetUserResponse |
Description | Sets the current user. |
GetUserAccounts
Method | GetUserAccounts |
---|---|
Request | GetUserAccountsRequest |
Response | GetUserAccountsResponse |
Description | Retrieves the list of accounts that the user belongs to. |
SetPersonalAccount
Method | SetPersonalAccount |
---|---|
Request | SetPersonalAccountRequest |
Response | SetPersonalAccountResponse |
Description | Sets the current personal account. |
ConvertPersonalToTeamAccount
Method | ConvertPersonalToTeamAccount |
---|---|
Request | ConvertPersonalToTeamAccountRequest |
Response | ConvertPersonalToTeamAccountResponse |
Description | Convert a personal account to a team account retaining all of the jobs and connections. This will also create a new empty personal account. |
CreateTeamAccount
Method | CreateTeamAccount |
---|---|
Request | CreateTeamAccountRequest |
Response | CreateTeamAccountResponse |
Description | Creates a new team account |
IsUserInAccount
Method | IsUserInAccount |
---|---|
Request | IsUserInAccountRequest |
Response | IsUserInAccountResponse |
Description | Checks if the user is in the account. |
GetAccountTemporalConfig
Method | GetAccountTemporalConfig |
---|---|
Request | GetAccountTemporalConfigRequest |
Response | GetAccountTemporalConfigResponse |
Description | Retrieves the temporal config for the account. |
SetAccountTemporalConfig
Method | SetAccountTemporalConfig |
---|---|
Request | SetAccountTemporalConfigRequest |
Response | SetAccountTemporalConfigResponse |
Description | Sets the temporal config for the account. |
GetTeamAccountMembers
Method | GetTeamAccountMembers |
---|---|
Request | GetTeamAccountMembersRequest |
Response | GetTeamAccountMembersResponse |
Description | Retrieves the list of members in the team account. |
RemoveTeamAccountMember
Method | RemoveTeamAccountMember |
---|---|
Request | RemoveTeamAccountMemberRequest |
Response | RemoveTeamAccountMemberResponse |
Description | Removes a member from the team account. |
InviteUserToTeamAccount
Method | InviteUserToTeamAccount |
---|---|
Request | InviteUserToTeamAccountRequest |
Response | InviteUserToTeamAccountResponse |
Description | Invites a user to the team account. |
GetTeamAccountInvites
Method | GetTeamAccountInvites |
---|---|
Request | GetTeamAccountInvitesRequest |
Response | GetTeamAccountInvitesResponse |
Description | Retrieves the list of invites for the team account. |
RemoveTeamAccountInvite
Method | RemoveTeamAccountInvite |
---|---|
Request | RemoveTeamAccountInviteRequest |
Response | RemoveTeamAccountInviteResponse |
Description | Removes an invite from the team account. |
AcceptTeamAccountInvite
Method | AcceptTeamAccountInvite |
---|---|
Request | AcceptTeamAccountInviteRequest |
Response | AcceptTeamAccountInviteResponse |
Description | Accepts an invite to the team account. |
GetSystemInformation
Method | GetSystemInformation |
---|---|
Request | GetSystemInformationRequest |
Response | GetSystemInformationResponse |
Description | Retrieves the system information. |
GetAccountOnboardingConfig
Method | GetAccountOnboardingConfig |
---|---|
Request | GetAccountOnboardingConfigRequest |
Response | GetAccountOnboardingConfigResponse |
Description | Retrieves the onboarding config for the account. |
SetAccountOnboardingConfig
Method | SetAccountOnboardingConfig |
---|---|
Request | SetAccountOnboardingConfigRequest |
Response | SetAccountOnboardingConfigResponse |
Description | Sets the onboarding config for the account. |
GetAccountStatus
Method | GetAccountStatus |
---|---|
Request | GetAccountStatusRequest |
Response | GetAccountStatusResponse |
Description | Returns different metrics on the account status for the active billing period |
IsAccountStatusValid
Method | IsAccountStatusValid |
---|---|
Request | IsAccountStatusValidRequest |
Response | IsAccountStatusValidResponse |
Description | Distils the account status down to whether not it is in a valid state. |
GetAccountBillingCheckoutSession
Method | GetAccountBillingCheckoutSession |
---|---|
Request | GetAccountBillingCheckoutSessionRequest |
Response | GetAccountBillingCheckoutSessionResponse |
Description | Returns a new checkout session for the account to subscribe |
GetAccountBillingPortalSession
Method | GetAccountBillingPortalSession |
---|---|
Request | GetAccountBillingPortalSessionRequest |
Response | GetAccountBillingPortalSessionResponse |
Description | Returns a new billing portal session if the account has a billing customer id |
GetBillingAccounts
Method | GetBillingAccounts |
---|---|
Request | GetBillingAccountsRequest |
Response | GetBillingAccountsResponse |
Description | Returns user accounts that have a billing id. |
SetBillingMeterEvent
Method | SetBillingMeterEvent |
---|---|
Request | SetBillingMeterEventRequest |
Response | SetBillingMeterEventResponse |
Description | Sends a new metered event to the billing system |
SetUserRole
Method | SetUserRole |
---|---|
Request | SetUserRoleRequest |
Response | SetUserRoleResponse |
Description | Sets the users role |