@devrev/typescript-sdk 1.1.27 → 1.1.29
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/auto-generated/beta/beta-devrev-sdk.d.ts +950 -70
- package/dist/auto-generated/beta/beta-devrev-sdk.js +140 -4
- package/dist/auto-generated/public-devrev-sdk.d.ts +247 -44
- package/dist/auto-generated/public-devrev-sdk.js +45 -2
- package/dist/snap-ins/types.d.ts +4 -0
- package/dist/snap-ins/types.test.js +4 -0
- package/package.json +1 -1
|
@@ -33,7 +33,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
33
33
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
34
|
};
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
36
|
+
exports.ContentType = exports.WorkType = exports.WebhooksUpdateAction = exports.WebhookStatus = exports.WebhookEventType = exports.VistaGroupItemType = exports.VistaGroupItemState = exports.UserType = exports.UserState = exports.TimelineEntryVisibility = exports.TimelineEntryType = exports.TimelineEntryObjectType = exports.TimelineEntriesUpdateRequestType = exports.TimelineEntriesCreateRequestType = exports.TimelineCommentBodyType = exports.TicketSeverity = exports.TicketChannels = exports.SyncMetadataFilterSyncOutFilterStatus = exports.SyncMetadataFilterSyncInFilterStatus = exports.StageValidationOptionForUpdate = exports.StageValidationOptionForCreate = exports.SlaType = exports.SlaSummaryStage = exports.SlaStatus = exports.PartType = exports.OrgType = exports.OrgScheduleStatus = exports.OrgEnvironment = exports.ListMode = exports.IssuePriority = exports.ErrorUnauthorizedType = exports.ErrorTooManyRequestsType = exports.ErrorServiceUnavailableType = exports.ErrorNotFoundType = exports.ErrorInternalServerErrorType = exports.ErrorForbiddenType = exports.ErrorConflictType = exports.ErrorBadRequestUnexpectedJsonTypeType = exports.ErrorBadRequestType = exports.DevOrgAuthConnectionsUpdateRequestType = exports.DevOrgAuthConnectionsCreateRequestType = exports.DateTimePresetType = exports.DateFilterType = exports.AuthTokenTokenType = exports.AuthTokenSubjectTokenType = exports.AuthTokenStatus = exports.AuthTokenRequestedTokenType = exports.AuthTokenGrantType = exports.AuthConnectionType = exports.AuthConnectionToggle = void 0;
|
|
37
|
+
exports.Api = exports.HttpClient = void 0;
|
|
37
38
|
var AuthConnectionToggle;
|
|
38
39
|
(function (AuthConnectionToggle) {
|
|
39
40
|
AuthConnectionToggle["Disable"] = "disable";
|
|
@@ -91,11 +92,11 @@ var AuthTokenSubjectTokenType;
|
|
|
91
92
|
AuthTokenSubjectTokenType["UrnDevrevParamsOauthTokenTypeJwtAuth0"] = "urn:devrev:params:oauth:token-type:jwt:auth0";
|
|
92
93
|
AuthTokenSubjectTokenType["UrnDevrevParamsOauthTokenTypeJwtDev"] = "urn:devrev:params:oauth:token-type:jwt:dev";
|
|
93
94
|
AuthTokenSubjectTokenType["UrnDevrevParamsOauthTokenTypeRat"] = "urn:devrev:params:oauth:token-type:rat";
|
|
95
|
+
AuthTokenSubjectTokenType["UrnDevrevParamsOauthTokenTypeRev"] = "urn:devrev:params:oauth:token-type:rev";
|
|
94
96
|
AuthTokenSubjectTokenType["UrnDevrevParamsOauthTokenTypeRevinfo"] = "urn:devrev:params:oauth:token-type:revinfo";
|
|
95
97
|
AuthTokenSubjectTokenType["UrnDevrevParamsOauthTokenTypeSession"] = "urn:devrev:params:oauth:token-type:session";
|
|
96
98
|
AuthTokenSubjectTokenType["UrnDevrevParamsOauthTokenTypeSysu"] = "urn:devrev:params:oauth:token-type:sysu";
|
|
97
99
|
AuthTokenSubjectTokenType["UrnDevrevParamsOauthTokenTypeUserinfo"] = "urn:devrev:params:oauth:token-type:userinfo";
|
|
98
|
-
AuthTokenSubjectTokenType["UrnDevrevParamsOauthTokenTypeUserinfoProfile"] = "urn:devrev:params:oauth:token-type:userinfo:profile";
|
|
99
100
|
AuthTokenSubjectTokenType["UrnIetfParamsOauthTokenTypeJwt"] = "urn:ietf:params:oauth:token-type:jwt";
|
|
100
101
|
})(AuthTokenSubjectTokenType = exports.AuthTokenSubjectTokenType || (exports.AuthTokenSubjectTokenType = {}));
|
|
101
102
|
/** The type of the issued token. Bearer is the only supported token type. */
|
|
@@ -146,10 +147,13 @@ var ErrorBadRequestType;
|
|
|
146
147
|
ErrorBadRequestType["InvalidApiVersion"] = "invalid_api_version";
|
|
147
148
|
ErrorBadRequestType["InvalidEnumValue"] = "invalid_enum_value";
|
|
148
149
|
ErrorBadRequestType["InvalidField"] = "invalid_field";
|
|
150
|
+
ErrorBadRequestType["InvalidId"] = "invalid_id";
|
|
151
|
+
ErrorBadRequestType["MergeWorksError"] = "merge_works_error";
|
|
149
152
|
ErrorBadRequestType["MissingDependency"] = "missing_dependency";
|
|
150
153
|
ErrorBadRequestType["MissingRequiredField"] = "missing_required_field";
|
|
151
154
|
ErrorBadRequestType["ParseError"] = "parse_error";
|
|
152
155
|
ErrorBadRequestType["StaleSchemaFragments"] = "stale_schema_fragments";
|
|
156
|
+
ErrorBadRequestType["UnexpectedIdType"] = "unexpected_id_type";
|
|
153
157
|
ErrorBadRequestType["UnexpectedJsonType"] = "unexpected_json_type";
|
|
154
158
|
ErrorBadRequestType["ValueNotPermitted"] = "value_not_permitted";
|
|
155
159
|
})(ErrorBadRequestType = exports.ErrorBadRequestType || (exports.ErrorBadRequestType = {}));
|
|
@@ -262,6 +266,12 @@ var SlaSummaryStage;
|
|
|
262
266
|
SlaSummaryStage["Running"] = "running";
|
|
263
267
|
SlaSummaryStage["Warning"] = "warning";
|
|
264
268
|
})(SlaSummaryStage = exports.SlaSummaryStage || (exports.SlaSummaryStage = {}));
|
|
269
|
+
/** Type of the SLA. */
|
|
270
|
+
var SlaType;
|
|
271
|
+
(function (SlaType) {
|
|
272
|
+
SlaType["External"] = "external";
|
|
273
|
+
SlaType["Internal"] = "internal";
|
|
274
|
+
})(SlaType = exports.SlaType || (exports.SlaType = {}));
|
|
265
275
|
/** Type of stage validation options when creating an object. */
|
|
266
276
|
var StageValidationOptionForCreate;
|
|
267
277
|
(function (StageValidationOptionForCreate) {
|
|
@@ -363,6 +373,19 @@ var UserType;
|
|
|
363
373
|
UserType["RevUser"] = "rev_user";
|
|
364
374
|
UserType["SysUser"] = "sys_user";
|
|
365
375
|
})(UserType = exports.UserType || (exports.UserType = {}));
|
|
376
|
+
/** Defines the state of the group item. */
|
|
377
|
+
var VistaGroupItemState;
|
|
378
|
+
(function (VistaGroupItemState) {
|
|
379
|
+
VistaGroupItemState["Active"] = "active";
|
|
380
|
+
VistaGroupItemState["Completed"] = "completed";
|
|
381
|
+
VistaGroupItemState["Planned"] = "planned";
|
|
382
|
+
})(VistaGroupItemState = exports.VistaGroupItemState || (exports.VistaGroupItemState = {}));
|
|
383
|
+
/** Type of the group object. */
|
|
384
|
+
var VistaGroupItemType;
|
|
385
|
+
(function (VistaGroupItemType) {
|
|
386
|
+
VistaGroupItemType["Curated"] = "curated";
|
|
387
|
+
VistaGroupItemType["Dynamic"] = "dynamic";
|
|
388
|
+
})(VistaGroupItemType = exports.VistaGroupItemType || (exports.VistaGroupItemType = {}));
|
|
366
389
|
/** The event types that the webhook will receive. */
|
|
367
390
|
var WebhookEventType;
|
|
368
391
|
(function (WebhookEventType) {
|
|
@@ -375,6 +398,9 @@ var WebhookEventType;
|
|
|
375
398
|
WebhookEventType["DevUserCreated"] = "dev_user_created";
|
|
376
399
|
WebhookEventType["DevUserDeleted"] = "dev_user_deleted";
|
|
377
400
|
WebhookEventType["DevUserUpdated"] = "dev_user_updated";
|
|
401
|
+
WebhookEventType["GroupCreated"] = "group_created";
|
|
402
|
+
WebhookEventType["GroupDeleted"] = "group_deleted";
|
|
403
|
+
WebhookEventType["GroupUpdated"] = "group_updated";
|
|
378
404
|
WebhookEventType["PartCreated"] = "part_created";
|
|
379
405
|
WebhookEventType["PartDeleted"] = "part_deleted";
|
|
380
406
|
WebhookEventType["PartUpdated"] = "part_updated";
|
|
@@ -842,6 +868,23 @@ class Api extends HttpClient {
|
|
|
842
868
|
* @secure
|
|
843
869
|
*/
|
|
844
870
|
this.devUsersSelfPost = (data, params = {}) => this.request(Object.assign({ path: `/dev-users.self`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
|
|
871
|
+
/**
|
|
872
|
+
* @description OAuth2 authorization callback.
|
|
873
|
+
*
|
|
874
|
+
* @tags keyring
|
|
875
|
+
* @name KeyringsCreateCallback
|
|
876
|
+
* @request GET:/keyrings.authorize
|
|
877
|
+
*/
|
|
878
|
+
this.keyringsCreateCallback = (query, params = {}) => this.request(Object.assign({ path: `/keyrings.authorize`, method: 'GET', query: query }, params));
|
|
879
|
+
/**
|
|
880
|
+
* @description OAuth2 authorization callback.
|
|
881
|
+
*
|
|
882
|
+
* @tags keyring
|
|
883
|
+
* @name KeyringsCreateCallbackPost
|
|
884
|
+
* @request POST:/keyrings.authorize
|
|
885
|
+
* @secure
|
|
886
|
+
*/
|
|
887
|
+
this.keyringsCreateCallbackPost = (data, params = {}) => this.request(Object.assign({ path: `/keyrings.authorize`, method: 'POST', body: data, secure: true, type: ContentType.Json }, params));
|
|
845
888
|
/**
|
|
846
889
|
* @description Creates new [part](https://devrev.ai/docs/product/parts).
|
|
847
890
|
*
|
package/dist/snap-ins/types.d.ts
CHANGED
|
@@ -31,6 +31,10 @@ export type Context = {
|
|
|
31
31
|
* `actor_session_token`: For commands, and snap-kits, where the user is performing some action, this is the token of the user who is performing the action.
|
|
32
32
|
*/
|
|
33
33
|
secrets: Record<string, string>;
|
|
34
|
+
/**
|
|
35
|
+
* The ID of the user on whose behalf the function is being invoked.
|
|
36
|
+
*/
|
|
37
|
+
user_id?: string;
|
|
34
38
|
};
|
|
35
39
|
/**
|
|
36
40
|
* Metadata about the execution of the function.
|
|
@@ -6,6 +6,7 @@ const SOURCE_ID = 'don:integration:dvrv-us-1:devo/TEST-DEVORG:automation/0000000
|
|
|
6
6
|
const SNAP_IN_ID = 'don:integration:dvrv-us-1:devo/TEST-DEVORG:snap_in/00000000-0000-0000-0000-000000000000';
|
|
7
7
|
const SNAP_IN_VERSION_ID = 'don:integration:dvrv-us-1:devo/TEST-DEVORG:snap_in_package/00000000-0000-0000-0000-000000000000';
|
|
8
8
|
const SERVICE_ACCOUNT_ID = 'don:identity:dvrv-us-1:devo/TEST-DEVORG:svcacc/00000000-0000-0000-0000-000000000000';
|
|
9
|
+
const USER_ID = 'don:identity:dvrv-us-1:devo/TEST-DEVORG:devu/123';
|
|
9
10
|
describe('Snap-ins types', () => {
|
|
10
11
|
describe('Context', () => {
|
|
11
12
|
test('should have the required properties', () => {
|
|
@@ -16,6 +17,7 @@ describe('Snap-ins types', () => {
|
|
|
16
17
|
snap_in_version_id: SNAP_IN_VERSION_ID,
|
|
17
18
|
service_account_id: SERVICE_ACCOUNT_ID,
|
|
18
19
|
secrets: { secret1: 'value1', secret2: 'value2' },
|
|
20
|
+
user_id: USER_ID,
|
|
19
21
|
};
|
|
20
22
|
expect(context).toHaveProperty('dev_oid');
|
|
21
23
|
expect(context).toHaveProperty('source_id');
|
|
@@ -23,6 +25,7 @@ describe('Snap-ins types', () => {
|
|
|
23
25
|
expect(context).toHaveProperty('snap_in_version_id');
|
|
24
26
|
expect(context).toHaveProperty('service_account_id');
|
|
25
27
|
expect(context).toHaveProperty('secrets');
|
|
28
|
+
expect(context).toHaveProperty('user_id');
|
|
26
29
|
});
|
|
27
30
|
});
|
|
28
31
|
describe('ExecutionMetadata', () => {
|
|
@@ -60,6 +63,7 @@ describe('Snap-ins types', () => {
|
|
|
60
63
|
snap_in_version_id: SNAP_IN_VERSION_ID,
|
|
61
64
|
service_account_id: SERVICE_ACCOUNT_ID,
|
|
62
65
|
secrets: { secret1: 'value1', secret2: 'value2' },
|
|
66
|
+
user_id: USER_ID,
|
|
63
67
|
},
|
|
64
68
|
execution_metadata: {
|
|
65
69
|
request_id: 'request-123',
|