@membranehq/sdk 0.17.1 → 0.17.3

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.
@@ -20,10 +20,28 @@ export declare const ClientToken: z.ZodObject<{
20
20
  }>;
21
21
  grantId: z.ZodOptional<z.ZodString>;
22
22
  grantName: z.ZodOptional<z.ZodString>;
23
- accessToken: z.ZodOptional<z.ZodString>;
23
+ connectedProductId: z.ZodOptional<z.ZodString>;
24
24
  createdAt: z.ZodString;
25
25
  }, z.core.$strip>;
26
26
  export type ClientToken = z.infer<typeof ClientToken>;
27
+ export declare const CreateClientTokenResponse: z.ZodObject<{
28
+ id: z.ZodString;
29
+ workspaceId: z.ZodOptional<z.ZodString>;
30
+ platformUserId: z.ZodOptional<z.ZodString>;
31
+ tenantId: z.ZodOptional<z.ZodString>;
32
+ grantType: z.ZodEnum<{
33
+ api: "api";
34
+ "mcp-oauth": "mcp-oauth";
35
+ "cli-oauth": "cli-oauth";
36
+ "agent-session": "agent-session";
37
+ }>;
38
+ grantId: z.ZodOptional<z.ZodString>;
39
+ grantName: z.ZodOptional<z.ZodString>;
40
+ connectedProductId: z.ZodOptional<z.ZodString>;
41
+ createdAt: z.ZodString;
42
+ accessToken: z.ZodString;
43
+ }, z.core.$strip>;
44
+ export type CreateClientTokenResponse = z.infer<typeof CreateClientTokenResponse>;
27
45
  export declare const CreateClientTokenRequest: z.ZodObject<{
28
46
  grantType: z.ZodEnum<{
29
47
  api: "api";
@@ -34,6 +52,7 @@ export declare const CreateClientTokenRequest: z.ZodObject<{
34
52
  grantId: z.ZodString;
35
53
  grantName: z.ZodString;
36
54
  tenantId: z.ZodOptional<z.ZodString>;
55
+ productKey: z.ZodOptional<z.ZodString>;
37
56
  }, z.core.$strip>;
38
57
  export type CreateClientTokenRequest = z.infer<typeof CreateClientTokenRequest>;
39
58
  export declare const ClientTokenListResponse: z.ZodObject<{
@@ -50,7 +69,7 @@ export declare const ClientTokenListResponse: z.ZodObject<{
50
69
  }>;
51
70
  grantId: z.ZodOptional<z.ZodString>;
52
71
  grantName: z.ZodOptional<z.ZodString>;
53
- accessToken: z.ZodOptional<z.ZodString>;
72
+ connectedProductId: z.ZodOptional<z.ZodString>;
54
73
  createdAt: z.ZodString;
55
74
  }, z.core.$strip>>;
56
75
  }, z.core.$strip>;
@@ -9,7 +9,7 @@ export declare const OAuthTokenResponse: z.ZodObject<{
9
9
  token_type: z.ZodString;
10
10
  expires_in: z.ZodNumber;
11
11
  refresh_token: z.ZodOptional<z.ZodString>;
12
- default_workspace_id: z.ZodOptional<z.ZodString>;
13
- default_tenant_id: z.ZodOptional<z.ZodString>;
12
+ default_workspace_key: z.ZodOptional<z.ZodString>;
13
+ default_tenant_key: z.ZodOptional<z.ZodString>;
14
14
  }, z.core.$strip>;
15
15
  export type OAuthTokenResponse = z.infer<typeof OAuthTokenResponse>;
@@ -179,9 +179,9 @@ export declare const FullOrgUser: z.ZodObject<{
179
179
  ineligibilityReason: z.ZodOptional<z.ZodEnum<{
180
180
  disposable: "disposable";
181
181
  blockedDomain: "blockedDomain";
182
- notCompanyEmail: "notCompanyEmail";
183
182
  }>>;
184
183
  emailVerified: z.ZodOptional<z.ZodBoolean>;
184
+ isCompanyEmail: z.ZodOptional<z.ZodBoolean>;
185
185
  }, z.core.$strip>;
186
186
  org: z.ZodObject<{
187
187
  id: z.ZodString;
@@ -316,9 +316,9 @@ export declare const AccountResponse: z.ZodObject<{
316
316
  ineligibilityReason: z.ZodOptional<z.ZodEnum<{
317
317
  disposable: "disposable";
318
318
  blockedDomain: "blockedDomain";
319
- notCompanyEmail: "notCompanyEmail";
320
319
  }>>;
321
320
  emailVerified: z.ZodOptional<z.ZodBoolean>;
321
+ isCompanyEmail: z.ZodOptional<z.ZodBoolean>;
322
322
  }, z.core.$strip>>;
323
323
  workspace: z.ZodOptional<z.ZodObject<{
324
324
  id: z.ZodString;
@@ -2,7 +2,6 @@ import { z } from 'zod';
2
2
  declare const IneligibilityReasonSchema: z.ZodEnum<{
3
3
  disposable: "disposable";
4
4
  blockedDomain: "blockedDomain";
5
- notCompanyEmail: "notCompanyEmail";
6
5
  }>;
7
6
  export type IneligibilityReason = z.infer<typeof IneligibilityReasonSchema>;
8
7
  export declare const PlatformUser: z.ZodObject<{
@@ -14,7 +13,6 @@ export declare const PlatformUser: z.ZodObject<{
14
13
  ineligibilityReason: z.ZodOptional<z.ZodEnum<{
15
14
  disposable: "disposable";
16
15
  blockedDomain: "blockedDomain";
17
- notCompanyEmail: "notCompanyEmail";
18
16
  }>>;
19
17
  emailVerified: z.ZodOptional<z.ZodBoolean>;
20
18
  }, z.core.$strip>;
@@ -33,9 +31,9 @@ export declare const FullPlatformUser: z.ZodObject<{
33
31
  ineligibilityReason: z.ZodOptional<z.ZodEnum<{
34
32
  disposable: "disposable";
35
33
  blockedDomain: "blockedDomain";
36
- notCompanyEmail: "notCompanyEmail";
37
34
  }>>;
38
35
  emailVerified: z.ZodOptional<z.ZodBoolean>;
36
+ isCompanyEmail: z.ZodOptional<z.ZodBoolean>;
39
37
  }, z.core.$strip>;
40
38
  export type FullPlatformUser = z.infer<typeof FullPlatformUser>;
41
39
  export {};
@@ -0,0 +1,83 @@
1
+ import { z } from 'zod';
2
+ export declare const CreateConnectedProductRequest: z.ZodObject<{
3
+ name: z.ZodString;
4
+ type: z.ZodEnum<{
5
+ app: "app";
6
+ "ai-agent": "ai-agent";
7
+ }>;
8
+ audience: z.ZodOptional<z.ZodEnum<{
9
+ customers: "customers";
10
+ personal: "personal";
11
+ }>>;
12
+ parameters: z.ZodOptional<z.ZodObject<{
13
+ agentType: z.ZodOptional<z.ZodEnum<{
14
+ custom: "custom";
15
+ openclaw: "openclaw";
16
+ claude: "claude";
17
+ chatgpt: "chatgpt";
18
+ }>>;
19
+ }, z.core.$strip>>;
20
+ }, z.core.$strip>;
21
+ export type CreateConnectedProductRequest = z.infer<typeof CreateConnectedProductRequest>;
22
+ export declare const UpdateConnectedProductRequest: z.ZodObject<{
23
+ name: z.ZodOptional<z.ZodString>;
24
+ type: z.ZodOptional<z.ZodEnum<{
25
+ app: "app";
26
+ "ai-agent": "ai-agent";
27
+ }>>;
28
+ audience: z.ZodOptional<z.ZodEnum<{
29
+ customers: "customers";
30
+ personal: "personal";
31
+ }>>;
32
+ parameters: z.ZodOptional<z.ZodObject<{
33
+ agentType: z.ZodOptional<z.ZodEnum<{
34
+ custom: "custom";
35
+ openclaw: "openclaw";
36
+ claude: "claude";
37
+ chatgpt: "chatgpt";
38
+ }>>;
39
+ }, z.core.$strip>>;
40
+ }, z.core.$strip>;
41
+ export type UpdateConnectedProductRequest = z.infer<typeof UpdateConnectedProductRequest>;
42
+ export declare const FindConnectedProductsQuery: z.ZodObject<{
43
+ type: z.ZodOptional<z.ZodEnum<{
44
+ app: "app";
45
+ "ai-agent": "ai-agent";
46
+ }>>;
47
+ audience: z.ZodOptional<z.ZodEnum<{
48
+ customers: "customers";
49
+ personal: "personal";
50
+ }>>;
51
+ key: z.ZodOptional<z.ZodString>;
52
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
53
+ cursor: z.ZodOptional<z.ZodString>;
54
+ search: z.ZodOptional<z.ZodString>;
55
+ includeArchived: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
56
+ }, z.core.$strip>;
57
+ export type FindConnectedProductsQuery = z.infer<typeof FindConnectedProductsQuery>;
58
+ export declare const ConnectedProductApiResponse: z.ZodObject<{
59
+ id: z.ZodString;
60
+ name: z.ZodString;
61
+ key: z.ZodString;
62
+ type: z.ZodEnum<{
63
+ app: "app";
64
+ "ai-agent": "ai-agent";
65
+ }>;
66
+ audience: z.ZodOptional<z.ZodEnum<{
67
+ customers: "customers";
68
+ personal: "personal";
69
+ }>>;
70
+ parameters: z.ZodOptional<z.ZodObject<{
71
+ agentType: z.ZodOptional<z.ZodEnum<{
72
+ custom: "custom";
73
+ openclaw: "openclaw";
74
+ claude: "claude";
75
+ chatgpt: "chatgpt";
76
+ }>>;
77
+ }, z.core.$strip>>;
78
+ isConnected: z.ZodOptional<z.ZodBoolean>;
79
+ lastApiRequestDate: z.ZodOptional<z.ZodString>;
80
+ createdAt: z.ZodOptional<z.ZodString>;
81
+ archivedAt: z.ZodOptional<z.ZodString>;
82
+ }, z.core.$strip>;
83
+ export type ConnectedProductApiResponse = z.infer<typeof ConnectedProductApiResponse>;
@@ -44,5 +44,21 @@ export declare const CustomerApiResponse: z.ZodObject<{
44
44
  archivedAt: z.ZodOptional<z.ZodString>;
45
45
  }, z.core.$strip>;
46
46
  export type CustomerApiResponse = z.infer<typeof CustomerApiResponse>;
47
+ export declare const TenantSelfResponse: z.ZodObject<{
48
+ id: z.ZodString;
49
+ name: z.ZodString;
50
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
51
+ internalId: z.ZodString;
52
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
53
+ credentials: z.ZodOptional<z.ZodAny>;
54
+ lastActiveAt: z.ZodOptional<z.ZodString>;
55
+ isTest: z.ZodOptional<z.ZodBoolean>;
56
+ isBillable: z.ZodOptional<z.ZodBoolean>;
57
+ isActive: z.ZodOptional<z.ZodBoolean>;
58
+ createdAt: z.ZodOptional<z.ZodString>;
59
+ archivedAt: z.ZodOptional<z.ZodString>;
60
+ workspaceKey: z.ZodOptional<z.ZodString>;
61
+ }, z.core.$strip>;
62
+ export type TenantSelfResponse = z.infer<typeof TenantSelfResponse>;
47
63
  export type Customer = CustomerApiResponse;
48
64
  export type User = Customer;
@@ -25,3 +25,4 @@ export * from './external-event-subscriptions-api';
25
25
  export * from './app-event-log-records-api';
26
26
  export * from './external-api-logs-api';
27
27
  export * from './incoming-webhooks-api';
28
+ export * from './connected-products-api';
@@ -0,0 +1,58 @@
1
+ import { z } from 'zod';
2
+ export declare const ConnectedProductType: z.ZodEnum<{
3
+ app: "app";
4
+ "ai-agent": "ai-agent";
5
+ }>;
6
+ export type ConnectedProductType = z.infer<typeof ConnectedProductType>;
7
+ export declare const ConnectedProductAudience: z.ZodEnum<{
8
+ customers: "customers";
9
+ personal: "personal";
10
+ }>;
11
+ export type ConnectedProductAudience = z.infer<typeof ConnectedProductAudience>;
12
+ export declare const AiAgentAudience: z.ZodEnum<{
13
+ customers: "customers";
14
+ personal: "personal";
15
+ }>;
16
+ export type AiAgentAudience = ConnectedProductAudience;
17
+ export declare const AiAgentType: z.ZodEnum<{
18
+ custom: "custom";
19
+ openclaw: "openclaw";
20
+ claude: "claude";
21
+ chatgpt: "chatgpt";
22
+ }>;
23
+ export type AiAgentType = z.infer<typeof AiAgentType>;
24
+ export declare const AiAgentParameters: z.ZodObject<{
25
+ agentType: z.ZodOptional<z.ZodEnum<{
26
+ custom: "custom";
27
+ openclaw: "openclaw";
28
+ claude: "claude";
29
+ chatgpt: "chatgpt";
30
+ }>>;
31
+ }, z.core.$strip>;
32
+ export type AiAgentParameters = z.infer<typeof AiAgentParameters>;
33
+ export declare const BaseConnectedProduct: z.ZodObject<{
34
+ id: z.ZodString;
35
+ name: z.ZodString;
36
+ key: z.ZodString;
37
+ type: z.ZodEnum<{
38
+ app: "app";
39
+ "ai-agent": "ai-agent";
40
+ }>;
41
+ audience: z.ZodOptional<z.ZodEnum<{
42
+ customers: "customers";
43
+ personal: "personal";
44
+ }>>;
45
+ parameters: z.ZodOptional<z.ZodObject<{
46
+ agentType: z.ZodOptional<z.ZodEnum<{
47
+ custom: "custom";
48
+ openclaw: "openclaw";
49
+ claude: "claude";
50
+ chatgpt: "chatgpt";
51
+ }>>;
52
+ }, z.core.$strip>>;
53
+ isConnected: z.ZodOptional<z.ZodBoolean>;
54
+ lastApiRequestDate: z.ZodOptional<z.ZodString>;
55
+ createdAt: z.ZodOptional<z.ZodString>;
56
+ archivedAt: z.ZodOptional<z.ZodString>;
57
+ }, z.core.$strip>;
58
+ export type BaseConnectedProduct = z.infer<typeof BaseConnectedProduct>;
@@ -12,6 +12,7 @@ export declare const CreateConnectionRequestPayload: z.ZodObject<{
12
12
  name: z.ZodOptional<z.ZodString>;
13
13
  allowMultipleConnections: z.ZodOptional<z.ZodBoolean>;
14
14
  connectorParameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
15
+ redirectUri: z.ZodOptional<z.ZodString>;
15
16
  }, z.core.$strip>;
16
17
  export type CreateConnectionRequestPayload = z.infer<typeof CreateConnectionRequestPayload>;
17
18
  export declare const ConnectionRequest: z.ZodObject<{
@@ -25,6 +26,7 @@ export declare const ConnectionRequest: z.ZodObject<{
25
26
  name: z.ZodOptional<z.ZodString>;
26
27
  allowMultipleConnections: z.ZodOptional<z.ZodBoolean>;
27
28
  connectorParameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
29
+ redirectUri: z.ZodOptional<z.ZodString>;
28
30
  status: z.ZodEnum<{
29
31
  success: "success";
30
32
  error: "error";
@@ -20,3 +20,4 @@ export * from './external-event-subscriptions';
20
20
  export * from './external-event-log-records';
21
21
  export * from './external-event-pulls';
22
22
  export * from './action-run-log-records';
23
+ export * from './connected-products';
@@ -36,7 +36,8 @@ export declare enum WorkspaceElementType {
36
36
  ExternalEventLogRecord = "external-event-log-record",
37
37
  ExternalEventPull = "external-event-pull",
38
38
  Screen = "screen",
39
- ActionRunLogRecord = "action-run-log-record"
39
+ ActionRunLogRecord = "action-run-log-record",
40
+ ConnectedProduct = "connected-product"
40
41
  }
41
42
  export declare enum WorkspaceEventType {
42
43
  ConnectionCreated = "connection.created",
@@ -14,12 +14,19 @@ export interface WorkspaceExportComparison {
14
14
  [WorkspaceElementChangeType.UPDATE]: Set<string>;
15
15
  [WorkspaceElementChangeType.DELETE]: Set<string>;
16
16
  }
17
+ export interface WorkspaceElementChangeInfo {
18
+ elementType: WorkspaceElementType;
19
+ path: string;
20
+ }
17
21
  export interface WorkspaceExportComparisonResult {
18
22
  comparison: WorkspaceExportComparison;
23
+ changes: Record<string, WorkspaceElementChangeInfo>;
19
24
  sourceUuidByTargetUuid: Map<string, string>;
25
+ diff?: string;
20
26
  }
21
27
  export interface WorkspaceExportComparisonOptions {
22
28
  includeDeletions?: boolean;
29
+ includeDiff?: boolean;
23
30
  }
24
31
  export declare function compareWorkspaceExports(baseExport: Partial<WorkspaceExport>, targetExport: Partial<WorkspaceExport>, options?: WorkspaceExportComparisonOptions): WorkspaceExportComparisonResult;
25
32
  export declare function getElementSelector(type: WorkspaceElementType, key: string, integrationIdentifier?: string): string;