@proteos/sdk 0.77.0 → 0.78.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/dist/index.cjs +136 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +264 -42
- package/dist/index.d.ts +264 -42
- package/dist/index.js +136 -49
- package/dist/index.js.map +1 -1
- package/dist/meta/index.d.cts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/{types-Bn5y5wHZ.d.cts → types-CWj1h9l0.d.cts} +1 -1
- package/dist/{types-Bn5y5wHZ.d.ts → types-CWj1h9l0.d.ts} +1 -1
- package/package.json +1 -1
- package/src/auth/platform-entities.ts +7 -0
- package/src/discovery/index.ts +138 -0
- package/src/discovery/types.ts +200 -0
- package/src/index.ts +28 -0
- package/src/storage/files.ts +13 -3
package/dist/meta/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { h as App, i as AppConfiguration, j as AppConfigurationSchema, k as AppConfigurationService, l as AppHome, m as AppHomeSchema, n as AppHomeType, o as AppSchema, p as AppService, q as ArrayAttributeMeta, a as Attribute, r as AttributeAccessRule, cz as AttributeForLookup, cA as AttributeMeta, s as AttributeRestrictions, t as AttributeSchema, u as AttributeType, cB as BUILT_IN_CONTROLS, cC as BuiltInControlSlug, cD as CALENDAR_MAX_OVERLAY_USERS, cE as CALENDAR_VIEW_KINDS, C as CURRENT_USER, w as CURRENT_USER_DEFAULT, cF as CalendarElement, cG as CalendarViewKind, cH as CardElement, y as Column, cI as ColumnElement, z as ColumnSchema, cJ as CommonProps, B as ComparisonOperator, D as Component, cK as ComponentElement, E as ComponentSchema, G as ComponentService, H as ContactAddressAttributeKind, I as ContactAddressAttributeMeta, J as ContactAddressAttributeMetaSchema, K as ContactBindingDuplicatePolicy, cL as ControlBucket, M as CreateAppConfigurationRequest, N as CreateAppRequest, O as CreateComponentRequest, Q as CreateDesignReferenceRequest, S as CreateEntityExtensionRequest, T as CreateEntityRequest, V as CreateListExtensionRequest, W as CreateListRequest, X as CreateListViewRequest, Y as CreateMenuConfigurationExtensionRequest, Z as CreateMenuConfigurationRequest, _ as CreatePageExtensionRequest, $ as CreatePageRequest, a0 as CreateVariableRequest, a1 as CurrencyAttributeMeta, a2 as CurrencyAttributeMetaSchema, a3 as CurrencySymbolSide, a4 as CurrencyValue, a5 as CurrentUserDefault, cM as DatetimeAttributeMeta, cN as DatetimeFormat, a9 as DeployModuleRequest, aa as DesignReference, ab as DesignReferenceContent, ac as DesignReferenceSchema, ad as DesignReferenceService, cO as DividerElement, af as Entity, ag as EntityContactBinding, ah as EntityContactBindingSchema, ai as EntityExtension, aj as EntityExtensionSchema, ak as EntityExtensionService, al as EntitySchema, am as EntityService, an as EntityWithSchema, ao as EntityWithSchemaSchema, ap as EnumAttributeMeta, aq as EnumValue, ar as ExtensionPosition, as as ExtensionPositionSchema, cP as FieldElement, at as FileAttributeMeta, cQ as FileAttributeMetaSchema, av as FilterElement, aw as FilterElementSchema, ax as FilterGroup, ay as FilterGroupSchema, cR as LayoutAlign, cS as LayoutElement, cT as LayoutElementSchema, cU as LayoutElementType, cV as LayoutGap, cW as LayoutJustify, cX as LayoutStep, cY as LayoutStepSchema, cZ as LayoutTab, c_ as LayoutTabSchema, c$ as LengthValue, d0 as LengthValueSchema, az as List, aA as ListAppConfigurationsOptions, aB as ListAppsOptions, aC as ListComponentsOptions, aD as ListDesignReferencesOptions, d1 as ListElement, aE as ListEntitiesOptions, aF as ListEntityExtensionsOptions, aG as ListExtension, aH as ListExtensionColumnPlacement, aI as ListExtensionColumnPlacementSchema, aJ as ListExtensionSchema, aK as ListExtensionService, aM as ListListExtensionsOptions, aN as ListListViewsOptions, aO as ListListsOptions, aP as ListMenuConfigurationExtensionsOptions, aQ as ListMenuConfigurationsOptions, aR as ListModulesOptions, aS as ListPageExtensionsOptions, aT as ListPagesOptions, aU as ListSchema, aV as ListService, aW as ListVariablesOptions, aX as ListView, aY as ListViewSchema, aZ as ListViewService, a_ as LogicalOperator, a$ as MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS, b0 as MenuConfiguration, b1 as MenuConfigurationExtension, b2 as MenuConfigurationExtensionPlacement, b3 as MenuConfigurationExtensionPlacementSchema, b4 as MenuConfigurationExtensionPosition, b5 as MenuConfigurationExtensionPositionSchema, b6 as MenuConfigurationExtensionSchema, b7 as MenuConfigurationExtensionService, b8 as MenuConfigurationSchema, b9 as MenuConfigurationService, ba as MenuItem, bb as MenuItemSchema, bc as MenuItemType, bd as MetaClient, be as MetaListOptions, bf as Module, bg as ModuleSchema, bh as ModuleService, bi as ModuleStatus, d2 as NumberAttributeMeta, d3 as ObjectAttributeMeta, bj as OnDeleteAction, bk as OnDeleteActionSchema, bl as PAGE_ACTION_MATCH_MAX_LIMIT, d4 as PAGE_BACKGROUND_COLOR_RE, d5 as PAGE_BACKGROUND_TOKENS, bm as PAGE_EXTENSION_ANCHOR_MAIN, bn as PAGE_EXTENSION_ANCHOR_SIDE_PANEL, d6 as PAGE_HEADERS, bo as PLATFORM_ATTRIBUTE_NAMES, bq as Page, e as PageAction, br as PageActionIntent, bs as PageActionKind, bt as PageActionMatch, bu as PageActionMatchSchema, bv as PageActionSchema, d7 as PageBackgroundToken, bw as PageExtension, bx as PageExtensionPlacement, by as PageExtensionPlacementSchema, bz as PageExtensionSchema, bA as PageExtensionService, d8 as PageHeader, bB as PageLayout, bC as PageLayoutSchema, d9 as PageLayoutSidePanel, da as PageLayoutSidePanelSchema, bD as PageMode, bE as PageSchema, bF as PageService, db as PageStyle, dc as PageStyleSchema, bG as PageType, dd as PrincipalAttributeMeta, d as PrincipalRef, de as PrincipalType, f as PublicAccessOperation, bH as PublicPageComponent, bI as PublicPageResponse, df as RECORD_TITLE_FIELD, dg as RecordFilterElement, bJ as RecordPageBinding, bK as RecordPageBindingSchema, dh as RelatedListElement, di as RelatedRecordElement, bL as RelationAttributeMeta, bM as RelationAttributeMetaSchema, dj as ResponsiveSizing, dk as RowElement, dl as SchedulingPickerElement, dm as SectionElement, dn as SizeValue, dp as SizeValueSchema, dq as SizingProps, bP as SortConfig, bQ as SortConfigSchema, bR as SortDirection, dr as StepperElement, ds as StringAttributeMeta, dt as StringFormat, du as StyleSizeValue, dv as StyleSizeValueSchema, dw as TabsElement, dx as TextElement, dy as TextVariant, bU as TriggerPageBinding, bV as TriggerPageBindingSchema, bW as TriggerPhase, bX as UpdateAppConfigurationRequest, bY as UpdateAppRequest, bZ as UpdateComponentRequest, b_ as UpdateDesignReferenceRequest, b$ as UpdateEntityExtensionRequest, c0 as UpdateEntityRequest, c1 as UpdateListExtensionRequest, c2 as UpdateListRequest, c3 as UpdateListViewRequest, c4 as UpdateMenuConfigurationExtensionRequest, c5 as UpdateMenuConfigurationRequest, c6 as UpdatePageExtensionRequest, c7 as UpdatePageRequest, c8 as UpdateVariableRequest, dz as UserAttributeMeta, dA as UserAttributeMetaSchema, cb as Variable, cc as VariableSchema, cd as VariableService, dB as WorkflowTriggerElement, ce as acceptsCurrentUserDefault, cf as allCurrencyCodes, cg as bundleVersionOf, cj as currencyLabel, ck as currencySymbol, cl as currencySymbolSide, cm as formatAmount, cn as formatMoney, dC as isBuiltInControl, co as isCurrentUser, cp as isCurrentUserDefault, dD as isLengthValue, dE as isPageBackground, cq as isPlatformAttributeName, dF as isReservedAttributeName, dG as isStyleSizeValue, dH as isTitleQueryable, cr as localeNumberSeparators, dI as lookupCompatibleControls, dJ as lookupControls, dK as lookupPrimaryControl, cs as parseAmount, ct as parseContactAddressMeta, cu as parseCurrencyMeta, cv as parseFileMeta, dL as parsePrincipalMeta, cw as parseRelationMeta, dM as parseUserMeta, cx as platformAttributes, dN as titleTemplateVariables } from '../types-CWj1h9l0.cjs';
|
|
2
2
|
import 'zod';
|
package/dist/meta/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { h as App, i as AppConfiguration, j as AppConfigurationSchema, k as AppConfigurationService, l as AppHome, m as AppHomeSchema, n as AppHomeType, o as AppSchema, p as AppService, q as ArrayAttributeMeta, a as Attribute, r as AttributeAccessRule, cz as AttributeForLookup, cA as AttributeMeta, s as AttributeRestrictions, t as AttributeSchema, u as AttributeType, cB as BUILT_IN_CONTROLS, cC as BuiltInControlSlug, cD as CALENDAR_MAX_OVERLAY_USERS, cE as CALENDAR_VIEW_KINDS, C as CURRENT_USER, w as CURRENT_USER_DEFAULT, cF as CalendarElement, cG as CalendarViewKind, cH as CardElement, y as Column, cI as ColumnElement, z as ColumnSchema, cJ as CommonProps, B as ComparisonOperator, D as Component, cK as ComponentElement, E as ComponentSchema, G as ComponentService, H as ContactAddressAttributeKind, I as ContactAddressAttributeMeta, J as ContactAddressAttributeMetaSchema, K as ContactBindingDuplicatePolicy, cL as ControlBucket, M as CreateAppConfigurationRequest, N as CreateAppRequest, O as CreateComponentRequest, Q as CreateDesignReferenceRequest, S as CreateEntityExtensionRequest, T as CreateEntityRequest, V as CreateListExtensionRequest, W as CreateListRequest, X as CreateListViewRequest, Y as CreateMenuConfigurationExtensionRequest, Z as CreateMenuConfigurationRequest, _ as CreatePageExtensionRequest, $ as CreatePageRequest, a0 as CreateVariableRequest, a1 as CurrencyAttributeMeta, a2 as CurrencyAttributeMetaSchema, a3 as CurrencySymbolSide, a4 as CurrencyValue, a5 as CurrentUserDefault, cM as DatetimeAttributeMeta, cN as DatetimeFormat, a9 as DeployModuleRequest, aa as DesignReference, ab as DesignReferenceContent, ac as DesignReferenceSchema, ad as DesignReferenceService, cO as DividerElement, af as Entity, ag as EntityContactBinding, ah as EntityContactBindingSchema, ai as EntityExtension, aj as EntityExtensionSchema, ak as EntityExtensionService, al as EntitySchema, am as EntityService, an as EntityWithSchema, ao as EntityWithSchemaSchema, ap as EnumAttributeMeta, aq as EnumValue, ar as ExtensionPosition, as as ExtensionPositionSchema, cP as FieldElement, at as FileAttributeMeta, cQ as FileAttributeMetaSchema, av as FilterElement, aw as FilterElementSchema, ax as FilterGroup, ay as FilterGroupSchema, cR as LayoutAlign, cS as LayoutElement, cT as LayoutElementSchema, cU as LayoutElementType, cV as LayoutGap, cW as LayoutJustify, cX as LayoutStep, cY as LayoutStepSchema, cZ as LayoutTab, c_ as LayoutTabSchema, c$ as LengthValue, d0 as LengthValueSchema, az as List, aA as ListAppConfigurationsOptions, aB as ListAppsOptions, aC as ListComponentsOptions, aD as ListDesignReferencesOptions, d1 as ListElement, aE as ListEntitiesOptions, aF as ListEntityExtensionsOptions, aG as ListExtension, aH as ListExtensionColumnPlacement, aI as ListExtensionColumnPlacementSchema, aJ as ListExtensionSchema, aK as ListExtensionService, aM as ListListExtensionsOptions, aN as ListListViewsOptions, aO as ListListsOptions, aP as ListMenuConfigurationExtensionsOptions, aQ as ListMenuConfigurationsOptions, aR as ListModulesOptions, aS as ListPageExtensionsOptions, aT as ListPagesOptions, aU as ListSchema, aV as ListService, aW as ListVariablesOptions, aX as ListView, aY as ListViewSchema, aZ as ListViewService, a_ as LogicalOperator, a$ as MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS, b0 as MenuConfiguration, b1 as MenuConfigurationExtension, b2 as MenuConfigurationExtensionPlacement, b3 as MenuConfigurationExtensionPlacementSchema, b4 as MenuConfigurationExtensionPosition, b5 as MenuConfigurationExtensionPositionSchema, b6 as MenuConfigurationExtensionSchema, b7 as MenuConfigurationExtensionService, b8 as MenuConfigurationSchema, b9 as MenuConfigurationService, ba as MenuItem, bb as MenuItemSchema, bc as MenuItemType, bd as MetaClient, be as MetaListOptions, bf as Module, bg as ModuleSchema, bh as ModuleService, bi as ModuleStatus, d2 as NumberAttributeMeta, d3 as ObjectAttributeMeta, bj as OnDeleteAction, bk as OnDeleteActionSchema, bl as PAGE_ACTION_MATCH_MAX_LIMIT, d4 as PAGE_BACKGROUND_COLOR_RE, d5 as PAGE_BACKGROUND_TOKENS, bm as PAGE_EXTENSION_ANCHOR_MAIN, bn as PAGE_EXTENSION_ANCHOR_SIDE_PANEL, d6 as PAGE_HEADERS, bo as PLATFORM_ATTRIBUTE_NAMES, bq as Page, e as PageAction, br as PageActionIntent, bs as PageActionKind, bt as PageActionMatch, bu as PageActionMatchSchema, bv as PageActionSchema, d7 as PageBackgroundToken, bw as PageExtension, bx as PageExtensionPlacement, by as PageExtensionPlacementSchema, bz as PageExtensionSchema, bA as PageExtensionService, d8 as PageHeader, bB as PageLayout, bC as PageLayoutSchema, d9 as PageLayoutSidePanel, da as PageLayoutSidePanelSchema, bD as PageMode, bE as PageSchema, bF as PageService, db as PageStyle, dc as PageStyleSchema, bG as PageType, dd as PrincipalAttributeMeta, d as PrincipalRef, de as PrincipalType, f as PublicAccessOperation, bH as PublicPageComponent, bI as PublicPageResponse, df as RECORD_TITLE_FIELD, dg as RecordFilterElement, bJ as RecordPageBinding, bK as RecordPageBindingSchema, dh as RelatedListElement, di as RelatedRecordElement, bL as RelationAttributeMeta, bM as RelationAttributeMetaSchema, dj as ResponsiveSizing, dk as RowElement, dl as SchedulingPickerElement, dm as SectionElement, dn as SizeValue, dp as SizeValueSchema, dq as SizingProps, bP as SortConfig, bQ as SortConfigSchema, bR as SortDirection, dr as StepperElement, ds as StringAttributeMeta, dt as StringFormat, du as StyleSizeValue, dv as StyleSizeValueSchema, dw as TabsElement, dx as TextElement, dy as TextVariant, bU as TriggerPageBinding, bV as TriggerPageBindingSchema, bW as TriggerPhase, bX as UpdateAppConfigurationRequest, bY as UpdateAppRequest, bZ as UpdateComponentRequest, b_ as UpdateDesignReferenceRequest, b$ as UpdateEntityExtensionRequest, c0 as UpdateEntityRequest, c1 as UpdateListExtensionRequest, c2 as UpdateListRequest, c3 as UpdateListViewRequest, c4 as UpdateMenuConfigurationExtensionRequest, c5 as UpdateMenuConfigurationRequest, c6 as UpdatePageExtensionRequest, c7 as UpdatePageRequest, c8 as UpdateVariableRequest, dz as UserAttributeMeta, dA as UserAttributeMetaSchema, cb as Variable, cc as VariableSchema, cd as VariableService, dB as WorkflowTriggerElement, ce as acceptsCurrentUserDefault, cf as allCurrencyCodes, cg as bundleVersionOf, cj as currencyLabel, ck as currencySymbol, cl as currencySymbolSide, cm as formatAmount, cn as formatMoney, dC as isBuiltInControl, co as isCurrentUser, cp as isCurrentUserDefault, dD as isLengthValue, dE as isPageBackground, cq as isPlatformAttributeName, dF as isReservedAttributeName, dG as isStyleSizeValue, dH as isTitleQueryable, cr as localeNumberSeparators, dI as lookupCompatibleControls, dJ as lookupControls, dK as lookupPrimaryControl, cs as parseAmount, ct as parseContactAddressMeta, cu as parseCurrencyMeta, cv as parseFileMeta, dL as parsePrincipalMeta, cw as parseRelationMeta, dM as parseUserMeta, cx as platformAttributes, dN as titleTemplateVariables } from '../types-CWj1h9l0.js';
|
|
2
2
|
import 'zod';
|
|
@@ -6561,4 +6561,4 @@ declare function isCurrentUserDefault(value: unknown): value is CurrentUserDefau
|
|
|
6561
6561
|
/** Only the identity-valued attribute types can carry the sentinel. */
|
|
6562
6562
|
declare function acceptsCurrentUserDefault(type: AttributeType): boolean;
|
|
6563
6563
|
|
|
6564
|
-
export { type
|
|
6564
|
+
export { type CreatePageRequest as $, type AuditFields as A, type ComparisonOperator as B, CURRENT_USER as C, type Component as D, ComponentSchema as E, type FileRef as F, type ComponentService as G, type ContactAddressAttributeKind as H, type ContactAddressAttributeMeta as I, ContactAddressAttributeMetaSchema as J, type ContactBindingDuplicatePolicy as K, type ListOptions as L, type CreateAppConfigurationRequest as M, type CreateAppRequest as N, type CreateComponentRequest as O, PageIterator as P, type CreateDesignReferenceRequest as Q, type ResponseMeta as R, type CreateEntityExtensionRequest as S, type CreateEntityRequest as T, type UserRef as U, type CreateListExtensionRequest as V, type CreateListRequest as W, type CreateListViewRequest as X, type CreateMenuConfigurationExtensionRequest as Y, type CreateMenuConfigurationRequest as Z, type CreatePageExtensionRequest as _, type Attribute as a, MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS as a$, type CreateVariableRequest as a0, type CurrencyAttributeMeta as a1, CurrencyAttributeMetaSchema as a2, type CurrencySymbolSide as a3, type CurrencyValue as a4, type CurrentUserDefault as a5, DEFAULT_OPTIONS as a6, DEFAULT_PAGE_SIZE as a7, DONE as a8, type DeployModuleRequest as a9, type ListAppConfigurationsOptions as aA, type ListAppsOptions as aB, type ListComponentsOptions as aC, type ListDesignReferencesOptions as aD, type ListEntitiesOptions as aE, type ListEntityExtensionsOptions as aF, type ListExtension as aG, type ListExtensionColumnPlacement as aH, ListExtensionColumnPlacementSchema as aI, ListExtensionSchema as aJ, type ListExtensionService as aK, type ListFn as aL, type ListListExtensionsOptions as aM, type ListListViewsOptions as aN, type ListListsOptions as aO, type ListMenuConfigurationExtensionsOptions as aP, type ListMenuConfigurationsOptions as aQ, type ListModulesOptions as aR, type ListPageExtensionsOptions as aS, type ListPagesOptions as aT, ListSchema as aU, type ListService as aV, type ListVariablesOptions as aW, type ListView as aX, ListViewSchema as aY, type ListViewService as aZ, type LogicalOperator as a_, type DesignReference as aa, type DesignReferenceContent as ab, DesignReferenceSchema as ac, type DesignReferenceService as ad, type Done as ae, type Entity as af, type EntityContactBinding as ag, EntityContactBindingSchema as ah, type EntityExtension as ai, EntityExtensionSchema as aj, type EntityExtensionService as ak, EntitySchema as al, type EntityService as am, type EntityWithSchema as an, EntityWithSchemaSchema as ao, type EnumAttributeMeta as ap, type EnumValue as aq, type ExtensionPosition as ar, ExtensionPositionSchema as as, type FileAttributeMeta as at, FileRefSchema as au, type FilterElement as av, FilterElementSchema as aw, type FilterGroup as ax, FilterGroupSchema as ay, type List as az, type ListResult as b, type UpdateEntityExtensionRequest as b$, type MenuConfiguration as b0, type MenuConfigurationExtension as b1, type MenuConfigurationExtensionPlacement as b2, MenuConfigurationExtensionPlacementSchema as b3, type MenuConfigurationExtensionPosition as b4, MenuConfigurationExtensionPositionSchema as b5, MenuConfigurationExtensionSchema as b6, type MenuConfigurationExtensionService as b7, MenuConfigurationSchema as b8, type MenuConfigurationService as b9, type PageExtensionService as bA, type PageLayout as bB, PageLayoutSchema as bC, type PageMode as bD, PageSchema as bE, type PageService as bF, type PageType as bG, type PublicPageComponent as bH, type PublicPageResponse as bI, type RecordPageBinding as bJ, RecordPageBindingSchema as bK, type RelationAttributeMeta as bL, RelationAttributeMetaSchema as bM, type ResolvedClientOptions as bN, ResponseMetaSchema as bO, type SortConfig as bP, SortConfigSchema as bQ, type SortDirection as bR, type Timestamps as bS, type TokenProvider as bT, type TriggerPageBinding as bU, TriggerPageBindingSchema as bV, type TriggerPhase as bW, type UpdateAppConfigurationRequest as bX, type UpdateAppRequest as bY, type UpdateComponentRequest as bZ, type UpdateDesignReferenceRequest as b_, type MenuItem as ba, MenuItemSchema as bb, MenuItemType as bc, MetaClient as bd, type MetaListOptions as be, type Module as bf, ModuleSchema as bg, type ModuleService as bh, type ModuleStatus as bi, type OnDeleteAction as bj, OnDeleteActionSchema as bk, PAGE_ACTION_MATCH_MAX_LIMIT as bl, PAGE_EXTENSION_ANCHOR_MAIN as bm, PAGE_EXTENSION_ANCHOR_SIDE_PANEL as bn, PLATFORM_ATTRIBUTE_NAMES as bo, PLATFORM_USER_ID as bp, type Page as bq, type PageActionIntent as br, type PageActionKind as bs, type PageActionMatch as bt, PageActionMatchSchema as bu, PageActionSchema as bv, type PageExtension as bw, type PageExtensionPlacement as bx, PageExtensionPlacementSchema as by, PageExtensionSchema as bz, ProteosClient as c, type LengthValue as c$, type UpdateEntityRequest as c0, type UpdateListExtensionRequest as c1, type UpdateListRequest as c2, type UpdateListViewRequest as c3, type UpdateMenuConfigurationExtensionRequest as c4, type UpdateMenuConfigurationRequest as c5, type UpdatePageExtensionRequest as c6, type UpdatePageRequest as c7, type UpdateVariableRequest as c8, UserRefSchema as c9, type AttributeMeta as cA, BUILT_IN_CONTROLS as cB, type BuiltInControlSlug as cC, CALENDAR_MAX_OVERLAY_USERS as cD, CALENDAR_VIEW_KINDS as cE, type CalendarElement as cF, type CalendarViewKind as cG, type CardElement as cH, type ColumnElement as cI, type CommonProps as cJ, type ComponentElement as cK, type ControlBucket as cL, type DatetimeAttributeMeta as cM, type DatetimeFormat as cN, type DividerElement as cO, type FieldElement as cP, FileAttributeMetaSchema as cQ, type LayoutAlign as cR, type LayoutElement as cS, LayoutElementSchema as cT, LayoutElementType as cU, type LayoutGap as cV, type LayoutJustify as cW, type LayoutStep as cX, LayoutStepSchema as cY, type LayoutTab as cZ, LayoutTabSchema as c_, type UserType as ca, type Variable as cb, VariableSchema as cc, type VariableService as cd, acceptsCurrentUserDefault as ce, allCurrencyCodes as cf, bundleVersionOf as cg, createIterator as ch, createListResultSchema as ci, currencyLabel as cj, currencySymbol as ck, currencySymbolSide as cl, formatAmount as cm, formatMoney as cn, isCurrentUser as co, isCurrentUserDefault as cp, isPlatformAttributeName as cq, localeNumberSeparators as cr, parseAmount as cs, parseContactAddressMeta as ct, parseCurrencyMeta as cu, parseFileMeta as cv, parseRelationMeta as cw, platformAttributes as cx, resolveOptions as cy, type AttributeForLookup as cz, type PrincipalRef as d, LengthValueSchema as d0, type ListElement as d1, type NumberAttributeMeta as d2, type ObjectAttributeMeta as d3, PAGE_BACKGROUND_COLOR_RE as d4, PAGE_BACKGROUND_TOKENS as d5, PAGE_HEADERS as d6, type PageBackgroundToken as d7, type PageHeader as d8, type PageLayoutSidePanel as d9, UserAttributeMetaSchema as dA, type WorkflowTriggerElement as dB, isBuiltInControl as dC, isLengthValue as dD, isPageBackground as dE, isReservedAttributeName as dF, isStyleSizeValue as dG, isTitleQueryable as dH, lookupCompatibleControls as dI, lookupControls as dJ, lookupPrimaryControl as dK, parsePrincipalMeta as dL, parseUserMeta as dM, titleTemplateVariables as dN, PageLayoutSidePanelSchema as da, type PageStyle as db, PageStyleSchema as dc, type PrincipalAttributeMeta as dd, type PrincipalType as de, RECORD_TITLE_FIELD as df, type RecordFilterElement as dg, type RelatedListElement as dh, type RelatedRecordElement as di, type ResponsiveSizing as dj, type RowElement as dk, type SchedulingPickerElement as dl, type SectionElement as dm, type SizeValue as dn, SizeValueSchema as dp, type SizingProps as dq, type StepperElement as dr, type StringAttributeMeta as ds, type StringFormat as dt, type StyleSizeValue as du, StyleSizeValueSchema as dv, type TabsElement as dw, type TextElement as dx, type TextVariant as dy, type UserAttributeMeta as dz, type PageAction as e, type PublicAccessOperation as f, type RequestOptions as g, type App as h, type AppConfiguration as i, AppConfigurationSchema as j, type AppConfigurationService as k, type AppHome as l, AppHomeSchema as m, type AppHomeType as n, AppSchema as o, type AppService as p, type ArrayAttributeMeta as q, type AttributeAccessRule as r, type AttributeRestrictions as s, AttributeSchema as t, type AttributeType as u, AuditFieldsSchema as v, CURRENT_USER_DEFAULT as w, type ClientOptions as x, type Column as y, ColumnSchema as z };
|
|
@@ -6561,4 +6561,4 @@ declare function isCurrentUserDefault(value: unknown): value is CurrentUserDefau
|
|
|
6561
6561
|
/** Only the identity-valued attribute types can carry the sentinel. */
|
|
6562
6562
|
declare function acceptsCurrentUserDefault(type: AttributeType): boolean;
|
|
6563
6563
|
|
|
6564
|
-
export { type
|
|
6564
|
+
export { type CreatePageRequest as $, type AuditFields as A, type ComparisonOperator as B, CURRENT_USER as C, type Component as D, ComponentSchema as E, type FileRef as F, type ComponentService as G, type ContactAddressAttributeKind as H, type ContactAddressAttributeMeta as I, ContactAddressAttributeMetaSchema as J, type ContactBindingDuplicatePolicy as K, type ListOptions as L, type CreateAppConfigurationRequest as M, type CreateAppRequest as N, type CreateComponentRequest as O, PageIterator as P, type CreateDesignReferenceRequest as Q, type ResponseMeta as R, type CreateEntityExtensionRequest as S, type CreateEntityRequest as T, type UserRef as U, type CreateListExtensionRequest as V, type CreateListRequest as W, type CreateListViewRequest as X, type CreateMenuConfigurationExtensionRequest as Y, type CreateMenuConfigurationRequest as Z, type CreatePageExtensionRequest as _, type Attribute as a, MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS as a$, type CreateVariableRequest as a0, type CurrencyAttributeMeta as a1, CurrencyAttributeMetaSchema as a2, type CurrencySymbolSide as a3, type CurrencyValue as a4, type CurrentUserDefault as a5, DEFAULT_OPTIONS as a6, DEFAULT_PAGE_SIZE as a7, DONE as a8, type DeployModuleRequest as a9, type ListAppConfigurationsOptions as aA, type ListAppsOptions as aB, type ListComponentsOptions as aC, type ListDesignReferencesOptions as aD, type ListEntitiesOptions as aE, type ListEntityExtensionsOptions as aF, type ListExtension as aG, type ListExtensionColumnPlacement as aH, ListExtensionColumnPlacementSchema as aI, ListExtensionSchema as aJ, type ListExtensionService as aK, type ListFn as aL, type ListListExtensionsOptions as aM, type ListListViewsOptions as aN, type ListListsOptions as aO, type ListMenuConfigurationExtensionsOptions as aP, type ListMenuConfigurationsOptions as aQ, type ListModulesOptions as aR, type ListPageExtensionsOptions as aS, type ListPagesOptions as aT, ListSchema as aU, type ListService as aV, type ListVariablesOptions as aW, type ListView as aX, ListViewSchema as aY, type ListViewService as aZ, type LogicalOperator as a_, type DesignReference as aa, type DesignReferenceContent as ab, DesignReferenceSchema as ac, type DesignReferenceService as ad, type Done as ae, type Entity as af, type EntityContactBinding as ag, EntityContactBindingSchema as ah, type EntityExtension as ai, EntityExtensionSchema as aj, type EntityExtensionService as ak, EntitySchema as al, type EntityService as am, type EntityWithSchema as an, EntityWithSchemaSchema as ao, type EnumAttributeMeta as ap, type EnumValue as aq, type ExtensionPosition as ar, ExtensionPositionSchema as as, type FileAttributeMeta as at, FileRefSchema as au, type FilterElement as av, FilterElementSchema as aw, type FilterGroup as ax, FilterGroupSchema as ay, type List as az, type ListResult as b, type UpdateEntityExtensionRequest as b$, type MenuConfiguration as b0, type MenuConfigurationExtension as b1, type MenuConfigurationExtensionPlacement as b2, MenuConfigurationExtensionPlacementSchema as b3, type MenuConfigurationExtensionPosition as b4, MenuConfigurationExtensionPositionSchema as b5, MenuConfigurationExtensionSchema as b6, type MenuConfigurationExtensionService as b7, MenuConfigurationSchema as b8, type MenuConfigurationService as b9, type PageExtensionService as bA, type PageLayout as bB, PageLayoutSchema as bC, type PageMode as bD, PageSchema as bE, type PageService as bF, type PageType as bG, type PublicPageComponent as bH, type PublicPageResponse as bI, type RecordPageBinding as bJ, RecordPageBindingSchema as bK, type RelationAttributeMeta as bL, RelationAttributeMetaSchema as bM, type ResolvedClientOptions as bN, ResponseMetaSchema as bO, type SortConfig as bP, SortConfigSchema as bQ, type SortDirection as bR, type Timestamps as bS, type TokenProvider as bT, type TriggerPageBinding as bU, TriggerPageBindingSchema as bV, type TriggerPhase as bW, type UpdateAppConfigurationRequest as bX, type UpdateAppRequest as bY, type UpdateComponentRequest as bZ, type UpdateDesignReferenceRequest as b_, type MenuItem as ba, MenuItemSchema as bb, MenuItemType as bc, MetaClient as bd, type MetaListOptions as be, type Module as bf, ModuleSchema as bg, type ModuleService as bh, type ModuleStatus as bi, type OnDeleteAction as bj, OnDeleteActionSchema as bk, PAGE_ACTION_MATCH_MAX_LIMIT as bl, PAGE_EXTENSION_ANCHOR_MAIN as bm, PAGE_EXTENSION_ANCHOR_SIDE_PANEL as bn, PLATFORM_ATTRIBUTE_NAMES as bo, PLATFORM_USER_ID as bp, type Page as bq, type PageActionIntent as br, type PageActionKind as bs, type PageActionMatch as bt, PageActionMatchSchema as bu, PageActionSchema as bv, type PageExtension as bw, type PageExtensionPlacement as bx, PageExtensionPlacementSchema as by, PageExtensionSchema as bz, ProteosClient as c, type LengthValue as c$, type UpdateEntityRequest as c0, type UpdateListExtensionRequest as c1, type UpdateListRequest as c2, type UpdateListViewRequest as c3, type UpdateMenuConfigurationExtensionRequest as c4, type UpdateMenuConfigurationRequest as c5, type UpdatePageExtensionRequest as c6, type UpdatePageRequest as c7, type UpdateVariableRequest as c8, UserRefSchema as c9, type AttributeMeta as cA, BUILT_IN_CONTROLS as cB, type BuiltInControlSlug as cC, CALENDAR_MAX_OVERLAY_USERS as cD, CALENDAR_VIEW_KINDS as cE, type CalendarElement as cF, type CalendarViewKind as cG, type CardElement as cH, type ColumnElement as cI, type CommonProps as cJ, type ComponentElement as cK, type ControlBucket as cL, type DatetimeAttributeMeta as cM, type DatetimeFormat as cN, type DividerElement as cO, type FieldElement as cP, FileAttributeMetaSchema as cQ, type LayoutAlign as cR, type LayoutElement as cS, LayoutElementSchema as cT, LayoutElementType as cU, type LayoutGap as cV, type LayoutJustify as cW, type LayoutStep as cX, LayoutStepSchema as cY, type LayoutTab as cZ, LayoutTabSchema as c_, type UserType as ca, type Variable as cb, VariableSchema as cc, type VariableService as cd, acceptsCurrentUserDefault as ce, allCurrencyCodes as cf, bundleVersionOf as cg, createIterator as ch, createListResultSchema as ci, currencyLabel as cj, currencySymbol as ck, currencySymbolSide as cl, formatAmount as cm, formatMoney as cn, isCurrentUser as co, isCurrentUserDefault as cp, isPlatformAttributeName as cq, localeNumberSeparators as cr, parseAmount as cs, parseContactAddressMeta as ct, parseCurrencyMeta as cu, parseFileMeta as cv, parseRelationMeta as cw, platformAttributes as cx, resolveOptions as cy, type AttributeForLookup as cz, type PrincipalRef as d, LengthValueSchema as d0, type ListElement as d1, type NumberAttributeMeta as d2, type ObjectAttributeMeta as d3, PAGE_BACKGROUND_COLOR_RE as d4, PAGE_BACKGROUND_TOKENS as d5, PAGE_HEADERS as d6, type PageBackgroundToken as d7, type PageHeader as d8, type PageLayoutSidePanel as d9, UserAttributeMetaSchema as dA, type WorkflowTriggerElement as dB, isBuiltInControl as dC, isLengthValue as dD, isPageBackground as dE, isReservedAttributeName as dF, isStyleSizeValue as dG, isTitleQueryable as dH, lookupCompatibleControls as dI, lookupControls as dJ, lookupPrimaryControl as dK, parsePrincipalMeta as dL, parseUserMeta as dM, titleTemplateVariables as dN, PageLayoutSidePanelSchema as da, type PageStyle as db, PageStyleSchema as dc, type PrincipalAttributeMeta as dd, type PrincipalType as de, RECORD_TITLE_FIELD as df, type RecordFilterElement as dg, type RelatedListElement as dh, type RelatedRecordElement as di, type ResponsiveSizing as dj, type RowElement as dk, type SchedulingPickerElement as dl, type SectionElement as dm, type SizeValue as dn, SizeValueSchema as dp, type SizingProps as dq, type StepperElement as dr, type StringAttributeMeta as ds, type StringFormat as dt, type StyleSizeValue as du, StyleSizeValueSchema as dv, type TabsElement as dw, type TextElement as dx, type TextVariant as dy, type UserAttributeMeta as dz, type PageAction as e, type PublicAccessOperation as f, type RequestOptions as g, type App as h, type AppConfiguration as i, AppConfigurationSchema as j, type AppConfigurationService as k, type AppHome as l, AppHomeSchema as m, type AppHomeType as n, AppSchema as o, type AppService as p, type ArrayAttributeMeta as q, type AttributeAccessRule as r, type AttributeRestrictions as s, AttributeSchema as t, type AttributeType as u, AuditFieldsSchema as v, CURRENT_USER_DEFAULT as w, type ClientOptions as x, type Column as y, ColumnSchema as z };
|
package/package.json
CHANGED
|
@@ -130,6 +130,9 @@ export const PLATFORM_ENTITIES: readonly PlatformEntity[] = [
|
|
|
130
130
|
{ slug: 'scheduling-links', name: 'Scheduling Links' },
|
|
131
131
|
{ slug: 'scheduling-profiles', name: 'Scheduling Profiles' },
|
|
132
132
|
{ slug: 'availability-constraints', name: 'Availability Constraints' },
|
|
133
|
+
// Discovery (discovery-service): what users send Proteos to show how they
|
|
134
|
+
// work — screenshots, recordings, written feedback. Mass noun, no plural.
|
|
135
|
+
{ slug: 'discovery-evidence', name: 'Discovery Evidence' },
|
|
133
136
|
] as const
|
|
134
137
|
|
|
135
138
|
/** Just the platform entity slugs, in canonical order. */
|
|
@@ -162,6 +165,10 @@ export const SCOPED_PLATFORM_ENTITY_SLUGS: readonly string[] = [
|
|
|
162
165
|
'connections',
|
|
163
166
|
'conversations',
|
|
164
167
|
'messages',
|
|
168
|
+
// discovery-service: evidence is owned by its creator; a caller holding no
|
|
169
|
+
// grant at all is treated as scoped (own rows), so every org member can
|
|
170
|
+
// send feedback and see what they sent.
|
|
171
|
+
'discovery-evidence',
|
|
165
172
|
]
|
|
166
173
|
|
|
167
174
|
/** True when `slug` belongs to a platform entity (reserved; can't be user-created). */
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import type { ProteosClient } from '../client.js'
|
|
2
|
+
import type {
|
|
3
|
+
CreateDiscoveryEvidenceRequest,
|
|
4
|
+
DiscoveryEvidence,
|
|
5
|
+
DiscoveryEvidenceDownloadUrl,
|
|
6
|
+
DiscoveryEvidenceOrgSummary,
|
|
7
|
+
ListDiscoveryEvidenceQuery,
|
|
8
|
+
ListPlatformDiscoveryEvidenceQuery,
|
|
9
|
+
ListResponse,
|
|
10
|
+
UpdateDiscoveryEvidenceRequest,
|
|
11
|
+
UpdateDiscoveryEvidenceStatusRequest,
|
|
12
|
+
} from './types.js'
|
|
13
|
+
|
|
14
|
+
export * from './types.js'
|
|
15
|
+
|
|
16
|
+
const DISCOVERY_BASE_PATH = '/discovery/v1'
|
|
17
|
+
|
|
18
|
+
const encode = encodeURIComponent
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Facade for discovery-service: the evidence users send Proteos (screenshots,
|
|
22
|
+
* screen recordings with ink-annotated frames, written feedback).
|
|
23
|
+
*
|
|
24
|
+
* `evidence` acts in the caller's org — own rows under a scoped grant, every
|
|
25
|
+
* row under the unscoped read. `platform` is the Proteos-side view across
|
|
26
|
+
* every org; it answers only to platform admins.
|
|
27
|
+
*
|
|
28
|
+
* ```ts
|
|
29
|
+
* const discovery = new DiscoveryClient(client)
|
|
30
|
+
* const sent = await discovery.evidence.create({ kind: 'feedback', category: 'idea', source: 'web', notes, context })
|
|
31
|
+
* const { data: mine } = await discovery.evidence.list()
|
|
32
|
+
* const { url } = await discovery.evidence.createDownloadUrl(sent.id, fileId)
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export class DiscoveryClient {
|
|
36
|
+
readonly evidence: DiscoveryEvidenceService
|
|
37
|
+
readonly platform: PlatformDiscoveryEvidenceService
|
|
38
|
+
|
|
39
|
+
constructor(client: ProteosClient) {
|
|
40
|
+
this.evidence = new DiscoveryEvidenceServiceImpl(client)
|
|
41
|
+
this.platform = new PlatformDiscoveryEvidenceServiceImpl(client)
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** The submitter's door: create, read back, edit the words, withdraw. */
|
|
46
|
+
export interface DiscoveryEvidenceService {
|
|
47
|
+
create(request: CreateDiscoveryEvidenceRequest): Promise<DiscoveryEvidence>
|
|
48
|
+
list(query?: ListDiscoveryEvidenceQuery): Promise<ListResponse<DiscoveryEvidence>>
|
|
49
|
+
/** The detail read; carries the frames. */
|
|
50
|
+
get(id: string): Promise<DiscoveryEvidence>
|
|
51
|
+
update(id: string, request: UpdateDiscoveryEvidenceRequest): Promise<DiscoveryEvidence>
|
|
52
|
+
/** Withdraws the evidence; its files are removed best-effort. */
|
|
53
|
+
delete(id: string): Promise<void>
|
|
54
|
+
/** Mints a presigned URL for one of the evidence's files (recording, frame image). */
|
|
55
|
+
createDownloadUrl(id: string, fileId: string): Promise<DiscoveryEvidenceDownloadUrl>
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** The Proteos-side view across orgs. Platform admins only. */
|
|
59
|
+
export interface PlatformDiscoveryEvidenceService {
|
|
60
|
+
list(query?: ListPlatformDiscoveryEvidenceQuery): Promise<ListResponse<DiscoveryEvidence>>
|
|
61
|
+
/** Per-org counts: how much evidence, how much still new, the newest arrival. */
|
|
62
|
+
summary(): Promise<DiscoveryEvidenceOrgSummary[]>
|
|
63
|
+
get(id: string): Promise<DiscoveryEvidence>
|
|
64
|
+
updateStatus(
|
|
65
|
+
id: string,
|
|
66
|
+
request: UpdateDiscoveryEvidenceStatusRequest,
|
|
67
|
+
): Promise<DiscoveryEvidence>
|
|
68
|
+
createDownloadUrl(id: string, fileId: string): Promise<DiscoveryEvidenceDownloadUrl>
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
class DiscoveryEvidenceServiceImpl implements DiscoveryEvidenceService {
|
|
72
|
+
constructor(private readonly client: ProteosClient) {}
|
|
73
|
+
|
|
74
|
+
create(request: CreateDiscoveryEvidenceRequest): Promise<DiscoveryEvidence> {
|
|
75
|
+
return this.client.request('POST', `${DISCOVERY_BASE_PATH}/evidence`, request)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
list(query: ListDiscoveryEvidenceQuery = {}): Promise<ListResponse<DiscoveryEvidence>> {
|
|
79
|
+
return this.client.requestWithQuery('GET', `${DISCOVERY_BASE_PATH}/evidence`, query)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
get(id: string): Promise<DiscoveryEvidence> {
|
|
83
|
+
return this.client.request('GET', `${DISCOVERY_BASE_PATH}/evidence/${encode(id)}`)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
update(id: string, request: UpdateDiscoveryEvidenceRequest): Promise<DiscoveryEvidence> {
|
|
87
|
+
return this.client.request('PATCH', `${DISCOVERY_BASE_PATH}/evidence/${encode(id)}`, request)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
async delete(id: string): Promise<void> {
|
|
91
|
+
await this.client.request('DELETE', `${DISCOVERY_BASE_PATH}/evidence/${encode(id)}`)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
createDownloadUrl(id: string, fileId: string): Promise<DiscoveryEvidenceDownloadUrl> {
|
|
95
|
+
return this.client.request(
|
|
96
|
+
'POST',
|
|
97
|
+
`${DISCOVERY_BASE_PATH}/evidence/${encode(id)}/files/${encode(fileId)}/download-url`,
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
class PlatformDiscoveryEvidenceServiceImpl implements PlatformDiscoveryEvidenceService {
|
|
103
|
+
constructor(private readonly client: ProteosClient) {}
|
|
104
|
+
|
|
105
|
+
list(query: ListPlatformDiscoveryEvidenceQuery = {}): Promise<ListResponse<DiscoveryEvidence>> {
|
|
106
|
+
return this.client.requestWithQuery('GET', `${DISCOVERY_BASE_PATH}/platform/evidence`, query)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
async summary(): Promise<DiscoveryEvidenceOrgSummary[]> {
|
|
110
|
+
const response = await this.client.request<{ data: DiscoveryEvidenceOrgSummary[] }>(
|
|
111
|
+
'GET',
|
|
112
|
+
`${DISCOVERY_BASE_PATH}/platform/evidence/summary`,
|
|
113
|
+
)
|
|
114
|
+
return response.data
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
get(id: string): Promise<DiscoveryEvidence> {
|
|
118
|
+
return this.client.request('GET', `${DISCOVERY_BASE_PATH}/platform/evidence/${encode(id)}`)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
updateStatus(
|
|
122
|
+
id: string,
|
|
123
|
+
request: UpdateDiscoveryEvidenceStatusRequest,
|
|
124
|
+
): Promise<DiscoveryEvidence> {
|
|
125
|
+
return this.client.request(
|
|
126
|
+
'PATCH',
|
|
127
|
+
`${DISCOVERY_BASE_PATH}/platform/evidence/${encode(id)}/status`,
|
|
128
|
+
request,
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
createDownloadUrl(id: string, fileId: string): Promise<DiscoveryEvidenceDownloadUrl> {
|
|
133
|
+
return this.client.request(
|
|
134
|
+
'POST',
|
|
135
|
+
`${DISCOVERY_BASE_PATH}/platform/evidence/${encode(id)}/files/${encode(fileId)}/download-url`,
|
|
136
|
+
)
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import type { ResponseMeta, UserRef } from '../types/common.js'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* discovery-service types — the evidence users send Proteos to show how they
|
|
5
|
+
* work: a screenshot with ink, a screen recording with ink-annotated frames,
|
|
6
|
+
* or written feedback. Evidence lives in the submitter's org; platform admins
|
|
7
|
+
* read it across orgs. Mirror of packages/go/model/discovery.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export type DiscoveryEvidenceKind = 'screenshot' | 'recording' | 'feedback'
|
|
11
|
+
export type DiscoveryEvidenceCategory = 'bug' | 'idea' | 'question' | 'praise' | 'other'
|
|
12
|
+
export type DiscoveryEvidenceStatus = 'new' | 'reviewed' | 'archived'
|
|
13
|
+
export type DiscoveryEvidenceSource = 'web' | 'extension'
|
|
14
|
+
|
|
15
|
+
/** What the client knew when it captured: where the user was and on what. */
|
|
16
|
+
export interface DiscoveryEvidenceContext {
|
|
17
|
+
url: string
|
|
18
|
+
path: string
|
|
19
|
+
page_title: string
|
|
20
|
+
app_version: string
|
|
21
|
+
extension_version: string
|
|
22
|
+
user_agent: string
|
|
23
|
+
viewport_width: number
|
|
24
|
+
viewport_height: number
|
|
25
|
+
device_pixel_ratio: number
|
|
26
|
+
locale: string
|
|
27
|
+
timezone: string
|
|
28
|
+
/** Web only — lets the admin hub deep-link to the PostHog session replay. */
|
|
29
|
+
posthog_session_id: string
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** A URL the user attached — a Loom share link, a document, a ticket. */
|
|
33
|
+
export interface DiscoveryEvidenceLink {
|
|
34
|
+
url: string
|
|
35
|
+
title: string
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** One point of a stroke: normalized 0..1 on both axes, `t` ms since recording start. */
|
|
39
|
+
export interface InkPoint {
|
|
40
|
+
x: number
|
|
41
|
+
y: number
|
|
42
|
+
t: number
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** One pen-down → pen-up gesture. */
|
|
46
|
+
export interface InkStroke {
|
|
47
|
+
id: string
|
|
48
|
+
started_at_ms: number
|
|
49
|
+
ended_at_ms: number
|
|
50
|
+
color: string
|
|
51
|
+
width: number
|
|
52
|
+
points: InkPoint[]
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* One annotated still: the image at `at_ms` (0 for a screenshot), the ink
|
|
57
|
+
* drawn on it, and the comment the user added at review time.
|
|
58
|
+
*/
|
|
59
|
+
export interface DiscoveryEvidenceFrame {
|
|
60
|
+
id: string
|
|
61
|
+
position: number
|
|
62
|
+
at_ms: number
|
|
63
|
+
image_file_id: string
|
|
64
|
+
/** The composite with the ink burned in; empty when the client did not render one. */
|
|
65
|
+
annotated_image_file_id: string
|
|
66
|
+
comment: string
|
|
67
|
+
strokes: InkStroke[]
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface DiscoveryEvidence {
|
|
71
|
+
id: string
|
|
72
|
+
org_id: string
|
|
73
|
+
kind: DiscoveryEvidenceKind
|
|
74
|
+
category: DiscoveryEvidenceCategory
|
|
75
|
+
title: string
|
|
76
|
+
notes: string
|
|
77
|
+
status: DiscoveryEvidenceStatus
|
|
78
|
+
source: DiscoveryEvidenceSource
|
|
79
|
+
context: DiscoveryEvidenceContext
|
|
80
|
+
recording_file_id: string
|
|
81
|
+
/** Client wall clock; the authoritative timeline length for playback. */
|
|
82
|
+
recording_duration_ms: number
|
|
83
|
+
recording_mime_type: string
|
|
84
|
+
recording_size_bytes: number
|
|
85
|
+
has_audio: boolean
|
|
86
|
+
frame_count: number
|
|
87
|
+
links: DiscoveryEvidenceLink[]
|
|
88
|
+
/** Present on the detail read only; lists omit frames. */
|
|
89
|
+
frames?: DiscoveryEvidenceFrame[]
|
|
90
|
+
reviewed_at?: string
|
|
91
|
+
reviewed_by?: UserRef
|
|
92
|
+
created_at: string
|
|
93
|
+
created_by: UserRef
|
|
94
|
+
updated_at: string
|
|
95
|
+
updated_by: UserRef
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface CreateDiscoveryEvidenceLinkRequest {
|
|
99
|
+
url: string
|
|
100
|
+
title?: string
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface CreateDiscoveryEvidenceStrokeRequest {
|
|
104
|
+
/** The client's stroke id when it has one; the server mints one otherwise. */
|
|
105
|
+
id?: string
|
|
106
|
+
started_at_ms: number
|
|
107
|
+
ended_at_ms: number
|
|
108
|
+
color: string
|
|
109
|
+
width: number
|
|
110
|
+
points: InkPoint[]
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** One annotated still; `position` is assigned by the server from array order. */
|
|
114
|
+
export interface CreateDiscoveryEvidenceFrameRequest {
|
|
115
|
+
at_ms: number
|
|
116
|
+
image_file_id: string
|
|
117
|
+
annotated_image_file_id?: string
|
|
118
|
+
comment?: string
|
|
119
|
+
strokes: CreateDiscoveryEvidenceStrokeRequest[]
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Creates one piece of evidence. Every file was already uploaded to
|
|
124
|
+
* storage-service under the caller's own token; the request carries file ids.
|
|
125
|
+
* Shape rules per kind: a screenshot has exactly one frame at 0 and no
|
|
126
|
+
* recording; a recording has a recording file and frames within its duration;
|
|
127
|
+
* feedback has neither and non-blank notes.
|
|
128
|
+
*/
|
|
129
|
+
export interface CreateDiscoveryEvidenceRequest {
|
|
130
|
+
kind: DiscoveryEvidenceKind
|
|
131
|
+
category: DiscoveryEvidenceCategory
|
|
132
|
+
title?: string
|
|
133
|
+
notes?: string
|
|
134
|
+
source: DiscoveryEvidenceSource
|
|
135
|
+
context: DiscoveryEvidenceContext
|
|
136
|
+
recording_file_id?: string
|
|
137
|
+
recording_duration_ms?: number
|
|
138
|
+
recording_mime_type?: string
|
|
139
|
+
recording_size_bytes?: number
|
|
140
|
+
has_audio?: boolean
|
|
141
|
+
links?: CreateDiscoveryEvidenceLinkRequest[]
|
|
142
|
+
frames?: CreateDiscoveryEvidenceFrameRequest[]
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface UpdateDiscoveryEvidenceFrameRequest {
|
|
146
|
+
id: string
|
|
147
|
+
comment: string
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/** The submitter's partial edit: the words, never the capture. */
|
|
151
|
+
export interface UpdateDiscoveryEvidenceRequest {
|
|
152
|
+
title?: string
|
|
153
|
+
notes?: string
|
|
154
|
+
category?: DiscoveryEvidenceCategory
|
|
155
|
+
links?: CreateDiscoveryEvidenceLinkRequest[]
|
|
156
|
+
/** Patches comments by frame id. */
|
|
157
|
+
frames?: UpdateDiscoveryEvidenceFrameRequest[]
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface UpdateDiscoveryEvidenceStatusRequest {
|
|
161
|
+
status: DiscoveryEvidenceStatus
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export interface ListDiscoveryEvidenceQuery {
|
|
165
|
+
kind?: DiscoveryEvidenceKind
|
|
166
|
+
category?: DiscoveryEvidenceCategory
|
|
167
|
+
status?: DiscoveryEvidenceStatus
|
|
168
|
+
source?: DiscoveryEvidenceSource
|
|
169
|
+
page?: number
|
|
170
|
+
page_size?: number
|
|
171
|
+
sort_by?: string
|
|
172
|
+
sort_direction?: 'asc' | 'desc'
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/** The cross-org listing for platform admins. */
|
|
176
|
+
export interface ListPlatformDiscoveryEvidenceQuery extends ListDiscoveryEvidenceQuery {
|
|
177
|
+
org_id?: string
|
|
178
|
+
/** RFC 3339. */
|
|
179
|
+
created_from?: string
|
|
180
|
+
/** RFC 3339. */
|
|
181
|
+
created_to?: string
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export interface DiscoveryEvidenceOrgSummary {
|
|
185
|
+
org_id: string
|
|
186
|
+
count: number
|
|
187
|
+
new_count: number
|
|
188
|
+
newest_at?: string
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/** A presigned storage-service URL the browser fetches directly. */
|
|
192
|
+
export interface DiscoveryEvidenceDownloadUrl {
|
|
193
|
+
url: string
|
|
194
|
+
expires_at: string
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface ListResponse<T> {
|
|
198
|
+
meta: ResponseMeta
|
|
199
|
+
data: T[]
|
|
200
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -582,6 +582,34 @@ export {
|
|
|
582
582
|
BatchUpsertTransactionSchema,
|
|
583
583
|
DataClient,
|
|
584
584
|
} from './data/index.js'
|
|
585
|
+
// Discovery types (discovery-service: the evidence users send Proteos —
|
|
586
|
+
// screenshots, recordings with ink-annotated frames, written feedback)
|
|
587
|
+
export type {
|
|
588
|
+
CreateDiscoveryEvidenceFrameRequest,
|
|
589
|
+
CreateDiscoveryEvidenceLinkRequest,
|
|
590
|
+
CreateDiscoveryEvidenceRequest,
|
|
591
|
+
CreateDiscoveryEvidenceStrokeRequest,
|
|
592
|
+
DiscoveryEvidence,
|
|
593
|
+
DiscoveryEvidenceCategory,
|
|
594
|
+
DiscoveryEvidenceContext,
|
|
595
|
+
DiscoveryEvidenceDownloadUrl,
|
|
596
|
+
DiscoveryEvidenceFrame,
|
|
597
|
+
DiscoveryEvidenceKind,
|
|
598
|
+
DiscoveryEvidenceLink,
|
|
599
|
+
DiscoveryEvidenceOrgSummary,
|
|
600
|
+
DiscoveryEvidenceService,
|
|
601
|
+
DiscoveryEvidenceSource,
|
|
602
|
+
DiscoveryEvidenceStatus,
|
|
603
|
+
InkPoint,
|
|
604
|
+
InkStroke,
|
|
605
|
+
ListDiscoveryEvidenceQuery,
|
|
606
|
+
ListPlatformDiscoveryEvidenceQuery,
|
|
607
|
+
PlatformDiscoveryEvidenceService,
|
|
608
|
+
UpdateDiscoveryEvidenceFrameRequest,
|
|
609
|
+
UpdateDiscoveryEvidenceRequest,
|
|
610
|
+
UpdateDiscoveryEvidenceStatusRequest,
|
|
611
|
+
} from './discovery/index.js'
|
|
612
|
+
export { DiscoveryClient } from './discovery/index.js'
|
|
585
613
|
export type { ApiErrorResponse, ErrorCodeType } from './errors.js'
|
|
586
614
|
// Error handling
|
|
587
615
|
export {
|
package/src/storage/files.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ProteosClient } from '../client.js'
|
|
2
2
|
import type { PublicAccessOperation } from '../meta/types.js'
|
|
3
|
+
import type { RequestOptions } from '../types/options.js'
|
|
3
4
|
import type {
|
|
4
5
|
CreateFileMetadata,
|
|
5
6
|
FileVersionContent,
|
|
@@ -105,7 +106,7 @@ export interface FileService {
|
|
|
105
106
|
* Downloads the file's current version as a Blob (authenticated). Prefer
|
|
106
107
|
* {@link FileService.createDownloadUrl} for browser click-to-download.
|
|
107
108
|
*/
|
|
108
|
-
download(id: string): Promise<Blob>
|
|
109
|
+
download(id: string, options?: RequestOptions): Promise<Blob>
|
|
109
110
|
|
|
110
111
|
/**
|
|
111
112
|
* Downloads the current version of a public-read file through the
|
|
@@ -253,8 +254,17 @@ export class FileServiceImpl implements FileService {
|
|
|
253
254
|
return response.data
|
|
254
255
|
}
|
|
255
256
|
|
|
256
|
-
|
|
257
|
-
|
|
257
|
+
/**
|
|
258
|
+
* The file's bytes. `options.timeout` covers reading the whole body, so raise
|
|
259
|
+
* it for large files; `options.signal` aborts the download.
|
|
260
|
+
*/
|
|
261
|
+
async download(id: string, options?: RequestOptions): Promise<Blob> {
|
|
262
|
+
const { response } = await this.client.requestRaw(
|
|
263
|
+
'GET',
|
|
264
|
+
`${FILES_BASE_PATH}/${id}/download`,
|
|
265
|
+
undefined,
|
|
266
|
+
options,
|
|
267
|
+
)
|
|
258
268
|
return await response.blob()
|
|
259
269
|
}
|
|
260
270
|
|