@codecks/fetch 0.1.1 → 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.
@@ -1,5 +1,5 @@
1
- import "../query-type-MH8IxqbW.js";
2
- import { BaseLoader, BaseRequester, MissingDataRequest, OnLoadedFn } from "../loader-types-DJdGWL4B.js";
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-MH8IxqbW.js";
2
- import "../loader-types-DJdGWL4B.js";
3
- import { Store } from "../store-B8qeW-0x.js";
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 { getRelKey, makeRelQuerySerializable } from "../query-helpers-DsMMOtSO.js";
1
+ import { getRelKey, makeRelQuerySerializable, modelMap } from "../query-helpers-DsMMOtSO.js";
2
2
 
3
3
  //#region src/_exploration/immediate-cache.ts
4
4
  var ImmediateCache = class {
@@ -48,10 +48,8 @@ const calcPartKeys = (model, id, field) => {
48
48
  };
49
49
  var Store = class {
50
50
  cache = new ImmediateCache();
51
- modelMap;
52
- loader;
53
- constructor(modelMap, loader) {
54
- this.modelMap = modelMap;
51
+ modelMap = modelMap;
52
+ constructor(loader) {
55
53
  this.loader = loader;
56
54
  loader.setOnLoaded((model, key, res) => this.onLoaded(model, key, res));
57
55
  }
@@ -1,4 +1,4 @@
1
- import { ModelDesc, RelationEntry } from "./query-type-MH8IxqbW.js";
1
+ import { ModelDesc, RelationEntry } from "./query-type-Dx5ZCv5N.js";
2
2
 
3
3
  //#region src/models/_root.d.ts
4
4
  declare const _rootDesc: ModelDesc<"_root", {}, {
@@ -1,4 +1,4 @@
1
- import { InferModelQuery, ModelDesc, ModelQuery, Nominal, RelationEntry, TypedField } from "./query-type-MH8IxqbW.js";
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
- //#region src/loaders/loader-utils.d.ts
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-MH8IxqbW.js";
2
- import { DataLoader, FetchOptions, modelMap$1 as modelMap } from "./loader-utils-CjrkQskt.js";
3
- import { _rootDesc$1 as _rootDesc } from "./_root-BG9fhc-C.js";
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-MH8IxqbW.js";
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 { AnyDesc, InferModelQuery, InferRelQuery, Instance, ModelDesc, ModelQuery, Nominal, RelQuery, RelationEntry, SerializableRelationQuery, TypedField };
182
+ export { InferModelQuery, InferRelQuery, Instance, ModelDesc, ModelQuery, Nominal, RelQuery, RelationEntry, SerializableRelationQuery, TypedField };