From a253dd933840a9005d9841f8fe46eb587157968a Mon Sep 17 00:00:00 2001 From: authzedbot <86801627+authzedbot@users.noreply.github.com> Date: Mon, 27 Jan 2025 17:18:59 +0000 Subject: [PATCH 1/3] [create-pull-request] automated change --- buf.gen.yaml | 2 +- src/authzedapi/authzed/api/v1/core.ts | 20 ++++- src/authzedapi/authzed/api/v1/debug.ts | 66 +++++++++++++-- .../v1/experimental_service.grpc-client.ts | 42 +++++----- .../authzed/api/v1/experimental_service.ts | 29 +++---- .../api/v1/permission_service.grpc-client.ts | 42 +++++----- .../authzed/api/v1/permission_service.ts | 82 +++++++++++++++---- .../api/v1/schema_service.grpc-client.ts | 10 +-- .../authzed/api/v1/schema_service.ts | 2 +- .../api/v1/watch_service.grpc-client.ts | 6 +- .../authzed/api/v1/watch_service.ts | 8 +- src/authzedapi/google/rpc/status.ts | 2 +- .../protoc-gen-openapiv2/options/openapiv2.ts | 2 +- src/authzedapi/validate/validate.ts | 4 +- 14 files changed, 215 insertions(+), 102 deletions(-) diff --git a/buf.gen.yaml b/buf.gen.yaml index 2e4e139..02367b3 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -8,7 +8,7 @@ plugins: - long_type_string - client_grpc1 inputs: - - module: "buf.build/authzed/api:v1.38.0" + - module: "buf.build/authzed/api:v1.40.0" paths: # NOTE: This grabs only the v1 proto and ignores v0 and v1dev. - "authzed/api/v1" diff --git a/src/authzedapi/authzed/api/v1/core.ts b/src/authzedapi/authzed/api/v1/core.ts index b9c03c2..4d83172 100644 --- a/src/authzedapi/authzed/api/v1/core.ts +++ b/src/authzedapi/authzed/api/v1/core.ts @@ -11,7 +11,8 @@ import type { PartialMessage } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MESSAGE_TYPE } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; -import { Struct } from "../../../google/protobuf/struct.js"; +import { Struct } from "../../../google/protobuf/struct"; +import { Timestamp } from "../../../google/protobuf/timestamp"; /** * Relationship specifies how a resource relates to a subject. Relationships * form the data for the graph over which all permissions questions are @@ -39,11 +40,17 @@ export interface Relationship { */ subject?: SubjectReference; /** - * optional_caveat is a reference to a the caveat that must be enforced over the relationship + * optional_caveat is a reference to a the caveat that must be enforced over the relationship. * * @generated from protobuf field: authzed.api.v1.ContextualizedCaveat optional_caveat = 4; */ optionalCaveat?: ContextualizedCaveat; + /** + * optional_expires_at is the time at which the relationship expires, if any. + * + * @generated from protobuf field: google.protobuf.Timestamp optional_expires_at = 5; + */ + optionalExpiresAt?: Timestamp; } /** * ContextualizedCaveat represents a reference to a caveat to be used by caveated relationships. @@ -282,7 +289,8 @@ class Relationship$Type extends MessageType { { no: 1, name: "resource", kind: "message", T: () => ObjectReference, options: { "validate.rules": { message: { required: true } } } }, { no: 2, name: "relation", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxBytes: "64", pattern: "^[a-z][a-z0-9_]{1,62}[a-z0-9]$" } } } }, { no: 3, name: "subject", kind: "message", T: () => SubjectReference, options: { "validate.rules": { message: { required: true } } } }, - { no: 4, name: "optional_caveat", kind: "message", T: () => ContextualizedCaveat, options: { "validate.rules": { message: { required: false } } } } + { no: 4, name: "optional_caveat", kind: "message", T: () => ContextualizedCaveat, options: { "validate.rules": { message: { required: false } } } }, + { no: 5, name: "optional_expires_at", kind: "message", T: () => Timestamp } ]); } create(value?: PartialMessage): Relationship { @@ -309,6 +317,9 @@ class Relationship$Type extends MessageType { case /* authzed.api.v1.ContextualizedCaveat optional_caveat */ 4: message.optionalCaveat = ContextualizedCaveat.internalBinaryRead(reader, reader.uint32(), options, message.optionalCaveat); break; + case /* google.protobuf.Timestamp optional_expires_at */ 5: + message.optionalExpiresAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.optionalExpiresAt); + break; default: let u = options.readUnknownField; if (u === "throw") @@ -333,6 +344,9 @@ class Relationship$Type extends MessageType { /* authzed.api.v1.ContextualizedCaveat optional_caveat = 4; */ if (message.optionalCaveat) ContextualizedCaveat.internalBinaryWrite(message.optionalCaveat, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + /* google.protobuf.Timestamp optional_expires_at = 5; */ + if (message.optionalExpiresAt) + Timestamp.internalBinaryWrite(message.optionalExpiresAt, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); diff --git a/src/authzedapi/authzed/api/v1/debug.ts b/src/authzedapi/authzed/api/v1/debug.ts index 511d58f..78e5dea 100644 --- a/src/authzedapi/authzed/api/v1/debug.ts +++ b/src/authzedapi/authzed/api/v1/debug.ts @@ -11,11 +11,12 @@ import type { PartialMessage } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MESSAGE_TYPE } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; -import { PartialCaveatInfo } from "./core.js"; -import { Struct } from "../../../google/protobuf/struct.js"; -import { Duration } from "../../../google/protobuf/duration.js"; -import { SubjectReference } from "./core.js"; -import { ObjectReference } from "./core.js"; +import { PartialCaveatInfo } from "./core"; +import { Struct } from "../../../google/protobuf/struct"; +import { Timestamp } from "../../../google/protobuf/timestamp"; +import { Duration } from "../../../google/protobuf/duration"; +import { SubjectReference } from "./core"; +import { ObjectReference } from "./core"; /** * DebugInformation defines debug information returned by an API call in a footer when * requested with a specific debugging header. @@ -49,6 +50,8 @@ export interface DebugInformation { export interface CheckDebugTrace { /** * resource holds the resource on which the Check was performed. + * for batched calls, the object_id field contains a comma-separated list of object IDs + * for all the resources checked in the batch. * * @generated from protobuf field: authzed.api.v1.ObjectReference resource = 1; */ @@ -113,6 +116,34 @@ export interface CheckDebugTrace { } | { oneofKind: undefined; }; + /** + * optional_expires_at is the time at which at least one of the relationships used to + * compute this result, expires (if any). This is *not* related to the caching window. + * + * @generated from protobuf field: google.protobuf.Timestamp optional_expires_at = 10; + */ + optionalExpiresAt?: Timestamp; + /** + * trace_operation_id is a unique identifier for this trace's operation, that will + * be shared for all traces created for the same check operation in SpiceDB. + * + * In cases where SpiceDB performs automatic batching of subproblems, this ID can be used + * to correlate work that was shared across multiple traces. + * + * This identifier is generated by SpiceDB, is to be considered opaque to the caller + * and only guaranteed to be unique within the same overall Check or CheckBulk operation. + * + * @generated from protobuf field: string trace_operation_id = 11; + */ + traceOperationId: string; + /** + * source holds the source of the result. It is of the form: + * `:`, where sourcetype can be, among others: + * `spicedb`, `materialize`, etc. + * + * @generated from protobuf field: string source = 12; + */ + source: string; } /** * @generated from protobuf message authzed.api.v1.CheckDebugTrace.SubProblems @@ -289,11 +320,14 @@ class CheckDebugTrace$Type extends MessageType { { no: 8, name: "caveat_evaluation_info", kind: "message", T: () => CaveatEvalInfo }, { no: 9, name: "duration", kind: "message", T: () => Duration }, { no: 6, name: "was_cached_result", kind: "scalar", oneof: "resolution", T: 8 /*ScalarType.BOOL*/ }, - { no: 7, name: "sub_problems", kind: "message", oneof: "resolution", T: () => CheckDebugTrace_SubProblems } + { no: 7, name: "sub_problems", kind: "message", oneof: "resolution", T: () => CheckDebugTrace_SubProblems }, + { no: 10, name: "optional_expires_at", kind: "message", T: () => Timestamp }, + { no: 11, name: "trace_operation_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 12, name: "source", kind: "scalar", T: 9 /*ScalarType.STRING*/ } ]); } create(value?: PartialMessage): CheckDebugTrace { - const message = { permission: "", permissionType: 0, result: 0, resolution: { oneofKind: undefined } }; + const message = { permission: "", permissionType: 0, result: 0, resolution: { oneofKind: undefined }, traceOperationId: "", source: "" }; globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); if (value !== undefined) reflectionMergePartial(this, message, value); @@ -337,6 +371,15 @@ class CheckDebugTrace$Type extends MessageType { subProblems: CheckDebugTrace_SubProblems.internalBinaryRead(reader, reader.uint32(), options, (message.resolution as any).subProblems) }; break; + case /* google.protobuf.Timestamp optional_expires_at */ 10: + message.optionalExpiresAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.optionalExpiresAt); + break; + case /* string trace_operation_id */ 11: + message.traceOperationId = reader.string(); + break; + case /* string source */ 12: + message.source = reader.string(); + break; default: let u = options.readUnknownField; if (u === "throw") @@ -376,6 +419,15 @@ class CheckDebugTrace$Type extends MessageType { /* authzed.api.v1.CheckDebugTrace.SubProblems sub_problems = 7; */ if (message.resolution.oneofKind === "subProblems") CheckDebugTrace_SubProblems.internalBinaryWrite(message.resolution.subProblems, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); + /* google.protobuf.Timestamp optional_expires_at = 10; */ + if (message.optionalExpiresAt) + Timestamp.internalBinaryWrite(message.optionalExpiresAt, writer.tag(10, WireType.LengthDelimited).fork(), options).join(); + /* string trace_operation_id = 11; */ + if (message.traceOperationId !== "") + writer.tag(11, WireType.LengthDelimited).string(message.traceOperationId); + /* string source = 12; */ + if (message.source !== "") + writer.tag(12, WireType.LengthDelimited).string(message.source); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); diff --git a/src/authzedapi/authzed/api/v1/experimental_service.grpc-client.ts b/src/authzedapi/authzed/api/v1/experimental_service.grpc-client.ts index ca60f8a..4c235e8 100644 --- a/src/authzedapi/authzed/api/v1/experimental_service.grpc-client.ts +++ b/src/authzedapi/authzed/api/v1/experimental_service.grpc-client.ts @@ -1,29 +1,29 @@ // @generated by protobuf-ts 2.9.1 with parameter generate_dependencies,long_type_string,client_grpc1 // @generated from protobuf file "authzed/api/v1/experimental_service.proto" (package "authzed.api.v1", syntax proto3) // tslint:disable -import { ExperimentalService } from "./experimental_service.js"; +import { ExperimentalService } from "./experimental_service"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; -import type { ExperimentalUnregisterRelationshipCounterResponse } from "./experimental_service.js"; -import type { ExperimentalUnregisterRelationshipCounterRequest } from "./experimental_service.js"; -import type { ExperimentalCountRelationshipsResponse } from "./experimental_service.js"; -import type { ExperimentalCountRelationshipsRequest } from "./experimental_service.js"; -import type { ExperimentalRegisterRelationshipCounterResponse } from "./experimental_service.js"; -import type { ExperimentalRegisterRelationshipCounterRequest } from "./experimental_service.js"; -import type { ExperimentalDiffSchemaResponse } from "./experimental_service.js"; -import type { ExperimentalDiffSchemaRequest } from "./experimental_service.js"; -import type { ExperimentalDependentRelationsResponse } from "./experimental_service.js"; -import type { ExperimentalDependentRelationsRequest } from "./experimental_service.js"; -import type { ExperimentalComputablePermissionsResponse } from "./experimental_service.js"; -import type { ExperimentalComputablePermissionsRequest } from "./experimental_service.js"; -import type { ExperimentalReflectSchemaResponse } from "./experimental_service.js"; -import type { ExperimentalReflectSchemaRequest } from "./experimental_service.js"; -import type { BulkCheckPermissionResponse } from "./experimental_service.js"; -import type { BulkCheckPermissionRequest } from "./experimental_service.js"; -import type { BulkExportRelationshipsResponse } from "./experimental_service.js"; -import type { BulkExportRelationshipsRequest } from "./experimental_service.js"; -import type { BulkImportRelationshipsRequest } from "./experimental_service.js"; -import type { BulkImportRelationshipsResponse } from "./experimental_service.js"; +import type { ExperimentalUnregisterRelationshipCounterResponse } from "./experimental_service"; +import type { ExperimentalUnregisterRelationshipCounterRequest } from "./experimental_service"; +import type { ExperimentalCountRelationshipsResponse } from "./experimental_service"; +import type { ExperimentalCountRelationshipsRequest } from "./experimental_service"; +import type { ExperimentalRegisterRelationshipCounterResponse } from "./experimental_service"; +import type { ExperimentalRegisterRelationshipCounterRequest } from "./experimental_service"; +import type { ExperimentalDiffSchemaResponse } from "./experimental_service"; +import type { ExperimentalDiffSchemaRequest } from "./experimental_service"; +import type { ExperimentalDependentRelationsResponse } from "./experimental_service"; +import type { ExperimentalDependentRelationsRequest } from "./experimental_service"; +import type { ExperimentalComputablePermissionsResponse } from "./experimental_service"; +import type { ExperimentalComputablePermissionsRequest } from "./experimental_service"; +import type { ExperimentalReflectSchemaResponse } from "./experimental_service"; +import type { ExperimentalReflectSchemaRequest } from "./experimental_service"; +import type { BulkCheckPermissionResponse } from "./experimental_service"; +import type { BulkCheckPermissionRequest } from "./experimental_service"; +import type { BulkExportRelationshipsResponse } from "./experimental_service"; +import type { BulkExportRelationshipsRequest } from "./experimental_service"; +import type { BulkImportRelationshipsRequest } from "./experimental_service"; +import type { BulkImportRelationshipsResponse } from "./experimental_service"; import * as grpc from "@grpc/grpc-js"; /** * ExperimentalService exposes a number of APIs that are currently being diff --git a/src/authzedapi/authzed/api/v1/experimental_service.ts b/src/authzedapi/authzed/api/v1/experimental_service.ts index 7e37ac5..e9ccd76 100644 --- a/src/authzedapi/authzed/api/v1/experimental_service.ts +++ b/src/authzedapi/authzed/api/v1/experimental_service.ts @@ -12,17 +12,17 @@ import type { PartialMessage } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MESSAGE_TYPE } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; -import { Cursor } from "./core.js"; -import { Relationship } from "./core.js"; -import { PartialCaveatInfo } from "./core.js"; -import { CheckPermissionResponse_Permissionship } from "./permission_service.js"; -import { Status } from "../../../google/rpc/status.js"; -import { Struct } from "../../../google/protobuf/struct.js"; -import { SubjectReference } from "./core.js"; -import { ObjectReference } from "./core.js"; -import { Consistency } from "./permission_service.js"; -import { ZedToken } from "./core.js"; -import { RelationshipFilter } from "./permission_service.js"; +import { Cursor } from "./core"; +import { Relationship } from "./core"; +import { PartialCaveatInfo } from "./core"; +import { CheckPermissionResponse_Permissionship } from "./permission_service"; +import { Status } from "../../../google/rpc/status"; +import { Struct } from "../../../google/protobuf/struct"; +import { SubjectReference } from "./core"; +import { ObjectReference } from "./core"; +import { Consistency } from "./permission_service"; +import { ZedToken } from "./core"; +import { RelationshipFilter } from "./permission_service"; /** * @generated from protobuf message authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest */ @@ -211,9 +211,10 @@ export interface BulkCheckPermissionResponseItem { * BulkImportRelationshipsRequest represents one batch of the streaming * BulkImportRelationships API. The maximum size is only limited by the backing * datastore, and optimal size should be determined by the calling client - * experimentally. Any relationships within the same request are guaranteed to - * be written in a single transaction. If any of the relationships already - * exist, the transaction will fail and no relationships will be written. + * experimentally. When BulkImport is invoked and receives its first request message, + * a transaction is opened to import the relationships. All requests sent to the same + * invocation are executed under this single transaction. If a relationship already + * exists within the datastore, the entire transaction will fail with an error. * * @generated from protobuf message authzed.api.v1.BulkImportRelationshipsRequest */ diff --git a/src/authzedapi/authzed/api/v1/permission_service.grpc-client.ts b/src/authzedapi/authzed/api/v1/permission_service.grpc-client.ts index ef5fa08..71a5fd8 100644 --- a/src/authzedapi/authzed/api/v1/permission_service.grpc-client.ts +++ b/src/authzedapi/authzed/api/v1/permission_service.grpc-client.ts @@ -1,29 +1,29 @@ // @generated by protobuf-ts 2.9.1 with parameter generate_dependencies,long_type_string,client_grpc1 // @generated from protobuf file "authzed/api/v1/permission_service.proto" (package "authzed.api.v1", syntax proto3) // tslint:disable -import { PermissionsService } from "./permission_service.js"; +import { PermissionsService } from "./permission_service"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; -import type { ExportBulkRelationshipsResponse } from "./permission_service.js"; -import type { ExportBulkRelationshipsRequest } from "./permission_service.js"; -import type { ImportBulkRelationshipsRequest } from "./permission_service.js"; -import type { ImportBulkRelationshipsResponse } from "./permission_service.js"; -import type { LookupSubjectsResponse } from "./permission_service.js"; -import type { LookupSubjectsRequest } from "./permission_service.js"; -import type { LookupResourcesResponse } from "./permission_service.js"; -import type { LookupResourcesRequest } from "./permission_service.js"; -import type { ExpandPermissionTreeResponse } from "./permission_service.js"; -import type { ExpandPermissionTreeRequest } from "./permission_service.js"; -import type { CheckBulkPermissionsResponse } from "./permission_service.js"; -import type { CheckBulkPermissionsRequest } from "./permission_service.js"; -import type { CheckPermissionResponse } from "./permission_service.js"; -import type { CheckPermissionRequest } from "./permission_service.js"; -import type { DeleteRelationshipsResponse } from "./permission_service.js"; -import type { DeleteRelationshipsRequest } from "./permission_service.js"; -import type { WriteRelationshipsResponse } from "./permission_service.js"; -import type { WriteRelationshipsRequest } from "./permission_service.js"; -import type { ReadRelationshipsResponse } from "./permission_service.js"; -import type { ReadRelationshipsRequest } from "./permission_service.js"; +import type { ExportBulkRelationshipsResponse } from "./permission_service"; +import type { ExportBulkRelationshipsRequest } from "./permission_service"; +import type { ImportBulkRelationshipsRequest } from "./permission_service"; +import type { ImportBulkRelationshipsResponse } from "./permission_service"; +import type { LookupSubjectsResponse } from "./permission_service"; +import type { LookupSubjectsRequest } from "./permission_service"; +import type { LookupResourcesResponse } from "./permission_service"; +import type { LookupResourcesRequest } from "./permission_service"; +import type { ExpandPermissionTreeResponse } from "./permission_service"; +import type { ExpandPermissionTreeRequest } from "./permission_service"; +import type { CheckBulkPermissionsResponse } from "./permission_service"; +import type { CheckBulkPermissionsRequest } from "./permission_service"; +import type { CheckPermissionResponse } from "./permission_service"; +import type { CheckPermissionRequest } from "./permission_service"; +import type { DeleteRelationshipsResponse } from "./permission_service"; +import type { DeleteRelationshipsRequest } from "./permission_service"; +import type { WriteRelationshipsResponse } from "./permission_service"; +import type { WriteRelationshipsRequest } from "./permission_service"; +import type { ReadRelationshipsResponse } from "./permission_service"; +import type { ReadRelationshipsRequest } from "./permission_service"; import * as grpc from "@grpc/grpc-js"; /** * PermissionsService implements a set of RPCs that perform operations on diff --git a/src/authzedapi/authzed/api/v1/permission_service.ts b/src/authzedapi/authzed/api/v1/permission_service.ts index 2bf4567..bde0fe7 100644 --- a/src/authzedapi/authzed/api/v1/permission_service.ts +++ b/src/authzedapi/authzed/api/v1/permission_service.ts @@ -12,17 +12,18 @@ import type { PartialMessage } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MESSAGE_TYPE } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; -import { PermissionRelationshipTree } from "./core.js"; -import { Status } from "../../../google/rpc/status.js"; -import { DebugInformation } from "./debug.js"; -import { PartialCaveatInfo } from "./core.js"; -import { SubjectReference } from "./core.js"; -import { ObjectReference } from "./core.js"; -import { Struct } from "../../../google/protobuf/struct.js"; -import { RelationshipUpdate } from "./core.js"; -import { Relationship } from "./core.js"; -import { Cursor } from "./core.js"; -import { ZedToken } from "./core.js"; +import { PermissionRelationshipTree } from "./core"; +import { Status } from "../../../google/rpc/status"; +import { Timestamp } from "../../../google/protobuf/timestamp"; +import { DebugInformation } from "./debug"; +import { PartialCaveatInfo } from "./core"; +import { SubjectReference } from "./core"; +import { ObjectReference } from "./core"; +import { Struct } from "../../../google/protobuf/struct"; +import { RelationshipUpdate } from "./core"; +import { Relationship } from "./core"; +import { Cursor } from "./core"; +import { ZedToken } from "./core"; /** * Consistency will define how a request is handled by the backend. * By defining a consistency requirement, and a token at which those @@ -461,6 +462,13 @@ export interface CheckPermissionResponse { * @generated from protobuf field: authzed.api.v1.DebugInformation debug_trace = 4; */ debugTrace?: DebugInformation; + /** + * optional_expires_at is the time at which at least one of the relationships used to + * compute this result, expires (if any). This is *not* related to the caching window. + * + * @generated from protobuf field: google.protobuf.Timestamp optional_expires_at = 5; + */ + optionalExpiresAt?: Timestamp; } /** * @generated from protobuf enum authzed.api.v1.CheckPermissionResponse.Permissionship @@ -501,6 +509,14 @@ export interface CheckBulkPermissionsRequest { * @generated from protobuf field: repeated authzed.api.v1.CheckBulkPermissionsRequestItem items = 2; */ items: CheckBulkPermissionsRequestItem[]; + /** + * with_tracing, if true, indicates that each response should include a debug trace. + * This can be useful for debugging and performance analysis, but adds a small amount + * of compute overhead to the request. + * + * @generated from protobuf field: bool with_tracing = 3; + */ + withTracing: boolean; } /** * @generated from protobuf message authzed.api.v1.CheckBulkPermissionsRequestItem @@ -575,6 +591,12 @@ export interface CheckBulkPermissionsResponseItem { * @generated from protobuf field: authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2; */ partialCaveatInfo?: PartialCaveatInfo; + /** + * debug_trace is the debugging trace of this check, if requested. + * + * @generated from protobuf field: authzed.api.v1.DebugInformation debug_trace = 3; + */ + debugTrace?: DebugInformation; } /** * ExpandPermissionTreeRequest returns a tree representing the expansion of all @@ -919,7 +941,10 @@ export interface ResolvedSubject { * ImportBulkRelationshipsRequest represents one batch of the streaming * ImportBulkRelationships API. The maximum size is only limited by the backing * datastore, and optimal size should be determined by the calling client - * experimentally. + * experimentally. When ImportBulk is invoked and receives its first request message, + * a transaction is opened to import the relationships. All requests sent to the same + * invocation are executed under this single transaction. If a relationship already + * exists within the datastore, the entire transaction will fail with an error. * * @generated from protobuf message authzed.api.v1.ImportBulkRelationshipsRequest */ @@ -1786,7 +1811,8 @@ class CheckPermissionResponse$Type extends MessageType { no: 1, name: "checked_at", kind: "message", T: () => ZedToken, options: { "validate.rules": { message: { required: false } } } }, { no: 2, name: "permissionship", kind: "enum", T: () => ["authzed.api.v1.CheckPermissionResponse.Permissionship", CheckPermissionResponse_Permissionship, "PERMISSIONSHIP_"], options: { "validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }, { no: 3, name: "partial_caveat_info", kind: "message", T: () => PartialCaveatInfo, options: { "validate.rules": { message: { required: false } } } }, - { no: 4, name: "debug_trace", kind: "message", T: () => DebugInformation } + { no: 4, name: "debug_trace", kind: "message", T: () => DebugInformation }, + { no: 5, name: "optional_expires_at", kind: "message", T: () => Timestamp } ]); } create(value?: PartialMessage): CheckPermissionResponse { @@ -1813,6 +1839,9 @@ class CheckPermissionResponse$Type extends MessageType case /* authzed.api.v1.DebugInformation debug_trace */ 4: message.debugTrace = DebugInformation.internalBinaryRead(reader, reader.uint32(), options, message.debugTrace); break; + case /* google.protobuf.Timestamp optional_expires_at */ 5: + message.optionalExpiresAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.optionalExpiresAt); + break; default: let u = options.readUnknownField; if (u === "throw") @@ -1837,6 +1866,9 @@ class CheckPermissionResponse$Type extends MessageType /* authzed.api.v1.DebugInformation debug_trace = 4; */ if (message.debugTrace) DebugInformation.internalBinaryWrite(message.debugTrace, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + /* google.protobuf.Timestamp optional_expires_at = 5; */ + if (message.optionalExpiresAt) + Timestamp.internalBinaryWrite(message.optionalExpiresAt, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); @@ -1852,11 +1884,12 @@ class CheckBulkPermissionsRequest$Type extends MessageType Consistency }, - { no: 2, name: "items", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => CheckBulkPermissionsRequestItem, options: { "validate.rules": { repeated: { items: { message: { required: true } } } } } } + { no: 2, name: "items", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => CheckBulkPermissionsRequestItem, options: { "validate.rules": { repeated: { items: { message: { required: true } } } } } }, + { no: 3, name: "with_tracing", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): CheckBulkPermissionsRequest { - const message = { items: [] }; + const message = { items: [], withTracing: false }; globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); if (value !== undefined) reflectionMergePartial(this, message, value); @@ -1873,6 +1906,9 @@ class CheckBulkPermissionsRequest$Type extends MessageType ["authzed.api.v1.CheckPermissionResponse.Permissionship", CheckPermissionResponse_Permissionship, "PERMISSIONSHIP_"], options: { "validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }, - { no: 2, name: "partial_caveat_info", kind: "message", T: () => PartialCaveatInfo, options: { "validate.rules": { message: { required: false } } } } + { no: 2, name: "partial_caveat_info", kind: "message", T: () => PartialCaveatInfo, options: { "validate.rules": { message: { required: false } } } }, + { no: 3, name: "debug_trace", kind: "message", T: () => DebugInformation } ]); } create(value?: PartialMessage): CheckBulkPermissionsResponseItem { @@ -2116,6 +2156,9 @@ class CheckBulkPermissionsResponseItem$Type extends MessageType Date: Mon, 27 Jan 2025 12:28:51 -0700 Subject: [PATCH 2/3] Make the generation use the yarn script --- .github/workflows/automatic-api-update.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/automatic-api-update.yaml b/.github/workflows/automatic-api-update.yaml index 369c9d0..90352d8 100644 --- a/.github/workflows/automatic-api-update.yaml +++ b/.github/workflows/automatic-api-update.yaml @@ -1,3 +1,4 @@ +--- name: "Called update for API change" on: repository_dispatch: @@ -10,6 +11,9 @@ jobs: steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 + - uses: bahmutov/npm-install@v1 + with: + useLockFile: false - name: "Update Buf Script" id: buf-update uses: authzed/actions/buf-api-update@main @@ -29,7 +33,7 @@ jobs: if: steps.buf-update.outputs.updated == 'true' - name: "Run buf generate" if: steps.buf-update.outputs.updated == 'true' - run: "buf generate" + run: "yarn run buf" - name: Create Pull Request uses: peter-evans/create-pull-request@v7.0.6 if: steps.buf-update.outputs.updated == 'true' From bf03ec9f364316678d33b8f79df49225c05348ed Mon Sep 17 00:00:00 2001 From: Tanner Stirrat Date: Mon, 27 Jan 2025 12:29:20 -0700 Subject: [PATCH 3/3] Rerun generation --- src/authzedapi/authzed/api/v1/core.ts | 4 +- src/authzedapi/authzed/api/v1/debug.ts | 12 +++--- .../v1/experimental_service.grpc-client.ts | 42 +++++++++---------- .../authzed/api/v1/experimental_service.ts | 22 +++++----- .../api/v1/permission_service.grpc-client.ts | 42 +++++++++---------- .../authzed/api/v1/permission_service.ts | 24 +++++------ .../api/v1/schema_service.grpc-client.ts | 10 ++--- .../authzed/api/v1/schema_service.ts | 2 +- .../api/v1/watch_service.grpc-client.ts | 6 +-- .../authzed/api/v1/watch_service.ts | 8 ++-- src/authzedapi/google/rpc/status.ts | 2 +- .../protoc-gen-openapiv2/options/openapiv2.ts | 2 +- src/authzedapi/validate/validate.ts | 4 +- 13 files changed, 90 insertions(+), 90 deletions(-) diff --git a/src/authzedapi/authzed/api/v1/core.ts b/src/authzedapi/authzed/api/v1/core.ts index 4d83172..6d8c9df 100644 --- a/src/authzedapi/authzed/api/v1/core.ts +++ b/src/authzedapi/authzed/api/v1/core.ts @@ -11,8 +11,8 @@ import type { PartialMessage } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MESSAGE_TYPE } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; -import { Struct } from "../../../google/protobuf/struct"; -import { Timestamp } from "../../../google/protobuf/timestamp"; +import { Struct } from "../../../google/protobuf/struct.js"; +import { Timestamp } from "../../../google/protobuf/timestamp.js"; /** * Relationship specifies how a resource relates to a subject. Relationships * form the data for the graph over which all permissions questions are diff --git a/src/authzedapi/authzed/api/v1/debug.ts b/src/authzedapi/authzed/api/v1/debug.ts index 78e5dea..c89e1b6 100644 --- a/src/authzedapi/authzed/api/v1/debug.ts +++ b/src/authzedapi/authzed/api/v1/debug.ts @@ -11,12 +11,12 @@ import type { PartialMessage } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MESSAGE_TYPE } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; -import { PartialCaveatInfo } from "./core"; -import { Struct } from "../../../google/protobuf/struct"; -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Duration } from "../../../google/protobuf/duration"; -import { SubjectReference } from "./core"; -import { ObjectReference } from "./core"; +import { PartialCaveatInfo } from "./core.js"; +import { Struct } from "../../../google/protobuf/struct.js"; +import { Timestamp } from "../../../google/protobuf/timestamp.js"; +import { Duration } from "../../../google/protobuf/duration.js"; +import { SubjectReference } from "./core.js"; +import { ObjectReference } from "./core.js"; /** * DebugInformation defines debug information returned by an API call in a footer when * requested with a specific debugging header. diff --git a/src/authzedapi/authzed/api/v1/experimental_service.grpc-client.ts b/src/authzedapi/authzed/api/v1/experimental_service.grpc-client.ts index 4c235e8..ca60f8a 100644 --- a/src/authzedapi/authzed/api/v1/experimental_service.grpc-client.ts +++ b/src/authzedapi/authzed/api/v1/experimental_service.grpc-client.ts @@ -1,29 +1,29 @@ // @generated by protobuf-ts 2.9.1 with parameter generate_dependencies,long_type_string,client_grpc1 // @generated from protobuf file "authzed/api/v1/experimental_service.proto" (package "authzed.api.v1", syntax proto3) // tslint:disable -import { ExperimentalService } from "./experimental_service"; +import { ExperimentalService } from "./experimental_service.js"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; -import type { ExperimentalUnregisterRelationshipCounterResponse } from "./experimental_service"; -import type { ExperimentalUnregisterRelationshipCounterRequest } from "./experimental_service"; -import type { ExperimentalCountRelationshipsResponse } from "./experimental_service"; -import type { ExperimentalCountRelationshipsRequest } from "./experimental_service"; -import type { ExperimentalRegisterRelationshipCounterResponse } from "./experimental_service"; -import type { ExperimentalRegisterRelationshipCounterRequest } from "./experimental_service"; -import type { ExperimentalDiffSchemaResponse } from "./experimental_service"; -import type { ExperimentalDiffSchemaRequest } from "./experimental_service"; -import type { ExperimentalDependentRelationsResponse } from "./experimental_service"; -import type { ExperimentalDependentRelationsRequest } from "./experimental_service"; -import type { ExperimentalComputablePermissionsResponse } from "./experimental_service"; -import type { ExperimentalComputablePermissionsRequest } from "./experimental_service"; -import type { ExperimentalReflectSchemaResponse } from "./experimental_service"; -import type { ExperimentalReflectSchemaRequest } from "./experimental_service"; -import type { BulkCheckPermissionResponse } from "./experimental_service"; -import type { BulkCheckPermissionRequest } from "./experimental_service"; -import type { BulkExportRelationshipsResponse } from "./experimental_service"; -import type { BulkExportRelationshipsRequest } from "./experimental_service"; -import type { BulkImportRelationshipsRequest } from "./experimental_service"; -import type { BulkImportRelationshipsResponse } from "./experimental_service"; +import type { ExperimentalUnregisterRelationshipCounterResponse } from "./experimental_service.js"; +import type { ExperimentalUnregisterRelationshipCounterRequest } from "./experimental_service.js"; +import type { ExperimentalCountRelationshipsResponse } from "./experimental_service.js"; +import type { ExperimentalCountRelationshipsRequest } from "./experimental_service.js"; +import type { ExperimentalRegisterRelationshipCounterResponse } from "./experimental_service.js"; +import type { ExperimentalRegisterRelationshipCounterRequest } from "./experimental_service.js"; +import type { ExperimentalDiffSchemaResponse } from "./experimental_service.js"; +import type { ExperimentalDiffSchemaRequest } from "./experimental_service.js"; +import type { ExperimentalDependentRelationsResponse } from "./experimental_service.js"; +import type { ExperimentalDependentRelationsRequest } from "./experimental_service.js"; +import type { ExperimentalComputablePermissionsResponse } from "./experimental_service.js"; +import type { ExperimentalComputablePermissionsRequest } from "./experimental_service.js"; +import type { ExperimentalReflectSchemaResponse } from "./experimental_service.js"; +import type { ExperimentalReflectSchemaRequest } from "./experimental_service.js"; +import type { BulkCheckPermissionResponse } from "./experimental_service.js"; +import type { BulkCheckPermissionRequest } from "./experimental_service.js"; +import type { BulkExportRelationshipsResponse } from "./experimental_service.js"; +import type { BulkExportRelationshipsRequest } from "./experimental_service.js"; +import type { BulkImportRelationshipsRequest } from "./experimental_service.js"; +import type { BulkImportRelationshipsResponse } from "./experimental_service.js"; import * as grpc from "@grpc/grpc-js"; /** * ExperimentalService exposes a number of APIs that are currently being diff --git a/src/authzedapi/authzed/api/v1/experimental_service.ts b/src/authzedapi/authzed/api/v1/experimental_service.ts index e9ccd76..c87635e 100644 --- a/src/authzedapi/authzed/api/v1/experimental_service.ts +++ b/src/authzedapi/authzed/api/v1/experimental_service.ts @@ -12,17 +12,17 @@ import type { PartialMessage } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MESSAGE_TYPE } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; -import { Cursor } from "./core"; -import { Relationship } from "./core"; -import { PartialCaveatInfo } from "./core"; -import { CheckPermissionResponse_Permissionship } from "./permission_service"; -import { Status } from "../../../google/rpc/status"; -import { Struct } from "../../../google/protobuf/struct"; -import { SubjectReference } from "./core"; -import { ObjectReference } from "./core"; -import { Consistency } from "./permission_service"; -import { ZedToken } from "./core"; -import { RelationshipFilter } from "./permission_service"; +import { Cursor } from "./core.js"; +import { Relationship } from "./core.js"; +import { PartialCaveatInfo } from "./core.js"; +import { CheckPermissionResponse_Permissionship } from "./permission_service.js"; +import { Status } from "../../../google/rpc/status.js"; +import { Struct } from "../../../google/protobuf/struct.js"; +import { SubjectReference } from "./core.js"; +import { ObjectReference } from "./core.js"; +import { Consistency } from "./permission_service.js"; +import { ZedToken } from "./core.js"; +import { RelationshipFilter } from "./permission_service.js"; /** * @generated from protobuf message authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest */ diff --git a/src/authzedapi/authzed/api/v1/permission_service.grpc-client.ts b/src/authzedapi/authzed/api/v1/permission_service.grpc-client.ts index 71a5fd8..ef5fa08 100644 --- a/src/authzedapi/authzed/api/v1/permission_service.grpc-client.ts +++ b/src/authzedapi/authzed/api/v1/permission_service.grpc-client.ts @@ -1,29 +1,29 @@ // @generated by protobuf-ts 2.9.1 with parameter generate_dependencies,long_type_string,client_grpc1 // @generated from protobuf file "authzed/api/v1/permission_service.proto" (package "authzed.api.v1", syntax proto3) // tslint:disable -import { PermissionsService } from "./permission_service"; +import { PermissionsService } from "./permission_service.js"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; -import type { ExportBulkRelationshipsResponse } from "./permission_service"; -import type { ExportBulkRelationshipsRequest } from "./permission_service"; -import type { ImportBulkRelationshipsRequest } from "./permission_service"; -import type { ImportBulkRelationshipsResponse } from "./permission_service"; -import type { LookupSubjectsResponse } from "./permission_service"; -import type { LookupSubjectsRequest } from "./permission_service"; -import type { LookupResourcesResponse } from "./permission_service"; -import type { LookupResourcesRequest } from "./permission_service"; -import type { ExpandPermissionTreeResponse } from "./permission_service"; -import type { ExpandPermissionTreeRequest } from "./permission_service"; -import type { CheckBulkPermissionsResponse } from "./permission_service"; -import type { CheckBulkPermissionsRequest } from "./permission_service"; -import type { CheckPermissionResponse } from "./permission_service"; -import type { CheckPermissionRequest } from "./permission_service"; -import type { DeleteRelationshipsResponse } from "./permission_service"; -import type { DeleteRelationshipsRequest } from "./permission_service"; -import type { WriteRelationshipsResponse } from "./permission_service"; -import type { WriteRelationshipsRequest } from "./permission_service"; -import type { ReadRelationshipsResponse } from "./permission_service"; -import type { ReadRelationshipsRequest } from "./permission_service"; +import type { ExportBulkRelationshipsResponse } from "./permission_service.js"; +import type { ExportBulkRelationshipsRequest } from "./permission_service.js"; +import type { ImportBulkRelationshipsRequest } from "./permission_service.js"; +import type { ImportBulkRelationshipsResponse } from "./permission_service.js"; +import type { LookupSubjectsResponse } from "./permission_service.js"; +import type { LookupSubjectsRequest } from "./permission_service.js"; +import type { LookupResourcesResponse } from "./permission_service.js"; +import type { LookupResourcesRequest } from "./permission_service.js"; +import type { ExpandPermissionTreeResponse } from "./permission_service.js"; +import type { ExpandPermissionTreeRequest } from "./permission_service.js"; +import type { CheckBulkPermissionsResponse } from "./permission_service.js"; +import type { CheckBulkPermissionsRequest } from "./permission_service.js"; +import type { CheckPermissionResponse } from "./permission_service.js"; +import type { CheckPermissionRequest } from "./permission_service.js"; +import type { DeleteRelationshipsResponse } from "./permission_service.js"; +import type { DeleteRelationshipsRequest } from "./permission_service.js"; +import type { WriteRelationshipsResponse } from "./permission_service.js"; +import type { WriteRelationshipsRequest } from "./permission_service.js"; +import type { ReadRelationshipsResponse } from "./permission_service.js"; +import type { ReadRelationshipsRequest } from "./permission_service.js"; import * as grpc from "@grpc/grpc-js"; /** * PermissionsService implements a set of RPCs that perform operations on diff --git a/src/authzedapi/authzed/api/v1/permission_service.ts b/src/authzedapi/authzed/api/v1/permission_service.ts index bde0fe7..4a452b8 100644 --- a/src/authzedapi/authzed/api/v1/permission_service.ts +++ b/src/authzedapi/authzed/api/v1/permission_service.ts @@ -12,18 +12,18 @@ import type { PartialMessage } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MESSAGE_TYPE } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; -import { PermissionRelationshipTree } from "./core"; -import { Status } from "../../../google/rpc/status"; -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { DebugInformation } from "./debug"; -import { PartialCaveatInfo } from "./core"; -import { SubjectReference } from "./core"; -import { ObjectReference } from "./core"; -import { Struct } from "../../../google/protobuf/struct"; -import { RelationshipUpdate } from "./core"; -import { Relationship } from "./core"; -import { Cursor } from "./core"; -import { ZedToken } from "./core"; +import { PermissionRelationshipTree } from "./core.js"; +import { Status } from "../../../google/rpc/status.js"; +import { Timestamp } from "../../../google/protobuf/timestamp.js"; +import { DebugInformation } from "./debug.js"; +import { PartialCaveatInfo } from "./core.js"; +import { SubjectReference } from "./core.js"; +import { ObjectReference } from "./core.js"; +import { Struct } from "../../../google/protobuf/struct.js"; +import { RelationshipUpdate } from "./core.js"; +import { Relationship } from "./core.js"; +import { Cursor } from "./core.js"; +import { ZedToken } from "./core.js"; /** * Consistency will define how a request is handled by the backend. * By defining a consistency requirement, and a token at which those diff --git a/src/authzedapi/authzed/api/v1/schema_service.grpc-client.ts b/src/authzedapi/authzed/api/v1/schema_service.grpc-client.ts index b4052fa..669790d 100644 --- a/src/authzedapi/authzed/api/v1/schema_service.grpc-client.ts +++ b/src/authzedapi/authzed/api/v1/schema_service.grpc-client.ts @@ -1,13 +1,13 @@ // @generated by protobuf-ts 2.9.1 with parameter generate_dependencies,long_type_string,client_grpc1 // @generated from protobuf file "authzed/api/v1/schema_service.proto" (package "authzed.api.v1", syntax proto3) // tslint:disable -import { SchemaService } from "./schema_service"; +import { SchemaService } from "./schema_service.js"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; -import type { WriteSchemaResponse } from "./schema_service"; -import type { WriteSchemaRequest } from "./schema_service"; -import type { ReadSchemaResponse } from "./schema_service"; -import type { ReadSchemaRequest } from "./schema_service"; +import type { WriteSchemaResponse } from "./schema_service.js"; +import type { WriteSchemaRequest } from "./schema_service.js"; +import type { ReadSchemaResponse } from "./schema_service.js"; +import type { ReadSchemaRequest } from "./schema_service.js"; import * as grpc from "@grpc/grpc-js"; /** * SchemaService implements operations on a Permissions System's Schema. diff --git a/src/authzedapi/authzed/api/v1/schema_service.ts b/src/authzedapi/authzed/api/v1/schema_service.ts index 4407193..2ce52c7 100644 --- a/src/authzedapi/authzed/api/v1/schema_service.ts +++ b/src/authzedapi/authzed/api/v1/schema_service.ts @@ -12,7 +12,7 @@ import type { PartialMessage } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MESSAGE_TYPE } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; -import { ZedToken } from "./core"; +import { ZedToken } from "./core.js"; /** * ReadSchemaRequest returns the schema from the database. * diff --git a/src/authzedapi/authzed/api/v1/watch_service.grpc-client.ts b/src/authzedapi/authzed/api/v1/watch_service.grpc-client.ts index 9f3126e..03d4d50 100644 --- a/src/authzedapi/authzed/api/v1/watch_service.grpc-client.ts +++ b/src/authzedapi/authzed/api/v1/watch_service.grpc-client.ts @@ -1,11 +1,11 @@ // @generated by protobuf-ts 2.9.1 with parameter generate_dependencies,long_type_string,client_grpc1 // @generated from protobuf file "authzed/api/v1/watch_service.proto" (package "authzed.api.v1", syntax proto3) // tslint:disable -import { WatchService } from "./watch_service"; +import { WatchService } from "./watch_service.js"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; -import type { WatchResponse } from "./watch_service"; -import type { WatchRequest } from "./watch_service"; +import type { WatchResponse } from "./watch_service.js"; +import type { WatchRequest } from "./watch_service.js"; import * as grpc from "@grpc/grpc-js"; /** * @generated from protobuf service authzed.api.v1.WatchService diff --git a/src/authzedapi/authzed/api/v1/watch_service.ts b/src/authzedapi/authzed/api/v1/watch_service.ts index 4a48405..c13eb52 100644 --- a/src/authzedapi/authzed/api/v1/watch_service.ts +++ b/src/authzedapi/authzed/api/v1/watch_service.ts @@ -12,10 +12,10 @@ import type { PartialMessage } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MESSAGE_TYPE } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; -import { Struct } from "../../../google/protobuf/struct"; -import { RelationshipUpdate } from "./core"; -import { RelationshipFilter } from "./permission_service"; -import { ZedToken } from "./core"; +import { Struct } from "../../../google/protobuf/struct.js"; +import { RelationshipUpdate } from "./core.js"; +import { RelationshipFilter } from "./permission_service.js"; +import { ZedToken } from "./core.js"; /** * WatchRequest specifies the object definitions for which we want to start * watching mutations, and an optional start snapshot for when to start diff --git a/src/authzedapi/google/rpc/status.ts b/src/authzedapi/google/rpc/status.ts index d0961ae..b37247c 100644 --- a/src/authzedapi/google/rpc/status.ts +++ b/src/authzedapi/google/rpc/status.ts @@ -26,7 +26,7 @@ import type { PartialMessage } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MESSAGE_TYPE } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; -import { Any } from "../protobuf/any"; +import { Any } from "../protobuf/any.js"; /** * The `Status` type defines a logical error model that is suitable for * different programming environments, including REST APIs and RPC APIs. It is diff --git a/src/authzedapi/protoc-gen-openapiv2/options/openapiv2.ts b/src/authzedapi/protoc-gen-openapiv2/options/openapiv2.ts index 6fecab7..cfdf632 100644 --- a/src/authzedapi/protoc-gen-openapiv2/options/openapiv2.ts +++ b/src/authzedapi/protoc-gen-openapiv2/options/openapiv2.ts @@ -11,7 +11,7 @@ import type { PartialMessage } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MESSAGE_TYPE } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; -import { Value } from "../../google/protobuf/struct"; +import { Value } from "../../google/protobuf/struct.js"; /** * `Swagger` is a representation of OpenAPI v2 specification's Swagger object. * diff --git a/src/authzedapi/validate/validate.ts b/src/authzedapi/validate/validate.ts index 06c06fc..536557a 100644 --- a/src/authzedapi/validate/validate.ts +++ b/src/authzedapi/validate/validate.ts @@ -11,8 +11,8 @@ import type { PartialMessage } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MESSAGE_TYPE } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; -import { Timestamp } from "../google/protobuf/timestamp"; -import { Duration } from "../google/protobuf/duration"; +import { Timestamp } from "../google/protobuf/timestamp.js"; +import { Duration } from "../google/protobuf/duration.js"; /** * FieldRules encapsulates the rules for each type of field. Depending on the * field, the correct set should be used to ensure proper validations.