spitfirepm 23.9700.8 → 23.9700.10

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/README.md CHANGED
@@ -25,6 +25,8 @@ apiResult.then( (a) => {
25
25
  ### Change Log
26
26
 
27
27
  ```
28
+ 23.9700.10 - QueryCatalog and improve Attachment and Contact endpoints
29
+ 23.9700.9 - QueryCatalog and improve Attachment and Contact endpoints
28
30
  23.9700.8 - Improved ContactClient endpoints
29
31
  23.9700.7 - GetDV method clarifications
30
32
  23.9700.6 - Audit History Model enhanced
@@ -1373,6 +1373,21 @@ export declare class ConfigClient extends APIClientBase {
1373
1373
  private getManageToolsWithCallbacks;
1374
1374
  private processGetManageToolsWithCallbacks;
1375
1375
  protected processGetManageTools(xhr: any): MenuAction[] | null | null;
1376
+ /**
1377
+ * Returns the dynamic queries this site defines, each with its parameters
1378
+ */
1379
+ getQueries(): Promise<QueryDefinition[] | null>;
1380
+ private getQueriesWithCallbacks;
1381
+ private processGetQueriesWithCallbacks;
1382
+ protected processGetQueries(xhr: any): QueryDefinition[] | null | null;
1383
+ /**
1384
+ * Returns one dynamic query definition with its parameters
1385
+ * @param queryName Query name, e.g. qUserActivitySummary
1386
+ */
1387
+ getQuery(queryName: string | null): Promise<QueryDefinition | null>;
1388
+ private getQueryWithCallbacks;
1389
+ private processGetQueryWithCallbacks;
1390
+ protected processGetQuery(xhr: any): QueryDefinition | null | null;
1376
1391
  /**
1377
1392
  * Returns the list of regions
1378
1393
  */
@@ -1618,6 +1633,50 @@ export declare class ContactClient extends APIClientBase {
1618
1633
  private updateContactWithCallbacks;
1619
1634
  private processUpdateContactWithCallbacks;
1620
1635
  protected processUpdateContact(xhr: any): any | null;
1636
+ /**
1637
+ * Deletes a contact that nothing references
1638
+ * @param id Contact Key
1639
+ */
1640
+ deleteContact(id: string): Promise<any>;
1641
+ private deleteContactWithCallbacks;
1642
+ private processDeleteContactWithCallbacks;
1643
+ protected processDeleteContact(xhr: any): any | null;
1644
+ /**
1645
+ * Turns inbound peer-system sync for a mapped contact on or off
1646
+ * @param id Contact Key
1647
+ * @param enabled True to accept inbound updates
1648
+ */
1649
+ setInboundSync(id: string, enabled: boolean): Promise<boolean>;
1650
+ private setInboundSyncWithCallbacks;
1651
+ private processSetInboundSyncWithCallbacks;
1652
+ protected processSetInboundSync(xhr: any): boolean | null;
1653
+ /**
1654
+ * Merges one contact into another and removes the merged (junk) contact
1655
+ * @param id Contact to keep
1656
+ * @param junkId Contact to merge away
1657
+ */
1658
+ mergeContacts(id: string, junkId: string): Promise<any>;
1659
+ private mergeContactsWithCallbacks;
1660
+ private processMergeContactsWithCallbacks;
1661
+ protected processMergeContacts(xhr: any): any | null;
1662
+ /**
1663
+ * Moves a contact (junkId) into the company of contact id
1664
+ * @param id Contact whose company is the destination
1665
+ * @param junkId Contact to move
1666
+ */
1667
+ moveContact(id: string, junkId: string): Promise<any>;
1668
+ private moveContactWithCallbacks;
1669
+ private processMoveContactWithCallbacks;
1670
+ protected processMoveContact(xhr: any): any | null;
1671
+ /**
1672
+ * Copies role memberships the target does not already have from another contact
1673
+ * @param id Contact receiving the memberships
1674
+ * @param sourceId Contact to copy them from
1675
+ */
1676
+ copyRoles(id: string, sourceId: string): Promise<ContactRolesCopyResult | null>;
1677
+ private copyRolesWithCallbacks;
1678
+ private processCopyRolesWithCallbacks;
1679
+ protected processCopyRoles(xhr: any): ContactRolesCopyResult | null | null;
1621
1680
  /**
1622
1681
  * Returns contacts that match filters
1623
1682
  * @param usingFilters Search Criteria
@@ -1751,15 +1810,6 @@ export declare class DocumentToolsClient extends APIClientBase {
1751
1810
  private patchDocAddressWithCallbacks;
1752
1811
  private processPatchDocAddressWithCallbacks;
1753
1812
  protected processPatchDocAddress(xhr: any): string | null;
1754
- /**
1755
- * Inserts an attachment on the specified document, optionally from a template
1756
- * @param id Document Key
1757
- * @param newData New attachment data. To copy a template use DocKey:TemplateKey
1758
- */
1759
- addDocAttachments(id: string, newData: DocAttachment[]): Promise<DocAttachment | null>;
1760
- private addDocAttachmentsWithCallbacks;
1761
- private processAddDocAttachmentsWithCallbacks;
1762
- protected processAddDocAttachments(xhr: any): DocAttachment | null | null;
1763
1813
  /**
1764
1814
  * Returns the attachments for the specified document
1765
1815
  * @param id Document Key
@@ -1789,6 +1839,15 @@ export declare class DocumentToolsClient extends APIClientBase {
1789
1839
  private updateDocAttachmentsWithCallbacks;
1790
1840
  private processUpdateDocAttachmentsWithCallbacks;
1791
1841
  protected processUpdateDocAttachments(xhr: any): string | null;
1842
+ /**
1843
+ * Inserts an attachment on the specified document, optionally from a template
1844
+ * @param id Document Key
1845
+ * @param newData New attachment data. To copy a template use DocKey:TemplateKey
1846
+ */
1847
+ addDocAttachments(id: string, newData: DocAttachment[]): Promise<DocAttachment | null>;
1848
+ private addDocAttachmentsWithCallbacks;
1849
+ private processAddDocAttachmentsWithCallbacks;
1850
+ protected processAddDocAttachments(xhr: any): DocAttachment | null | null;
1792
1851
  /**
1793
1852
  * Creates a PDF from the Assembled Attachments specified on this document; returns a task key
1794
1853
  * @param id Document Key
@@ -2038,6 +2097,16 @@ export declare class DocumentToolsClient extends APIClientBase {
2038
2097
  private addDocDateWithCallbacks;
2039
2098
  private processAddDocDateWithCallbacks;
2040
2099
  protected processAddDocDate(xhr: any): DocDate | null | null;
2100
+ /**
2101
+ * Updates the dates on the specified document
2102
+ * @param id Document Key
2103
+ * @param updatedData Replacement date data
2104
+ * @return Specified dates not found
2105
+ */
2106
+ updateDocDates(id: string, updatedData: DocDate): Promise<string>;
2107
+ private updateDocDatesWithCallbacks;
2108
+ private processUpdateDocDatesWithCallbacks;
2109
+ protected processUpdateDocDates(xhr: any): string | null;
2041
2110
  /**
2042
2111
  * Returns the dates for the specified document
2043
2112
  * @param id Document Key
@@ -2056,16 +2125,6 @@ export declare class DocumentToolsClient extends APIClientBase {
2056
2125
  private deleteDocDatesWithCallbacks;
2057
2126
  private processDeleteDocDatesWithCallbacks;
2058
2127
  protected processDeleteDocDates(xhr: any): string | null;
2059
- /**
2060
- * Updates the dates on the specified document
2061
- * @param id Document Key
2062
- * @param updatedData Replacement date data
2063
- * @return Specified dates not found
2064
- */
2065
- updateDocDates(id: string, updatedData: DocDate): Promise<string>;
2066
- private updateDocDatesWithCallbacks;
2067
- private processUpdateDocDatesWithCallbacks;
2068
- protected processUpdateDocDates(xhr: any): string | null;
2069
2128
  /**
2070
2129
  * Information about actions for the specified document
2071
2130
  * @param id Document Key
@@ -4661,29 +4720,49 @@ export interface ContactFilters {
4661
4720
  CSIListLike?: string | undefined;
4662
4721
  /** Phone Like (matches any phone number) */
4663
4722
  PhoneLike?: string | undefined;
4664
- /** When true, result is limited to */
4723
+ /** When true, result is limited to contacts who can log in to sfPMS (sfUser=1).
4724
+ These six flags COMBINE WITH AND, not OR - see the remarks on this class. */
4665
4725
  Users?: boolean;
4666
- /** When true, result is limited to */
4726
+ /** When true, result is limited to customer contacts (ContactType='C'). */
4667
4727
  Customers?: boolean;
4668
- /** When true, result is limited to */
4728
+ /** When true, result is limited to employees (ContactType='E'). */
4669
4729
  Employee?: boolean;
4670
- /** When true, result is limited to */
4730
+ /** When true, result is limited to public contacts (IsPublic=1). Rare. */
4671
4731
  Public?: boolean;
4672
- /** When true, result is limited to primary company contacts */
4732
+ /** When true, result is limited to primary company contacts - the company itself
4733
+ rather than a person at it (xsfContactCompany.PrimaryContactKey). */
4673
4734
  Company?: boolean;
4674
- /** When true, result is limited to */
4735
+ /** When true, result is limited to vendor contacts (ContactType='V', or any contact
4736
+ carrying a VendorID). */
4675
4737
  Vendors?: boolean;
4676
- /** 1==Active;0==Inactive; 2==Both */
4677
- ContactState?: number;
4738
+ /** 1==Active; 0==Inactive; 2==Both. Omit (null) for active only.
4739
+ Null and 1 are the same thing. The nullability exists because this is a
4740
+ short: before it was nullable a caller who simply left the field out sent 0 and
4741
+ silently got INACTIVE contacts, which is nobody's intent. Callers that already send an
4742
+ explicit 0, 1 or 2 are unaffected. */
4743
+ ContactState?: number | undefined;
4678
4744
  /** UCRole Key, or use 00000000-0000-0000-0000-000000000000 for unspecified */
4679
4745
  RoleKey?: string | undefined;
4680
4746
  /** Use 00000000-0000-0000-0000-000000000000 for unspecified */
4681
4747
  UserKey?: string | undefined;
4682
- /** Default 2000-01-01 */
4748
+ /** Earliest LastLogin to include. Omit for no lower bound.
4749
+ THIS IS A LOGIN-DATE FILTER, and supplying either bound therefore limits the
4750
+ result to contacts who have signed in at least once - which in practice means system
4751
+ users, since only they have a LastLogin at all. Contacts that have NEVER logged in
4752
+ have no LastLogin and so satisfy no range; if "never signed in" is part of the question,
4753
+ ask for it without a date bound and look for a null LastLogin on the rows. */
4683
4754
  FromDate?: Date | undefined;
4684
- /** Default today */
4755
+ /** Latest LastLogin to include. Omit for no upper bound.
4756
+ Inclusive. A date with no time component covers the whole of that day, so
4757
+ ThruDate 2026-02-04 includes a login at 2026-02-04 16:20. See FromDate
4758
+ for what a login-date bound does to the result set. */
4685
4759
  ThruDate?: Date | undefined;
4686
4760
  }
4761
+ export interface ContactRolesCopyResult {
4762
+ Found?: number;
4763
+ Copied?: number;
4764
+ SourceName?: string | undefined;
4765
+ }
4687
4766
  /** Summary information about a contact */
4688
4767
  export interface ContactSummary {
4689
4768
  /** Link to user/contact */
@@ -4710,8 +4789,14 @@ export interface ContactSummary {
4710
4789
  Company?: string | undefined;
4711
4790
  /** For Vendors, indicate related CSI */
4712
4791
  CSIList?: string | undefined;
4713
- /** Readonly. Specifies when this user last logged in. Kept for inactive and former users. */
4714
- LastLogin?: Date;
4792
+ /** Readonly. Specifies when this user last logged in. Kept for inactive and former users.
4793
+ NULL means never signed in, and that is a different fact from "signed in a long
4794
+ time ago" - for a seat-licensing question it is usually the more actionable one.
4795
+ Nullable for exactly that reason: as a plain DateTime a never-logged-in contact
4796
+ serialises as 0001-01-01, which reads like a date and buckets like an ancient login.
4797
+ Matches Contact.LastLogin, which is already nullable.
4798
+ Only contacts who can log in (sfUser=1) ever carry a value here. */
4799
+ LastLogin?: Date | undefined;
4715
4800
  /** When false, this row is ignored and ineffective */
4716
4801
  Active?: boolean;
4717
4802
  /** When true, there are no references to this contact */
@@ -8098,6 +8183,57 @@ export interface ProjKPIFact {
8098
8183
  /** UI CFG Item Name */
8099
8184
  ItemName?: string | undefined;
8100
8185
  }
8186
+ /** Describes one dynamic query a site can run - what it answers, what it needs, and who may see it. This is the catalog entry for a query executed through api/query/{queryName}/{dataContext}. */
8187
+ export interface QueryDefinition {
8188
+ /** Name of the query, unique within the rule, and the value passed to api/query. By
8189
+ convention these begin with a lower case q */
8190
+ QueryName: string;
8191
+ /** Document type this definition applies to, or null when it applies everywhere. A site
8192
+ may define the same query name differently per document type */
8193
+ DocTypeKey?: string | undefined;
8194
+ /** Caller-facing description of what this query answers. Carries more weight than the
8195
+ name when choosing between candidates, and is the only prose a caller gets */
8196
+ Purpose?: string | undefined;
8197
+ /** Agent when safe to expose to an external or AI caller; Internal otherwise. Null is
8198
+ unclassified and is treated as Internal, so an unreviewed entry is never exposed.
8199
+ Same vocabulary and the same fail-closed rule as LookupResult.Audience */
8200
+ Audience?: string | undefined;
8201
+ /** The TSQL this query runs, normally a thin EXEC wrapper over a stored procedure.
8202
+ Returned only to a caller entitled to administer the rule; blank otherwise, because
8203
+ this is an execution recipe rather than a description */
8204
+ Alias?: string | undefined;
8205
+ /** Adjustment to the command timeout: a positive value adds that many seconds, a negative
8206
+ value multiplies by its magnitude, and -1 means leave the connection default alone */
8207
+ TimeoutAdjust?: number;
8208
+ /** Role the caller must hold to run this query, or null when unrestricted. Enforced by
8209
+ the engine, which answers with a single explanatory Message row rather than an error
8210
+ when the caller does not hold it */
8211
+ RequiredRole?: string | undefined;
8212
+ /** True when this definition is one Spitfire distributes. A site may override any facet
8213
+ with its own row, which takes precedence - so a distributed definition is a default,
8214
+ not a guarantee of what will run */
8215
+ IsDistributed?: boolean;
8216
+ /** True when the resolved definition includes at least one row the site supplied itself.
8217
+ Worth surfacing: it is the difference between what we shipped and what will run */
8218
+ IsOverridden?: boolean;
8219
+ /** Number of caller-supplied parameters this query expects. Derived from the QPList */
8220
+ DependsCount?: number | undefined;
8221
+ /** True when the query's text references @pDocMasterKey, @pDocTypeKey or @pProject
8222
+ respectively, so a caller knows what document context to supply. A hint derived by
8223
+ inspecting the text, not a contract - a commented-out reference counts */
8224
+ UsesDocMasterKey?: boolean;
8225
+ /** See UsesDocMasterKey */
8226
+ UsesDocTypeKey?: boolean;
8227
+ /** See UsesDocMasterKey */
8228
+ UsesProject?: boolean;
8229
+ /** Caller-supplied parameters, in DependsOn order. Never null; a query taking none has
8230
+ an empty array */
8231
+ Parameters?: QueryParameter[] | undefined;
8232
+ /** Collection of commands for this row */
8233
+ MenuCommands?: MenuAction[] | undefined;
8234
+ /** eTag */
8235
+ ETag?: string | undefined;
8236
+ }
8101
8237
  /** Various common filters - not every filter is supported by every query */
8102
8238
  export interface QueryFilters {
8103
8239
  /** Project Mask (eg GC%) */
@@ -8163,6 +8299,46 @@ export interface QueryFilters {
8163
8299
  /** Key Value pairs of Keys and ETags, applicable to change/diffgram endpoints */
8164
8300
  ClientDataSummary?: CurrentDataSummary[] | undefined;
8165
8301
  }
8302
+ /** Describes one caller-supplied parameter of a dynamic query: what it means, what type of value belongs there, and where it lands in the DependsOn array. */
8303
+ export interface QueryParameter {
8304
+ /** Query this parameter belongs to, matching QueryDefinition.QueryName */
8305
+ QueryName: string;
8306
+ /** SQL parameter name including the @, exactly as it appears in the query's QPList - or,
8307
+ for a context parameter, the engine slot it describes such as @pDocMasterKey */
8308
+ ParameterName: string;
8309
+ /** True where the engine binds this parameter from the REQUEST rather than from DependsOn:
8310
+ @pDocMasterKey, @pProject and @pDocTypeKey are supplied as context, not by position */
8311
+ IsContext?: boolean;
8312
+ /** Zero-based position in the DependsOn array, taken from this parameter's position in the
8313
+ QPList. The engine maps DependsOn positionally, so this is the number a caller needs.
8314
+ Null when IsContext is set, because a context parameter has no
8315
+ position - it is nullable precisely so that a consumer cannot read a meaningful zero
8316
+ where there is no index at all */
8317
+ DependsIndex?: number | undefined;
8318
+ /** What this parameter means to a caller, for example As Of Date or Project ID */
8319
+ Label?: string | undefined;
8320
+ /** Semantic type of the value, for example DATE, GUID or STRING. Advisory only - every
8321
+ parameter is bound as a VarChar regardless, so the query itself must convert */
8322
+ PVType?: string | undefined;
8323
+ /** False where the query tolerates a blank here. Note that an omitted parameter arrives
8324
+ as an empty string rather than NULL, so a query that wants NULL must say so itself */
8325
+ IsRequired?: boolean;
8326
+ /** A concrete sample value; grounds a caller better than the type name alone. Dates
8327
+ should be given in ISO form, since the bound value is interpreted by SQL Server and a
8328
+ day/month ordering depends on the session */
8329
+ ExampleValue?: string | undefined;
8330
+ /** Name of the Lookup that produces a valid value for this parameter, letting a caller
8331
+ chain rather than guess. A soft reference by name, so it may not resolve */
8332
+ SourceLookup?: string | undefined;
8333
+ /** Free-text caveats about this parameter */
8334
+ Notes?: string | undefined;
8335
+ /** Flag */
8336
+ Active?: boolean;
8337
+ /** Collection of commands for this row */
8338
+ MenuCommands?: MenuAction[] | undefined;
8339
+ /** eTag */
8340
+ ETag?: string | undefined;
8341
+ }
8166
8342
  export interface RangeConditionHeaderValue {
8167
8343
  Date?: Date | undefined;
8168
8344
  EntityTag?: EntityTagHeaderValue | undefined;