@forge/teamwork-graph 1.2.0-next.4 → 2.0.0-next.6

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.
Files changed (37) hide show
  1. package/out/__test__/entity-operations.test.js +616 -0
  2. package/out/types/entities/branch.d.ts +14 -0
  3. package/out/types/entities/branch.d.ts.map +1 -0
  4. package/out/types/entities/branch.js +2 -0
  5. package/out/types/entities/build.d.ts +33 -0
  6. package/out/types/entities/build.d.ts.map +1 -0
  7. package/out/types/entities/build.js +2 -0
  8. package/out/types/entities/calendar-event.d.ts +45 -0
  9. package/out/types/entities/calendar-event.d.ts.map +1 -0
  10. package/out/types/entities/calendar-event.js +2 -0
  11. package/out/types/entities/comment.d.ts +18 -0
  12. package/out/types/entities/comment.d.ts.map +1 -0
  13. package/out/types/entities/comment.js +2 -0
  14. package/out/types/entities/commit.d.ts +26 -0
  15. package/out/types/entities/commit.d.ts.map +1 -0
  16. package/out/types/entities/commit.js +2 -0
  17. package/out/types/entities/conversation.d.ts +28 -0
  18. package/out/types/entities/conversation.d.ts.map +1 -0
  19. package/out/types/entities/conversation.js +2 -0
  20. package/out/types/entities/customer-org.d.ts +36 -0
  21. package/out/types/entities/customer-org.d.ts.map +1 -0
  22. package/out/types/entities/customer-org.js +2 -0
  23. package/out/types/entities/deal.d.ts +37 -0
  24. package/out/types/entities/deal.d.ts.map +1 -0
  25. package/out/types/entities/deal.js +2 -0
  26. package/out/types/entities/deployment.d.ts +43 -0
  27. package/out/types/entities/deployment.d.ts.map +1 -0
  28. package/out/types/entities/deployment.js +2 -0
  29. package/out/types/entities/design.d.ts +15 -0
  30. package/out/types/entities/design.d.ts.map +1 -0
  31. package/out/types/entities/design.js +2 -0
  32. package/out/types/entities/index.d.ts +13 -2
  33. package/out/types/entities/index.d.ts.map +1 -1
  34. package/out/types/entities/position.d.ts +24 -0
  35. package/out/types/entities/position.d.ts.map +1 -0
  36. package/out/types/entities/position.js +2 -0
  37. package/package.json +1 -1
@@ -403,4 +403,620 @@ describe('TeamWorkGraphClient - deleteEntitiesByProperties', () => {
403
403
  it('should throw error when properties object is empty', async () => {
404
404
  await expect(graphClient.deleteEntitiesByProperties({})).rejects.toThrow('properties object cannot be empty');
405
405
  });
406
+ it('posts branch entities to /api/v1/entities/bulk and returns response', async () => {
407
+ const branchEntity = {
408
+ schemaVersion: '2.0',
409
+ id: 'branch-1',
410
+ updateSequenceNumber: 1,
411
+ displayName: 'feature-branch',
412
+ url: 'https://github.com/org/repo/tree/feature-branch',
413
+ createdAt: '2024-07-09T14:27:37.000Z',
414
+ lastUpdatedAt: '2024-07-09T14:27:37.000Z',
415
+ permissions: {
416
+ accessControls: [
417
+ {
418
+ principals: [
419
+ {
420
+ type: 'EVERYONE'
421
+ }
422
+ ]
423
+ }
424
+ ]
425
+ },
426
+ 'atlassian:branch': {}
427
+ };
428
+ const req = { entities: [branchEntity] };
429
+ const expected = { success: true, results: [{ entityId: 'branch-1', success: true }] };
430
+ mockFetch.mockResolvedValueOnce({
431
+ ok: true,
432
+ json: () => Promise.resolve(expected)
433
+ });
434
+ const result = await graphClient.setEntities(req);
435
+ expect(mockFetch).toHaveBeenCalledWith('/graph/connector/api/v1/entities/bulk', expect.objectContaining({ method: 'POST' }));
436
+ expect(result).toEqual(expected);
437
+ });
438
+ it('posts commit entities to /api/v1/entities/bulk and returns response', async () => {
439
+ const commitEntity = {
440
+ schemaVersion: '2.0',
441
+ id: 'commit-1',
442
+ updateSequenceNumber: 1,
443
+ displayName: 'abc123 - Add new feature',
444
+ url: 'https://github.com/org/repo/commit/abc123',
445
+ createdAt: '2024-07-09T14:27:37.000Z',
446
+ lastUpdatedAt: '2024-07-09T14:27:37.000Z',
447
+ permissions: {
448
+ accessControls: [
449
+ {
450
+ principals: [
451
+ {
452
+ type: 'EVERYONE'
453
+ }
454
+ ]
455
+ }
456
+ ]
457
+ },
458
+ 'atlassian:commit': {
459
+ flags: ['flag1', 'flag2'],
460
+ fileCount: 10,
461
+ files: [
462
+ {
463
+ path: 'path/to/file.txt',
464
+ url: 'https://github.com/org/repo/blob/abc123/path/to/file.txt',
465
+ changeType: 'ADDED',
466
+ linesAdded: 10,
467
+ linesRemoved: 5
468
+ }
469
+ ]
470
+ }
471
+ };
472
+ const req = { entities: [commitEntity] };
473
+ const expected = { success: true, results: [{ entityId: 'commit-1', success: true }] };
474
+ mockFetch.mockResolvedValueOnce({
475
+ ok: true,
476
+ json: () => Promise.resolve(expected)
477
+ });
478
+ const result = await graphClient.setEntities(req);
479
+ expect(mockFetch).toHaveBeenCalledWith('/graph/connector/api/v1/entities/bulk', expect.objectContaining({ method: 'POST' }));
480
+ expect(result).toEqual(expected);
481
+ });
482
+ it('posts build entities to /api/v1/entities/bulk and returns response', async () => {
483
+ const buildEntity = {
484
+ schemaVersion: '2.0',
485
+ id: 'build-1',
486
+ updateSequenceNumber: 1,
487
+ displayName: 'Build #42',
488
+ url: 'https://ci.example.com/builds/42',
489
+ createdAt: '2024-07-09T14:27:37.000Z',
490
+ lastUpdatedAt: '2024-07-09T14:27:37.000Z',
491
+ permissions: {
492
+ accessControls: [
493
+ {
494
+ principals: [
495
+ {
496
+ type: 'EVERYONE'
497
+ }
498
+ ]
499
+ }
500
+ ]
501
+ },
502
+ 'atlassian:build': {
503
+ pipelineId: 'pipeline-123',
504
+ buildNumber: 42,
505
+ label: 'Release Build',
506
+ state: 'SUCCESS',
507
+ duration: 300,
508
+ testInfo: {
509
+ totalNumber: 150,
510
+ numberPassed: 145,
511
+ numberFailed: 3,
512
+ numberSkipped: 2
513
+ },
514
+ references: [
515
+ {
516
+ commit: {
517
+ id: 'abc123def456',
518
+ repositoryUri: 'https://github.com/org/repo'
519
+ },
520
+ ref: {
521
+ name: 'main',
522
+ uri: 'https://github.com/org/repo/tree/main'
523
+ }
524
+ }
525
+ ]
526
+ }
527
+ };
528
+ const req = { entities: [buildEntity] };
529
+ const expected = { success: true, results: [{ entityId: 'build-1', success: true }] };
530
+ mockFetch.mockResolvedValueOnce({
531
+ ok: true,
532
+ json: () => Promise.resolve(expected)
533
+ });
534
+ const result = await graphClient.setEntities(req);
535
+ expect(mockFetch).toHaveBeenCalledWith('/graph/connector/api/v1/entities/bulk', expect.objectContaining({ method: 'POST' }));
536
+ expect(result).toEqual(expected);
537
+ });
538
+ it('posts calendar event entities to /api/v1/entities/bulk and returns response', async () => {
539
+ const calendarEventEntity = {
540
+ schemaVersion: '2.0',
541
+ id: 'calendar-event-1',
542
+ updateSequenceNumber: 1,
543
+ displayName: 'Sprint Planning Meeting',
544
+ description: 'Weekly sprint planning session for the development team',
545
+ url: 'https://calendar.google.com/event/abc123',
546
+ createdAt: '2024-07-09T14:27:37.000Z',
547
+ createdBy: {},
548
+ lastUpdatedAt: '2024-07-09T14:27:37.000Z',
549
+ permissions: {
550
+ accessControls: [
551
+ {
552
+ principals: [
553
+ {
554
+ type: 'EVERYONE'
555
+ }
556
+ ]
557
+ }
558
+ ]
559
+ },
560
+ 'atlassian:calendar-event': {
561
+ eventStartTime: '2024-07-10T09:00:00.000Z',
562
+ eventEndTime: '2024-07-10T10:00:00.000Z',
563
+ eventType: 'meeting',
564
+ attendees: [
565
+ {
566
+ user: 'user-123',
567
+ isOptional: false,
568
+ rsvpStatus: 'accepted'
569
+ },
570
+ {
571
+ user: 'user-456',
572
+ isOptional: true,
573
+ rsvpStatus: 'tentatively_accepted'
574
+ }
575
+ ],
576
+ location: {
577
+ name: 'Conference Room A',
578
+ address: '123 Main St, Building 1, Floor 2',
579
+ url: 'https://maps.google.com/conference-room-a',
580
+ coordinates: '40.7128,-74.0060'
581
+ },
582
+ videoMeetingUrl: 'https://meet.google.com/abc-defg-hij',
583
+ videoMeetingProvider: 'Google Meet',
584
+ isAllDayEvent: false,
585
+ attendeeCount: 2,
586
+ exceedsMaxAttendees: false,
587
+ isRecurringEvent: true,
588
+ recurringEventId: 'recurring-123',
589
+ attachments: [
590
+ {
591
+ url: 'https://example.com/agenda.pdf',
592
+ title: 'Meeting Agenda',
593
+ mimeType: 'application/pdf',
594
+ byteSize: 1024
595
+ }
596
+ ]
597
+ }
598
+ };
599
+ const req = { entities: [calendarEventEntity] };
600
+ const expected = { success: true, results: [{ entityId: 'calendar-event-1', success: true }] };
601
+ mockFetch.mockResolvedValueOnce({
602
+ ok: true,
603
+ json: () => Promise.resolve(expected)
604
+ });
605
+ const result = await graphClient.setEntities(req);
606
+ expect(mockFetch).toHaveBeenCalledWith('/graph/connector/api/v1/entities/bulk', expect.objectContaining({ method: 'POST' }));
607
+ expect(result).toEqual(expected);
608
+ });
609
+ it('posts comment entities to /api/v1/entities/bulk and returns response', async () => {
610
+ const commentEntity = {
611
+ schemaVersion: '2.0',
612
+ id: 'comment-1',
613
+ updateSequenceNumber: 1,
614
+ displayName: 'Great work on this feature!',
615
+ url: 'https://example.com/comments/comment-1',
616
+ createdAt: '2024-07-09T14:27:37.000Z',
617
+ createdBy: {
618
+ id: 'ari:cloud:identity::user/user-789',
619
+ externalId: 'user-789',
620
+ displayName: 'Jane Developer'
621
+ },
622
+ lastUpdatedAt: '2024-07-09T14:27:37.000Z',
623
+ permissions: {
624
+ accessControls: [
625
+ {
626
+ principals: [
627
+ {
628
+ type: 'EVERYONE'
629
+ }
630
+ ]
631
+ }
632
+ ]
633
+ },
634
+ 'atlassian:comment': {
635
+ text: 'This is a really well-implemented feature. The code is clean and the tests are comprehensive. Thanks for the hard work!',
636
+ reactionsV2: [
637
+ {
638
+ reactionType: 'like',
639
+ total: 5
640
+ }
641
+ ]
642
+ }
643
+ };
644
+ const req = { entities: [commentEntity] };
645
+ const expected = { success: true, results: [{ entityId: 'comment-1', success: true }] };
646
+ mockFetch.mockResolvedValueOnce({
647
+ ok: true,
648
+ json: () => Promise.resolve(expected)
649
+ });
650
+ const result = await graphClient.setEntities(req);
651
+ expect(mockFetch).toHaveBeenCalledWith('/graph/connector/api/v1/entities/bulk', expect.objectContaining({ method: 'POST' }));
652
+ expect(result).toEqual(expected);
653
+ });
654
+ it('posts conversation entities to /api/v1/entities/bulk and returns response', async () => {
655
+ const conversationEntity = {
656
+ schemaVersion: '2.0',
657
+ id: 'conversation-1',
658
+ updateSequenceNumber: 1,
659
+ displayName: 'Development Team Chat',
660
+ description: 'Main channel for the development team discussions',
661
+ url: 'https://slack.com/channels/dev-team',
662
+ createdAt: '2024-07-09T14:27:37.000Z',
663
+ lastUpdatedAt: '2024-07-09T14:27:37.000Z',
664
+ permissions: {
665
+ accessControls: [
666
+ {
667
+ principals: [
668
+ {
669
+ type: 'EVERYONE'
670
+ }
671
+ ]
672
+ }
673
+ ]
674
+ },
675
+ 'atlassian:conversation': {
676
+ type: 'channel',
677
+ membershipType: 'public',
678
+ workspace: 'atlassian-workspace',
679
+ topic: 'Daily standup and development discussions',
680
+ isArchived: false,
681
+ members: [
682
+ {
683
+ accountId: 'user-123',
684
+ ari: 'ari:cloud:identity::user/user-123',
685
+ externalId: 'user-123',
686
+ name: 'John Developer',
687
+ email: 'john.developer@example.com'
688
+ },
689
+ {
690
+ accountId: 'user-456',
691
+ ari: 'ari:cloud:identity::user/user-456',
692
+ externalId: 'user-456',
693
+ name: 'Jane Developer',
694
+ email: 'jane.developer@example.com'
695
+ },
696
+ {
697
+ accountId: 'user-789',
698
+ ari: 'ari:cloud:identity::user/user-789',
699
+ externalId: 'user-789',
700
+ name: 'Bob Manager',
701
+ email: 'bob.manager@example.com'
702
+ }
703
+ ],
704
+ lastActive: '2024-07-09T16:30:00.000Z',
705
+ memberCount: 3
706
+ }
707
+ };
708
+ const req = { entities: [conversationEntity] };
709
+ const expected = { success: true, results: [{ entityId: 'conversation-1', success: true }] };
710
+ mockFetch.mockResolvedValueOnce({
711
+ ok: true,
712
+ json: () => Promise.resolve(expected)
713
+ });
714
+ const result = await graphClient.setEntities(req);
715
+ expect(mockFetch).toHaveBeenCalledWith('/graph/connector/api/v1/entities/bulk', expect.objectContaining({ method: 'POST' }));
716
+ expect(result).toEqual(expected);
717
+ });
718
+ it('posts customer org entities to /api/v1/entities/bulk and returns response', async () => {
719
+ const customerOrgEntity = {
720
+ schemaVersion: '2.0',
721
+ id: 'customer-org-1',
722
+ updateSequenceNumber: 1,
723
+ displayName: 'Acme Corporation',
724
+ description: 'Leading technology company specializing in enterprise solutions',
725
+ url: 'https://crm.example.com/customers/acme-corp',
726
+ createdAt: '2024-07-09T14:27:37.000Z',
727
+ lastUpdatedAt: '2024-07-09T14:27:37.000Z',
728
+ permissions: {
729
+ accessControls: [
730
+ {
731
+ principals: [
732
+ {
733
+ type: 'EVERYONE'
734
+ }
735
+ ]
736
+ }
737
+ ]
738
+ },
739
+ 'atlassian:customer-org': {
740
+ contacts: [
741
+ {
742
+ accountId: 'contact-123',
743
+ ari: 'ari:cloud:identity::user/contact-123',
744
+ externalId: 'contact-123',
745
+ name: 'Alice Johnson',
746
+ email: 'alice.johnson@acme.com',
747
+ avatar: 'https://avatar.example.com/alice.jpg'
748
+ },
749
+ {
750
+ accountId: 'contact-456',
751
+ ari: 'ari:cloud:identity::user/contact-456',
752
+ externalId: 'contact-456',
753
+ name: 'Bob Smith',
754
+ email: 'bob.smith@acme.com'
755
+ }
756
+ ],
757
+ customerOrgLastActivity: {
758
+ lastActivityAt: '2024-07-09T16:30:00.000Z',
759
+ event: 'Support ticket created for enterprise integration'
760
+ },
761
+ customerOrgLifeTimeValue: {
762
+ value: 250000.0,
763
+ currencyCode: 'USD'
764
+ },
765
+ websiteUrl: 'https://www.acme.com',
766
+ industry: 'Technology',
767
+ contributors: [
768
+ {
769
+ accountId: 'contributor-789',
770
+ ari: 'ari:cloud:identity::user/contributor-789',
771
+ externalId: 'contributor-789',
772
+ name: 'Charlie Brown',
773
+ email: 'charlie.brown@ourcompany.com',
774
+ userName: 'cbrown'
775
+ }
776
+ ],
777
+ country: 'United States',
778
+ accountType: 'Enterprise'
779
+ }
780
+ };
781
+ const req = { entities: [customerOrgEntity] };
782
+ const expected = { success: true, results: [{ entityId: 'customer-org-1', success: true }] };
783
+ mockFetch.mockResolvedValueOnce({
784
+ ok: true,
785
+ json: () => Promise.resolve(expected)
786
+ });
787
+ const result = await graphClient.setEntities(req);
788
+ expect(mockFetch).toHaveBeenCalledWith('/graph/connector/api/v1/entities/bulk', expect.objectContaining({ method: 'POST' }));
789
+ expect(result).toEqual(expected);
790
+ });
791
+ it('posts deal entities to /api/v1/entities/bulk and returns response', async () => {
792
+ const dealEntity = {
793
+ schemaVersion: '2.0',
794
+ id: 'deal-1',
795
+ updateSequenceNumber: 1,
796
+ displayName: 'Enterprise Software License Deal',
797
+ description: 'Large enterprise deal for software licensing and support services',
798
+ url: 'https://crm.example.com/deals/enterprise-software-123',
799
+ createdAt: '2024-07-09T14:27:37.000Z',
800
+ lastUpdatedAt: '2024-07-09T14:27:37.000Z',
801
+ permissions: {
802
+ accessControls: [
803
+ {
804
+ principals: [
805
+ {
806
+ type: 'EVERYONE'
807
+ }
808
+ ]
809
+ }
810
+ ]
811
+ },
812
+ 'atlassian:deal': {
813
+ contact: {
814
+ accountId: 'contact-deal-123',
815
+ ari: 'ari:cloud:identity::user/contact-deal-123',
816
+ externalId: 'contact-deal-123',
817
+ name: 'Sarah Wilson',
818
+ email: 'sarah.wilson@techcorp.com',
819
+ avatar: 'https://avatar.example.com/sarah.jpg'
820
+ },
821
+ stage: 'Proposal Sent',
822
+ status: 'Active',
823
+ accountName: 'TechCorp Enterprises',
824
+ contributors: [
825
+ {
826
+ accountId: 'contributor-789',
827
+ ari: 'ari:cloud:identity::user/contributor-789',
828
+ externalId: 'contributor-789',
829
+ name: 'Alex Rodriguez',
830
+ email: 'alex.rodriguez@ourcompany.com',
831
+ userName: 'arodriguez'
832
+ },
833
+ {
834
+ accountId: 'contributor-456',
835
+ ari: 'ari:cloud:identity::user/contributor-456',
836
+ externalId: 'contributor-456',
837
+ name: 'Jessica Chen',
838
+ email: 'jessica.chen@ourcompany.com',
839
+ userName: 'jchen'
840
+ }
841
+ ],
842
+ lastActivity: {
843
+ lastActivityAt: '2024-07-09T16:30:00.000Z',
844
+ event: 'Contract proposal sent to client for review'
845
+ },
846
+ dealClosedAt: '2024-08-15T10:00:00.000Z',
847
+ opportunityAmount: {
848
+ value: 500000.0,
849
+ currencyCode: 'USD'
850
+ },
851
+ isClosed: false
852
+ }
853
+ };
854
+ const req = { entities: [dealEntity] };
855
+ const expected = { success: true, results: [{ entityId: 'deal-1', success: true }] };
856
+ mockFetch.mockResolvedValueOnce({
857
+ ok: true,
858
+ json: () => Promise.resolve(expected)
859
+ });
860
+ const result = await graphClient.setEntities(req);
861
+ expect(mockFetch).toHaveBeenCalledWith('/graph/connector/api/v1/entities/bulk', expect.objectContaining({ method: 'POST' }));
862
+ expect(result).toEqual(expected);
863
+ });
864
+ it('posts deployment entities to /api/v1/entities/bulk and returns response', async () => {
865
+ const deploymentEntity = {
866
+ schemaVersion: '2.0',
867
+ id: 'deployment-1',
868
+ updateSequenceNumber: 1,
869
+ displayName: 'Production API Deployment v2.4.5',
870
+ description: 'Deployment of version 2.4.5 to production environment',
871
+ url: 'https://ci.example.com/deployments/prod-api-v2.4.5',
872
+ createdAt: '2024-07-09T14:27:37.000Z',
873
+ lastUpdatedAt: '2024-07-09T14:27:37.000Z',
874
+ permissions: {
875
+ accessControls: [
876
+ {
877
+ principals: [
878
+ {
879
+ type: 'EVERYONE'
880
+ }
881
+ ]
882
+ }
883
+ ]
884
+ },
885
+ 'atlassian:deployment': {
886
+ deploymentSequenceNumber: 12345,
887
+ label: 'v2.4.5 - Bug fixes and performance improvements',
888
+ state: 'successful',
889
+ duration: 1200,
890
+ pipeline: {
891
+ id: 'pipeline-prod-api',
892
+ displayName: 'Production API Pipeline',
893
+ url: 'https://ci.example.com/pipelines/prod-api'
894
+ },
895
+ environment: {
896
+ id: 'env-production',
897
+ displayName: 'Production Environment',
898
+ type: 'production'
899
+ },
900
+ commands: [
901
+ {
902
+ command: 'npm install --production'
903
+ },
904
+ {
905
+ command: 'npm run build'
906
+ },
907
+ {
908
+ command: 'kubectl apply -f deployment.yaml'
909
+ }
910
+ ],
911
+ triggeredBy: {
912
+ accountId: 'devops-user-123',
913
+ ari: 'ari:cloud:identity::user/devops-user-123',
914
+ externalId: 'devops-user-123',
915
+ name: 'DevOps Team',
916
+ email: 'devops@example.com',
917
+ userName: 'devops-team',
918
+ avatar: 'https://avatar.example.com/devops.jpg'
919
+ },
920
+ region: 'us-east-1'
921
+ }
922
+ };
923
+ const req = { entities: [deploymentEntity] };
924
+ const expected = { success: true, results: [{ entityId: 'deployment-1', success: true }] };
925
+ mockFetch.mockResolvedValueOnce({
926
+ ok: true,
927
+ json: () => Promise.resolve(expected)
928
+ });
929
+ const result = await graphClient.setEntities(req);
930
+ expect(mockFetch).toHaveBeenCalledWith('/graph/connector/api/v1/entities/bulk', expect.objectContaining({ method: 'POST' }));
931
+ expect(result).toEqual(expected);
932
+ });
933
+ it('posts design entities to /api/v1/entities/bulk and returns response', async () => {
934
+ const designEntity = {
935
+ schemaVersion: '2.0',
936
+ id: 'design-1',
937
+ updateSequenceNumber: 1,
938
+ displayName: 'Mobile App Login Screen',
939
+ description: 'Updated login screen design for mobile app with improved UX',
940
+ url: 'https://figma.com/design/mobile-login-screen',
941
+ createdAt: '2024-07-09T14:27:37.000Z',
942
+ lastUpdatedAt: '2024-07-09T14:27:37.000Z',
943
+ permissions: {
944
+ accessControls: [
945
+ {
946
+ principals: [
947
+ {
948
+ type: 'EVERYONE'
949
+ }
950
+ ]
951
+ }
952
+ ]
953
+ },
954
+ 'atlassian:design': {
955
+ liveEmbedUrl: 'https://figma.com/embed/mobile-login-screen',
956
+ inspectUrl: 'https://figma.com/inspect/mobile-login-screen',
957
+ status: 'Ready for Development',
958
+ type: 'UI Design',
959
+ iconUrl: 'https://figma.com/icons/mobile-login-screen.svg'
960
+ }
961
+ };
962
+ const req = { entities: [designEntity] };
963
+ const expected = { success: true, results: [{ entityId: 'design-1', success: true }] };
964
+ mockFetch.mockResolvedValueOnce({
965
+ ok: true,
966
+ json: () => Promise.resolve(expected)
967
+ });
968
+ const result = await graphClient.setEntities(req);
969
+ expect(mockFetch).toHaveBeenCalledWith('/graph/connector/api/v1/entities/bulk', expect.objectContaining({ method: 'POST' }));
970
+ expect(result).toEqual(expected);
971
+ });
972
+ it('posts position entities to /api/v1/entities/bulk and returns response', async () => {
973
+ const positionEntity = {
974
+ schemaVersion: '2.0',
975
+ id: 'position-1',
976
+ updateSequenceNumber: 1,
977
+ displayName: 'Senior Software Engineer - Backend',
978
+ url: 'https://hr.example.com/positions/senior-backend-engineer',
979
+ createdAt: '2024-07-09T14:27:37.000Z',
980
+ lastUpdatedAt: '2024-07-09T14:27:37.000Z',
981
+ permissions: {
982
+ accessControls: [
983
+ {
984
+ principals: [
985
+ {
986
+ type: 'EVERYONE'
987
+ }
988
+ ]
989
+ }
990
+ ]
991
+ },
992
+ parentKey: {
993
+ type: 'atlassian:organisation',
994
+ value: {
995
+ entityId: 'org-tech-company-123'
996
+ }
997
+ },
998
+ associations: {
999
+ set: [
1000
+ {
1001
+ associationType: 'atlassian:worker',
1002
+ values: ['worker-alice-johnson-456']
1003
+ }
1004
+ ]
1005
+ },
1006
+ 'atlassian:position': {
1007
+ customAndSensitiveData: 'Salary range: $120,000-$150,000. Remote work eligible.',
1008
+ status: 'Open',
1009
+ jobTitle: 'Senior Software Engineer - Backend'
1010
+ }
1011
+ };
1012
+ const req = { entities: [positionEntity] };
1013
+ const expected = { success: true, results: [{ entityId: 'position-1', success: true }] };
1014
+ mockFetch.mockResolvedValueOnce({
1015
+ ok: true,
1016
+ json: () => Promise.resolve(expected)
1017
+ });
1018
+ const result = await graphClient.setEntities(req);
1019
+ expect(mockFetch).toHaveBeenCalledWith('/graph/connector/api/v1/entities/bulk', expect.objectContaining({ method: 'POST' }));
1020
+ expect(result).toEqual(expected);
1021
+ });
406
1022
  });
@@ -0,0 +1,14 @@
1
+ import { BaseEntityProperties } from '../common';
2
+ import { CommitEntity } from './commit';
3
+ export declare type BranchAttributes = {
4
+ name?: string;
5
+ lastCommit?: CommitEntity;
6
+ createPullRequestUrl?: string;
7
+ };
8
+ export declare type BranchEntity = BaseEntityProperties & {
9
+ displayName: string;
10
+ lastUpdatedAt: string;
11
+ permissions: NonNullable<BaseEntityProperties['permissions']>;
12
+ 'atlassian:branch': BranchAttributes;
13
+ };
14
+ //# sourceMappingURL=branch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branch.d.ts","sourceRoot":"","sources":["../../../src/types/entities/branch.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,oBAAY,gBAAgB,GAAG;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,oBAAY,YAAY,GAAG,oBAAoB,GAAG;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,kBAAkB,EAAE,gBAAgB,CAAC;CACtC,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,33 @@
1
+ import { BaseEntityProperties } from '../common';
2
+ export declare type TestInfo = {
3
+ totalNumber: number;
4
+ numberPassed: number;
5
+ numberFailed: number;
6
+ numberSkipped?: number;
7
+ };
8
+ export declare type BuildReferences = {
9
+ commit?: {
10
+ id: string;
11
+ repositoryUri: string;
12
+ };
13
+ ref?: {
14
+ name: string;
15
+ uri: string;
16
+ };
17
+ };
18
+ export declare type BuildAttributes = {
19
+ pipelineId: string;
20
+ buildNumber: number;
21
+ label?: string;
22
+ state: string;
23
+ duration?: number;
24
+ testInfo?: TestInfo;
25
+ references?: BuildReferences[];
26
+ };
27
+ export declare type BuildEntity = BaseEntityProperties & {
28
+ displayName: string;
29
+ lastUpdatedAt: string;
30
+ permissions: NonNullable<BaseEntityProperties['permissions']>;
31
+ 'atlassian:build': BuildAttributes;
32
+ };
33
+ //# sourceMappingURL=build.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/types/entities/build.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEjD,oBAAY,QAAQ,GAAG;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,MAAM,CAAC,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,GAAG,CAAC,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;CAChC,CAAC;AAEF,oBAAY,WAAW,GAAG,oBAAoB,GAAG;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,iBAAiB,EAAE,eAAe,CAAC;CACpC,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,45 @@
1
+ import { BaseEntityProperties } from '../common';
2
+ import { User } from '../users';
3
+ export declare type Attachment = {
4
+ url?: string;
5
+ thumbnailUrl?: string;
6
+ title?: string;
7
+ mimeType?: string;
8
+ byteSize?: number;
9
+ };
10
+ export declare type Attendee = {
11
+ user?: string;
12
+ isOptional?: boolean;
13
+ rsvpStatus?: 'accepted' | 'tentatively_accepted' | 'declined' | 'not_responded' | 'other';
14
+ };
15
+ export declare type Location = {
16
+ name?: string;
17
+ address?: string;
18
+ url?: string;
19
+ coordinates?: string;
20
+ };
21
+ export declare type CalendarEventAttributes = {
22
+ eventStartTime: string;
23
+ eventEndTime: string;
24
+ attendees?: Attendee[];
25
+ location?: Location;
26
+ videoMeetingUrl?: string;
27
+ recordingUrl?: string;
28
+ isAllDayEvent?: boolean;
29
+ attendeeCount?: number;
30
+ exceedsMaxAttendees?: boolean;
31
+ videoMeetingProvider?: string;
32
+ isRecurringEvent?: boolean;
33
+ recurringEventId?: string;
34
+ eventType: string;
35
+ attachments?: Attachment[];
36
+ };
37
+ export declare type CalendarEventEntity = BaseEntityProperties & {
38
+ displayName: string;
39
+ description: string;
40
+ createdBy: Partial<User>;
41
+ lastUpdatedAt: string;
42
+ permissions: NonNullable<BaseEntityProperties['permissions']>;
43
+ 'atlassian:calendar-event': CalendarEventAttributes;
44
+ };
45
+ //# sourceMappingURL=calendar-event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar-event.d.ts","sourceRoot":"","sources":["../../../src/types/entities/calendar-event.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,oBAAY,UAAU,GAAG;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,UAAU,GAAG,sBAAsB,GAAG,UAAU,GAAG,eAAe,GAAG,OAAO,CAAC;CAC3F,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,oBAAY,uBAAuB,GAAG;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;CAC5B,CAAC;AAEF,oBAAY,mBAAmB,GAAG,oBAAoB,GAAG;IACvD,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,0BAA0B,EAAE,uBAAuB,CAAC;CACrD,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ import { BaseEntityProperties } from '../common';
2
+ import { User } from '../';
3
+ export declare type Reaction = {
4
+ reactionType: string;
5
+ total: number;
6
+ };
7
+ export declare type CommentAttributes = {
8
+ text?: string;
9
+ reactionsV2?: Reaction[];
10
+ };
11
+ export declare type CommentEntity = Omit<BaseEntityProperties, 'description' | 'createdBy'> & {
12
+ displayName: string;
13
+ lastUpdatedAt: string;
14
+ createdBy: Partial<User>;
15
+ permissions: NonNullable<BaseEntityProperties['permissions']>;
16
+ 'atlassian:comment': CommentAttributes;
17
+ };
18
+ //# sourceMappingURL=comment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../src/types/entities/comment.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAE3B,oBAAY,QAAQ,GAAG;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,QAAQ,EAAE,CAAC;CAC1B,CAAC;AAEF,oBAAY,aAAa,GAAG,IAAI,CAAC,oBAAoB,EAAE,aAAa,GAAG,WAAW,CAAC,GAAG;IACpF,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,WAAW,EAAE,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,mBAAmB,EAAE,iBAAiB,CAAC;CACxC,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,26 @@
1
+ import { BaseEntityProperties } from '../common';
2
+ import { User } from '../users';
3
+ export declare type FileInfo = {
4
+ path: string;
5
+ url: string;
6
+ changeType: string;
7
+ linesAdded: number;
8
+ linesRemoved: number;
9
+ };
10
+ export declare type CommitAttributes = {
11
+ hash?: string;
12
+ displayId?: string;
13
+ message?: string;
14
+ author?: User;
15
+ flags: string[];
16
+ fileCount: number;
17
+ files: FileInfo[];
18
+ authorTimestamp?: string;
19
+ };
20
+ export declare type CommitEntity = BaseEntityProperties & {
21
+ displayName: string;
22
+ lastUpdatedAt: string;
23
+ permissions: NonNullable<BaseEntityProperties['permissions']>;
24
+ 'atlassian:commit': CommitAttributes;
25
+ };
26
+ //# sourceMappingURL=commit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commit.d.ts","sourceRoot":"","sources":["../../../src/types/entities/commit.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,oBAAY,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,oBAAY,YAAY,GAAG,oBAAoB,GAAG;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,kBAAkB,EAAE,gBAAgB,CAAC;CACtC,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,28 @@
1
+ import { BaseEntityProperties } from '../common';
2
+ export declare type User = {
3
+ accountId?: string;
4
+ email?: string;
5
+ externalId?: string;
6
+ ari?: string;
7
+ name?: string;
8
+ userName?: string;
9
+ avatar?: string;
10
+ url?: string;
11
+ };
12
+ export declare type ConversationAttributes = {
13
+ type: string;
14
+ membershipType: string;
15
+ workspace: string;
16
+ topic?: string;
17
+ isArchived?: boolean;
18
+ members: User[];
19
+ lastActive?: string;
20
+ memberCount?: number;
21
+ };
22
+ export declare type ConversationEntity = BaseEntityProperties & {
23
+ displayName: string;
24
+ lastUpdatedAt: string;
25
+ permissions: NonNullable<BaseEntityProperties['permissions']>;
26
+ 'atlassian:conversation': ConversationAttributes;
27
+ };
28
+ //# sourceMappingURL=conversation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../src/types/entities/conversation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEjD,oBAAY,IAAI,GAAG;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,IAAI,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,oBAAY,kBAAkB,GAAG,oBAAoB,GAAG;IACtD,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,wBAAwB,EAAE,sBAAsB,CAAC;CAClD,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,36 @@
1
+ import { BaseEntityProperties } from '../common';
2
+ export declare type User = {
3
+ accountId?: string;
4
+ email?: string;
5
+ externalId?: string;
6
+ ari?: string;
7
+ name?: string;
8
+ userName?: string;
9
+ avatar?: string;
10
+ url?: string;
11
+ };
12
+ export declare type CustomerOrgLastActivity = {
13
+ lastActivityAt: string;
14
+ event: string;
15
+ };
16
+ export declare type CustomerOrgLifeTimeValue = {
17
+ value: number;
18
+ currencyCode: string;
19
+ };
20
+ export declare type CustomerOrgAttributes = {
21
+ contacts?: User[];
22
+ customerOrgLastActivity?: CustomerOrgLastActivity;
23
+ customerOrgLifeTimeValue?: CustomerOrgLifeTimeValue;
24
+ websiteUrl?: string;
25
+ industry?: string;
26
+ contributors?: User[];
27
+ country?: string;
28
+ accountType?: string;
29
+ };
30
+ export declare type CustomerOrgEntity = BaseEntityProperties & {
31
+ displayName: string;
32
+ lastUpdatedAt: string;
33
+ permissions: NonNullable<BaseEntityProperties['permissions']>;
34
+ 'atlassian:customer-org': CustomerOrgAttributes;
35
+ };
36
+ //# sourceMappingURL=customer-org.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customer-org.d.ts","sourceRoot":"","sources":["../../../src/types/entities/customer-org.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEjD,oBAAY,IAAI,GAAG;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,uBAAuB,GAAG;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,wBAAwB,GAAG;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,oBAAY,qBAAqB,GAAG;IAClC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC;IAClB,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;IAClD,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,oBAAY,iBAAiB,GAAG,oBAAoB,GAAG;IACrD,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,wBAAwB,EAAE,qBAAqB,CAAC;CACjD,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,37 @@
1
+ import { BaseEntityProperties } from '../common';
2
+ export declare type User = {
3
+ accountId?: string;
4
+ email?: string;
5
+ externalId?: string;
6
+ ari?: string;
7
+ name?: string;
8
+ userName?: string;
9
+ avatar?: string;
10
+ url?: string;
11
+ };
12
+ export declare type DealLastActivity = {
13
+ lastActivityAt: string;
14
+ event: string;
15
+ };
16
+ export declare type DealOpportunityAmount = {
17
+ value: number;
18
+ currencyCode: string;
19
+ };
20
+ export declare type DealAttributes = {
21
+ contact?: User;
22
+ stage?: string;
23
+ status?: string;
24
+ accountName?: string;
25
+ contributors?: User[];
26
+ lastActivity?: DealLastActivity;
27
+ dealClosedAt?: string;
28
+ opportunityAmount?: DealOpportunityAmount;
29
+ isClosed?: boolean;
30
+ };
31
+ export declare type DealEntity = BaseEntityProperties & {
32
+ displayName: string;
33
+ lastUpdatedAt: string;
34
+ permissions: NonNullable<BaseEntityProperties['permissions']>;
35
+ 'atlassian:deal': DealAttributes;
36
+ };
37
+ //# sourceMappingURL=deal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deal.d.ts","sourceRoot":"","sources":["../../../src/types/entities/deal.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEjD,oBAAY,IAAI,GAAG;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,oBAAY,cAAc,GAAG;IAC3B,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC;IACtB,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,qBAAqB,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,oBAAY,UAAU,GAAG,oBAAoB,GAAG;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,gBAAgB,EAAE,cAAc,CAAC;CAClC,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,43 @@
1
+ import { BaseEntityProperties } from '../common';
2
+ export interface PipelineDetails {
3
+ id: string;
4
+ displayName: string;
5
+ url: string;
6
+ }
7
+ export interface EnvironmentDetails {
8
+ id: string;
9
+ displayName: string;
10
+ type: 'production' | 'staging' | 'testing' | 'development' | 'unmapped';
11
+ }
12
+ export interface UserReference {
13
+ accountId?: string;
14
+ email?: string;
15
+ externalId?: string;
16
+ ari?: string;
17
+ name?: string;
18
+ userName?: string;
19
+ avatar?: string;
20
+ url?: string;
21
+ }
22
+ export interface Command {
23
+ command: string;
24
+ }
25
+ export interface DeploymentAttributes {
26
+ deploymentSequenceNumber: number;
27
+ label?: string;
28
+ state: string;
29
+ duration?: number;
30
+ pipeline?: PipelineDetails;
31
+ environment: EnvironmentDetails;
32
+ commands?: Command[];
33
+ triggeredBy?: UserReference;
34
+ region?: string;
35
+ }
36
+ export declare type DeploymentEntity = BaseEntityProperties & {
37
+ displayName: string;
38
+ description: string;
39
+ lastUpdatedAt: string;
40
+ permissions: NonNullable<BaseEntityProperties['permissions']>;
41
+ 'atlassian:deployment': DeploymentAttributes;
42
+ };
43
+ //# sourceMappingURL=deployment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployment.d.ts","sourceRoot":"","sources":["../../../src/types/entities/deployment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEjD,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC;CACzE;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACnC,wBAAwB,EAAE,MAAM,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,WAAW,EAAE,kBAAkB,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,oBAAY,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,sBAAsB,EAAE,oBAAoB,CAAC;CAC9C,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ import { BaseEntityProperties } from '../common';
2
+ export declare type DesignAttributes = {
3
+ liveEmbedUrl: string;
4
+ inspectUrl?: string;
5
+ status: string;
6
+ type: string;
7
+ iconUrl?: string;
8
+ };
9
+ export declare type DesignEntity = BaseEntityProperties & {
10
+ displayName: string;
11
+ lastUpdatedAt: string;
12
+ permissions: NonNullable<BaseEntityProperties['permissions']>;
13
+ 'atlassian:design': DesignAttributes;
14
+ };
15
+ //# sourceMappingURL=design.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"design.d.ts","sourceRoot":"","sources":["../../../src/types/entities/design.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEjD,oBAAY,gBAAgB,GAAG;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,YAAY,GAAG,oBAAoB,GAAG;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,kBAAkB,EAAE,gBAAgB,CAAC;CACtC,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,17 @@
1
+ import { BranchEntity } from './branch';
2
+ import { BuildEntity } from './build';
3
+ import { CalendarEventEntity } from './calendar-event';
4
+ import { CommentEntity } from './comment';
5
+ import { CommitEntity } from './commit';
6
+ import { ConversationEntity } from './conversation';
7
+ import { CustomerOrgEntity } from './customer-org';
8
+ import { DealEntity } from './deal';
9
+ import { DeploymentEntity } from './deployment';
10
+ import { DesignEntity } from './design';
1
11
  import { DocumentEntity } from './document';
2
12
  import { MessageEntity } from './message';
3
13
  import { OrganisationEntity } from './organisation';
4
- export { DocumentEntity, MessageEntity, OrganisationEntity };
5
- export declare type Entity = DocumentEntity | MessageEntity | OrganisationEntity;
14
+ import { PositionEntity } from './position';
15
+ export { BranchEntity, BuildEntity, CalendarEventEntity, CommentEntity, CommitEntity, ConversationEntity, CustomerOrgEntity, DealEntity, DeploymentEntity, DesignEntity, DocumentEntity, MessageEntity, OrganisationEntity, PositionEntity };
16
+ export declare type Entity = BranchEntity | BuildEntity | CalendarEventEntity | CommentEntity | CommitEntity | ConversationEntity | CustomerOrgEntity | DealEntity | DeploymentEntity | DesignEntity | DocumentEntity | MessageEntity | OrganisationEntity | PositionEntity;
6
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAGpD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,kBAAkB,EAAE,CAAC;AAG7D,oBAAY,MAAM,GAAG,cAAc,GAAG,aAAa,GAAG,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAG5C,OAAO,EACL,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,cAAc,EACf,CAAC;AAGF,oBAAY,MAAM,GACd,YAAY,GACZ,WAAW,GACX,mBAAmB,GACnB,aAAa,GACb,YAAY,GACZ,kBAAkB,GAClB,iBAAiB,GACjB,UAAU,GACV,gBAAgB,GAChB,YAAY,GACZ,cAAc,GACd,aAAa,GACb,kBAAkB,GAClB,cAAc,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { BaseEntityProperties, ParentKeyObject, Associations } from '../common';
2
+ export declare type PositionAttributes = {
3
+ customAndSensitiveData?: string;
4
+ status: string;
5
+ jobTitle?: string;
6
+ };
7
+ export declare type PositionEntity = BaseEntityProperties & {
8
+ displayName: string;
9
+ lastUpdatedAt: string;
10
+ permissions: NonNullable<BaseEntityProperties['permissions']>;
11
+ parentKey: ParentKeyObject & {
12
+ type: 'atlassian:organisation';
13
+ };
14
+ associations: Associations & {
15
+ set: [
16
+ {
17
+ associationType: 'atlassian:worker';
18
+ values: [string] | [];
19
+ }
20
+ ];
21
+ };
22
+ 'atlassian:position': PositionAttributes;
23
+ };
24
+ //# sourceMappingURL=position.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../src/types/entities/position.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEhF,oBAAY,kBAAkB,GAAG;IAC/B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,oBAAY,cAAc,GAAG,oBAAoB,GAAG;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,SAAS,EAAE,eAAe,GAAG;QAAE,IAAI,EAAE,wBAAwB,CAAA;KAAE,CAAC;IAChE,YAAY,EAAE,YAAY,GAAG;QAC3B,GAAG,EAAE;YACH;gBACE,eAAe,EAAE,kBAAkB,CAAC;gBACpC,MAAM,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;aACvB;SACF,CAAC;KACH,CAAC;IACF,oBAAoB,EAAE,kBAAkB,CAAC;CAC1C,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/teamwork-graph",
3
- "version": "1.2.0-next.4",
3
+ "version": "2.0.0-next.6",
4
4
  "description": "Forge TeamworkGraph SDK",
5
5
  "author": "Atlassian",
6
6
  "license": "UNLICENSED",