@uipath/integrationservice-sdk 1.197.0 → 1.198.0-preview.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -19811,7 +19811,7 @@ class TextApiResponse2 {
19811
19811
  var package_default = {
19812
19812
  name: "@uipath/integrationservice-sdk",
19813
19813
  license: "MIT",
19814
- version: "1.197.0",
19814
+ version: "1.198.0-preview.80",
19815
19815
  repository: {
19816
19816
  type: "git",
19817
19817
  url: "https://github.com/UiPath/cli.git",
@@ -39985,6 +39985,10 @@ var getAuthContext = async (options = {}) => {
39985
39985
  tenantName
39986
39986
  };
39987
39987
  };
39988
+
39989
+ // ../auth/src/index.ts
39990
+ init_constants();
39991
+
39988
39992
  // ../auth/src/interactive.ts
39989
39993
  init_src();
39990
39994
 
@@ -40009,6 +40013,20 @@ var API_DOMAIN_MAP = new Map([
40009
40013
  [SessionsApi, "connections"],
40010
40014
  [ElementsApi, "elements"]
40011
40015
  ]);
40016
+ function baseApiClassName(name) {
40017
+ let end = name.length;
40018
+ while (end > 0 && name[end - 1] >= "0" && name[end - 1] <= "9") {
40019
+ end--;
40020
+ }
40021
+ return name.slice(0, end);
40022
+ }
40023
+ var API_DOMAIN_BY_NAME = new Map([...API_DOMAIN_MAP].map(([ApiClass, domain]) => [
40024
+ baseApiClassName(ApiClass.name),
40025
+ domain
40026
+ ]));
40027
+ function resolveApiDomain(ApiClass) {
40028
+ return API_DOMAIN_MAP.get(ApiClass) ?? API_DOMAIN_BY_NAME.get(baseApiClassName(ApiClass.name));
40029
+ }
40012
40030
  async function getValidatedAuthContext(options) {
40013
40031
  const ctx = await getAuthContext({
40014
40032
  tenant: options?.tenant,
@@ -40045,7 +40063,7 @@ async function createElementsConfig(options) {
40045
40063
  });
40046
40064
  }
40047
40065
  async function createApiClient(ApiClass, options) {
40048
- const domain = API_DOMAIN_MAP.get(ApiClass);
40066
+ const domain = resolveApiDomain(ApiClass);
40049
40067
  if (!domain) {
40050
40068
  throw new Error(`Unknown API class: ${ApiClass.name}`);
40051
40069
  }
@@ -40217,6 +40235,246 @@ function folderOverride(folderKey) {
40217
40235
  }
40218
40236
  });
40219
40237
  }
40238
+ var CONNECTORS_PATH_SEGMENT = "elements_/v3/element/connectors";
40239
+ var CONNECTOR_SOURCE_HEADER = "UiPath.CodingAgent";
40240
+ var CONNECTOR_BUILDER_SOURCE_HEADER = "UiPath.IntegrationService.ConnectorBuilder";
40241
+ var MAX_CONNECTOR_PAGES = 1000;
40242
+ function nextPageToken(response) {
40243
+ const token = response.headers.get("elements-next-page-token") ?? response.headers.get("Elements-Next-Page-Token");
40244
+ return token && token.trim().length > 0 ? token : undefined;
40245
+ }
40246
+ function connectorsUrl(ctx, suffix = "") {
40247
+ return `${ctx.baseUrl}/${ctx.organizationId}/${ctx.tenantName}/${CONNECTORS_PATH_SEGMENT}${suffix}`;
40248
+ }
40249
+ async function failFromResponse(response, action) {
40250
+ if (response.type === "opaqueredirect" || response.status === 0) {
40251
+ throw new Error(`${action}: request was redirected (likely not authenticated or wrong tenant/host). Run \`uip login\` and retry.`);
40252
+ }
40253
+ const errorText = await response.text();
40254
+ throw new Error(`${action}: ${response.status} ${response.statusText} - ${errorText}`);
40255
+ }
40256
+ var CONNECTOR_REQUEST_TIMEOUT_MS = 60000;
40257
+ async function connectorApiFetch(url, init) {
40258
+ try {
40259
+ return await fetch(url, {
40260
+ ...init,
40261
+ redirect: "manual",
40262
+ signal: AbortSignal.timeout(CONNECTOR_REQUEST_TIMEOUT_MS)
40263
+ });
40264
+ } catch (e) {
40265
+ if (e instanceof Error && e.name === "TimeoutError") {
40266
+ throw new Error(`Request timed out after ${CONNECTOR_REQUEST_TIMEOUT_MS / 1000}s: ${url}. Check connectivity to the tenant and retry.`);
40267
+ }
40268
+ throw e;
40269
+ }
40270
+ }
40271
+ async function importConnectorZip(options, zipBytes, fileName) {
40272
+ const ctx = await getValidatedAuthContext(options);
40273
+ const form = new FormData;
40274
+ const part = zipBytes;
40275
+ form.append("file", new Blob([part], { type: "application/zip" }), fileName);
40276
+ const response = await connectorApiFetch(connectorsUrl(ctx, "/import"), {
40277
+ method: "PUT",
40278
+ headers: addSdkUserAgentHeader({
40279
+ Authorization: `Bearer ${ctx.accessToken}`,
40280
+ Accept: "application/json",
40281
+ "x-uipath-source": CONNECTOR_SOURCE_HEADER
40282
+ }, SDK_USER_AGENT),
40283
+ body: form
40284
+ });
40285
+ if (!response.ok) {
40286
+ await failFromResponse(response, "Failed to import connector zip");
40287
+ }
40288
+ return await response.json();
40289
+ }
40290
+ async function createDesignConnector(options, connector) {
40291
+ const ctx = await getValidatedAuthContext(options);
40292
+ const response = await connectorApiFetch(connectorsUrl(ctx), {
40293
+ method: "POST",
40294
+ headers: addSdkUserAgentHeader({
40295
+ Authorization: `Bearer ${ctx.accessToken}`,
40296
+ "Content-Type": "application/json",
40297
+ Accept: "application/json",
40298
+ "x-uipath-source": CONNECTOR_SOURCE_HEADER
40299
+ }, SDK_USER_AGENT),
40300
+ body: JSON.stringify(connector)
40301
+ });
40302
+ if (!response.ok) {
40303
+ await failFromResponse(response, "Failed to create connector");
40304
+ }
40305
+ return await response.json();
40306
+ }
40307
+ async function updateDesignConnector(options, connectorId, connector) {
40308
+ const ctx = await getValidatedAuthContext(options);
40309
+ const response = await connectorApiFetch(connectorsUrl(ctx, `/${connectorId}`), {
40310
+ method: "PUT",
40311
+ headers: addSdkUserAgentHeader({
40312
+ Authorization: `Bearer ${ctx.accessToken}`,
40313
+ "Content-Type": "application/json",
40314
+ Accept: "application/json",
40315
+ "x-uipath-source": CONNECTOR_SOURCE_HEADER
40316
+ }, SDK_USER_AGENT),
40317
+ body: JSON.stringify(connector)
40318
+ });
40319
+ if (!response.ok) {
40320
+ await failFromResponse(response, "Failed to update connector");
40321
+ }
40322
+ return await response.json();
40323
+ }
40324
+ async function findDesignConnectorByKey(options, key) {
40325
+ const ctx = await getValidatedAuthContext(options);
40326
+ let nextPage;
40327
+ let pages = 0;
40328
+ do {
40329
+ const params = new URLSearchParams({ pageSize: "200" });
40330
+ if (nextPage) {
40331
+ params.set("nextPage", nextPage);
40332
+ }
40333
+ const response = await connectorApiFetch(connectorsUrl(ctx, `?${params.toString()}`), {
40334
+ method: "GET",
40335
+ headers: addSdkUserAgentHeader({
40336
+ Authorization: `Bearer ${ctx.accessToken}`,
40337
+ Accept: "application/json",
40338
+ "x-uipath-source": CONNECTOR_BUILDER_SOURCE_HEADER
40339
+ }, SDK_USER_AGENT)
40340
+ });
40341
+ if (!response.ok) {
40342
+ await failFromResponse(response, "Failed to list connectors");
40343
+ }
40344
+ const body = await response.json();
40345
+ const page = Array.isArray(body) ? body : body.items ?? [];
40346
+ const match = page.find((c) => c.key === key);
40347
+ if (match) {
40348
+ return { id: match.id, key: match.key, name: match.name };
40349
+ }
40350
+ if (page.length === 0) {
40351
+ break;
40352
+ }
40353
+ nextPage = nextPageToken(response);
40354
+ pages += 1;
40355
+ } while (nextPage && pages < MAX_CONNECTOR_PAGES);
40356
+ return null;
40357
+ }
40358
+ async function exportConnectorZip(options, connectorId) {
40359
+ const ctx = await getValidatedAuthContext(options);
40360
+ const response = await connectorApiFetch(connectorsUrl(ctx, `/${connectorId}/export?connectorType=REGULAR`), {
40361
+ method: "GET",
40362
+ headers: addSdkUserAgentHeader({
40363
+ Authorization: `Bearer ${ctx.accessToken}`,
40364
+ Accept: "application/octet-stream",
40365
+ "x-uipath-source": CONNECTOR_SOURCE_HEADER
40366
+ }, SDK_USER_AGENT)
40367
+ });
40368
+ if (!response.ok) {
40369
+ await failFromResponse(response, "Failed to export connector");
40370
+ }
40371
+ const buffer = await response.arrayBuffer();
40372
+ return new Uint8Array(buffer);
40373
+ }
40374
+ var PUBLISH_PATH_SEGMENT = "elements_/v3/element/publish";
40375
+ function publishUrl(ctx, suffix = "") {
40376
+ return `${ctx.baseUrl}/${ctx.organizationId}/${ctx.tenantName}/${PUBLISH_PATH_SEGMENT}${suffix}`;
40377
+ }
40378
+ async function publishConnector(options, args) {
40379
+ const ctx = await getValidatedAuthContext(options);
40380
+ const response = await connectorApiFetch(publishUrl(ctx, "/private"), {
40381
+ method: "POST",
40382
+ headers: addSdkUserAgentHeader({
40383
+ Authorization: `Bearer ${ctx.accessToken}`,
40384
+ "Content-Type": "application/json",
40385
+ Accept: "application/json",
40386
+ "x-uipath-source": CONNECTOR_SOURCE_HEADER
40387
+ }, SDK_USER_AGENT),
40388
+ body: JSON.stringify(args)
40389
+ });
40390
+ if (!response.ok) {
40391
+ await failFromResponse(response, "Failed to publish connector");
40392
+ }
40393
+ return await response.json();
40394
+ }
40395
+ async function getPublishStatus(options, publishId) {
40396
+ const ctx = await getValidatedAuthContext(options);
40397
+ const response = await connectorApiFetch(publishUrl(ctx, `/private/${encodeURIComponent(String(publishId))}/status`), {
40398
+ method: "GET",
40399
+ headers: addSdkUserAgentHeader({
40400
+ Authorization: `Bearer ${ctx.accessToken}`,
40401
+ Accept: "application/json",
40402
+ "x-uipath-source": CONNECTOR_SOURCE_HEADER
40403
+ }, SDK_USER_AGENT)
40404
+ });
40405
+ if (!response.ok) {
40406
+ await failFromResponse(response, "Failed to fetch publish status");
40407
+ }
40408
+ return await response.json();
40409
+ }
40410
+ async function getConnectorById(options, connectorId) {
40411
+ const ctx = await getValidatedAuthContext(options);
40412
+ const response = await connectorApiFetch(connectorsUrl(ctx, `/${connectorId}`), {
40413
+ method: "GET",
40414
+ headers: addSdkUserAgentHeader({
40415
+ Authorization: `Bearer ${ctx.accessToken}`,
40416
+ Accept: "application/json",
40417
+ "x-uipath-source": CONNECTOR_SOURCE_HEADER
40418
+ }, SDK_USER_AGENT)
40419
+ });
40420
+ if (!response.ok) {
40421
+ await failFromResponse(response, "Failed to retrieve connector");
40422
+ }
40423
+ return await response.json();
40424
+ }
40425
+ async function listConnectors(options, params) {
40426
+ const ctx = await getValidatedAuthContext(options);
40427
+ const limit = params?.limit ?? 1000;
40428
+ const sourceHeader = params?.design ? CONNECTOR_BUILDER_SOURCE_HEADER : CONNECTOR_SOURCE_HEADER;
40429
+ const items = [];
40430
+ let nextPage;
40431
+ let truncated = false;
40432
+ let pages = 0;
40433
+ do {
40434
+ const qs = new URLSearchParams({ pageSize: "200" });
40435
+ if (nextPage) {
40436
+ qs.set("nextPage", nextPage);
40437
+ }
40438
+ const response = await connectorApiFetch(connectorsUrl(ctx, `?${qs.toString()}`), {
40439
+ method: "GET",
40440
+ headers: addSdkUserAgentHeader({
40441
+ Authorization: `Bearer ${ctx.accessToken}`,
40442
+ Accept: "application/json",
40443
+ "x-uipath-source": sourceHeader
40444
+ }, SDK_USER_AGENT)
40445
+ });
40446
+ if (!response.ok) {
40447
+ await failFromResponse(response, "Failed to list connectors");
40448
+ }
40449
+ const body = await response.json();
40450
+ const page = Array.isArray(body) ? body : body.items ?? [];
40451
+ for (const c of page) {
40452
+ if (items.length >= limit) {
40453
+ truncated = true;
40454
+ break;
40455
+ }
40456
+ const id = c.id;
40457
+ const key = c.key;
40458
+ if (typeof id === "number" && typeof key === "string") {
40459
+ items.push({
40460
+ id,
40461
+ key,
40462
+ name: typeof c.name === "string" ? c.name : undefined,
40463
+ description: typeof c.description === "string" ? c.description : undefined
40464
+ });
40465
+ }
40466
+ }
40467
+ if (truncated) {
40468
+ break;
40469
+ }
40470
+ if (page.length === 0) {
40471
+ break;
40472
+ }
40473
+ nextPage = nextPageToken(response);
40474
+ pages += 1;
40475
+ } while (nextPage && pages < MAX_CONNECTOR_PAGES);
40476
+ return { items, truncated };
40477
+ }
40220
40478
  // src/dap/essential-config.ts
40221
40479
  var MANAGED_HTTP_CONNECTOR_KEY = "uipath-uipath-http";
40222
40480
  var MANAGED_HTTP_CONNECTOR_VERSION = "1.4.50";
@@ -41460,6 +41718,33 @@ var DEFAULT_RULES = [
41460
41718
  function validateIntSvcNode(context, rules = DEFAULT_RULES) {
41461
41719
  return rules.flatMap((rule) => rule(context));
41462
41720
  }
41721
+ // src/pagination.ts
41722
+ var ELEMENTS_NEXT_PAGE_DONE = "DONE";
41723
+ var base64UrlDecode = (input) => {
41724
+ const base64 = input.replace(/-/g, "+").replace(/_/g, "/");
41725
+ if (typeof Buffer !== "undefined") {
41726
+ return Buffer.from(base64, "base64").toString("utf8");
41727
+ }
41728
+ return atob(base64);
41729
+ };
41730
+ var decodeElementsNextPageToken = (token) => {
41731
+ if (!token) {
41732
+ return null;
41733
+ }
41734
+ try {
41735
+ const parsed = JSON.parse(base64UrlDecode(token));
41736
+ if (typeof parsed !== "object" || parsed === null) {
41737
+ return null;
41738
+ }
41739
+ return parsed;
41740
+ } catch {
41741
+ return null;
41742
+ }
41743
+ };
41744
+ var hasMoreElementsPages = (token) => {
41745
+ const cursor = decodeElementsNextPageToken(token)?.providerNextPage;
41746
+ return typeof cursor === "string" && cursor.length > 0 && cursor !== ELEMENTS_NEXT_PAGE_DONE;
41747
+ };
41463
41748
  export {
41464
41749
  validateRequiredParameters,
41465
41750
  validateRequiredFields,
@@ -41476,11 +41761,14 @@ export {
41476
41761
  validateEndpoint,
41477
41762
  validateConnectionId,
41478
41763
  validateConfiguration,
41764
+ updateDesignConnector,
41479
41765
  toClrType,
41480
41766
  runInstanceDesignAction,
41481
41767
  querystring,
41768
+ publishConnector,
41482
41769
  normalizeHttpMethod,
41483
41770
  mapValues,
41771
+ listConnectors,
41484
41772
  instanceOfWebhookSpec,
41485
41773
  instanceOfValueOrBuilder,
41486
41774
  instanceOfUpdatePollingIntervalRequest,
@@ -41738,19 +42026,28 @@ export {
41738
42026
  instanceOfApiResultsAction,
41739
42027
  instanceOfAccessTokenResponse,
41740
42028
  inlineMultipartFileValues,
42029
+ importConnectorZip,
42030
+ hasMoreElementsPages,
41741
42031
  getWebhookConfig,
42032
+ getValidatedAuthContext,
41742
42033
  getUuid,
42034
+ getPublishStatus,
41743
42035
  getObjectMetadataAsSchema,
41744
42036
  getInstanceObjectMetadataAsSchema,
41745
42037
  getInstanceEventObjectMetadataAsSchema,
41746
42038
  getHttpRequestPreview,
41747
42039
  getEventOperationObjects,
41748
42040
  getEventObjectMetadataAsSchema,
42041
+ getConnectorById,
41749
42042
  folderOverride,
42043
+ findDesignConnectorByKey,
41750
42044
  extractMultipartParameters,
42045
+ exportConnectorZip,
41751
42046
  exists,
41752
42047
  executeOperation,
42048
+ decodeElementsNextPageToken,
41753
42049
  createElementsConfig,
42050
+ createDesignConnector,
41754
42051
  createConnectionsConfig,
41755
42052
  createApiClient,
41756
42053
  canConsumeForm,
@@ -42786,6 +43083,7 @@ export {
42786
43083
  EditionDefaultFromJSONTyped,
42787
43084
  EditionDefaultFromJSON,
42788
43085
  EditionDefaultEditionEnum,
43086
+ ELEMENTS_NEXT_PAGE_DONE,
42789
43087
  DictionaryWidgetDesignToJSONTyped,
42790
43088
  DictionaryWidgetDesignToJSON,
42791
43089
  DictionaryWidgetDesignOrBuilderToJSONTyped,
@@ -42923,4 +43221,4 @@ export {
42923
43221
  AccessTokenResponseFromJSON
42924
43222
  };
42925
43223
 
42926
- //# debugId=12D99569551D807A64756E2164756E21
43224
+ //# debugId=E05B3E4BF9DA943064756E2164756E21
@@ -11,6 +11,12 @@ export interface CreateApiClientOptions {
11
11
  tenant?: string;
12
12
  loginValidity?: number;
13
13
  }
14
+ export declare function getValidatedAuthContext(options?: CreateApiClientOptions): Promise<{
15
+ baseUrl: string;
16
+ accessToken: string;
17
+ organizationId: string;
18
+ tenantName: string;
19
+ }>;
14
20
  export declare function createConnectionsConfig(options?: CreateApiClientOptions): Promise<ConnectionsConfiguration>;
15
21
  export declare function createElementsConfig(options?: CreateApiClientOptions): Promise<ElementsConfiguration>;
16
22
  export declare function createApiClient<T>(ApiClass: new (config: ConnectionsConfiguration | ElementsConfiguration) => T, options?: CreateApiClientOptions): Promise<T>;
@@ -89,3 +95,172 @@ export interface EventOperationObject {
89
95
  supportedAuths?: string[];
90
96
  }
91
97
  export declare function folderOverride(folderKey?: string): InitOverrideFunction | undefined;
98
+ /**
99
+ * Imported (parsed) connector returned by `PUT /connectors/import`.
100
+ * The server parses the zip into a Connector but does NOT persist it.
101
+ */
102
+ export interface ImportedConnector {
103
+ key: string;
104
+ name?: string;
105
+ [k: string]: unknown;
106
+ }
107
+ /**
108
+ * Persisted connector returned by `POST /connectors` or `PUT /connectors/{id}`.
109
+ */
110
+ export interface PersistedConnector extends ImportedConnector {
111
+ id: number;
112
+ }
113
+ /**
114
+ * Reference to an existing connector, returned by the lookup-by-key helper.
115
+ */
116
+ export interface DesignConnectorRef {
117
+ id: number;
118
+ key: string;
119
+ name?: string;
120
+ }
121
+ /**
122
+ * Upload a connector zip for parsing/hydration.
123
+ *
124
+ * Endpoint: PUT {baseUrl}/{org}/{tenant}/elements_/v3/element/connectors/import
125
+ *
126
+ * The server parses the zip, hydrates a `Connector` object, and returns it
127
+ * WITHOUT persisting it. The returned object carries the final connector key:
128
+ * the parser prefixes the key with `design` when it does not already contain
129
+ * that marker, so the key returned here matches the persisted key. Pass the
130
+ * returned object to `createDesignConnector` (new) or `updateDesignConnector`
131
+ * (existing) to persist it.
132
+ *
133
+ * The zip must contain a single top-level directory holding `app/element/element.json`.
134
+ */
135
+ export declare function importConnectorZip(options: CreateApiClientOptions | undefined, zipBytes: Uint8Array, fileName: string): Promise<ImportedConnector>;
136
+ /**
137
+ * Create a new connector. Pass the body returned by `importConnectorZip`.
138
+ *
139
+ * Endpoint: POST {baseUrl}/{org}/{tenant}/elements_/v3/element/connectors
140
+ *
141
+ * The server rejects the request if a connector with the same key already
142
+ * exists; use `findDesignConnectorByKey` + `updateDesignConnector` to modify
143
+ * an existing connector.
144
+ */
145
+ export declare function createDesignConnector(options: CreateApiClientOptions | undefined, connector: ImportedConnector): Promise<PersistedConnector>;
146
+ /**
147
+ * Update an existing connector in place, preserving its id and key.
148
+ *
149
+ * Endpoint: PUT {baseUrl}/{org}/{tenant}/elements_/v3/element/connectors/{id}
150
+ *
151
+ * The server upserts the full connector body under the supplied id, so the
152
+ * caller must pass the complete connector (e.g. the body returned by
153
+ * `importConnectorZip`).
154
+ */
155
+ export declare function updateDesignConnector(options: CreateApiClientOptions | undefined, connectorId: number, connector: ImportedConnector): Promise<PersistedConnector>;
156
+ /**
157
+ * Find a connector visible to the caller's tenant whose key matches exactly.
158
+ *
159
+ * Endpoint: GET {baseUrl}/{org}/{tenant}/elements_/v3/element/connectors
160
+ *
161
+ * This is the same tenant-scoped connector search the connector builder uses
162
+ * to list a user's connectors (including design connectors), and it is
163
+ * available to connector-authoring callers. Results are paged 200 at a time;
164
+ * paging continues while the `elements-next-page-token` response header is
165
+ * present and non-empty. Returns the matching connector reference, or `null`
166
+ * when no connector with that key exists.
167
+ */
168
+ export declare function findDesignConnectorByKey(options: CreateApiClientOptions | undefined, key: string): Promise<DesignConnectorRef | null>;
169
+ /**
170
+ * Download an existing connector as a zip.
171
+ *
172
+ * Endpoint: GET {baseUrl}/{org}/{tenant}/elements_/v3/element/connectors/{id}/export
173
+ *
174
+ * Returns the connector packaged in the same on-disk layout the importer
175
+ * consumes: a single top-level directory (named after the connector key)
176
+ * containing `app/element/element.json`, `standard-resources/`, the image, and
177
+ * related files. This is the builder's own export, so it serves design
178
+ * connectors (unlike the published-element export, which requires a deployed
179
+ * version).
180
+ */
181
+ export declare function exportConnectorZip(options: CreateApiClientOptions | undefined, connectorId: number): Promise<Uint8Array>;
182
+ /** Input to publishConnector. Mirrors the connector-builder-ui's POST body. */
183
+ export interface PublishConnectorArgs {
184
+ /** The design connector's numeric id (from `createDesignConnector` / `findDesignConnectorByKey`). */
185
+ connectorId: number;
186
+ /** Semantic version to publish (e.g. "1.0.0"). Server uses this as the element version. */
187
+ version: string;
188
+ /** Optional metadata passed through; server defaults derive from the design connector when omitted. */
189
+ connectorMetadata?: {
190
+ description?: string;
191
+ image?: string;
192
+ latestVersion?: string;
193
+ };
194
+ }
195
+ /**
196
+ * Server response from POST /publish/private. The job is async; poll status
197
+ * with the id.
198
+ *
199
+ * Periodic serializes the job's identifier as `id` (`PublishJobLog.id`); it
200
+ * does NOT return a `publishId` field. `publishId` is kept here as an optional
201
+ * forward-compat alias in case the server adds it later — callers should read
202
+ * `id ?? publishId`.
203
+ */
204
+ export interface PublishJobResult {
205
+ id?: number | string;
206
+ publishId?: number | string;
207
+ status?: string;
208
+ message?: unknown;
209
+ [k: string]: unknown;
210
+ }
211
+ /** Server response from GET /publish/private/{publishId}/status. */
212
+ export interface PublishStatusResult {
213
+ id?: number | string;
214
+ publishId?: number | string;
215
+ status: "IN_PROGRESS" | "SUCCESS" | "FAILURE" | string;
216
+ message?: unknown;
217
+ [k: string]: unknown;
218
+ }
219
+ /**
220
+ * Promote a design connector to a tenant-wide CUSTOM connector.
221
+ *
222
+ * Endpoint: POST {baseUrl}/{org}/{tenant}/elements_/v3/element/publish/private
223
+ *
224
+ * Returns immediately with the job id (server field `id`) — the actual publish
225
+ * work runs async on the server. Read the id as `id ?? publishId` and poll
226
+ * `getPublishStatus(id)` until status != "IN_PROGRESS". Studio Web's connector
227
+ * picker reflects the new connector ~5-10 min after status reaches SUCCESS
228
+ * (registry propagation).
229
+ */
230
+ export declare function publishConnector(options: CreateApiClientOptions | undefined, args: PublishConnectorArgs): Promise<PublishJobResult>;
231
+ /**
232
+ * Poll the status of an in-flight publish job.
233
+ *
234
+ * Endpoint: GET {baseUrl}/{org}/{tenant}/elements_/v3/element/publish/private/{publishId}/status
235
+ *
236
+ * Status values: IN_PROGRESS (still running), SUCCESS, FAILURE. Server may emit
237
+ * additional values — surface them as-is.
238
+ */
239
+ export declare function getPublishStatus(options: CreateApiClientOptions | undefined, publishId: number | string): Promise<PublishStatusResult>;
240
+ /** Lightweight connector summary used by listings and search. */
241
+ export interface ConnectorSummary {
242
+ id: number;
243
+ key: string;
244
+ name?: string;
245
+ description?: string;
246
+ }
247
+ /**
248
+ * Retrieve a single connector's full record by numeric id.
249
+ *
250
+ * Endpoint: GET {baseUrl}/{org}/{tenant}/elements_/v3/element/connectors/{id}
251
+ */
252
+ export declare function getConnectorById(options: CreateApiClientOptions | undefined, connectorId: number): Promise<PersistedConnector>;
253
+ /**
254
+ * List connectors visible to the caller's tenant (the same search the connector
255
+ * builder uses), paged 200 at a time. Accumulates up to `limit` summaries;
256
+ * `truncated` is true when more existed beyond the cap.
257
+ *
258
+ * Endpoint: GET {baseUrl}/{org}/{tenant}/elements_/v3/element/connectors
259
+ */
260
+ export declare function listConnectors(options: CreateApiClientOptions | undefined, params?: {
261
+ limit?: number;
262
+ design?: boolean;
263
+ }): Promise<{
264
+ items: ConnectorSummary[];
265
+ truncated: boolean;
266
+ }>;
@@ -3,6 +3,7 @@ export * from "../generated/connections/src/index.js";
3
3
  export { ElementsApi } from "../generated/elements/src/apis/index.js";
4
4
  export * from "../generated/elements/src/models/index.js";
5
5
  export { Configuration as ElementsConfiguration } from "../generated/elements/src/runtime.js";
6
- export { type CreateApiClientOptions, createApiClient, createConnectionsConfig, createElementsConfig, type EventOperationObject, type ExecuteOperationResult, executeOperation, folderOverride, getEventObjectMetadataAsSchema, getEventOperationObjects, getHttpRequestPreview, getInstanceEventObjectMetadataAsSchema, getInstanceObjectMetadataAsSchema, getObjectMetadataAsSchema, getWebhookConfig, type HttpRequestPreviewResult, type InstanceDesignActionResult, runInstanceDesignAction, type WebhookConfigResult, } from "./client-factory.js";
6
+ export { type ConnectorSummary, type CreateApiClientOptions, createApiClient, createConnectionsConfig, createDesignConnector, createElementsConfig, type DesignConnectorRef, type EventOperationObject, type ExecuteOperationResult, executeOperation, exportConnectorZip, findDesignConnectorByKey, folderOverride, getConnectorById, getEventObjectMetadataAsSchema, getEventOperationObjects, getHttpRequestPreview, getInstanceEventObjectMetadataAsSchema, getInstanceObjectMetadataAsSchema, getObjectMetadataAsSchema, getPublishStatus, getValidatedAuthContext, getWebhookConfig, type HttpRequestPreviewResult, type ImportedConnector, type InstanceDesignActionResult, importConnectorZip, listConnectors, type PersistedConnector, type PublishConnectorArgs, type PublishJobResult, type PublishStatusResult, publishConnector, runInstanceDesignAction, updateDesignConnector, type WebhookConfigResult, } from "./client-factory.js";
7
7
  export * from "./dap/index.js";
8
+ export { decodeElementsNextPageToken, ELEMENTS_NEXT_PAGE_DONE, type ElementsNextPage, hasMoreElementsPages, } from "./pagination.js";
8
9
  export { SDK_USER_AGENT } from "./user-agent.js";
@@ -0,0 +1,20 @@
1
+ /** Sentinel value `providerNextPage` carries on the last page (periodic `NEXT_PAGE_TOKEN_DONE`). */
2
+ export declare const ELEMENTS_NEXT_PAGE_DONE = "DONE";
3
+ export interface ElementsNextPage {
4
+ /** Upstream/vendor cursor, or the "DONE" sentinel on the last page. */
5
+ providerNextPage?: string;
6
+ page?: number;
7
+ pageSize?: number;
8
+ }
9
+ /**
10
+ * Decode an IS/periodic `elements-next-page-token`. Returns the parsed cursor, or
11
+ * `null` when the token is blank or cannot be decoded into the expected JSON object.
12
+ */
13
+ export declare const decodeElementsNextPageToken: (token: string | null | undefined) => ElementsNextPage | null;
14
+ /**
15
+ * Whether `token` points at a genuine next page: it decodes, carries a
16
+ * `providerNextPage` cursor, and that cursor is not the "DONE" sentinel. Because the
17
+ * header is always present, THIS — not header presence — is the correct
18
+ * has-more-pages / loop-continuation predicate for IS/periodic list responses.
19
+ */
20
+ export declare const hasMoreElementsPages: (token: string | null | undefined) => boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/integrationservice-sdk",
3
3
  "license": "MIT",
4
- "version": "1.197.0",
4
+ "version": "1.198.0-preview.80",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/UiPath/cli.git",
@@ -27,5 +27,5 @@
27
27
  "files": [
28
28
  "dist"
29
29
  ],
30
- "gitHead": "56f68b263cec4ea1f2a39d738bd99ecf52f88fea"
30
+ "gitHead": "9b2c3c0f21a256d2f38dd28bc97e72e6f7b10a9c"
31
31
  }