@orchestration-ai/sdk 0.2.0 → 0.3.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/README.md +280 -208
- package/dist/cjs/app-builder.d.ts +39 -0
- package/dist/cjs/app-builder.d.ts.map +1 -0
- package/dist/cjs/app-builder.js +589 -0
- package/dist/cjs/app-builder.js.map +1 -0
- package/dist/cjs/services.d.ts +33 -0
- package/dist/cjs/services.d.ts.map +1 -0
- package/dist/cjs/services.js +121 -0
- package/dist/cjs/services.js.map +1 -0
- package/dist/cjs/shared-types.d.ts +66 -0
- package/dist/cjs/shared-types.d.ts.map +1 -0
- package/dist/cjs/shared-types.js +30 -0
- package/dist/cjs/shared-types.js.map +1 -0
- package/dist/cjs/types.gen.d.ts +28 -0
- package/dist/cjs/types.gen.d.ts.map +1 -1
- package/dist/esm/app-builder.d.ts +39 -0
- package/dist/esm/app-builder.d.ts.map +1 -0
- package/dist/esm/app-builder.js +547 -0
- package/dist/esm/app-builder.js.map +1 -0
- package/dist/esm/services.d.ts +33 -0
- package/dist/esm/services.d.ts.map +1 -0
- package/dist/esm/services.js +104 -0
- package/dist/esm/services.js.map +1 -0
- package/dist/esm/shared-types.d.ts +66 -0
- package/dist/esm/shared-types.d.ts.map +1 -0
- package/dist/esm/shared-types.js +25 -0
- package/dist/esm/shared-types.js.map +1 -0
- package/dist/esm/types.gen.d.ts +28 -0
- package/dist/esm/types.gen.d.ts.map +1 -1
- package/package.json +35 -2
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSecretSetting = exports.getTextSetting = exports.getBooleanSetting = void 0;
|
|
4
|
+
exports.createApplicationClient = createApplicationClient;
|
|
5
|
+
exports.createApiClient = createApiClient;
|
|
6
|
+
exports.createEngineClient = createEngineClient;
|
|
7
|
+
exports.listServices = listServices;
|
|
8
|
+
exports.getPermissions = getPermissions;
|
|
9
|
+
exports.getDefaultSettings = getDefaultSettings;
|
|
10
|
+
exports.getServiceDescription = getServiceDescription;
|
|
11
|
+
exports.touchService = touchService;
|
|
12
|
+
exports.callServiceTool = callServiceTool;
|
|
13
|
+
exports.getContext = getContext;
|
|
14
|
+
exports.sendMessages = sendMessages;
|
|
15
|
+
const client_1 = require("./client");
|
|
16
|
+
var shared_types_1 = require("./shared-types");
|
|
17
|
+
Object.defineProperty(exports, "getBooleanSetting", { enumerable: true, get: function () { return shared_types_1.getBooleanSetting; } });
|
|
18
|
+
Object.defineProperty(exports, "getTextSetting", { enumerable: true, get: function () { return shared_types_1.getTextSetting; } });
|
|
19
|
+
Object.defineProperty(exports, "getSecretSetting", { enumerable: true, get: function () { return shared_types_1.getSecretSetting; } });
|
|
20
|
+
// --- Client Factories ---
|
|
21
|
+
/** Create a client configured for an application's URL, optionally with a layer ID for context */
|
|
22
|
+
function createApplicationClient(application, layerId) {
|
|
23
|
+
return (0, client_1.createClient)((0, client_1.createConfig)({
|
|
24
|
+
baseURL: application.application_url,
|
|
25
|
+
headers: {
|
|
26
|
+
...(layerId ? { 'X-LayerId': layerId } : {}),
|
|
27
|
+
},
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
/** Create a bare API client (no auth configured). Use with setupClientCredentials. */
|
|
31
|
+
function createApiClient() {
|
|
32
|
+
return (0, client_1.createClient)((0, client_1.createConfig)());
|
|
33
|
+
}
|
|
34
|
+
function createEngineClient(engineUrlOrAccessKey, accessKey) {
|
|
35
|
+
const url = accessKey
|
|
36
|
+
? (engineUrlOrAccessKey !== null && engineUrlOrAccessKey !== void 0 ? engineUrlOrAccessKey : "https://orchestration-ai-online-prod.ey.r.appspot.com")
|
|
37
|
+
: "https://orchestration-ai-online-prod.ey.r.appspot.com";
|
|
38
|
+
const key = accessKey !== null && accessKey !== void 0 ? accessKey : engineUrlOrAccessKey;
|
|
39
|
+
return (0, client_1.createClient)((0, client_1.createConfig)({
|
|
40
|
+
baseURL: url,
|
|
41
|
+
headers: {
|
|
42
|
+
Authorization: `Bearer ${key}`,
|
|
43
|
+
},
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
// --- Application Service Endpoints ---
|
|
47
|
+
/** List all available services */
|
|
48
|
+
async function listServices(client) {
|
|
49
|
+
const response = await client.get({
|
|
50
|
+
url: '/services',
|
|
51
|
+
responseType: 'json',
|
|
52
|
+
});
|
|
53
|
+
return response.data;
|
|
54
|
+
}
|
|
55
|
+
/** Get permissions required by the application */
|
|
56
|
+
async function getPermissions(client) {
|
|
57
|
+
const response = await client.get({
|
|
58
|
+
url: '/permissions',
|
|
59
|
+
responseType: 'json',
|
|
60
|
+
});
|
|
61
|
+
return response.data;
|
|
62
|
+
}
|
|
63
|
+
/** Get default settings for a service */
|
|
64
|
+
async function getDefaultSettings(serviceName, client) {
|
|
65
|
+
const response = await client.get({
|
|
66
|
+
url: `/services/${serviceName}/api/default-settings`,
|
|
67
|
+
responseType: 'json',
|
|
68
|
+
});
|
|
69
|
+
return response.data;
|
|
70
|
+
}
|
|
71
|
+
/** Get the service description (tools it exposes) */
|
|
72
|
+
async function getServiceDescription(serviceName, client) {
|
|
73
|
+
const response = await client.get({
|
|
74
|
+
url: `/services/${serviceName}/api/description`,
|
|
75
|
+
responseType: 'json',
|
|
76
|
+
});
|
|
77
|
+
return response.data;
|
|
78
|
+
}
|
|
79
|
+
/** Touch a service to notify it that its context may have changed */
|
|
80
|
+
async function touchService(serviceName, client) {
|
|
81
|
+
await client.post({
|
|
82
|
+
url: `/services/${serviceName}/api/touch`,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/** Call a service tool (arbitrary endpoint exposed by a service) */
|
|
86
|
+
async function callServiceTool(serviceName, toolPath, client, options) {
|
|
87
|
+
var _a;
|
|
88
|
+
const method = ((_a = options === null || options === void 0 ? void 0 : options.method) !== null && _a !== void 0 ? _a : "POST").toLowerCase();
|
|
89
|
+
const response = await client[method]({
|
|
90
|
+
url: `/services/${serviceName}/api/${toolPath}`,
|
|
91
|
+
headers: (options === null || options === void 0 ? void 0 : options.body) ? { 'Content-Type': 'application/json' } : undefined,
|
|
92
|
+
body: options === null || options === void 0 ? void 0 : options.body,
|
|
93
|
+
responseType: 'json',
|
|
94
|
+
});
|
|
95
|
+
return response.data;
|
|
96
|
+
}
|
|
97
|
+
// --- Engine Agent Endpoints ---
|
|
98
|
+
/** Get the context for a layer */
|
|
99
|
+
async function getContext(layerId, client) {
|
|
100
|
+
const response = await client.get({
|
|
101
|
+
url: `/agents/context/${layerId}`,
|
|
102
|
+
responseType: 'json',
|
|
103
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
104
|
+
});
|
|
105
|
+
return response.data;
|
|
106
|
+
}
|
|
107
|
+
/** Send messages to an agent's layer and get the inference response */
|
|
108
|
+
async function sendMessages(agentId, layerIndex, messages, layerId, client) {
|
|
109
|
+
const response = await client.post({
|
|
110
|
+
url: `/agents/${agentId}/layers/${layerIndex}/messages`,
|
|
111
|
+
headers: {
|
|
112
|
+
'X-LayerId': layerId,
|
|
113
|
+
'Content-Type': 'application/json',
|
|
114
|
+
},
|
|
115
|
+
body: messages,
|
|
116
|
+
responseType: 'text',
|
|
117
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
118
|
+
});
|
|
119
|
+
return response.data;
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=services.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"services.js","sourceRoot":"","sources":["../../typescript/services.ts"],"names":[],"mappings":";;;AA6BA,0DAOC;AAGD,0CAEC;AAMD,gDAWC;AAKD,oCAMC;AAGD,wCAMC;AAGD,gDASC;AAGD,sDASC;AAGD,oCAOC;AAGD,0CAiBC;AAKD,gCAOC;AAGD,oCAkBC;AApKD,qCAAsD;AAuBtD,+CAAqF;AAA5E,iHAAA,iBAAiB,OAAA;AAAE,8GAAA,cAAc,OAAA;AAAE,gHAAA,gBAAgB,OAAA;AAE5D,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AAS;QAC3E,IAAI,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI;QACnB,YAAY,EAAE,MAAM;KACrB,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC,IAAiB,CAAC;AACpC,CAAC;AAED,iCAAiC;AAEjC,kCAAkC;AAC3B,KAAK,UAAU,UAAU,CAAC,OAAe,EAAE,MAAc;IAC9D,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC;QAChC,GAAG,EAAE,mBAAmB,OAAO,EAAE;QACjC,YAAY,EAAE,MAAM;QACpB,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;KAC/C,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC,IAAe,CAAC;AAClC,CAAC;AAED,uEAAuE;AAChE,KAAK,UAAU,YAAY,CAChC,OAAe,EACf,UAAkB,EAClB,QAAmB,EACnB,OAAe,EACf,MAAc;IAEd,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC;QACjC,GAAG,EAAE,WAAW,OAAO,WAAW,UAAU,WAAW;QACvD,OAAO,EAAE;YACP,WAAW,EAAE,OAAO;YACpB,cAAc,EAAE,kBAAkB;SACnC;QACD,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,MAAM;QACpB,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;KAC/C,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC,IAAc,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export type AgentIdentity = {
|
|
2
|
+
agentId: string;
|
|
3
|
+
agentName: string;
|
|
4
|
+
layerId: string;
|
|
5
|
+
layerIndex: number;
|
|
6
|
+
numberOfLayers: number;
|
|
7
|
+
orchestrationId: string;
|
|
8
|
+
workspaceId: string;
|
|
9
|
+
workspaceOwnerId: string;
|
|
10
|
+
};
|
|
11
|
+
export type Setting = {
|
|
12
|
+
setting_name: string;
|
|
13
|
+
setting_description: string;
|
|
14
|
+
setting_type: "Text";
|
|
15
|
+
text_value: string;
|
|
16
|
+
} | {
|
|
17
|
+
setting_name: string;
|
|
18
|
+
setting_description: string;
|
|
19
|
+
setting_type: "Boolean";
|
|
20
|
+
boolean_value: boolean;
|
|
21
|
+
} | {
|
|
22
|
+
setting_name: string;
|
|
23
|
+
setting_description: string;
|
|
24
|
+
setting_type: "Secret";
|
|
25
|
+
text_value: string;
|
|
26
|
+
};
|
|
27
|
+
export type ServiceInfo = {
|
|
28
|
+
unique_name: string;
|
|
29
|
+
service_name: string;
|
|
30
|
+
service_description: string;
|
|
31
|
+
};
|
|
32
|
+
type ServiceDescriptionParameters = Record<string, {
|
|
33
|
+
optional: boolean;
|
|
34
|
+
description: string;
|
|
35
|
+
} & ({
|
|
36
|
+
type: "string" | "boolean" | "number";
|
|
37
|
+
} | {
|
|
38
|
+
type: "enum";
|
|
39
|
+
options: string[];
|
|
40
|
+
} | {
|
|
41
|
+
type: "object";
|
|
42
|
+
properties: ServiceDescriptionParameters;
|
|
43
|
+
})>;
|
|
44
|
+
export type ServiceDescriptionPart = {
|
|
45
|
+
path: string;
|
|
46
|
+
description: string;
|
|
47
|
+
method: "POST" | "GET" | "PATCH" | "DELETE" | "PUT";
|
|
48
|
+
parameters: ServiceDescriptionParameters;
|
|
49
|
+
};
|
|
50
|
+
export type ServiceDescription = ServiceDescriptionPart[];
|
|
51
|
+
export type PermissionName = "role_workspace_inserter" | "role_workspace_reader" | "role_workspace_lister" | "role_workspace_updater" | "role_workspace_deleter" | "role_workspace_writer" | "role_workspace_admin" | "role_orchestration_inserter" | "role_orchestration_reader" | "role_orchestration_lister" | "role_orchestration_updater" | "role_orchestration_deleter" | "role_orchestration_writer" | "role_orchestration_admin" | "role_agent_inserter" | "role_agent_reader" | "role_agent_lister" | "role_agent_updater" | "role_agent_deleter" | "role_agent_writer" | "role_agent_admin" | "role_application_inserter" | "role_application_reader" | "role_application_lister" | "role_application_updater" | "role_application_deleter" | "role_application_writer" | "role_application_admin" | "role_access_inserter" | "role_access_reader" | "role_access_lister" | "role_access_deleter" | "role_access_writer" | "role_access_admin" | "role_llm_keys_inserter" | "role_llm_keys_reader" | "role_llm_keys_lister" | "role_llm_keys_updater" | "role_llm_keys_writer" | "role_llm_keys_admin" | "role_llm_reader" | "role_llm_lister" | "role_service_reader" | "role_service_lister" | "role_day_pass_transaction_lister" | "role_admin";
|
|
52
|
+
export type Permission = {
|
|
53
|
+
permission_name: PermissionName;
|
|
54
|
+
justification: string;
|
|
55
|
+
};
|
|
56
|
+
export type Context = {
|
|
57
|
+
identity: AgentIdentity;
|
|
58
|
+
};
|
|
59
|
+
export type Message = {
|
|
60
|
+
message: string;
|
|
61
|
+
};
|
|
62
|
+
export declare function getBooleanSetting(settings: Setting[], key: string): boolean;
|
|
63
|
+
export declare function getTextSetting(settings: Setting[], key: string): string | undefined;
|
|
64
|
+
export declare function getSecretSetting(settings: Setting[], key: string): string | undefined;
|
|
65
|
+
export {};
|
|
66
|
+
//# sourceMappingURL=shared-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-types.d.ts","sourceRoot":"","sources":["../../typescript/shared-types.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,OAAO,GACf;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,mBAAmB,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;I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A2B,GAC3B,2BAA2B,GAC3B,4BAA4B,GAC5B,4BAA4B,GAC5B,2BAA2B,GAC3B,0BAA0B,GAC1B,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,oBAAoB,GACpB,oBAAoB,GACpB,mBAAmB,GACnB,kBAAkB,GAClB,2BAA2B,GAC3B,yBAAyB,GACzB,yBAAyB,GACzB,0BAA0B,GAC1B,0BAA0B,GAC1B,yBAAyB,GACzB,wBAAwB,GACxB,sBAAsB,GACtB,oBAAoB,GACpB,oBAAoB,GACpB,qBAAqB,GACrB,oBAAoB,GACpB,mBAAmB,GACnB,wBAAwB,GACxB,sBAAsB,GACtB,sBAAsB,GACtB,uBAAuB,GACvB,sBAAsB,GACtB,qBAAqB,GACrB,iBAAiB,GACjB,iBAAiB,GACjB,qBAAqB,GACrB,qBAAqB,GACrB,kCAAkC,GAClC,YAAY,CAAC;AAEjB,MAAM,MAAM,UAAU,GAAG;IACvB,eAAe,EAAE,cAAc,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,QAAQ,EAAE,aAAa,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAIF,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAM3E;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAMnF;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAMrF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Shared types and utilities for Orchestration AI services.
|
|
3
|
+
// This module has no external dependencies and can be consumed by any runtime.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.getBooleanSetting = getBooleanSetting;
|
|
6
|
+
exports.getTextSetting = getTextSetting;
|
|
7
|
+
exports.getSecretSetting = getSecretSetting;
|
|
8
|
+
// --- Setting Utilities ---
|
|
9
|
+
function getBooleanSetting(settings, key) {
|
|
10
|
+
const setting = settings.find((s) => s.setting_name === key);
|
|
11
|
+
if ((setting === null || setting === void 0 ? void 0 : setting.setting_type) === "Boolean") {
|
|
12
|
+
return setting.boolean_value;
|
|
13
|
+
}
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
function getTextSetting(settings, key) {
|
|
17
|
+
const setting = settings.find((s) => s.setting_name === key);
|
|
18
|
+
if ((setting === null || setting === void 0 ? void 0 : setting.setting_type) === "Text") {
|
|
19
|
+
return setting.text_value;
|
|
20
|
+
}
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
function getSecretSetting(settings, key) {
|
|
24
|
+
const setting = settings.find((s) => s.setting_name === key);
|
|
25
|
+
if ((setting === null || setting === void 0 ? void 0 : setting.setting_type) === "Secret") {
|
|
26
|
+
return setting.text_value;
|
|
27
|
+
}
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=shared-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-types.js","sourceRoot":"","sources":["../../typescript/shared-types.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,+EAA+E;;AA8G/E,8CAMC;AAED,wCAMC;AAED,4CAMC;AAxBD,4BAA4B;AAE5B,SAAgB,iBAAiB,CAAC,QAAmB,EAAE,GAAW;IAChE,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,KAAK,GAAG,CAAC,CAAC;IAC7D,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,MAAK,SAAS,EAAE,CAAC;QACxC,OAAO,OAAO,CAAC,aAAa,CAAC;IAC/B,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAgB,cAAc,CAAC,QAAmB,EAAE,GAAW;IAC7D,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,KAAK,GAAG,CAAC,CAAC;IAC7D,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,MAAK,MAAM,EAAE,CAAC;QACrC,OAAO,OAAO,CAAC,UAAU,CAAC;IAC5B,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAgB,gBAAgB,CAAC,QAAmB,EAAE,GAAW;IAC/D,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,KAAK,GAAG,CAAC,CAAC;IAC7D,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,MAAK,QAAQ,EAAE,CAAC;QACvC,OAAO,OAAO,CAAC,UAAU,CAAC;IAC5B,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/dist/cjs/types.gen.d.ts
CHANGED
|
@@ -93,6 +93,10 @@ export type Application = {
|
|
|
93
93
|
private: boolean;
|
|
94
94
|
time_created: string;
|
|
95
95
|
visible: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Encoded client ID in the format "appId:userId". Use this as client_id for the client_credentials OAuth grant.
|
|
98
|
+
*/
|
|
99
|
+
client_id?: string;
|
|
96
100
|
};
|
|
97
101
|
/**
|
|
98
102
|
* Setting
|
|
@@ -411,6 +415,10 @@ export type NewApplication = {
|
|
|
411
415
|
application_url: string;
|
|
412
416
|
private: boolean;
|
|
413
417
|
visible: boolean;
|
|
418
|
+
/**
|
|
419
|
+
* Encoded client ID in the format "appId:userId". Use this as client_id for the client_credentials OAuth grant.
|
|
420
|
+
*/
|
|
421
|
+
client_id?: string;
|
|
414
422
|
};
|
|
415
423
|
/**
|
|
416
424
|
* ApplicationWithRelations
|
|
@@ -428,6 +436,10 @@ export type ApplicationWithRelations = {
|
|
|
428
436
|
private: boolean;
|
|
429
437
|
time_created: string;
|
|
430
438
|
visible: boolean;
|
|
439
|
+
/**
|
|
440
|
+
* Encoded client ID in the format "appId:userId". Use this as client_id for the client_credentials OAuth grant.
|
|
441
|
+
*/
|
|
442
|
+
client_id?: string;
|
|
431
443
|
};
|
|
432
444
|
/**
|
|
433
445
|
* ApplicationPartialExcluding_id-owner-time_created-last_edited_
|
|
@@ -441,6 +453,10 @@ export type ApplicationPartialExcludingIdOwnerTimeCreatedLastEdited = {
|
|
|
441
453
|
application_url?: string;
|
|
442
454
|
private?: boolean;
|
|
443
455
|
visible?: boolean;
|
|
456
|
+
/**
|
|
457
|
+
* Encoded client ID in the format "appId:userId". Use this as client_id for the client_credentials OAuth grant.
|
|
458
|
+
*/
|
|
459
|
+
client_id?: string;
|
|
444
460
|
};
|
|
445
461
|
/**
|
|
446
462
|
* ApplicationExcluding_access_key_WithRelations
|
|
@@ -457,6 +473,10 @@ export type ApplicationExcludingAccessKeyWithRelations = {
|
|
|
457
473
|
private: boolean;
|
|
458
474
|
time_created: string;
|
|
459
475
|
visible: boolean;
|
|
476
|
+
/**
|
|
477
|
+
* Encoded client ID in the format "appId:userId". Use this as client_id for the client_credentials OAuth grant.
|
|
478
|
+
*/
|
|
479
|
+
client_id?: string;
|
|
460
480
|
};
|
|
461
481
|
/**
|
|
462
482
|
* NewAgent
|
|
@@ -542,6 +562,7 @@ export type AccessFindByPrincipalData = {
|
|
|
542
562
|
path?: never;
|
|
543
563
|
query?: {
|
|
544
564
|
resourceId?: string;
|
|
565
|
+
onBehalfOf?: string;
|
|
545
566
|
limit?: number;
|
|
546
567
|
offset?: number;
|
|
547
568
|
};
|
|
@@ -1626,12 +1647,19 @@ export type OAuthAuthorizeErrors = {
|
|
|
1626
1647
|
export type OAuthAuthorizeError = OAuthAuthorizeErrors[keyof OAuthAuthorizeErrors];
|
|
1627
1648
|
export type OAuthTokenData = {
|
|
1628
1649
|
body?: {
|
|
1650
|
+
/**
|
|
1651
|
+
* One of "authorization_code", "client_credentials", or "refresh_token"
|
|
1652
|
+
*/
|
|
1629
1653
|
grant_type: string;
|
|
1630
1654
|
code?: string;
|
|
1631
1655
|
refresh_token?: string;
|
|
1656
|
+
/**
|
|
1657
|
+
* Plain app ID or encoded "appId:userId". client_credentials grant REQUIRES the encoded format.
|
|
1658
|
+
*/
|
|
1632
1659
|
client_id: string;
|
|
1633
1660
|
client_secret: string;
|
|
1634
1661
|
redirect_uri?: string;
|
|
1662
|
+
scope?: string;
|
|
1635
1663
|
};
|
|
1636
1664
|
path?: never;
|
|
1637
1665
|
query?: never;
|