@devrev/typescript-sdk 1.1.68 → 1.1.69
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 +1062 -411
- package/dist/auto-generated/beta/beta-devrev-sdk.js +123 -4
- package/dist/auto-generated/public-devrev-sdk.d.ts +958 -305
- package/dist/auto-generated/public-devrev-sdk.js +82 -3
- package/dist/tests/beta-devrev-sdk-util.test.js +12 -4
- package/dist/tests/error.test.js +7 -0
- package/package.json +2 -2
|
@@ -33,9 +33,9 @@ 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.
|
|
37
|
-
exports.
|
|
38
|
-
exports.Api = exports.HttpClient = exports.ContentType = exports.WorksVistaGroupItemType = exports.WorkType = exports.WebhooksUpdateAction = exports.WebhookStatus = exports.WebhookEventType = exports.WebCrawlerJobsControlRequestAction = exports.WebCrawlerJobState = exports.VistaType = exports.VistaGroupItemType = exports.VistaGroupItemState = exports.VistaGroupItemGroupObjectType = exports.VistaFlavor = exports.UserType = exports.UserState = exports.TimelineEntryVisibility = exports.TimelineEntryType = exports.TimelineEntryObjectType = void 0;
|
|
36
|
+
exports.GroupMemberType = exports.GroupItemType = exports.GroupIngestionSource = exports.EventTimelineEntryUpdatedReactionAction = exports.EventFetchedResult = exports.ErrorUnauthorizedType = exports.ErrorTooManyRequestsType = exports.ErrorServiceUnavailableType = exports.ErrorNotFoundType = exports.ErrorInternalServerErrorType = exports.ErrorForbiddenType = exports.ErrorConflictType = exports.ErrorBadRequestWorkflowComponentValidationErrorWorkflowComponentValidationLocationType = exports.ErrorBadRequestUnexpectedJsonTypeType = exports.ErrorBadRequestType = exports.ErrorBadRequestCustomizationValidationErrorSubtype = exports.DynamicVistaFilterType = exports.DevUsersCreateRequestStateEnumValue = exports.DevUserJobTitle = exports.DevOrgAuthConnectionsUpdateRequestType = exports.DevOrgAuthConnectionsCreateRequestType = exports.Definedness = exports.DateTimePresetType = exports.DateFilterType = exports.CustomSchemaFragmentsSetRequestType = exports.CustomSchemaFragmentsListRequestPrune = exports.ConversationsVistaGroupItemType = exports.ConversationsCreateRequestTypeValue = exports.ConfigurationProrationBehavior = exports.ConfigurationCollectionMethod = exports.CommandSurfaceSurface = exports.CommandSurfaceObjectTypes = exports.CommandStatus = exports.CommandActionTemplateType = exports.CommandActionExecutorType = exports.CodeChangeSource = exports.BooleanExpressionType = exports.AuthTokenTokenType = exports.AuthTokenSubjectTokenType = exports.AuthTokenStatus = exports.AuthTokenRequestedTokenType = exports.AuthTokenGrantType = exports.AuthConnectionType = exports.AuthConnectionToggle = exports.AtomType = exports.ArtifactConfigurationSet = exports.ArticleType = exports.ArticleStatus = exports.ArticleContentFormat = exports.AccessLevel = void 0;
|
|
37
|
+
exports.SyncMetadataFilterSyncOutFilterStatus = exports.SyncMetadataFilterSyncInFilterStatus = exports.StockSchemaFragmentsListRequestPrune = exports.StockSchemaFragmentsListRequestFilterPreset = exports.StageValidationOptionForUpdate = exports.StageValidationOptionForCreate = exports.SnapKitActionRequestElementTypeValue = exports.SlasFilterAppliesToOperatorType = exports.SlaType = exports.SlaTrackerAppliesToType = exports.SlaSummaryStage = exports.SlaStatus = exports.SlaSelectorSeverity = exports.SlaSelectorPriority = exports.SlaSelectorAppliesTo = exports.SlaEvaluationPeriod = exports.SlaAppliesTo = exports.SkuType = exports.SkuState = exports.ServicePlanStatus = exports.ServicePlanBillingCycle = exports.SchemasSubtypePrepareUpdateGetResponseConflictType = exports.SchemaFieldDescriptorFieldType = exports.SchemaFieldDescriptorArrayTypeBaseType = exports.ReactionsUpdateRequestAction = exports.QuestionAnswerStatus = exports.PricingBillingCycle = exports.PartsVistaGroupItemType = exports.PartType = exports.OrgType = exports.OrgScheduleStatus = exports.OrgScheduleFragmentStatus = exports.OrgEnvironment = exports.MetricTrackerType = exports.MetricDefinitionStatus = exports.MetricDefinitionMetricType = exports.MetricDefinitionAppliesTo = exports.MetricActionExecuteRequestAction = exports.MemberType = exports.MeetingState = exports.MeetingDirection = exports.MeetingChannel = exports.ListMode = exports.LinksDirection = exports.LinkType = exports.LinkEndpointType = exports.IssuePriority = exports.GroupedVistaFlavor = exports.GroupedVistaFilterType = exports.GroupType = void 0;
|
|
38
|
+
exports.Api = exports.HttpClient = exports.ContentType = exports.WorksVistaGroupItemType = exports.WorkType = exports.WebhooksUpdateAction = exports.WebhookStatus = exports.WebhookEventType = exports.WebCrawlerJobsControlRequestAction = exports.WebCrawlerJobState = exports.VistaType = exports.VistaGroupItemType = exports.VistaGroupItemState = exports.VistaGroupItemGroupObjectType = exports.VistaFlavor = exports.UserType = exports.UserState = exports.TimelineEntryVisibility = exports.TimelineEntryType = exports.TimelineEntryObjectType = exports.TimelineEntriesUpdateRequestType = exports.TimelineEntriesCreateRequestType = exports.TimelineEntriesCollection = exports.TimelineCommentBodyType = exports.TimeMetricTrackerStatus = exports.TicketSeverity = exports.TicketChannels = exports.SyncRunMode = exports.SyncProgressState = void 0;
|
|
39
39
|
var AccessLevel;
|
|
40
40
|
(function (AccessLevel) {
|
|
41
41
|
AccessLevel["External"] = "external";
|
|
@@ -237,6 +237,25 @@ var CommandSurfaceSurface;
|
|
|
237
237
|
CommandSurfaceSurface["CustomerChat"] = "customer_chat";
|
|
238
238
|
CommandSurfaceSurface["Discussions"] = "discussions";
|
|
239
239
|
})(CommandSurfaceSurface = exports.CommandSurfaceSurface || (exports.CommandSurfaceSurface = {}));
|
|
240
|
+
/**
|
|
241
|
+
* Charge collection strategy for the service plan. Defaults to
|
|
242
|
+
* charge_automatically.
|
|
243
|
+
*/
|
|
244
|
+
var ConfigurationCollectionMethod;
|
|
245
|
+
(function (ConfigurationCollectionMethod) {
|
|
246
|
+
ConfigurationCollectionMethod["ChargeAutomatically"] = "charge_automatically";
|
|
247
|
+
ConfigurationCollectionMethod["SendInvoice"] = "send_invoice";
|
|
248
|
+
})(ConfigurationCollectionMethod = exports.ConfigurationCollectionMethod || (exports.ConfigurationCollectionMethod = {}));
|
|
249
|
+
/**
|
|
250
|
+
* Determines how to handle prorations resulting from the billing_date. If
|
|
251
|
+
* no value is passed, the default is create_prorations.
|
|
252
|
+
*/
|
|
253
|
+
var ConfigurationProrationBehavior;
|
|
254
|
+
(function (ConfigurationProrationBehavior) {
|
|
255
|
+
ConfigurationProrationBehavior["AlwaysInvoice"] = "always_invoice";
|
|
256
|
+
ConfigurationProrationBehavior["CreateProrations"] = "create_prorations";
|
|
257
|
+
ConfigurationProrationBehavior["None"] = "none";
|
|
258
|
+
})(ConfigurationProrationBehavior = exports.ConfigurationProrationBehavior || (exports.ConfigurationProrationBehavior = {}));
|
|
240
259
|
var ConversationsCreateRequestTypeValue;
|
|
241
260
|
(function (ConversationsCreateRequestTypeValue) {
|
|
242
261
|
ConversationsCreateRequestTypeValue["Support"] = "support";
|
|
@@ -659,6 +678,13 @@ var PartsVistaGroupItemType;
|
|
|
659
678
|
PartsVistaGroupItemType["Curated"] = "curated";
|
|
660
679
|
PartsVistaGroupItemType["Dynamic"] = "dynamic";
|
|
661
680
|
})(PartsVistaGroupItemType = exports.PartsVistaGroupItemType || (exports.PartsVistaGroupItemType = {}));
|
|
681
|
+
/** Billing frequency of the SKU. */
|
|
682
|
+
var PricingBillingCycle;
|
|
683
|
+
(function (PricingBillingCycle) {
|
|
684
|
+
PricingBillingCycle["Monthly"] = "monthly";
|
|
685
|
+
PricingBillingCycle["OneTime"] = "one_time";
|
|
686
|
+
PricingBillingCycle["Yearly"] = "yearly";
|
|
687
|
+
})(PricingBillingCycle = exports.PricingBillingCycle || (exports.PricingBillingCycle = {}));
|
|
662
688
|
/** Status of the question answer. */
|
|
663
689
|
var QuestionAnswerStatus;
|
|
664
690
|
(function (QuestionAnswerStatus) {
|
|
@@ -715,6 +741,46 @@ var SchemasSubtypePrepareUpdateGetResponseConflictType;
|
|
|
715
741
|
SchemasSubtypePrepareUpdateGetResponseConflictType["AbsentInOld"] = "absent_in_old";
|
|
716
742
|
SchemasSubtypePrepareUpdateGetResponseConflictType["IncompatibleType"] = "incompatible_type";
|
|
717
743
|
})(SchemasSubtypePrepareUpdateGetResponseConflictType = exports.SchemasSubtypePrepareUpdateGetResponseConflictType || (exports.SchemasSubtypePrepareUpdateGetResponseConflictType = {}));
|
|
744
|
+
/** The billing frequency of the service plan. */
|
|
745
|
+
var ServicePlanBillingCycle;
|
|
746
|
+
(function (ServicePlanBillingCycle) {
|
|
747
|
+
ServicePlanBillingCycle["Monthly"] = "monthly";
|
|
748
|
+
})(ServicePlanBillingCycle = exports.ServicePlanBillingCycle || (exports.ServicePlanBillingCycle = {}));
|
|
749
|
+
/**
|
|
750
|
+
* The status of the service plan indicates its current state. If the
|
|
751
|
+
* status is 'active,' it means the service plan items are in use and
|
|
752
|
+
* billed every cycle. If the status is 'cancelled,' it signifies that the
|
|
753
|
+
* service plan has been terminated and is no longer active or considered
|
|
754
|
+
* for billing.
|
|
755
|
+
*/
|
|
756
|
+
var ServicePlanStatus;
|
|
757
|
+
(function (ServicePlanStatus) {
|
|
758
|
+
ServicePlanStatus["Active"] = "active";
|
|
759
|
+
ServicePlanStatus["Cancelled"] = "cancelled";
|
|
760
|
+
ServicePlanStatus["Paused"] = "paused";
|
|
761
|
+
})(ServicePlanStatus = exports.ServicePlanStatus || (exports.ServicePlanStatus = {}));
|
|
762
|
+
/**
|
|
763
|
+
* Current state of the SKU. A SKU is visible to RevOs only when it is
|
|
764
|
+
* released.
|
|
765
|
+
*/
|
|
766
|
+
var SkuState;
|
|
767
|
+
(function (SkuState) {
|
|
768
|
+
SkuState["Approved"] = "approved";
|
|
769
|
+
SkuState["Draft"] = "draft";
|
|
770
|
+
SkuState["EndOfLife"] = "end_of_life";
|
|
771
|
+
SkuState["EndOfSale"] = "end_of_sale";
|
|
772
|
+
SkuState["Released"] = "released";
|
|
773
|
+
})(SkuState = exports.SkuState || (exports.SkuState = {}));
|
|
774
|
+
/** It defines the type of SKU. */
|
|
775
|
+
var SkuType;
|
|
776
|
+
(function (SkuType) {
|
|
777
|
+
SkuType["Consumption"] = "consumption";
|
|
778
|
+
SkuType["ConsumptionAddon"] = "consumption_addon";
|
|
779
|
+
SkuType["OneOffAddon"] = "one_off_addon";
|
|
780
|
+
SkuType["OneOffCharge"] = "one_off_charge";
|
|
781
|
+
SkuType["Subscription"] = "subscription";
|
|
782
|
+
SkuType["SubscriptionAddon"] = "subscription_addon";
|
|
783
|
+
})(SkuType = exports.SkuType || (exports.SkuType = {}));
|
|
718
784
|
/**
|
|
719
785
|
* The object types on which the SLA applies. An external SLA can apply to
|
|
720
786
|
* multiple object types, but an internal SLA can apply to only one object
|
|
@@ -891,6 +957,13 @@ var TicketSeverity;
|
|
|
891
957
|
TicketSeverity["Low"] = "low";
|
|
892
958
|
TicketSeverity["Medium"] = "medium";
|
|
893
959
|
})(TicketSeverity = exports.TicketSeverity || (exports.TicketSeverity = {}));
|
|
960
|
+
/** The current status of the metric. */
|
|
961
|
+
var TimeMetricTrackerStatus;
|
|
962
|
+
(function (TimeMetricTrackerStatus) {
|
|
963
|
+
TimeMetricTrackerStatus["Completed"] = "completed";
|
|
964
|
+
TimeMetricTrackerStatus["Paused"] = "paused";
|
|
965
|
+
TimeMetricTrackerStatus["Running"] = "running";
|
|
966
|
+
})(TimeMetricTrackerStatus = exports.TimeMetricTrackerStatus || (exports.TimeMetricTrackerStatus = {}));
|
|
894
967
|
/** The type of the body to use for the comment. */
|
|
895
968
|
var TimelineCommentBodyType;
|
|
896
969
|
(function (TimelineCommentBodyType) {
|
|
@@ -899,6 +972,12 @@ var TimelineCommentBodyType;
|
|
|
899
972
|
TimelineCommentBodyType["SnapWidget"] = "snap_widget";
|
|
900
973
|
TimelineCommentBodyType["Text"] = "text";
|
|
901
974
|
})(TimelineCommentBodyType = exports.TimelineCommentBodyType || (exports.TimelineCommentBodyType = {}));
|
|
975
|
+
/** Describes collections of timeline entries. */
|
|
976
|
+
var TimelineEntriesCollection;
|
|
977
|
+
(function (TimelineEntriesCollection) {
|
|
978
|
+
TimelineEntriesCollection["Discussions"] = "discussions";
|
|
979
|
+
TimelineEntriesCollection["Events"] = "events";
|
|
980
|
+
})(TimelineEntriesCollection = exports.TimelineEntriesCollection || (exports.TimelineEntriesCollection = {}));
|
|
902
981
|
var TimelineEntriesCreateRequestType;
|
|
903
982
|
(function (TimelineEntriesCreateRequestType) {
|
|
904
983
|
TimelineEntriesCreateRequestType["TimelineComment"] = "timeline_comment";
|
|
@@ -13,7 +13,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
jest.mock('axios');
|
|
16
|
-
|
|
16
|
+
// Create shared mock instance outside the mock factory
|
|
17
|
+
const mockFormDataInstance = {
|
|
18
|
+
append: jest.fn(),
|
|
19
|
+
getHeaders: jest.fn(() => ({ 'content-type': 'multipart/form-data; boundary=---test---' })),
|
|
20
|
+
};
|
|
21
|
+
jest.mock('form-data', () => {
|
|
22
|
+
return jest.fn().mockImplementation(() => mockFormDataInstance);
|
|
23
|
+
});
|
|
17
24
|
const axios_1 = __importDefault(require("axios"));
|
|
18
25
|
const form_data_1 = __importDefault(require("form-data"));
|
|
19
26
|
const stream_1 = require("stream");
|
|
@@ -30,6 +37,8 @@ describe('BetaSDKUtil', () => {
|
|
|
30
37
|
};
|
|
31
38
|
betaSDKUtil = new beta_devrev_sdk_util_1.BetaSdkUtil(mockDevrevBetaSdk);
|
|
32
39
|
jest.clearAllMocks();
|
|
40
|
+
form_data_1.default.mockClear();
|
|
41
|
+
mockFormDataInstance.append.mockClear();
|
|
33
42
|
});
|
|
34
43
|
describe('getAllRevUsersFromAccount', () => {
|
|
35
44
|
it('should retrieve all rev users for a given account', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -203,9 +212,8 @@ describe('BetaSDKUtil', () => {
|
|
|
203
212
|
expect(result).toBe('artifactId');
|
|
204
213
|
// Verify FormData handling
|
|
205
214
|
expect(form_data_1.default).toHaveBeenCalled();
|
|
206
|
-
|
|
207
|
-
expect(
|
|
208
|
-
expect(formDataInstance.append).toHaveBeenCalledWith('file', expect.any(stream_1.Readable), expect.any(Object));
|
|
215
|
+
expect(mockFormDataInstance.append).toHaveBeenCalledWith('key1', 'value1');
|
|
216
|
+
expect(mockFormDataInstance.append).toHaveBeenCalledWith('file', expect.any(stream_1.Readable), expect.any(Object));
|
|
209
217
|
}));
|
|
210
218
|
});
|
|
211
219
|
});
|
package/dist/tests/error.test.js
CHANGED
|
@@ -52,6 +52,13 @@ describe('handleApiError', () => {
|
|
|
52
52
|
statusText: 'Internal Server Error',
|
|
53
53
|
headers: {},
|
|
54
54
|
};
|
|
55
|
+
// Mock a stack trace that would extract the function name
|
|
56
|
+
mockAxiosError.stack = `Error: Request failed with status code 500
|
|
57
|
+
at createError (/node_modules/axios/lib/core/createError.js:16:15)
|
|
58
|
+
at settle (/node_modules/axios/lib/core/settle.js:17:12)
|
|
59
|
+
at IncomingMessage.handleStreamEnd (/node_modules/axios/lib/adapters/http.js:269:11)
|
|
60
|
+
at async runTestInternal
|
|
61
|
+
at process.processTicksAndRejections (node:internal/process/task_queues.js:95:5)`;
|
|
55
62
|
(0, error_2.handleApiError)(mockAxiosError);
|
|
56
63
|
const expectedLog = [
|
|
57
64
|
'\n=== Error Details ===',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devrev/typescript-sdk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.69",
|
|
4
4
|
"description": "## SDK Generation",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@types/yargs": "^17.0.22",
|
|
47
|
-
"axios": "^1.
|
|
47
|
+
"axios": "^1.12.0",
|
|
48
48
|
"dotenv": "^16.0.3",
|
|
49
49
|
"protobufjs": "^7.3.0",
|
|
50
50
|
"yargs": "^17.6.2"
|