@campfire-interactive/cfi-ai-hub-client 2.0.2 → 2.0.4

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.
Files changed (81) hide show
  1. package/dist/ai.d.ts +26 -0
  2. package/dist/ai.d.ts.map +1 -0
  3. package/dist/ai.js +66 -0
  4. package/dist/ai.js.map +1 -0
  5. package/dist/bom.d.ts +12 -0
  6. package/dist/bom.d.ts.map +1 -0
  7. package/dist/bom.js +64 -0
  8. package/dist/bom.js.map +1 -0
  9. package/dist/cache.d.ts +11 -0
  10. package/dist/cache.d.ts.map +1 -0
  11. package/dist/cache.js +37 -0
  12. package/dist/cache.js.map +1 -0
  13. package/dist/client.d.ts +31 -0
  14. package/dist/client.d.ts.map +1 -0
  15. package/dist/client.js +51 -0
  16. package/dist/client.js.map +1 -0
  17. package/dist/conversations.d.ts +28 -0
  18. package/dist/conversations.d.ts.map +1 -0
  19. package/dist/conversations.js +74 -0
  20. package/dist/conversations.js.map +1 -0
  21. package/dist/documents.d.ts +18 -0
  22. package/dist/documents.d.ts.map +1 -0
  23. package/dist/documents.js +28 -0
  24. package/dist/documents.js.map +1 -0
  25. package/dist/errors.d.ts +26 -0
  26. package/dist/errors.d.ts.map +1 -0
  27. package/dist/errors.js +55 -0
  28. package/dist/errors.js.map +1 -0
  29. package/dist/forecast.d.ts +61 -0
  30. package/dist/forecast.d.ts.map +1 -0
  31. package/dist/forecast.js +164 -0
  32. package/dist/forecast.js.map +1 -0
  33. package/dist/http.d.ts +42 -0
  34. package/dist/http.d.ts.map +1 -0
  35. package/dist/http.js +214 -0
  36. package/dist/http.js.map +1 -0
  37. package/dist/index.d.ts +21 -0
  38. package/dist/index.d.ts.map +1 -0
  39. package/dist/index.js +49 -0
  40. package/dist/index.js.map +1 -0
  41. package/dist/jobs.d.ts +33 -0
  42. package/dist/jobs.d.ts.map +1 -0
  43. package/dist/jobs.js +79 -0
  44. package/dist/jobs.js.map +1 -0
  45. package/dist/macro.d.ts +35 -0
  46. package/dist/macro.d.ts.map +1 -0
  47. package/dist/macro.js +64 -0
  48. package/dist/macro.js.map +1 -0
  49. package/dist/mock.d.ts +107 -0
  50. package/dist/mock.d.ts.map +1 -0
  51. package/dist/mock.js +497 -0
  52. package/dist/mock.js.map +1 -0
  53. package/dist/multipart.d.ts +4 -0
  54. package/dist/multipart.d.ts.map +1 -0
  55. package/dist/multipart.js +21 -0
  56. package/dist/multipart.js.map +1 -0
  57. package/dist/omsf.d.ts +22 -0
  58. package/dist/omsf.d.ts.map +1 -0
  59. package/dist/omsf.js +67 -0
  60. package/dist/omsf.js.map +1 -0
  61. package/dist/prompts.d.ts +24 -0
  62. package/dist/prompts.d.ts.map +1 -0
  63. package/dist/prompts.js +71 -0
  64. package/dist/prompts.js.map +1 -0
  65. package/dist/rag.d.ts +18 -0
  66. package/dist/rag.d.ts.map +1 -0
  67. package/dist/rag.js +39 -0
  68. package/dist/rag.js.map +1 -0
  69. package/dist/tracker.d.ts +15 -0
  70. package/dist/tracker.d.ts.map +1 -0
  71. package/dist/tracker.js +74 -0
  72. package/dist/tracker.js.map +1 -0
  73. package/dist/types.d.ts +716 -0
  74. package/dist/types.d.ts.map +1 -0
  75. package/dist/types.js +18 -0
  76. package/dist/types.js.map +1 -0
  77. package/dist/vendor.d.ts +8 -0
  78. package/dist/vendor.d.ts.map +1 -0
  79. package/dist/vendor.js +18 -0
  80. package/dist/vendor.js.map +1 -0
  81. package/package.json +35 -35
package/dist/jobs.js ADDED
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JobsResource = void 0;
4
+ /**
5
+ * Async-jobs queue (capability C11).
6
+ *
7
+ * Submit a job, then poll {@link result} (or {@link get}) until terminal.
8
+ * Tenant ownership is enforced server-side; cross-tenant reads return 404.
9
+ */
10
+ class JobsResource {
11
+ http;
12
+ constructor(http) {
13
+ this.http = http;
14
+ }
15
+ async submit(input) {
16
+ return this.http.request({
17
+ method: 'POST',
18
+ path: '/jobs',
19
+ body: input,
20
+ });
21
+ }
22
+ async list(options = {}) {
23
+ return this.http.request({
24
+ method: 'GET',
25
+ path: '/jobs',
26
+ query: {
27
+ status: options.status,
28
+ type: options.type,
29
+ limit: options.limit,
30
+ },
31
+ });
32
+ }
33
+ async get(jobId) {
34
+ return this.http.request({
35
+ method: 'GET',
36
+ path: `/jobs/${encodeURIComponent(jobId)}`,
37
+ });
38
+ }
39
+ /**
40
+ * Returns the job result if it's succeeded, else the current pending state.
41
+ * Hub returns 200+result on success, 202+progress while running, and
42
+ * surfaces 4xx/5xx for failed/cancelled jobs (which propagate as thrown
43
+ * errors from this method).
44
+ */
45
+ async result(jobId) {
46
+ return this.http.request({
47
+ method: 'GET',
48
+ path: `/jobs/${encodeURIComponent(jobId)}/result`,
49
+ });
50
+ }
51
+ /** Request cooperative cancellation. Idempotent for terminal jobs. */
52
+ async cancel(jobId) {
53
+ return this.http.request({
54
+ method: 'DELETE',
55
+ path: `/jobs/${encodeURIComponent(jobId)}`,
56
+ });
57
+ }
58
+ /**
59
+ * Convenience: poll until the job reaches a terminal state.
60
+ * Returns the final {@link JobResponse}. Throws if cancelled / failed.
61
+ */
62
+ async pollUntilDone(jobId, options = {}) {
63
+ const intervalMs = options.intervalMs ?? 1500;
64
+ const timeoutMs = options.timeoutMs ?? 5 * 60_000;
65
+ const deadline = Date.now() + timeoutMs;
66
+ while (Date.now() < deadline) {
67
+ const job = await this.get(jobId);
68
+ if (job.status === 'succeeded')
69
+ return job;
70
+ if (job.status === 'failed' || job.status === 'cancelled') {
71
+ return job;
72
+ }
73
+ await new Promise((resolve) => setTimeout(resolve, intervalMs));
74
+ }
75
+ throw new Error(`Job ${jobId} did not finish within ${timeoutMs}ms`);
76
+ }
77
+ }
78
+ exports.JobsResource = JobsResource;
79
+ //# sourceMappingURL=jobs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jobs.js","sourceRoot":"","sources":["../src/jobs.ts"],"names":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K,CAAC,aAAa,CACjB,KAAa,EACb,UAAuD,EAAE;QAEzD,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,IAAI,CAAC;QAC9C,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,CAAC,GAAG,MAAM,CAAC;QAClD,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;QACxC,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ,EAAE,CAAC;YAC7B,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAClC,IAAI,GAAG,CAAC,MAAM,KAAK,WAAW;gBAAE,OAAO,GAAG,CAAC;YAC3C,IAAI,GAAG,CAAC,MAAM,KAAK,QAAQ,IAAI,GAAG,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;gBAC1D,OAAO,GAAG,CAAC;YACb,CAAC;YACD,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;QAClE,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,OAAO,KAAK,0BAA0B,SAAS,IAAI,CAAC,CAAC;IACvE,CAAC;CACF;AA1ED,oCA0EC"}
@@ -0,0 +1,35 @@
1
+ import type { HttpTransport } from './http';
2
+ import type { IsoDate, MacroIndicatorType, MacroQueryOptions, MacroQueryResponse, MacroTypesResponse, MacroUpsertRequest, MacroUpsertResponse } from './types';
3
+ export declare class MacroResource {
4
+ private readonly http;
5
+ constructor(http: HttpTransport);
6
+ /**
7
+ * List all supported macro indicator types with their labels, descriptions,
8
+ * and units. Use the `key` field as the `indicator` value in other methods.
9
+ */
10
+ listTypes(): Promise<MacroTypesResponse>;
11
+ /**
12
+ * Upsert monthly values for one indicator.
13
+ *
14
+ * Each month is **inserted** if it does not yet exist, or **updated** if it
15
+ * does. The `month` field accepts any date within the target month — the
16
+ * server normalises it to the 1st. Duplicate months within the same payload
17
+ * are deduplicated (last value wins).
18
+ *
19
+ * Supported indicators: `fed_funds_rate` | `unemployment_rate` | `consumer_satisfaction_index`
20
+ */
21
+ upsert(request: MacroUpsertRequest): Promise<MacroUpsertResponse>;
22
+ /**
23
+ * Query stored monthly values for an indicator, ordered by month ascending.
24
+ * Optionally filter by date range — any day within the boundary month is accepted.
25
+ */
26
+ query(indicator: MacroIndicatorType, options?: MacroQueryOptions): Promise<MacroQueryResponse>;
27
+ /**
28
+ * Delete a single month's record for an indicator.
29
+ * `month` accepts any date within the target month (e.g. `'2024-03-01'`).
30
+ *
31
+ * @throws `NotFoundError` when the record does not exist.
32
+ */
33
+ deleteMonth(indicator: MacroIndicatorType, month: IsoDate): Promise<void>;
34
+ }
35
+ //# sourceMappingURL=macro.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"macro.d.ts","sourceRoot":"","sources":["../src/macro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,KAAK,EACV,OAAO,EACP,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,aAAa;IAEhD;;;OAGG;IACG,SAAS,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAO9C;;;;;;;;;OASG;IACG,MAAM,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAQvE;;;OAGG;IACG,KAAK,CACT,SAAS,EAAE,kBAAkB,EAC7B,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,kBAAkB,CAAC;IAW9B;;;;;OAKG;IACG,WAAW,CAAC,SAAS,EAAE,kBAAkB,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CAMhF"}
package/dist/macro.js ADDED
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MacroResource = void 0;
4
+ class MacroResource {
5
+ http;
6
+ constructor(http) {
7
+ this.http = http;
8
+ }
9
+ /**
10
+ * List all supported macro indicator types with their labels, descriptions,
11
+ * and units. Use the `key` field as the `indicator` value in other methods.
12
+ */
13
+ async listTypes() {
14
+ return this.http.request({
15
+ method: 'GET',
16
+ path: '/macro/types',
17
+ });
18
+ }
19
+ /**
20
+ * Upsert monthly values for one indicator.
21
+ *
22
+ * Each month is **inserted** if it does not yet exist, or **updated** if it
23
+ * does. The `month` field accepts any date within the target month — the
24
+ * server normalises it to the 1st. Duplicate months within the same payload
25
+ * are deduplicated (last value wins).
26
+ *
27
+ * Supported indicators: `fed_funds_rate` | `unemployment_rate` | `consumer_satisfaction_index`
28
+ */
29
+ async upsert(request) {
30
+ return this.http.request({
31
+ method: 'POST',
32
+ path: '/macro/upsert',
33
+ body: request,
34
+ });
35
+ }
36
+ /**
37
+ * Query stored monthly values for an indicator, ordered by month ascending.
38
+ * Optionally filter by date range — any day within the boundary month is accepted.
39
+ */
40
+ async query(indicator, options = {}) {
41
+ return this.http.request({
42
+ method: 'GET',
43
+ path: `/macro/${encodeURIComponent(indicator)}`,
44
+ query: {
45
+ start_month: options.start_month,
46
+ end_month: options.end_month,
47
+ },
48
+ });
49
+ }
50
+ /**
51
+ * Delete a single month's record for an indicator.
52
+ * `month` accepts any date within the target month (e.g. `'2024-03-01'`).
53
+ *
54
+ * @throws `NotFoundError` when the record does not exist.
55
+ */
56
+ async deleteMonth(indicator, month) {
57
+ await this.http.request({
58
+ method: 'DELETE',
59
+ path: `/macro/${encodeURIComponent(indicator)}/${encodeURIComponent(month)}`,
60
+ });
61
+ }
62
+ }
63
+ exports.MacroResource = MacroResource;
64
+ //# sourceMappingURL=macro.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"macro.js","sourceRoot":"","sources":["../src/macro.ts"],"names":[],"mappings":";;;AAWA,MAAa,aAAa;IACK;IAA7B,YAA6B,IAAmB;QAAnB,SAAI,GAAJ,IAAI,CAAe;IAAG,CAAC;IAEpD;;;OAGG;IACH,KAAK,CAAC,SAAS;QACb,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAqB;YAC3C,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,cAAc;SACrB,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,MAAM,CAAC,OAA2B;QACtC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAsB;YAC5C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,OAAO;SACd,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,KAAK,CACT,SAA6B,EAC7B,UAA6B,EAAE;QAE/B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAqB;YAC3C,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,UAAU,kBAAkB,CAAC,SAAS,CAAC,EAAE;YAC/C,KAAK,EAAE;gBACL,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,SAAS,EAAE,OAAO,CAAC,SAAS;aAC7B;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,WAAW,CAAC,SAA6B,EAAE,KAAc;QAC7D,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAO;YAC5B,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,UAAU,kBAAkB,CAAC,SAAS,CAAC,IAAI,kBAAkB,CAAC,KAAK,CAAC,EAAE;SAC7E,CAAC,CAAC;IACL,CAAC;CACF;AA9DD,sCA8DC"}
package/dist/mock.d.ts ADDED
@@ -0,0 +1,107 @@
1
+ import type { AbortProgressInput, ActionResponse, BatchForecastJobResponse, BatchForecastRequest, BatchForecastResult, BomProcessFileOptions, BomProcessResponse, BomSearchRequest, BomSearchResponse, BomSearchResult, BomSeedVectorDbFileOptions, BomSeedVectorDbRequest, BomStoreAttributesRequest, BomStoreAttributesResponse, CacheDeleteResponse, CacheGetResponse, CacheSetInput, CacheSetResponse, CacheTokenInvalidateResponse, ChatRequest, ChatResponse, ColumnDetectionResponse, CompareVendorFilesRequest, CompareVendorFilesResponse, EmbeddingRequest, EmbeddingResponse, FileComparisonConfig, FileComparisonResponse, FileInput, ForecastHealthResponse, ForecastJobResponse, ForecastRequest, ForecastResponse, FollowUpRequest, FollowUpResponse, IsoDate, MacroDataPoint, MacroIndicatorType, MacroQueryOptions, MacroQueryResponse, MacroTypesResponse, MacroUpsertRequest, MacroUpsertResponse, OmsfHealthResponse, PollProgressOptions, ProgressResponse, SentimentRequest, SentimentResponse, SummarizeRequest, SummarizeResponse, VolumeAnalyzeResponse, VolumeDashboardResponse } from './types';
2
+ export interface MockSeedData {
3
+ chatResponses?: ChatResponse[];
4
+ bomSearchResults?: BomSearchResult[];
5
+ progressEntries?: Record<string, ProgressResponse>;
6
+ cache?: Record<string, unknown>;
7
+ forecastResponses?: ForecastResponse[];
8
+ macroData?: Partial<Record<MacroIndicatorType, MacroDataPoint[]>>;
9
+ }
10
+ interface MockStore {
11
+ chatResponses: ChatResponse[];
12
+ bomSearchResults: BomSearchResult[];
13
+ progressEntries: Map<string, ProgressResponse>;
14
+ cache: Map<string, unknown>;
15
+ forecastResponses: ForecastResponse[];
16
+ macroData: Map<MacroIndicatorType, MacroDataPoint[]>;
17
+ }
18
+ declare class MockAiResource {
19
+ private readonly store;
20
+ constructor(store: MockStore);
21
+ chat(input: ChatRequest): Promise<ChatResponse>;
22
+ embeddings(input: EmbeddingRequest): Promise<EmbeddingResponse>;
23
+ sentiment(input: SentimentRequest): Promise<SentimentResponse>;
24
+ summarize(input: SummarizeRequest): Promise<SummarizeResponse>;
25
+ }
26
+ declare class MockBomResource {
27
+ private readonly store;
28
+ constructor(store: MockStore);
29
+ processFile(_file: FileInput, _options?: BomProcessFileOptions): Promise<BomProcessResponse>;
30
+ search(input: BomSearchRequest): Promise<BomSearchResponse>;
31
+ storeAttributes(_input: BomStoreAttributesRequest): Promise<BomStoreAttributesResponse>;
32
+ seedVectorDbFromFile(_file: FileInput, _options?: BomSeedVectorDbFileOptions): Promise<BomProcessResponse>;
33
+ seedVectorDbFromJson(_input: BomSeedVectorDbRequest, _callbackUrl?: string): Promise<BomProcessResponse>;
34
+ }
35
+ declare class MockOmsfResource {
36
+ analyzeData(): Promise<VolumeAnalyzeResponse>;
37
+ followUp(input: FollowUpRequest): Promise<FollowUpResponse>;
38
+ detectColumns(): Promise<ColumnDetectionResponse>;
39
+ compare(_fileOld: FileInput, _fileNew: FileInput, _config: FileComparisonConfig): Promise<FileComparisonResponse>;
40
+ dashboard(): Promise<VolumeDashboardResponse>;
41
+ health(): Promise<OmsfHealthResponse>;
42
+ }
43
+ declare class MockVendorResource {
44
+ compareVendorFiles(_input: CompareVendorFilesRequest): Promise<CompareVendorFilesResponse>;
45
+ }
46
+ declare class MockTrackerResource {
47
+ private readonly store;
48
+ constructor(store: MockStore);
49
+ get<TData = unknown>(progressId: string): Promise<ProgressResponse<TData>>;
50
+ abort(progressId: string, input?: AbortProgressInput): Promise<ActionResponse>;
51
+ delete(progressId: string): Promise<ActionResponse>;
52
+ pollProgress<TData = unknown>(progressId: string, _options?: PollProgressOptions): Promise<ProgressResponse<TData>>;
53
+ }
54
+ declare class MockCacheResource {
55
+ private readonly store;
56
+ constructor(store: MockStore);
57
+ get<T = unknown>(key: string): Promise<CacheGetResponse<T>>;
58
+ set<T = unknown>(key: string, input: CacheSetInput<T>): Promise<CacheSetResponse>;
59
+ delete(key: string): Promise<CacheDeleteResponse>;
60
+ invalidateToken(): Promise<CacheTokenInvalidateResponse>;
61
+ }
62
+ declare class MockForecastResource {
63
+ private readonly store;
64
+ constructor(store: MockStore);
65
+ predict(request: ForecastRequest): Promise<ForecastResponse>;
66
+ predictAsync(request: ForecastRequest): Promise<ForecastJobResponse>;
67
+ predictBatch(request: BatchForecastRequest): Promise<BatchForecastJobResponse>;
68
+ getJob(progressId: string): Promise<ProgressResponse<ForecastResponse>>;
69
+ getBatchJob(progressId: string): Promise<ProgressResponse<BatchForecastResult>>;
70
+ pollJob(progressId: string, _options?: PollProgressOptions): Promise<ProgressResponse<ForecastResponse>>;
71
+ pollBatchJob(progressId: string, _options?: PollProgressOptions): Promise<ProgressResponse<BatchForecastResult>>;
72
+ predictAsyncAndWait(request: ForecastRequest, _options?: PollProgressOptions): Promise<ForecastResponse>;
73
+ predictBatchAndWait(request: BatchForecastRequest, _options?: PollProgressOptions): Promise<BatchForecastResult>;
74
+ health(): Promise<ForecastHealthResponse>;
75
+ }
76
+ declare class MockMacroResource {
77
+ private readonly store;
78
+ constructor(store: MockStore);
79
+ listTypes(): Promise<MacroTypesResponse>;
80
+ upsert(request: MacroUpsertRequest): Promise<MacroUpsertResponse>;
81
+ query(indicator: MacroIndicatorType, options?: MacroQueryOptions): Promise<MacroQueryResponse>;
82
+ deleteMonth(indicator: MacroIndicatorType, month: IsoDate): Promise<void>;
83
+ }
84
+ export declare class MockCfiAiHubClient {
85
+ readonly ai: MockAiResource;
86
+ readonly bom: MockBomResource;
87
+ readonly omsf: MockOmsfResource;
88
+ readonly vendor: MockVendorResource;
89
+ readonly tracker: MockTrackerResource;
90
+ readonly cache: MockCacheResource;
91
+ readonly forecast: MockForecastResource;
92
+ readonly macro: MockMacroResource;
93
+ private store;
94
+ private readonly seed;
95
+ constructor(seed?: MockSeedData);
96
+ reset(): void;
97
+ getStore(): {
98
+ chatResponses: ChatResponse[];
99
+ bomSearchResults: BomSearchResult[];
100
+ forecastResponses: ForecastResponse[];
101
+ progressEntries: Record<string, ProgressResponse>;
102
+ cache: Record<string, unknown>;
103
+ macroData: Partial<Record<MacroIndicatorType, MacroDataPoint[]>>;
104
+ };
105
+ }
106
+ export {};
107
+ //# sourceMappingURL=mock.d.ts.map
@@ -0,0 +1 @@
1
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