@wix/auto_sdk_containers_project-jobs 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,141 @@
1
+ import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { ProjectJob, GetCurrentProjectJobResponse, JobStatusWithLiterals, UpdateProjectJobStatusOptions, UpdateProjectJobStatusResponse, ClearProjectJobAssistantResponseResponse, CancelProjectJobResponse, GetLatestProjectJobResponse, CreateSuggestionsJobOptions, CreateSuggestionsJobResponse, OpenProjectJobActivityResponse, ActivityBatch, ReportProjectJobActivityResponse, QueryProjectJobActivityOptions, QueryProjectJobActivityResponse, ProjectJobQuery, QueryProjectJobsOptions, typedQueryProjectJobs, ProjectJobsQueryBuilder } from './index.typings.mjs';
3
+ export { AccountInfo, ActionEvent, ActivityEvent, ActivityEventType, ActivityEventTypeWithLiterals, ActivitySource, ActivitySourceWithLiterals, ActivityWorkflow, ActivityWorkflowWithLiterals, Attachment, AttachmentType, AttachmentTypeWithLiterals, CancelProjectJobRequest, ClearProjectJobAssistantResponseRequest, CommonQueryWithEntityContext, CreateProjectJobRequest, CreateProjectJobResponse, CreateSuggestionsJobRequest, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, GetCurrentProjectJobRequest, GetLatestProjectJobRequest, GetProjectJobRequest, GetProjectJobResponse, IdentificationData, IdentificationDataIdOneOf, JobStatus, JobType, JobTypeWithLiterals, MessageEnvelope, OpenProjectJobActivityRequest, Platform, PlatformWithLiterals, ProjectJobQuerySpec, ProjectJobsQueryResult, QueryProjectJobActivityRequest, QueryProjectJobsRequest, QueryProjectJobsResponse, ReportProjectJobActivityRequest, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, Suggestion, UpdateProjectJobStatusRequest, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.mjs';
4
+
5
+ /** @internal */
6
+ declare function createProjectJob$1(httpClient: HttpClient): CreateProjectJobSignature;
7
+ interface CreateProjectJobSignature {
8
+ /**
9
+ * Creates a new ProjectJob.
10
+ * @param - ProjectJob to be created.
11
+ * @returns The created ProjectJob.
12
+ */
13
+ (projectJob: NonNullablePaths<ProjectJob, `platform` | `projectId` | `prompt`, 0>): Promise<NonNullablePaths<ProjectJob, `projectId` | `jobType` | `platform` | `jobStatus` | `prompt` | `attachments` | `attachments.${number}.type` | `attachments.${number}.url` | `attachments.${number}.displayName` | `codingAgentSessionId` | `failureReason` | `creditsExempt` | `creditsCostUsd` | `suggestions` | `suggestions.${number}.label` | `suggestions.${number}.prompt`, 2>>;
14
+ }
15
+ /** @internal */
16
+ declare function getProjectJob$1(httpClient: HttpClient): GetProjectJobSignature;
17
+ interface GetProjectJobSignature {
18
+ /**
19
+ * Retrieves a ProjectJob by ID.
20
+ * @param - ID of the ProjectJob to retrieve.
21
+ * @returns The requested ProjectJob.
22
+ */
23
+ (projectJobId: string): Promise<NonNullablePaths<ProjectJob, `projectId` | `jobType` | `platform` | `jobStatus` | `prompt` | `attachments` | `attachments.${number}.type` | `attachments.${number}.url` | `attachments.${number}.displayName` | `codingAgentSessionId` | `failureReason` | `creditsExempt` | `creditsCostUsd` | `suggestions` | `suggestions.${number}.label` | `suggestions.${number}.prompt`, 2>>;
24
+ }
25
+ /** @internal */
26
+ declare function getCurrentProjectJob$1(httpClient: HttpClient): GetCurrentProjectJobSignature;
27
+ interface GetCurrentProjectJobSignature {
28
+ /**
29
+ * Gets the highest-priority job that the agent should work on next.
30
+ * @param - ID of the project to get the current job for.
31
+ */
32
+ (projectId: string): Promise<NonNullablePaths<GetCurrentProjectJobResponse, `projectJob.projectId` | `projectJob.jobType` | `projectJob.platform` | `projectJob.jobStatus` | `projectJob.prompt` | `projectJob.attachments` | `projectJob.attachments.${number}.type` | `projectJob.attachments.${number}.url` | `projectJob.attachments.${number}.displayName` | `projectJob.codingAgentSessionId` | `projectJob.failureReason` | `projectJob.creditsExempt` | `projectJob.creditsCostUsd` | `projectJob.suggestions` | `projectJob.suggestions.${number}.label` | `projectJob.suggestions.${number}.prompt`, 3>>;
33
+ }
34
+ /** @internal */
35
+ declare function updateProjectJobStatus$1(httpClient: HttpClient): UpdateProjectJobStatusSignature;
36
+ interface UpdateProjectJobStatusSignature {
37
+ /**
38
+ * Updates the status of a job with state-machine enforcement.
39
+ * @param - ID of the job to update.
40
+ * @param - New status for the job.
41
+ */
42
+ (projectJobId: string, jobStatus: JobStatusWithLiterals, options?: NonNullablePaths<UpdateProjectJobStatusOptions, `revision`, 0>): Promise<NonNullablePaths<UpdateProjectJobStatusResponse, `projectJob.projectId` | `projectJob.jobType` | `projectJob.platform` | `projectJob.jobStatus` | `projectJob.prompt` | `projectJob.attachments` | `projectJob.attachments.${number}.type` | `projectJob.attachments.${number}.url` | `projectJob.attachments.${number}.displayName` | `projectJob.codingAgentSessionId` | `projectJob.failureReason` | `projectJob.creditsExempt` | `projectJob.creditsCostUsd` | `projectJob.suggestions` | `projectJob.suggestions.${number}.label` | `projectJob.suggestions.${number}.prompt`, 3>>;
43
+ }
44
+ /** @internal */
45
+ declare function clearProjectJobAssistantResponse$1(httpClient: HttpClient): ClearProjectJobAssistantResponseSignature;
46
+ interface ClearProjectJobAssistantResponseSignature {
47
+ /**
48
+ * Drops a job's assistant answer once it has reached the conversation it was meant for. Called by
49
+ * containers-projects after a successful chat write, so the job does not keep a second, indefinite
50
+ * copy of user-visible text that Chat already stores under its own retention rules.
51
+ * @param - ID of the job whose delivered answer should be dropped.
52
+ */
53
+ (projectJobId: string): Promise<NonNullablePaths<ClearProjectJobAssistantResponseResponse, `projectJob.projectId` | `projectJob.jobType` | `projectJob.platform` | `projectJob.jobStatus` | `projectJob.prompt` | `projectJob.attachments` | `projectJob.attachments.${number}.type` | `projectJob.attachments.${number}.url` | `projectJob.attachments.${number}.displayName` | `projectJob.codingAgentSessionId` | `projectJob.failureReason` | `projectJob.creditsExempt` | `projectJob.creditsCostUsd` | `projectJob.suggestions` | `projectJob.suggestions.${number}.label` | `projectJob.suggestions.${number}.prompt`, 3>>;
54
+ }
55
+ /** @internal */
56
+ declare function cancelProjectJob$1(httpClient: HttpClient): CancelProjectJobSignature;
57
+ interface CancelProjectJobSignature {
58
+ /**
59
+ * Cancels a pending job.
60
+ * @param - ID of the job to cancel.
61
+ * @param - Current revision for optimistic locking.
62
+ */
63
+ (projectJobId: string, revision: string): Promise<NonNullablePaths<CancelProjectJobResponse, `projectJob.projectId` | `projectJob.jobType` | `projectJob.platform` | `projectJob.jobStatus` | `projectJob.prompt` | `projectJob.attachments` | `projectJob.attachments.${number}.type` | `projectJob.attachments.${number}.url` | `projectJob.attachments.${number}.displayName` | `projectJob.codingAgentSessionId` | `projectJob.failureReason` | `projectJob.creditsExempt` | `projectJob.creditsCostUsd` | `projectJob.suggestions` | `projectJob.suggestions.${number}.label` | `projectJob.suggestions.${number}.prompt`, 3>>;
64
+ }
65
+ /** @internal */
66
+ declare function getLatestProjectJob$1(httpClient: HttpClient): GetLatestProjectJobSignature;
67
+ interface GetLatestProjectJobSignature {
68
+ /**
69
+ * Gets the latest job for a project, for the project owner to poll build progress.
70
+ * @param - ID of the project to get the latest job for.
71
+ */
72
+ (projectId: string): Promise<NonNullablePaths<GetLatestProjectJobResponse, `projectJob.projectId` | `projectJob.jobType` | `projectJob.platform` | `projectJob.jobStatus` | `projectJob.prompt` | `projectJob.attachments` | `projectJob.attachments.${number}.type` | `projectJob.attachments.${number}.url` | `projectJob.attachments.${number}.displayName` | `projectJob.codingAgentSessionId` | `projectJob.failureReason` | `projectJob.creditsExempt` | `projectJob.creditsCostUsd` | `projectJob.suggestions` | `projectJob.suggestions.${number}.label` | `projectJob.suggestions.${number}.prompt`, 3>>;
73
+ }
74
+ /** @internal */
75
+ declare function createSuggestionsJob$1(httpClient: HttpClient): CreateSuggestionsJobSignature;
76
+ interface CreateSuggestionsJobSignature {
77
+ /**
78
+ * Queues suggestions for the current project conversation.
79
+ * @param - ID of the project receiving the suggestions job.
80
+ */
81
+ (projectId: string, options?: NonNullablePaths<CreateSuggestionsJobOptions, `conversationId`, 0>): Promise<NonNullablePaths<CreateSuggestionsJobResponse, `projectJob.projectId` | `projectJob.jobType` | `projectJob.platform` | `projectJob.jobStatus` | `projectJob.prompt` | `projectJob.attachments` | `projectJob.attachments.${number}.type` | `projectJob.attachments.${number}.url` | `projectJob.attachments.${number}.displayName` | `projectJob.codingAgentSessionId` | `projectJob.failureReason` | `projectJob.creditsExempt` | `projectJob.creditsCostUsd` | `projectJob.suggestions` | `projectJob.suggestions.${number}.label` | `projectJob.suggestions.${number}.prompt`, 3>>;
82
+ }
83
+ /** @internal */
84
+ declare function openProjectJobActivity$1(httpClient: HttpClient): OpenProjectJobActivitySignature;
85
+ interface OpenProjectJobActivitySignature {
86
+ /**
87
+ * Registers the activity stream for an active job owned by the caller.
88
+ * @param - ID of the project job.
89
+ * @param - ID of the activity stream.
90
+ */
91
+ (projectJobId: string, streamId: string): Promise<NonNullablePaths<OpenProjectJobActivityResponse, `jobId` | `streamId` | `latestSequence`, 0>>;
92
+ }
93
+ /** @internal */
94
+ declare function reportProjectJobActivity$1(httpClient: HttpClient): ReportProjectJobActivitySignature;
95
+ interface ReportProjectJobActivitySignature {
96
+ /**
97
+ * Persists an idempotent semantic activity batch for the registered stream.
98
+ * @param - ID of the project job.
99
+ * @param - Semantic activity batch to persist. Its Base64-encoded protobuf must fit within 16,000 characters.
100
+ */
101
+ (projectJobId: string, batch: ActivityBatch): Promise<NonNullablePaths<ReportProjectJobActivityResponse, `jobId` | `streamId` | `acceptedSequence` | `latestSequence`, 0>>;
102
+ }
103
+ /** @internal */
104
+ declare function queryProjectJobActivity$1(httpClient: HttpClient): QueryProjectJobActivitySignature;
105
+ interface QueryProjectJobActivitySignature {
106
+ /**
107
+ * Replays persisted activity for the current owner, using the latest stream when omitted.
108
+ * @param - ID of the project job.
109
+ */
110
+ (projectJobId: string, options?: QueryProjectJobActivityOptions): Promise<NonNullablePaths<QueryProjectJobActivityResponse, `batches` | `batches.${number}.jobId` | `batches.${number}.streamId` | `batches.${number}.batchSequence` | `batches.${number}.schemaVersion` | `batches.${number}.reportingProfileVersion` | `batches.${number}.workflow` | `latestSequence` | `nextSequence` | `historyExpired` | `jobId` | `streamId` | `notificationAppDefId`, 2>>;
111
+ }
112
+
113
+ declare function customQueryProjectJobs(httpClient: HttpClient): {
114
+ (query: ProjectJobQuery, options: QueryProjectJobsOptions): ReturnType<typeof typedQueryProjectJobs>;
115
+ (options: QueryProjectJobsOptions): ProjectJobsQueryBuilder;
116
+ };
117
+ /** @internal */
118
+ declare const createProjectJob: MaybeContext<BuildRESTFunction<typeof createProjectJob$1> & typeof createProjectJob$1>;
119
+ /** @internal */
120
+ declare const getProjectJob: MaybeContext<BuildRESTFunction<typeof getProjectJob$1> & typeof getProjectJob$1>;
121
+ /** @internal */
122
+ declare const getCurrentProjectJob: MaybeContext<BuildRESTFunction<typeof getCurrentProjectJob$1> & typeof getCurrentProjectJob$1>;
123
+ /** @internal */
124
+ declare const updateProjectJobStatus: MaybeContext<BuildRESTFunction<typeof updateProjectJobStatus$1> & typeof updateProjectJobStatus$1>;
125
+ /** @internal */
126
+ declare const clearProjectJobAssistantResponse: MaybeContext<BuildRESTFunction<typeof clearProjectJobAssistantResponse$1> & typeof clearProjectJobAssistantResponse$1>;
127
+ /** @internal */
128
+ declare const cancelProjectJob: MaybeContext<BuildRESTFunction<typeof cancelProjectJob$1> & typeof cancelProjectJob$1>;
129
+ /** @internal */
130
+ declare const getLatestProjectJob: MaybeContext<BuildRESTFunction<typeof getLatestProjectJob$1> & typeof getLatestProjectJob$1>;
131
+ /** @internal */
132
+ declare const createSuggestionsJob: MaybeContext<BuildRESTFunction<typeof createSuggestionsJob$1> & typeof createSuggestionsJob$1>;
133
+ /** @internal */
134
+ declare const openProjectJobActivity: MaybeContext<BuildRESTFunction<typeof openProjectJobActivity$1> & typeof openProjectJobActivity$1>;
135
+ /** @internal */
136
+ declare const reportProjectJobActivity: MaybeContext<BuildRESTFunction<typeof reportProjectJobActivity$1> & typeof reportProjectJobActivity$1>;
137
+ /** @internal */
138
+ declare const queryProjectJobActivity: MaybeContext<BuildRESTFunction<typeof queryProjectJobActivity$1> & typeof queryProjectJobActivity$1>;
139
+ declare const queryProjectJobs: MaybeContext<BuildRESTFunction<typeof customQueryProjectJobs> & typeof customQueryProjectJobs>;
140
+
141
+ export { ActivityBatch, CancelProjectJobResponse, ClearProjectJobAssistantResponseResponse, CreateSuggestionsJobOptions, CreateSuggestionsJobResponse, GetCurrentProjectJobResponse, GetLatestProjectJobResponse, JobStatusWithLiterals, OpenProjectJobActivityResponse, ProjectJob, ProjectJobQuery, ProjectJobsQueryBuilder, QueryProjectJobActivityOptions, QueryProjectJobActivityResponse, QueryProjectJobsOptions, ReportProjectJobActivityResponse, UpdateProjectJobStatusOptions, UpdateProjectJobStatusResponse, cancelProjectJob, clearProjectJobAssistantResponse, createProjectJob, createSuggestionsJob, getCurrentProjectJob, getLatestProjectJob, getProjectJob, openProjectJobActivity, queryProjectJobActivity, queryProjectJobs, reportProjectJobActivity, updateProjectJobStatus };