@codecks/fetch 0.1.2 → 0.1.3
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/_exploration/api-requester.d.ts +4 -3
- package/dist/_exploration/create-hooks.d.ts +15145 -6
- package/dist/_exploration/loader.d.ts +2 -2
- package/dist/_exploration/store.d.ts +4 -3
- package/dist/{_root-BG9fhc-C.d.ts → _root-D1Faf8cg.d.ts} +1 -1
- package/dist/{loader-utils-CjrkQskt.d.ts → index-DUBsesYl.d.ts} +2 -17
- package/dist/index.d.ts +4 -3
- package/dist/{loader-types-DJdGWL4B.d.ts → loader-types-CMF96Ae1.d.ts} +1 -1
- package/dist/loader-utils-Du-CTKH-.d.ts +19 -0
- package/dist/{query-type-MH8IxqbW.d.ts → query-type-Dx5ZCv5N.d.ts} +1 -1
- package/dist/store-C_DXGjif.d.ts +2569 -0
- package/package.json +1 -1
- package/dist/store-mAj3G67A.d.ts +0 -44
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../query-type-
|
|
2
|
-
import { BaseLoader, BaseRequester, MissingDataRequest, OnLoadedFn } from "../loader-types-
|
|
1
|
+
import "../query-type-Dx5ZCv5N.js";
|
|
2
|
+
import { BaseLoader, BaseRequester, MissingDataRequest, OnLoadedFn } from "../loader-types-CMF96Ae1.js";
|
|
3
3
|
|
|
4
4
|
//#region src/_exploration/loader.d.ts
|
|
5
5
|
type DataRequestWithKey = {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import "../query-type-
|
|
2
|
-
import "../
|
|
3
|
-
import
|
|
1
|
+
import "../query-type-Dx5ZCv5N.js";
|
|
2
|
+
import "../index-DUBsesYl.js";
|
|
3
|
+
import "../loader-types-CMF96Ae1.js";
|
|
4
|
+
import { Store } from "../store-C_DXGjif.js";
|
|
4
5
|
export { Store };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModelDesc, Nominal, RelationEntry, TypedField } from "./query-type-Dx5ZCv5N.js";
|
|
2
2
|
|
|
3
3
|
//#region src/models/AccountOnboardingStep.d.ts
|
|
4
4
|
type AccountOnboardingStepId = Nominal<string, "accountOnboardingStep">;
|
|
@@ -2670,19 +2670,4 @@ declare const modelMap: {
|
|
|
2670
2670
|
}, ["itemId"]>;
|
|
2671
2671
|
};
|
|
2672
2672
|
//#endregion
|
|
2673
|
-
|
|
2674
|
-
type ModelMap = typeof modelMap;
|
|
2675
|
-
type DataLoader = {
|
|
2676
|
-
fetchModel: <K extends keyof ModelMap, Id extends string, const Q extends ModelQuery<ModelMap[K], ModelMap>>(model: K, id: Id[], q: Q) => Promise<Record<Id, InferModelQuery<ModelMap[K], Q, ModelMap>>>;
|
|
2677
|
-
};
|
|
2678
|
-
type FetchFunction = (url: string, init?: RequestInit) => Promise<Response>;
|
|
2679
|
-
type FetchOptions = {
|
|
2680
|
-
fetch?: FetchFunction;
|
|
2681
|
-
accessToken?: string;
|
|
2682
|
-
subdomain?: string;
|
|
2683
|
-
baseUrl?: string;
|
|
2684
|
-
headers?: Record<string, string>;
|
|
2685
|
-
timeout?: number;
|
|
2686
|
-
};
|
|
2687
|
-
//#endregion
|
|
2688
|
-
export { DataLoader, FetchOptions, modelMap as modelMap$1 };
|
|
2673
|
+
export { AccountId, AccountOnboardingStepId, ActiveTimeTrackerId, ActivityId, AffiliateCodeId, AppId, AppInstallationId, AttachmentId, CardId, CardPresetId, CardSubscriptionId, CardUpvoteId, DeckId, DeckSubscriptionId, DiscordGuildId, DiscordMemberId, DiscordProjectNotificationId, DiscordSlashCommandId, FileId, IntegrationId, InvoiceId, MilestoneId, PinnedMilestoneId, ProjectId, ProjectSelectionId, ProjectTagId, QueueEntryId, QueueSelectionId, ReleaseId, ResolvableEntryId, ResolvableEntryReactionId, ResolvableId, SavedSearchId, SprintConfigId, SprintId, TimeTrackingSegmentId, UserEmailId, UserId, UserInvitationId, UserInviteCodeId, UserReportEmailId, UserReportSettingId, UserReportTokenId, UserTagId, VisionBoardId, VisionBoardQueryId, WizardId, WorkflowItemId, modelMap as modelMap$1 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { InferModelQuery, InferRelQuery, Instance, ModelQuery, RelQuery } from "./query-type-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { InferModelQuery, InferRelQuery, Instance, ModelQuery, RelQuery } from "./query-type-Dx5ZCv5N.js";
|
|
2
|
+
import { modelMap$1 as modelMap } from "./index-DUBsesYl.js";
|
|
3
|
+
import { DataLoader, FetchOptions } from "./loader-utils-Du-CTKH-.js";
|
|
4
|
+
import { _rootDesc$1 as _rootDesc } from "./_root-D1Faf8cg.js";
|
|
4
5
|
|
|
5
6
|
//#region src/loaders/simple-loader.d.ts
|
|
6
7
|
type SimpleLoaderOptions = FetchOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SerializableRelationQuery } from "./query-type-
|
|
1
|
+
import { SerializableRelationQuery } from "./query-type-Dx5ZCv5N.js";
|
|
2
2
|
|
|
3
3
|
//#region src/_exploration/loader-types.d.ts
|
|
4
4
|
type OnLoadedFn = (model: string, key: string, partialInstance: Record<string, unknown>) => void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { InferModelQuery, ModelQuery } from "./query-type-Dx5ZCv5N.js";
|
|
2
|
+
import { modelMap$1 as modelMap } from "./index-DUBsesYl.js";
|
|
3
|
+
|
|
4
|
+
//#region src/loaders/loader-utils.d.ts
|
|
5
|
+
type ModelMap = typeof modelMap;
|
|
6
|
+
type DataLoader = {
|
|
7
|
+
fetchModel: <K extends keyof ModelMap, Id extends string, const Q extends ModelQuery<ModelMap[K], ModelMap>>(model: K, id: Id[], q: Q) => Promise<Record<Id, InferModelQuery<ModelMap[K], Q, ModelMap>>>;
|
|
8
|
+
};
|
|
9
|
+
type FetchFunction = (url: string, init?: RequestInit) => Promise<Response>;
|
|
10
|
+
type FetchOptions = {
|
|
11
|
+
fetch?: FetchFunction;
|
|
12
|
+
accessToken?: string;
|
|
13
|
+
subdomain?: string;
|
|
14
|
+
baseUrl?: string;
|
|
15
|
+
headers?: Record<string, string>;
|
|
16
|
+
timeout?: number;
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { DataLoader, FetchOptions };
|
|
@@ -179,4 +179,4 @@ type Instance<M extends keyof ModelMap> = {
|
|
|
179
179
|
"~key": string;
|
|
180
180
|
};
|
|
181
181
|
//#endregion
|
|
182
|
-
export {
|
|
182
|
+
export { InferModelQuery, InferRelQuery, Instance, ModelDesc, ModelQuery, Nominal, RelQuery, RelationEntry, SerializableRelationQuery, TypedField };
|