@superblocksteam/shared 0.9562.5 → 0.9563.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/dist/constants.js +2 -1
- package/dist/constants.js.map +1 -1
- package/dist/constants.test.js +9 -1
- package/dist/constants.test.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/org-features/index.d.ts +44 -0
- package/dist/org-features/index.d.ts.map +1 -0
- package/dist/org-features/index.js +73 -0
- package/dist/org-features/index.js.map +1 -0
- package/dist/org-features/index.test.d.ts +2 -0
- package/dist/org-features/index.test.d.ts.map +1 -0
- package/dist/org-features/index.test.js +39 -0
- package/dist/org-features/index.test.js.map +1 -0
- package/dist/plugins/templates/bigquery.d.ts.map +1 -1
- package/dist/plugins/templates/bigquery.js +225 -1
- package/dist/plugins/templates/bigquery.js.map +1 -1
- package/dist/plugins/templates/databricks.d.ts.map +1 -1
- package/dist/plugins/templates/databricks.js +10 -0
- package/dist/plugins/templates/databricks.js.map +1 -1
- package/dist/plugins/templates/salesforce.d.ts +4 -0
- package/dist/plugins/templates/salesforce.d.ts.map +1 -1
- package/dist/plugins/templates/salesforce.js +207 -18
- package/dist/plugins/templates/salesforce.js.map +1 -1
- package/dist/plugins/templates/shared/auth.d.ts +12 -1
- package/dist/plugins/templates/shared/auth.d.ts.map +1 -1
- package/dist/plugins/templates/shared/auth.js +19 -4
- package/dist/plugins/templates/shared/auth.js.map +1 -1
- package/dist/socket/protocol.d.ts +4 -1
- package/dist/socket/protocol.d.ts.map +1 -1
- package/dist/socket/tracedSocket.d.ts +15 -0
- package/dist/socket/tracedSocket.d.ts.map +1 -1
- package/dist/socket/tracedSocket.js +15 -0
- package/dist/socket/tracedSocket.js.map +1 -1
- package/dist/types/ai/index.d.ts +2 -1
- package/dist/types/ai/index.d.ts.map +1 -1
- package/dist/types/ai/index.js +1 -0
- package/dist/types/ai/index.js.map +1 -1
- package/dist/types/datasource/auth.d.ts +1 -0
- package/dist/types/datasource/auth.d.ts.map +1 -1
- package/dist/types/datasource/auth.js +2 -0
- package/dist/types/datasource/auth.js.map +1 -1
- package/dist/types/datasource/index.d.ts +17 -6
- package/dist/types/datasource/index.d.ts.map +1 -1
- package/dist/types/datasource/index.js.map +1 -1
- package/dist/types/fact/fact.d.ts +52 -0
- package/dist/types/fact/fact.d.ts.map +1 -0
- package/dist/types/fact/fact.js +20 -0
- package/dist/types/fact/fact.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/integration/index.d.ts +6 -2
- package/dist/types/integration/index.d.ts.map +1 -1
- package/dist/types/integration/index.js +6 -2
- package/dist/types/integration/index.js.map +1 -1
- package/dist/types/organization/index.d.ts +5 -1
- package/dist/types/organization/index.d.ts.map +1 -1
- package/dist/types/organization/index.js +7 -3
- package/dist/types/organization/index.js.map +1 -1
- package/dist/types/rbac/index.d.ts +6 -0
- package/dist/types/rbac/index.d.ts.map +1 -1
- package/dist/types/rbac/index.js +6 -1
- package/dist/types/rbac/index.js.map +1 -1
- package/dist-esm/constants.js +2 -1
- package/dist-esm/constants.js.map +1 -1
- package/dist-esm/constants.test.js +9 -1
- package/dist-esm/constants.test.js.map +1 -1
- package/dist-esm/index.d.ts +1 -0
- package/dist-esm/index.d.ts.map +1 -1
- package/dist-esm/index.js +1 -0
- package/dist-esm/index.js.map +1 -1
- package/dist-esm/org-features/index.d.ts +44 -0
- package/dist-esm/org-features/index.d.ts.map +1 -0
- package/dist-esm/org-features/index.js +69 -0
- package/dist-esm/org-features/index.js.map +1 -0
- package/dist-esm/org-features/index.test.d.ts +2 -0
- package/dist-esm/org-features/index.test.d.ts.map +1 -0
- package/dist-esm/org-features/index.test.js +37 -0
- package/dist-esm/org-features/index.test.js.map +1 -0
- package/dist-esm/plugins/templates/bigquery.d.ts.map +1 -1
- package/dist-esm/plugins/templates/bigquery.js +226 -2
- package/dist-esm/plugins/templates/bigquery.js.map +1 -1
- package/dist-esm/plugins/templates/databricks.d.ts.map +1 -1
- package/dist-esm/plugins/templates/databricks.js +10 -0
- package/dist-esm/plugins/templates/databricks.js.map +1 -1
- package/dist-esm/plugins/templates/salesforce.d.ts +4 -0
- package/dist-esm/plugins/templates/salesforce.d.ts.map +1 -1
- package/dist-esm/plugins/templates/salesforce.js +193 -4
- package/dist-esm/plugins/templates/salesforce.js.map +1 -1
- package/dist-esm/plugins/templates/shared/auth.d.ts +12 -1
- package/dist-esm/plugins/templates/shared/auth.d.ts.map +1 -1
- package/dist-esm/plugins/templates/shared/auth.js +17 -2
- package/dist-esm/plugins/templates/shared/auth.js.map +1 -1
- package/dist-esm/socket/protocol.d.ts +4 -1
- package/dist-esm/socket/protocol.d.ts.map +1 -1
- package/dist-esm/socket/tracedSocket.d.ts +15 -0
- package/dist-esm/socket/tracedSocket.d.ts.map +1 -1
- package/dist-esm/socket/tracedSocket.js +15 -0
- package/dist-esm/socket/tracedSocket.js.map +1 -1
- package/dist-esm/types/ai/index.d.ts +2 -1
- package/dist-esm/types/ai/index.d.ts.map +1 -1
- package/dist-esm/types/ai/index.js +1 -0
- package/dist-esm/types/ai/index.js.map +1 -1
- package/dist-esm/types/datasource/auth.d.ts +1 -0
- package/dist-esm/types/datasource/auth.d.ts.map +1 -1
- package/dist-esm/types/datasource/auth.js +2 -0
- package/dist-esm/types/datasource/auth.js.map +1 -1
- package/dist-esm/types/datasource/index.d.ts +17 -6
- package/dist-esm/types/datasource/index.d.ts.map +1 -1
- package/dist-esm/types/datasource/index.js.map +1 -1
- package/dist-esm/types/fact/fact.d.ts +52 -0
- package/dist-esm/types/fact/fact.d.ts.map +1 -0
- package/dist-esm/types/fact/fact.js +17 -0
- package/dist-esm/types/fact/fact.js.map +1 -0
- package/dist-esm/types/index.d.ts +1 -0
- package/dist-esm/types/index.d.ts.map +1 -1
- package/dist-esm/types/index.js +1 -0
- package/dist-esm/types/index.js.map +1 -1
- package/dist-esm/types/integration/index.d.ts +6 -2
- package/dist-esm/types/integration/index.d.ts.map +1 -1
- package/dist-esm/types/integration/index.js +6 -2
- package/dist-esm/types/integration/index.js.map +1 -1
- package/dist-esm/types/organization/index.d.ts +5 -1
- package/dist-esm/types/organization/index.d.ts.map +1 -1
- package/dist-esm/types/organization/index.js +6 -2
- package/dist-esm/types/organization/index.js.map +1 -1
- package/dist-esm/types/rbac/index.d.ts +6 -0
- package/dist-esm/types/rbac/index.d.ts.map +1 -1
- package/dist-esm/types/rbac/index.js +6 -1
- package/dist-esm/types/rbac/index.js.map +1 -1
- package/package.json +2 -2
- package/src/constants.test.ts +9 -1
- package/src/constants.ts +2 -1
- package/src/index.ts +1 -0
- package/src/org-features/index.test.ts +42 -0
- package/src/org-features/index.ts +74 -0
- package/src/plugins/templates/bigquery.ts +240 -3
- package/src/plugins/templates/databricks.ts +10 -0
- package/src/plugins/templates/salesforce.ts +205 -4
- package/src/plugins/templates/shared/auth.ts +19 -1
- package/src/socket/protocol.ts +4 -1
- package/src/socket/tracedSocket.ts +15 -0
- package/src/types/ai/index.ts +2 -1
- package/src/types/datasource/auth.ts +2 -0
- package/src/types/datasource/index.ts +18 -6
- package/src/types/fact/fact.ts +56 -0
- package/src/types/index.ts +1 -0
- package/src/types/integration/index.ts +10 -2
- package/src/types/organization/index.ts +9 -3
- package/src/types/rbac/index.ts +6 -1
package/src/types/ai/index.ts
CHANGED
|
@@ -12,7 +12,8 @@ export type AiChatMessageDto = {
|
|
|
12
12
|
* System event trigger types for AI operations without prompt_id
|
|
13
13
|
*/
|
|
14
14
|
export enum AiSystemTriggerType {
|
|
15
|
-
COMMIT_MESSAGE = 'commit_message'
|
|
15
|
+
COMMIT_MESSAGE = 'commit_message',
|
|
16
|
+
FACT_METADATA = 'fact_metadata'
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -100,6 +100,8 @@ export enum IntegrationAuthType {
|
|
|
100
100
|
OAUTH2_IMPLICIT = 'oauth-implicit',
|
|
101
101
|
OAUTH2_PASSWORD = 'oauth-pword',
|
|
102
102
|
OAUTH2_TOKEN_EXCHANGE = 'oauth-token-exchange',
|
|
103
|
+
// since proto does not support hyphens
|
|
104
|
+
OAUTH2_TOKEN_EXCHANGE_PROTO = 'oauthTokenExchange',
|
|
103
105
|
FIREBASE = 'Firebase',
|
|
104
106
|
BEARER = 'bearer',
|
|
105
107
|
API_KEY = 'api-key',
|
|
@@ -168,6 +168,20 @@ type AWSDatasourceConfiguration = BaseDatasourceConfiguration & {
|
|
|
168
168
|
};
|
|
169
169
|
|
|
170
170
|
type BigqueryDatasourceConfiguration = BaseDatasourceConfiguration & {
|
|
171
|
+
connectionType?: 'fields' | 'service-account-key' | IntegrationAuthType.OAUTH2_TOKEN_EXCHANGE;
|
|
172
|
+
authTypeField?: string;
|
|
173
|
+
authConfig?: {
|
|
174
|
+
tokenUrl?: string;
|
|
175
|
+
audience?: string;
|
|
176
|
+
scope?: string;
|
|
177
|
+
subjectTokenType?: string;
|
|
178
|
+
subjectTokenSource?: string;
|
|
179
|
+
subjectTokenSourceStaticToken?: string;
|
|
180
|
+
workforcePoolId?: string;
|
|
181
|
+
workforceProviderId?: string;
|
|
182
|
+
projectId?: string;
|
|
183
|
+
billingProjectNumber?: string;
|
|
184
|
+
};
|
|
171
185
|
authentication?: {
|
|
172
186
|
custom?: {
|
|
173
187
|
googleServiceAccount?: Property;
|
|
@@ -448,12 +462,10 @@ export type OracleDbDatasourceConfiguration = Pick<OracleDbPlugin.Plugin, 'name'
|
|
|
448
462
|
// this will be populated by orchestrator, and it will be used by plugin.execute | metadata | test
|
|
449
463
|
// so the plugin will get ready-to-use oauth token. This is needed until we figure out a way to pass token
|
|
450
464
|
// to plugin.metadata and plugin.test
|
|
451
|
-
export type SalesforceDatasourceConfiguration = {
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
useFixedPasswordCreds?: boolean;
|
|
456
|
-
};
|
|
465
|
+
export type SalesforceDatasourceConfiguration = AuthenticatedDatasourceConfig & {
|
|
466
|
+
// if set, will be set to 'connection.auth.method.case'
|
|
467
|
+
authTypeField?: string;
|
|
468
|
+
authTypeOnBehalfOfToken?: string;
|
|
457
469
|
} & Pick<SalesforcePlugin.Plugin, 'name' | 'connection'>;
|
|
458
470
|
|
|
459
471
|
export type DatasourceConfiguration = (
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export enum FactEntityScope {
|
|
2
|
+
ORG = 'org',
|
|
3
|
+
USER = 'user',
|
|
4
|
+
INTEGRATION = 'integration'
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export enum FactAccessType {
|
|
8
|
+
ALWAYS_INJECT = 'always_inject', // Core memory - always in system prompt
|
|
9
|
+
ON_DEMAND = 'on_demand' // Skills - LLM retrieves via tool call
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export enum FactCreatedSource {
|
|
13
|
+
MANUAL = 'manual',
|
|
14
|
+
AGENT = 'agent'
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface FactDto {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
content: string;
|
|
22
|
+
metadata?: Record<string, unknown>;
|
|
23
|
+
entityScope: FactEntityScope;
|
|
24
|
+
entityId: string;
|
|
25
|
+
accessType: FactAccessType;
|
|
26
|
+
isEnabled: boolean;
|
|
27
|
+
isApproved: boolean;
|
|
28
|
+
approvedBy?: string;
|
|
29
|
+
createdBy?: string;
|
|
30
|
+
createdSource?: FactCreatedSource;
|
|
31
|
+
createdAt: string;
|
|
32
|
+
updatedAt: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* FactListQuery for Socket RPC protocol.
|
|
37
|
+
*
|
|
38
|
+
* NOTE: This type is intentionally duplicated from @superblocksteam/schemas to avoid
|
|
39
|
+
* a circular dependency. The schemas package cannot depend on shared, and the socket
|
|
40
|
+
* protocol in shared needs this type. Keep in sync with packages/schemas/src/schemas/FactListQuery.ts.
|
|
41
|
+
*/
|
|
42
|
+
export type FactListQuery = {
|
|
43
|
+
entityScope?: FactEntityScope;
|
|
44
|
+
entityId?: string;
|
|
45
|
+
accessType?: FactAccessType;
|
|
46
|
+
isEnabled?: boolean;
|
|
47
|
+
limit?: number;
|
|
48
|
+
offset?: number;
|
|
49
|
+
sortBy?: 'name' | 'created_at' | 'updated_at';
|
|
50
|
+
sortOrder?: 'asc' | 'desc';
|
|
51
|
+
search?: string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export interface ListFactsResponse {
|
|
55
|
+
facts: FactDto[];
|
|
56
|
+
}
|
package/src/types/index.ts
CHANGED
|
@@ -105,6 +105,7 @@ export class SupersetIntegrationDto extends IntegrationBaseDto {
|
|
|
105
105
|
metadata: ResourceMetadata;
|
|
106
106
|
permissions?: ActionTypeEnum[];
|
|
107
107
|
creator?: CreatorDto;
|
|
108
|
+
enabledForV2?: boolean;
|
|
108
109
|
|
|
109
110
|
constructor({
|
|
110
111
|
id,
|
|
@@ -123,7 +124,8 @@ export class SupersetIntegrationDto extends IntegrationBaseDto {
|
|
|
123
124
|
readOnly,
|
|
124
125
|
editable,
|
|
125
126
|
permissions,
|
|
126
|
-
creator
|
|
127
|
+
creator,
|
|
128
|
+
enabledForV2
|
|
127
129
|
}: {
|
|
128
130
|
id: string;
|
|
129
131
|
created: Date;
|
|
@@ -142,6 +144,7 @@ export class SupersetIntegrationDto extends IntegrationBaseDto {
|
|
|
142
144
|
editable: boolean;
|
|
143
145
|
permissions?: ActionTypeEnum[];
|
|
144
146
|
creator?: CreatorDto;
|
|
147
|
+
enabledForV2?: boolean;
|
|
145
148
|
}) {
|
|
146
149
|
super();
|
|
147
150
|
this.id = id;
|
|
@@ -170,6 +173,7 @@ export class SupersetIntegrationDto extends IntegrationBaseDto {
|
|
|
170
173
|
});
|
|
171
174
|
this.permissions = permissions;
|
|
172
175
|
this.creator = creator;
|
|
176
|
+
this.enabledForV2 = enabledForV2;
|
|
173
177
|
}
|
|
174
178
|
}
|
|
175
179
|
|
|
@@ -181,6 +185,7 @@ export class IntegrationDto extends IntegrationBaseDto {
|
|
|
181
185
|
configurations: IntegrationConfigurationDto[];
|
|
182
186
|
slug?: string;
|
|
183
187
|
ownerEmail?: string;
|
|
188
|
+
enabledForV2?: boolean;
|
|
184
189
|
|
|
185
190
|
constructor({
|
|
186
191
|
id,
|
|
@@ -194,7 +199,8 @@ export class IntegrationDto extends IntegrationBaseDto {
|
|
|
194
199
|
isUserConfigured,
|
|
195
200
|
ownerEmail,
|
|
196
201
|
kind,
|
|
197
|
-
slug
|
|
202
|
+
slug,
|
|
203
|
+
enabledForV2
|
|
198
204
|
}: {
|
|
199
205
|
id: string;
|
|
200
206
|
created: Date;
|
|
@@ -208,6 +214,7 @@ export class IntegrationDto extends IntegrationBaseDto {
|
|
|
208
214
|
ownerEmail?: string;
|
|
209
215
|
kind: IntegrationKind;
|
|
210
216
|
slug?: string;
|
|
217
|
+
enabledForV2?: boolean;
|
|
211
218
|
}) {
|
|
212
219
|
super();
|
|
213
220
|
this.id = id;
|
|
@@ -222,5 +229,6 @@ export class IntegrationDto extends IntegrationBaseDto {
|
|
|
222
229
|
this.ownerEmail = ownerEmail;
|
|
223
230
|
this.kind = kind;
|
|
224
231
|
this.slug = slug;
|
|
232
|
+
this.enabledForV2 = enabledForV2;
|
|
225
233
|
}
|
|
226
234
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Domain } from '../../index.js';
|
|
1
|
+
import { Domain, OrgVersionType } from '../../index.js';
|
|
2
2
|
import { IHomepageApplicationV2Dto } from '../application/index.js';
|
|
3
3
|
import { Billing } from '../billing/index.js';
|
|
4
4
|
import { GroupBrief } from '../group/index.js';
|
|
@@ -7,10 +7,14 @@ import { Profile } from '../profile/index.js';
|
|
|
7
7
|
import { Agent, AgentType } from './agent.js';
|
|
8
8
|
|
|
9
9
|
export const SUPERBLOCKS_CLOUD_AGENT_ORG_NAME = 'cloudagent.superblocks';
|
|
10
|
-
// for server tests
|
|
10
|
+
// for server tests (V2 orgs)
|
|
11
11
|
export const SUPERBLOCKS_TEST_ORG_NAME = 'superblocksservertest.com';
|
|
12
|
-
// for server tests
|
|
12
|
+
// for server tests (V2 orgs)
|
|
13
13
|
export const SUPERBLOCKS_TEST_ORG_NAME2 = 'superblocksservertest2.com';
|
|
14
|
+
// for server tests (V1 orgs)
|
|
15
|
+
export const SUPERBLOCKS_TEST_ORG_V1_NAME = 'superblocksservertest-orgv1.com';
|
|
16
|
+
// for server tests (V1 orgs)
|
|
17
|
+
export const SUPERBLOCKS_TEST_ORG_V1_NAME2 = 'superblocksservertest2-orgv1.com';
|
|
14
18
|
// for manual testing
|
|
15
19
|
export const SUPERBLOCKS_MANUAL_TEST_ORG_NAME = 'superblockstest.com';
|
|
16
20
|
export const SUPERBLOCKS_SUPPORT = 'Superblocks Support';
|
|
@@ -32,6 +36,7 @@ export interface Organization {
|
|
|
32
36
|
billing: Billing;
|
|
33
37
|
profiles?: Profile[];
|
|
34
38
|
created: Date;
|
|
39
|
+
version?: OrgVersionType;
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
export type OrgBriefDto = {
|
|
@@ -51,6 +56,7 @@ export interface IOrganizationDto {
|
|
|
51
56
|
agents: Agent[] | undefined;
|
|
52
57
|
pluginExecutionVersions: PluginExecutionVersions;
|
|
53
58
|
minExternalAgentVersion: string;
|
|
59
|
+
version?: OrgVersionType;
|
|
54
60
|
}
|
|
55
61
|
|
|
56
62
|
export interface IOrganizationApplicationsV2Dto {
|
package/src/types/rbac/index.ts
CHANGED
|
@@ -144,6 +144,7 @@ export enum ResourceTypeEnum {
|
|
|
144
144
|
ORGANIZATION = 'org',
|
|
145
145
|
// ORGANIZATION_REQUESTS = 'org.requests',
|
|
146
146
|
ORGANIZATION_USERS = 'org.users',
|
|
147
|
+
ORG_KNOWLEDGE = 'org_knowledge',
|
|
147
148
|
PROFILES = 'profiles',
|
|
148
149
|
REPOSITORIES = 'repos',
|
|
149
150
|
ROLES = 'roles',
|
|
@@ -270,8 +271,12 @@ export const ActionTypeByResourceType = {
|
|
|
270
271
|
RUN: ActionTypeEnum.RUN,
|
|
271
272
|
SHARE: ActionTypeEnum.SHARE,
|
|
272
273
|
UPDATE: ActionTypeEnum.UPDATE
|
|
274
|
+
},
|
|
275
|
+
ORG_KNOWLEDGE: {
|
|
276
|
+
CREATE: ActionTypeEnum.CREATE,
|
|
277
|
+
UPDATE: ActionTypeEnum.UPDATE,
|
|
278
|
+
DELETE: ActionTypeEnum.DELETE
|
|
273
279
|
}
|
|
274
|
-
// TODO Adds as needed
|
|
275
280
|
} as const;
|
|
276
281
|
|
|
277
282
|
type ResourceBrief = {
|