@01.software/sdk 0.22.0 → 0.23.0
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/README.md +92 -69
- package/dist/analytics.cjs.map +1 -1
- package/dist/analytics.js.map +1 -1
- package/dist/const-CMdmNgEs.d.ts +34 -0
- package/dist/const-Cgd4op4V.d.cts +34 -0
- package/dist/index.cjs +50 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +50 -8
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-DeLBmtzd.d.cts → payload-types-D8-G1PiT.d.cts} +129 -8
- package/dist/{payload-types-DeLBmtzd.d.ts → payload-types-D8-G1PiT.d.ts} +129 -8
- package/dist/realtime.cjs.map +1 -1
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/realtime.js.map +1 -1
- package/dist/{server-BARh_6zH.d.ts → server-D7FcHj7J.d.ts} +35 -12
- package/dist/{server-BcQr-nGn.d.cts → server-DJcDyOmM.d.cts} +35 -12
- package/dist/server.cjs +9 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +9 -1
- package/dist/server.js.map +1 -1
- package/dist/{types-D7iFEsPc.d.cts → types-BQqfXbB2.d.ts} +18 -2
- package/dist/{types-KkuKwsli.d.ts → types-C_kwEIvY.d.cts} +18 -2
- package/dist/ui/form.d.cts +1 -1
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/video.d.cts +1 -1
- package/dist/ui/video.d.ts +1 -1
- package/dist/webhook.d.cts +3 -3
- package/dist/webhook.d.ts +3 -3
- package/package.json +3 -3
- package/dist/const-CfcjPbOu.d.ts +0 -24
- package/dist/const-DraU44bA.d.cts +0 -24
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
import { C as CustomerProfile, P as Post,
|
|
1
|
+
import { C as CustomerProfile, a as CustomerProfileList, P as Post, b as Comment, R as Reaction, c as Config } from './payload-types-D8-G1PiT.js';
|
|
2
2
|
|
|
3
3
|
type PublicCustomerProfile = Omit<CustomerProfile, 'tenant' | 'customer' | 'isPublic' | 'anonymizedAt' | 'metadata'>;
|
|
4
4
|
type PublicProfileRelation = string | PublicCustomerProfile;
|
|
5
|
+
type PublicCustomerProfileListEntry = {
|
|
6
|
+
profile: PublicCustomerProfile;
|
|
7
|
+
rank: number;
|
|
8
|
+
label?: string | null;
|
|
9
|
+
caption?: string | null;
|
|
10
|
+
score?: number | null;
|
|
11
|
+
badgeColor?: string | null;
|
|
12
|
+
badgeImage?: CustomerProfileList['entries'] extends Array<infer Entry> ? Entry extends {
|
|
13
|
+
badgeImage?: infer Image;
|
|
14
|
+
} ? Image : unknown : unknown;
|
|
15
|
+
publicMetadata?: unknown;
|
|
16
|
+
};
|
|
17
|
+
type PublicCustomerProfileList = Omit<CustomerProfileList, 'tenant' | 'visibility' | 'metadata' | 'entries'> & {
|
|
18
|
+
entries?: PublicCustomerProfileListEntry[] | null;
|
|
19
|
+
};
|
|
5
20
|
type PublicPost = Omit<Post, 'authorProfile' | 'lastCommentByProfile'> & {
|
|
6
|
-
authorProfile
|
|
21
|
+
authorProfile?: PublicProfileRelation | null;
|
|
7
22
|
lastCommentByProfile?: PublicProfileRelation | null;
|
|
8
23
|
};
|
|
9
24
|
type PublicComment = Omit<Comment, 'authorProfile'> & {
|
|
@@ -14,6 +29,7 @@ type PublicReaction = Omit<Reaction, 'actorProfile'> & {
|
|
|
14
29
|
};
|
|
15
30
|
type PublicCollectionOverrides = {
|
|
16
31
|
'customer-profiles': PublicCustomerProfile;
|
|
32
|
+
'customer-profile-lists': PublicCustomerProfileList;
|
|
17
33
|
posts: PublicPost;
|
|
18
34
|
comments: PublicComment;
|
|
19
35
|
reactions: PublicReaction;
|
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
import { C as CustomerProfile, P as Post,
|
|
1
|
+
import { C as CustomerProfile, a as CustomerProfileList, P as Post, b as Comment, R as Reaction, c as Config } from './payload-types-D8-G1PiT.cjs';
|
|
2
2
|
|
|
3
3
|
type PublicCustomerProfile = Omit<CustomerProfile, 'tenant' | 'customer' | 'isPublic' | 'anonymizedAt' | 'metadata'>;
|
|
4
4
|
type PublicProfileRelation = string | PublicCustomerProfile;
|
|
5
|
+
type PublicCustomerProfileListEntry = {
|
|
6
|
+
profile: PublicCustomerProfile;
|
|
7
|
+
rank: number;
|
|
8
|
+
label?: string | null;
|
|
9
|
+
caption?: string | null;
|
|
10
|
+
score?: number | null;
|
|
11
|
+
badgeColor?: string | null;
|
|
12
|
+
badgeImage?: CustomerProfileList['entries'] extends Array<infer Entry> ? Entry extends {
|
|
13
|
+
badgeImage?: infer Image;
|
|
14
|
+
} ? Image : unknown : unknown;
|
|
15
|
+
publicMetadata?: unknown;
|
|
16
|
+
};
|
|
17
|
+
type PublicCustomerProfileList = Omit<CustomerProfileList, 'tenant' | 'visibility' | 'metadata' | 'entries'> & {
|
|
18
|
+
entries?: PublicCustomerProfileListEntry[] | null;
|
|
19
|
+
};
|
|
5
20
|
type PublicPost = Omit<Post, 'authorProfile' | 'lastCommentByProfile'> & {
|
|
6
|
-
authorProfile
|
|
21
|
+
authorProfile?: PublicProfileRelation | null;
|
|
7
22
|
lastCommentByProfile?: PublicProfileRelation | null;
|
|
8
23
|
};
|
|
9
24
|
type PublicComment = Omit<Comment, 'authorProfile'> & {
|
|
@@ -14,6 +29,7 @@ type PublicReaction = Omit<Reaction, 'actorProfile'> & {
|
|
|
14
29
|
};
|
|
15
30
|
type PublicCollectionOverrides = {
|
|
16
31
|
'customer-profiles': PublicCustomerProfile;
|
|
32
|
+
'customer-profile-lists': PublicCustomerProfileList;
|
|
17
33
|
posts: PublicPost;
|
|
18
34
|
comments: PublicComment;
|
|
19
35
|
reactions: PublicReaction;
|
package/dist/ui/form.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { F as Form } from '../payload-types-
|
|
2
|
+
import { F as Form } from '../payload-types-D8-G1PiT.cjs';
|
|
3
3
|
import { RichTextData } from './rich-text.cjs';
|
|
4
4
|
import '@payloadcms/richtext-lexical';
|
|
5
5
|
import '@payloadcms/richtext-lexical/lexical';
|
package/dist/ui/form.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { F as Form } from '../payload-types-
|
|
2
|
+
import { F as Form } from '../payload-types-D8-G1PiT.js';
|
|
3
3
|
import { RichTextData } from './rich-text.js';
|
|
4
4
|
import '@payloadcms/richtext-lexical';
|
|
5
5
|
import '@payloadcms/richtext-lexical/lexical';
|
package/dist/ui/video.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { CSSProperties } from 'react';
|
|
2
2
|
import { MuxPlayerProps, MuxPlayerRefAttributes } from '@mux/mux-player-react';
|
|
3
3
|
export { MuxPlayerRefAttributes as VideoPlayerRef } from '@mux/mux-player-react';
|
|
4
|
-
import { V as Video } from '../payload-types-
|
|
4
|
+
import { V as Video } from '../payload-types-D8-G1PiT.cjs';
|
|
5
5
|
export { e as VideoGifOptions, V as VideoThumbnailOptions, a as getVideoGif, c as getVideoMp4Url, d as getVideoStoryboard, b as getVideoStreamUrl, g as getVideoThumbnail } from '../video-DbLL8yuc.cjs';
|
|
6
6
|
|
|
7
7
|
interface VideoPlayerCSSProperties extends CSSProperties {
|
package/dist/ui/video.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { CSSProperties } from 'react';
|
|
2
2
|
import { MuxPlayerProps, MuxPlayerRefAttributes } from '@mux/mux-player-react';
|
|
3
3
|
export { MuxPlayerRefAttributes as VideoPlayerRef } from '@mux/mux-player-react';
|
|
4
|
-
import { V as Video } from '../payload-types-
|
|
4
|
+
import { V as Video } from '../payload-types-D8-G1PiT.js';
|
|
5
5
|
export { e as VideoGifOptions, V as VideoThumbnailOptions, a as getVideoGif, c as getVideoMp4Url, d as getVideoStoryboard, b as getVideoStreamUrl, g as getVideoThumbnail } from '../video-DbLL8yuc.js';
|
|
6
6
|
|
|
7
7
|
interface VideoPlayerCSSProperties extends CSSProperties {
|
package/dist/webhook.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as Collection } from './const-
|
|
2
|
-
import { C as CollectionType } from './types-
|
|
3
|
-
import './payload-types-
|
|
1
|
+
import { C as Collection } from './const-Cgd4op4V.cjs';
|
|
2
|
+
import { C as CollectionType } from './types-C_kwEIvY.cjs';
|
|
3
|
+
import './payload-types-D8-G1PiT.cjs';
|
|
4
4
|
|
|
5
5
|
type WebhookOperation = string;
|
|
6
6
|
interface WebhookEvent<T extends Collection | string = Collection, TData = T extends Collection ? CollectionType<T> : Record<string, unknown>> {
|
package/dist/webhook.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as Collection } from './const-
|
|
2
|
-
import { C as CollectionType } from './types-
|
|
3
|
-
import './payload-types-
|
|
1
|
+
import { C as Collection } from './const-CMdmNgEs.js';
|
|
2
|
+
import { C as CollectionType } from './types-BQqfXbB2.js';
|
|
3
|
+
import './payload-types-D8-G1PiT.js';
|
|
4
4
|
|
|
5
5
|
type WebhookOperation = string;
|
|
6
6
|
interface WebhookEvent<T extends Collection | string = Collection, TData = T extends Collection ? CollectionType<T> : Record<string, unknown>> {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@01.software/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "01.software SDK",
|
|
5
5
|
"author": "<office@01.works>",
|
|
6
6
|
"keywords": [],
|
|
@@ -158,8 +158,8 @@
|
|
|
158
158
|
"shadcn": "^3.6.3",
|
|
159
159
|
"tsup": "^8.3.7",
|
|
160
160
|
"vitest": "^3.2.3",
|
|
161
|
-
"@repo/
|
|
162
|
-
"@repo/
|
|
161
|
+
"@repo/typescript-config": "0.0.0",
|
|
162
|
+
"@repo/eslint-config": "0.0.0"
|
|
163
163
|
},
|
|
164
164
|
"dependencies": {
|
|
165
165
|
"@payloadcms/richtext-lexical": ">=3.82.0",
|
package/dist/const-CfcjPbOu.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { b as Config } from './payload-types-DeLBmtzd.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Collection type derived from Payload Config.
|
|
5
|
-
* This ensures type safety and automatic synchronization with payload-types.ts
|
|
6
|
-
*/
|
|
7
|
-
type Collection = keyof Config['collections'];
|
|
8
|
-
/**
|
|
9
|
-
* Internal collections that should not be exposed via SDK.
|
|
10
|
-
* Includes Payload system collections and admin-only collections.
|
|
11
|
-
*/
|
|
12
|
-
declare const INTERNAL_COLLECTIONS: readonly ["users", "payload-kv", "payload-locked-documents", "payload-preferences", "payload-migrations", "field-configs", "system-media", "track-assets", "audiences", "email-logs", "api-usage", "tenant-analytics-daily", "analytics-event-schemas", "subscriptions", "billing-history", "order-status-logs", "api-keys", "personal-access-tokens", "tenant-entitlements", "direct-upload-sessions", "webhook-events", "webhook-deliveries", "audit-logs", "plans", "webhooks", "event-registrations"];
|
|
13
|
-
/**
|
|
14
|
-
* Array of all public collection names for runtime use (e.g., Zod enum validation).
|
|
15
|
-
* This is the single source of truth for which collections are publicly accessible via SDK.
|
|
16
|
-
*/
|
|
17
|
-
declare const COLLECTIONS: readonly ["tenants", "tenant-metadata", "tenant-logos", "products", "product-variants", "product-options", "product-option-values", "product-categories", "product-tags", "product-collections", "brands", "brand-logos", "orders", "order-items", "returns", "return-items", "fulfillments", "fulfillment-items", "transactions", "customers", "customer-profiles", "customer-addresses", "customer-groups", "carts", "cart-items", "discounts", "promotions", "shipping-policies", "documents", "document-categories", "document-types", "articles", "article-authors", "article-categories", "article-tags", "playlists", "playlist-categories", "playlist-tags", "tracks", "track-categories", "track-tags", "galleries", "gallery-categories", "gallery-tags", "gallery-items", "links", "link-categories", "link-tags", "canvases", "canvas-node-types", "canvas-edge-types", "canvas-categories", "canvas-tags", "canvas-nodes", "canvas-edges", "videos", "video-categories", "video-tags", "live-streams", "images", "forms", "form-submissions", "posts", "comments", "reactions", "reaction-types", "bookmarks", "post-categories", "reports", "community-bans", "event-calendars", "events", "event-categories", "event-occurrences", "event-tags"];
|
|
18
|
-
/**
|
|
19
|
-
* Public collections available for SDK access.
|
|
20
|
-
* Derived from the COLLECTIONS array (single source of truth).
|
|
21
|
-
*/
|
|
22
|
-
type PublicCollection = (typeof COLLECTIONS)[number];
|
|
23
|
-
|
|
24
|
-
export { type Collection as C, INTERNAL_COLLECTIONS as I, type PublicCollection as P, COLLECTIONS as a };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { b as Config } from './payload-types-DeLBmtzd.cjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Collection type derived from Payload Config.
|
|
5
|
-
* This ensures type safety and automatic synchronization with payload-types.ts
|
|
6
|
-
*/
|
|
7
|
-
type Collection = keyof Config['collections'];
|
|
8
|
-
/**
|
|
9
|
-
* Internal collections that should not be exposed via SDK.
|
|
10
|
-
* Includes Payload system collections and admin-only collections.
|
|
11
|
-
*/
|
|
12
|
-
declare const INTERNAL_COLLECTIONS: readonly ["users", "payload-kv", "payload-locked-documents", "payload-preferences", "payload-migrations", "field-configs", "system-media", "track-assets", "audiences", "email-logs", "api-usage", "tenant-analytics-daily", "analytics-event-schemas", "subscriptions", "billing-history", "order-status-logs", "api-keys", "personal-access-tokens", "tenant-entitlements", "direct-upload-sessions", "webhook-events", "webhook-deliveries", "audit-logs", "plans", "webhooks", "event-registrations"];
|
|
13
|
-
/**
|
|
14
|
-
* Array of all public collection names for runtime use (e.g., Zod enum validation).
|
|
15
|
-
* This is the single source of truth for which collections are publicly accessible via SDK.
|
|
16
|
-
*/
|
|
17
|
-
declare const COLLECTIONS: readonly ["tenants", "tenant-metadata", "tenant-logos", "products", "product-variants", "product-options", "product-option-values", "product-categories", "product-tags", "product-collections", "brands", "brand-logos", "orders", "order-items", "returns", "return-items", "fulfillments", "fulfillment-items", "transactions", "customers", "customer-profiles", "customer-addresses", "customer-groups", "carts", "cart-items", "discounts", "promotions", "shipping-policies", "documents", "document-categories", "document-types", "articles", "article-authors", "article-categories", "article-tags", "playlists", "playlist-categories", "playlist-tags", "tracks", "track-categories", "track-tags", "galleries", "gallery-categories", "gallery-tags", "gallery-items", "links", "link-categories", "link-tags", "canvases", "canvas-node-types", "canvas-edge-types", "canvas-categories", "canvas-tags", "canvas-nodes", "canvas-edges", "videos", "video-categories", "video-tags", "live-streams", "images", "forms", "form-submissions", "posts", "comments", "reactions", "reaction-types", "bookmarks", "post-categories", "reports", "community-bans", "event-calendars", "events", "event-categories", "event-occurrences", "event-tags"];
|
|
18
|
-
/**
|
|
19
|
-
* Public collections available for SDK access.
|
|
20
|
-
* Derived from the COLLECTIONS array (single source of truth).
|
|
21
|
-
*/
|
|
22
|
-
type PublicCollection = (typeof COLLECTIONS)[number];
|
|
23
|
-
|
|
24
|
-
export { type Collection as C, INTERNAL_COLLECTIONS as I, type PublicCollection as P, COLLECTIONS as a };
|