@pidgr/proto 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@pidgr/proto",
3
+ "version": "0.36.0",
4
+ "description": "Generated protobuf/gRPC stubs for the Pidgr platform",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/pidgr/pidgr-proto.git",
8
+ "directory": "gen/ts"
9
+ },
10
+ "publishConfig": {
11
+ "registry": "https://npm.pkg.github.com",
12
+ "access": "public"
13
+ },
14
+ "files": [
15
+ "pidgr/**/*.ts"
16
+ ],
17
+ "dependencies": {
18
+ "@bufbuild/protobuf": "^2.0.0",
19
+ "@connectrpc/connect": "^2.0.0"
20
+ }
21
+ }
@@ -0,0 +1,247 @@
1
+ // @generated by protoc-gen-es v2.11.0 with parameter "target=ts"
2
+ // @generated from file pidgr/v1/access_code.proto (package pidgr.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
6
+ import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
7
+ import type { Timestamp } from "@bufbuild/protobuf/wkt";
8
+ import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
9
+ import type { Message } from "@bufbuild/protobuf";
10
+
11
+ /**
12
+ * Describes the file pidgr/v1/access_code.proto.
13
+ */
14
+ export const file_pidgr_v1_access_code: GenFile = /*@__PURE__*/
15
+ fileDesc("ChpwaWRnci92MS9hY2Nlc3NfY29kZS5wcm90bxIIcGlkZ3IudjEi2wEKCkFjY2Vzc0NvZGUSCgoCaWQYASABKAkSDAoEY29kZRgCIAEoCRINCgVsYWJlbBgDIAEoCRIuCgpjcmVhdGVkX2F0GAQgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIvCgtyZWRlZW1lZF9hdBgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASEwoLcmVkZWVtZWRfYnkYBiABKAkSLgoKcmV2b2tlZF9hdBgHIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAiOgoaR2VuZXJhdGVBY2Nlc3NDb2Rlc1JlcXVlc3QSDQoFY291bnQYASABKAUSDQoFbGFiZWwYAiABKAkiSQobR2VuZXJhdGVBY2Nlc3NDb2Rlc1Jlc3BvbnNlEioKDGFjY2Vzc19jb2RlcxgBIAMoCzIULnBpZGdyLnYxLkFjY2Vzc0NvZGUiGAoWTGlzdEFjY2Vzc0NvZGVzUmVxdWVzdCJFChdMaXN0QWNjZXNzQ29kZXNSZXNwb25zZRIqCgxhY2Nlc3NfY29kZXMYASADKAsyFC5waWRnci52MS5BY2Nlc3NDb2RlIjEKF1Jldm9rZUFjY2Vzc0NvZGVSZXF1ZXN0EhYKDmFjY2Vzc19jb2RlX2lkGAEgASgJIhoKGFJldm9rZUFjY2Vzc0NvZGVSZXNwb25zZTKqAgoRQWNjZXNzQ29kZVNlcnZpY2USYgoTR2VuZXJhdGVBY2Nlc3NDb2RlcxIkLnBpZGdyLnYxLkdlbmVyYXRlQWNjZXNzQ29kZXNSZXF1ZXN0GiUucGlkZ3IudjEuR2VuZXJhdGVBY2Nlc3NDb2Rlc1Jlc3BvbnNlElYKD0xpc3RBY2Nlc3NDb2RlcxIgLnBpZGdyLnYxLkxpc3RBY2Nlc3NDb2Rlc1JlcXVlc3QaIS5waWRnci52MS5MaXN0QWNjZXNzQ29kZXNSZXNwb25zZRJZChBSZXZva2VBY2Nlc3NDb2RlEiEucGlkZ3IudjEuUmV2b2tlQWNjZXNzQ29kZVJlcXVlc3QaIi5waWRnci52MS5SZXZva2VBY2Nlc3NDb2RlUmVzcG9uc2VCNlo0Z2l0aHViLmNvbS9waWRnci9waWRnci1wcm90by9nZW4vZ28vcGlkZ3IvdjE7cGlkZ3J2MWIGcHJvdG8z", [file_google_protobuf_timestamp]);
16
+
17
+ /**
18
+ * A pre-generated access code for early access gating.
19
+ * Codes are single-use: once redeemed during organization creation, they cannot be reused.
20
+ *
21
+ * @generated from message pidgr.v1.AccessCode
22
+ */
23
+ export type AccessCode = Message<"pidgr.v1.AccessCode"> & {
24
+ /**
25
+ * Unique identifier for the access code.
26
+ *
27
+ * @generated from field: string id = 1;
28
+ */
29
+ id: string;
30
+
31
+ /**
32
+ * The access code value (e.g. "PIDGR-A3BF7K2N").
33
+ * Format: PIDGR- followed by 8 alphanumeric characters (excludes 0, O, 1, I for readability).
34
+ *
35
+ * @generated from field: string code = 2;
36
+ */
37
+ code: string;
38
+
39
+ /**
40
+ * Optional human-friendly label for tracking (e.g. "Batch Feb 2026", "Demo for Acme").
41
+ * Constraints: Max length 200 characters.
42
+ *
43
+ * @generated from field: string label = 3;
44
+ */
45
+ label: string;
46
+
47
+ /**
48
+ * When the code was generated.
49
+ *
50
+ * @generated from field: google.protobuf.Timestamp created_at = 4;
51
+ */
52
+ createdAt?: Timestamp;
53
+
54
+ /**
55
+ * When the code was redeemed. Empty if not yet redeemed.
56
+ *
57
+ * @generated from field: google.protobuf.Timestamp redeemed_at = 5;
58
+ */
59
+ redeemedAt?: Timestamp;
60
+
61
+ /**
62
+ * Email of the user who redeemed the code. Empty if not yet redeemed.
63
+ *
64
+ * @generated from field: string redeemed_by = 6;
65
+ */
66
+ redeemedBy: string;
67
+
68
+ /**
69
+ * When the code was revoked. Empty if not revoked.
70
+ *
71
+ * @generated from field: google.protobuf.Timestamp revoked_at = 7;
72
+ */
73
+ revokedAt?: Timestamp;
74
+ };
75
+
76
+ /**
77
+ * Describes the message pidgr.v1.AccessCode.
78
+ * Use `create(AccessCodeSchema)` to create a new message.
79
+ */
80
+ export const AccessCodeSchema: GenMessage<AccessCode> = /*@__PURE__*/
81
+ messageDesc(file_pidgr_v1_access_code, 0);
82
+
83
+ /**
84
+ * Request to generate one or more access codes.
85
+ *
86
+ * @generated from message pidgr.v1.GenerateAccessCodesRequest
87
+ */
88
+ export type GenerateAccessCodesRequest = Message<"pidgr.v1.GenerateAccessCodesRequest"> & {
89
+ /**
90
+ * Number of codes to generate. Required, must be between 1 and 100.
91
+ *
92
+ * @generated from field: int32 count = 1;
93
+ */
94
+ count: number;
95
+
96
+ /**
97
+ * Optional label applied to all generated codes.
98
+ * Constraints: Max length 200 characters.
99
+ *
100
+ * @generated from field: string label = 2;
101
+ */
102
+ label: string;
103
+ };
104
+
105
+ /**
106
+ * Describes the message pidgr.v1.GenerateAccessCodesRequest.
107
+ * Use `create(GenerateAccessCodesRequestSchema)` to create a new message.
108
+ */
109
+ export const GenerateAccessCodesRequestSchema: GenMessage<GenerateAccessCodesRequest> = /*@__PURE__*/
110
+ messageDesc(file_pidgr_v1_access_code, 1);
111
+
112
+ /**
113
+ * Response containing the newly generated access codes.
114
+ *
115
+ * @generated from message pidgr.v1.GenerateAccessCodesResponse
116
+ */
117
+ export type GenerateAccessCodesResponse = Message<"pidgr.v1.GenerateAccessCodesResponse"> & {
118
+ /**
119
+ * The generated access codes.
120
+ *
121
+ * @generated from field: repeated pidgr.v1.AccessCode access_codes = 1;
122
+ */
123
+ accessCodes: AccessCode[];
124
+ };
125
+
126
+ /**
127
+ * Describes the message pidgr.v1.GenerateAccessCodesResponse.
128
+ * Use `create(GenerateAccessCodesResponseSchema)` to create a new message.
129
+ */
130
+ export const GenerateAccessCodesResponseSchema: GenMessage<GenerateAccessCodesResponse> = /*@__PURE__*/
131
+ messageDesc(file_pidgr_v1_access_code, 2);
132
+
133
+ /**
134
+ * Request to list all access codes.
135
+ *
136
+ * @generated from message pidgr.v1.ListAccessCodesRequest
137
+ */
138
+ export type ListAccessCodesRequest = Message<"pidgr.v1.ListAccessCodesRequest"> & {
139
+ };
140
+
141
+ /**
142
+ * Describes the message pidgr.v1.ListAccessCodesRequest.
143
+ * Use `create(ListAccessCodesRequestSchema)` to create a new message.
144
+ */
145
+ export const ListAccessCodesRequestSchema: GenMessage<ListAccessCodesRequest> = /*@__PURE__*/
146
+ messageDesc(file_pidgr_v1_access_code, 3);
147
+
148
+ /**
149
+ * Response containing all access codes.
150
+ *
151
+ * @generated from message pidgr.v1.ListAccessCodesResponse
152
+ */
153
+ export type ListAccessCodesResponse = Message<"pidgr.v1.ListAccessCodesResponse"> & {
154
+ /**
155
+ * All access codes (active, redeemed, and revoked).
156
+ *
157
+ * @generated from field: repeated pidgr.v1.AccessCode access_codes = 1;
158
+ */
159
+ accessCodes: AccessCode[];
160
+ };
161
+
162
+ /**
163
+ * Describes the message pidgr.v1.ListAccessCodesResponse.
164
+ * Use `create(ListAccessCodesResponseSchema)` to create a new message.
165
+ */
166
+ export const ListAccessCodesResponseSchema: GenMessage<ListAccessCodesResponse> = /*@__PURE__*/
167
+ messageDesc(file_pidgr_v1_access_code, 4);
168
+
169
+ /**
170
+ * Request to revoke an access code.
171
+ *
172
+ * @generated from message pidgr.v1.RevokeAccessCodeRequest
173
+ */
174
+ export type RevokeAccessCodeRequest = Message<"pidgr.v1.RevokeAccessCodeRequest"> & {
175
+ /**
176
+ * ID of the access code to revoke. Required.
177
+ *
178
+ * @generated from field: string access_code_id = 1;
179
+ */
180
+ accessCodeId: string;
181
+ };
182
+
183
+ /**
184
+ * Describes the message pidgr.v1.RevokeAccessCodeRequest.
185
+ * Use `create(RevokeAccessCodeRequestSchema)` to create a new message.
186
+ */
187
+ export const RevokeAccessCodeRequestSchema: GenMessage<RevokeAccessCodeRequest> = /*@__PURE__*/
188
+ messageDesc(file_pidgr_v1_access_code, 5);
189
+
190
+ /**
191
+ * Response after revoking an access code.
192
+ *
193
+ * @generated from message pidgr.v1.RevokeAccessCodeResponse
194
+ */
195
+ export type RevokeAccessCodeResponse = Message<"pidgr.v1.RevokeAccessCodeResponse"> & {
196
+ };
197
+
198
+ /**
199
+ * Describes the message pidgr.v1.RevokeAccessCodeResponse.
200
+ * Use `create(RevokeAccessCodeResponseSchema)` to create a new message.
201
+ */
202
+ export const RevokeAccessCodeResponseSchema: GenMessage<RevokeAccessCodeResponse> = /*@__PURE__*/
203
+ messageDesc(file_pidgr_v1_access_code, 6);
204
+
205
+ /**
206
+ * Manages early access codes for organization creation gating.
207
+ * All RPCs require API key authentication (platform-level, not org-scoped).
208
+ *
209
+ * @generated from service pidgr.v1.AccessCodeService
210
+ */
211
+ export const AccessCodeService: GenService<{
212
+ /**
213
+ * Generate one or more access codes with an optional label.
214
+ * Authorization: Requires API key auth (service-level).
215
+ *
216
+ * @generated from rpc pidgr.v1.AccessCodeService.GenerateAccessCodes
217
+ */
218
+ generateAccessCodes: {
219
+ methodKind: "unary";
220
+ input: typeof GenerateAccessCodesRequestSchema;
221
+ output: typeof GenerateAccessCodesResponseSchema;
222
+ },
223
+ /**
224
+ * List all access codes (active, redeemed, and revoked).
225
+ * Authorization: Requires API key auth (service-level).
226
+ *
227
+ * @generated from rpc pidgr.v1.AccessCodeService.ListAccessCodes
228
+ */
229
+ listAccessCodes: {
230
+ methodKind: "unary";
231
+ input: typeof ListAccessCodesRequestSchema;
232
+ output: typeof ListAccessCodesResponseSchema;
233
+ },
234
+ /**
235
+ * Revoke an access code. Revoked codes cannot be used for organization creation.
236
+ * Authorization: Requires API key auth (service-level).
237
+ *
238
+ * @generated from rpc pidgr.v1.AccessCodeService.RevokeAccessCode
239
+ */
240
+ revokeAccessCode: {
241
+ methodKind: "unary";
242
+ input: typeof RevokeAccessCodeRequestSchema;
243
+ output: typeof RevokeAccessCodeResponseSchema;
244
+ },
245
+ }> = /*@__PURE__*/
246
+ serviceDesc(file_pidgr_v1_access_code, 0);
247
+
@@ -0,0 +1,94 @@
1
+ // @generated by protoc-gen-es v2.11.0 with parameter "target=ts"
2
+ // @generated from file pidgr/v1/action.proto (package pidgr.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
6
+ import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
7
+ import type { Message } from "@bufbuild/protobuf";
8
+
9
+ /**
10
+ * Describes the file pidgr/v1/action.proto.
11
+ */
12
+ export const file_pidgr_v1_action: GenFile = /*@__PURE__*/
13
+ fileDesc("ChVwaWRnci92MS9hY3Rpb24ucHJvdG8SCHBpZGdyLnYxIk4KE1N1Ym1pdEFjdGlvblJlcXVlc3QSEwoLZGVsaXZlcnlfaWQYASABKAkSEQoJYWN0aW9uX2lkGAIgASgJEg8KB3BheWxvYWQYAyABKAwiJwoUU3VibWl0QWN0aW9uUmVzcG9uc2USDwoHc3VjY2VzcxgBIAEoCDJeCg1BY3Rpb25TZXJ2aWNlEk0KDFN1Ym1pdEFjdGlvbhIdLnBpZGdyLnYxLlN1Ym1pdEFjdGlvblJlcXVlc3QaHi5waWRnci52MS5TdWJtaXRBY3Rpb25SZXNwb25zZUI2WjRnaXRodWIuY29tL3BpZGdyL3BpZGdyLXByb3RvL2dlbi9nby9waWRnci92MTtwaWRncnYxYgZwcm90bzM");
14
+
15
+ /**
16
+ * Request to submit a user action on a delivered message.
17
+ *
18
+ * @generated from message pidgr.v1.SubmitActionRequest
19
+ */
20
+ export type SubmitActionRequest = Message<"pidgr.v1.SubmitActionRequest"> & {
21
+ /**
22
+ * ID of the delivery the user is acting on.
23
+ * Constraints: UUID format (36 characters).
24
+ *
25
+ * @generated from field: string delivery_id = 1;
26
+ */
27
+ deliveryId: string;
28
+
29
+ /**
30
+ * ID of the action being performed (matches MessageAction.id).
31
+ * Constraints: Max length 100 characters.
32
+ *
33
+ * @generated from field: string action_id = 2;
34
+ */
35
+ actionId: string;
36
+
37
+ /**
38
+ * Optional action-specific payload (e.g. poll response data). Empty for ACK.
39
+ * Constraints: Max size 10000 bytes.
40
+ *
41
+ * @generated from field: bytes payload = 3;
42
+ */
43
+ payload: Uint8Array;
44
+ };
45
+
46
+ /**
47
+ * Describes the message pidgr.v1.SubmitActionRequest.
48
+ * Use `create(SubmitActionRequestSchema)` to create a new message.
49
+ */
50
+ export const SubmitActionRequestSchema: GenMessage<SubmitActionRequest> = /*@__PURE__*/
51
+ messageDesc(file_pidgr_v1_action, 0);
52
+
53
+ /**
54
+ * Response after submitting an action.
55
+ *
56
+ * @generated from message pidgr.v1.SubmitActionResponse
57
+ */
58
+ export type SubmitActionResponse = Message<"pidgr.v1.SubmitActionResponse"> & {
59
+ /**
60
+ * Whether the action was successfully recorded and forwarded to the workflow.
61
+ *
62
+ * @generated from field: bool success = 1;
63
+ */
64
+ success: boolean;
65
+ };
66
+
67
+ /**
68
+ * Describes the message pidgr.v1.SubmitActionResponse.
69
+ * Use `create(SubmitActionResponseSchema)` to create a new message.
70
+ */
71
+ export const SubmitActionResponseSchema: GenMessage<SubmitActionResponse> = /*@__PURE__*/
72
+ messageDesc(file_pidgr_v1_action, 1);
73
+
74
+ /**
75
+ * Handles user actions on delivered messages.
76
+ * Actions drive workflow progression (e.g. ACK completes a wait step).
77
+ *
78
+ * @generated from service pidgr.v1.ActionService
79
+ */
80
+ export const ActionService: GenService<{
81
+ /**
82
+ * Submit an action for a specific delivery, advancing the campaign workflow.
83
+ * Backend MUST verify the authenticated user is the delivery recipient.
84
+ *
85
+ * @generated from rpc pidgr.v1.ActionService.SubmitAction
86
+ */
87
+ submitAction: {
88
+ methodKind: "unary";
89
+ input: typeof SubmitActionRequestSchema;
90
+ output: typeof SubmitActionResponseSchema;
91
+ },
92
+ }> = /*@__PURE__*/
93
+ serviceDesc(file_pidgr_v1_action, 0);
94
+
@@ -0,0 +1,264 @@
1
+ // @generated by protoc-gen-es v2.11.0 with parameter "target=ts"
2
+ // @generated from file pidgr/v1/api_key.proto (package pidgr.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
6
+ import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
7
+ import type { Timestamp } from "@bufbuild/protobuf/wkt";
8
+ import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
9
+ import type { Permission } from "./common_pb";
10
+ import { file_pidgr_v1_common } from "./common_pb";
11
+ import type { Message } from "@bufbuild/protobuf";
12
+
13
+ /**
14
+ * Describes the file pidgr/v1/api_key.proto.
15
+ */
16
+ export const file_pidgr_v1_api_key: GenFile = /*@__PURE__*/
17
+ fileDesc("ChZwaWRnci92MS9hcGlfa2V5LnByb3RvEghwaWRnci52MSLzAQoGQXBpS2V5EgoKAmlkGAEgASgJEgwKBG5hbWUYAiABKAkSEgoKa2V5X3ByZWZpeBgDIAEoCRIpCgtwZXJtaXNzaW9ucxgEIAMoDjIULnBpZGdyLnYxLlBlcm1pc3Npb24SLgoKY3JlYXRlZF9hdBgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASMAoMbGFzdF91c2VkX2F0GAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIuCgpleHBpcmVzX2F0GAcgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCJ+ChNDcmVhdGVBcGlLZXlSZXF1ZXN0EgwKBG5hbWUYASABKAkSKQoLcGVybWlzc2lvbnMYAiADKA4yFC5waWRnci52MS5QZXJtaXNzaW9uEi4KCmV4cGlyZXNfYXQYAyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wIkYKFENyZWF0ZUFwaUtleVJlc3BvbnNlEiEKB2FwaV9rZXkYASABKAsyEC5waWRnci52MS5BcGlLZXkSCwoDa2V5GAIgASgJIhQKEkxpc3RBcGlLZXlzUmVxdWVzdCI5ChNMaXN0QXBpS2V5c1Jlc3BvbnNlEiIKCGFwaV9rZXlzGAEgAygLMhAucGlkZ3IudjEuQXBpS2V5IikKE1Jldm9rZUFwaUtleVJlcXVlc3QSEgoKYXBpX2tleV9pZBgBIAEoCSIWChRSZXZva2VBcGlLZXlSZXNwb25zZTL5AQoNQXBpS2V5U2VydmljZRJNCgxDcmVhdGVBcGlLZXkSHS5waWRnci52MS5DcmVhdGVBcGlLZXlSZXF1ZXN0Gh4ucGlkZ3IudjEuQ3JlYXRlQXBpS2V5UmVzcG9uc2USSgoLTGlzdEFwaUtleXMSHC5waWRnci52MS5MaXN0QXBpS2V5c1JlcXVlc3QaHS5waWRnci52MS5MaXN0QXBpS2V5c1Jlc3BvbnNlEk0KDFJldm9rZUFwaUtleRIdLnBpZGdyLnYxLlJldm9rZUFwaUtleVJlcXVlc3QaHi5waWRnci52MS5SZXZva2VBcGlLZXlSZXNwb25zZUI2WjRnaXRodWIuY29tL3BpZGdyL3BpZGdyLXByb3RvL2dlbi9nby9waWRnci92MTtwaWRncnYxYgZwcm90bzM", [file_google_protobuf_timestamp, file_pidgr_v1_common]);
18
+
19
+ /**
20
+ * A scoped API key for programmatic access (MCP agents, service integrations).
21
+ *
22
+ * @generated from message pidgr.v1.ApiKey
23
+ */
24
+ export type ApiKey = Message<"pidgr.v1.ApiKey"> & {
25
+ /**
26
+ * Unique identifier.
27
+ *
28
+ * @generated from field: string id = 1;
29
+ */
30
+ id: string;
31
+
32
+ /**
33
+ * Human-friendly label (e.g. "MCP Production", "CI Pipeline").
34
+ *
35
+ * @generated from field: string name = 2;
36
+ */
37
+ name: string;
38
+
39
+ /**
40
+ * Displayable prefix of the key (e.g. "pidgr_k_abc12345").
41
+ * Used for identification — the full key is only returned on creation.
42
+ *
43
+ * @generated from field: string key_prefix = 3;
44
+ */
45
+ keyPrefix: string;
46
+
47
+ /**
48
+ * Permissions granted to this key.
49
+ *
50
+ * @generated from field: repeated pidgr.v1.Permission permissions = 4;
51
+ */
52
+ permissions: Permission[];
53
+
54
+ /**
55
+ * When the key was created.
56
+ *
57
+ * @generated from field: google.protobuf.Timestamp created_at = 5;
58
+ */
59
+ createdAt?: Timestamp;
60
+
61
+ /**
62
+ * Last time the key was used to authenticate a request. Empty if never used.
63
+ *
64
+ * @generated from field: google.protobuf.Timestamp last_used_at = 6;
65
+ */
66
+ lastUsedAt?: Timestamp;
67
+
68
+ /**
69
+ * When the key expires. Empty means no expiration.
70
+ *
71
+ * @generated from field: google.protobuf.Timestamp expires_at = 7;
72
+ */
73
+ expiresAt?: Timestamp;
74
+ };
75
+
76
+ /**
77
+ * Describes the message pidgr.v1.ApiKey.
78
+ * Use `create(ApiKeySchema)` to create a new message.
79
+ */
80
+ export const ApiKeySchema: GenMessage<ApiKey> = /*@__PURE__*/
81
+ messageDesc(file_pidgr_v1_api_key, 0);
82
+
83
+ /**
84
+ * Request to create a new API key.
85
+ *
86
+ * @generated from message pidgr.v1.CreateApiKeyRequest
87
+ */
88
+ export type CreateApiKeyRequest = Message<"pidgr.v1.CreateApiKeyRequest"> & {
89
+ /**
90
+ * Human-friendly label. Required, max 200 characters.
91
+ *
92
+ * @generated from field: string name = 1;
93
+ */
94
+ name: string;
95
+
96
+ /**
97
+ * Permissions to grant. Required, at least one.
98
+ * PERMISSION_UNSPECIFIED values are rejected.
99
+ *
100
+ * @generated from field: repeated pidgr.v1.Permission permissions = 2;
101
+ */
102
+ permissions: Permission[];
103
+
104
+ /**
105
+ * Optional expiration time. If omitted, the key does not expire.
106
+ *
107
+ * @generated from field: google.protobuf.Timestamp expires_at = 3;
108
+ */
109
+ expiresAt?: Timestamp;
110
+ };
111
+
112
+ /**
113
+ * Describes the message pidgr.v1.CreateApiKeyRequest.
114
+ * Use `create(CreateApiKeyRequestSchema)` to create a new message.
115
+ */
116
+ export const CreateApiKeyRequestSchema: GenMessage<CreateApiKeyRequest> = /*@__PURE__*/
117
+ messageDesc(file_pidgr_v1_api_key, 1);
118
+
119
+ /**
120
+ * Response after creating an API key.
121
+ * IMPORTANT: The full key is only returned here — it cannot be retrieved later.
122
+ *
123
+ * @generated from message pidgr.v1.CreateApiKeyResponse
124
+ */
125
+ export type CreateApiKeyResponse = Message<"pidgr.v1.CreateApiKeyResponse"> & {
126
+ /**
127
+ * The created API key metadata.
128
+ *
129
+ * @generated from field: pidgr.v1.ApiKey api_key = 1;
130
+ */
131
+ apiKey?: ApiKey;
132
+
133
+ /**
134
+ * The full secret key value (e.g. "pidgr_k_abc12345...").
135
+ * Store this securely — it is not retrievable after this response.
136
+ *
137
+ * @generated from field: string key = 2;
138
+ */
139
+ key: string;
140
+ };
141
+
142
+ /**
143
+ * Describes the message pidgr.v1.CreateApiKeyResponse.
144
+ * Use `create(CreateApiKeyResponseSchema)` to create a new message.
145
+ */
146
+ export const CreateApiKeyResponseSchema: GenMessage<CreateApiKeyResponse> = /*@__PURE__*/
147
+ messageDesc(file_pidgr_v1_api_key, 2);
148
+
149
+ /**
150
+ * Request to list all API keys in the caller's organization.
151
+ *
152
+ * @generated from message pidgr.v1.ListApiKeysRequest
153
+ */
154
+ export type ListApiKeysRequest = Message<"pidgr.v1.ListApiKeysRequest"> & {
155
+ };
156
+
157
+ /**
158
+ * Describes the message pidgr.v1.ListApiKeysRequest.
159
+ * Use `create(ListApiKeysRequestSchema)` to create a new message.
160
+ */
161
+ export const ListApiKeysRequestSchema: GenMessage<ListApiKeysRequest> = /*@__PURE__*/
162
+ messageDesc(file_pidgr_v1_api_key, 3);
163
+
164
+ /**
165
+ * Response containing the organization's API keys.
166
+ *
167
+ * @generated from message pidgr.v1.ListApiKeysResponse
168
+ */
169
+ export type ListApiKeysResponse = Message<"pidgr.v1.ListApiKeysResponse"> & {
170
+ /**
171
+ * All active (non-revoked) API keys. Full key values are not included.
172
+ *
173
+ * @generated from field: repeated pidgr.v1.ApiKey api_keys = 1;
174
+ */
175
+ apiKeys: ApiKey[];
176
+ };
177
+
178
+ /**
179
+ * Describes the message pidgr.v1.ListApiKeysResponse.
180
+ * Use `create(ListApiKeysResponseSchema)` to create a new message.
181
+ */
182
+ export const ListApiKeysResponseSchema: GenMessage<ListApiKeysResponse> = /*@__PURE__*/
183
+ messageDesc(file_pidgr_v1_api_key, 4);
184
+
185
+ /**
186
+ * Request to revoke an API key.
187
+ *
188
+ * @generated from message pidgr.v1.RevokeApiKeyRequest
189
+ */
190
+ export type RevokeApiKeyRequest = Message<"pidgr.v1.RevokeApiKeyRequest"> & {
191
+ /**
192
+ * ID of the API key to revoke. Required.
193
+ *
194
+ * @generated from field: string api_key_id = 1;
195
+ */
196
+ apiKeyId: string;
197
+ };
198
+
199
+ /**
200
+ * Describes the message pidgr.v1.RevokeApiKeyRequest.
201
+ * Use `create(RevokeApiKeyRequestSchema)` to create a new message.
202
+ */
203
+ export const RevokeApiKeyRequestSchema: GenMessage<RevokeApiKeyRequest> = /*@__PURE__*/
204
+ messageDesc(file_pidgr_v1_api_key, 5);
205
+
206
+ /**
207
+ * Response after revoking an API key.
208
+ *
209
+ * @generated from message pidgr.v1.RevokeApiKeyResponse
210
+ */
211
+ export type RevokeApiKeyResponse = Message<"pidgr.v1.RevokeApiKeyResponse"> & {
212
+ };
213
+
214
+ /**
215
+ * Describes the message pidgr.v1.RevokeApiKeyResponse.
216
+ * Use `create(RevokeApiKeyResponseSchema)` to create a new message.
217
+ */
218
+ export const RevokeApiKeyResponseSchema: GenMessage<RevokeApiKeyResponse> = /*@__PURE__*/
219
+ messageDesc(file_pidgr_v1_api_key, 6);
220
+
221
+ /**
222
+ * Manages scoped API keys for programmatic access.
223
+ * All RPCs operate within the caller's org (extracted from JWT).
224
+ *
225
+ * @generated from service pidgr.v1.ApiKeyService
226
+ */
227
+ export const ApiKeyService: GenService<{
228
+ /**
229
+ * Create a new scoped API key with specific permissions.
230
+ * The full secret key is only returned in the response — store it securely.
231
+ * Authorization: Requires PERMISSION_ORG_WRITE.
232
+ *
233
+ * @generated from rpc pidgr.v1.ApiKeyService.CreateApiKey
234
+ */
235
+ createApiKey: {
236
+ methodKind: "unary";
237
+ input: typeof CreateApiKeyRequestSchema;
238
+ output: typeof CreateApiKeyResponseSchema;
239
+ },
240
+ /**
241
+ * List all active API keys in the organization (metadata only, no secrets).
242
+ * Authorization: Requires PERMISSION_ORG_READ.
243
+ *
244
+ * @generated from rpc pidgr.v1.ApiKeyService.ListApiKeys
245
+ */
246
+ listApiKeys: {
247
+ methodKind: "unary";
248
+ input: typeof ListApiKeysRequestSchema;
249
+ output: typeof ListApiKeysResponseSchema;
250
+ },
251
+ /**
252
+ * Revoke an API key. The key becomes immediately unusable.
253
+ * Authorization: Requires PERMISSION_ORG_WRITE.
254
+ *
255
+ * @generated from rpc pidgr.v1.ApiKeyService.RevokeApiKey
256
+ */
257
+ revokeApiKey: {
258
+ methodKind: "unary";
259
+ input: typeof RevokeApiKeyRequestSchema;
260
+ output: typeof RevokeApiKeyResponseSchema;
261
+ },
262
+ }> = /*@__PURE__*/
263
+ serviceDesc(file_pidgr_v1_api_key, 0);
264
+