@01.software/sdk 0.33.0 → 0.34.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 +214 -22
- package/dist/analytics/react.cjs.map +1 -1
- package/dist/analytics/react.js.map +1 -1
- package/dist/analytics.cjs.map +1 -1
- package/dist/analytics.js.map +1 -1
- package/dist/client.cjs +341 -26
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +7 -6
- package/dist/client.d.ts +7 -6
- package/dist/client.js +341 -26
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-De6eKW1J.d.cts → collection-client-CR2B8c1v.d.cts} +7 -3
- package/dist/{collection-client-B6SlhzIP.d.ts → collection-client-DkREjhQ9.d.ts} +7 -3
- package/dist/{const-sPR2IkCe.d.cts → const-BTvdrXtY.d.cts} +4 -4
- package/dist/{const-DwmSDeWq.d.ts → const-CdqCauHQ.d.ts} +4 -4
- package/dist/index-CjA3U6X3.d.cts +186 -0
- package/dist/index-DK8_NXkh.d.ts +186 -0
- package/dist/index.cjs +1401 -176
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +74 -9
- package/dist/index.d.ts +74 -9
- package/dist/index.js +1401 -176
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-dkeQyrDC.d.cts → payload-types-C7tb7Xbs.d.cts} +208 -52
- package/dist/{payload-types-dkeQyrDC.d.ts → payload-types-C7tb7Xbs.d.ts} +208 -52
- package/dist/query.cjs +194 -35
- package/dist/query.cjs.map +1 -1
- package/dist/query.d.cts +44 -17
- package/dist/query.d.ts +44 -17
- package/dist/query.js +194 -35
- package/dist/query.js.map +1 -1
- 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-CrsPyqEc.d.cts → server-nXOezi4b.d.cts} +22 -6
- package/dist/{server-CrsPyqEc.d.ts → server-nXOezi4b.d.ts} +22 -6
- package/dist/server.cjs +439 -32
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +11 -179
- package/dist/server.d.ts +11 -179
- package/dist/server.js +439 -32
- package/dist/server.js.map +1 -1
- package/dist/{types-Cel_4L9t.d.ts → types-1ylMrCuW.d.ts} +1 -1
- package/dist/{types-B3YT092I.d.cts → types-Bx558PU6.d.cts} +1 -1
- package/dist/{types-BHh0YLmq.d.ts → types-Byo_Rty4.d.ts} +705 -69
- package/dist/{types-BZKxss8Y.d.cts → types-DDhtZI6E.d.cts} +705 -69
- package/dist/ui/canvas/server.cjs +231 -38
- package/dist/ui/canvas/server.cjs.map +1 -1
- package/dist/ui/canvas/server.d.cts +1 -1
- package/dist/ui/canvas/server.d.ts +1 -1
- package/dist/ui/canvas/server.js +221 -38
- package/dist/ui/canvas/server.js.map +1 -1
- package/dist/ui/canvas.cjs +320 -257
- package/dist/ui/canvas.cjs.map +1 -1
- package/dist/ui/canvas.d.cts +5 -19
- package/dist/ui/canvas.d.ts +5 -19
- package/dist/ui/canvas.js +323 -260
- package/dist/ui/canvas.js.map +1 -1
- 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.cjs +2 -1
- package/dist/webhook.cjs.map +1 -1
- package/dist/webhook.d.cts +20 -179
- package/dist/webhook.d.ts +20 -179
- package/dist/webhook.js +2 -1
- package/dist/webhook.js.map +1 -1
- package/package.json +4 -5
package/dist/server.d.cts
CHANGED
|
@@ -1,181 +1,11 @@
|
|
|
1
|
-
import { S as ServerCollectionClient } from './collection-client-
|
|
2
|
-
export { C as CollectionClient } from './collection-client-
|
|
3
|
-
import { B as BaseApi,
|
|
4
|
-
|
|
1
|
+
import { S as ServerCollectionClient } from './collection-client-CR2B8c1v.cjs';
|
|
2
|
+
export { C as CollectionClient } from './collection-client-CR2B8c1v.cjs';
|
|
3
|
+
import { B as BaseApi, l as ServerApiOptions, m as ServerCommerceClient, T as TenantIntrospectionClient, a as CommunityClient, n as BanCustomerParams, o as CommunityBan, U as UnbanCustomerParams, c as ClientState, p as ClientServerConfig, E as EventsClient, q as RootServerClientWithEvents } from './types-DDhtZI6E.cjs';
|
|
4
|
+
export { r as CollectionFieldSchema, s as CollectionSchemaResponse, t as EventGuestCancelParams, u as EventGuestRegistration, v as EventGuestRegistrationResponse, w as EventRegistrationAnswerInput, x as EventRegistrationAttendeeInput, y as EventRegistrationPublic, z as EventRegistrationRegisterParams, F as EventRegistrationRegisterResponse, G as EventsCalendarItem, H as EventsClientOptions, I as EventsDateParam, J as EventsExternalSource, K as EventsLocation, L as EventsOccurrenceLocation, M as EventsRangeEvent, N as EventsRangeOccurrence, O as EventsRangeParams, Q as EventsRangeResponse, V as EventsTaxonomyItem, X as ModerationApi, Y as RootServerClient, Z as TenantFeatureProgressEvidenceValue, _ as TenantFeatureProgressFeature, $ as TenantFeatureProgressGroup, a0 as TenantFeatureProgressInput, a1 as TenantFeatureProgressItem, a2 as TenantFeatureProgressItemState, a3 as TenantFeatureProgressResponse, a4 as TenantFeatureProgressSeverity, a5 as TenantFeatureProgressStatus, a6 as TenantIntrospectionApi, a7 as TenantIntrospectionApiOptions } from './types-DDhtZI6E.cjs';
|
|
5
|
+
import './payload-types-C7tb7Xbs.cjs';
|
|
5
6
|
import './metadata.cjs';
|
|
6
|
-
import './const-
|
|
7
|
-
import './types-
|
|
8
|
-
|
|
9
|
-
type ModerationApiOptions = ServerApiOptions;
|
|
10
|
-
interface CommunityBan {
|
|
11
|
-
id: string;
|
|
12
|
-
customer: string;
|
|
13
|
-
isPermanent?: boolean;
|
|
14
|
-
bannedUntil?: string;
|
|
15
|
-
reason?: string;
|
|
16
|
-
createdAt?: string;
|
|
17
|
-
updatedAt?: string;
|
|
18
|
-
[key: string]: unknown;
|
|
19
|
-
}
|
|
20
|
-
type BanCustomerParams = {
|
|
21
|
-
customerId: string;
|
|
22
|
-
isPermanent?: boolean;
|
|
23
|
-
bannedUntil?: string;
|
|
24
|
-
reason?: string;
|
|
25
|
-
};
|
|
26
|
-
type UnbanCustomerParams = {
|
|
27
|
-
customerId: string;
|
|
28
|
-
};
|
|
29
|
-
declare class ModerationApi extends BaseApi {
|
|
30
|
-
constructor(options: ModerationApiOptions);
|
|
31
|
-
banCustomer(params: BanCustomerParams): Promise<CommunityBan>;
|
|
32
|
-
unbanCustomer(params: UnbanCustomerParams): Promise<{
|
|
33
|
-
success: true;
|
|
34
|
-
}>;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
interface ServerCommerceClientOptions {
|
|
38
|
-
publishableKey?: string;
|
|
39
|
-
secretKey: string;
|
|
40
|
-
apiUrl?: string;
|
|
41
|
-
onRequestId?: (id: string | null) => void;
|
|
42
|
-
}
|
|
43
|
-
declare class ServerCommerceClient {
|
|
44
|
-
readonly product: {
|
|
45
|
-
stockCheck: (params: StockCheckParams) => Promise<StockCheckResponse>;
|
|
46
|
-
listingGroups: (params: ListingGroupsParams) => Promise<ProductListingGroupsResponse>;
|
|
47
|
-
detail: (params: ProductDetailParams) => Promise<ProductDetailResult>;
|
|
48
|
-
previewDetail: (params: ProductDetailPreviewParams, options: ProductDetailPreviewOptions) => Promise<ProductDetail | null>;
|
|
49
|
-
upsert: (params: ProductUpsertParams) => Promise<ProductUpsertResponse>;
|
|
50
|
-
};
|
|
51
|
-
readonly cart: {
|
|
52
|
-
get: (cartId: string) => Promise<Cart>;
|
|
53
|
-
addItem: (params: AddItemParams) => Promise<CartItem>;
|
|
54
|
-
updateItem: (params: UpdateItemParams) => Promise<CartItem>;
|
|
55
|
-
removeItem: (params: RemoveItemParams) => Promise<{
|
|
56
|
-
success: boolean;
|
|
57
|
-
}>;
|
|
58
|
-
applyDiscount: (params: ApplyDiscountParams) => Promise<Cart>;
|
|
59
|
-
removeDiscount: (params: RemoveDiscountParams) => Promise<Cart>;
|
|
60
|
-
clear: (params: ClearCartParams) => Promise<{
|
|
61
|
-
success: boolean;
|
|
62
|
-
}>;
|
|
63
|
-
};
|
|
64
|
-
readonly orders: {
|
|
65
|
-
checkout: (params: CheckoutParams) => Promise<Order>;
|
|
66
|
-
create: (params: CreateOrderParams) => Promise<Order>;
|
|
67
|
-
update: (params: UpdateOrderParams) => Promise<Order>;
|
|
68
|
-
updateTransaction: (params: UpdateTransactionParams) => Promise<Transaction>;
|
|
69
|
-
confirmPayment: (params: ConfirmPaymentParams) => Promise<ConfirmPaymentResponse>;
|
|
70
|
-
createFulfillment: (params: CreateFulfillmentParams) => Promise<Fulfillment>;
|
|
71
|
-
updateFulfillment: (params: UpdateFulfillmentParams) => Promise<Fulfillment>;
|
|
72
|
-
bulkImportFulfillments: (params: BulkImportFulfillmentsParams) => Promise<BulkImportFulfillmentsResponse>;
|
|
73
|
-
createReturn: (params: CreateReturnParams) => Promise<Return>;
|
|
74
|
-
updateReturn: (params: UpdateReturnParams) => Promise<Return>;
|
|
75
|
-
returnWithRefund: (params: ReturnWithRefundParams) => Promise<{
|
|
76
|
-
return: Return;
|
|
77
|
-
transaction: Transaction | null;
|
|
78
|
-
}>;
|
|
79
|
-
};
|
|
80
|
-
readonly discounts: {
|
|
81
|
-
validate: (params: ValidateDiscountParams) => Promise<ValidateDiscountResult>;
|
|
82
|
-
};
|
|
83
|
-
readonly shipping: {
|
|
84
|
-
calculate: (params: CalculateShippingParams) => Promise<CalculateShippingResult>;
|
|
85
|
-
};
|
|
86
|
-
constructor(options: ServerCommerceClientOptions);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
type TenantIntrospectionApiOptions = ServerApiOptions;
|
|
90
|
-
type TenantFeatureProgressFeature = 'ecommerce';
|
|
91
|
-
interface TenantFeatureProgressInput {
|
|
92
|
-
feature: TenantFeatureProgressFeature;
|
|
93
|
-
includeEvidence?: boolean;
|
|
94
|
-
}
|
|
95
|
-
type TenantFeatureProgressStatus = 'ready' | 'attention' | 'blocked';
|
|
96
|
-
type TenantFeatureProgressItemState = 'complete' | 'incomplete' | 'blocked' | 'attention' | 'optional' | 'unknown' | 'manual' | 'not-applicable';
|
|
97
|
-
type TenantFeatureProgressSeverity = 'required' | 'recommended' | 'optional';
|
|
98
|
-
type TenantFeatureProgressEvidenceValue = string | number | boolean | null;
|
|
99
|
-
interface TenantFeatureProgressItem {
|
|
100
|
-
id: string;
|
|
101
|
-
title: string;
|
|
102
|
-
state: TenantFeatureProgressItemState;
|
|
103
|
-
severity: TenantFeatureProgressSeverity;
|
|
104
|
-
summary: string;
|
|
105
|
-
evidence?: Record<string, TenantFeatureProgressEvidenceValue>;
|
|
106
|
-
}
|
|
107
|
-
interface TenantFeatureProgressGroup {
|
|
108
|
-
id: string;
|
|
109
|
-
title: string;
|
|
110
|
-
summary?: string;
|
|
111
|
-
items: TenantFeatureProgressItem[];
|
|
112
|
-
}
|
|
113
|
-
interface TenantFeatureProgressResponse {
|
|
114
|
-
schemaVersion: 1;
|
|
115
|
-
feature: TenantFeatureProgressFeature;
|
|
116
|
-
status: TenantFeatureProgressStatus;
|
|
117
|
-
generatedAt: string;
|
|
118
|
-
tenant: {
|
|
119
|
-
id: string;
|
|
120
|
-
name: string;
|
|
121
|
-
plan: string;
|
|
122
|
-
};
|
|
123
|
-
capability: {
|
|
124
|
-
effectiveFeatures: string[];
|
|
125
|
-
planBlocked: string[];
|
|
126
|
-
closureAdded: string[];
|
|
127
|
-
};
|
|
128
|
-
summary: {
|
|
129
|
-
complete: number;
|
|
130
|
-
total: number;
|
|
131
|
-
blocking: number;
|
|
132
|
-
manual: number;
|
|
133
|
-
unknown: number;
|
|
134
|
-
};
|
|
135
|
-
groups: TenantFeatureProgressGroup[];
|
|
136
|
-
}
|
|
137
|
-
interface CollectionFieldSchema {
|
|
138
|
-
name: string;
|
|
139
|
-
path: string;
|
|
140
|
-
type: string;
|
|
141
|
-
required?: true;
|
|
142
|
-
unique?: true;
|
|
143
|
-
hasMany?: true;
|
|
144
|
-
relationTo?: string | string[];
|
|
145
|
-
options?: Array<{
|
|
146
|
-
label: string;
|
|
147
|
-
value: string;
|
|
148
|
-
}>;
|
|
149
|
-
hidden?: true;
|
|
150
|
-
systemManaged?: true;
|
|
151
|
-
writable?: boolean;
|
|
152
|
-
fields?: CollectionFieldSchema[];
|
|
153
|
-
}
|
|
154
|
-
interface CollectionSchemaResponse {
|
|
155
|
-
contractVersion: 1;
|
|
156
|
-
mode: 'effective';
|
|
157
|
-
collection: {
|
|
158
|
-
slug: string;
|
|
159
|
-
timestamps: boolean;
|
|
160
|
-
alwaysActive: boolean;
|
|
161
|
-
feature: string | null;
|
|
162
|
-
systemFields: string[];
|
|
163
|
-
visibility: {
|
|
164
|
-
collectionHidden: boolean;
|
|
165
|
-
hiddenFields: string[];
|
|
166
|
-
};
|
|
167
|
-
fields: CollectionFieldSchema[];
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
interface TenantIntrospectionClient {
|
|
171
|
-
collectionSchema: (collection: string) => Promise<CollectionSchemaResponse>;
|
|
172
|
-
featureProgress: (params: TenantFeatureProgressInput) => Promise<TenantFeatureProgressResponse>;
|
|
173
|
-
}
|
|
174
|
-
declare class TenantIntrospectionApi extends BaseApi implements TenantIntrospectionClient {
|
|
175
|
-
constructor(options: TenantIntrospectionApiOptions);
|
|
176
|
-
collectionSchema(collection: string): Promise<CollectionSchemaResponse>;
|
|
177
|
-
featureProgress(params: TenantFeatureProgressInput): Promise<TenantFeatureProgressResponse>;
|
|
178
|
-
}
|
|
7
|
+
import './const-BTvdrXtY.cjs';
|
|
8
|
+
import './types-Bx558PU6.cjs';
|
|
179
9
|
|
|
180
10
|
type PreviewDetailParams = {
|
|
181
11
|
collection: string;
|
|
@@ -201,6 +31,7 @@ declare class ServerPreviewClient extends BaseApi {
|
|
|
201
31
|
declare class ServerClient {
|
|
202
32
|
commerce: ServerCommerceClient;
|
|
203
33
|
tenant: TenantIntrospectionClient;
|
|
34
|
+
private _events?;
|
|
204
35
|
community: CommunityClient & {
|
|
205
36
|
moderation: {
|
|
206
37
|
banCustomer: (p: BanCustomerParams) => Promise<CommunityBan>;
|
|
@@ -217,6 +48,7 @@ declare class ServerClient {
|
|
|
217
48
|
protected state: ClientState;
|
|
218
49
|
protected config: ClientServerConfig;
|
|
219
50
|
constructor(options: ClientServerConfig);
|
|
51
|
+
get events(): EventsClient;
|
|
220
52
|
getState(): ClientState;
|
|
221
53
|
getConfig(): Omit<ClientServerConfig, 'secretKey'>;
|
|
222
54
|
}
|
|
@@ -224,6 +56,6 @@ declare class ServerClient {
|
|
|
224
56
|
* Create a server-only client with full read/write access. Requires secretKey.
|
|
225
57
|
* For read-only usage, prefer `createClient()` (no secretKey needed).
|
|
226
58
|
*/
|
|
227
|
-
declare function createServerClient(options: ClientServerConfig):
|
|
59
|
+
declare function createServerClient(options: ClientServerConfig): RootServerClientWithEvents;
|
|
228
60
|
|
|
229
|
-
export { ClientServerConfig,
|
|
61
|
+
export { ClientServerConfig, CommunityClient, EventsClient, type PreviewDetailOptions, type PreviewDetailParams, RootServerClientWithEvents, ServerClient, ServerCollectionClient, ServerCommerceClient, ServerPreviewClient, TenantIntrospectionClient, createServerClient };
|
package/dist/server.d.ts
CHANGED
|
@@ -1,181 +1,11 @@
|
|
|
1
|
-
import { S as ServerCollectionClient } from './collection-client-
|
|
2
|
-
export { C as CollectionClient } from './collection-client-
|
|
3
|
-
import { B as BaseApi,
|
|
4
|
-
|
|
1
|
+
import { S as ServerCollectionClient } from './collection-client-DkREjhQ9.js';
|
|
2
|
+
export { C as CollectionClient } from './collection-client-DkREjhQ9.js';
|
|
3
|
+
import { B as BaseApi, l as ServerApiOptions, m as ServerCommerceClient, T as TenantIntrospectionClient, a as CommunityClient, n as BanCustomerParams, o as CommunityBan, U as UnbanCustomerParams, c as ClientState, p as ClientServerConfig, E as EventsClient, q as RootServerClientWithEvents } from './types-Byo_Rty4.js';
|
|
4
|
+
export { r as CollectionFieldSchema, s as CollectionSchemaResponse, t as EventGuestCancelParams, u as EventGuestRegistration, v as EventGuestRegistrationResponse, w as EventRegistrationAnswerInput, x as EventRegistrationAttendeeInput, y as EventRegistrationPublic, z as EventRegistrationRegisterParams, F as EventRegistrationRegisterResponse, G as EventsCalendarItem, H as EventsClientOptions, I as EventsDateParam, J as EventsExternalSource, K as EventsLocation, L as EventsOccurrenceLocation, M as EventsRangeEvent, N as EventsRangeOccurrence, O as EventsRangeParams, Q as EventsRangeResponse, V as EventsTaxonomyItem, X as ModerationApi, Y as RootServerClient, Z as TenantFeatureProgressEvidenceValue, _ as TenantFeatureProgressFeature, $ as TenantFeatureProgressGroup, a0 as TenantFeatureProgressInput, a1 as TenantFeatureProgressItem, a2 as TenantFeatureProgressItemState, a3 as TenantFeatureProgressResponse, a4 as TenantFeatureProgressSeverity, a5 as TenantFeatureProgressStatus, a6 as TenantIntrospectionApi, a7 as TenantIntrospectionApiOptions } from './types-Byo_Rty4.js';
|
|
5
|
+
import './payload-types-C7tb7Xbs.js';
|
|
5
6
|
import './metadata.js';
|
|
6
|
-
import './const-
|
|
7
|
-
import './types-
|
|
8
|
-
|
|
9
|
-
type ModerationApiOptions = ServerApiOptions;
|
|
10
|
-
interface CommunityBan {
|
|
11
|
-
id: string;
|
|
12
|
-
customer: string;
|
|
13
|
-
isPermanent?: boolean;
|
|
14
|
-
bannedUntil?: string;
|
|
15
|
-
reason?: string;
|
|
16
|
-
createdAt?: string;
|
|
17
|
-
updatedAt?: string;
|
|
18
|
-
[key: string]: unknown;
|
|
19
|
-
}
|
|
20
|
-
type BanCustomerParams = {
|
|
21
|
-
customerId: string;
|
|
22
|
-
isPermanent?: boolean;
|
|
23
|
-
bannedUntil?: string;
|
|
24
|
-
reason?: string;
|
|
25
|
-
};
|
|
26
|
-
type UnbanCustomerParams = {
|
|
27
|
-
customerId: string;
|
|
28
|
-
};
|
|
29
|
-
declare class ModerationApi extends BaseApi {
|
|
30
|
-
constructor(options: ModerationApiOptions);
|
|
31
|
-
banCustomer(params: BanCustomerParams): Promise<CommunityBan>;
|
|
32
|
-
unbanCustomer(params: UnbanCustomerParams): Promise<{
|
|
33
|
-
success: true;
|
|
34
|
-
}>;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
interface ServerCommerceClientOptions {
|
|
38
|
-
publishableKey?: string;
|
|
39
|
-
secretKey: string;
|
|
40
|
-
apiUrl?: string;
|
|
41
|
-
onRequestId?: (id: string | null) => void;
|
|
42
|
-
}
|
|
43
|
-
declare class ServerCommerceClient {
|
|
44
|
-
readonly product: {
|
|
45
|
-
stockCheck: (params: StockCheckParams) => Promise<StockCheckResponse>;
|
|
46
|
-
listingGroups: (params: ListingGroupsParams) => Promise<ProductListingGroupsResponse>;
|
|
47
|
-
detail: (params: ProductDetailParams) => Promise<ProductDetailResult>;
|
|
48
|
-
previewDetail: (params: ProductDetailPreviewParams, options: ProductDetailPreviewOptions) => Promise<ProductDetail | null>;
|
|
49
|
-
upsert: (params: ProductUpsertParams) => Promise<ProductUpsertResponse>;
|
|
50
|
-
};
|
|
51
|
-
readonly cart: {
|
|
52
|
-
get: (cartId: string) => Promise<Cart>;
|
|
53
|
-
addItem: (params: AddItemParams) => Promise<CartItem>;
|
|
54
|
-
updateItem: (params: UpdateItemParams) => Promise<CartItem>;
|
|
55
|
-
removeItem: (params: RemoveItemParams) => Promise<{
|
|
56
|
-
success: boolean;
|
|
57
|
-
}>;
|
|
58
|
-
applyDiscount: (params: ApplyDiscountParams) => Promise<Cart>;
|
|
59
|
-
removeDiscount: (params: RemoveDiscountParams) => Promise<Cart>;
|
|
60
|
-
clear: (params: ClearCartParams) => Promise<{
|
|
61
|
-
success: boolean;
|
|
62
|
-
}>;
|
|
63
|
-
};
|
|
64
|
-
readonly orders: {
|
|
65
|
-
checkout: (params: CheckoutParams) => Promise<Order>;
|
|
66
|
-
create: (params: CreateOrderParams) => Promise<Order>;
|
|
67
|
-
update: (params: UpdateOrderParams) => Promise<Order>;
|
|
68
|
-
updateTransaction: (params: UpdateTransactionParams) => Promise<Transaction>;
|
|
69
|
-
confirmPayment: (params: ConfirmPaymentParams) => Promise<ConfirmPaymentResponse>;
|
|
70
|
-
createFulfillment: (params: CreateFulfillmentParams) => Promise<Fulfillment>;
|
|
71
|
-
updateFulfillment: (params: UpdateFulfillmentParams) => Promise<Fulfillment>;
|
|
72
|
-
bulkImportFulfillments: (params: BulkImportFulfillmentsParams) => Promise<BulkImportFulfillmentsResponse>;
|
|
73
|
-
createReturn: (params: CreateReturnParams) => Promise<Return>;
|
|
74
|
-
updateReturn: (params: UpdateReturnParams) => Promise<Return>;
|
|
75
|
-
returnWithRefund: (params: ReturnWithRefundParams) => Promise<{
|
|
76
|
-
return: Return;
|
|
77
|
-
transaction: Transaction | null;
|
|
78
|
-
}>;
|
|
79
|
-
};
|
|
80
|
-
readonly discounts: {
|
|
81
|
-
validate: (params: ValidateDiscountParams) => Promise<ValidateDiscountResult>;
|
|
82
|
-
};
|
|
83
|
-
readonly shipping: {
|
|
84
|
-
calculate: (params: CalculateShippingParams) => Promise<CalculateShippingResult>;
|
|
85
|
-
};
|
|
86
|
-
constructor(options: ServerCommerceClientOptions);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
type TenantIntrospectionApiOptions = ServerApiOptions;
|
|
90
|
-
type TenantFeatureProgressFeature = 'ecommerce';
|
|
91
|
-
interface TenantFeatureProgressInput {
|
|
92
|
-
feature: TenantFeatureProgressFeature;
|
|
93
|
-
includeEvidence?: boolean;
|
|
94
|
-
}
|
|
95
|
-
type TenantFeatureProgressStatus = 'ready' | 'attention' | 'blocked';
|
|
96
|
-
type TenantFeatureProgressItemState = 'complete' | 'incomplete' | 'blocked' | 'attention' | 'optional' | 'unknown' | 'manual' | 'not-applicable';
|
|
97
|
-
type TenantFeatureProgressSeverity = 'required' | 'recommended' | 'optional';
|
|
98
|
-
type TenantFeatureProgressEvidenceValue = string | number | boolean | null;
|
|
99
|
-
interface TenantFeatureProgressItem {
|
|
100
|
-
id: string;
|
|
101
|
-
title: string;
|
|
102
|
-
state: TenantFeatureProgressItemState;
|
|
103
|
-
severity: TenantFeatureProgressSeverity;
|
|
104
|
-
summary: string;
|
|
105
|
-
evidence?: Record<string, TenantFeatureProgressEvidenceValue>;
|
|
106
|
-
}
|
|
107
|
-
interface TenantFeatureProgressGroup {
|
|
108
|
-
id: string;
|
|
109
|
-
title: string;
|
|
110
|
-
summary?: string;
|
|
111
|
-
items: TenantFeatureProgressItem[];
|
|
112
|
-
}
|
|
113
|
-
interface TenantFeatureProgressResponse {
|
|
114
|
-
schemaVersion: 1;
|
|
115
|
-
feature: TenantFeatureProgressFeature;
|
|
116
|
-
status: TenantFeatureProgressStatus;
|
|
117
|
-
generatedAt: string;
|
|
118
|
-
tenant: {
|
|
119
|
-
id: string;
|
|
120
|
-
name: string;
|
|
121
|
-
plan: string;
|
|
122
|
-
};
|
|
123
|
-
capability: {
|
|
124
|
-
effectiveFeatures: string[];
|
|
125
|
-
planBlocked: string[];
|
|
126
|
-
closureAdded: string[];
|
|
127
|
-
};
|
|
128
|
-
summary: {
|
|
129
|
-
complete: number;
|
|
130
|
-
total: number;
|
|
131
|
-
blocking: number;
|
|
132
|
-
manual: number;
|
|
133
|
-
unknown: number;
|
|
134
|
-
};
|
|
135
|
-
groups: TenantFeatureProgressGroup[];
|
|
136
|
-
}
|
|
137
|
-
interface CollectionFieldSchema {
|
|
138
|
-
name: string;
|
|
139
|
-
path: string;
|
|
140
|
-
type: string;
|
|
141
|
-
required?: true;
|
|
142
|
-
unique?: true;
|
|
143
|
-
hasMany?: true;
|
|
144
|
-
relationTo?: string | string[];
|
|
145
|
-
options?: Array<{
|
|
146
|
-
label: string;
|
|
147
|
-
value: string;
|
|
148
|
-
}>;
|
|
149
|
-
hidden?: true;
|
|
150
|
-
systemManaged?: true;
|
|
151
|
-
writable?: boolean;
|
|
152
|
-
fields?: CollectionFieldSchema[];
|
|
153
|
-
}
|
|
154
|
-
interface CollectionSchemaResponse {
|
|
155
|
-
contractVersion: 1;
|
|
156
|
-
mode: 'effective';
|
|
157
|
-
collection: {
|
|
158
|
-
slug: string;
|
|
159
|
-
timestamps: boolean;
|
|
160
|
-
alwaysActive: boolean;
|
|
161
|
-
feature: string | null;
|
|
162
|
-
systemFields: string[];
|
|
163
|
-
visibility: {
|
|
164
|
-
collectionHidden: boolean;
|
|
165
|
-
hiddenFields: string[];
|
|
166
|
-
};
|
|
167
|
-
fields: CollectionFieldSchema[];
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
interface TenantIntrospectionClient {
|
|
171
|
-
collectionSchema: (collection: string) => Promise<CollectionSchemaResponse>;
|
|
172
|
-
featureProgress: (params: TenantFeatureProgressInput) => Promise<TenantFeatureProgressResponse>;
|
|
173
|
-
}
|
|
174
|
-
declare class TenantIntrospectionApi extends BaseApi implements TenantIntrospectionClient {
|
|
175
|
-
constructor(options: TenantIntrospectionApiOptions);
|
|
176
|
-
collectionSchema(collection: string): Promise<CollectionSchemaResponse>;
|
|
177
|
-
featureProgress(params: TenantFeatureProgressInput): Promise<TenantFeatureProgressResponse>;
|
|
178
|
-
}
|
|
7
|
+
import './const-CdqCauHQ.js';
|
|
8
|
+
import './types-1ylMrCuW.js';
|
|
179
9
|
|
|
180
10
|
type PreviewDetailParams = {
|
|
181
11
|
collection: string;
|
|
@@ -201,6 +31,7 @@ declare class ServerPreviewClient extends BaseApi {
|
|
|
201
31
|
declare class ServerClient {
|
|
202
32
|
commerce: ServerCommerceClient;
|
|
203
33
|
tenant: TenantIntrospectionClient;
|
|
34
|
+
private _events?;
|
|
204
35
|
community: CommunityClient & {
|
|
205
36
|
moderation: {
|
|
206
37
|
banCustomer: (p: BanCustomerParams) => Promise<CommunityBan>;
|
|
@@ -217,6 +48,7 @@ declare class ServerClient {
|
|
|
217
48
|
protected state: ClientState;
|
|
218
49
|
protected config: ClientServerConfig;
|
|
219
50
|
constructor(options: ClientServerConfig);
|
|
51
|
+
get events(): EventsClient;
|
|
220
52
|
getState(): ClientState;
|
|
221
53
|
getConfig(): Omit<ClientServerConfig, 'secretKey'>;
|
|
222
54
|
}
|
|
@@ -224,6 +56,6 @@ declare class ServerClient {
|
|
|
224
56
|
* Create a server-only client with full read/write access. Requires secretKey.
|
|
225
57
|
* For read-only usage, prefer `createClient()` (no secretKey needed).
|
|
226
58
|
*/
|
|
227
|
-
declare function createServerClient(options: ClientServerConfig):
|
|
59
|
+
declare function createServerClient(options: ClientServerConfig): RootServerClientWithEvents;
|
|
228
60
|
|
|
229
|
-
export { ClientServerConfig,
|
|
61
|
+
export { ClientServerConfig, CommunityClient, EventsClient, type PreviewDetailOptions, type PreviewDetailParams, RootServerClientWithEvents, ServerClient, ServerCollectionClient, ServerCommerceClient, ServerPreviewClient, TenantIntrospectionClient, createServerClient };
|