spitfirepm
Version:
Client API Tools for Spitfire Project Management
117 lines (116 loc) • 3.8 kB
TypeScript
declare global {
interface String {
sfFormat(this: string, ...words: any[]): string;
sfReplaceHashValues(this: string, data: {
[key: string]: any;
}): string;
replaceAll(this: string, pattern: string, replacement: string): string;
sfHashCode(this: string): number;
sfIsGuid(this: string): boolean;
sfStartsWithCI(this: string, testString: string): boolean;
sfIsNumeric(this: string): boolean;
}
interface Date {
addDays(this: Date, d: number): Date;
diffDays(this: Date, firstDate: Date | string, secondDate: Date | string): number;
isDate(this: Date, d?: Date | string): boolean;
isMidnight(this: Date): boolean;
isSameDay(this: Date, d: Date): boolean;
oneDay(this: Date): number;
/** returns hh:mm:ss.tt */
toSFLogTimeString(this: Date): string;
}
interface Window {
__doPostBack(eventTarget: string, eventArgument: string | undefined): void;
__sfPostBackTargetForm(): HTMLFormElement | undefined;
__hasPostBackTarget(): boolean;
/** Returns the portion of the URL after the hostname (and optional port). For example https://your.server.com:8080/alpha/beta return alpha */
__HTTPApplicationName(): string;
}
}
export interface String {
}
export declare const sfProcessDTKMap: {
ARInvoice: string;
ARPayments: string;
BFABypass: string;
Budget: string;
ChangeItemRegister: string;
ChargeEntry: string;
Checklist: string;
ComplianceSummary: string;
Correspondence: string;
Customer: string;
CustomerBid: string;
CustomerChangeOrder: string;
CustomerInvAdj: string;
CustomerPayApplication: string;
CustomerProposedCO: string;
CustomerSubmittalPkg: string;
DailyFieldReport: string;
Drawings: string;
Empty: string;
Employee: string;
Estimate: string;
ExpenseEntry: string;
FileBatch: string;
FileRouter: string;
Forecast: string;
Inspections: string;
InvitationtoBid: string;
InvoiceUpload: string;
Issue: string;
LEED: string;
LienWaiver: string;
MaintenanceSchedule: string;
MeetingMinutes: string;
Milestone: string;
Notification: string;
PeriodDistribution: string;
Permits: string;
POExpediting: string;
PrimeContract: string;
ProductionUnits: string;
ProjectDashboardPhoto: string;
ProjectSetup: string;
ProjectSetupInfo: string;
PunchList: string;
RFI: string;
SafetyCompliance: string;
SafetyIncident: string;
ScanTC: string;
Schedule: string;
ServiceTicket: string;
SitePhoto: string;
SubmittalItemRegister: string;
SvcContract: string;
Task: string;
TeamMessage: string;
TimeBatch: string;
TimeEntry: string;
Transmittal: string;
UserAccount: string;
Vendor: string;
VendorBidPkg: string;
VendorBidPkgAddendum: string;
VendorCCO: string;
VendorCommitment: string;
VendorComplianceNotification: string;
VendorNotification: string;
VendorPayRequest: string;
VendorReceipt: string;
VendorRFQ: string;
VendorSubmittal: string;
VendorVouchers: string;
Warranty: string;
WorkOrder: string;
WorkPosted: string;
};
export declare let sfApplicationNamePart: string;
export declare let sfApplicationRootPath: string;
/**
* Overrides default inferred from window.location
* @param hostNamePortAppl newtown.spitfirepm.com:8443/sfDev
* @description DOES NOT HELP until the path meets CORS restrictions!!
*/
export declare function setRuntimeAPIPath(hostNamePortAppl: string): string;