@synapseone/sdk 0.7.1-dev.61 → 0.7.1-dev.63

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/iam.d.ts CHANGED
@@ -112,6 +112,13 @@ export declare class IamService {
112
112
  createUser(orgId: string, email: string, displayName?: string): Promise<unknown>;
113
113
  createAccount(orgId: string, slug: string, displayName: string): Promise<unknown>;
114
114
  userPolicies(userId: string): Promise<unknown>;
115
+ createScimToken(input?: {
116
+ description?: string;
117
+ scopes?: string[];
118
+ ttlSeconds?: number;
119
+ }): Promise<unknown>;
120
+ listScimTokens(): Promise<unknown>;
121
+ revokeScimToken(id: string): Promise<unknown>;
115
122
  createRole(accountId: string, slug: string, description?: string): Promise<unknown>;
116
123
  listRoles(accountId: string): Promise<unknown>;
117
124
  deleteRole(roleId: string): Promise<unknown>;
package/dist/iam.js CHANGED
@@ -110,6 +110,12 @@ class IamService {
110
110
  return this.http.req(`/v1/orgs/${encodeURIComponent(orgId)}/accounts`, { method: 'POST', body: JSON.stringify({ slug, displayName }) });
111
111
  }
112
112
  userPolicies(userId) { return this.http.req(`/v1/users/${encodeURIComponent(userId)}/policies`); }
113
+ // ---- SCIM provisioning (#48) ----
114
+ createScimToken(input = {}) {
115
+ return this.http.req('/v1/scim/tokens', { method: 'POST', body: JSON.stringify(input) });
116
+ }
117
+ listScimTokens() { return this.http.req('/v1/scim/tokens'); }
118
+ revokeScimToken(id) { return this.http.req(`/v1/scim/tokens/${encodeURIComponent(id)}`, { method: 'DELETE' }); }
113
119
  // ---- roles / policies ----
114
120
  createRole(accountId, slug, description = '') {
115
121
  return this.http.req(`/v1/accounts/${encodeURIComponent(accountId)}/roles`, { method: 'POST', body: JSON.stringify({ slug, description }) });
package/dist/index.d.ts CHANGED
@@ -10,6 +10,7 @@ import { InferenceService } from './inference';
10
10
  import { AiService } from './ai';
11
11
  import { HealthService } from './health';
12
12
  import { StorageService } from './storage';
13
+ import { SearchService } from './search';
13
14
  import { OcsService } from './ocs';
14
15
  import { NotificationsService } from './notifications';
15
16
  export * from './_http';
@@ -24,6 +25,7 @@ export * from './stream';
24
25
  export * from './inference';
25
26
  export * from './health';
26
27
  export * from './storage';
28
+ export * from './search';
27
29
  export * from './ocs';
28
30
  export * from './notifications';
29
31
  /** Legacy flat LDS signatures (the namespaced service drops the `lds` prefix). */
@@ -58,6 +60,8 @@ export declare class SynapseOneClient {
58
60
  readonly stream: StreamService;
59
61
  readonly inference: InferenceService;
60
62
  readonly storage: StorageService;
63
+ /** Tenant-scoped search over Base documents (#46). */
64
+ readonly search: SearchService;
61
65
  /** SynapseOCS bucket/object API; `storage` remains the default-bucket alias. */
62
66
  readonly ocs: OcsService;
63
67
  readonly notifications: NotificationsService;
package/dist/index.js CHANGED
@@ -50,6 +50,7 @@ const inference_1 = require("./inference");
50
50
  const ai_1 = require("./ai");
51
51
  const health_1 = require("./health");
52
52
  const storage_1 = require("./storage");
53
+ const search_1 = require("./search");
53
54
  const ocs_1 = require("./ocs");
54
55
  const notifications_1 = require("./notifications");
55
56
  __exportStar(require("./_http"), exports);
@@ -64,6 +65,7 @@ __exportStar(require("./stream"), exports);
64
65
  __exportStar(require("./inference"), exports);
65
66
  __exportStar(require("./health"), exports);
66
67
  __exportStar(require("./storage"), exports);
68
+ __exportStar(require("./search"), exports);
67
69
  __exportStar(require("./ocs"), exports);
68
70
  __exportStar(require("./notifications"), exports);
69
71
  class SynapseOneClient {
@@ -78,6 +80,8 @@ class SynapseOneClient {
78
80
  stream;
79
81
  inference;
80
82
  storage;
83
+ /** Tenant-scoped search over Base documents (#46). */
84
+ search;
81
85
  /** SynapseOCS bucket/object API; `storage` remains the default-bucket alias. */
82
86
  ocs;
83
87
  notifications;
@@ -95,6 +99,7 @@ class SynapseOneClient {
95
99
  this.stream = new stream_1.StreamService(this.http);
96
100
  this.inference = new inference_1.InferenceService(this.http);
97
101
  this.storage = new storage_1.StorageService(this.http);
102
+ this.search = new search_1.SearchService(this.http);
98
103
  this.ocs = new ocs_1.OcsService(this.http);
99
104
  this.notifications = new notifications_1.NotificationsService(this.http);
100
105
  this.health = new health_1.HealthService(this.http);
@@ -0,0 +1,20 @@
1
+ import { HttpClient } from './_http';
2
+ export interface SearchQuery {
3
+ query: string;
4
+ mode?: 'fulltext' | 'semantic' | 'hybrid';
5
+ collection?: string;
6
+ collections?: string[];
7
+ filters?: Record<string, string>;
8
+ limit?: number;
9
+ cursor?: string | null;
10
+ }
11
+ export declare class SearchService {
12
+ private readonly http;
13
+ constructor(http: HttpClient);
14
+ query(input: SearchQuery): Promise<unknown>;
15
+ fulltext(query: string, opts?: Omit<SearchQuery, 'query' | 'mode'>): Promise<unknown>;
16
+ semantic(query: string, opts?: Omit<SearchQuery, 'query' | 'mode'>): Promise<unknown>;
17
+ hybrid(query: string, opts?: Omit<SearchQuery, 'query' | 'mode'>): Promise<unknown>;
18
+ reindex(collections?: string[]): Promise<unknown>;
19
+ status(): Promise<unknown>;
20
+ }
package/dist/search.js ADDED
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SearchService = void 0;
4
+ class SearchService {
5
+ http;
6
+ constructor(http) {
7
+ this.http = http;
8
+ }
9
+ query(input) {
10
+ return this.http.req('/v1/search', { method: 'POST', body: JSON.stringify(input) });
11
+ }
12
+ fulltext(query, opts = {}) {
13
+ return this.query({ query, ...opts, mode: 'fulltext' });
14
+ }
15
+ semantic(query, opts = {}) {
16
+ return this.query({ query, ...opts, mode: 'semantic' });
17
+ }
18
+ hybrid(query, opts = {}) {
19
+ return this.query({ query, ...opts, mode: 'hybrid' });
20
+ }
21
+ reindex(collections) {
22
+ return this.http.req('/v1/search/reindex', {
23
+ method: 'POST', body: JSON.stringify(collections ? { collections } : {}),
24
+ });
25
+ }
26
+ status() { return this.http.req('/v1/search/status'); }
27
+ }
28
+ exports.SearchService = SearchService;
@@ -50,6 +50,36 @@ export declare class WorkflowService {
50
50
  getCredential(id: string): Promise<CredentialMetadata>;
51
51
  rotateCredential(id: string, secret: string): Promise<CredentialMetadata>;
52
52
  deleteCredential(id: string): Promise<unknown>;
53
+ /** Create a standalone human task (workflow nodes create theirs on pause). */
54
+ createHumanTask(input: {
55
+ title: string;
56
+ description?: string;
57
+ assignee?: string;
58
+ candidateRoles?: string[];
59
+ deadline?: string;
60
+ decisionSchema?: Record<string, unknown>;
61
+ payload?: Record<string, unknown>;
62
+ workflowId?: string;
63
+ executionId?: string;
64
+ node?: string;
65
+ }): Promise<unknown>;
66
+ listHumanTasks(query?: Record<string, string | number | boolean | undefined>): Promise<unknown>;
67
+ getHumanTask(id: string): Promise<unknown>;
68
+ claimHumanTask(id: string): Promise<unknown>;
69
+ completeHumanTask(id: string, decision?: Record<string, unknown>, note?: string): Promise<unknown>;
70
+ rejectHumanTask(id: string, note: string, decision?: Record<string, unknown>): Promise<unknown>;
71
+ expireHumanTask(id: string, force?: boolean): Promise<unknown>;
72
+ createSecret(name: string, value: string, opts?: {
73
+ description?: string;
74
+ scope?: string;
75
+ accountId?: string;
76
+ }): Promise<unknown>;
77
+ listSecrets(): Promise<unknown>;
78
+ getSecret(name: string): Promise<unknown>;
79
+ readSecret(name: string, version?: number): Promise<unknown>;
80
+ rotateSecret(name: string, value: string, graceSeconds?: number): Promise<unknown>;
81
+ revokeSecret(name: string, version?: number): Promise<unknown>;
82
+ deleteSecret(name: string): Promise<unknown>;
53
83
  /**
54
84
  * Fire a public inbound webhook through the gateway: `ANY /webhook/:path`.
55
85
  * No auth is required; per-workflow auth/rate-limit/idempotency still apply.
package/dist/workflow.js CHANGED
@@ -106,6 +106,63 @@ class WorkflowService {
106
106
  deleteCredential(id) {
107
107
  return this.http.req(`/v1/credentials/${encodeURIComponent(id)}`, { method: 'DELETE' });
108
108
  }
109
+ // ---- durable human tasks (#44) ----
110
+ /** Create a standalone human task (workflow nodes create theirs on pause). */
111
+ createHumanTask(input) {
112
+ return this.http.req('/v1/human-tasks', { method: 'POST', body: JSON.stringify(input) });
113
+ }
114
+ listHumanTasks(query = {}) {
115
+ const allowed = ['status', 'executionId', 'workflowId', 'assignee', 'limit', 'offset'];
116
+ const params = new URLSearchParams();
117
+ for (const k of allowed) {
118
+ const v = query[k];
119
+ if (v !== undefined && v !== null && String(v) !== '')
120
+ params.set(k, String(v));
121
+ }
122
+ const s = params.toString();
123
+ return this.http.req(`/v1/human-tasks${s ? `?${s}` : ''}`);
124
+ }
125
+ getHumanTask(id) { return this.http.req(`/v1/human-tasks/${encodeURIComponent(id)}`); }
126
+ claimHumanTask(id) { return this.http.req(`/v1/human-tasks/${encodeURIComponent(id)}/claim`, { method: 'POST', body: '{}' }); }
127
+ completeHumanTask(id, decision = {}, note) {
128
+ return this.http.req(`/v1/human-tasks/${encodeURIComponent(id)}/complete`, {
129
+ method: 'POST', body: JSON.stringify({ decision, ...(note ? { note } : {}) }),
130
+ });
131
+ }
132
+ rejectHumanTask(id, note, decision = {}) {
133
+ return this.http.req(`/v1/human-tasks/${encodeURIComponent(id)}/reject`, {
134
+ method: 'POST', body: JSON.stringify({ note, decision }),
135
+ });
136
+ }
137
+ expireHumanTask(id, force = false) {
138
+ return this.http.req(`/v1/human-tasks/${encodeURIComponent(id)}/expire`, {
139
+ method: 'POST', body: JSON.stringify({ force }),
140
+ });
141
+ }
142
+ // ---- tenant secret vault (#47) ----
143
+ createSecret(name, value, opts = {}) {
144
+ return this.http.req('/v1/secrets', { method: 'POST', body: JSON.stringify({ name, value, ...opts }) });
145
+ }
146
+ listSecrets() { return this.http.req('/v1/secrets'); }
147
+ getSecret(name) { return this.http.req(`/v1/secrets/${encodeURIComponent(name)}`); }
148
+ readSecret(name, version) {
149
+ return this.http.req(`/v1/secrets/${encodeURIComponent(name)}/read`, {
150
+ method: 'POST', body: JSON.stringify(version ? { version } : {}),
151
+ });
152
+ }
153
+ rotateSecret(name, value, graceSeconds = 86400) {
154
+ return this.http.req(`/v1/secrets/${encodeURIComponent(name)}/rotate`, {
155
+ method: 'POST', body: JSON.stringify({ value, graceSeconds }),
156
+ });
157
+ }
158
+ revokeSecret(name, version) {
159
+ return this.http.req(`/v1/secrets/${encodeURIComponent(name)}/revoke`, {
160
+ method: 'POST', body: JSON.stringify(version ? { version } : {}),
161
+ });
162
+ }
163
+ deleteSecret(name) {
164
+ return this.http.req(`/v1/secrets/${encodeURIComponent(name)}`, { method: 'DELETE' });
165
+ }
109
166
  // ---- public inbound webhooks ----
110
167
  /**
111
168
  * Fire a public inbound webhook through the gateway: `ANY /webhook/:path`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synapseone/sdk",
3
- "version": "0.7.1-dev.61",
3
+ "version": "0.7.1-dev.63",
4
4
  "license": "Apache-2.0",
5
5
  "description": "synapseone SDK for JavaScript/TypeScript",
6
6
  "homepage": "https://synapseone.space",