octopian-apis 1.0.27 → 1.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "octopian-apis",
3
- "version": "1.0.27",
3
+ "version": "1.0.29",
4
4
  "description": "Transaction APIs SDK that implements Octopian Services which will be used for any node project typescript or javascript",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
@@ -671,6 +671,23 @@ export async function AddRequest(AddRequestDTO, AuthToken = null, Timeout = 3000
671
671
  );
672
672
  return APIResponse;
673
673
  }
674
+
675
+ export async function AddRequestAndSubmit(AddRequestDTO, AuthToken = null, Timeout = 30000) {
676
+ let APIResponse = await apiHandler.PostMethod(
677
+ RequestsAPIConstants.uriAddRequest(),
678
+ AddRequestDTO,
679
+ AuthToken,
680
+ Timeout
681
+ );
682
+
683
+ await SubmitCart({
684
+ specificRequestIds: [APIResponse.Result.RequestId],
685
+ ShippingAddressId: 0,
686
+ BillingAddressId: 0,
687
+ PaymentMethod: "CashOnDelivery",
688
+ });
689
+ return APIResponse;
690
+ }
674
691
  /**
675
692
  * @description
676
693
  * Submits the cart with the given details.
@@ -1421,7 +1421,7 @@ export async function DABGetPaymentURL(
1421
1421
  );
1422
1422
  if (addrequestResult.StatusCode === 200 && isAddToCart) {
1423
1423
  DABSubmitCart({
1424
- RequestId: addrequestResult.Result.RequestId,
1424
+ specificRequestIds: [addrequestResult.Result.RequestId],
1425
1425
  ShippingAddressId: 0,
1426
1426
  BillingAddressId: 0,
1427
1427
  PaymentMethod: "Card",
package/src/index.d.ts CHANGED
@@ -4392,6 +4392,34 @@ interface RequestsRequesterServices {
4392
4392
  AuthToken?: string | null,
4393
4393
  Timeout?: number | null
4394
4394
  ) => BaseResponse<AddRequestOutput | BaseErrorResponse>;
4395
+
4396
+ /**
4397
+ * @description
4398
+ * Adds a request and submits it.
4399
+ *
4400
+ * @param {RequesterAddRequestInput} AddRequestDTO
4401
+ * Data object containing fields necessary for adding a request.
4402
+ *
4403
+ * @param {string} AuthToken
4404
+ * Authentication token for authorization purposes.
4405
+ *
4406
+ * @param {number} Timeout
4407
+ * Time in milliseconds to wait before the request times out. Default is 30000.
4408
+ *
4409
+ * @returns
4410
+ * An object containing the response from the Add Request and Submit request, including
4411
+ * success message, status code, and any additional data returned by the API.
4412
+ * {
4413
+ * Message: Success,
4414
+ * StatusCode: 200,
4415
+ * Result: AddRequestOutput
4416
+ * }
4417
+ */
4418
+ AddRequestAndSubmit: (
4419
+ Input: RequesterAddRequestInput,
4420
+ AuthToken?: string | null,
4421
+ Timeout?: number | null
4422
+ ) => BaseResponse<AddRequestOutput | BaseErrorResponse>;
4395
4423
  /**
4396
4424
  * @description
4397
4425
  * Cancels the draft requests by sending a POST request with the provided cancellation data.
package/src/index.js CHANGED
@@ -243,6 +243,7 @@ const {
243
243
  AgentMaintainInteractorAttributeList,
244
244
  AgentSubmitCart,
245
245
  AddRequest,
246
+ AddRequestAndSubmit,
246
247
  CancelDraftRequestList,
247
248
  CancelRequest,
248
249
  GetCartDefinition,
@@ -288,6 +289,7 @@ const RequestsDispatchServices = {
288
289
  const RequestsRequesterServices = {
289
290
  AgentAddRequest,
290
291
  AddRequest,
292
+ AddRequestAndSubmit,
291
293
  CancelDraftRequestList,
292
294
  CancelRequest,
293
295
  GetCartDefinition,
@@ -246,13 +246,103 @@ export interface CompositeRequestStep {
246
246
  }
247
247
 
248
248
  export interface RequestAttribute {
249
+ IsSystemGenerated: any
250
+ DtoState: number
249
251
  RequestAttributeId: number
250
252
  RequestId: number
251
253
  Name: string
252
254
  IsRequired: boolean
253
- Value: string
255
+ Value?: string
254
256
  AttributeTypeId: number
255
257
  AttributeGroupId: number
258
+ IsRequesterVisible: boolean
259
+ IsProviderVisible: boolean
260
+ IsRequesterEditable: boolean
261
+ IsProviderEditable: boolean
262
+ RequestStepId: any
263
+ SequenceNo: number
264
+ IsComputed: boolean
265
+ Formula: string
266
+ SourceServiceAttributeId?: number
267
+ Group: string
268
+ GroupSequenceNo: number
269
+ ExtendedValue?: string
270
+ GroupId: number
271
+ AttachmentOriginalName: string
272
+ AlternateName?: string
273
+ AlternateValue?: string
274
+ AlternateGroup?: string
275
+ Alias: string
276
+ PlaceHolder?: string
277
+ ShowInReport: boolean
278
+ Description?: string
279
+ AlternateDescription: any
280
+ AlternatePlaceHolder: any
281
+ Prefix?: string
282
+ IsFiltered: boolean
283
+ FilterAttributeAlias?: string
284
+ IsParameter: boolean
285
+ Extra1: any
286
+ Extra2: any
287
+ BatchId: any
288
+ IsComputedInitialValue: boolean
289
+ InitialValueFormula?: string
290
+ IsValidationEnabled: boolean
291
+ ValidationRule?: string
292
+ ValidationRuleFailedComment?: string
293
+ IsIntegrationEditable: boolean
294
+ IsRequiredCondition?: string
295
+ OnChangeRecalculate: boolean
296
+ PageNumber: number
297
+ AttributeTypeValueTypeName: string
298
+ FormatCategoryId: number
299
+ FormatTypeName: string
300
+ Hint?: string
301
+ HideLabel: boolean
302
+ IsIntegration: boolean
303
+ IsRecord: boolean
304
+ IsRecordName: boolean
305
+ Regex?: string
306
+ ReturnType?: string
307
+ CounterMaxValue?: string
308
+ CounterMinValue?: string
309
+ CounterStepValue?: string
310
+ HideValue: boolean
311
+ IsPicker: boolean
312
+ AttributeLength?: string
313
+ ShowInQuestionnaire: boolean
314
+ IsMultipleChoice: boolean
315
+ AttributeDefinition: any
316
+ IsPasswordMask: boolean
317
+ IsEncryptionEnabled: boolean
318
+ AllowOthers: boolean
319
+ UseGridControl: boolean
320
+ UIControlAlias?: string
321
+ ShowInProfile: boolean
322
+ ObjectType: number
323
+ DocumentId: number
324
+ FormatTypeId: number
325
+ Translations?: string
326
+ DescriptionTranslations?: string
327
+ PlaceHolderTranslations?: string
328
+ ValueTranslations?: string
329
+ ValidationRuleFailedCommentTranslation?: string
330
+ GroupTranslations: any
331
+ HintTranslations: any
332
+ IsProfileDocument: any
333
+ IsRequesterEditableCondition?: string
334
+ IsProviderEditableCondition?: string
335
+ IsResetIf: boolean
336
+ ResetIfFormula?: string
337
+ FullFilePath: any
338
+ CopyToRequest: any
339
+ UseInService: boolean
340
+ IsPhantomVisible: any
341
+ IsAsynchronousIntegration: boolean
342
+ ApplyToExisting: boolean
343
+ FullImagePath: any
344
+ IsActionAttribute: any
345
+ ActionAttributeDetails: any
256
346
  }
257
347
 
258
348
  export interface RequestIntegrationTrigger {