@foir/sdk 0.23.0 → 0.24.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/CHANGELOG.md +179 -154
- package/dist/app/contract/proto/apps/v1/apps_pb.d.ts +104 -99
- package/dist/app/contract/proto/apps/v1/discovery_pb.d.ts +10 -10
- package/dist/auth/auth.d.ts +19 -12
- package/dist/auth/hosted.d.ts +5 -0
- package/dist/auth/index.d.ts +2 -2
- package/dist/auth/operations.d.ts +11 -12
- package/dist/auth/ops.d.ts +0 -1
- package/dist/auth/session-client.d.ts +5 -0
- package/dist/auth-session.js +3 -2
- package/dist/auth.js +8 -9
- package/dist/components/EditorProvider.d.ts +1 -1
- package/dist/next.js +0 -1
- package/dist/push.js +0 -1
- package/dist/react.js +3 -3
- package/dist/server/events-client.d.ts +2 -2
- package/dist/server.js +2 -2
- package/package.json +3 -3
|
@@ -33,7 +33,7 @@ export declare type AppConfig = Message<"apps.v1.AppConfig"> & {
|
|
|
33
33
|
version: string;
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* OPTIONAL. Display metadata for
|
|
36
|
+
* OPTIONAL. Display metadata for the console.
|
|
37
37
|
*
|
|
38
38
|
* @generated from field: apps.v1.Metadata metadata = 3;
|
|
39
39
|
*/
|
|
@@ -110,16 +110,16 @@ export declare type AppConfig = Message<"apps.v1.AppConfig"> & {
|
|
|
110
110
|
inbound?: Inbound | undefined;
|
|
111
111
|
|
|
112
112
|
/**
|
|
113
|
-
* What the
|
|
114
|
-
* keeps. See Feature.
|
|
113
|
+
* What the person setting it up turns on and off as a whole, each with the
|
|
114
|
+
* storage it keeps. See Feature.
|
|
115
115
|
*
|
|
116
116
|
* @generated from field: repeated apps.v1.Feature features = 13;
|
|
117
117
|
*/
|
|
118
118
|
features: Feature[];
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
|
-
* OPTIONAL. The app's own system has
|
|
122
|
-
*
|
|
121
|
+
* OPTIONAL. The app's own system has users who sign in to it. See
|
|
122
|
+
* UserSignIn.
|
|
123
123
|
*
|
|
124
124
|
* @generated from field: apps.v1.UserSignIn user_sign_in = 14;
|
|
125
125
|
*/
|
|
@@ -133,29 +133,29 @@ export declare type AppConfig = Message<"apps.v1.AppConfig"> & {
|
|
|
133
133
|
export declare const AppConfigSchema: GenMessage<AppConfig>;
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
|
-
* The app's own system has
|
|
137
|
-
* their sign-in with that system:
|
|
138
|
-
* they are when they sign in to the project through the store's sign-in.
|
|
136
|
+
* The app's own system has users, and the app names each by the subject of
|
|
137
|
+
* their sign-in with that system: the id the store knows them by, which is also
|
|
138
|
+
* who they are when they sign in to the project through the store's sign-in.
|
|
139
139
|
*
|
|
140
|
-
* Declaring it lets an install pair ONE of the project's
|
|
141
|
-
* the app (ConfirmInstallAppRequest.
|
|
142
|
-
* sign-in the app's
|
|
143
|
-
* identity the app names through that sign-in and no other. The pairing is
|
|
144
|
-
*
|
|
145
|
-
* connects, not which of the project's sign-ins its
|
|
140
|
+
* Declaring it lets an install pair ONE of the project's sign-ins with
|
|
141
|
+
* the app (ConfirmInstallAppRequest.user_sign_in): the person installing says
|
|
142
|
+
* which sign-in the app's users come through, and the platform resolves every
|
|
143
|
+
* identity the app names through that sign-in and no other. The pairing is that
|
|
144
|
+
* person's choice, never inferred: the install knows the external account it
|
|
145
|
+
* connects, not which of the project's sign-ins its users use, and a wrong
|
|
146
146
|
* pairing would attach one person's data to another.
|
|
147
147
|
*
|
|
148
148
|
* The pairing is optional. What needs it says so, and cannot be on without it:
|
|
149
|
-
* a source that names its
|
|
150
|
-
* feature that finds
|
|
151
|
-
* operation that asks who holds an identity (
|
|
149
|
+
* a source that names its users by identity (SourceType.identity), a
|
|
150
|
+
* feature that finds users through it (Feature.user_sign_in), and an
|
|
151
|
+
* operation that asks who holds an identity (identities:read).
|
|
152
152
|
*
|
|
153
153
|
* @generated from message apps.v1.UserSignIn
|
|
154
154
|
*/
|
|
155
155
|
export declare type UserSignIn = Message<"apps.v1.UserSignIn"> & {
|
|
156
156
|
/**
|
|
157
|
-
* What the setup tells the
|
|
158
|
-
*
|
|
157
|
+
* What the setup tells the person installing they are choosing, in a
|
|
158
|
+
* sentence: which users these are and what identifies them.
|
|
159
159
|
*
|
|
160
160
|
* @generated from field: string description = 1;
|
|
161
161
|
*/
|
|
@@ -169,15 +169,15 @@ export declare type UserSignIn = Message<"apps.v1.UserSignIn"> & {
|
|
|
169
169
|
export declare const UserSignInSchema: GenMessage<UserSignIn>;
|
|
170
170
|
|
|
171
171
|
/**
|
|
172
|
-
* A feature of the app: something the
|
|
173
|
-
* setup, such as a store's preorders or its back-in-stock alerts.
|
|
172
|
+
* A feature of the app: something the person installing turns on or off as a
|
|
173
|
+
* whole at setup, such as a store's preorders or its back-in-stock alerts.
|
|
174
174
|
*
|
|
175
175
|
* A feature KEEPS its storage. The sources it names are the storage it writes,
|
|
176
176
|
* and they exist only while it is on: turning it on is what creates them, which
|
|
177
|
-
* the
|
|
178
|
-
* model is made and the operations that need them are not
|
|
179
|
-
* them is optional, since switching the feature off drops
|
|
180
|
-
* no other feature.
|
|
177
|
+
* the person installing approves at setup, and while it is off they are
|
|
178
|
+
* declined, so no model is made and the operations that need them are not
|
|
179
|
+
* registered. Each of them is optional, since switching the feature off drops
|
|
180
|
+
* it, and belongs to no other feature.
|
|
181
181
|
*
|
|
182
182
|
* A feature may also name a setting, when the app itself has to know whether
|
|
183
183
|
* it is on: for example because it changes the access the app asks its vendor
|
|
@@ -225,8 +225,8 @@ export declare type Feature = Message<"apps.v1.Feature"> & {
|
|
|
225
225
|
sources: string[];
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
|
-
* The feature finds
|
|
229
|
-
* (AppConfig.
|
|
228
|
+
* The feature finds users through the install's paired sign-in
|
|
229
|
+
* (AppConfig.user_sign_in), which the manifest must declare. It cannot
|
|
230
230
|
* be on at an install that pairs none: the setup asks for the sign-in at the
|
|
231
231
|
* switch, and the platform refuses the switch without one.
|
|
232
232
|
*
|
|
@@ -244,7 +244,7 @@ export declare type Feature = Message<"apps.v1.Feature"> & {
|
|
|
244
244
|
|
|
245
245
|
/**
|
|
246
246
|
* The notification category the feature keeps consent in, when it reads or
|
|
247
|
-
* writes what a
|
|
247
|
+
* writes what a user chose. See FeatureConsentCategory.
|
|
248
248
|
*
|
|
249
249
|
* @generated from field: apps.v1.FeatureConsentCategory consent_category = 8;
|
|
250
250
|
*/
|
|
@@ -261,12 +261,12 @@ export declare const FeatureSchema: GenMessage<Feature>;
|
|
|
261
261
|
* The notification category a feature sends under.
|
|
262
262
|
*
|
|
263
263
|
* A project that declares notification categories takes every notification
|
|
264
|
-
* under one of them, so that what a
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
264
|
+
* under one of them, so that what a user chose about a category is honoured. An
|
|
265
|
+
* app that sends has to be given one the project has, and nobody should have to
|
|
266
|
+
* type its key to do that. So the feature says which of the app's settings
|
|
267
|
+
* holds the key, and proposes the category it would send under. The setup
|
|
268
|
+
* offers the project's own categories and the proposed one, makes the proposed
|
|
269
|
+
* one where the person installing chooses it, and writes the chosen key to the
|
|
270
270
|
* setting. The app reads the setting and names that key on every send.
|
|
271
271
|
*
|
|
272
272
|
* The platform holds the setting to that: while the feature is on at a running
|
|
@@ -294,22 +294,23 @@ export declare type FeatureNotificationCategory = Message<"apps.v1.FeatureNotifi
|
|
|
294
294
|
key: string;
|
|
295
295
|
|
|
296
296
|
/**
|
|
297
|
-
* REQUIRED. What the category is called
|
|
297
|
+
* REQUIRED. What the category is called, in the console and to the project's
|
|
298
|
+
* users.
|
|
298
299
|
*
|
|
299
300
|
* @generated from field: string name = 3;
|
|
300
301
|
*/
|
|
301
302
|
name: string;
|
|
302
303
|
|
|
303
304
|
/**
|
|
304
|
-
* What a
|
|
305
|
+
* What a user is choosing about, in a sentence.
|
|
305
306
|
*
|
|
306
307
|
* @generated from field: string description = 4;
|
|
307
308
|
*/
|
|
308
309
|
description: string;
|
|
309
310
|
|
|
310
311
|
/**
|
|
311
|
-
* A
|
|
312
|
-
* proposed category. Left unset it is sent until a
|
|
312
|
+
* A user has to opt in before anything is sent to them under the
|
|
313
|
+
* proposed category. Left unset it is sent until a user opts out.
|
|
313
314
|
*
|
|
314
315
|
* @generated from field: bool opt_in = 5;
|
|
315
316
|
*/
|
|
@@ -325,23 +326,23 @@ export declare const FeatureNotificationCategorySchema: GenMessage<FeatureNotifi
|
|
|
325
326
|
/**
|
|
326
327
|
* The notification category a feature keeps consent in.
|
|
327
328
|
*
|
|
328
|
-
* A feature that carries what a
|
|
329
|
+
* A feature that carries what a user chose about a category to or from
|
|
329
330
|
* another system sends nothing itself. It reads and writes consent on one
|
|
330
|
-
* channel, and consent is what a category records where a
|
|
331
|
+
* channel, and consent is what a category records where a user opts in on
|
|
331
332
|
* that channel: nothing is sent there until they say yes. So the feature has
|
|
332
|
-
* to be given a category the project has and a
|
|
333
|
+
* to be given a category the project has and a user opts in to on its
|
|
333
334
|
* channel, and nobody should have to type its key to do that. The feature says
|
|
334
335
|
* which of the app's settings holds the key and which channel's consent it
|
|
335
336
|
* keeps, and proposes the category it would keep it in. The setup offers the
|
|
336
|
-
* project's own categories a
|
|
337
|
-
* proposed one, makes the proposed one where the
|
|
337
|
+
* project's own categories a user opts in to on that channel and the
|
|
338
|
+
* proposed one, makes the proposed one where the person installing chooses it, and
|
|
338
339
|
* writes the chosen key to the setting. The app reads the setting.
|
|
339
340
|
*
|
|
340
341
|
* The platform holds the setting to that: while the feature is on at a running
|
|
341
|
-
* install it names a category the install's level is served and a
|
|
342
|
+
* install it names a category the install's level is served and a user
|
|
342
343
|
* opts in to on the channel, or, at a level served no category, the proposed
|
|
343
344
|
* key, which is made a category of that level together with its first, one a
|
|
344
|
-
*
|
|
345
|
+
* user opts in to on every channel.
|
|
345
346
|
*
|
|
346
347
|
* @generated from message apps.v1.FeatureConsentCategory
|
|
347
348
|
*/
|
|
@@ -356,7 +357,7 @@ export declare type FeatureConsentCategory = Message<"apps.v1.FeatureConsentCate
|
|
|
356
357
|
/**
|
|
357
358
|
* REQUIRED. The key of the category the app proposes: what the category is
|
|
358
359
|
* called in the project's API. Letters, digits and underscores, starting
|
|
359
|
-
* with a letter. The proposed category is always one a
|
|
360
|
+
* with a letter. The proposed category is always one a user opts in to,
|
|
360
361
|
* on every channel.
|
|
361
362
|
*
|
|
362
363
|
* @generated from field: string key = 2;
|
|
@@ -364,14 +365,15 @@ export declare type FeatureConsentCategory = Message<"apps.v1.FeatureConsentCate
|
|
|
364
365
|
key: string;
|
|
365
366
|
|
|
366
367
|
/**
|
|
367
|
-
* REQUIRED. What the category is called
|
|
368
|
+
* REQUIRED. What the category is called, in the console and to the project's
|
|
369
|
+
* users.
|
|
368
370
|
*
|
|
369
371
|
* @generated from field: string name = 3;
|
|
370
372
|
*/
|
|
371
373
|
name: string;
|
|
372
374
|
|
|
373
375
|
/**
|
|
374
|
-
* What a
|
|
376
|
+
* What a user is agreeing to, in a sentence.
|
|
375
377
|
*
|
|
376
378
|
* @generated from field: string description = 4;
|
|
377
379
|
*/
|
|
@@ -462,7 +464,7 @@ export declare type Credentials = Message<"apps.v1.Credentials"> & {
|
|
|
462
464
|
strategy: Credentials_Strategy;
|
|
463
465
|
|
|
464
466
|
/**
|
|
465
|
-
* Shape of the
|
|
467
|
+
* Shape of the console's form for strategies that take structured values.
|
|
466
468
|
* JSON Schema.
|
|
467
469
|
*
|
|
468
470
|
* @generated from field: optional google.protobuf.Struct schema = 2;
|
|
@@ -477,11 +479,12 @@ export declare type Credentials = Message<"apps.v1.Credentials"> & {
|
|
|
477
479
|
oauth?: OAuthConfig | undefined;
|
|
478
480
|
|
|
479
481
|
/**
|
|
480
|
-
* What the
|
|
481
|
-
* own words: anything connecting changes that they would not
|
|
482
|
-
* know. The setup shows it beside the step that connects, and an
|
|
483
|
-
* vendor started shows it before the install is confirmed,
|
|
484
|
-
* install goes on to connect by itself. Empty when there is
|
|
482
|
+
* What the person installing is told before they connect their account, in
|
|
483
|
+
* the app's own words: anything connecting changes that they would not
|
|
484
|
+
* otherwise know. The setup shows it beside the step that connects, and an
|
|
485
|
+
* install the vendor started shows it before the install is confirmed,
|
|
486
|
+
* because that install goes on to connect by itself. Empty when there is
|
|
487
|
+
* nothing to say.
|
|
485
488
|
*
|
|
486
489
|
* @generated from field: string connect_notice = 4;
|
|
487
490
|
*/
|
|
@@ -643,7 +646,7 @@ export declare type AccountWebhook = Message<"apps.v1.AccountWebhook"> & {
|
|
|
643
646
|
/**
|
|
644
647
|
* Which setting holds the account identifier, as a key of the app's own
|
|
645
648
|
* settings. For a store integration that is the store's domain, supplied by
|
|
646
|
-
* the
|
|
649
|
+
* the person installing it.
|
|
647
650
|
*
|
|
648
651
|
* ONE WORD. This key is read from stored manifest JSON by SQL, and protojson
|
|
649
652
|
* accepts both snake_case and camelCase on input, so a two-word name would
|
|
@@ -671,9 +674,9 @@ export declare type AccountWebhook = Message<"apps.v1.AccountWebhook"> & {
|
|
|
671
674
|
export declare const AccountWebhookSchema: GenMessage<AccountWebhook>;
|
|
672
675
|
|
|
673
676
|
/**
|
|
674
|
-
* A source type the app can deliver inbound. At install,
|
|
675
|
-
* type onto a project model key and maps each suggested field onto a
|
|
676
|
-
* field key.
|
|
677
|
+
* A source type the app can deliver inbound. At install, the person installing
|
|
678
|
+
* maps this type onto a project model key and maps each suggested field onto a
|
|
679
|
+
* model field key.
|
|
677
680
|
*
|
|
678
681
|
* @generated from message apps.v1.SourceType
|
|
679
682
|
*/
|
|
@@ -699,10 +702,10 @@ export declare type SourceType = Message<"apps.v1.SourceType"> & {
|
|
|
699
702
|
* $placeholders reference it are DROPPED rather than failing to resolve.
|
|
700
703
|
* Default false, so every existing manifest keeps today's behaviour.
|
|
701
704
|
*
|
|
702
|
-
* This is what makes "sync
|
|
703
|
-
* app either forces the
|
|
704
|
-
* operation carries records:write:<model> regardless — or cannot
|
|
705
|
-
* source at all.
|
|
705
|
+
* This is what makes "sync this source, or don't" expressible. Without it an
|
|
706
|
+
* app either forces the person installing to map a model they do not want —
|
|
707
|
+
* and the operation carries records:write:<model> regardless — or cannot
|
|
708
|
+
* offer the source at all.
|
|
706
709
|
*
|
|
707
710
|
* @generated from field: bool optional = 4;
|
|
708
711
|
*/
|
|
@@ -713,14 +716,14 @@ export declare type SourceType = Message<"apps.v1.SourceType"> & {
|
|
|
713
716
|
* against it, but expects NO inbound sync: the app owns the write path and
|
|
714
717
|
* there is no external system on the other end.
|
|
715
718
|
*
|
|
716
|
-
* Still mapped — the
|
|
719
|
+
* Still mapped — the person installing chooses which model it targets, because
|
|
717
720
|
* capability resolution needs that answer. What it is not is SYNCED, which
|
|
718
721
|
* is the whole distinction from `optional` above; the two compose freely.
|
|
719
722
|
*
|
|
720
723
|
* AppInstallPreview must present it as storage the app needs rather than as
|
|
721
724
|
* something the external system will send. Presenting it as a sync mapping
|
|
722
725
|
* is not a cosmetic slip: it is a false statement in the one screen whose
|
|
723
|
-
* job is to tell the
|
|
726
|
+
* job is to tell the person installing what the app will do.
|
|
724
727
|
*
|
|
725
728
|
* @generated from field: bool provision_only = 5;
|
|
726
729
|
*/
|
|
@@ -741,15 +744,15 @@ export declare type SourceType = Message<"apps.v1.SourceType"> & {
|
|
|
741
744
|
* Who each row of this source's model belongs to. Unset says nothing, and
|
|
742
745
|
* the source maps onto a model owned at any level, as before.
|
|
743
746
|
*
|
|
744
|
-
* Set, it is a requirement the install holds the
|
|
745
|
-
* only be mapped onto a model owned at this level, and the guided
|
|
746
|
-
* creates the model that way. It exists for storage whose meaning
|
|
747
|
-
* who can read it. A wishlist the app writes for each
|
|
748
|
-
* that
|
|
747
|
+
* Set, it is a requirement the install holds the person installing to: the
|
|
748
|
+
* source may only be mapped onto a model owned at this level, and the guided
|
|
749
|
+
* setup creates the model that way. It exists for storage whose meaning
|
|
750
|
+
* depends on who can read it. A wishlist the app writes for each user is
|
|
751
|
+
* private to that user only if its model is user-owned; mapped onto a
|
|
749
752
|
* project-owned model, every row is readable by the project's public key.
|
|
750
753
|
*
|
|
751
|
-
*
|
|
752
|
-
* external system sends, and only `identity` gives each row a
|
|
754
|
+
* USER requires provision_only or `identity`: a sync writes what the
|
|
755
|
+
* external system sends, and only `identity` gives each row a user to
|
|
753
756
|
* own it.
|
|
754
757
|
*
|
|
755
758
|
* @generated from field: apps.v1.StorageOwner owner = 7;
|
|
@@ -757,8 +760,8 @@ export declare type SourceType = Message<"apps.v1.SourceType"> & {
|
|
|
757
760
|
owner: StorageOwner;
|
|
758
761
|
|
|
759
762
|
/**
|
|
760
|
-
* The app's word that this storage starts on in the guided setup. The
|
|
761
|
-
*
|
|
763
|
+
* The app's word that this storage starts on in the guided setup. The person
|
|
764
|
+
* installing can still decline it, and declining still drops what references
|
|
762
765
|
* it: this is a default, not a requirement.
|
|
763
766
|
*
|
|
764
767
|
* Only for a source that is both `optional` and `provision_only`, and a
|
|
@@ -794,17 +797,17 @@ export declare type SourceType = Message<"apps.v1.SourceType"> & {
|
|
|
794
797
|
lookup: string[];
|
|
795
798
|
|
|
796
799
|
/**
|
|
797
|
-
* The field that names the
|
|
798
|
-
* system identifies them:
|
|
800
|
+
* The field that names the user each row belongs to, as the external
|
|
801
|
+
* system identifies them: their id there, which is also the subject
|
|
799
802
|
* of their sign-in with it. One of this source's `fields`, a required scalar,
|
|
800
|
-
* and only on a
|
|
801
|
-
*
|
|
802
|
-
* It is what lets a sync write
|
|
803
|
-
* value to a Foir
|
|
804
|
-
* with the app (AppConfig.
|
|
805
|
-
* declare), at the install's level: the
|
|
806
|
-
* identity, or one made for it. Each
|
|
807
|
-
* their profile, so the source has no natural key; the
|
|
803
|
+
* and only on a user-owned source (`owner` USER).
|
|
804
|
+
*
|
|
805
|
+
* It is what lets a sync write user-owned rows. The platform resolves the
|
|
806
|
+
* value to a Foir user through the sign-in the install pairs
|
|
807
|
+
* with the app (AppConfig.user_sign_in, which the manifest must then
|
|
808
|
+
* declare), at the install's level: the user who signs in with that
|
|
809
|
+
* identity, or one made for it. Each user holds one row of the source,
|
|
810
|
+
* their profile, so the source has no natural key; the user is the key.
|
|
808
811
|
* Never matched by email.
|
|
809
812
|
*
|
|
810
813
|
* @generated from field: string identity = 10;
|
|
@@ -833,7 +836,7 @@ export declare const SourceTypeSchema: GenMessage<SourceType>;
|
|
|
833
836
|
* for where it stands, as an operation's request template is.
|
|
834
837
|
*
|
|
835
838
|
* A live field is not filterable or sortable: nothing about it is stored. An
|
|
836
|
-
*
|
|
839
|
+
* project that needs to filter on host fields inside Foir keeps a copy.
|
|
837
840
|
*
|
|
838
841
|
* @generated from message apps.v1.SourceReference
|
|
839
842
|
*/
|
|
@@ -950,8 +953,9 @@ export declare type ReferenceRequest = Message<"apps.v1.ReferenceRequest"> & {
|
|
|
950
953
|
export declare const ReferenceRequestSchema: GenMessage<ReferenceRequest>;
|
|
951
954
|
|
|
952
955
|
/**
|
|
953
|
-
* A sink contract the app needs outbound. At install,
|
|
954
|
-
* contract onto a project model and maps each field onto a model
|
|
956
|
+
* A sink contract the app needs outbound. At install, the person installing
|
|
957
|
+
* maps this contract onto a project model and maps each field onto a model
|
|
958
|
+
* field.
|
|
955
959
|
*
|
|
956
960
|
* @generated from message apps.v1.SinkContract
|
|
957
961
|
*/
|
|
@@ -1021,7 +1025,7 @@ export declare type SuggestedField = Message<"apps.v1.SuggestedField"> & {
|
|
|
1021
1025
|
* SOURCE_ONLY.
|
|
1022
1026
|
*
|
|
1023
1027
|
* READ IT AS A SET OF LEGS, NOT AS A RANK: SOURCE_ONLY is {inbound},
|
|
1024
|
-
* SINK_ONLY is {outbound}, BIDIRECTIONAL is both. The
|
|
1028
|
+
* SINK_ONLY is {outbound}, BIDIRECTIONAL is both. The install's choice must
|
|
1025
1029
|
* be a SUBSET of what is declared here, so a SINK_ONLY declaration permits
|
|
1026
1030
|
* only SINK_ONLY — it does not permit SOURCE_ONLY as some lesser option.
|
|
1027
1031
|
*
|
|
@@ -1033,7 +1037,7 @@ export declare type SuggestedField = Message<"apps.v1.SuggestedField"> & {
|
|
|
1033
1037
|
* Declared by the app author because they are the only party who knows.
|
|
1034
1038
|
* Stripe's Price.unit_amount is the canonical case: it is immutable, so
|
|
1035
1039
|
* writing an edit back is not a slow path, it is a thing that cannot happen.
|
|
1036
|
-
*
|
|
1040
|
+
* Choosing BIDIRECTIONAL for such a field has to be refused at
|
|
1037
1041
|
* configuration time rather than discovering it when the first edit fails
|
|
1038
1042
|
* somewhere they are not looking.
|
|
1039
1043
|
*
|
|
@@ -1050,7 +1054,7 @@ export declare type SuggestedField = Message<"apps.v1.SuggestedField"> & {
|
|
|
1050
1054
|
* what lets it ask the platform for the count rather than read every row.
|
|
1051
1055
|
*
|
|
1052
1056
|
* It says what the app needs of a model the setup creates, and nothing
|
|
1053
|
-
* stricter: filtering needs no index, and
|
|
1057
|
+
* stricter: filtering needs no index, and a person mapping onto a model
|
|
1054
1058
|
* of their own may index it or not. An app asking to count by a field that
|
|
1055
1059
|
* is not indexed is refused by the aggregate, naming the field.
|
|
1056
1060
|
*
|
|
@@ -1202,7 +1206,8 @@ export declare type Operation = Message<"apps.v1.Operation"> & {
|
|
|
1202
1206
|
* own token is not a connection. Multiple operations with
|
|
1203
1207
|
* run_after_install=true are dispatched in manifest declaration order. A
|
|
1204
1208
|
* failure here emits the app_event `post_install_op_failed` but does NOT roll
|
|
1205
|
-
* back what triggered it;
|
|
1209
|
+
* back what triggered it; a person retries it from the console's op-dispatch
|
|
1210
|
+
* view.
|
|
1206
1211
|
*
|
|
1207
1212
|
* @generated from field: bool run_after_install = 11;
|
|
1208
1213
|
*/
|
|
@@ -1210,9 +1215,9 @@ export declare type Operation = Message<"apps.v1.Operation"> & {
|
|
|
1210
1215
|
|
|
1211
1216
|
/**
|
|
1212
1217
|
* When true, the operation works on whichever of its sources and sinks the
|
|
1213
|
-
* install maps. A grant naming one left unmapped (an optional source
|
|
1214
|
-
*
|
|
1215
|
-
* is left out of the resolved set, and the operation is kept.
|
|
1218
|
+
* install maps. A grant naming one left unmapped (an optional source the
|
|
1219
|
+
* person installing declined, or a source of a held install still being set
|
|
1220
|
+
* up) is left out of the resolved set, and the operation is kept.
|
|
1216
1221
|
*
|
|
1217
1222
|
* When false, the default, such an operation is dropped instead: it is not
|
|
1218
1223
|
* created, and nothing dispatches it. That is the safe answer for an
|
|
@@ -1306,7 +1311,7 @@ export declare const UISchema: GenMessage<UI>;
|
|
|
1306
1311
|
export declare type PlacementDeclaration = Message<"apps.v1.PlacementDeclaration"> & {
|
|
1307
1312
|
/**
|
|
1308
1313
|
* REQUIRED. Kebab-case. Unique within this manifest's ui.placements.
|
|
1309
|
-
* Stable identifier
|
|
1314
|
+
* Stable identifier the console uses for keying mapping choices
|
|
1310
1315
|
* (field_selected_at_install), by update-diff matching, and by the
|
|
1311
1316
|
* persisted placements row's UNIQUE (config_id, key).
|
|
1312
1317
|
*
|
|
@@ -1338,7 +1343,7 @@ export declare type PlacementDeclaration = Message<"apps.v1.PlacementDeclaration
|
|
|
1338
1343
|
field?: string | undefined;
|
|
1339
1344
|
|
|
1340
1345
|
/**
|
|
1341
|
-
* FIELD-only. When true, the
|
|
1346
|
+
* FIELD-only. When true, the person installing chooses the specific field during
|
|
1342
1347
|
* the mapping step (keyed by placement.key).
|
|
1343
1348
|
*
|
|
1344
1349
|
* @generated from field: bool field_selected_at_install = 5;
|
|
@@ -1396,7 +1401,7 @@ export declare type PlacementDeclaration = Message<"apps.v1.PlacementDeclaration
|
|
|
1396
1401
|
* given, so a feature's switch (Feature.setting), the setting that names the
|
|
1397
1402
|
* external account, credentials and mappings are never among them. Changing
|
|
1398
1403
|
* or reading one needs apps:write, which the placement declares in grants
|
|
1399
|
-
* and the
|
|
1404
|
+
* and the user holds at the install's level, as in the setup.
|
|
1400
1405
|
*
|
|
1401
1406
|
* @generated from field: repeated string settings = 12;
|
|
1402
1407
|
*/
|
|
@@ -1408,8 +1413,8 @@ export declare type PlacementDeclaration = Message<"apps.v1.PlacementDeclaration
|
|
|
1408
1413
|
* the project. Each is one a console user can hold, and none is a wildcard:
|
|
1409
1414
|
* installing the app is agreeing to the list, and a wildcard would grow
|
|
1410
1415
|
* after that. The console hands the page a short-lived token that acts as
|
|
1411
|
-
* the
|
|
1412
|
-
* of these grants with what that
|
|
1416
|
+
* the user looking at it, at the install's level, carrying the overlap
|
|
1417
|
+
* of these grants with what that user holds and never more. A user
|
|
1413
1418
|
* standing beneath the install is given the reads only. Refused on every
|
|
1414
1419
|
* other target: a record-bound placement is handed its record, not a
|
|
1415
1420
|
* credential.
|
|
@@ -1435,7 +1440,7 @@ export enum PlacementDeclaration_Target {
|
|
|
1435
1440
|
UNSPECIFIED = 0,
|
|
1436
1441
|
|
|
1437
1442
|
/**
|
|
1438
|
-
* top-level
|
|
1443
|
+
* top-level console page
|
|
1439
1444
|
*
|
|
1440
1445
|
* @generated from enum value: TARGET_FULL_PAGE = 1;
|
|
1441
1446
|
*/
|
|
@@ -28,7 +28,7 @@ export declare type DiscoveryRequest = Message<"apps.v1.DiscoveryRequest"> & {
|
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* The install's current settings, when it has any. A discovery run again
|
|
31
|
-
* keeps what the
|
|
31
|
+
* keeps what the user already confirmed as its suggestion, rather than
|
|
32
32
|
* proposing something new each time.
|
|
33
33
|
*
|
|
34
34
|
* @generated from field: google.protobuf.Struct current_settings = 2;
|
|
@@ -61,7 +61,7 @@ export declare type DiscoveryResult = Message<"apps.v1.DiscoveryResult"> & {
|
|
|
61
61
|
complete: boolean;
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
|
-
* The account the app is connected to, as the
|
|
64
|
+
* The account the app is connected to, as the user knows it.
|
|
65
65
|
*
|
|
66
66
|
* @generated from field: apps.v1.DiscoveredAccount account = 3;
|
|
67
67
|
*/
|
|
@@ -84,7 +84,7 @@ export declare type DiscoveryResult = Message<"apps.v1.DiscoveryResult"> & {
|
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
86
|
* Values for the app's own settings (its manifest's settings_schema),
|
|
87
|
-
* suggested from what was found. The
|
|
87
|
+
* suggested from what was found. The user confirms each; nothing here is
|
|
88
88
|
* applied on its own.
|
|
89
89
|
*
|
|
90
90
|
* @generated from field: google.protobuf.Struct suggested_settings = 6;
|
|
@@ -92,7 +92,7 @@ export declare type DiscoveryResult = Message<"apps.v1.DiscoveryResult"> & {
|
|
|
92
92
|
suggestedSettings?: JsonObject | undefined;
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
|
-
* What the
|
|
95
|
+
* What the user should know, most severe first.
|
|
96
96
|
*
|
|
97
97
|
* @generated from field: repeated apps.v1.DiscoveryNotice notices = 7;
|
|
98
98
|
*/
|
|
@@ -125,7 +125,7 @@ export declare type DiscoveredAccount = Message<"apps.v1.DiscoveredAccount"> & {
|
|
|
125
125
|
name: string;
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
|
-
* Where the account lives, for the
|
|
128
|
+
* Where the account lives, for the user to recognise it: a store's
|
|
129
129
|
* domain, a workspace's address.
|
|
130
130
|
*
|
|
131
131
|
* @generated from field: string url = 2;
|
|
@@ -157,14 +157,14 @@ export declare type DiscoveredSource = Message<"apps.v1.DiscoveredSource"> & {
|
|
|
157
157
|
|
|
158
158
|
/**
|
|
159
159
|
* The fields a record can be keyed by, the app's recommendation first. The
|
|
160
|
-
* setup offers the first unless the
|
|
160
|
+
* setup offers the first unless the user chooses another.
|
|
161
161
|
*
|
|
162
162
|
* @generated from field: repeated apps.v1.NaturalKeyCandidate natural_keys = 3;
|
|
163
163
|
*/
|
|
164
164
|
naturalKeys: NaturalKeyCandidate[];
|
|
165
165
|
|
|
166
166
|
/**
|
|
167
|
-
* How the fields below are grouped for the
|
|
167
|
+
* How the fields below are grouped for the user, in order.
|
|
168
168
|
*
|
|
169
169
|
* @generated from field: repeated apps.v1.DiscoveredFieldGroup field_groups = 4;
|
|
170
170
|
*/
|
|
@@ -499,7 +499,7 @@ export declare type DiscoveryNotice = Message<"apps.v1.DiscoveryNotice"> & {
|
|
|
499
499
|
subject: string;
|
|
500
500
|
|
|
501
501
|
/**
|
|
502
|
-
* What the
|
|
502
|
+
* What the user can do about it, when there is something.
|
|
503
503
|
*
|
|
504
504
|
* @generated from field: optional apps.v1.NoticeRemedy remedy = 6;
|
|
505
505
|
*/
|
|
@@ -597,7 +597,7 @@ export enum AvailabilityState {
|
|
|
597
597
|
BLOCKED = 2,
|
|
598
598
|
|
|
599
599
|
/**
|
|
600
|
-
* The app could not tell. The reason says why, and the
|
|
600
|
+
* The app could not tell. The reason says why, and the user decides.
|
|
601
601
|
*
|
|
602
602
|
* @generated from enum value: AVAILABILITY_STATE_UNDETERMINED = 3;
|
|
603
603
|
*/
|
|
@@ -664,7 +664,7 @@ export enum RemedyAction {
|
|
|
664
664
|
RERUN_DISCOVERY = 2,
|
|
665
665
|
|
|
666
666
|
/**
|
|
667
|
-
* Nothing the
|
|
667
|
+
* Nothing the user can do here; the app's support can.
|
|
668
668
|
*
|
|
669
669
|
* @generated from enum value: REMEDY_ACTION_CONTACT_SUPPORT = 3;
|
|
670
670
|
*/
|
package/dist/auth/auth.d.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { type FoirEnv } from '../graphql/foir-request';
|
|
19
19
|
import { type AuthOpName, type AuthOpOptions } from './ops';
|
|
20
|
-
import { type AuthConfig, type AuthProviderPublic, type CurrentUser, type AuthResult, type DefaultAuthProvider, type AuthorizedApp, type DeleteAccountResult, type MyOrganization, type MyProfile, type MyProfileChange, type MySession, type MyFactor, type StepUp, type FactorEnrollment, type MySignInMethod, type NewPersonalAccessToken, type ProviderCallbackInput, type ProviderLoginInput, type ProviderLoginResult, type ProviderOTPVerifyInput, type ProviderToken, type SignupContext
|
|
20
|
+
import { type AuthConfig, type AuthProviderPublic, type CurrentUser, type AuthResult, type DefaultAuthProvider, type AuthorizedApp, type DeleteAccountResult, type MyOrganization, type MyProfile, type MyProfileChange, type MySession, type MyFactor, type StepUp, type FactorEnrollment, type MySignInMethod, type NewPersonalAccessToken, type ProviderCallbackInput, type ProviderLoginInput, type ProviderLoginResult, type ProviderOTPVerifyInput, type ProviderToken, type SignupContext } from './operations';
|
|
21
21
|
import type { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
22
22
|
/** An access token + its rotating refresh token. */
|
|
23
23
|
export interface FoirAuthTokens {
|
|
@@ -125,8 +125,14 @@ export declare function getDefaultAuthProvider(env: FoirEnv): Promise<DefaultAut
|
|
|
125
125
|
* so a self-hosted frontend can render the right signup surface proactively.
|
|
126
126
|
*/
|
|
127
127
|
export declare function signupContext(env: FoirEnv): Promise<SignupContext>;
|
|
128
|
-
/**
|
|
129
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Join the project's sign-up waitlist. The project must be in waitlist mode.
|
|
130
|
+
* Resolves `true` for every address: the server answers identically whether
|
|
131
|
+
* the address was queued, was already let in, or already has an account, on
|
|
132
|
+
* purpose, so this endpoint cannot be used to test what an address holds. What
|
|
133
|
+
* differs is only the email the address is sent.
|
|
134
|
+
*/
|
|
135
|
+
export declare function joinWaitlist(env: FoirEnv, email: string): Promise<boolean>;
|
|
130
136
|
/**
|
|
131
137
|
* Send a password-reset email. Resolves `true` whether or not the address has
|
|
132
138
|
* an account: the server answers identically either way, on purpose, so this
|
|
@@ -148,8 +154,6 @@ export declare function resetPassword(env: FoirEnv, vars: {
|
|
|
148
154
|
token: string;
|
|
149
155
|
newPassword: string;
|
|
150
156
|
}): Promise<AuthResult>;
|
|
151
|
-
/** Redeem an emailed verification token. */
|
|
152
|
-
export declare function verifyEmail(env: FoirEnv, token: string): Promise<boolean>;
|
|
153
157
|
/**
|
|
154
158
|
* Change the calling user's password. Requires the current password as well
|
|
155
159
|
* as the bearer, so a stolen token alone cannot take the account over.
|
|
@@ -164,10 +168,12 @@ export declare function updatePassword(env: FoirEnv, vars: {
|
|
|
164
168
|
*/
|
|
165
169
|
export declare function currentUser(env: FoirEnv, options?: AuthOpOptions): Promise<CurrentUser | null>;
|
|
166
170
|
/**
|
|
167
|
-
* The
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
* user
|
|
171
|
+
* The token of the provider the calling user signed in through, kept for the
|
|
172
|
+
* sign-in the request belongs to and renewed by the server when it is due:
|
|
173
|
+
* near its stated expiry, or with no expiry stated. `null` when there is no
|
|
174
|
+
* user token on the request; `linked: false` with `reauthenticate: true` when
|
|
175
|
+
* nothing is kept for this sign-in (it did not pass through the provider, or
|
|
176
|
+
* its token was ended), and the user signs in through the provider again.
|
|
171
177
|
*
|
|
172
178
|
* Pass `forceRefresh` after the provider refused the token it was last given:
|
|
173
179
|
* the server renews it then, at most once a minute for one user and provider.
|
|
@@ -178,8 +184,9 @@ export declare function myProviderToken(env: FoirEnv, providerKey: string, optio
|
|
|
178
184
|
forceRefresh?: boolean;
|
|
179
185
|
}): Promise<ProviderToken | null>;
|
|
180
186
|
/**
|
|
181
|
-
* End the
|
|
182
|
-
* clear local session state — {@link signOut} is the
|
|
187
|
+
* End the sign-in's provider tokens server-side: this device's, and no other
|
|
188
|
+
* device's. This does NOT clear local session state — {@link signOut} is the
|
|
189
|
+
* pairing that does both.
|
|
183
190
|
*/
|
|
184
191
|
export declare function logout(env: FoirEnv, options?: AuthOpOptions): Promise<boolean>;
|
|
185
192
|
/**
|
|
@@ -328,7 +335,7 @@ export declare function myOrganizations(env: FoirEnv, vars?: {
|
|
|
328
335
|
* membership together.
|
|
329
336
|
*
|
|
330
337
|
* `parentId` FOUNDS A CHILD, which is what lets the people you serve create their own
|
|
331
|
-
* sub-tenants with no
|
|
338
|
+
* sub-tenants with no manager in the loop — a reseller adding a client, a
|
|
332
339
|
* franchise adding a branch. It is resolved against the caller's own
|
|
333
340
|
* MEMBERSHIPS, not merely against the project: on this lane "an organization
|
|
334
341
|
* that exists" is not the question, "one you operate" is, and anything else is
|
package/dist/auth/hosted.d.ts
CHANGED
|
@@ -21,6 +21,11 @@ export interface HostedLoginConfig {
|
|
|
21
21
|
sessionPath?: string;
|
|
22
22
|
/** RP-initiated logout path on the front door. Default `/session/end-session`. */
|
|
23
23
|
endSessionPath?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The app the bearer is for, when it is not the app the login domain fronts.
|
|
26
|
+
* Default: the domain's own app.
|
|
27
|
+
*/
|
|
28
|
+
clientId?: string;
|
|
24
29
|
}
|
|
25
30
|
/**
|
|
26
31
|
* Build the redirect URL to the hosted front door, forwarding a best-effort
|