路泰科技体检小程序UI设计新版本
qx
2025-08-06 fe97f78b9a343ee9fa45a3531d03d73dcd1df31b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
import Dispatcher from './dispatcher'
 
declare namespace MockCallHistoryLog {
  /** request's configuration properties */
  export type MockCallHistoryLogProperties = 'protocol' | 'host' | 'port' | 'origin' | 'path' | 'hash' | 'fullUrl' | 'method' | 'searchParams' | 'body' | 'headers'
}
 
/** a log reflecting request configuration  */
declare class MockCallHistoryLog {
  constructor (requestInit: Dispatcher.DispatchOptions)
  /** protocol used. ie. 'https:' or 'http:' etc... */
  protocol: string
  /** request's host. */
  host: string
  /** request's port. */
  port: string
  /** request's origin. ie. https://localhost:3000. */
  origin: string
  /** path. never contains searchParams. */
  path: string
  /** request's hash. */
  hash: string
  /** the full url requested. */
  fullUrl: string
  /** request's method. */
  method: string
  /** search params. */
  searchParams: Record<string, string>
  /** request's body */
  body: string | null | undefined
  /** request's headers */
  headers: Record<string, string | string[]> | null | undefined
 
  /** returns an Map of property / value pair */
  toMap (): Map<MockCallHistoryLog.MockCallHistoryLogProperties, string | Record<string, string | string[]> | null | undefined>
 
  /** returns a string computed with all key value pair */
  toString (): string
}
 
declare namespace MockCallHistory {
  export type FilterCallsOperator = 'AND' | 'OR'
 
  /** modify the filtering behavior */
  export interface FilterCallsOptions {
    /** the operator to apply when filtering. 'OR' will adds any MockCallHistoryLog matching any criteria given. 'AND' will adds only MockCallHistoryLog matching every criteria given. (default 'OR')  */
    operator?: FilterCallsOperator | Lowercase<FilterCallsOperator>
  }
  /** a function to be executed for filtering MockCallHistoryLog */
  export type FilterCallsFunctionCriteria = (log: MockCallHistoryLog) => boolean
 
  /** parameter to filter MockCallHistoryLog */
  export type FilterCallsParameter = string | RegExp | undefined | null
 
  /** an object to execute multiple filtering at once */
  export interface FilterCallsObjectCriteria extends Record<string, FilterCallsParameter> {
    /** filter by request protocol. ie https: */
    protocol?: FilterCallsParameter;
    /** filter by request host. */
    host?: FilterCallsParameter;
    /** filter by request port. */
    port?: FilterCallsParameter;
    /** filter by request origin. */
    origin?: FilterCallsParameter;
    /** filter by request path. */
    path?: FilterCallsParameter;
    /** filter by request hash. */
    hash?: FilterCallsParameter;
    /** filter by request fullUrl. */
    fullUrl?: FilterCallsParameter;
    /** filter by request method. */
    method?: FilterCallsParameter;
  }
}
 
/** a call history to track requests configuration */
declare class MockCallHistory {
  constructor (name: string)
  /** returns an array of MockCallHistoryLog. */
  calls (): Array<MockCallHistoryLog>
  /** returns the first MockCallHistoryLog */
  firstCall (): MockCallHistoryLog | undefined
  /** returns the last MockCallHistoryLog. */
  lastCall (): MockCallHistoryLog | undefined
  /** returns the nth MockCallHistoryLog. */
  nthCall (position: number): MockCallHistoryLog | undefined
  /** return all MockCallHistoryLog matching any of criteria given. if an object is used with multiple properties, you can change the operator to apply during filtering on options */
  filterCalls (criteria: MockCallHistory.FilterCallsFunctionCriteria | MockCallHistory.FilterCallsObjectCriteria | RegExp, options?: MockCallHistory.FilterCallsOptions): Array<MockCallHistoryLog>
  /** return all MockCallHistoryLog matching the given protocol. if a string is given, it is matched with includes */
  filterCallsByProtocol (protocol: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>
  /** return all MockCallHistoryLog matching the given host. if a string is given, it is matched with includes */
  filterCallsByHost (host: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>
  /** return all MockCallHistoryLog matching the given port. if a string is given, it is matched with includes */
  filterCallsByPort (port: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>
  /** return all MockCallHistoryLog matching the given origin. if a string is given, it is matched with includes */
  filterCallsByOrigin (origin: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>
  /** return all MockCallHistoryLog matching the given path. if a string is given, it is matched with includes */
  filterCallsByPath (path: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>
  /** return all MockCallHistoryLog matching the given hash. if a string is given, it is matched with includes */
  filterCallsByHash (hash: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>
  /** return all MockCallHistoryLog matching the given fullUrl. if a string is given, it is matched with includes */
  filterCallsByFullUrl (fullUrl: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>
  /** return all MockCallHistoryLog matching the given method. if a string is given, it is matched with includes */
  filterCallsByMethod (method: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>
  /** clear all MockCallHistoryLog on this MockCallHistory. */
  clear (): void
  /** use it with for..of loop or spread operator */
  [Symbol.iterator]: () => Generator<MockCallHistoryLog>
}
 
export { MockCallHistoryLog, MockCallHistory }