@unito/integration-cli 0.60.13 → 0.60.15

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.
@@ -5,7 +5,7 @@
5
5
  "description": "Integration Boilerplate",
6
6
  "license": "LicenseRef-LICENSE",
7
7
  "scripts": {
8
- "compile": "tsc",
8
+ "compile": "tsc --project tsconfig.build.json",
9
9
  "dev": "tsx watch src/index.ts",
10
10
  "test": "NODE_ENV=test tsx --test --test-name-pattern=${ONLY:-.*} $(find test -type f -name '*.test.ts')",
11
11
  "lint": "eslint --fix src && prettier --write src",
@@ -23,15 +23,17 @@
23
23
  "node": "20.9"
24
24
  },
25
25
  "dependencies": {
26
- "@unito/integration-sdk": "^0.x"
26
+ "@unito/integration-sdk": "^1.x"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/node": "20.9.x",
30
- "typescript-eslint": "7.x",
31
- "eslint": "8.x",
30
+ "@types/eslint__js": "8.x",
32
31
  "npm-audit-resolver": "^3.0.0-RC.0",
33
32
  "prettier": "3.x",
34
33
  "tsx": "4.x",
35
- "typescript": "5.x"
34
+ "typescript": "5.x",
35
+ "typescript-eslint": "8.x",
36
+ "eslint": "9.x",
37
+ "@eslint/js": "9.x"
36
38
  }
37
39
  }
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "exclude": ["test/**/*"]
4
+ }
@@ -17,7 +17,7 @@
17
17
  "outDir": "dist",
18
18
  "pretty": true,
19
19
  "moduleResolution": "NodeNext",
20
- "rootDir": "./src",
20
+ "rootDir": ".",
21
21
  "skipLibCheck": true,
22
22
  "sourceMap": true,
23
23
  "strict": true,
@@ -148,12 +148,22 @@ export type Credential = Base & {
148
148
  integrationId: number;
149
149
  /** The name of the integration. */
150
150
  integrationName: string;
151
+ /** The display name of the integration. */
152
+ integrationDisplayName?: string;
151
153
  /** The id of the authorization. */
152
154
  authorizationId: number;
153
155
  /** The scope of the credential. */
154
156
  scope: 'development' | 'compliance' | 'production' | 'service';
155
157
  /** The id of the Unito User for which this credential belongs to. */
156
158
  unitoUserId: string | null;
159
+ /** The id of the credential account. */
160
+ credentialAccountId?: string | null;
161
+ /** The last time we tried to obtain the latest credential account. */
162
+ lastCredentialAccountAccessAt?: string | null;
163
+ /** The first time obtaining the latest credential account failed. */
164
+ firstFailedCredentialAccountAccessAt?: string | null;
165
+ /** The last time the credential was refreshed. */
166
+ lastRefreshedAt?: string | null;
157
167
  /** The payload of the credential, which conforms to the schema (ex. variables) of the authorization. */
158
168
  payload: {
159
169
  [key: string]: any;
@@ -220,7 +230,7 @@ export declare function createIntegration(body?: {
220
230
  */
221
231
  export declare function publishIntegration(body?: {
222
232
  /** The archive of the integration, including the .unito.json file. */
223
- file: Blob;
233
+ file?: Blob;
224
234
  }, opts?: Oazapfts.RequestOpts): Promise<Integration>;
225
235
  /**
226
236
  * Find an integration by exact name
@@ -316,6 +326,10 @@ export declare function getCredentials({ pagination, filters, }?: {
316
326
  unitoUserId?: string;
317
327
  /** The id of the credential account for which this credential belongs to. */
318
328
  credentialAccountId?: string;
329
+ /** The last access to the credential account occured before the provided date. */
330
+ lastCredentialAccountAccessAtBefore?: string;
331
+ /** The first failure to access the credential account occured after the provided date. */
332
+ firstFailedCredentialAccountAccessAtAfter?: string;
319
333
  };
320
334
  }, opts?: Oazapfts.RequestOpts): Promise<Pagination & {
321
335
  /** The credentials. */
@@ -365,7 +379,7 @@ export declare function getCredentialAccount(xUnitoCredentialId: string, { xUnit
365
379
  */
366
380
  export declare function postTrack(body: {
367
381
  jwtToken: string;
368
- event: 'AUTH_START' | 'AUTH_SUBMIT' | 'AUTH_ACTION' | 'AUTH_BLOCKED' | 'USER_SUCCEEDS_CONNECTION' | 'USER_FAILED_CONNECTION';
382
+ event: 'AUTH_START' | 'AUTH_SUBMIT' | 'AUTH_ACTION' | 'AUTH_BLOCKED' | 'USER_SUCCEEDS_CONNECTION' | 'USER_FAILED_CONNECTION' | 'AUTH_CHOOSE_CONNECTION_SUBMIT';
369
383
  payload?: {
370
384
  [key: string]: any;
371
385
  };
@@ -438,16 +452,18 @@ export declare function getProxyGraph(xUnitoCredentialId: string, path: string,
438
452
  /**
439
453
  * Call an integration's graph
440
454
  */
441
- export declare function patchProxyGraph(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
455
+ export declare function patchProxyGraph(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, }?: {
442
456
  xUnitoCorrelationId?: string;
443
457
  xUnitoAdditionalLoggingContext?: string;
458
+ contentType?: string;
444
459
  }, opts?: Oazapfts.RequestOpts): Promise<any>;
445
460
  /**
446
461
  * Call an integration's graph
447
462
  */
448
- export declare function postProxyGraph(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
463
+ export declare function postProxyGraph(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, }?: {
449
464
  xUnitoCorrelationId?: string;
450
465
  xUnitoAdditionalLoggingContext?: string;
466
+ contentType?: string;
451
467
  }, opts?: Oazapfts.RequestOpts): Promise<any>;
452
468
  /**
453
469
  * Call an integration's graph
@@ -330,7 +330,7 @@ function getProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAd
330
330
  /**
331
331
  * Call an integration's graph
332
332
  */
333
- function patchProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
333
+ function patchProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, } = {}, opts) {
334
334
  return oazapfts.ok(oazapfts.fetchJson(`/proxy/graph${QS.query(QS.explode({
335
335
  path,
336
336
  }))}`, oazapfts.json({
@@ -341,13 +341,14 @@ function patchProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId,
341
341
  'X-Unito-Credential-Id': xUnitoCredentialId,
342
342
  'X-Unito-Correlation-Id': xUnitoCorrelationId,
343
343
  'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
344
+ 'Content-Type': contentType,
344
345
  }),
345
346
  })));
346
347
  }
347
348
  /**
348
349
  * Call an integration's graph
349
350
  */
350
- function postProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
351
+ function postProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, } = {}, opts) {
351
352
  return oazapfts.ok(oazapfts.fetchJson(`/proxy/graph${QS.query(QS.explode({
352
353
  path,
353
354
  }))}`, oazapfts.json({
@@ -358,6 +359,7 @@ function postProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, x
358
359
  'X-Unito-Credential-Id': xUnitoCredentialId,
359
360
  'X-Unito-Correlation-Id': xUnitoCorrelationId,
360
361
  'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
362
+ 'Content-Type': contentType,
361
363
  }),
362
364
  })));
363
365
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.60.13",
2
+ "version": "0.60.15",
3
3
  "commands": {
4
4
  "activity": {
5
5
  "id": "activity",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unito/integration-cli",
3
- "version": "0.60.13",
3
+ "version": "0.60.15",
4
4
  "description": "Integration CLI",
5
5
  "bin": {
6
6
  "integration-cli": "./bin/run"