@camstack/types 1.2.424 → 1.2.425

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.
@@ -92,6 +92,9 @@ declare const BrokerProviderInfoSchema: z.ZodObject<{
92
92
  label: z.ZodString;
93
93
  interactiveConnectPath: z.ZodOptional<z.ZodString>;
94
94
  interactiveDisconnectPath: z.ZodOptional<z.ZodString>;
95
+ signIn: z.ZodOptional<z.ZodObject<{
96
+ basePath: z.ZodString;
97
+ }, z.core.$strip>>;
95
98
  }, z.core.$strip>>;
96
99
  }, z.core.$strip>;
97
100
  export type BrokerProviderInfo = z.infer<typeof BrokerProviderInfoSchema>;
@@ -204,6 +207,9 @@ export declare const brokerCapability: {
204
207
  label: z.ZodString;
205
208
  interactiveConnectPath: z.ZodOptional<z.ZodString>;
206
209
  interactiveDisconnectPath: z.ZodOptional<z.ZodString>;
210
+ signIn: z.ZodOptional<z.ZodObject<{
211
+ basePath: z.ZodString;
212
+ }, z.core.$strip>>;
207
213
  }, z.core.$strip>>;
208
214
  }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
209
215
  readonly add: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
package/dist/index.js CHANGED
@@ -10761,7 +10761,22 @@ var BrokerProviderInfoSchema = zod.z.object({
10761
10761
  */
10762
10762
  interactiveConnectPath: zod.z.string().min(1).optional(),
10763
10763
  /** Relative hub path to disconnect the linked account (same popup pattern). */
10764
- interactiveDisconnectPath: zod.z.string().min(1).optional()
10764
+ interactiveDisconnectPath: zod.z.string().min(1).optional(),
10765
+ /**
10766
+ * The kind signs in through a server-held interactive session instead of
10767
+ * (or before) typed credentials. `basePath` is a hub-relative route set
10768
+ * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
10769
+ * contract: `POST {basePath}/start` (body: the form's settings) answers
10770
+ * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
10771
+ * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
10772
+ * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
10773
+ * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
10774
+ * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
10775
+ * (`{ sessionId }`) drops the session. The dialog that edits a broker
10776
+ * offers it as the default path; the fields the session fills are
10777
+ * marked `filledBySignIn` in the kind's settings schema.
10778
+ */
10779
+ signIn: zod.z.object({ basePath: zod.z.string().min(1) }).optional()
10765
10780
  }))
10766
10781
  });
10767
10782
  var ListInputSchema = zod.z.object({
package/dist/index.mjs CHANGED
@@ -10760,7 +10760,22 @@ var BrokerProviderInfoSchema = z.object({
10760
10760
  */
10761
10761
  interactiveConnectPath: z.string().min(1).optional(),
10762
10762
  /** Relative hub path to disconnect the linked account (same popup pattern). */
10763
- interactiveDisconnectPath: z.string().min(1).optional()
10763
+ interactiveDisconnectPath: z.string().min(1).optional(),
10764
+ /**
10765
+ * The kind signs in through a server-held interactive session instead of
10766
+ * (or before) typed credentials. `basePath` is a hub-relative route set
10767
+ * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
10768
+ * contract: `POST {basePath}/start` (body: the form's settings) answers
10769
+ * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
10770
+ * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
10771
+ * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
10772
+ * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
10773
+ * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
10774
+ * (`{ sessionId }`) drops the session. The dialog that edits a broker
10775
+ * offers it as the default path; the fields the session fills are
10776
+ * marked `filledBySignIn` in the kind's settings schema.
10777
+ */
10778
+ signIn: z.object({ basePath: z.string().min(1) }).optional()
10764
10779
  }))
10765
10780
  });
10766
10781
  var ListInputSchema = z.object({
@@ -143,6 +143,18 @@ export interface ConfigFieldBase {
143
143
  readonly placeholder?: string;
144
144
  /** Default value used when the current value is undefined */
145
145
  readonly default?: unknown;
146
+ /**
147
+ * A default that depends on the operator's country (ISO 3166 alpha-2, read
148
+ * from the browser locale, e.g. `it-IT` is `IT`). Wins over `default` when
149
+ * the country is listed; a form that creates a record uses it to prefill
150
+ * what the operator would otherwise have to look up.
151
+ */
152
+ readonly defaultByCountry?: Readonly<Record<string, unknown>>;
153
+ /**
154
+ * The value is written by an interactive sign-in the kind offers, never typed
155
+ * first. A form that has such a sign-in tucks the field under "Advanced".
156
+ */
157
+ readonly filledBySignIn?: boolean;
146
158
  readonly span?: 1 | 2 | 3 | 4;
147
159
  readonly showWhen?: ConfigCondition;
148
160
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.424",
3
+ "version": "1.2.425",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",