@epilot/erp-integration-client 0.26.3 → 0.27.1

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/openapi.d.ts CHANGED
@@ -209,7 +209,7 @@ declare namespace Components {
209
209
  * URL-safe identifier for the use case. Recommended for portable cross-environment referencing. Must be unique per integration. Immutable after creation. Lowercase alphanumeric, hyphens, and underscores only.
210
210
  *
211
211
  */
212
- slug: string; // ^[a-z0-9][a-z0-9_-]*$
212
+ slug?: string; // ^[a-z0-9][a-z0-9_-]*$
213
213
  /**
214
214
  * Whether the use case is enabled
215
215
  */
@@ -237,7 +237,7 @@ declare namespace Components {
237
237
  * URL-safe identifier for the use case. Recommended for portable cross-environment referencing. Must be unique per integration. Immutable after creation. Lowercase alphanumeric, hyphens, and underscores only.
238
238
  *
239
239
  */
240
- slug: string; // ^[a-z0-9][a-z0-9_-]*$
240
+ slug?: string; // ^[a-z0-9][a-z0-9_-]*$
241
241
  /**
242
242
  * Whether the use case is enabled
243
243
  */
@@ -280,7 +280,7 @@ declare namespace Components {
280
280
  * URL-safe identifier for the use case. Recommended for portable cross-environment referencing. Must be unique per integration. Immutable after creation. Lowercase alphanumeric, hyphens, and underscores only.
281
281
  *
282
282
  */
283
- slug: string; // ^[a-z0-9][a-z0-9_-]*$
283
+ slug?: string; // ^[a-z0-9][a-z0-9_-]*$
284
284
  /**
285
285
  * Whether the use case is enabled
286
286
  */
@@ -301,7 +301,7 @@ declare namespace Components {
301
301
  * URL-safe identifier for the use case. Recommended for portable cross-environment referencing. Must be unique per integration. Immutable after creation. Lowercase alphanumeric, hyphens, and underscores only.
302
302
  *
303
303
  */
304
- slug: string; // ^[a-z0-9][a-z0-9_-]*$
304
+ slug?: string; // ^[a-z0-9][a-z0-9_-]*$
305
305
  /**
306
306
  * Whether the use case is enabled
307
307
  */
@@ -505,9 +505,10 @@ declare namespace Components {
505
505
  */
506
506
  deduplication_id?: string; // ^[a-zA-Z0-9_-]+$
507
507
  }
508
- export interface ErpEventV3 {
508
+ export type ErpEventV3 = {
509
509
  /**
510
- * Name of the event (e.g., business_partner, contract_account). Corresponds to the "Event Name" from the integration UI. Replaces object_type from V2.
510
+ * Event name from integration mapping (e.g., business_partner, contract_account). Required when use_case_slug is not provided.
511
+ *
511
512
  */
512
513
  event_name: string;
513
514
  /**
@@ -536,7 +537,39 @@ declare namespace Components {
536
537
  * evt-2025-05-01-12345-bp
537
538
  */
538
539
  deduplication_id?: string; // ^[a-zA-Z0-9_-]+$
539
- }
540
+ } | {
541
+ /**
542
+ * Event name from integration mapping (e.g., business_partner, contract_account). Required when use_case_slug is not provided.
543
+ *
544
+ */
545
+ event_name?: string;
546
+ /**
547
+ * Timestamp when the event occurred
548
+ */
549
+ timestamp: string; // date-time
550
+ /**
551
+ * Format of the payload data
552
+ */
553
+ format: "json" | "xml";
554
+ /**
555
+ * The object data payload - can be either a serialized string or a direct JSON object
556
+ */
557
+ payload: /* The object data payload - can be either a serialized string or a direct JSON object */ string | {
558
+ [name: string]: any;
559
+ };
560
+ /**
561
+ * Recommended. Use case slug for routing this event to the correct use case configuration. If provided, takes precedence over event_name for use case lookup. Preferred over event_name-based routing as slugs are portable across environments.
562
+ *
563
+ */
564
+ use_case_slug: string; // ^[a-z0-9][a-z0-9_-]*$
565
+ /**
566
+ * Optional unique identifier for idempotency - prevents duplicate processing of the same event within 24 hours in context of the same integration. Must contain only alphanumeric characters, hyphens, and underscores.
567
+ *
568
+ * example:
569
+ * evt-2025-05-01-12345-bp
570
+ */
571
+ deduplication_id?: string; // ^[a-zA-Z0-9_-]+$
572
+ };
540
573
  export interface ErpUpdatesEventsV2Request {
541
574
  /**
542
575
  * UUID that identifies the integration configuration to use
@@ -596,6 +629,32 @@ declare namespace Components {
596
629
  * Optional OAuth2 scope
597
630
  */
598
631
  scope?: string;
632
+ /**
633
+ * Handlebars template for the OAuth2 audience parameter
634
+ */
635
+ audience?: string;
636
+ /**
637
+ * Handlebars template for the OAuth2 resource parameter
638
+ */
639
+ resource?: string;
640
+ /**
641
+ * Additional key-value pairs to include in the token request body. Values support Handlebars templates.
642
+ */
643
+ body_params?: {
644
+ [name: string]: string;
645
+ };
646
+ /**
647
+ * Additional headers to include in the token request. Values support Handlebars templates.
648
+ */
649
+ headers?: {
650
+ [name: string]: string;
651
+ };
652
+ /**
653
+ * Additional query parameters to append to the token URL. Values support Handlebars templates.
654
+ */
655
+ query_params?: {
656
+ [name: string]: string;
657
+ };
599
658
  }
600
659
  export interface FileProxyParam {
601
660
  /**
package/dist/openapi.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.0.3",
3
3
  "info": {
4
4
  "title": "ERP Integration API",
5
- "version": "0.44.0",
5
+ "version": "0.45.0",
6
6
  "description": "API for integrating with ERP systems, handling tracking acknowledgments, triggering ERP processes, and processing ERP updates."
7
7
  },
8
8
  "tags": [
@@ -2364,15 +2364,26 @@
2364
2364
  "ErpEventV3": {
2365
2365
  "type": "object",
2366
2366
  "required": [
2367
- "event_name",
2368
2367
  "timestamp",
2369
2368
  "format",
2370
2369
  "payload"
2371
2370
  ],
2371
+ "anyOf": [
2372
+ {
2373
+ "required": [
2374
+ "event_name"
2375
+ ]
2376
+ },
2377
+ {
2378
+ "required": [
2379
+ "use_case_slug"
2380
+ ]
2381
+ }
2382
+ ],
2372
2383
  "properties": {
2373
2384
  "event_name": {
2374
2385
  "type": "string",
2375
- "description": "Name of the event (e.g., business_partner, contract_account). Corresponds to the \"Event Name\" from the integration UI. Replaces object_type from V2."
2386
+ "description": "Event name from integration mapping (e.g., business_partner, contract_account). Required when use_case_slug is not provided.\n"
2376
2387
  },
2377
2388
  "timestamp": {
2378
2389
  "type": "string",
@@ -3432,7 +3443,6 @@
3432
3443
  "type": "object",
3433
3444
  "required": [
3434
3445
  "name",
3435
- "slug",
3436
3446
  "type",
3437
3447
  "enabled"
3438
3448
  ],
@@ -3871,6 +3881,35 @@
3871
3881
  "scope": {
3872
3882
  "type": "string",
3873
3883
  "description": "Optional OAuth2 scope"
3884
+ },
3885
+ "audience": {
3886
+ "type": "string",
3887
+ "description": "Handlebars template for the OAuth2 audience parameter"
3888
+ },
3889
+ "resource": {
3890
+ "type": "string",
3891
+ "description": "Handlebars template for the OAuth2 resource parameter"
3892
+ },
3893
+ "body_params": {
3894
+ "type": "object",
3895
+ "additionalProperties": {
3896
+ "type": "string"
3897
+ },
3898
+ "description": "Additional key-value pairs to include in the token request body. Values support Handlebars templates."
3899
+ },
3900
+ "headers": {
3901
+ "type": "object",
3902
+ "additionalProperties": {
3903
+ "type": "string"
3904
+ },
3905
+ "description": "Additional headers to include in the token request. Values support Handlebars templates."
3906
+ },
3907
+ "query_params": {
3908
+ "type": "object",
3909
+ "additionalProperties": {
3910
+ "type": "string"
3911
+ },
3912
+ "description": "Additional query parameters to append to the token URL. Values support Handlebars templates."
3874
3913
  }
3875
3914
  }
3876
3915
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/erp-integration-client",
3
- "version": "0.26.3",
3
+ "version": "0.27.1",
4
4
  "description": "Client library for ePilot ERP Integration API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",