@sylphx/sdk 0.10.7 → 0.11.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.
@@ -1,4 +1,4 @@
1
- import { SdkBillingPlan, SdkBillingSubscription, SdkConsentType, UserConsent as UserConsent$1, ReferralRewardDefaults as ReferralRewardDefaults$1, WebhookDelivery as WebhookDelivery$2, OrgSdkRole, OrgInvitation, OrgMember, Organization, File as File$1, FileId } from '@sylphx/contract';
1
+ import { SdkBillingPlan, SdkBillingSubscription, SdkConsentType, UserConsent as UserConsent$1, ReferralRewardDefaults as ReferralRewardDefaults$1, WebhookDelivery as WebhookDelivery$2, OrgSdkRole, OrgInvitation, OrgMember, CreateOrgInput as CreateOrgInput$1, Organization, File as File$1, FileId } from '@sylphx/contract';
2
2
  export { Organization, File as StorageFile, FileId as StorageFileId } from '@sylphx/contract';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
@@ -2466,6 +2466,7 @@ type OrganizationMember = Omit<OrgMember, 'role'> & {
2466
2466
  };
2467
2467
  type OrganizationInvitation = OrgInvitation;
2468
2468
  type OrgRole = OrgSdkRole;
2469
+ type CreateOrgInput = CreateOrgInput$1;
2469
2470
 
2470
2471
  /**
2471
2472
  * OAuth SDK — customer-app-facing social login (ADR-089 Phase 4a)
@@ -2834,11 +2835,7 @@ interface UseOrganizationReturn {
2834
2835
  /** Switch to a different organization and refresh the active session token. */
2835
2836
  switchOrg: (orgIdOrSlug: string | null) => Promise<void>;
2836
2837
  /** Create a new organization */
2837
- createOrganization: (data: {
2838
- name: string;
2839
- slug?: string;
2840
- email?: string;
2841
- }) => Promise<Organization>;
2838
+ createOrganization: (data: CreateOrgInput) => Promise<Organization>;
2842
2839
  /** Update current organization */
2843
2840
  updateOrganization: (data: {
2844
2841
  name?: string;
@@ -3954,6 +3951,7 @@ declare function useAIContext(): AIContextValue;
3954
3951
  /** Job type with all optional fields for flexibility */
3955
3952
  interface Job {
3956
3953
  id: string;
3954
+ scheduleId?: string | null;
3957
3955
  name: string | null;
3958
3956
  type: string;
3959
3957
  status: JobStatus;
@@ -3972,8 +3970,6 @@ interface Job {
3972
3970
  /** Result of checkStatus() for the Tasks service */
3973
3971
  interface TasksStatusResult {
3974
3972
  available: boolean;
3975
- configured: boolean;
3976
- status: string;
3977
3973
  }
3978
3974
  /** @deprecated Use TaskStatusFilter */
3979
3975
  type JobStatusFilter = TaskStatusFilter$1;
@@ -13586,7 +13582,7 @@ interface StreamMessage<T = unknown> {
13586
13582
  /**
13587
13583
  * Real-time Streaming Hooks
13588
13584
  *
13589
- * SSE-based real-time subscriptions for Redis Streams.
13585
+ * SSE-based real-time subscriptions for managed durable streams.
13590
13586
  * Automatic reconnection, message history, and optimistic updates.
13591
13587
  *
13592
13588
  * @example
@@ -13759,7 +13755,7 @@ interface KvZMember {
13759
13755
  /**
13760
13756
  * KV (Key-Value Store) React Hooks
13761
13757
  *
13762
- * Client-side hooks for key-value operations via Upstash Redis.
13758
+ * Client-side hooks for managed key-value operations.
13763
13759
  * Provides React Query integration for caching and state management.
13764
13760
  *
13765
13761
  * @example
@@ -1448,8 +1448,9 @@ async function getOrganization(config2, orgIdOrSlug) {
1448
1448
  return callApi(config2, `/orgs/${orgIdOrSlug}`);
1449
1449
  }
1450
1450
  async function createOrganization(config2, input) {
1451
- return callApi(config2, "/orgs", {
1452
- method: "POST",
1451
+ const endpoint = organizationsEndpoints.create;
1452
+ return callApi(config2, endpoint.path, {
1453
+ method: endpoint.method,
1453
1454
  body: input
1454
1455
  });
1455
1456
  }
@@ -5471,8 +5472,7 @@ function OrganizationSwitcherInner({
5471
5472
  if (!newOrgName.trim()) return;
5472
5473
  setError(null);
5473
5474
  try {
5474
- const slug = newOrgName.toLowerCase().replace(/[^a-z0-9]+/g, "-");
5475
- const newOrg = await createOrganization2({ name: newOrgName, slug });
5475
+ const newOrg = await createOrganization2({ name: newOrgName.trim() });
5476
5476
  setNewOrgName("");
5477
5477
  setIsCreating(false);
5478
5478
  setIsOpen(false);