@squidcloud/jira-jsm-client 1.0.497 → 1.0.498

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.
Files changed (64) hide show
  1. package/dist/connectors/jira_jsm/common/src/jira-jsm-types.d.ts +1 -28
  2. package/dist/internal-common/src/ai/system-openai-compatible.d.ts +35 -0
  3. package/dist/internal-common/src/public-types/ai-agent-integrations.public-types.d.ts +71 -0
  4. package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +1594 -0
  5. package/dist/internal-common/src/public-types/ai-common.public-types.d.ts +303 -0
  6. package/dist/internal-common/src/public-types/ai-function.public-types.d.ts +114 -0
  7. package/dist/internal-common/src/public-types/ai-knowledge-base.public-types.d.ts +2378 -0
  8. package/dist/internal-common/src/public-types/ai-query.public-types.d.ts +266 -0
  9. package/dist/internal-common/src/public-types/api-client.public-types.d.ts +9 -0
  10. package/dist/internal-common/src/public-types/api.public-types.d.ts +99 -0
  11. package/dist/internal-common/src/public-types/backend.public-types.d.ts +61 -0
  12. package/dist/internal-common/src/public-types/connector.public-types.d.ts +12 -0
  13. package/dist/internal-common/src/public-types/context.public-types.d.ts +83 -0
  14. package/dist/internal-common/src/public-types/document.public-types.d.ts +71 -0
  15. package/dist/internal-common/src/public-types/event.public-types.d.ts +18 -0
  16. package/dist/internal-common/src/public-types/extraction.public-types.d.ts +405 -0
  17. package/dist/internal-common/src/public-types/http-status.public-types.d.ts +415 -0
  18. package/dist/internal-common/src/public-types/integration.public-types.d.ts +65 -0
  19. package/dist/internal-common/src/public-types/job.public-types.d.ts +101 -0
  20. package/dist/internal-common/src/public-types/langgraph.public-types.d.ts +50 -0
  21. package/dist/internal-common/src/public-types/metadata-filter.public-types.d.ts +106 -0
  22. package/dist/internal-common/src/public-types/query.public-types.d.ts +149 -0
  23. package/dist/internal-common/src/public-types/scheduler.public-types.d.ts +43 -0
  24. package/dist/internal-common/src/public-types/schema.public-types.d.ts +88 -0
  25. package/dist/internal-common/src/public-types/secret.public-types.d.ts +82 -0
  26. package/dist/internal-common/src/public-types/socket.public-types.d.ts +4 -0
  27. package/dist/internal-common/src/public-types/source-code.public-types.d.ts +208 -0
  28. package/dist/internal-common/src/public-types/typescript.public-types.d.ts +20 -0
  29. package/dist/internal-common/src/public-types-backend/ai-agent.public-context.d.ts +101 -0
  30. package/dist/internal-common/src/public-types-backend/api-call.public-context.d.ts +30 -0
  31. package/dist/internal-common/src/public-types-backend/application.public-types.d.ts +94 -0
  32. package/dist/internal-common/src/public-types-backend/bundle-api.public-types.d.ts +199 -0
  33. package/dist/internal-common/src/public-types-backend/bundle-data.public-types.d.ts +18 -0
  34. package/dist/internal-common/src/public-types-backend/distributed-lock.public-context.d.ts +4 -0
  35. package/dist/internal-common/src/public-types-backend/graphql.public-context.d.ts +7 -0
  36. package/dist/internal-common/src/public-types-backend/langgraph.public-context.d.ts +16 -0
  37. package/dist/internal-common/src/public-types-backend/mcp.public-types.d.ts +55 -0
  38. package/dist/internal-common/src/public-types-backend/metric.public-context.d.ts +12 -0
  39. package/dist/internal-common/src/public-types-backend/mutation.public-context.d.ts +161 -0
  40. package/dist/internal-common/src/public-types-backend/native-query.public-context.d.ts +75 -0
  41. package/dist/internal-common/src/public-types-backend/query.public-context.d.ts +193 -0
  42. package/dist/internal-common/src/public-types-backend/storage.public-types.d.ts +15 -0
  43. package/dist/internal-common/src/public-types-backend/topic.public-context.d.ts +17 -0
  44. package/dist/internal-common/src/types/application.types.d.ts +98 -0
  45. package/dist/internal-common/src/types/backend-run.types.d.ts +55 -0
  46. package/dist/internal-common/src/types/bundle-data.types.d.ts +18 -0
  47. package/dist/internal-common/src/types/connector.types.d.ts +77 -0
  48. package/dist/internal-common/src/types/integrations/ai.types.d.ts +1 -0
  49. package/dist/internal-common/src/types/integrations/api.types.d.ts +76 -0
  50. package/dist/internal-common/src/types/integrations/auth.types.d.ts +1 -0
  51. package/dist/internal-common/src/types/integrations/database.types.d.ts +44 -0
  52. package/dist/internal-common/src/types/integrations/observability.types.d.ts +1 -0
  53. package/dist/internal-common/src/types/integrations/queue-types.d.ts +1 -0
  54. package/dist/internal-common/src/types/integrations/schemas.d.ts +6 -0
  55. package/dist/internal-common/src/types/integrations/storage-types.d.ts +22 -0
  56. package/dist/internal-common/src/types/langgraph.types.d.ts +1 -0
  57. package/dist/internal-common/src/types/openapi.types.d.ts +1 -0
  58. package/dist/internal-common/src/types/query.types.d.ts +21 -0
  59. package/dist/internal-common/src/types/secret.types.d.ts +7 -0
  60. package/dist/internal-common/src/types/time-units.d.ts +1 -0
  61. package/dist/internal-common/src/utils/object.d.ts +88 -0
  62. package/dist/internal-common/src/utils/serialization.d.ts +30 -0
  63. package/dist/internal-common/src/utils/worker-manager-utils.d.ts +2 -0
  64. package/package.json +2 -2
@@ -0,0 +1,106 @@
1
+ /**
2
+ * Generic metadata filter types used across the platform.
3
+ *
4
+ * These types define a MongoDB-style filter syntax for filtering records by metadata
5
+ * fields. They support field-level operators (`$eq`, `$ne`, `$gt`, `$gte`, `$lt`,
6
+ * `$lte`, `$in`, `$nin`, `$exists`) and boolean combinators (`$and`, `$or`).
7
+ *
8
+ * Originally created for AI knowledge base context filtering, these types are now
9
+ * shared across metrics tag filtering, matchmaking, and other subsystems. Operators
10
+ * specific to one subsystem (e.g. the knowledge base's `$underPath` for hierarchical
11
+ * path scoping) live with that subsystem, not here.
12
+ */
13
+ /** Primitive metadata value. */
14
+ export type MetadataValue = number | string | boolean | undefined;
15
+ /** Array of metadata values (used by `$in` / `$nin`). */
16
+ export type MetadataValueArray = MetadataValue[];
17
+ /** Matches when the field equals the given value. */
18
+ export interface MetadataEqFilter {
19
+ /** The value the field must equal. */
20
+ $eq: MetadataValue;
21
+ }
22
+ /** Matches when the field does not equal the given value. */
23
+ export interface MetadataNeFilter {
24
+ /** The value the field must not equal. */
25
+ $ne: MetadataValue;
26
+ }
27
+ /** Matches when the field is greater than the given value. */
28
+ export interface MetadataGtFilter {
29
+ /** The value the field must be greater than. */
30
+ $gt: number;
31
+ }
32
+ /** Matches when the field is greater than or equal to the given value. */
33
+ export interface MetadataGteFilter {
34
+ /** The value the field must be greater than or equal to. */
35
+ $gte: number;
36
+ }
37
+ /** Matches when the field is less than the given value. */
38
+ export interface MetadataLtFilter {
39
+ /** The value the field must be less than. */
40
+ $lt: number;
41
+ }
42
+ /** Matches when the field is less than or equal to the given value. */
43
+ export interface MetadataLteFilter {
44
+ /** The value the field must be less than or equal to. */
45
+ $lte: number;
46
+ }
47
+ /** Matches when the field value is one of the given values. */
48
+ export interface MetadataInFilter {
49
+ /** The values the field must be one of. */
50
+ $in: MetadataValueArray;
51
+ }
52
+ /** Matches when the field value is not one of the given values. */
53
+ export interface MetadataNinFilter {
54
+ /** The values the field must not be one of. */
55
+ $nin: MetadataValueArray;
56
+ }
57
+ /** Matches based on whether the field exists. */
58
+ export interface MetadataExistsFilter {
59
+ /** Whether the field must exist. */
60
+ $exists: boolean;
61
+ }
62
+ /**
63
+ * A single-field operator: one of `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$in`, `$nin`, `$exists`.
64
+ */
65
+ export type MetadataSimpleFilter = MetadataEqFilter | MetadataNeFilter | MetadataGtFilter | MetadataGteFilter | MetadataLtFilter | MetadataLteFilter | MetadataInFilter | MetadataNinFilter | MetadataExistsFilter;
66
+ /**
67
+ * A filter for metadata based on field-specific conditions or direct values.
68
+ * @category Metadata
69
+ */
70
+ export interface MetadataFieldFilter {
71
+ /** A record where keys are field names and values are either operator objects or direct scalar values. */
72
+ [field: string]: MetadataSimpleFilter | MetadataValue;
73
+ }
74
+ /**
75
+ * A filter combining multiple metadata filters with a logical AND operation.
76
+ * @category Metadata
77
+ */
78
+ export interface MetadataAndFilter {
79
+ /** An array of filters that must all be true for the condition to pass. */
80
+ $and: MetadataFilter[];
81
+ }
82
+ /**
83
+ * A filter combining multiple metadata filters with a logical OR operation.
84
+ * @category Metadata
85
+ */
86
+ export interface MetadataOrFilter {
87
+ /** An array of filters where at least one must be true for the condition to pass. */
88
+ $or: MetadataFilter[];
89
+ }
90
+ /**
91
+ * A composable metadata filter supporting field operators and boolean combinators.
92
+ *
93
+ * @example Simple equality
94
+ * ```ts
95
+ * { status: 'active' }
96
+ * ```
97
+ * @example Operators
98
+ * ```ts
99
+ * { age: { $gte: 18 }, role: { $in: ['admin', 'editor'] } }
100
+ * ```
101
+ * @example Boolean combinators
102
+ * ```ts
103
+ * { $or: [{ status: 'active' }, { role: { $ne: 'guest' } }] }
104
+ * ```
105
+ */
106
+ export type MetadataFilter = MetadataFieldFilter | MetadataAndFilter | MetadataOrFilter;
@@ -0,0 +1,149 @@
1
+ import { CollectionName, DocumentData, FieldName } from './document.public-types';
2
+ import { Paths } from './typescript.public-types';
3
+ /**
4
+ * An alias for a join result. This is used to disambiguate fields in the result.
5
+ * @category Database
6
+ */
7
+ export type Alias = string;
8
+ /**
9
+ * A join condition defining how two tables are related in a database query.
10
+ * The join conditions specify the alias for the left side of the join and the field names to join on.
11
+ * @category Database
12
+ */
13
+ export interface JoinCondition {
14
+ /** The alias of the left table in the join operation. */
15
+ leftAlias: Alias;
16
+ /** The field name from the left table to join on. */
17
+ left: FieldName;
18
+ /** The field name from the right table to join on. */
19
+ right: FieldName;
20
+ /** Indicates whether the join is an inner join (true) or outer join (false). */
21
+ isInner: boolean;
22
+ }
23
+ /**
24
+ * Field name for filtering by document ID through the standard query API, without needing to
25
+ * know the underlying primary key column names.
26
+ * @category Database
27
+ */
28
+ export declare const DOC_ID_FIELD = "__docId__";
29
+ /**
30
+ * A list of query conditions.
31
+ * @category Database
32
+ */
33
+ export type Condition<Doc extends DocumentData = any> = SimpleCondition<Doc> | CompositeCondition<Doc> | DocIdCondition<Doc>;
34
+ /**
35
+ * A list of query conditions.
36
+ * @category Database
37
+ */
38
+ export type Conditions<Doc extends DocumentData = any> = Array<Condition<Doc>>;
39
+ /**
40
+ * A single field query condition for filtering database records.
41
+ * @category Database
42
+ */
43
+ export interface SimpleCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>, MyOperator = Operator> {
44
+ /** The field name to apply the condition to. */
45
+ fieldName: F;
46
+ /** The operator to use for comparing the field value. */
47
+ operator: MyOperator;
48
+ /** The value to compare against the field. */
49
+ value: any;
50
+ }
51
+ /**
52
+ * A composite fields query condition combining multiple simple conditions.
53
+ * Just a list of simple conditions with specific set of operators. It should be
54
+ * evaluated this way:
55
+ * If A, B, C are the conditions and A' = A with '==' operator:
56
+ * A || (A' && B) || (A' && B' && C)
57
+ * @category Database
58
+ */
59
+ export interface CompositeCondition<Doc extends DocumentData = any> {
60
+ /** An array of simple conditions with restricted operators for composite evaluation. */
61
+ fields: Array<SimpleCondition<Doc, Paths<Doc>, CompositeConditionOperator>>;
62
+ }
63
+ /**
64
+ * Set of operators supported by `CompositeCondition`.
65
+ * @category Database
66
+ */
67
+ export type CompositeConditionOperator = '>=' | '<=' | '>' | '<';
68
+ /**
69
+ * Set of operators supported by `DocIdCondition`.
70
+ * @category Database
71
+ */
72
+ export type DocIdOperator = '==' | '!=' | 'in' | 'not in';
73
+ /**
74
+ * A condition that filters documents by their identity for collections with composite primary keys.
75
+ * Each entry in `docIds` maps primary-key field names to values and represents one AND grouping.
76
+ * The list of entries is ORed together.
77
+ * @category Database
78
+ */
79
+ export interface DocIdCondition<Doc extends DocumentData = any> {
80
+ /** The operator applied to the set of doc-id values. Limited to the equality family. */
81
+ operator: DocIdOperator;
82
+ /** The list of composite-key value groups */
83
+ docIds: Array<Record<FieldName<Doc>, any>>;
84
+ }
85
+ /**
86
+ * The list of operators related to arrays.
87
+ * @category Database
88
+ */
89
+ export declare const ARRAY_OPERATORS: readonly ["in", "not in", "array_includes_some", "array_includes_all", "array_not_includes"];
90
+ /**
91
+ * The list of all operators.
92
+ * @category Database
93
+ */
94
+ export declare const ALL_OPERATORS: readonly ["in", "not in", "array_includes_some", "array_includes_all", "array_not_includes", "==", "!=", ">=", "<=", ">", "<", "like", "not like", "like_cs", "not like_cs"];
95
+ /**
96
+ * An operator in a query condition.
97
+ * @category Database
98
+ */
99
+ export type Operator = (typeof ALL_OPERATORS)[number];
100
+ /**
101
+ * A definition of a sort order by a field in a database query.
102
+ * @category Database
103
+ */
104
+ export interface FieldSort<Doc> {
105
+ /** The name of the field to sort by. */
106
+ fieldName: FieldName<Doc>;
107
+ /** Indicates whether the sort is ascending (true) or descending (false). */
108
+ asc: boolean;
109
+ }
110
+ /**
111
+ * A query object defining a database retrieval operation.
112
+ * @category Database
113
+ */
114
+ export interface Query<Doc extends DocumentData = any> {
115
+ /** The full collection path such as "c1" or "c1/d1/c2". */
116
+ collectionName: CollectionName;
117
+ /** The ID of the integration associated with the query. */
118
+ integrationId: string;
119
+ /** An array of conditions to filter the query results. */
120
+ conditions: Conditions<Doc>;
121
+ /** An array of field sort definitions to order the results. */
122
+ sortOrder: Array<FieldSort<Doc>>;
123
+ /** The maximum number of records to return. */
124
+ limit: number;
125
+ /** Optional configuration to limit results by specific fields with custom sorting. */
126
+ limitBy?: LimitBy<Doc>;
127
+ /** Optional list of fields to return. If null/undefined, all fields are returned. If empty array, only metadata/IDs are returned. */
128
+ projectFields?: Array<FieldName<Doc>>;
129
+ }
130
+ /**
131
+ * Result returned from deleting documents matched by a query.
132
+ * @category Database
133
+ */
134
+ export interface QueryDeleteResult {
135
+ /** Number of documents selected for deletion. */
136
+ deletedCount: number;
137
+ }
138
+ /**
139
+ * A configuration object used to apply additional field-based limits to a query.
140
+ * @category Database
141
+ */
142
+ export interface LimitBy<Doc extends DocumentData = any> {
143
+ /** The maximum number of records to return for this limit configuration. */
144
+ limit: number;
145
+ /** The fields to apply the limit to. */
146
+ fields: Array<FieldName<Doc>>;
147
+ /** Indicates whether to reverse the sort order for this limit. */
148
+ reverseSort: boolean;
149
+ }
@@ -0,0 +1,43 @@
1
+ import { ServiceFunctionName } from './backend.public-types';
2
+ /**
3
+ * Configuration for a scheduled task in the platform.
4
+ * @category Platform
5
+ */
6
+ export interface SchedulerConfig {
7
+ /** The name of the service function to be executed on the schedule. */
8
+ functionName: ServiceFunctionName;
9
+ /** The cron expression defining the schedule timing. */
10
+ cronExpression: string;
11
+ /** Indicates whether the scheduler should run exclusively, preventing overlaps. */
12
+ exclusive: boolean;
13
+ }
14
+ /**
15
+ * Information about a scheduler instance in the platform.
16
+ * @category Platform
17
+ */
18
+ export interface SchedulerInfo {
19
+ /** The unique identifier for the scheduler. */
20
+ schedulerId: string;
21
+ /** The configuration details for the scheduler. */
22
+ config: SchedulerConfig;
23
+ /** Indicates whether the scheduler is currently enabled. */
24
+ enabled: boolean;
25
+ }
26
+ /**
27
+ * Options for updating an existing scheduler in the platform.
28
+ * @category Platform
29
+ */
30
+ export interface UpdateSchedulerOptions {
31
+ /** The unique identifier of the scheduler to update. */
32
+ schedulerId: string;
33
+ /** Optional flag to enable or disable the scheduler. */
34
+ enabled?: boolean;
35
+ }
36
+ /**
37
+ * Request structure for updating multiple schedulers in the platform.
38
+ * @category Platform
39
+ */
40
+ export interface UpdateSchedulersRequest {
41
+ /** An array of scheduler update options. */
42
+ schedulers: UpdateSchedulerOptions[];
43
+ }
@@ -0,0 +1,88 @@
1
+ import { JSONSchema } from 'json-schema-typed';
2
+ type ConvertDeep<T extends JSONSchema> = Exclude<T, boolean> & {
3
+ properties?: Record<string, ConvertDeep<JSONSchema>>;
4
+ patternProperties?: Record<string, ConvertDeep<JSONSchema>>;
5
+ nullable?: boolean;
6
+ /**
7
+ * The default value will be applied (default to 'empty'):
8
+ * 'always' - no matter what the client sent, both on update and insert. In case of readOnly - applies only on insert.
9
+ * 'empty' - only if the value of the field is empty (undefined)
10
+ * 'updateOrEmpty' - no matter what the client sent, updating the record will use the default value
11
+ */
12
+ applyDefaultValueOn?: 'always' | 'empty' | 'updateOrEmpty';
13
+ isDate?: boolean;
14
+ isJSON?: boolean;
15
+ /**
16
+ * Applies to the top level schema, a record in a nested object, or a regular property.
17
+ * Basically, whether this property can participate in an insert mutation.
18
+ */
19
+ insertable?: boolean;
20
+ /** Applies to the top level schema or a record in a nested object. */
21
+ deletable?: boolean;
22
+ };
23
+ /** Extended JSON schema for a single property, supporting nested structures and Squid-specific metadata. */
24
+ export type PropertySchema = ConvertDeep<JSONSchema>;
25
+ /** Extended JSON schema for a top-level property, including database-related metadata. */
26
+ export type TopLevelPropertySchema = PropertySchema & {
27
+ /** Marks the property as a primary key. */
28
+ primaryKey?: boolean;
29
+ /**
30
+ * Whether the property is computed based on other properties or some formula.
31
+ * If true, readonly also needs to be true and this field should not be part of an insert statement.
32
+ */
33
+ isComputed?: boolean;
34
+ /**
35
+ * Whether the default value generated by the database. CURRENT_DATE is something generated by the database vs
36
+ * 'Hello' which is a constant.
37
+ */
38
+ isDefaultComputed?: boolean;
39
+ /**
40
+ * The database data type that is represented by this property. This is often different from the actual property
41
+ * type, with is a Javascript primitive. For example, for a SMALLINT the dataType would be 'smallint', but the type
42
+ * would be 'integer'.
43
+ */
44
+ dataType?: string;
45
+ /**
46
+ * This indicates that although the field exists on the db, it should be ignored by squid.
47
+ */
48
+ hidden?: boolean;
49
+ };
50
+ /**
51
+ * Milestoning kind on a Legend/PURE class. Drives `.all()` arity and the date
52
+ * arguments required when navigating to the class's properties:
53
+ * - `business-temporal` → `.all(businessDate)`, `$x.prop(businessDate)`
54
+ * - `processing-temporal` → `.all(processingDate)`, `$x.prop(processingDate)`
55
+ * - `bitemporal` → `.all(processingDate, businessDate)`, `$x.prop(processingDate, businessDate)`
56
+ * Legend integrations populate this when discovering the schema so downstream consumers
57
+ * (AI query generation, validation) know whether dates are required.
58
+ */
59
+ export type MilestoningKind = 'business-temporal' | 'processing-temporal' | 'bitemporal';
60
+ /** Schema for a full collection, allowing partial property definitions with extended metadata. */
61
+ export type CollectionSchema = Omit<ConvertDeep<JSONSchema>, 'properties'> & {
62
+ properties?: Record<string, TopLevelPropertySchema>;
63
+ /** Legend/PURE only: milestoning stereotype on the class, if any. */
64
+ milestoning?: MilestoningKind;
65
+ };
66
+ /**
67
+ * API-boundary view of {@link CollectionSchema} for use in OpenAPI-exposed
68
+ * controllers. Decouples the public REST surface from `json-schema-typed`'s
69
+ * recursive generic, which tsoa's type resolver cannot walk.
70
+ *
71
+ * The on-the-wire payload is the same as {@link CollectionSchema} — this type
72
+ * just describes it as an opaque JSON object for the generated OpenAPI spec
73
+ * (which is also what tsoa 5.x emitted for {@link CollectionSchema}: a bare
74
+ * `object` with no properties).
75
+ */
76
+ export interface CollectionSchemaApi {
77
+ /** JSON Schema `type` keyword (e.g. "object"). */
78
+ type?: string;
79
+ /** Map of property names to their schemas. */
80
+ properties?: Record<string, unknown>;
81
+ /** Names of required properties. */
82
+ required?: string[];
83
+ /** Human-readable description of the collection. */
84
+ description?: string;
85
+ /** Additional JSON Schema / Squid-specific fields are preserved as-is. */
86
+ [key: string]: unknown;
87
+ }
88
+ export {};
@@ -0,0 +1,82 @@
1
+ /**
2
+ * A type alias for an ApiKey.
3
+ * @category Secret
4
+ */
5
+ export type ApiKey = string;
6
+ /**
7
+ * The secret key, an alias for a string.
8
+ * @category Secret
9
+ */
10
+ export type SecretKey = string;
11
+ /**
12
+ * The secret value.
13
+ * @category Secret
14
+ */
15
+ export type SecretValue = string | number | boolean;
16
+ /**
17
+ * Metadata for a secret, including its key and last updated timestamp.
18
+ * @category Secret
19
+ */
20
+ export interface SecretMetadata {
21
+ /** The key identifying the secret. */
22
+ key: SecretKey;
23
+ /** The timestamp (in milliseconds) when the secret was last updated. */
24
+ lastUpdated: number;
25
+ }
26
+ /**
27
+ * A secret entry combining metadata with a typed value.
28
+ * @category Secret
29
+ */
30
+ export interface SecretEntry<T extends SecretValue = SecretValue> extends SecretMetadata {
31
+ /** The value of the secret, constrained to the specified type. */
32
+ value: T;
33
+ }
34
+ /**
35
+ * An API key entry combining metadata with a string value.
36
+ * @category Secret
37
+ */
38
+ export interface ApiKeyEntry extends SecretMetadata {
39
+ /** The string value of the API key. */
40
+ value: string;
41
+ }
42
+ /**
43
+ * A request structure for setting a secret with a key-value pair.
44
+ * @category Secret
45
+ */
46
+ export interface SetSecretRequestEntry {
47
+ /** The key identifying the secret to set. */
48
+ key: SecretKey;
49
+ /** The value to assign to the secret. */
50
+ value: SecretValue;
51
+ }
52
+ /**
53
+ * Public representation of a management API key. Never includes the plaintext value or hash.
54
+ * @category Secret
55
+ */
56
+ export interface ManagementApiKey {
57
+ /** Stable key identifier. */
58
+ id: string;
59
+ /** User that owns the key. */
60
+ userId: string;
61
+ /** Optional human-readable description. */
62
+ description: string | null;
63
+ /** Lower-case 'active' | 'suspended' | 'deleted'. */
64
+ status: string;
65
+ /** ISO-8601 timestamp of creation. */
66
+ createdAt: string;
67
+ /** ISO-8601 timestamp of the last status / metadata change. */
68
+ updatedAt: string;
69
+ /** ISO-8601 timestamp of the last successful validation, or null if never used. */
70
+ lastUsedAt: string | null;
71
+ }
72
+ /**
73
+ * Response returned when a management API key is created. The plaintext keyValue is only
74
+ * returned at creation time — it is not retrievable afterwards.
75
+ * @category Secret
76
+ */
77
+ export interface CreateManagementApiKeyResponse {
78
+ /** Public metadata of the new key. */
79
+ key: ManagementApiKey;
80
+ /** Plaintext key value — only returned here, never persisted in clear, never returned again. */
81
+ keyValue: string;
82
+ }
@@ -0,0 +1,4 @@
1
+ /** Squid client connection state. Can be 'CONNECTED', 'DISCONNECTED', or 'REMOVED'. */
2
+ export declare const CLIENT_CONNECTION_STATES: readonly ["CONNECTED", "DISCONNECTED", "REMOVED"];
3
+ /** Squid client connection state. */
4
+ export type ClientConnectionState = (typeof CLIENT_CONNECTION_STATES)[number];
@@ -0,0 +1,208 @@
1
+ import type { CanonicalReasoningEffort } from './ai-agent.public-types';
2
+ import type { IntegrationInfo } from './integration.public-types';
3
+ /** Identifies the source-code analysis AI function. */
4
+ export declare const SOURCE_CODE_ANALYZE_FUNCTION_ID = "analyzeCode";
5
+ /** Limits the number of repositories selected for analysis. */
6
+ export declare const SOURCE_CODE_MAX_REPOSITORIES = 20;
7
+ /** Limits each supplemental instruction field supplied to source-code analysis. */
8
+ export declare const SOURCE_CODE_MAX_SUPPLEMENTAL_INSTRUCTIONS_LENGTH = 20000;
9
+ /** Lists CLI providers available for source-code analysis. */
10
+ export declare const SOURCE_CODE_ANALYZER_MODELS: readonly ["claude-code", "codex"];
11
+ /** Identifies a CLI provider available for source-code analysis. */
12
+ export type SourceCodeAnalyzerModel = (typeof SOURCE_CODE_ANALYZER_MODELS)[number];
13
+ /** Lists trusted source-cache lifecycle strategies. */
14
+ export declare const SOURCE_CODE_CACHE_STRATEGIES: readonly ["reuse", "recreate"];
15
+ /** Selects how source analysis manages its pod-local trusted cache. */
16
+ export type SourceCodeCacheStrategy = (typeof SOURCE_CODE_CACHE_STRATEGIES)[number];
17
+ /** Lists the repository capabilities available to the configured CLI agent. */
18
+ export declare const SOURCE_CODE_EXECUTION_MODES: readonly ["read-only", "write"];
19
+ /** Selects whether the configured CLI agent may modify and publish repository state. */
20
+ export type SourceCodeExecutionMode = (typeof SOURCE_CODE_EXECUTION_MODES)[number];
21
+ /** Lists supported source-control providers. */
22
+ export declare const SOURCE_CONTROL_PROVIDERS: readonly ["github", "bitbucket"];
23
+ /** Identifies a supported source-control provider. */
24
+ export type SourceControlProvider = (typeof SOURCE_CONTROL_PROVIDERS)[number];
25
+ /** Lists integration types that provide source repositories. */
26
+ export declare const SOURCE_CODE_INTEGRATION_TYPES: readonly ["github", "bitbucket"];
27
+ /** Identifies an integration type that provides source repositories. */
28
+ export type SourceCodeIntegrationType = (typeof SOURCE_CODE_INTEGRATION_TYPES)[number];
29
+ /** Configures source-code analysis for an AI agent integration. */
30
+ export interface AiAgentSourceCodeIntegrationOptions {
31
+ /** Enables repository-backed code analysis. */
32
+ codeAnalysisEnabled: boolean;
33
+ /** Selects the CLI provider used for code analysis. */
34
+ analyzerModel?: SourceCodeAnalyzerModel;
35
+ /** Selects a concrete model from the analyzer provider's CLI registry. */
36
+ analyzerModelId?: string;
37
+ /** Selects the reasoning effort used by the analyzer CLI. */
38
+ analyzerReasoningEffort?: CanonicalReasoningEffort;
39
+ /** Provides supplemental code-analysis instructions. */
40
+ analyzerInstructions?: string;
41
+ /** Reuses the pod-local trusted cache by default or recreates it for every analysis. */
42
+ cacheStrategy?: SourceCodeCacheStrategy;
43
+ /** Inspects repositories by default or enables unrestricted repository work. */
44
+ executionMode?: SourceCodeExecutionMode;
45
+ }
46
+ /** Stores the immutable GitHub identity and access metadata for a selected repository. */
47
+ export interface GitHubRepositoryConfiguration {
48
+ /** Stores GitHub's numeric repository identifier. */
49
+ id: number;
50
+ /** Stores the owner/repository name. */
51
+ fullName: string;
52
+ /** Stores the credential-free HTTPS clone URL. */
53
+ cloneUrl: string;
54
+ /** Stores the credential-free HTTPS web URL. */
55
+ htmlUrl: string;
56
+ /** Stores the default branch name. */
57
+ defaultBranch: string;
58
+ }
59
+ /** Stores the immutable Bitbucket identity and access metadata for a selected repository. */
60
+ export interface BitbucketRepositoryConfiguration {
61
+ /** Stores Bitbucket's immutable repository UUID. */
62
+ uuid: string;
63
+ /** Stores the workspace/repository name. */
64
+ fullName: string;
65
+ /** Stores the credential-free HTTPS clone URL. */
66
+ cloneUrl: string;
67
+ /** Stores the credential-free HTTPS web URL. */
68
+ webUrl: string;
69
+ /** Stores the default branch name. */
70
+ defaultBranch: string;
71
+ }
72
+ /** Represents the repository-selection portion of a GitHub integration configuration. */
73
+ interface GitHubRepositorySelectionConfiguration {
74
+ /** Stores the legacy owner/repository selection. */
75
+ repository?: string;
76
+ /** Stores canonical selected repository metadata. */
77
+ repositories?: GitHubRepositoryConfiguration[];
78
+ /** Stores the selected default owner/repository name. */
79
+ defaultRepository?: string;
80
+ }
81
+ /** Represents the repository-selection portion of a Bitbucket integration configuration. */
82
+ interface BitbucketRepositorySelectionConfiguration {
83
+ /** Stores the configured Bitbucket workspace slug. */
84
+ workspace: string;
85
+ /** Stores canonical selected repository metadata. */
86
+ repositories: BitbucketRepositoryConfiguration[];
87
+ /** Stores the selected default workspace/repository name. */
88
+ defaultRepository: string;
89
+ }
90
+ /** Describes a source repository that can be prepared for analysis. */
91
+ export interface SourceRepository {
92
+ /** Identifies the source-control provider. */
93
+ provider: SourceControlProvider;
94
+ /** Stores the provider's immutable repository identifier. */
95
+ providerRepositoryId: string;
96
+ /** Stores the owner/repository name. */
97
+ fullName: string;
98
+ /** Stores the credential-free clone URL. */
99
+ cloneUrl: string;
100
+ /** Stores the repository web URL. */
101
+ webUrl: string;
102
+ /** Stores the repository's default branch. */
103
+ defaultBranch: string;
104
+ }
105
+ /** Requests analysis of selected source-code repositories. */
106
+ export interface AnalyzeCodeRequest {
107
+ /** Contains the question to answer. */
108
+ question: string;
109
+ /** Narrows repository selection. */
110
+ repositoryHints?: string;
111
+ /** Narrows analysis to a captured reference. */
112
+ refHint?: string;
113
+ /** Supplies customer context for the answer. */
114
+ customerContext?: string;
115
+ }
116
+ /** Marks an inclusive range of lines in a repository path. */
117
+ export interface SourceCodeLineRange {
118
+ /** Stores the first included line number. */
119
+ start: number;
120
+ /** Stores the last included line number. */
121
+ end: number;
122
+ }
123
+ /** Identifies a path supporting a source-code finding. */
124
+ export interface SourceCodePathEvidence {
125
+ /** Stores the path relative to the repository root. */
126
+ path: string;
127
+ /** Marks the supporting line range when available. */
128
+ lines?: SourceCodeLineRange;
129
+ }
130
+ /** Identifies the captured repository reference behind a finding. */
131
+ export interface SourceCodeRef {
132
+ /** Identifies the reference kind. */
133
+ type: 'branch' | 'tag' | 'commit';
134
+ /** Stores the captured reference name. */
135
+ name: string;
136
+ }
137
+ /** Records repository evidence supporting a source-code answer. */
138
+ export interface SourceCodeRepositoryEvidence {
139
+ /** Stores the owner/repository name. */
140
+ repository: string;
141
+ /** Identifies the inspected captured reference. */
142
+ ref: SourceCodeRef;
143
+ /** Stores the immutable commit SHA. */
144
+ commitSha: string;
145
+ /** Lists paths supporting the finding. */
146
+ paths: SourceCodePathEvidence[];
147
+ /** Stores the snapshot fetch time. */
148
+ fetchedAt: string;
149
+ /** Marks evidence from a stale snapshot. */
150
+ stale: boolean;
151
+ }
152
+ /** Returns a source-code analysis answer and its evidence. */
153
+ export interface AnalyzeCodeResult {
154
+ /** Contains the concise answer. */
155
+ answer: string;
156
+ /** Lists repository evidence supporting the answer. */
157
+ repositories: SourceCodeRepositoryEvidence[];
158
+ /** Stores the latest snapshot fetch time. */
159
+ fetchTimestamp: string;
160
+ /** Marks whether any source snapshot is stale. */
161
+ stale: boolean;
162
+ /** Lists warnings encountered during analysis. */
163
+ warnings: string[];
164
+ /** Warns when a prepared workspace cannot persist. */
165
+ workspacePersistenceWarning?: string;
166
+ }
167
+ /** Requests discovery from an existing or draft source-code integration. */
168
+ export type DiscoverSourceRepositoriesRequest = {
169
+ /** Identifies the source-code integration type. */
170
+ integrationType: SourceCodeIntegrationType;
171
+ /** Identifies the persisted integration. */
172
+ integrationId: string;
173
+ /** Prevents draft and persisted integration inputs from mixing. */
174
+ draftIntegration?: never;
175
+ } | {
176
+ /** Identifies the source-code integration type. */
177
+ integrationType: SourceCodeIntegrationType;
178
+ /** Prevents draft and persisted integration inputs from mixing. */
179
+ integrationId?: never;
180
+ /** Supplies an integration that has not been persisted. */
181
+ draftIntegration: IntegrationInfo;
182
+ };
183
+ /** Returns repositories discovered from a source-code integration. */
184
+ export interface DiscoverSourceRepositoriesResponse {
185
+ /** Lists repositories available for selection. */
186
+ repositories: SourceRepository[];
187
+ }
188
+ /** Represents a normalized GitHub repository selection. */
189
+ export interface NormalizedGitHubRepositorySelection {
190
+ /** Stores the accepted legacy selection when canonical metadata is absent. */
191
+ legacyRepository?: string;
192
+ /** Lists validated canonical repository metadata. */
193
+ repositories: GitHubRepositoryConfiguration[];
194
+ /** Stores the validated default owner/repository name. */
195
+ defaultRepository: string;
196
+ }
197
+ /** Represents a normalized Bitbucket repository selection. */
198
+ export interface NormalizedBitbucketRepositorySelection {
199
+ /** Lists validated canonical repository metadata. */
200
+ repositories: BitbucketRepositoryConfiguration[];
201
+ /** Stores the validated default workspace/repository name. */
202
+ defaultRepository: string;
203
+ }
204
+ /** Normalizes selected GitHub repositories for persistence and connector use. */
205
+ export declare function normalizeGitHubRepositorySelection(configuration: GitHubRepositorySelectionConfiguration): NormalizedGitHubRepositorySelection;
206
+ /** Normalizes selected Bitbucket repositories for persistence and connector use. */
207
+ export declare function normalizeBitbucketRepositorySelection(configuration: BitbucketRepositorySelectionConfiguration): NormalizedBitbucketRepositorySelection;
208
+ export {};