@slotchain/sdk 1.0.0 → 1.1.1

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/src/index.ts CHANGED
@@ -9,6 +9,7 @@ import { FlowClient } from './clients/flow-client';
9
9
  import { StudioClient } from './clients/studio-client';
10
10
  import { NotificationClient } from './clients/notification-client';
11
11
  import { DataQualityClient } from './clients/data-quality-client';
12
+ import { OrganizationClient } from './clients/organization-client';
12
13
  import { setupRequestInterceptor, setupResponseInterceptor, setupErrorInterceptor } from './interceptors';
13
14
  import { setupRetryInterceptor } from './retry';
14
15
  import { SlotlyConfigurationError } from './errors';
@@ -32,6 +33,9 @@ export type {
32
33
  Studio,
33
34
  Notification,
34
35
  DataQualityIssue,
36
+ Organization,
37
+ OrganizationFullConfig,
38
+ GetOrganizationOptions,
35
39
  } from './types/api';
36
40
 
37
41
  // Re-export errors
@@ -97,6 +101,7 @@ export interface SlotlyApi {
97
101
  studio: StudioClient;
98
102
  notification: NotificationClient;
99
103
  dataQuality: DataQualityClient;
104
+ organization: OrganizationClient;
100
105
  }
101
106
 
102
107
  const defaultBaseURL = typeof process !== 'undefined' && process.env?.SLOTLY_API_URL
@@ -289,6 +294,7 @@ export const useSlotly = (options: SlotlyClientOptions): SlotlyApi => {
289
294
  studio: new StudioClient(client),
290
295
  notification: new NotificationClient(client),
291
296
  dataQuality: new DataQualityClient(client),
297
+ organization: new OrganizationClient(client),
292
298
  };
293
299
  };
294
300
 
package/src/types/api.ts CHANGED
@@ -26,7 +26,20 @@ export interface Tenant {
26
26
  id: string;
27
27
  slug: string;
28
28
  name: string;
29
- // TODO: Add actual tenant properties
29
+ primary_domain?: string;
30
+ subdomain?: string;
31
+ custom_domains?: string[];
32
+ branding?: {
33
+ logo?: string;
34
+ colors?: {
35
+ primary?: string;
36
+ secondary?: string;
37
+ };
38
+ };
39
+ is_public?: boolean;
40
+ metadata?: Record<string, unknown>;
41
+ created_at: string;
42
+ updated_at: string;
30
43
  }
31
44
 
32
45
  /**
@@ -166,6 +179,37 @@ export interface DataQualityIssue {
166
179
  // TODO: Add actual data quality issue properties
167
180
  }
168
181
 
182
+ /**
183
+ * Organization type
184
+ */
185
+ export interface Organization {
186
+ id: string;
187
+ slug?: string;
188
+ name: string;
189
+ description?: string;
190
+ metadata?: Record<string, unknown>;
191
+ tenant_slugs?: string[];
192
+ created_at: string;
193
+ updated_at: string;
194
+ }
195
+
196
+ /**
197
+ * Organization with nested tenants
198
+ */
199
+ export interface OrganizationFullConfig extends Organization {
200
+ tenants: Tenant[];
201
+ }
202
+
203
+ /**
204
+ * Options for getting organization
205
+ */
206
+ export interface GetOrganizationOptions {
207
+ includeTenants?: boolean;
208
+ page?: number;
209
+ limit?: number;
210
+ is_public?: boolean;
211
+ }
212
+
169
213
  /**
170
214
  * Full tenant configuration including branding, services, and service items
171
215
  * Service items are nested within each service object (not as a separate top-level array)