@salsita-ai/contracts 0.50.0-develop.42cf9563b0 → 0.50.0-develop.4c59c65881
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 +14 -4
- package/dist/api/cli-login-approval.d.ts +15 -0
- package/dist/api/cli-login-approval.js +1 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.js +1 -1
- package/dist/api/session-token.d.ts +1 -1
- package/dist/api/studio-session.d.ts +57 -0
- package/dist/api/studio-session.js +1 -0
- package/dist/assistant/ban-tool.d.ts +17 -0
- package/dist/assistant/ban-tool.js +1 -0
- package/dist/assistant/deployment-assistant.d.ts +116 -6
- package/dist/assistant/deployment-assistant.js +1 -1
- package/dist/assistant/graphql-tools.d.ts +14 -1
- package/dist/assistant/graphql-tools.js +1 -1
- package/dist/assistant/image-reference.d.ts +10 -0
- package/dist/assistant/image-reference.js +1 -0
- package/dist/assistant/index.d.ts +11 -4
- package/dist/assistant/index.js +1 -1
- package/dist/assistant/message-metadata.d.ts +144 -7
- package/dist/assistant/message-metadata.js +1 -1
- package/dist/assistant/speech-text.d.ts +15 -0
- package/dist/assistant/speech-text.js +1 -0
- package/dist/assistant/tool-error.d.ts +30 -0
- package/dist/assistant/tool-error.js +1 -0
- package/dist/assistant/transcript-event.d.ts +25 -0
- package/dist/assistant/transcript-event.js +1 -0
- package/dist/assistant/voice-recording.d.ts +13 -0
- package/dist/assistant/voice-recording.js +1 -0
- package/dist/chat/api.d.ts +0 -41
- package/dist/chat/api.js +1 -1
- package/dist/chat/completions/types.d.ts +0 -3
- package/dist/chat/completions/types.js +1 -1
- package/dist/chat/functions/process.d.ts +1 -2
- package/dist/chat/functions/process.js +1 -1
- package/dist/chat/index.d.ts +3 -6
- package/dist/chat/index.js +1 -1
- package/dist/domain/account-status.d.ts +6 -0
- package/dist/domain/account-status.js +1 -0
- package/dist/domain/deployments/api-token-domain.d.ts +5 -0
- package/dist/domain/deployments/api-token-domain.js +1 -1
- package/dist/domain/deployments/api-tokens/index.d.ts +1 -0
- package/dist/domain/deployments/api-tokens/index.js +1 -0
- package/dist/domain/deployments/api-tokens/limits.d.ts +13 -0
- package/dist/domain/deployments/api-tokens/limits.js +1 -0
- package/dist/domain/deployments/assistant-limit-domain.d.ts +13 -0
- package/dist/domain/deployments/assistant-limit-domain.js +1 -0
- package/dist/domain/deployments/customer-domain.d.ts +2 -0
- package/dist/domain/deployments/deployment-build-domain.d.ts +10 -0
- package/dist/domain/deployments/deployment-domain.d.ts +4 -0
- package/dist/domain/deployments/environment-domain.d.ts +3 -0
- package/dist/domain/deployments/index.d.ts +4 -2
- package/dist/domain/deployments/index.js +1 -1
- package/dist/domain/deployments/oauth-connection-domain.d.ts +0 -7
- package/dist/domain/deployments/oauth-connection-domain.js +1 -1
- package/dist/domain/index.d.ts +5 -0
- package/dist/domain/index.js +1 -1
- package/dist/domain/password-policy.d.ts +22 -0
- package/dist/domain/password-policy.js +1 -0
- package/dist/domain/product-configurations/configurations-domain.d.ts +2 -7
- package/dist/domain/product-configurations/configurations-domain.js +1 -1
- package/dist/domain/product-configurations/index.d.ts +1 -1
- package/dist/domain/product-configurations/index.js +1 -1
- package/dist/domain/workspace-invitation-role.d.ts +7 -0
- package/dist/domain/workspace-invitation-role.js +1 -0
- package/dist/domain/workspace-invitation.d.ts +7 -0
- package/dist/domain/workspace-invitation.js +1 -0
- package/dist/domain/workspace-membership-status.d.ts +6 -0
- package/dist/domain/workspace-membership-status.js +1 -0
- package/dist/webhook/implementation/backend-data-response.d.ts +3 -0
- package/dist/webhook/implementation/backend-data-response.js +1 -0
- package/dist/webhook/implementation/index.d.ts +1 -2
- package/dist/webhook/implementation/index.js +1 -1
- package/dist/webhook/implementation/webhook-api-types.d.ts +260 -5
- package/dist/webhook/implementation/webhook-api-types.js +1 -1
- package/dist/webhook/implementation/webhook-routing.d.ts +2 -6
- package/dist/webhook/implementation/webhook-routing.js +1 -1
- package/dist/webhook/implementation/webhook-tunnel-types.d.ts +9 -0
- package/dist/webhook/implementation/webhook-tunnel-types.js +1 -1
- package/package.json +5 -6
- package/dist/assistant/browser-details-tool.d.ts +0 -16
- package/dist/assistant/browser-details-tool.js +0 -1
- package/dist/chat/completions/messages.d.ts +0 -3
- package/dist/chat/completions/messages.js +0 -1
- package/dist/chat/functions/augmentations.d.ts +0 -3
- package/dist/chat/functions/augmentations.js +0 -1
- package/dist/chat/functions/create.d.ts +0 -5
- package/dist/chat/functions/create.js +0 -1
- package/dist/webhook/implementation/webhook-client.d.ts +0 -85
- package/dist/webhook/implementation/webhook-client.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e;import{remark as r}from"remark";import t from"remark-gfm";export const ASSISTANT_SPEECH_MAX_CHARACTERS=1500;let a=/^\s*\[![a-z]+\]\s*/i,c=/[.!?…:;]$/,s=e=>e.map(e=>{switch(e.type){case"text":case"inlineCode":return e.value;case"break":return" ";case"emphasis":case"strong":case"delete":case"link":case"linkReference":return s(e.children);default:return""}}).join(""),l=(e,r)=>e.flatMap((e,t)=>{switch(e.type){case"paragraph":case"heading":{let l,n=s(e.children);return""===(l=(r&&0===t?n.replace(a,""):n).replace(/\s+/g," ").replace(/ ([.,!?;:])/g,"$1").trim())?[]:[c.test(l)?l:`${l}.`]}case"blockquote":return l(e.children,!0);case"list":case"listItem":return l(e.children,!1);default:return[]}});export const buildSpeechText=a=>a.flatMap(a=>l((e??=r().use(t)).parse(a).children,!1)).join(" ");
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Why the server recorded an error in place of the result of an assistant tool call:
|
|
4
|
+
* - `cancelled`: the user stopped the reply while the call was waiting for its result
|
|
5
|
+
* - `no_result`: the thread stopped waiting for the call when the user wrote a new message
|
|
6
|
+
* - `tool_budget`: the reply had used its tool calls for one user message, so the call was not run
|
|
7
|
+
*/
|
|
8
|
+
export declare const ASSISTANT_TOOL_ERROR_CODES: readonly ['cancelled', 'no_result', 'tool_budget'];
|
|
9
|
+
export type AssistantToolErrorCode = (typeof ASSISTANT_TOOL_ERROR_CODES)[number];
|
|
10
|
+
/**
|
|
11
|
+
* An error in place of the result of an assistant tool call. `error` is text for the model, in the
|
|
12
|
+
* `{ error }` form TanStack AI itself records for a tool that threw or was cancelled. `code` is set
|
|
13
|
+
* on the errors the server records and tells the assistant panel what to say to the user; it is
|
|
14
|
+
* read as any string, so a panel older than the server shows a code it does not know as a general
|
|
15
|
+
* failure.
|
|
16
|
+
*/
|
|
17
|
+
export interface AssistantToolError {
|
|
18
|
+
readonly error: string;
|
|
19
|
+
readonly code?: string | undefined;
|
|
20
|
+
}
|
|
21
|
+
export declare const AssistantToolError: z.ZodObject<{
|
|
22
|
+
error: z.ZodString;
|
|
23
|
+
code: z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
error: string;
|
|
26
|
+
code?: string | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
error: string;
|
|
29
|
+
code?: string | undefined;
|
|
30
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as o}from"zod";export const ASSISTANT_TOOL_ERROR_CODES=["cancelled","no_result","tool_budget"];export const AssistantToolError=o.object({error:o.string(),code:o.string().optional()});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The name of the AG-UI `CUSTOM` event that opens the stream of a run started by a voice message: the
|
|
4
|
+
* transcript the server stored as the message's text, in place of the recording.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ASSISTANT_TRANSCRIPT_EVENT = "assistant:transcript";
|
|
7
|
+
/**
|
|
8
|
+
* The value of an {@link ASSISTANT_TRANSCRIPT_EVENT} event. The browser puts the transcript in its
|
|
9
|
+
* own copy of the message, so no later request posts the recording again.
|
|
10
|
+
*/
|
|
11
|
+
export interface AssistantTranscriptEvent {
|
|
12
|
+
/** The id of the user message the browser sent the recording in. */
|
|
13
|
+
readonly messageId: string;
|
|
14
|
+
readonly transcript: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const AssistantTranscriptEvent: z.ZodObject<{
|
|
17
|
+
messageId: z.ZodString;
|
|
18
|
+
transcript: z.ZodString;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
messageId: string;
|
|
21
|
+
transcript: string;
|
|
22
|
+
}, {
|
|
23
|
+
messageId: string;
|
|
24
|
+
transcript: string;
|
|
25
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as t}from"zod";export const ASSISTANT_TRANSCRIPT_EVENT="assistant:transcript";export const AssistantTranscriptEvent=t.object({messageId:t.string(),transcript:t.string()});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The audio types a voice message may be recorded in: what `MediaRecorder` produces in the browsers
|
|
3
|
+
* the panel supports, webm/Opus in most and mp4/AAC in Safari, and Ogg/Opus. The server sends the
|
|
4
|
+
* recording to the transcription model as it is, without transcoding it.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ASSISTANT_VOICE_MIME_TYPES: readonly ['audio/webm', 'audio/mp4', 'audio/ogg'];
|
|
7
|
+
/** An audio type a voice message may be recorded in; see {@link ASSISTANT_VOICE_MIME_TYPES}. */
|
|
8
|
+
export type AssistantVoiceMimeType = (typeof ASSISTANT_VOICE_MIME_TYPES)[number];
|
|
9
|
+
/**
|
|
10
|
+
* The voice type of a recording's MIME type, as `MediaRecorder` reports it, its parameters such as
|
|
11
|
+
* `codecs` ignored; `null` for a type a voice message may not be recorded in.
|
|
12
|
+
*/
|
|
13
|
+
export declare const readAssistantVoiceMimeType: (mimeType: string) => AssistantVoiceMimeType | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const ASSISTANT_VOICE_MIME_TYPES=["audio/webm","audio/mp4","audio/ogg"];export const readAssistantVoiceMimeType=e=>{let o=e.split(";")[0]?.trim().toLowerCase()??"";return ASSISTANT_VOICE_MIME_TYPES.find(e=>e===o)??null};
|
package/dist/chat/api.d.ts
CHANGED
|
@@ -1,45 +1,4 @@
|
|
|
1
1
|
import type OpenAI from 'openai';
|
|
2
|
-
import type { Uploadable } from 'openai/core/uploads';
|
|
3
|
-
/**
|
|
4
|
-
* Generate a completion from a prompt and message history
|
|
5
|
-
* @param openai OpenAI instance
|
|
6
|
-
* @param params completion options
|
|
7
|
-
* @param prompt base prompt
|
|
8
|
-
* @param messages message history- last message should be user message
|
|
9
|
-
* @param tools available functions to call
|
|
10
|
-
* @returns
|
|
11
|
-
*/
|
|
12
|
-
export declare const createCompletion: (openai: OpenAI, params: Omit<OpenAI.Chat.Completions.ChatCompletionCreateParams, 'stream' | 'messages'>, prompt: string, messages: OpenAI.ChatCompletionMessageParam[], tools?: OpenAI.ChatCompletionTool[]) => Promise<import("openai/core/streaming.mjs").Stream<OpenAI.ChatCompletionChunk> & {
|
|
13
|
-
_request_id?: string | null;
|
|
14
|
-
}>;
|
|
15
|
-
/**
|
|
16
|
-
* Generate a text transcription from an audio file
|
|
17
|
-
* @param openai OpenAI instance
|
|
18
|
-
* @param params transcription options
|
|
19
|
-
* @param file audio file
|
|
20
|
-
* @returns
|
|
21
|
-
*/
|
|
22
|
-
export declare const createTranscription: (openai: OpenAI, params: Omit<OpenAI.Audio.Transcriptions.TranscriptionCreateParamsNonStreaming, 'file' | 'model'>, file: Uploadable) => Promise<OpenAI.Audio.Transcription & {
|
|
23
|
-
_request_id?: string | null;
|
|
24
|
-
}>;
|
|
25
|
-
/**
|
|
26
|
-
* Generate a speech audio file from a text message
|
|
27
|
-
* @param openai OpenAI instance
|
|
28
|
-
* @param params speech options
|
|
29
|
-
* @param message text message
|
|
30
|
-
* @returns
|
|
31
|
-
*/
|
|
32
|
-
export declare const createSpeech: (openai: OpenAI, params: Omit<OpenAI.Audio.Speech.SpeechCreateParams, 'input' | 'model' | 'voice'>, message: string) => Promise<Response>;
|
|
33
|
-
/**
|
|
34
|
-
* Generate a function call completion from a prompt and message
|
|
35
|
-
* @param openai OpenAI instance
|
|
36
|
-
* @param params completion options
|
|
37
|
-
* @param prompt base prompt
|
|
38
|
-
* @param message input message
|
|
39
|
-
* @param tools available functions to call
|
|
40
|
-
* @returns
|
|
41
|
-
*/
|
|
42
|
-
export declare const createFunctionCallCompletion: (openai: OpenAI, params: Omit<OpenAI.Chat.Completions.ChatCompletionCreateParams, 'stream' | 'messages'>, prompt: string, message: string, tools: OpenAI.ChatCompletionTool[]) => Promise<OpenAI.ChatCompletionMessageFunctionToolCall.Function[]>;
|
|
43
2
|
/**
|
|
44
3
|
* Generate an embedding from a text input
|
|
45
4
|
* @param openai OpenAI instance
|
package/dist/chat/api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const createEmbedding=async(e,d,t)=>{let a=await e.embeddings.create({model:"text-embedding-3-small",...d,input:t});return a.data[0]?.embedding};
|
|
@@ -22,7 +22,4 @@ export interface ChatMessageAugmentation {
|
|
|
22
22
|
augmentation: Record<string, unknown>;
|
|
23
23
|
}
|
|
24
24
|
export type ChatStreamChunk = ChatMessageContentChunk | ChatToolCalls | ChatErrorChunk | ChatMessageAugmentation;
|
|
25
|
-
export declare const isChatMessageContentChunk: (chunk: ChatStreamChunk) => chunk is ChatMessageContentChunk;
|
|
26
|
-
export declare const isChatMessageAugmentation: (chunk: ChatStreamChunk) => chunk is ChatMessageAugmentation;
|
|
27
|
-
export declare const isChatToolCalls: (chunk: ChatStreamChunk) => chunk is ChatToolCalls;
|
|
28
25
|
export declare const isChatError: (chunk: ChatStreamChunk) => chunk is ChatErrorChunk;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ChunkType={content:"content",calls:"calls",error:"error",augment:"augment"};export const
|
|
1
|
+
export const ChunkType={content:"content",calls:"calls",error:"error",augment:"augment"};export const isChatError=r=>r.type===ChunkType.error;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type OpenAI from 'openai';
|
|
2
2
|
import type { Empty } from '../utils/types.js';
|
|
3
|
-
import type { ChatExecutableFunction,
|
|
4
|
-
export declare const createCompletionTool: <C extends Empty = Empty, R extends Empty = Empty>({ name, description, parameters, }: OpenAI.FunctionDefinition | ChatFunctionDefinition<C, R, any>) => OpenAI.ChatCompletionFunctionTool;
|
|
3
|
+
import type { ChatExecutableFunction, ChatFunctionResult } from './types.js';
|
|
5
4
|
/**
|
|
6
5
|
* Processes tool calls and generates array of return messages.
|
|
7
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const processToolCalls=async(t,n,e,o)=>{let l=[];for(let r of t){let{id:t}=r,c={tool_call_id:t,role:"tool"};if("function"!==r.type){l.push({...c,content:`Tool call type '${r.type}' is not supported — only function tool calls can be processed by this handler.`});continue}let{function:s}=r;try{let t=n?.find(t=>t.name===s.name);if(!t){l.push({...c,content:`Function \`${s.name}\` not found`});continue}let a=JSON.parse(s.arguments??"{}"),i=t.validate(a);if(i){l.push({...c,content:i});continue}let u=await t.function(a,e);o?.(u,r),l.push({...c,content:u.result})}catch(e){let n=e instanceof Error?e.message:String(e);throw Error(`Call ${t} of function \`${s.name}\` resulted in error: ${n}`)}}return l};
|
package/dist/chat/index.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export { ChunkType, isChatMessageContentChunk, isChatMessageAugmentation, isChatToolCalls, isChatError, } from './completions/types.js';
|
|
1
|
+
export { createEmbedding } from './api.js';
|
|
2
|
+
export { ChunkType, isChatError } from './completions/types.js';
|
|
4
3
|
export type { ChatMessageContentChunk, ChatToolCalls, ChatErrorChunk, ChatStreamChunk, ChatMessageAugmentation, } from './completions/types.js';
|
|
5
4
|
export { createValidator } from './functions/validate.js';
|
|
6
|
-
export {
|
|
7
|
-
export { simpleAugmentationHandler } from './functions/augmentations.js';
|
|
8
|
-
export { processToolCalls, createCompletionTool } from './functions/process.js';
|
|
5
|
+
export { processToolCalls } from './functions/process.js';
|
|
9
6
|
export type { ChatFunction, ChatExecutableFunction, ChatFunctionDefinition, ChatFunctionResult, } from './functions/types.js';
|
|
10
7
|
export type { Empty } from './utils/types.js';
|
package/dist/chat/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{createEmbedding}from"./api.js";export{ChunkType,isChatError}from"./completions/types.js";export{createValidator}from"./functions/validate.js";export{processToolCalls}from"./functions/process.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Global account state; disabled accounts cannot use any workspace membership. */
|
|
2
|
+
export declare const AccountStatus: {
|
|
3
|
+
readonly Active: 'active';
|
|
4
|
+
readonly Disabled: 'disabled';
|
|
5
|
+
};
|
|
6
|
+
export type AccountStatus = (typeof AccountStatus)[keyof typeof AccountStatus];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const AccountStatus={Active:"active",Disabled:"disabled"};
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* How long the name of an API token may be. A builder gives the name when approving `phoenix login` in Studio, and
|
|
4
|
+
* the CLI sends it back with `POST /auth/token`, so Studio and both server inputs apply this one limit.
|
|
5
|
+
*/
|
|
6
|
+
export declare const API_TOKEN_NAME_MAX_LENGTH = 100;
|
|
2
7
|
/**
|
|
3
8
|
* Identifies one API token: a long-lived, revocable credential that authenticates calls to the Phoenix API on
|
|
4
9
|
* behalf of the user who approved it. The id names the token in revocation and in the request session; it is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{validate as o}from"uuid";import{Branded as
|
|
1
|
+
import{validate as o}from"uuid";import{Branded as t}from"@salsita-ai/common/utils";export const API_TOKEN_NAME_MAX_LENGTH=100;export const ApiTokenId=r=>{if(!o(r))throw Error(`Invalid API token id: ${r}. It must be a valid UUID.`);return t(r)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ApiTokenLimits } from './limits.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{ApiTokenLimits}from"./limits.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Immutable automation limits, intersected with the owner's current grants. Null project means the token's workspace. */
|
|
3
|
+
export declare const ApiTokenLimits: z.ZodObject<{
|
|
4
|
+
projectId: z.ZodNullable<z.ZodString>;
|
|
5
|
+
actions: z.ZodTuple<[z.ZodLiteral<"deploy">], null>;
|
|
6
|
+
}, "strict", z.ZodTypeAny, {
|
|
7
|
+
projectId: string | null;
|
|
8
|
+
actions: ["deploy"];
|
|
9
|
+
}, {
|
|
10
|
+
projectId: string | null;
|
|
11
|
+
actions: ["deploy"];
|
|
12
|
+
}>;
|
|
13
|
+
export type ApiTokenLimits = z.infer<typeof ApiTokenLimits>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as t}from"zod";export const ApiTokenLimits=t.object({projectId:t.string().uuid().nullable(),actions:t.tuple([t.literal("deploy")])}).strict();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* How many weighted tokens the conversational assistant may use in a calendar month, set by a super admin in Studio
|
|
4
|
+
* on each environment and each customer. A weighted token is an output-token equivalent at gpt-6.1-sol list prices
|
|
5
|
+
* (1,000,000 is about $10), the same unit as the assistant's hourly limits. Once either the environment's or the
|
|
6
|
+
* customer's cap is used up, the server refuses new user messages until the next month.
|
|
7
|
+
*/
|
|
8
|
+
export type AssistantMonthlyLimit = Branded<'AssistantMonthlyLimit', number>;
|
|
9
|
+
export declare const AssistantMonthlyLimit: (limit: number) => AssistantMonthlyLimit;
|
|
10
|
+
/** The cap of an environment nobody configured. */
|
|
11
|
+
export declare const DEFAULT_ENVIRONMENT_ASSISTANT_MONTHLY_LIMIT: AssistantMonthlyLimit;
|
|
12
|
+
/** The cap of a customer nobody configured, across all its environments. */
|
|
13
|
+
export declare const DEFAULT_CUSTOMER_ASSISTANT_MONTHLY_LIMIT: AssistantMonthlyLimit;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Branded as t}from"@salsita-ai/common/utils";export const AssistantMonthlyLimit=o=>{if(!Number.isSafeInteger(o)||o<0)throw Error(`Assistant monthly limit must be a non-negative whole number of weighted tokens up to ${Number.MAX_SAFE_INTEGER}, but it is ${o}. Enter 0 to turn the assistant off, or a positive whole number.`);return t(o)};export const DEFAULT_ENVIRONMENT_ASSISTANT_MONTHLY_LIMIT=AssistantMonthlyLimit(5e7);export const DEFAULT_CUSTOMER_ASSISTANT_MONTHLY_LIMIT=AssistantMonthlyLimit(1e8);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { Branded, type ValueOf } from '@salsita-ai/common/utils';
|
|
3
|
+
import type { AssistantMonthlyLimit } from './assistant-limit-domain.js';
|
|
3
4
|
export type CustomerId = Branded<'CustomerId', string>;
|
|
4
5
|
export declare const CustomerId: (id: string) => CustomerId;
|
|
5
6
|
export type CustomerName = Branded<'CustomerName', string>;
|
|
@@ -64,6 +65,7 @@ export interface Customer {
|
|
|
64
65
|
readonly aiPreviewEnabled: boolean;
|
|
65
66
|
readonly aiAssistantEnabled: boolean;
|
|
66
67
|
readonly aiImageLimit: number;
|
|
68
|
+
readonly aiAssistantMonthlyLimit: AssistantMonthlyLimit;
|
|
67
69
|
readonly imageRenderLimitEnabled: boolean;
|
|
68
70
|
}
|
|
69
71
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Branded, type ValueOf } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { ApiTokenId } from './api-token-domain.js';
|
|
2
3
|
import type { DeploymentId } from './deployment-domain.js';
|
|
3
4
|
import type { EnvironmentId } from './environment-domain.js';
|
|
4
5
|
export type DeploymentBuildId = Branded<'DeploymentBuildId', string>;
|
|
@@ -53,11 +54,20 @@ export declare const DeploymentBuildStatus: ((value: string) => DeploymentBuildS
|
|
|
53
54
|
export interface DeploymentBuild {
|
|
54
55
|
readonly id: DeploymentBuildId;
|
|
55
56
|
readonly environmentId: EnvironmentId;
|
|
57
|
+
readonly number: number | null;
|
|
56
58
|
readonly mode: DeploymentBuildMode;
|
|
57
59
|
readonly status: DeploymentBuildStatus;
|
|
58
60
|
readonly sourceKey: DeploymentBuildSourceKey | null;
|
|
59
61
|
readonly sdkVersion: string | null;
|
|
62
|
+
readonly rebuiltFrom: {
|
|
63
|
+
readonly buildId: DeploymentBuildId;
|
|
64
|
+
readonly number: number | null;
|
|
65
|
+
} | null;
|
|
60
66
|
readonly createdByUserId: string | null;
|
|
67
|
+
readonly apiToken: {
|
|
68
|
+
readonly id: ApiTokenId;
|
|
69
|
+
readonly name: string;
|
|
70
|
+
} | null;
|
|
61
71
|
readonly deploymentId: DeploymentId | null;
|
|
62
72
|
readonly error: string | null;
|
|
63
73
|
readonly createdAt: Date;
|
|
@@ -86,7 +86,9 @@ export interface Deployment {
|
|
|
86
86
|
readonly id: DeploymentId;
|
|
87
87
|
readonly environmentId: EnvironmentId;
|
|
88
88
|
readonly isActive: boolean;
|
|
89
|
+
readonly assistantEnabled: boolean;
|
|
89
90
|
readonly resourcesUrl: ResourceUrl;
|
|
91
|
+
readonly useCognito?: boolean;
|
|
90
92
|
readonly useAuthHook: boolean;
|
|
91
93
|
readonly lambdaWebhookUrl: LambdaWebhookUrl | null;
|
|
92
94
|
readonly privateS3Bucket: PrivateS3Bucket;
|
|
@@ -107,7 +109,9 @@ export interface NewDeployment {
|
|
|
107
109
|
readonly id: DeploymentId;
|
|
108
110
|
readonly environmentId: EnvironmentId;
|
|
109
111
|
readonly isActive: boolean;
|
|
112
|
+
readonly assistantEnabled: boolean;
|
|
110
113
|
readonly resourcesUrl: ResourceUrl;
|
|
114
|
+
readonly useCognito?: boolean;
|
|
111
115
|
readonly useAuthHook: boolean;
|
|
112
116
|
readonly lambdaWebhookUrl: LambdaWebhookUrl | null;
|
|
113
117
|
readonly privateS3Bucket: PrivateS3Bucket;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Branded, type ValueOf } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { AssistantMonthlyLimit } from './assistant-limit-domain.js';
|
|
2
3
|
import { type CustomerClerkSettings } from './customer-domain.js';
|
|
3
4
|
import type { AllowedOrigin, DeploymentId, PrivateS3Bucket, PublicS3Bucket } from './deployment-domain.js';
|
|
4
5
|
import type { ImageRenderLimit } from './image-render-domain.js';
|
|
@@ -65,6 +66,7 @@ export interface Environment {
|
|
|
65
66
|
readonly allowedOrigins: readonly AllowedOrigin[];
|
|
66
67
|
readonly sessionLimit: SessionLimit;
|
|
67
68
|
readonly imageRenderLimit: ImageRenderLimit;
|
|
69
|
+
readonly aiAssistantMonthlyLimit: AssistantMonthlyLimit;
|
|
68
70
|
readonly publicS3Bucket: PublicS3Bucket;
|
|
69
71
|
readonly privateS3Bucket: PrivateS3Bucket;
|
|
70
72
|
readonly serviceName: ServiceName;
|
|
@@ -88,6 +90,7 @@ export interface NewEnvironment {
|
|
|
88
90
|
readonly allowedOrigins: readonly AllowedOrigin[];
|
|
89
91
|
readonly sessionLimit: SessionLimit;
|
|
90
92
|
readonly imageRenderLimit: ImageRenderLimit;
|
|
93
|
+
readonly aiAssistantMonthlyLimit: AssistantMonthlyLimit;
|
|
91
94
|
readonly publicS3Bucket: PublicS3Bucket;
|
|
92
95
|
readonly privateS3Bucket: PrivateS3Bucket;
|
|
93
96
|
readonly serviceName: ServiceName;
|
|
@@ -5,10 +5,12 @@ export { DEFAULT_PROJECT_ALIAS, ProjectId, ProjectName, ProjectSlug, ProjectCust
|
|
|
5
5
|
export { OAuthProviderId, OAuthClientId, OAuthClientSecret, OAuthBaseUrl, type OAuthProvider, OAuthProviderName, OAuthScopes, } from './oauth-provider-domain.js';
|
|
6
6
|
export { DeploymentBuild, DeploymentBuildId, DeploymentBuildMode, DeploymentBuildSourceKey, DeploymentBuildStatus, } from './deployment-build-domain.js';
|
|
7
7
|
export { SdkBuilderSetupState } from './sdk-builder-setup-domain.js';
|
|
8
|
-
export { ApiTokenId } from './api-token-domain.js';
|
|
8
|
+
export { API_TOKEN_NAME_MAX_LENGTH, ApiTokenId } from './api-token-domain.js';
|
|
9
9
|
export { CustomerId, CustomerName, type Customer, CustomerClerkPublishableKey, CustomerClerkSecretKey, CustomerClerkJwtSecret, CustomerClerkOAuthBaseUrl, CustomerClerkOAuthClientId, CustomerClerkOAuthClientSecret, type CustomerClerkSettings, CustomerSlug, CustomerType, CustomerTypeSchema, } from './customer-domain.js';
|
|
10
|
-
export { OAuthConnectionId, type OAuthConnectionProvider, OAuthRefreshToken, OAuthGrantedScopes, SHAREPOINT_MISSING_TENANT_DOMAIN,
|
|
10
|
+
export { OAuthConnectionId, type OAuthConnectionProvider, OAuthRefreshToken, OAuthGrantedScopes, SHAREPOINT_MISSING_TENANT_DOMAIN, type NewOAuthConnection, type OAuthConnection, type SharePointProjectSite, OAUTH_STALE_CONNECTION_CODE, parseSharePointTenantDomain, } from './oauth-connection-domain.js';
|
|
11
11
|
export { type Embeddings } from './embedding-domain.js';
|
|
12
12
|
export { BucketTimestamp, SessionCount, type SessionBucket, type NewSessionBucket } from './session-domain.js';
|
|
13
13
|
export { AiImageCount, type NewAiImageBucket } from './ai-image-domain.js';
|
|
14
14
|
export { ImageRenderCount, ImageRenderLimit, DEFAULT_IMAGE_RENDER_LIMIT, type ImageRenderBucket, type NewImageRenderBucket, } from './image-render-domain.js';
|
|
15
|
+
export { AssistantMonthlyLimit, DEFAULT_ENVIRONMENT_ASSISTANT_MONTHLY_LIMIT, DEFAULT_CUSTOMER_ASSISTANT_MONTHLY_LIMIT, } from './assistant-limit-domain.js';
|
|
16
|
+
export { ApiTokenLimits } from './api-tokens/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{EnvironmentId,EnvironmentName,EnvironmentSlug,EnvironmentType,FrontendUrl,DevelopmentKey,DEFAULT_SESSION_LIMIT,PRODUCTION_ENVIRONMENT_SLUG,SessionLimit,ServerKey,BaseDomain,ServiceName,FrontendBucketName,LambdaFunctionName,TfStateKeyPrefix,DdServiceName}from"./environment-domain.js";export{ConfigurationSchemaId,ConfigurationSchemaJsonSchema,ConfigurationSchemaVersion}from"./configuration-schema-domain.js";export{ApplicationType,AllowedOrigin,ChatConfiguration,DeploymentId,ResourceUrl,LambdaWebhookUrl,PrivateS3Bucket,PrivateDeploymentResourcesPath,PublicS3Bucket,PublicDeploymentResourcesPath,DeploymentApplicationId,OAuthProviderRegistration}from"./deployment-domain.js";export{DEFAULT_PROJECT_ALIAS,ProjectId,ProjectName,ProjectSlug,ProjectCustomDomain,ParamStorePath}from"./project-domain.js";export{OAuthProviderId,OAuthClientId,OAuthClientSecret,OAuthBaseUrl,OAuthProviderName,OAuthScopes}from"./oauth-provider-domain.js";export{DeploymentBuild,DeploymentBuildId,DeploymentBuildMode,DeploymentBuildSourceKey,DeploymentBuildStatus}from"./deployment-build-domain.js";export{SdkBuilderSetupState}from"./sdk-builder-setup-domain.js";export{ApiTokenId}from"./api-token-domain.js";export{CustomerId,CustomerName,CustomerClerkPublishableKey,CustomerClerkSecretKey,CustomerClerkJwtSecret,CustomerClerkOAuthBaseUrl,CustomerClerkOAuthClientId,CustomerClerkOAuthClientSecret,CustomerSlug,CustomerType,CustomerTypeSchema}from"./customer-domain.js";export{OAuthConnectionId,OAuthRefreshToken,OAuthGrantedScopes,SHAREPOINT_MISSING_TENANT_DOMAIN,
|
|
1
|
+
export{EnvironmentId,EnvironmentName,EnvironmentSlug,EnvironmentType,FrontendUrl,DevelopmentKey,DEFAULT_SESSION_LIMIT,PRODUCTION_ENVIRONMENT_SLUG,SessionLimit,ServerKey,BaseDomain,ServiceName,FrontendBucketName,LambdaFunctionName,TfStateKeyPrefix,DdServiceName}from"./environment-domain.js";export{ConfigurationSchemaId,ConfigurationSchemaJsonSchema,ConfigurationSchemaVersion}from"./configuration-schema-domain.js";export{ApplicationType,AllowedOrigin,ChatConfiguration,DeploymentId,ResourceUrl,LambdaWebhookUrl,PrivateS3Bucket,PrivateDeploymentResourcesPath,PublicS3Bucket,PublicDeploymentResourcesPath,DeploymentApplicationId,OAuthProviderRegistration}from"./deployment-domain.js";export{DEFAULT_PROJECT_ALIAS,ProjectId,ProjectName,ProjectSlug,ProjectCustomDomain,ParamStorePath}from"./project-domain.js";export{OAuthProviderId,OAuthClientId,OAuthClientSecret,OAuthBaseUrl,OAuthProviderName,OAuthScopes}from"./oauth-provider-domain.js";export{DeploymentBuild,DeploymentBuildId,DeploymentBuildMode,DeploymentBuildSourceKey,DeploymentBuildStatus}from"./deployment-build-domain.js";export{SdkBuilderSetupState}from"./sdk-builder-setup-domain.js";export{API_TOKEN_NAME_MAX_LENGTH,ApiTokenId}from"./api-token-domain.js";export{CustomerId,CustomerName,CustomerClerkPublishableKey,CustomerClerkSecretKey,CustomerClerkJwtSecret,CustomerClerkOAuthBaseUrl,CustomerClerkOAuthClientId,CustomerClerkOAuthClientSecret,CustomerSlug,CustomerType,CustomerTypeSchema}from"./customer-domain.js";export{OAuthConnectionId,OAuthRefreshToken,OAuthGrantedScopes,SHAREPOINT_MISSING_TENANT_DOMAIN,OAUTH_STALE_CONNECTION_CODE,parseSharePointTenantDomain}from"./oauth-connection-domain.js";export{BucketTimestamp,SessionCount}from"./session-domain.js";export{AiImageCount}from"./ai-image-domain.js";export{ImageRenderCount,ImageRenderLimit,DEFAULT_IMAGE_RENDER_LIMIT}from"./image-render-domain.js";export{AssistantMonthlyLimit,DEFAULT_ENVIRONMENT_ASSISTANT_MONTHLY_LIMIT,DEFAULT_CUSTOMER_ASSISTANT_MONTHLY_LIMIT}from"./assistant-limit-domain.js";export{ApiTokenLimits}from"./api-tokens/index.js";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
import { Branded } from '@salsita-ai/common/utils';
|
|
3
2
|
import { type ProjectId } from './project-domain.js';
|
|
4
3
|
export type OAuthConnectionId = Branded<'OAuthConnectionId', string>;
|
|
@@ -16,13 +15,7 @@ export type OAuthGrantedScopes = Branded<'OAuthGrantedScopes', readonly string[]
|
|
|
16
15
|
export declare const OAuthGrantedScopes: (scopes: readonly string[]) => OAuthGrantedScopes;
|
|
17
16
|
export declare const OAUTH_STALE_CONNECTION_CODE: 'STALE_CONNECTION';
|
|
18
17
|
export declare const SHAREPOINT_MISSING_TENANT_DOMAIN: 'fill-in-tenant-domain.invalid';
|
|
19
|
-
export declare class SharePointTenantDomainInvalidError extends Error {
|
|
20
|
-
readonly code: 'tenant_domain_invalid';
|
|
21
|
-
constructor(tenantDomain: string, reason: string);
|
|
22
|
-
}
|
|
23
18
|
export declare const parseSharePointTenantDomain: (rawDomain: string) => string | null;
|
|
24
|
-
export declare const parseRequiredSharePointTenantDomain: (rawDomain: string) => string;
|
|
25
|
-
export declare const SharePointTenantDomainSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
26
19
|
/**
|
|
27
20
|
* Per-project SharePoint site binding, independent of the user OAuth
|
|
28
21
|
* connection model used by Google — Microsoft uses app-only auth
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{validate as
|
|
1
|
+
import{validate as t}from"uuid";import{Branded as o}from"@salsita-ai/common/utils";export const OAuthConnectionId=n=>{if(!t(n))throw Error(`Invalid OAuthConnection id: ${n}. It must be a valid UUID.`);return o(n)};export const OAuthRefreshToken=t=>o(t);export const OAuthGrantedScopes=t=>o(t);export const OAUTH_STALE_CONNECTION_CODE="STALE_CONNECTION";export const SHAREPOINT_MISSING_TENANT_DOMAIN="fill-in-tenant-domain.invalid";let n=/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$/i;export const parseSharePointTenantDomain=t=>{let o=t.trim().toLowerCase();return o&&n.test(o)?o:null};
|
package/dist/domain/index.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
export * from './deployments/index.js';
|
|
2
2
|
export * from './feedback/index.js';
|
|
3
3
|
export * from './product-configurations/index.js';
|
|
4
|
+
export { AccountStatus } from './account-status.js';
|
|
5
|
+
export { PasswordPolicy } from './password-policy.js';
|
|
6
|
+
export { WorkspaceInvitationStatus } from './workspace-invitation.js';
|
|
7
|
+
export { WorkspaceInvitationRole } from './workspace-invitation-role.js';
|
|
8
|
+
export { WorkspaceMembershipStatus } from './workspace-membership-status.js';
|
package/dist/domain/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./deployments/index.js";export*from"./feedback/index.js";export*from"./product-configurations/index.js";
|
|
1
|
+
export*from"./deployments/index.js";export*from"./feedback/index.js";export*from"./product-configurations/index.js";export{AccountStatus}from"./account-status.js";export{PasswordPolicy}from"./password-policy.js";export{WorkspaceInvitationStatus}from"./workspace-invitation.js";export{WorkspaceInvitationRole}from"./workspace-invitation-role.js";export{WorkspaceMembershipStatus}from"./workspace-membership-status.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Public password requirements; excludes all other identity-provider configuration. */
|
|
3
|
+
export declare const PasswordPolicy: z.ZodReadonly<z.ZodObject<{
|
|
4
|
+
minimumLength: z.ZodNumber;
|
|
5
|
+
requireLowercase: z.ZodBoolean;
|
|
6
|
+
requireUppercase: z.ZodBoolean;
|
|
7
|
+
requireNumbers: z.ZodBoolean;
|
|
8
|
+
requireSymbols: z.ZodBoolean;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
minimumLength: number;
|
|
11
|
+
requireLowercase: boolean;
|
|
12
|
+
requireUppercase: boolean;
|
|
13
|
+
requireNumbers: boolean;
|
|
14
|
+
requireSymbols: boolean;
|
|
15
|
+
}, {
|
|
16
|
+
minimumLength: number;
|
|
17
|
+
requireLowercase: boolean;
|
|
18
|
+
requireUppercase: boolean;
|
|
19
|
+
requireNumbers: boolean;
|
|
20
|
+
requireSymbols: boolean;
|
|
21
|
+
}>>;
|
|
22
|
+
export type PasswordPolicy = z.infer<typeof PasswordPolicy>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as e}from"zod";export const PasswordPolicy=e.object({minimumLength:e.number().int().min(6).max(99),requireLowercase:e.boolean(),requireUppercase:e.boolean(),requireNumbers:e.boolean(),requireSymbols:e.boolean()}).readonly();
|
|
@@ -50,13 +50,8 @@ export interface Revision {
|
|
|
50
50
|
configurationId: ConfigurationId;
|
|
51
51
|
configurationSchemaId: ConfigurationSchemaId;
|
|
52
52
|
}
|
|
53
|
-
export declare const PublishedDataRevisionKind: {
|
|
54
|
-
readonly Regular: 'regular';
|
|
55
|
-
readonly Chunked: 'chunked';
|
|
56
|
-
};
|
|
57
|
-
export type PublishedDataRevisionKind = (typeof PublishedDataRevisionKind)[keyof typeof PublishedDataRevisionKind];
|
|
58
53
|
export interface PublishedDataRevision {
|
|
59
|
-
readonly kind:
|
|
54
|
+
readonly kind: 'regular';
|
|
60
55
|
readonly id: PublishedDataRevisionId;
|
|
61
56
|
readonly finalizationUuid: FinalizationUuid;
|
|
62
57
|
readonly uploadPath: PublishedDataRevisionUploadPath;
|
|
@@ -64,7 +59,7 @@ export interface PublishedDataRevision {
|
|
|
64
59
|
readonly data: unknown;
|
|
65
60
|
}
|
|
66
61
|
export interface ChunkedPublishedDataRevision {
|
|
67
|
-
readonly kind:
|
|
62
|
+
readonly kind: 'chunked';
|
|
68
63
|
readonly id: PublishedDataRevisionId;
|
|
69
64
|
readonly finalizationUuid: FinalizationUuid;
|
|
70
65
|
readonly publishedDataHash: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{validate as t}from"uuid";import{Branded as i}from"@salsita-ai/common/utils";export const ConfigurationId=r=>{if(!t(r))throw Error(`Invalid configuration id: ${r}. It must be a valid UUID.`);return i(r)};export const ConfigurationRootEntityType=t=>i(t);export const RevisionId=r=>{if(!t(r))throw Error(`Invalid revision id: ${r}. It must be a valid UUID.`);return i(r)};export const FinalizationUuid=r=>{if(!t(r))throw Error(`Invalid finalization id: ${r}. It must be a valid UUID.`);return i(r)};export const PublishedDataRevisionId=r=>{if(!t(r))throw Error(`Invalid published data revision id: ${r}. It must be a valid UUID.`);return i(r)};export const PublishedDataRevisionUploadPath=t=>i(t);export const PublishedDataRevisionVersion=t=>i(t);export const PublishedDataChunkId=r=>{if(!t(r))throw Error(`Invalid published data chunk id: ${r}. It must be a valid UUID.`);return i(r)};export const ChunkScope=t=>i(t);let r=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;export const ChunkKey=t=>{if(!r.test(t))throw Error(`Invalid chunk key '${t}'. Must be lowercase, start with a letter, and contain only letters, numbers, and hyphens.`);return i(t)};export const FinalizationJobId=t=>i(t);export const ShareId=r=>{if(!t(r))throw Error(`Invalid share id: ${r}. It must be a valid UUID.`);return i(r)};
|
|
1
|
+
import{validate as t}from"uuid";import{Branded as i}from"@salsita-ai/common/utils";export const ConfigurationId=r=>{if(!t(r))throw Error(`Invalid configuration id: ${r}. It must be a valid UUID.`);return i(r)};export const ConfigurationRootEntityType=t=>i(t);export const RevisionId=r=>{if(!t(r))throw Error(`Invalid revision id: ${r}. It must be a valid UUID.`);return i(r)};export const FinalizationUuid=r=>{if(!t(r))throw Error(`Invalid finalization id: ${r}. It must be a valid UUID.`);return i(r)};export const PublishedDataRevisionId=r=>{if(!t(r))throw Error(`Invalid published data revision id: ${r}. It must be a valid UUID.`);return i(r)};export const PublishedDataRevisionUploadPath=t=>i(t);export const PublishedDataRevisionVersion=t=>i(t);export const PublishedDataChunkId=r=>{if(!t(r))throw Error(`Invalid published data chunk id: ${r}. It must be a valid UUID.`);return i(r)};export const ChunkScope=t=>i(t);let r=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;export const ChunkKey=t=>{if(!r.test(t))throw Error(`Invalid chunk key '${t}'. Must be lowercase, start with a letter, and contain only letters, numbers, and hyphens.`);return i(t)};export const FinalizationJobId=t=>i(t);export const ShareId=r=>{if(!t(r))throw Error(`Invalid share id: ${r}. It must be a valid UUID.`);return i(r)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ConfigurationId, ConfigurationRootEntityType, RevisionId, type Revision, type NewRevision,
|
|
1
|
+
export { ConfigurationId, ConfigurationRootEntityType, RevisionId, type Revision, type NewRevision, type PublishedDataRevision, type ChunkedPublishedDataRevision, type AnyPublishedDataRevision, type Configuration, type NewConfiguration, type Entity, FinalizationUuid, type Finalization, type NewFinalization, FinalizationJobId, PublishedDataRevisionId, PublishedDataRevisionUploadPath, PublishedDataRevisionVersion, PublishedDataChunkId, ChunkScope, ChunkKey, type PublishedDataChunk, type NewShare, type Share, ShareId, } from './configurations-domain.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ConfigurationId,ConfigurationRootEntityType,RevisionId,
|
|
1
|
+
export{ConfigurationId,ConfigurationRootEntityType,RevisionId,FinalizationUuid,FinalizationJobId,PublishedDataRevisionId,PublishedDataRevisionUploadPath,PublishedDataRevisionVersion,PublishedDataChunkId,ChunkScope,ChunkKey,ShareId}from"./configurations-domain.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Workspace access granted on acceptance; first-owner invitations always grant SuperAdmin. */
|
|
2
|
+
export declare const WorkspaceInvitationRole: {
|
|
3
|
+
readonly User: 'user';
|
|
4
|
+
readonly Admin: 'admin';
|
|
5
|
+
readonly SuperAdmin: 'superadmin';
|
|
6
|
+
};
|
|
7
|
+
export type WorkspaceInvitationRole = (typeof WorkspaceInvitationRole)[keyof typeof WorkspaceInvitationRole];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const WorkspaceInvitationRole={User:"user",Admin:"admin",SuperAdmin:"superadmin"};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Lifecycle of an email invitation, with expiry derived from its current deadline. */
|
|
2
|
+
export declare const WorkspaceInvitationStatus: {
|
|
3
|
+
readonly Pending: 'pending';
|
|
4
|
+
readonly Expired: 'expired';
|
|
5
|
+
readonly Accepted: 'accepted';
|
|
6
|
+
readonly Revoked: 'revoked';
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const WorkspaceInvitationStatus={Pending:"pending",Expired:"expired",Accepted:"accepted",Revoked:"revoked"};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Workspace-local membership state; suspension retains assignments for explicit reactivation. */
|
|
2
|
+
export declare const WorkspaceMembershipStatus: {
|
|
3
|
+
readonly Active: 'active';
|
|
4
|
+
readonly Suspended: 'suspended';
|
|
5
|
+
};
|
|
6
|
+
export type WorkspaceMembershipStatus = (typeof WorkspaceMembershipStatus)[keyof typeof WorkspaceMembershipStatus];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const WorkspaceMembershipStatus={Active:"active",Suspended:"suspended"};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { APIGatewayProxyStructuredResultV2 } from 'aws-lambda';
|
|
2
|
+
import type { FetchBackendDataHandlerResponse } from './webhook-api-types.js';
|
|
3
|
+
export declare const createBackendDataResponse: (result: FetchBackendDataHandlerResponse, acceptEncoding: string | undefined) => Promise<APIGatewayProxyStructuredResultV2>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const createBackendDataResponse=async(e,t)=>{let n,r,i,s=JSON.stringify(e),o={"content-type":"application/json",vary:"Accept-Encoding"};if(32768>Buffer.byteLength(s,"utf8")||!((i=(r=(n=(t??"").split(",").map(e=>{let[t,...n]=e.trim().toLowerCase().split(";"),r=n.map(e=>e.trim()).find(e=>e.startsWith("q=")),i=void 0===r?"1":r.slice(2).trim();return{encoding:t?.trim(),quality:/^(?:0(?:\.\d{0,3})?|1(?:\.0{0,3})?)$/.test(i)?Number(i):0}})).filter(e=>"gzip"===e.encoding)).length>0?r:n.filter(e=>"*"===e.encoding)).length>0&&i.every(e=>e.quality>0)))return{statusCode:200,headers:o,body:s};let a=await new Response(new Blob([s]).stream().pipeThrough(new CompressionStream("gzip"))).arrayBuffer(),p=Buffer.from(a).toString("base64");return p.length>=Buffer.byteLength(s,"utf8")?{statusCode:200,headers:o,body:s}:{statusCode:200,headers:{...o,"content-encoding":"gzip"},body:p,isBase64Encoded:!0}};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { routeWebhookRequests } from './webhook-routing.js';
|
|
2
2
|
export { TunneledWebhookRequest, TunneledWebhookResponse, WebhookTunnelPollRequest, WebhookTunnelPollResponse, WebhookTunnelRespondRequest, } from './webhook-tunnel-types.js';
|
|
3
|
-
export {
|
|
4
|
-
export { AuthHandlerResponse, AuthUserIdSource, RefreshPayload, CodePayload, AuthPayload, AnonymousPayload, FinalizeWebhookPayload, CallbackPayload, CallbackResponse, FetchBackendDataPayload, FetchBackendDataHandlerResponse, } from './webhook-api-types.js';
|
|
3
|
+
export { AssistantSetupPayload, AssistantSetupResponse, AuthHandlerResponse, AuthUserIdSource, RefreshPayload, CodePayload, AuthPayload, PhoenixAuthPayload, AnonymousPayload, FinalizeWebhookPayload, CallbackPayload, CallbackResponse, FetchBackendDataPayload, FetchBackendDataHandlerResponse, } from './webhook-api-types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{routeWebhookRequests}from"./webhook-routing.js";export{TunneledWebhookRequest,TunneledWebhookResponse,WebhookTunnelPollRequest,WebhookTunnelPollResponse,WebhookTunnelRespondRequest}from"./webhook-tunnel-types.js";export{
|
|
1
|
+
export{routeWebhookRequests}from"./webhook-routing.js";export{TunneledWebhookRequest,TunneledWebhookResponse,WebhookTunnelPollRequest,WebhookTunnelPollResponse,WebhookTunnelRespondRequest}from"./webhook-tunnel-types.js";export{AssistantSetupPayload,AssistantSetupResponse,AuthHandlerResponse,AuthUserIdSource,RefreshPayload,CodePayload,AuthPayload,PhoenixAuthPayload,AnonymousPayload,FinalizeWebhookPayload,CallbackPayload,CallbackResponse,FetchBackendDataPayload,FetchBackendDataHandlerResponse}from"./webhook-api-types.js";
|