@vibes.diy/api-types 2.4.1 → 2.4.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/index.d.ts CHANGED
@@ -18,6 +18,7 @@ export * from "./prompt.js";
18
18
  export * from "./app-documents.js";
19
19
  export * from "./db-acls.js";
20
20
  export * from "./members.js";
21
+ export * from "./memberships.js";
21
22
  export * from "./asset.js";
22
23
  export * from "./report.js";
23
24
  export interface FetchOkResult {
package/index.js CHANGED
@@ -17,6 +17,7 @@ export * from "./prompt.js";
17
17
  export * from "./app-documents.js";
18
18
  export * from "./db-acls.js";
19
19
  export * from "./members.js";
20
+ export * from "./memberships.js";
20
21
  export * from "./asset.js";
21
22
  export * from "./report.js";
22
23
  export function isFetchOkResult(result) {
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../jsr/index.ts"],"names":[],"mappings":"AAEA,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAE5B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAE1B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAQ5B,MAAM,UAAU,eAAe,CAAC,MAAmB;IACjD,OAAO,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC;AACpC,CAAC;AACD,MAAM,UAAU,gBAAgB,CAAC,MAAmB;IAClD,OAAO,MAAM,CAAC,IAAI,KAAK,WAAW,CAAC;AACrC,CAAC;AAUD,MAAM,UAAU,qBAAqB,CAAC,MAAmB;IACvD,OAAO,MAAM,CAAC,IAAI,KAAK,gBAAgB,CAAC;AAC1C,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../jsr/index.ts"],"names":[],"mappings":"AAEA,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAE5B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAE1B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAQ5B,MAAM,UAAU,eAAe,CAAC,MAAmB;IACjD,OAAO,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC;AACpC,CAAC;AACD,MAAM,UAAU,gBAAgB,CAAC,MAAmB;IAClD,OAAO,MAAM,CAAC,IAAI,KAAK,WAAW,CAAC;AACrC,CAAC;AAUD,MAAM,UAAU,qBAAqB,CAAC,MAAmB;IACvD,OAAO,MAAM,CAAC,IAAI,KAAK,gBAAgB,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,40 @@
1
+ export declare const resMembershipItem: import("arktype/internal/variants/object.ts").ObjectType<{
2
+ userSlug: string;
3
+ appSlug: string;
4
+ activityAt: string;
5
+ role: "editor" | "submitter" | "viewer";
6
+ title?: string | undefined;
7
+ icon?: {
8
+ cid: string;
9
+ mime: string;
10
+ } | undefined;
11
+ }, {}>;
12
+ export type ResMembershipItem = typeof resMembershipItem.infer;
13
+ export declare const reqListMemberships: import("arktype/internal/variants/object.ts").ObjectType<{
14
+ type: "vibes.diy.req-list-memberships";
15
+ auth: {
16
+ type: "clerk" | "device-id" | "ucan";
17
+ token: string;
18
+ };
19
+ limit?: number | undefined;
20
+ cursor?: string | undefined;
21
+ }, {}>;
22
+ export type ReqListMemberships = typeof reqListMemberships.infer;
23
+ export declare function isReqListMemberships(obj: unknown): obj is ReqListMemberships;
24
+ export declare const resListMemberships: import("arktype/internal/variants/object.ts").ObjectType<{
25
+ type: "vibes.diy.res-list-memberships";
26
+ items: {
27
+ userSlug: string;
28
+ appSlug: string;
29
+ activityAt: string;
30
+ role: "editor" | "submitter" | "viewer";
31
+ title?: string | undefined;
32
+ icon?: {
33
+ cid: string;
34
+ mime: string;
35
+ } | undefined;
36
+ }[];
37
+ nextCursor?: string | undefined;
38
+ }, {}>;
39
+ export type ResListMemberships = typeof resListMemberships.infer;
40
+ export declare function isResListMemberships(obj: unknown): obj is ResListMemberships;
package/memberships.js ADDED
@@ -0,0 +1,28 @@
1
+ import { type } from "arktype";
2
+ import { dashAuthType, Role } from "./common.js";
3
+ export const resMembershipItem = type({
4
+ userSlug: "string",
5
+ appSlug: "string",
6
+ activityAt: "string",
7
+ role: Role,
8
+ "title?": "string",
9
+ "icon?": type({ cid: "string", mime: "string" }),
10
+ });
11
+ export const reqListMemberships = type({
12
+ type: "'vibes.diy.req-list-memberships'",
13
+ auth: dashAuthType,
14
+ "limit?": "number",
15
+ "cursor?": "string",
16
+ });
17
+ export function isReqListMemberships(obj) {
18
+ return !(reqListMemberships(obj) instanceof type.errors);
19
+ }
20
+ export const resListMemberships = type({
21
+ type: "'vibes.diy.res-list-memberships'",
22
+ items: resMembershipItem.array(),
23
+ "nextCursor?": "string",
24
+ });
25
+ export function isResListMemberships(obj) {
26
+ return !(resListMemberships(obj) instanceof type.errors);
27
+ }
28
+ //# sourceMappingURL=memberships.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memberships.js","sourceRoot":"","sources":["../jsr/memberships.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC;IACpC,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,QAAQ;IACjB,UAAU,EAAE,QAAQ;IACpB,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;CACjD,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC;IACrC,IAAI,EAAE,kCAAkC;IACxC,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,QAAQ;CACpB,CAAC,CAAC;AAEH,MAAM,UAAU,oBAAoB,CAAC,GAAY;IAC/C,OAAO,CAAC,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,MAAM,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC;IACrC,IAAI,EAAE,kCAAkC;IACxC,KAAK,EAAE,iBAAiB,CAAC,KAAK,EAAE;IAChC,aAAa,EAAE,QAAQ;CACxB,CAAC,CAAC;AAEH,MAAM,UAAU,oBAAoB,CAAC,GAAY;IAC/C,OAAO,CAAC,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,MAAM,CAAC,CAAC;AAC3D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibes.diy/api-types",
3
- "version": "2.4.1",
3
+ "version": "2.4.3",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "scripts": {
@@ -14,8 +14,8 @@
14
14
  "@fireproof/core-types-base": "~0.24.19",
15
15
  "@fireproof/core-types-protocols-cloud": "~0.24.19",
16
16
  "@fireproof/core-types-protocols-dashboard": "~0.24.19",
17
- "@vibes.diy/call-ai-v2": "2.4.1",
18
- "@vibes.diy/vibe-types": "2.4.1",
17
+ "@vibes.diy/call-ai-v2": "2.4.3",
18
+ "@vibes.diy/vibe-types": "2.4.3",
19
19
  "arktype": "~2.2.0"
20
20
  },
21
21
  "repository": {
@@ -8,6 +8,7 @@ import { ReqCreateInvite, ResCreateInvite, ReqRevokeInvite, ResRevokeInvite, Req
8
8
  import { ReqListRequestGrants, ResListRequestGrants, ReqSubscribeRequestGrants, ResSubscribeRequestGrants, ReqRequestAccess, ResRequestAccess, ReqApproveRequest, ResApproveRequest, ReqRequestSetRole, ResRequestSetRole, ReqRevokeRequest, ResRevokeRequest, ReqHasAccessRequest, ResHasAccessRequest, EvtRequestGrant } from "./request-access.js";
9
9
  import { ReqPutDoc, ResPutDoc, ReqGetDoc, ResGetDoc, ResGetDocNotFound, ReqQueryDocs, ResQueryDocs, ReqDeleteDoc, ResDeleteDoc, ReqSubscribeDocs, ResSubscribeDocs, ReqListDbNames, ResListDbNames } from "./app-documents.js";
10
10
  import { ReqListMembers, ResListMembers } from "./members.js";
11
+ import { ReqListMemberships, ResListMemberships } from "./memberships.js";
11
12
  import { ReqVibeWhoAmI, ResVibeWhoAmI } from "@vibes.diy/vibe-types";
12
13
  import { ReqAssetUploadGrant, ResAssetUploadGrant } from "./asset.js";
13
14
  import { ReqReportGrowthMemberships, ResReportGrowthMemberships, ReqReportGrowthVibesWithData, ResReportGrowthVibesWithData, ReqReportActiveMembers, ResReportActiveMembers, ReqReportTopVibesByMembers, ResReportTopVibesByMembers, ReqReportAttributionReferrers, ResReportAttributionReferrers, ReqReportCampaignHealth, ResReportCampaignHealth } from "./report.js";
@@ -80,6 +81,7 @@ export interface VibesDiyApiIface<_T = unknown> {
80
81
  subscribeDocs(req: Req<ReqSubscribeDocs>): Promise<Result<ResSubscribeDocs, VibesDiyError>>;
81
82
  listDbNames(req: Req<ReqListDbNames>): Promise<Result<ResListDbNames, VibesDiyError>>;
82
83
  listMembers(req: Req<ReqListMembers>): Promise<Result<ResListMembers, VibesDiyError>>;
84
+ listMemberships(req: Req<ReqListMemberships>): Promise<Result<ResListMemberships, VibesDiyError>>;
83
85
  whoAmI(req: Req<ReqVibeWhoAmI>): Promise<Result<ResVibeWhoAmI, VibesDiyError>>;
84
86
  requestAssetUploadGrant(req: Req<ReqAssetUploadGrant>): Promise<Result<ResAssetUploadGrant, VibesDiyError>>;
85
87
  reportGrowthMemberships(req: Req<ReqReportGrowthMemberships>): Promise<Result<ResReportGrowthMemberships, VibesDiyError>>;
@@ -1 +1 @@
1
- {"version":3,"file":"vibes-diy-api.js","sourceRoot":"","sources":["../jsr/vibes-diy-api.ts"],"names":[],"mappings":"AA2GA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAK/B,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC;IAC/B,GAAG,EAAE,QAAQ;IACb,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,QAAQ;CAClB,CAAC,CAAC"}
1
+ {"version":3,"file":"vibes-diy-api.js","sourceRoot":"","sources":["../jsr/vibes-diy-api.ts"],"names":[],"mappings":"AA4GA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAK/B,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC;IAC/B,GAAG,EAAE,QAAQ;IACb,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,QAAQ;CAClB,CAAC,CAAC"}