Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions devops/generate_proto_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ def update_golang():
'okapiproto "github.com/trinsic-id/sdk/go/okapiproto"': 'okapiproto "github.com/trinsic-id/okapi/go/okapiproto"',
'_ "services/options"': '_ "github.com/trinsic-id/sdk/go/proto/services/options"',
'account "services/account/v1/account"': 'account "github.com/trinsic-id/sdk/go/proto/services/account/v1/account"',
'common "services/common/v1/common"': 'account "github.com/trinsic-id/sdk/go/proto/services/common/v1/common"',
}
for file_name in glob.glob(join(go_proto_path, "**", "*.go"), recursive=True):
update_line(file_name, replace_pairs)
Expand Down
2 changes: 1 addition & 1 deletion go/proto/services/provider/v1/provider/provider.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

292 changes: 169 additions & 123 deletions web/src/ProviderService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ import {
ServiceOptions,
UpdateEcosystemRequest,
UpdateEcosystemResponse,
UpgradeDidRequest,
UpgradeDidResponse,
} from "./proto";

import type { Client as BrowserClient } from "nice-grpc-web";
Expand Down Expand Up @@ -70,128 +72,172 @@ export class ProviderService extends ServiceBase {
this.options.authToken = authToken;
return response;
}
// BEGIN Code generated by protoc-gen-trinsic. DO NOT EDIT.
// target: /home/runner/work/sdk/sdk/web/src/ProviderService.ts
// BEGIN Code generated by protoc-gen-trinsic. DO NOT EDIT.
// target: /home/runner/work/sdk/sdk/web/src/ProviderService.ts

/** Update an existing ecosystem */
public async updateEcosystem(request: UpdateEcosystemRequest): Promise<UpdateEcosystemResponse> {

return this.client.updateEcosystem(request, {
metadata: await this.buildMetadata(UpdateEcosystemRequest.encode(request).finish())
});
}
/** Grant user authorization to ecosystem resources */
public async grantAuthorization(request: GrantAuthorizationRequest): Promise<GrantAuthorizationResponse> {

return this.client.grantAuthorization(request, {
metadata: await this.buildMetadata(GrantAuthorizationRequest.encode(request).finish())
});
}
/** Revoke user authorization to ecosystem resources */
public async revokeAuthorization(request: RevokeAuthorizationRequest): Promise<RevokeAuthorizationResponse> {

return this.client.revokeAuthorization(request, {
metadata: await this.buildMetadata(RevokeAuthorizationRequest.encode(request).finish())
});
}
/** Retrieve the list of permissions for this particular account/ecosystem */
public async getAuthorizations(request: GetAuthorizationsRequest): Promise<GetAuthorizationsResponse> {

return this.client.getAuthorizations(request, {
metadata: await this.buildMetadata(GetAuthorizationsRequest.encode(request).finish())
});
}
/** Add a webhook endpoint to the ecosystem */
public async addWebhook(request: AddWebhookRequest): Promise<AddWebhookResponse> {

return this.client.addWebhook(request, {
metadata: await this.buildMetadata(AddWebhookRequest.encode(request).finish())
});
}
/** Delete a webhook endpoint from the ecosystem */
public async deleteWebhook(request: DeleteWebhookRequest): Promise<DeleteWebhookResponse> {

return this.client.deleteWebhook(request, {
metadata: await this.buildMetadata(DeleteWebhookRequest.encode(request).finish())
});
}
/** Get ecosystem information */
public async ecosystemInfo(request: EcosystemInfoRequest): Promise<EcosystemInfoResponse> {

return this.client.ecosystemInfo(request, {
metadata: await this.buildMetadata(EcosystemInfoRequest.encode(request).finish())
});
}
/** Get public ecosystem information about *any* ecosystem */
public async getPublicEcosystemInfo(request: GetPublicEcosystemInfoRequest): Promise<GetPublicEcosystemInfoResponse> {

return this.client.getPublicEcosystemInfo(request, {
metadata: await this.buildMetadata()
});
}
/** Generates an unprotected authentication token that can be used to
* configure server side applications */
public async generateToken(request: GenerateTokenRequest): Promise<GenerateTokenResponse> {

return this.client.generateToken(request, {
metadata: await this.buildMetadata(GenerateTokenRequest.encode(request).finish())
});
}
/** Invite a user to the ecosystem */
public async invite(request: InviteRequest): Promise<InviteResponse> {

return this.client.invite(request, {
metadata: await this.buildMetadata(InviteRequest.encode(request).finish())
});
}
/** Check the status of an invitation */
public async invitationStatus(request: InvitationStatusRequest): Promise<InvitationStatusResponse> {

return this.client.invitationStatus(request, {
metadata: await this.buildMetadata(InvitationStatusRequest.encode(request).finish())
});
}
/** Returns the public key being used to create/verify oberon tokens */
public async getOberonKey(request: GetOberonKeyRequest): Promise<GetOberonKeyResponse> {

return this.client.getOberonKey(request, {
metadata: await this.buildMetadata()
});
}
/** Generate a signed token (JWT) that can be used to connect to the message bus */
public async getEventToken(request: GetEventTokenRequest): Promise<GetEventTokenResponse> {

return this.client.getEventToken(request, {
metadata: await this.buildMetadata(GetEventTokenRequest.encode(request).finish())
});
}
/** Upgrade a wallet's DID from `did:key` to another method */
public async upgradeDID(request: UpgradeDidRequest): Promise<UpgradeDidResponse> {

return this.client.upgradeDID(request, {
metadata: await this.buildMetadata(UpgradeDidRequest.encode(request).finish())
});
}
/** Retrieve a random hash TXT that can be used to verify domain ownership */
public async retrieveDomainVerificationRecord(): Promise<RetrieveDomainVerificationRecordResponse> {
let request = RetrieveDomainVerificationRecordRequest.fromPartial({});
return this.client.retrieveDomainVerificationRecord(request, {
metadata: await this.buildMetadata(RetrieveDomainVerificationRecordRequest.encode(request).finish())
});
}
/** Call to verify domain */
public async refreshDomainVerificationStatus(request: RefreshDomainVerificationStatusRequest): Promise<RefreshDomainVerificationStatusResponse> {

return this.client.refreshDomainVerificationStatus(request, {
metadata: await this.buildMetadata(RefreshDomainVerificationStatusRequest.encode(request).finish())
});
}
/** Search for issuers/providers/verifiers in the current ecosystem */
public async searchWalletConfigurations(request: SearchWalletConfigurationsRequest): Promise<SearchWalletConfigurationResponse> {

return this.client.searchWalletConfigurations(request, {
metadata: await this.buildMetadata(SearchWalletConfigurationsRequest.encode(request).finish())
});
}
// END Code generated by protoc-gen-trinsic. DO NOT EDIT.
/** Update an existing ecosystem */
public async updateEcosystem(
request: UpdateEcosystemRequest
): Promise<UpdateEcosystemResponse> {
return this.client.updateEcosystem(request, {
metadata: await this.buildMetadata(
UpdateEcosystemRequest.encode(request).finish()
),
});
}
/** Grant user authorization to ecosystem resources */
public async grantAuthorization(
request: GrantAuthorizationRequest
): Promise<GrantAuthorizationResponse> {
return this.client.grantAuthorization(request, {
metadata: await this.buildMetadata(
GrantAuthorizationRequest.encode(request).finish()
),
});
}
/** Revoke user authorization to ecosystem resources */
public async revokeAuthorization(
request: RevokeAuthorizationRequest
): Promise<RevokeAuthorizationResponse> {
return this.client.revokeAuthorization(request, {
metadata: await this.buildMetadata(
RevokeAuthorizationRequest.encode(request).finish()
),
});
}
/** Retrieve the list of permissions for this particular account/ecosystem */
public async getAuthorizations(
request: GetAuthorizationsRequest
): Promise<GetAuthorizationsResponse> {
return this.client.getAuthorizations(request, {
metadata: await this.buildMetadata(
GetAuthorizationsRequest.encode(request).finish()
),
});
}
/** Add a webhook endpoint to the ecosystem */
public async addWebhook(
request: AddWebhookRequest
): Promise<AddWebhookResponse> {
return this.client.addWebhook(request, {
metadata: await this.buildMetadata(
AddWebhookRequest.encode(request).finish()
),
});
}
/** Delete a webhook endpoint from the ecosystem */
public async deleteWebhook(
request: DeleteWebhookRequest
): Promise<DeleteWebhookResponse> {
return this.client.deleteWebhook(request, {
metadata: await this.buildMetadata(
DeleteWebhookRequest.encode(request).finish()
),
});
}
/** Get ecosystem information */
public async ecosystemInfo(
request: EcosystemInfoRequest
): Promise<EcosystemInfoResponse> {
return this.client.ecosystemInfo(request, {
metadata: await this.buildMetadata(
EcosystemInfoRequest.encode(request).finish()
),
});
}
/** Get public ecosystem information about *any* ecosystem */
public async getPublicEcosystemInfo(
request: GetPublicEcosystemInfoRequest
): Promise<GetPublicEcosystemInfoResponse> {
return this.client.getPublicEcosystemInfo(request, {
metadata: await this.buildMetadata(),
});
}
/** Generates an unprotected authentication token that can be used to
* configure server side applications */
public async generateToken(
request: GenerateTokenRequest
): Promise<GenerateTokenResponse> {
return this.client.generateToken(request, {
metadata: await this.buildMetadata(
GenerateTokenRequest.encode(request).finish()
),
});
}
/** Invite a user to the ecosystem */
public async invite(request: InviteRequest): Promise<InviteResponse> {
return this.client.invite(request, {
metadata: await this.buildMetadata(
InviteRequest.encode(request).finish()
),
});
}
/** Check the status of an invitation */
public async invitationStatus(
request: InvitationStatusRequest
): Promise<InvitationStatusResponse> {
return this.client.invitationStatus(request, {
metadata: await this.buildMetadata(
InvitationStatusRequest.encode(request).finish()
),
});
}
/** Returns the public key being used to create/verify oberon tokens */
public async getOberonKey(
request: GetOberonKeyRequest
): Promise<GetOberonKeyResponse> {
return this.client.getOberonKey(request, {
metadata: await this.buildMetadata(),
});
}
/** Generate a signed token (JWT) that can be used to connect to the message bus */
public async getEventToken(
request: GetEventTokenRequest
): Promise<GetEventTokenResponse> {
return this.client.getEventToken(request, {
metadata: await this.buildMetadata(
GetEventTokenRequest.encode(request).finish()
),
});
}
/** Upgrade a wallet's DID from `did:key` to another method */
public async upgradeDID(
request: UpgradeDidRequest
): Promise<UpgradeDidResponse> {
return this.client.upgradeDID(request, {
metadata: await this.buildMetadata(
UpgradeDidRequest.encode(request).finish()
),
});
}
/** Retrieve a random hash TXT that can be used to verify domain ownership */
public async retrieveDomainVerificationRecord(): Promise<RetrieveDomainVerificationRecordResponse> {
let request = RetrieveDomainVerificationRecordRequest.fromPartial({});
return this.client.retrieveDomainVerificationRecord(request, {
metadata: await this.buildMetadata(
RetrieveDomainVerificationRecordRequest.encode(request).finish()
),
});
}
/** Call to verify domain */
public async refreshDomainVerificationStatus(
request: RefreshDomainVerificationStatusRequest
): Promise<RefreshDomainVerificationStatusResponse> {
return this.client.refreshDomainVerificationStatus(request, {
metadata: await this.buildMetadata(
RefreshDomainVerificationStatusRequest.encode(request).finish()
),
});
}
/** Search for issuers/providers/verifiers in the current ecosystem */
public async searchWalletConfigurations(
request: SearchWalletConfigurationsRequest
): Promise<SearchWalletConfigurationResponse> {
return this.client.searchWalletConfigurations(request, {
metadata: await this.buildMetadata(
SearchWalletConfigurationsRequest.encode(request).finish()
),
});
}
// END Code generated by protoc-gen-trinsic. DO NOT EDIT.
}