Skip to content

Commit 9b97049

Browse files
Server copied protos import fix (#1073)
1 parent ba95e91 commit 9b97049

File tree

3 files changed

+171
-124
lines changed

3 files changed

+171
-124
lines changed

devops/generate_proto_files.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ def update_golang():
185185
'okapiproto "github.com/trinsic-id/sdk/go/okapiproto"': 'okapiproto "github.com/trinsic-id/okapi/go/okapiproto"',
186186
'_ "services/options"': '_ "github.com/trinsic-id/sdk/go/proto/services/options"',
187187
'account "services/account/v1/account"': 'account "github.com/trinsic-id/sdk/go/proto/services/account/v1/account"',
188+
'common "services/common/v1/common"': 'account "github.com/trinsic-id/sdk/go/proto/services/common/v1/common"',
188189
}
189190
for file_name in glob.glob(join(go_proto_path, "**", "*.go"), recursive=True):
190191
update_line(file_name, replace_pairs)

go/proto/services/provider/v1/provider/provider.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/src/ProviderService.ts

Lines changed: 169 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ import {
3737
ServiceOptions,
3838
UpdateEcosystemRequest,
3939
UpdateEcosystemResponse,
40+
UpgradeDidRequest,
41+
UpgradeDidResponse,
4042
} from "./proto";
4143

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

76-
/** Update an existing ecosystem */
77-
public async updateEcosystem(request: UpdateEcosystemRequest): Promise<UpdateEcosystemResponse> {
78-
79-
return this.client.updateEcosystem(request, {
80-
metadata: await this.buildMetadata(UpdateEcosystemRequest.encode(request).finish())
81-
});
82-
}
83-
/** Grant user authorization to ecosystem resources */
84-
public async grantAuthorization(request: GrantAuthorizationRequest): Promise<GrantAuthorizationResponse> {
85-
86-
return this.client.grantAuthorization(request, {
87-
metadata: await this.buildMetadata(GrantAuthorizationRequest.encode(request).finish())
88-
});
89-
}
90-
/** Revoke user authorization to ecosystem resources */
91-
public async revokeAuthorization(request: RevokeAuthorizationRequest): Promise<RevokeAuthorizationResponse> {
92-
93-
return this.client.revokeAuthorization(request, {
94-
metadata: await this.buildMetadata(RevokeAuthorizationRequest.encode(request).finish())
95-
});
96-
}
97-
/** Retrieve the list of permissions for this particular account/ecosystem */
98-
public async getAuthorizations(request: GetAuthorizationsRequest): Promise<GetAuthorizationsResponse> {
99-
100-
return this.client.getAuthorizations(request, {
101-
metadata: await this.buildMetadata(GetAuthorizationsRequest.encode(request).finish())
102-
});
103-
}
104-
/** Add a webhook endpoint to the ecosystem */
105-
public async addWebhook(request: AddWebhookRequest): Promise<AddWebhookResponse> {
106-
107-
return this.client.addWebhook(request, {
108-
metadata: await this.buildMetadata(AddWebhookRequest.encode(request).finish())
109-
});
110-
}
111-
/** Delete a webhook endpoint from the ecosystem */
112-
public async deleteWebhook(request: DeleteWebhookRequest): Promise<DeleteWebhookResponse> {
113-
114-
return this.client.deleteWebhook(request, {
115-
metadata: await this.buildMetadata(DeleteWebhookRequest.encode(request).finish())
116-
});
117-
}
118-
/** Get ecosystem information */
119-
public async ecosystemInfo(request: EcosystemInfoRequest): Promise<EcosystemInfoResponse> {
120-
121-
return this.client.ecosystemInfo(request, {
122-
metadata: await this.buildMetadata(EcosystemInfoRequest.encode(request).finish())
123-
});
124-
}
125-
/** Get public ecosystem information about *any* ecosystem */
126-
public async getPublicEcosystemInfo(request: GetPublicEcosystemInfoRequest): Promise<GetPublicEcosystemInfoResponse> {
127-
128-
return this.client.getPublicEcosystemInfo(request, {
129-
metadata: await this.buildMetadata()
130-
});
131-
}
132-
/** Generates an unprotected authentication token that can be used to
133-
* configure server side applications */
134-
public async generateToken(request: GenerateTokenRequest): Promise<GenerateTokenResponse> {
135-
136-
return this.client.generateToken(request, {
137-
metadata: await this.buildMetadata(GenerateTokenRequest.encode(request).finish())
138-
});
139-
}
140-
/** Invite a user to the ecosystem */
141-
public async invite(request: InviteRequest): Promise<InviteResponse> {
142-
143-
return this.client.invite(request, {
144-
metadata: await this.buildMetadata(InviteRequest.encode(request).finish())
145-
});
146-
}
147-
/** Check the status of an invitation */
148-
public async invitationStatus(request: InvitationStatusRequest): Promise<InvitationStatusResponse> {
149-
150-
return this.client.invitationStatus(request, {
151-
metadata: await this.buildMetadata(InvitationStatusRequest.encode(request).finish())
152-
});
153-
}
154-
/** Returns the public key being used to create/verify oberon tokens */
155-
public async getOberonKey(request: GetOberonKeyRequest): Promise<GetOberonKeyResponse> {
156-
157-
return this.client.getOberonKey(request, {
158-
metadata: await this.buildMetadata()
159-
});
160-
}
161-
/** Generate a signed token (JWT) that can be used to connect to the message bus */
162-
public async getEventToken(request: GetEventTokenRequest): Promise<GetEventTokenResponse> {
163-
164-
return this.client.getEventToken(request, {
165-
metadata: await this.buildMetadata(GetEventTokenRequest.encode(request).finish())
166-
});
167-
}
168-
/** Upgrade a wallet's DID from `did:key` to another method */
169-
public async upgradeDID(request: UpgradeDidRequest): Promise<UpgradeDidResponse> {
170-
171-
return this.client.upgradeDID(request, {
172-
metadata: await this.buildMetadata(UpgradeDidRequest.encode(request).finish())
173-
});
174-
}
175-
/** Retrieve a random hash TXT that can be used to verify domain ownership */
176-
public async retrieveDomainVerificationRecord(): Promise<RetrieveDomainVerificationRecordResponse> {
177-
let request = RetrieveDomainVerificationRecordRequest.fromPartial({});
178-
return this.client.retrieveDomainVerificationRecord(request, {
179-
metadata: await this.buildMetadata(RetrieveDomainVerificationRecordRequest.encode(request).finish())
180-
});
181-
}
182-
/** Call to verify domain */
183-
public async refreshDomainVerificationStatus(request: RefreshDomainVerificationStatusRequest): Promise<RefreshDomainVerificationStatusResponse> {
184-
185-
return this.client.refreshDomainVerificationStatus(request, {
186-
metadata: await this.buildMetadata(RefreshDomainVerificationStatusRequest.encode(request).finish())
187-
});
188-
}
189-
/** Search for issuers/providers/verifiers in the current ecosystem */
190-
public async searchWalletConfigurations(request: SearchWalletConfigurationsRequest): Promise<SearchWalletConfigurationResponse> {
191-
192-
return this.client.searchWalletConfigurations(request, {
193-
metadata: await this.buildMetadata(SearchWalletConfigurationsRequest.encode(request).finish())
194-
});
195-
}
196-
// END Code generated by protoc-gen-trinsic. DO NOT EDIT.
78+
/** Update an existing ecosystem */
79+
public async updateEcosystem(
80+
request: UpdateEcosystemRequest
81+
): Promise<UpdateEcosystemResponse> {
82+
return this.client.updateEcosystem(request, {
83+
metadata: await this.buildMetadata(
84+
UpdateEcosystemRequest.encode(request).finish()
85+
),
86+
});
87+
}
88+
/** Grant user authorization to ecosystem resources */
89+
public async grantAuthorization(
90+
request: GrantAuthorizationRequest
91+
): Promise<GrantAuthorizationResponse> {
92+
return this.client.grantAuthorization(request, {
93+
metadata: await this.buildMetadata(
94+
GrantAuthorizationRequest.encode(request).finish()
95+
),
96+
});
97+
}
98+
/** Revoke user authorization to ecosystem resources */
99+
public async revokeAuthorization(
100+
request: RevokeAuthorizationRequest
101+
): Promise<RevokeAuthorizationResponse> {
102+
return this.client.revokeAuthorization(request, {
103+
metadata: await this.buildMetadata(
104+
RevokeAuthorizationRequest.encode(request).finish()
105+
),
106+
});
107+
}
108+
/** Retrieve the list of permissions for this particular account/ecosystem */
109+
public async getAuthorizations(
110+
request: GetAuthorizationsRequest
111+
): Promise<GetAuthorizationsResponse> {
112+
return this.client.getAuthorizations(request, {
113+
metadata: await this.buildMetadata(
114+
GetAuthorizationsRequest.encode(request).finish()
115+
),
116+
});
117+
}
118+
/** Add a webhook endpoint to the ecosystem */
119+
public async addWebhook(
120+
request: AddWebhookRequest
121+
): Promise<AddWebhookResponse> {
122+
return this.client.addWebhook(request, {
123+
metadata: await this.buildMetadata(
124+
AddWebhookRequest.encode(request).finish()
125+
),
126+
});
127+
}
128+
/** Delete a webhook endpoint from the ecosystem */
129+
public async deleteWebhook(
130+
request: DeleteWebhookRequest
131+
): Promise<DeleteWebhookResponse> {
132+
return this.client.deleteWebhook(request, {
133+
metadata: await this.buildMetadata(
134+
DeleteWebhookRequest.encode(request).finish()
135+
),
136+
});
137+
}
138+
/** Get ecosystem information */
139+
public async ecosystemInfo(
140+
request: EcosystemInfoRequest
141+
): Promise<EcosystemInfoResponse> {
142+
return this.client.ecosystemInfo(request, {
143+
metadata: await this.buildMetadata(
144+
EcosystemInfoRequest.encode(request).finish()
145+
),
146+
});
147+
}
148+
/** Get public ecosystem information about *any* ecosystem */
149+
public async getPublicEcosystemInfo(
150+
request: GetPublicEcosystemInfoRequest
151+
): Promise<GetPublicEcosystemInfoResponse> {
152+
return this.client.getPublicEcosystemInfo(request, {
153+
metadata: await this.buildMetadata(),
154+
});
155+
}
156+
/** Generates an unprotected authentication token that can be used to
157+
* configure server side applications */
158+
public async generateToken(
159+
request: GenerateTokenRequest
160+
): Promise<GenerateTokenResponse> {
161+
return this.client.generateToken(request, {
162+
metadata: await this.buildMetadata(
163+
GenerateTokenRequest.encode(request).finish()
164+
),
165+
});
166+
}
167+
/** Invite a user to the ecosystem */
168+
public async invite(request: InviteRequest): Promise<InviteResponse> {
169+
return this.client.invite(request, {
170+
metadata: await this.buildMetadata(
171+
InviteRequest.encode(request).finish()
172+
),
173+
});
174+
}
175+
/** Check the status of an invitation */
176+
public async invitationStatus(
177+
request: InvitationStatusRequest
178+
): Promise<InvitationStatusResponse> {
179+
return this.client.invitationStatus(request, {
180+
metadata: await this.buildMetadata(
181+
InvitationStatusRequest.encode(request).finish()
182+
),
183+
});
184+
}
185+
/** Returns the public key being used to create/verify oberon tokens */
186+
public async getOberonKey(
187+
request: GetOberonKeyRequest
188+
): Promise<GetOberonKeyResponse> {
189+
return this.client.getOberonKey(request, {
190+
metadata: await this.buildMetadata(),
191+
});
192+
}
193+
/** Generate a signed token (JWT) that can be used to connect to the message bus */
194+
public async getEventToken(
195+
request: GetEventTokenRequest
196+
): Promise<GetEventTokenResponse> {
197+
return this.client.getEventToken(request, {
198+
metadata: await this.buildMetadata(
199+
GetEventTokenRequest.encode(request).finish()
200+
),
201+
});
202+
}
203+
/** Upgrade a wallet's DID from `did:key` to another method */
204+
public async upgradeDID(
205+
request: UpgradeDidRequest
206+
): Promise<UpgradeDidResponse> {
207+
return this.client.upgradeDID(request, {
208+
metadata: await this.buildMetadata(
209+
UpgradeDidRequest.encode(request).finish()
210+
),
211+
});
212+
}
213+
/** Retrieve a random hash TXT that can be used to verify domain ownership */
214+
public async retrieveDomainVerificationRecord(): Promise<RetrieveDomainVerificationRecordResponse> {
215+
let request = RetrieveDomainVerificationRecordRequest.fromPartial({});
216+
return this.client.retrieveDomainVerificationRecord(request, {
217+
metadata: await this.buildMetadata(
218+
RetrieveDomainVerificationRecordRequest.encode(request).finish()
219+
),
220+
});
221+
}
222+
/** Call to verify domain */
223+
public async refreshDomainVerificationStatus(
224+
request: RefreshDomainVerificationStatusRequest
225+
): Promise<RefreshDomainVerificationStatusResponse> {
226+
return this.client.refreshDomainVerificationStatus(request, {
227+
metadata: await this.buildMetadata(
228+
RefreshDomainVerificationStatusRequest.encode(request).finish()
229+
),
230+
});
231+
}
232+
/** Search for issuers/providers/verifiers in the current ecosystem */
233+
public async searchWalletConfigurations(
234+
request: SearchWalletConfigurationsRequest
235+
): Promise<SearchWalletConfigurationResponse> {
236+
return this.client.searchWalletConfigurations(request, {
237+
metadata: await this.buildMetadata(
238+
SearchWalletConfigurationsRequest.encode(request).finish()
239+
),
240+
});
241+
}
242+
// END Code generated by protoc-gen-trinsic. DO NOT EDIT.
197243
}

0 commit comments

Comments
 (0)