@eide/foir-proto-ts 0.21.0 → 0.22.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.
@@ -0,0 +1,722 @@
1
+ // @generated by protoc-gen-es v2.11.0 with parameter "import_extension=js"
2
+ // @generated from file apps/v1/apps.proto (package apps.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
6
+ import type { JsonObject, Message } from "@bufbuild/protobuf";
7
+
8
+ /**
9
+ * Describes the file apps/v1/apps.proto.
10
+ */
11
+ export declare const file_apps_v1_apps: GenFile;
12
+
13
+ /**
14
+ * Top-level manifest.
15
+ *
16
+ * @generated from message apps.v1.AppConfig
17
+ */
18
+ export declare type AppConfig = Message<"apps.v1.AppConfig"> & {
19
+ /**
20
+ * REQUIRED. Kebab-case globally unique within a project. Matches the key
21
+ * under apps.<name> in foir.config.ts.
22
+ *
23
+ * @generated from field: string name = 1;
24
+ */
25
+ name: string;
26
+
27
+ /**
28
+ * REQUIRED. Semver-like free-text version string. Used only for display
29
+ * and update-diff context; not interpreted by the platform for ordering.
30
+ *
31
+ * @generated from field: string version = 2;
32
+ */
33
+ version: string;
34
+
35
+ /**
36
+ * OPTIONAL. Display metadata for admin UI.
37
+ *
38
+ * @generated from field: apps.v1.Metadata metadata = 3;
39
+ */
40
+ metadata?: Metadata;
41
+
42
+ /**
43
+ * OPTIONAL. If present, the app has a runtime service. Absent for pure
44
+ * iframe-only apps.
45
+ *
46
+ * @generated from field: apps.v1.Middleware middleware = 4;
47
+ */
48
+ middleware?: Middleware;
49
+
50
+ /**
51
+ * OPTIONAL. Credential strategy and schema. Absent for apps that need no
52
+ * external-service credentials (CSV importer, color picker).
53
+ *
54
+ * @generated from field: apps.v1.Credentials credentials = 5;
55
+ */
56
+ credentials?: Credentials;
57
+
58
+ /**
59
+ * OPTIONAL. JSON Schema describing per-project settings. Shape, not values.
60
+ *
61
+ * @generated from field: google.protobuf.Struct settings_schema = 6;
62
+ */
63
+ settingsSchema?: JsonObject;
64
+
65
+ /**
66
+ * OPTIONAL. Inbound data shapes the app can deliver. Each source type is
67
+ * mapped onto a project model at install time.
68
+ *
69
+ * @generated from field: map<string, apps.v1.SourceType> sources = 7;
70
+ */
71
+ sources: { [key: string]: SourceType };
72
+
73
+ /**
74
+ * OPTIONAL. Outbound data requirements. Each sink is mapped onto a
75
+ * project model at install time.
76
+ *
77
+ * @generated from field: map<string, apps.v1.SinkContract> sinks = 8;
78
+ */
79
+ sinks: { [key: string]: SinkContract };
80
+
81
+ /**
82
+ * OPTIONAL. Operations contributed by the app. Keys starting with `__`
83
+ * are platform-reserved (__uninstall, __validate_credentials).
84
+ *
85
+ * @generated from field: repeated apps.v1.Operation operations = 9;
86
+ */
87
+ operations: Operation[];
88
+
89
+ /**
90
+ * OPTIONAL. Hooks contributed by the app. Filters use source-type or
91
+ * sink-contract names; platform resolves to mapped model keys at install.
92
+ *
93
+ * @generated from field: repeated apps.v1.Hook hooks = 10;
94
+ */
95
+ hooks: Hook[];
96
+
97
+ /**
98
+ * OPTIONAL. UI placements the app contributes.
99
+ *
100
+ * @generated from field: apps.v1.UI ui = 11;
101
+ */
102
+ ui?: UI;
103
+
104
+ /**
105
+ * OPTIONAL. Inbound webhook declaration. If present, the gateway routes
106
+ * webhooks for this app to `${middleware.url}${inbound.webhook.path}`.
107
+ *
108
+ * @generated from field: apps.v1.Inbound inbound = 12;
109
+ */
110
+ inbound?: Inbound;
111
+ };
112
+
113
+ /**
114
+ * Describes the message apps.v1.AppConfig.
115
+ * Use `create(AppConfigSchema)` to create a new message.
116
+ */
117
+ export declare const AppConfigSchema: GenMessage<AppConfig>;
118
+
119
+ /**
120
+ * @generated from message apps.v1.Metadata
121
+ */
122
+ export declare type Metadata = Message<"apps.v1.Metadata"> & {
123
+ /**
124
+ * e.g. "Shopify"
125
+ *
126
+ * @generated from field: string display_name = 1;
127
+ */
128
+ displayName: string;
129
+
130
+ /**
131
+ * @generated from field: string description = 2;
132
+ */
133
+ description: string;
134
+
135
+ /**
136
+ * icon key or URL
137
+ *
138
+ * @generated from field: string icon = 3;
139
+ */
140
+ icon: string;
141
+
142
+ /**
143
+ * @generated from field: string author = 4;
144
+ */
145
+ author: string;
146
+
147
+ /**
148
+ * public docs URL, optional
149
+ *
150
+ * @generated from field: string homepage = 5;
151
+ */
152
+ homepage: string;
153
+ };
154
+
155
+ /**
156
+ * Describes the message apps.v1.Metadata.
157
+ * Use `create(MetadataSchema)` to create a new message.
158
+ */
159
+ export declare const MetadataSchema: GenMessage<Metadata>;
160
+
161
+ /**
162
+ * @generated from message apps.v1.Middleware
163
+ */
164
+ export declare type Middleware = Message<"apps.v1.Middleware"> & {
165
+ /**
166
+ * REQUIRED within Middleware. https URL of the app's service.
167
+ *
168
+ * @generated from field: string url = 1;
169
+ */
170
+ url: string;
171
+ };
172
+
173
+ /**
174
+ * Describes the message apps.v1.Middleware.
175
+ * Use `create(MiddlewareSchema)` to create a new message.
176
+ */
177
+ export declare const MiddlewareSchema: GenMessage<Middleware>;
178
+
179
+ /**
180
+ * @generated from message apps.v1.Credentials
181
+ */
182
+ export declare type Credentials = Message<"apps.v1.Credentials"> & {
183
+ /**
184
+ * @generated from field: apps.v1.Credentials.Strategy strategy = 1;
185
+ */
186
+ strategy: Credentials_Strategy;
187
+
188
+ /**
189
+ * Shape of the admin form for strategies that take structured values.
190
+ * JSON Schema.
191
+ *
192
+ * @generated from field: optional google.protobuf.Struct schema = 2;
193
+ */
194
+ schema?: JsonObject;
195
+
196
+ /**
197
+ * Required only when strategy is OAUTH.
198
+ *
199
+ * @generated from field: optional apps.v1.OAuthConfig oauth = 3;
200
+ */
201
+ oauth?: OAuthConfig;
202
+ };
203
+
204
+ /**
205
+ * Describes the message apps.v1.Credentials.
206
+ * Use `create(CredentialsSchema)` to create a new message.
207
+ */
208
+ export declare const CredentialsSchema: GenMessage<Credentials>;
209
+
210
+ /**
211
+ * @generated from enum apps.v1.Credentials.Strategy
212
+ */
213
+ export enum Credentials_Strategy {
214
+ /**
215
+ * @generated from enum value: STRATEGY_UNSPECIFIED = 0;
216
+ */
217
+ UNSPECIFIED = 0,
218
+
219
+ /**
220
+ * @generated from enum value: STRATEGY_OAUTH = 1;
221
+ */
222
+ OAUTH = 1,
223
+
224
+ /**
225
+ * @generated from enum value: STRATEGY_API_KEY = 2;
226
+ */
227
+ API_KEY = 2,
228
+
229
+ /**
230
+ * @generated from enum value: STRATEGY_SHARED_SECRET = 3;
231
+ */
232
+ SHARED_SECRET = 3,
233
+
234
+ /**
235
+ * @generated from enum value: STRATEGY_SSH_KEY = 4;
236
+ */
237
+ SSH_KEY = 4,
238
+
239
+ /**
240
+ * @generated from enum value: STRATEGY_NONE = 5;
241
+ */
242
+ NONE = 5,
243
+
244
+ /**
245
+ * @generated from enum value: STRATEGY_MANAGED = 6;
246
+ */
247
+ MANAGED = 6,
248
+ }
249
+
250
+ /**
251
+ * Describes the enum apps.v1.Credentials.Strategy.
252
+ */
253
+ export declare const Credentials_StrategySchema: GenEnum<Credentials_Strategy>;
254
+
255
+ /**
256
+ * @generated from message apps.v1.OAuthConfig
257
+ */
258
+ export declare type OAuthConfig = Message<"apps.v1.OAuthConfig"> & {
259
+ /**
260
+ * e.g. "/authorize/start"
261
+ *
262
+ * @generated from field: string authorize_start_path = 1;
263
+ */
264
+ authorizeStartPath: string;
265
+
266
+ /**
267
+ * e.g. "/authorize/callback"
268
+ *
269
+ * @generated from field: string authorize_callback_path = 2;
270
+ */
271
+ authorizeCallbackPath: string;
272
+ };
273
+
274
+ /**
275
+ * Describes the message apps.v1.OAuthConfig.
276
+ * Use `create(OAuthConfigSchema)` to create a new message.
277
+ */
278
+ export declare const OAuthConfigSchema: GenMessage<OAuthConfig>;
279
+
280
+ /**
281
+ * @generated from message apps.v1.Inbound
282
+ */
283
+ export declare type Inbound = Message<"apps.v1.Inbound"> & {
284
+ /**
285
+ * @generated from field: apps.v1.Webhook webhook = 1;
286
+ */
287
+ webhook?: Webhook;
288
+ };
289
+
290
+ /**
291
+ * Describes the message apps.v1.Inbound.
292
+ * Use `create(InboundSchema)` to create a new message.
293
+ */
294
+ export declare const InboundSchema: GenMessage<Inbound>;
295
+
296
+ /**
297
+ * @generated from message apps.v1.Webhook
298
+ */
299
+ export declare type Webhook = Message<"apps.v1.Webhook"> & {
300
+ /**
301
+ * Path on middleware.url that receives webhook deliveries. The gateway
302
+ * proxies deliveries with an attached scoped token.
303
+ *
304
+ * @generated from field: string path = 1;
305
+ */
306
+ path: string;
307
+ };
308
+
309
+ /**
310
+ * Describes the message apps.v1.Webhook.
311
+ * Use `create(WebhookSchema)` to create a new message.
312
+ */
313
+ export declare const WebhookSchema: GenMessage<Webhook>;
314
+
315
+ /**
316
+ * A source type the app can deliver inbound. At install, admin maps this
317
+ * type onto a project model key and maps each suggested field onto a model
318
+ * field key.
319
+ *
320
+ * @generated from message apps.v1.SourceType
321
+ */
322
+ export declare type SourceType = Message<"apps.v1.SourceType"> & {
323
+ /**
324
+ * @generated from field: string label = 1;
325
+ */
326
+ label: string;
327
+
328
+ /**
329
+ * @generated from field: map<string, apps.v1.SuggestedField> fields = 2;
330
+ */
331
+ fields: { [key: string]: SuggestedField };
332
+
333
+ /**
334
+ * @generated from field: string natural_key = 3;
335
+ */
336
+ naturalKey: string;
337
+ };
338
+
339
+ /**
340
+ * Describes the message apps.v1.SourceType.
341
+ * Use `create(SourceTypeSchema)` to create a new message.
342
+ */
343
+ export declare const SourceTypeSchema: GenMessage<SourceType>;
344
+
345
+ /**
346
+ * A sink contract the app needs outbound. At install, admin maps this
347
+ * contract onto a project model and maps each field onto a model field.
348
+ *
349
+ * @generated from message apps.v1.SinkContract
350
+ */
351
+ export declare type SinkContract = Message<"apps.v1.SinkContract"> & {
352
+ /**
353
+ * @generated from field: string label = 1;
354
+ */
355
+ label: string;
356
+
357
+ /**
358
+ * Fields the app needs. Individual entries can be required: false.
359
+ *
360
+ * @generated from field: map<string, apps.v1.SinkField> fields = 2;
361
+ */
362
+ fields: { [key: string]: SinkField };
363
+
364
+ /**
365
+ * Which mapped field is the natural key for the external system's upsert.
366
+ *
367
+ * @generated from field: string natural_key = 3;
368
+ */
369
+ naturalKey: string;
370
+ };
371
+
372
+ /**
373
+ * Describes the message apps.v1.SinkContract.
374
+ * Use `create(SinkContractSchema)` to create a new message.
375
+ */
376
+ export declare const SinkContractSchema: GenMessage<SinkContract>;
377
+
378
+ /**
379
+ * @generated from message apps.v1.SuggestedField
380
+ */
381
+ export declare type SuggestedField = Message<"apps.v1.SuggestedField"> & {
382
+ /**
383
+ * resolves to platform FieldType enum
384
+ *
385
+ * @generated from field: string type = 1;
386
+ */
387
+ type: string;
388
+
389
+ /**
390
+ * @generated from field: optional string label = 2;
391
+ */
392
+ label?: string;
393
+
394
+ /**
395
+ * @generated from field: optional bool required = 3;
396
+ */
397
+ required?: boolean;
398
+
399
+ /**
400
+ * @generated from field: optional google.protobuf.Struct config = 4;
401
+ */
402
+ config?: JsonObject;
403
+ };
404
+
405
+ /**
406
+ * Describes the message apps.v1.SuggestedField.
407
+ * Use `create(SuggestedFieldSchema)` to create a new message.
408
+ */
409
+ export declare const SuggestedFieldSchema: GenMessage<SuggestedField>;
410
+
411
+ /**
412
+ * A field in a SinkContract. Renamed from the older RequiredField — individual
413
+ * entries can still be required: false; the message name now reflects the
414
+ * surrounding contract, not the required flag.
415
+ *
416
+ * @generated from message apps.v1.SinkField
417
+ */
418
+ export declare type SinkField = Message<"apps.v1.SinkField"> & {
419
+ /**
420
+ * Type hint only. Sink fields never carry field-type-specific configuration
421
+ * (select options, defaults, validation ranges). That belongs on the
422
+ * mapped project model field.
423
+ *
424
+ * @generated from field: string type = 1;
425
+ */
426
+ type: string;
427
+
428
+ /**
429
+ * e.g. "source-url", "target-url", "status-code"
430
+ *
431
+ * @generated from field: string semantic = 2;
432
+ */
433
+ semantic: string;
434
+
435
+ /**
436
+ * @generated from field: bool required = 3;
437
+ */
438
+ required: boolean;
439
+
440
+ /**
441
+ * @generated from field: optional string label = 4;
442
+ */
443
+ label?: string;
444
+ };
445
+
446
+ /**
447
+ * Describes the message apps.v1.SinkField.
448
+ * Use `create(SinkFieldSchema)` to create a new message.
449
+ */
450
+ export declare const SinkFieldSchema: GenMessage<SinkField>;
451
+
452
+ /**
453
+ * @generated from message apps.v1.Operation
454
+ */
455
+ export declare type Operation = Message<"apps.v1.Operation"> & {
456
+ /**
457
+ * REQUIRED. Kebab-case, unique within the manifest. Keys starting with
458
+ * `__` are platform-reserved (currently __uninstall, __validate_credentials).
459
+ * On install the platform prefixes the stored key as `<appName>/<key>`
460
+ * for namespace isolation across apps.
461
+ *
462
+ * @generated from field: string key = 1;
463
+ */
464
+ key: string;
465
+
466
+ /**
467
+ * @generated from field: string name = 2;
468
+ */
469
+ name: string;
470
+
471
+ /**
472
+ * @generated from field: optional string description = 3;
473
+ */
474
+ description?: string;
475
+
476
+ /**
477
+ * REQUIRED. Path on middleware.url that handles invocation.
478
+ *
479
+ * @generated from field: string endpoint = 4;
480
+ */
481
+ endpoint: string;
482
+
483
+ /**
484
+ * REQUIRED. Capability set the platform mints the scoped token with.
485
+ * Each string resolves to a known capability; bare records:read /
486
+ * records:write (no :<model> suffix) are rejected at install.
487
+ * Placeholders `$<sourceType>` / `$<sinkContract>` inside model-scoped
488
+ * capabilities are resolved to concrete model keys at ConfirmInstallApp.
489
+ *
490
+ * @generated from field: repeated string capabilities = 5;
491
+ */
492
+ capabilities: string[];
493
+
494
+ /**
495
+ * @generated from field: optional int32 timeout_ms = 6;
496
+ */
497
+ timeoutMs?: number;
498
+
499
+ /**
500
+ * @generated from field: optional google.protobuf.Struct retry_policy = 7;
501
+ */
502
+ retryPolicy?: JsonObject;
503
+
504
+ /**
505
+ * @generated from field: optional google.protobuf.Struct input_schema = 8;
506
+ */
507
+ inputSchema?: JsonObject;
508
+
509
+ /**
510
+ * @generated from field: optional google.protobuf.Struct output_schema = 9;
511
+ */
512
+ outputSchema?: JsonObject;
513
+
514
+ /**
515
+ * @generated from field: optional bool supports_async = 10;
516
+ */
517
+ supportsAsync?: boolean;
518
+ };
519
+
520
+ /**
521
+ * Describes the message apps.v1.Operation.
522
+ * Use `create(OperationSchema)` to create a new message.
523
+ */
524
+ export declare const OperationSchema: GenMessage<Operation>;
525
+
526
+ /**
527
+ * @generated from message apps.v1.Hook
528
+ */
529
+ export declare type Hook = Message<"apps.v1.Hook"> & {
530
+ /**
531
+ * @generated from field: string key = 1;
532
+ */
533
+ key: string;
534
+
535
+ /**
536
+ * @generated from field: string name = 2;
537
+ */
538
+ name: string;
539
+
540
+ /**
541
+ * REQUIRED. Record-event identifier: RECORD_CREATED, RECORD_UPDATED,
542
+ * RECORD_DELETED, RECORD_PUBLISHED, ...
543
+ *
544
+ * @generated from field: string event = 3;
545
+ */
546
+ event: string;
547
+
548
+ /**
549
+ * REQUIRED. Filter. `{ sourceType: "product" }`, `{ sinkContract: "redirect" }`,
550
+ * or `{ modelKey: "..." }`. Resolved to concrete modelKey at install.
551
+ *
552
+ * @generated from field: google.protobuf.Struct filter = 4;
553
+ */
554
+ filter?: JsonObject;
555
+
556
+ /**
557
+ * REQUIRED. Operation key from the same manifest's operations list.
558
+ * Resolved to the namespaced form (<appName>/<key>) at install.
559
+ *
560
+ * @generated from field: string operation = 5;
561
+ */
562
+ operation: string;
563
+ };
564
+
565
+ /**
566
+ * Describes the message apps.v1.Hook.
567
+ * Use `create(HookSchema)` to create a new message.
568
+ */
569
+ export declare const HookSchema: GenMessage<Hook>;
570
+
571
+ /**
572
+ * @generated from message apps.v1.UI
573
+ */
574
+ export declare type UI = Message<"apps.v1.UI"> & {
575
+ /**
576
+ * @generated from field: repeated apps.v1.PlacementDeclaration placements = 1;
577
+ */
578
+ placements: PlacementDeclaration[];
579
+ };
580
+
581
+ /**
582
+ * Describes the message apps.v1.UI.
583
+ * Use `create(UISchema)` to create a new message.
584
+ */
585
+ export declare const UISchema: GenMessage<UI>;
586
+
587
+ /**
588
+ * The manifest-time declaration of a placement. At install, ConfirmInstallApp
589
+ * translates each declaration into a placements.v1.CreatePlacementRequest
590
+ * against the first-class PlacementsService. The persisted row has
591
+ * additional platform-assigned fields (id, tenant_id, project_id, config_id,
592
+ * timestamps) that aren't in the manifest.
593
+ *
594
+ * @generated from message apps.v1.PlacementDeclaration
595
+ */
596
+ export declare type PlacementDeclaration = Message<"apps.v1.PlacementDeclaration"> & {
597
+ /**
598
+ * REQUIRED. Kebab-case. Unique within this manifest's ui.placements.
599
+ * Stable identifier used by admin UI for keying mapping choices
600
+ * (field_selected_at_install), by update-diff matching, and by the
601
+ * persisted placements row's UNIQUE (config_id, key).
602
+ *
603
+ * @generated from field: string key = 1;
604
+ */
605
+ key: string;
606
+
607
+ /**
608
+ * @generated from field: apps.v1.PlacementDeclaration.Target target = 2;
609
+ */
610
+ target: PlacementDeclaration_Target;
611
+
612
+ /**
613
+ * REQUIRED for MAIN_EDITOR, SIDEBAR, FIELD. Model key. Use "*" for
614
+ * placements that apply to every record. May reference a sourceType /
615
+ * sinkContract name from this manifest (resolved at install) OR a
616
+ * literal model key ("*" or a known project model).
617
+ *
618
+ * @generated from field: optional string model = 3;
619
+ */
620
+ model?: string;
621
+
622
+ /**
623
+ * REQUIRED for FIELD when field_selected_at_install is false. Must be
624
+ * empty when field_selected_at_install is true.
625
+ *
626
+ * @generated from field: optional string field = 4;
627
+ */
628
+ field?: string;
629
+
630
+ /**
631
+ * FIELD-only. When true, the admin chooses the specific field during
632
+ * the mapping step (keyed by placement.key).
633
+ *
634
+ * @generated from field: bool field_selected_at_install = 5;
635
+ */
636
+ fieldSelectedAtInstall: boolean;
637
+
638
+ /**
639
+ * REQUIRED for MAIN_EDITOR, SIDEBAR. Tab slug.
640
+ *
641
+ * @generated from field: optional string tab = 6;
642
+ */
643
+ tab?: string;
644
+
645
+ /**
646
+ * REQUIRED for all. Human-readable title.
647
+ *
648
+ * @generated from field: string title = 7;
649
+ */
650
+ title: string;
651
+
652
+ /**
653
+ * REQUIRED. https URL the iframe loads.
654
+ *
655
+ * @generated from field: string url = 8;
656
+ */
657
+ url: string;
658
+
659
+ /**
660
+ * MAIN_EDITOR only. If true, replaces the default record editor.
661
+ *
662
+ * @generated from field: optional bool replaces_default = 9;
663
+ */
664
+ replacesDefault?: boolean;
665
+
666
+ /**
667
+ * Free-form hints (icon, ordering, badge text).
668
+ *
669
+ * @generated from field: optional google.protobuf.Struct hints = 10;
670
+ */
671
+ hints?: JsonObject;
672
+ };
673
+
674
+ /**
675
+ * Describes the message apps.v1.PlacementDeclaration.
676
+ * Use `create(PlacementDeclarationSchema)` to create a new message.
677
+ */
678
+ export declare const PlacementDeclarationSchema: GenMessage<PlacementDeclaration>;
679
+
680
+ /**
681
+ * @generated from enum apps.v1.PlacementDeclaration.Target
682
+ */
683
+ export enum PlacementDeclaration_Target {
684
+ /**
685
+ * @generated from enum value: TARGET_UNSPECIFIED = 0;
686
+ */
687
+ UNSPECIFIED = 0,
688
+
689
+ /**
690
+ * top-level admin page
691
+ *
692
+ * @generated from enum value: TARGET_FULL_PAGE = 1;
693
+ */
694
+ FULL_PAGE = 1,
695
+
696
+ /**
697
+ * record's primary editor
698
+ *
699
+ * @generated from enum value: TARGET_MAIN_EDITOR = 2;
700
+ */
701
+ MAIN_EDITOR = 2,
702
+
703
+ /**
704
+ * panel attached to a record editor
705
+ *
706
+ * @generated from enum value: TARGET_SIDEBAR = 3;
707
+ */
708
+ SIDEBAR = 3,
709
+
710
+ /**
711
+ * inline iframe for a specific field
712
+ *
713
+ * @generated from enum value: TARGET_FIELD = 4;
714
+ */
715
+ FIELD = 4,
716
+ }
717
+
718
+ /**
719
+ * Describes the enum apps.v1.PlacementDeclaration.Target.
720
+ */
721
+ export declare const PlacementDeclaration_TargetSchema: GenEnum<PlacementDeclaration_Target>;
722
+