@01.software/sdk 0.74.0 → 0.75.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.
Files changed (55) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +79 -1
  3. package/dist/client.cjs +47 -5
  4. package/dist/client.cjs.map +1 -1
  5. package/dist/client.d.cts +6 -6
  6. package/dist/client.d.ts +6 -6
  7. package/dist/client.js +47 -5
  8. package/dist/client.js.map +1 -1
  9. package/dist/{collection-client-Bb1Wa6T6.d.cts → collection-client-BNC6tUdK.d.cts} +3 -4
  10. package/dist/{collection-client-DBrLM9RR.d.ts → collection-client-CNkBMUHj.d.ts} +3 -4
  11. package/dist/collection-documents-Bl0AF0m0.d.cts +5486 -0
  12. package/dist/collection-documents-Bl0AF0m0.d.ts +5486 -0
  13. package/dist/{const-CkY2zB6J.d.ts → const-CcOT0taO.d.cts} +1 -3
  14. package/dist/{const-DWTSgCkn.d.cts → const-CcOT0taO.d.ts} +1 -3
  15. package/dist/{index-Daoh-98A.d.ts → index-CQsJvMCN.d.ts} +2 -3
  16. package/dist/{index-Di5AybQN.d.cts → index-CfxkqaY9.d.cts} +2 -3
  17. package/dist/index.cjs +48 -5
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +7 -7
  20. package/dist/index.d.ts +7 -7
  21. package/dist/index.js +48 -5
  22. package/dist/index.js.map +1 -1
  23. package/dist/query.cjs +12 -1
  24. package/dist/query.cjs.map +1 -1
  25. package/dist/query.d.cts +5 -5
  26. package/dist/query.d.ts +5 -5
  27. package/dist/query.js +12 -1
  28. package/dist/query.js.map +1 -1
  29. package/dist/realtime.d.cts +1 -2
  30. package/dist/realtime.d.ts +1 -2
  31. package/dist/server.cjs +38 -2
  32. package/dist/server.cjs.map +1 -1
  33. package/dist/server.d.cts +7 -7
  34. package/dist/server.d.ts +7 -7
  35. package/dist/server.js +38 -2
  36. package/dist/server.js.map +1 -1
  37. package/dist/{types-BsJokT6P.d.ts → types-Btxz6NVi.d.ts} +106 -19
  38. package/dist/types-CQw4HXky.d.ts +151 -0
  39. package/dist/{types-evAvqRBj.d.cts → types-DMwRdJ-4.d.cts} +106 -19
  40. package/dist/types-Jr4xTiGs.d.cts +151 -0
  41. package/dist/ui/form.cjs.map +1 -1
  42. package/dist/ui/form.d.cts +1 -1
  43. package/dist/ui/form.d.ts +1 -1
  44. package/dist/ui/form.js.map +1 -1
  45. package/dist/ui/video.cjs.map +1 -1
  46. package/dist/ui/video.d.cts +1 -1
  47. package/dist/ui/video.d.ts +1 -1
  48. package/dist/ui/video.js.map +1 -1
  49. package/dist/webhook.d.cts +7 -5
  50. package/dist/webhook.d.ts +7 -5
  51. package/package.json +1 -1
  52. package/dist/payload-types-zukuL1s_.d.cts +0 -12617
  53. package/dist/payload-types-zukuL1s_.d.ts +0 -12617
  54. package/dist/types-BI7aowdu.d.cts +0 -53
  55. package/dist/types-SsS04wGw.d.ts +0 -53
@@ -1,10 +1,8 @@
1
- import './payload-types-zukuL1s_.js';
2
-
3
1
  /**
4
2
  * Internal collections that should not be exposed via SDK.
5
3
  * Includes Payload system collections and admin-only collections.
6
4
  */
7
- declare const INTERNAL_COLLECTIONS: readonly ["benefit-voucher-definitions", "users", "payload-kv", "payload-locked-documents", "payload-preferences", "payload-migrations", "payload-folders", "field-configs", "system-media", "track-assets", "audiences", "email-logs", "api-usage", "tenant-mcp-usage-daily", "subscriptions", "billing-history", "billing-consent-receipts", "usage-rate-cards", "usage-invoices", "inventory-reservations", "inventory-adjustments", "payment-sessions", "payment-event-inbox", "payment-refund-attempts", "portone-payment-interactions", "commerce-payment-webhook-routes", "commerce-notification-intents", "commerce-idempotency-records", "product-collection-items", "order-status-logs", "fulfillment-events", "tenant-commerce-config", "customer-oauth-clients", "customer-consent-receipts", "customer-group-grants", "api-keys", "personal-access-tokens", "tenant-entitlements", "tenant-purge-jobs", "direct-upload-sessions", "webhook-events", "webhook-deliveries", "webhook-outbox-deliveries", "audit-logs", "plans", "webhooks", "custom-field-definitions", "event-registrations", "event-admission-holds", "event-admission-types", "customer-payment-methods", "tenant-payment-credentials", "membership-unapplied-paid-evidence", "commerce-payment-accounts", "payment-provider-customer-aliases"];
5
+ declare const INTERNAL_COLLECTIONS: readonly ["benefit-voucher-definitions", "users", "payload-kv", "payload-locked-documents", "payload-preferences", "payload-migrations", "payload-folders", "field-configs", "system-media", "track-assets", "audiences", "email-logs", "api-usage", "tenant-mcp-usage-daily", "subscriptions", "billing-history", "billing-consent-receipts", "usage-rate-cards", "usage-invoices", "inventory-reservations", "inventory-adjustments", "payment-sessions", "payment-event-inbox", "payment-refund-attempts", "portone-payment-interactions", "commerce-payment-webhook-routes", "commerce-notification-intents", "commerce-idempotency-records", "product-collection-items", "order-status-logs", "fulfillment-events", "tenant-commerce-config", "customer-oauth-clients", "customer-social-provider-configs", "customer-consent-receipts", "customer-group-grants", "api-keys", "personal-access-tokens", "tenant-entitlements", "tenant-purge-jobs", "direct-upload-sessions", "webhook-events", "webhook-deliveries", "webhook-outbox-deliveries", "audit-logs", "plans", "webhooks", "custom-field-definitions", "event-registrations", "event-admission-holds", "event-admission-types", "customer-payment-methods", "tenant-payment-credentials", "membership-unapplied-paid-evidence", "commerce-payment-accounts", "payment-provider-customer-aliases"];
8
6
  type InternalCollection = (typeof INTERNAL_COLLECTIONS)[number];
9
7
  /**
10
8
  * Array of browser-public collection names for runtime use (e.g., Zod enum validation).
@@ -1,10 +1,8 @@
1
- import './payload-types-zukuL1s_.cjs';
2
-
3
1
  /**
4
2
  * Internal collections that should not be exposed via SDK.
5
3
  * Includes Payload system collections and admin-only collections.
6
4
  */
7
- declare const INTERNAL_COLLECTIONS: readonly ["benefit-voucher-definitions", "users", "payload-kv", "payload-locked-documents", "payload-preferences", "payload-migrations", "payload-folders", "field-configs", "system-media", "track-assets", "audiences", "email-logs", "api-usage", "tenant-mcp-usage-daily", "subscriptions", "billing-history", "billing-consent-receipts", "usage-rate-cards", "usage-invoices", "inventory-reservations", "inventory-adjustments", "payment-sessions", "payment-event-inbox", "payment-refund-attempts", "portone-payment-interactions", "commerce-payment-webhook-routes", "commerce-notification-intents", "commerce-idempotency-records", "product-collection-items", "order-status-logs", "fulfillment-events", "tenant-commerce-config", "customer-oauth-clients", "customer-consent-receipts", "customer-group-grants", "api-keys", "personal-access-tokens", "tenant-entitlements", "tenant-purge-jobs", "direct-upload-sessions", "webhook-events", "webhook-deliveries", "webhook-outbox-deliveries", "audit-logs", "plans", "webhooks", "custom-field-definitions", "event-registrations", "event-admission-holds", "event-admission-types", "customer-payment-methods", "tenant-payment-credentials", "membership-unapplied-paid-evidence", "commerce-payment-accounts", "payment-provider-customer-aliases"];
5
+ declare const INTERNAL_COLLECTIONS: readonly ["benefit-voucher-definitions", "users", "payload-kv", "payload-locked-documents", "payload-preferences", "payload-migrations", "payload-folders", "field-configs", "system-media", "track-assets", "audiences", "email-logs", "api-usage", "tenant-mcp-usage-daily", "subscriptions", "billing-history", "billing-consent-receipts", "usage-rate-cards", "usage-invoices", "inventory-reservations", "inventory-adjustments", "payment-sessions", "payment-event-inbox", "payment-refund-attempts", "portone-payment-interactions", "commerce-payment-webhook-routes", "commerce-notification-intents", "commerce-idempotency-records", "product-collection-items", "order-status-logs", "fulfillment-events", "tenant-commerce-config", "customer-oauth-clients", "customer-social-provider-configs", "customer-consent-receipts", "customer-group-grants", "api-keys", "personal-access-tokens", "tenant-entitlements", "tenant-purge-jobs", "direct-upload-sessions", "webhook-events", "webhook-deliveries", "webhook-outbox-deliveries", "audit-logs", "plans", "webhooks", "custom-field-definitions", "event-registrations", "event-admission-holds", "event-admission-types", "customer-payment-methods", "tenant-payment-credentials", "membership-unapplied-paid-evidence", "commerce-payment-accounts", "payment-provider-customer-aliases"];
8
6
  type InternalCollection = (typeof INTERNAL_COLLECTIONS)[number];
9
7
  /**
10
8
  * Array of browser-public collection names for runtime use (e.g., Zod enum validation).
@@ -1,6 +1,5 @@
1
- import { C as Collection } from './const-CkY2zB6J.js';
2
- import { C as CollectionType } from './types-SsS04wGw.js';
3
- import './payload-types-zukuL1s_.js';
1
+ import { C as Collection } from './const-CcOT0taO.js';
2
+ import { C as CollectionType } from './types-CQw4HXky.js';
4
3
 
5
4
  type WebhookOperation = string;
6
5
  /**
@@ -1,6 +1,5 @@
1
- import { C as Collection } from './const-DWTSgCkn.cjs';
2
- import { C as CollectionType } from './types-BI7aowdu.cjs';
3
- import './payload-types-zukuL1s_.cjs';
1
+ import { C as Collection } from './const-CcOT0taO.cjs';
2
+ import { C as CollectionType } from './types-Jr4xTiGs.cjs';
4
3
 
5
4
  type WebhookOperation = string;
6
5
  /**
package/dist/index.cjs CHANGED
@@ -1479,7 +1479,8 @@ var CUSTOMER_AUTH_ENDPOINT_OPERATIONS = {
1479
1479
  resetPassword: operation("customers", "post", "/reset-password"),
1480
1480
  changePassword: operation("customers", "post", "/change-password"),
1481
1481
  revokeRefresh: operation("customers", "post", "/revoke-refresh"),
1482
- withdraw: operation("customers", "post", "/withdraw")
1482
+ withdraw: operation("customers", "post", "/withdraw"),
1483
+ requestWithdrawalCode: operation("customers", "post", "/withdraw/email-code")
1483
1484
  };
1484
1485
  var EMBEDDED_ADMIN_ENDPOINT_OPERATIONS = {
1485
1486
  show: operation("tenants", "get", "/embedded-admin-app"),
@@ -1493,6 +1494,13 @@ var FIELD_CONFIG_ENDPOINT_OPERATIONS = {
1493
1494
  var EVENTS_ENDPOINT_OPERATIONS = {
1494
1495
  registrations: {
1495
1496
  register: operation("event-registrations", "post", "/register"),
1497
+ requestEmailVerification: operation(
1498
+ "event-registrations",
1499
+ "post",
1500
+ "/request-email-verification"
1501
+ ),
1502
+ emailCancelPage: operation("event-registrations", "get", "/email-cancel"),
1503
+ emailCancel: operation("event-registrations", "post", "/email-cancel"),
1496
1504
  guestLookup: operation("event-registrations", "post", "/guest/lookup"),
1497
1505
  guestLookupByUrl: operation("event-registrations", "get", "/guest/:token"),
1498
1506
  guestCancel: operation("event-registrations", "post", "/guest/cancel"),
@@ -1531,6 +1539,9 @@ var VIDEO_ENDPOINT_OPERATIONS = {
1531
1539
  function resolveOperationTemplate(descriptor) {
1532
1540
  return descriptor.collection ? `/api/${descriptor.collection}${descriptor.path}` : `/api${descriptor.path}`;
1533
1541
  }
1542
+ var PAYMENT_DIAGNOSTIC_ENDPOINT_OPERATIONS = {
1543
+ diagnose: operation("tenants", "get", "/payment-diagnostics")
1544
+ };
1534
1545
  function resolveOperationPath(descriptor, options) {
1535
1546
  const path = resolveOperationTemplate(descriptor).replace(
1536
1547
  /:([A-Za-z][A-Za-z0-9_]*)/g,
@@ -4912,8 +4923,25 @@ var CustomerAuth = class {
4912
4923
  body: JSON.stringify({ refreshToken })
4913
4924
  });
4914
4925
  }
4915
- /** Archive the current password account and clear this client's credentials on success. */
4916
- async withdraw(currentPassword) {
4926
+ /** Send a withdrawal-only code to the current passwordless customer's stored email. */
4927
+ async requestWithdrawalCode() {
4928
+ const token = this.getToken();
4929
+ if (!token) throw new ApiError("Not authenticated", 401);
4930
+ const operation2 = CUSTOMER_AUTH_ENDPOINT_OPERATIONS.requestWithdrawalCode;
4931
+ const result = await this.requestJson(
4932
+ resolveOperationPath(operation2),
4933
+ {
4934
+ method: resolveOperationMethod(operation2),
4935
+ headers: { Authorization: `Bearer ${token}` },
4936
+ body: JSON.stringify({})
4937
+ }
4938
+ );
4939
+ if (!result || typeof result.message !== "string")
4940
+ throw new ApiError("Invalid withdrawal code response", 502);
4941
+ return result;
4942
+ }
4943
+ /** Archive the current account and clear this client's credentials on success. */
4944
+ async withdraw(proof) {
4917
4945
  const token = this.getToken();
4918
4946
  if (!token) throw new ApiError("Not authenticated", 401);
4919
4947
  const operation2 = CUSTOMER_AUTH_ENDPOINT_OPERATIONS.withdraw;
@@ -4922,7 +4950,9 @@ var CustomerAuth = class {
4922
4950
  {
4923
4951
  method: resolveOperationMethod(operation2),
4924
4952
  headers: { Authorization: `Bearer ${token}` },
4925
- body: JSON.stringify({ currentPassword })
4953
+ body: JSON.stringify(
4954
+ typeof proof === "string" ? { currentPassword: proof } : proof
4955
+ )
4926
4956
  }
4927
4957
  );
4928
4958
  if (!result || typeof result.withdrawnAt !== "string" || !Number.isFinite(Date.parse(result.withdrawnAt)))
@@ -7581,6 +7611,15 @@ var EventsClient = class {
7581
7611
  { useCustomerAuth: true }
7582
7612
  );
7583
7613
  }
7614
+ requestRegistrationEmailVerification(params) {
7615
+ const operation2 = EVENTS_ENDPOINT_OPERATIONS.registrations.requestEmailVerification;
7616
+ return this.execute(
7617
+ resolveOperationPath(operation2),
7618
+ resolveOperationMethod(operation2),
7619
+ buildRegistrationRequestBody(params),
7620
+ { useCustomerAuth: true, noStore: true }
7621
+ );
7622
+ }
7584
7623
  getGuestRegistration(token) {
7585
7624
  return this.execute(
7586
7625
  resolveOperationPath(
@@ -7633,7 +7672,10 @@ function buildRegistrationRequestBody(params) {
7633
7672
  occurrence: params.occurrence,
7634
7673
  ...params.quantity !== void 0 && { quantity: params.quantity },
7635
7674
  ...params.attendee !== void 0 && { attendee: params.attendee },
7636
- ...params.answers !== void 0 && { answers: params.answers }
7675
+ ...params.answers !== void 0 && { answers: params.answers },
7676
+ ...params.emailVerification !== void 0 && {
7677
+ emailVerification: params.emailVerification
7678
+ }
7637
7679
  };
7638
7680
  }
7639
7681
  function buildGuestCancelRequestBody(token, params) {
@@ -8236,6 +8278,7 @@ var INTERNAL_COLLECTIONS = [
8236
8278
  "fulfillment-events",
8237
8279
  "tenant-commerce-config",
8238
8280
  "customer-oauth-clients",
8281
+ "customer-social-provider-configs",
8239
8282
  "customer-consent-receipts",
8240
8283
  "customer-group-grants",
8241
8284
  "api-keys",