@inneropen/marvin-sdk 4.2.0 → 4.4.0
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/{HttpClient-B_rEmJuO.d.cts → HttpClient-DXMNOPqu.d.cts} +17 -1
- package/dist/{HttpClient-B_rEmJuO.d.ts → HttpClient-DXMNOPqu.d.ts} +17 -1
- package/dist/{chunk-HFNIFS2A.js → chunk-KXI2FQSO.js} +17 -1
- package/dist/{chunk-DSVYCVQD.js → chunk-LTX3MAUE.js} +25 -0
- package/dist/{index-BEEbnrXV.d.cts → index-7sv2m2Pe.d.cts} +359 -0
- package/dist/{index-BEEbnrXV.d.ts → index-7sv2m2Pe.d.ts} +359 -0
- package/dist/index.cjs +41 -0
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +2 -2
- package/dist/{marvin-BjJXe-YT.d.ts → marvin-5BuvJtTp.d.cts} +13 -2
- package/dist/{marvin-BiXcixLB.d.cts → marvin-Bm0EveOU.d.ts} +13 -2
- package/dist/platform.cjs +201 -3
- package/dist/platform.d.cts +217 -10
- package/dist/platform.d.ts +217 -10
- package/dist/platform.js +176 -4
- package/dist/publish.cjs +41 -0
- package/dist/publish.d.cts +4 -4
- package/dist/publish.d.ts +4 -4
- package/dist/publish.js +2 -2
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -700,6 +700,167 @@ interface components {
|
|
|
700
700
|
/** Buildid */
|
|
701
701
|
buildId: string;
|
|
702
702
|
};
|
|
703
|
+
/**
|
|
704
|
+
* AdminEventConnections
|
|
705
|
+
* @description A platform event type's story across the platform: what sends it, what happens (built in, plus each
|
|
706
|
+
* workspace's own subscriptions, grouped by workspace), and its newest events in any workspace.
|
|
707
|
+
*/
|
|
708
|
+
AdminEventConnections: {
|
|
709
|
+
/** Eventtype */
|
|
710
|
+
eventType: string;
|
|
711
|
+
/** Name */
|
|
712
|
+
name: string;
|
|
713
|
+
/** Description */
|
|
714
|
+
description: string;
|
|
715
|
+
/** Category */
|
|
716
|
+
category: string;
|
|
717
|
+
/** Senders */
|
|
718
|
+
senders: components["schemas"]["EventSender"][];
|
|
719
|
+
/** Reactions */
|
|
720
|
+
reactions: components["schemas"]["EventReaction"][];
|
|
721
|
+
/** Workspaces */
|
|
722
|
+
workspaces: components["schemas"]["WorkspaceEventReactions"][];
|
|
723
|
+
/** Recent */
|
|
724
|
+
recent: components["schemas"]["AdminEventSummary"][];
|
|
725
|
+
/** Leadsto */
|
|
726
|
+
leadsTo: components["schemas"]["EventTypeRef"][];
|
|
727
|
+
/** Causedby */
|
|
728
|
+
causedBy: components["schemas"]["EventTypeRef"][];
|
|
729
|
+
};
|
|
730
|
+
/**
|
|
731
|
+
* AdminEventPagination
|
|
732
|
+
* @description One page of platform events, newest first.
|
|
733
|
+
*/
|
|
734
|
+
AdminEventPagination: {
|
|
735
|
+
/**
|
|
736
|
+
* Page
|
|
737
|
+
* @default 1
|
|
738
|
+
*/
|
|
739
|
+
page: number;
|
|
740
|
+
/**
|
|
741
|
+
* Per Page
|
|
742
|
+
* @default 10
|
|
743
|
+
*/
|
|
744
|
+
per_page: number;
|
|
745
|
+
/**
|
|
746
|
+
* Total
|
|
747
|
+
* @default 0
|
|
748
|
+
*/
|
|
749
|
+
total: number;
|
|
750
|
+
/**
|
|
751
|
+
* Total Pages
|
|
752
|
+
* @default 0
|
|
753
|
+
*/
|
|
754
|
+
total_pages: number;
|
|
755
|
+
/** Items */
|
|
756
|
+
items: components["schemas"]["AdminEventSummary"][];
|
|
757
|
+
/** Next */
|
|
758
|
+
next?: string | null;
|
|
759
|
+
/** Previous */
|
|
760
|
+
previous?: string | null;
|
|
761
|
+
};
|
|
762
|
+
/**
|
|
763
|
+
* AdminEventRead
|
|
764
|
+
* @description A platform event with its full payload.
|
|
765
|
+
*/
|
|
766
|
+
AdminEventRead: {
|
|
767
|
+
/**
|
|
768
|
+
* Eventid
|
|
769
|
+
* Format: uuid4
|
|
770
|
+
*/
|
|
771
|
+
eventId: string;
|
|
772
|
+
/** Eventtype */
|
|
773
|
+
eventType: string;
|
|
774
|
+
/** Eventname */
|
|
775
|
+
eventName: string;
|
|
776
|
+
/**
|
|
777
|
+
* Occurredat
|
|
778
|
+
* Format: date-time
|
|
779
|
+
*/
|
|
780
|
+
occurredAt: string;
|
|
781
|
+
/** Messagetitle */
|
|
782
|
+
messageTitle: string;
|
|
783
|
+
/** Messagebody */
|
|
784
|
+
messageBody?: string | null;
|
|
785
|
+
/** Workspaceid */
|
|
786
|
+
workspaceId?: string | null;
|
|
787
|
+
/** Workspacename */
|
|
788
|
+
workspaceName?: string | null;
|
|
789
|
+
/** Workspaceslug */
|
|
790
|
+
workspaceSlug?: string | null;
|
|
791
|
+
/** Userid */
|
|
792
|
+
userId?: string | null;
|
|
793
|
+
/** Username */
|
|
794
|
+
userName?: string | null;
|
|
795
|
+
/** Useremail */
|
|
796
|
+
userEmail?: string | null;
|
|
797
|
+
/** Entityid */
|
|
798
|
+
entityId?: string | null;
|
|
799
|
+
/** Entitytype */
|
|
800
|
+
entityType?: string | null;
|
|
801
|
+
/** Integrationid */
|
|
802
|
+
integrationId: string;
|
|
803
|
+
/** Correlationid */
|
|
804
|
+
correlationId?: string | null;
|
|
805
|
+
/** Eventdata */
|
|
806
|
+
eventData: {
|
|
807
|
+
[key: string]: unknown;
|
|
808
|
+
};
|
|
809
|
+
};
|
|
810
|
+
/**
|
|
811
|
+
* AdminEventSummary
|
|
812
|
+
* @description A platform event as the admin Events page lists it, with the names a super admin needs to read it.
|
|
813
|
+
*/
|
|
814
|
+
AdminEventSummary: {
|
|
815
|
+
/**
|
|
816
|
+
* Eventid
|
|
817
|
+
* Format: uuid4
|
|
818
|
+
*/
|
|
819
|
+
eventId: string;
|
|
820
|
+
/** Eventtype */
|
|
821
|
+
eventType: string;
|
|
822
|
+
/** Eventname */
|
|
823
|
+
eventName: string;
|
|
824
|
+
/**
|
|
825
|
+
* Occurredat
|
|
826
|
+
* Format: date-time
|
|
827
|
+
*/
|
|
828
|
+
occurredAt: string;
|
|
829
|
+
/** Messagetitle */
|
|
830
|
+
messageTitle: string;
|
|
831
|
+
/** Messagebody */
|
|
832
|
+
messageBody?: string | null;
|
|
833
|
+
/** Workspaceid */
|
|
834
|
+
workspaceId?: string | null;
|
|
835
|
+
/** Workspacename */
|
|
836
|
+
workspaceName?: string | null;
|
|
837
|
+
/** Workspaceslug */
|
|
838
|
+
workspaceSlug?: string | null;
|
|
839
|
+
/** Userid */
|
|
840
|
+
userId?: string | null;
|
|
841
|
+
/** Username */
|
|
842
|
+
userName?: string | null;
|
|
843
|
+
/** Useremail */
|
|
844
|
+
userEmail?: string | null;
|
|
845
|
+
/** Entityid */
|
|
846
|
+
entityId?: string | null;
|
|
847
|
+
/** Entitytype */
|
|
848
|
+
entityType?: string | null;
|
|
849
|
+
};
|
|
850
|
+
/**
|
|
851
|
+
* AdminEventType
|
|
852
|
+
* @description A platform-scope event type, for the Events page's filter.
|
|
853
|
+
*/
|
|
854
|
+
AdminEventType: {
|
|
855
|
+
/** Eventtype */
|
|
856
|
+
eventType: string;
|
|
857
|
+
/** Name */
|
|
858
|
+
name: string;
|
|
859
|
+
/** Description */
|
|
860
|
+
description: string;
|
|
861
|
+
/** Category */
|
|
862
|
+
category: string;
|
|
863
|
+
};
|
|
703
864
|
/** AgentCreate */
|
|
704
865
|
AgentCreate: {
|
|
705
866
|
/** Name */
|
|
@@ -1389,6 +1550,47 @@ interface components {
|
|
|
1389
1550
|
*/
|
|
1390
1551
|
failures: number;
|
|
1391
1552
|
};
|
|
1553
|
+
/**
|
|
1554
|
+
* AuditEventSetting
|
|
1555
|
+
* @description One catalog event type and whether this workspace's Event Log records it.
|
|
1556
|
+
*/
|
|
1557
|
+
AuditEventSetting: {
|
|
1558
|
+
/** Eventtype */
|
|
1559
|
+
eventType: string;
|
|
1560
|
+
/** Name */
|
|
1561
|
+
name: string;
|
|
1562
|
+
/** Category */
|
|
1563
|
+
category: string;
|
|
1564
|
+
/** Defaultaudited */
|
|
1565
|
+
defaultAudited: boolean;
|
|
1566
|
+
/** Audited */
|
|
1567
|
+
audited: boolean;
|
|
1568
|
+
/** Locked */
|
|
1569
|
+
locked: boolean;
|
|
1570
|
+
};
|
|
1571
|
+
/**
|
|
1572
|
+
* AuditExcludedEvent
|
|
1573
|
+
* @description An event type this workspace's Event Log does not record.
|
|
1574
|
+
*/
|
|
1575
|
+
AuditExcludedEvent: {
|
|
1576
|
+
/** Eventtype */
|
|
1577
|
+
eventType: string;
|
|
1578
|
+
/** Name */
|
|
1579
|
+
name: string;
|
|
1580
|
+
/** Category */
|
|
1581
|
+
category: string;
|
|
1582
|
+
};
|
|
1583
|
+
/**
|
|
1584
|
+
* AuditSettingsUpdate
|
|
1585
|
+
* @description Overrides to merge: `{event_type: true | false}` to record or skip a type, `null` for its default.
|
|
1586
|
+
* Types left out keep their current setting.
|
|
1587
|
+
*/
|
|
1588
|
+
AuditSettingsUpdate: {
|
|
1589
|
+
/** Overrides */
|
|
1590
|
+
overrides?: {
|
|
1591
|
+
[key: string]: boolean | null;
|
|
1592
|
+
};
|
|
1593
|
+
};
|
|
1392
1594
|
/**
|
|
1393
1595
|
* AuthMethod
|
|
1394
1596
|
* @description Enumeration for the authentication methods a user can be associated with.
|
|
@@ -1696,6 +1898,11 @@ interface components {
|
|
|
1696
1898
|
triggerGroups: {
|
|
1697
1899
|
[key: string]: string[];
|
|
1698
1900
|
};
|
|
1901
|
+
/**
|
|
1902
|
+
* Emittable
|
|
1903
|
+
* @default []
|
|
1904
|
+
*/
|
|
1905
|
+
emittable: string[];
|
|
1699
1906
|
/**
|
|
1700
1907
|
* Conditionops
|
|
1701
1908
|
* @default []
|
|
@@ -1834,6 +2041,10 @@ interface components {
|
|
|
1834
2041
|
};
|
|
1835
2042
|
/** Createdby */
|
|
1836
2043
|
createdBy?: string | null;
|
|
2044
|
+
/** Sourceintegrationid */
|
|
2045
|
+
sourceIntegrationId?: string | null;
|
|
2046
|
+
/** Sourceblueprint */
|
|
2047
|
+
sourceBlueprint?: string | null;
|
|
1837
2048
|
};
|
|
1838
2049
|
/**
|
|
1839
2050
|
* AutomationTargetOption
|
|
@@ -2498,6 +2709,10 @@ interface components {
|
|
|
2498
2709
|
metadataJson?: {
|
|
2499
2710
|
[key: string]: unknown;
|
|
2500
2711
|
} | null;
|
|
2712
|
+
/** Sourceintegrationid */
|
|
2713
|
+
sourceIntegrationId?: string | null;
|
|
2714
|
+
/** Sourceblueprint */
|
|
2715
|
+
sourceBlueprint?: string | null;
|
|
2501
2716
|
};
|
|
2502
2717
|
/**
|
|
2503
2718
|
* CollectionUpdate
|
|
@@ -3418,6 +3633,50 @@ interface components {
|
|
|
3418
3633
|
/** Tag Ids */
|
|
3419
3634
|
tag_ids?: string[] | null;
|
|
3420
3635
|
};
|
|
3636
|
+
/**
|
|
3637
|
+
* EventConnectionCounts
|
|
3638
|
+
* @description One row of the Events catalog: how connected an event type is, in both directions.
|
|
3639
|
+
*/
|
|
3640
|
+
EventConnectionCounts: {
|
|
3641
|
+
/** Eventtype */
|
|
3642
|
+
eventType: string;
|
|
3643
|
+
/** Senders */
|
|
3644
|
+
senders: number;
|
|
3645
|
+
/** Reactions */
|
|
3646
|
+
reactions: number;
|
|
3647
|
+
/** Activereactions */
|
|
3648
|
+
activeReactions: number;
|
|
3649
|
+
/** Builtinreactions */
|
|
3650
|
+
builtinReactions: number;
|
|
3651
|
+
/** Lastoccurredat */
|
|
3652
|
+
lastOccurredAt?: string | null;
|
|
3653
|
+
};
|
|
3654
|
+
/**
|
|
3655
|
+
* EventConnections
|
|
3656
|
+
* @description An event type's whole story in one workspace: what sends it, what happens, and when it last did.
|
|
3657
|
+
*/
|
|
3658
|
+
EventConnections: {
|
|
3659
|
+
/** Eventtype */
|
|
3660
|
+
eventType: string;
|
|
3661
|
+
/** Name */
|
|
3662
|
+
name: string;
|
|
3663
|
+
/** Description */
|
|
3664
|
+
description: string;
|
|
3665
|
+
/** Category */
|
|
3666
|
+
category: string;
|
|
3667
|
+
/** Senders */
|
|
3668
|
+
senders: components["schemas"]["EventSender"][];
|
|
3669
|
+
/** Reactions */
|
|
3670
|
+
reactions: components["schemas"]["EventReaction"][];
|
|
3671
|
+
/** Audited */
|
|
3672
|
+
audited: boolean;
|
|
3673
|
+
/** Recent */
|
|
3674
|
+
recent: components["schemas"]["EventLogSummary"][];
|
|
3675
|
+
/** Leadsto */
|
|
3676
|
+
leadsTo: components["schemas"]["EventTypeRef"][];
|
|
3677
|
+
/** Causedby */
|
|
3678
|
+
causedBy: components["schemas"]["EventTypeRef"][];
|
|
3679
|
+
};
|
|
3421
3680
|
/**
|
|
3422
3681
|
* EventFeed
|
|
3423
3682
|
* @description Events since a cursor, oldest first, plus the server's clock to poll from next.
|
|
@@ -3596,6 +3855,63 @@ interface components {
|
|
|
3596
3855
|
/** Relatedentitylabel */
|
|
3597
3856
|
relatedEntityLabel?: string | null;
|
|
3598
3857
|
};
|
|
3858
|
+
/**
|
|
3859
|
+
* EventReaction
|
|
3860
|
+
* @description One thing that runs when the event happens.
|
|
3861
|
+
*/
|
|
3862
|
+
EventReaction: {
|
|
3863
|
+
/**
|
|
3864
|
+
* Kind
|
|
3865
|
+
* @enum {string}
|
|
3866
|
+
*/
|
|
3867
|
+
kind: "workflow" | "integration_action" | "email" | "webhook" | "builtin";
|
|
3868
|
+
/** Id */
|
|
3869
|
+
id?: string | null;
|
|
3870
|
+
/** Name */
|
|
3871
|
+
name: string;
|
|
3872
|
+
/** Enabled */
|
|
3873
|
+
enabled: boolean;
|
|
3874
|
+
/** Detail */
|
|
3875
|
+
detail?: string | null;
|
|
3876
|
+
/** Triggertype */
|
|
3877
|
+
triggerType?: string | null;
|
|
3878
|
+
/** Managedat */
|
|
3879
|
+
managedAt?: string | null;
|
|
3880
|
+
installedBy?: components["schemas"]["InstalledBy"] | null;
|
|
3881
|
+
};
|
|
3882
|
+
/**
|
|
3883
|
+
* EventSender
|
|
3884
|
+
* @description One thing that sends the event: Marvin itself (a line from the catalog) or a row in this workspace.
|
|
3885
|
+
*/
|
|
3886
|
+
EventSender: {
|
|
3887
|
+
/**
|
|
3888
|
+
* Kind
|
|
3889
|
+
* @enum {string}
|
|
3890
|
+
*/
|
|
3891
|
+
kind: "marvin" | "workflow" | "incoming_webhook" | "scheduled_task";
|
|
3892
|
+
/** Id */
|
|
3893
|
+
id?: string | null;
|
|
3894
|
+
/** Name */
|
|
3895
|
+
name: string;
|
|
3896
|
+
/** Enabled */
|
|
3897
|
+
enabled: boolean;
|
|
3898
|
+
/** Detail */
|
|
3899
|
+
detail?: string | null;
|
|
3900
|
+
/** Viaworkflowid */
|
|
3901
|
+
viaWorkflowId?: string | null;
|
|
3902
|
+
/** Viaworkflowname */
|
|
3903
|
+
viaWorkflowName?: string | null;
|
|
3904
|
+
/** Managedat */
|
|
3905
|
+
managedAt?: string | null;
|
|
3906
|
+
installedBy?: components["schemas"]["InstalledBy"] | null;
|
|
3907
|
+
};
|
|
3908
|
+
/** EventTypeRef */
|
|
3909
|
+
EventTypeRef: {
|
|
3910
|
+
/** Eventtype */
|
|
3911
|
+
eventType: string;
|
|
3912
|
+
/** Name */
|
|
3913
|
+
name: string;
|
|
3914
|
+
};
|
|
3599
3915
|
/**
|
|
3600
3916
|
* ForgotPassword
|
|
3601
3917
|
* @description Schema for the "forgot password" request.
|
|
@@ -4127,6 +4443,10 @@ interface components {
|
|
|
4127
4443
|
receivedCount: number;
|
|
4128
4444
|
/** Lastreceivedat */
|
|
4129
4445
|
lastReceivedAt?: string | null;
|
|
4446
|
+
/** Sourceintegrationid */
|
|
4447
|
+
sourceIntegrationId?: string | null;
|
|
4448
|
+
/** Sourceblueprint */
|
|
4449
|
+
sourceBlueprint?: string | null;
|
|
4130
4450
|
};
|
|
4131
4451
|
/** IncomingWebhookUpdate */
|
|
4132
4452
|
IncomingWebhookUpdate: {
|
|
@@ -4149,6 +4469,23 @@ interface components {
|
|
|
4149
4469
|
[key: string]: unknown;
|
|
4150
4470
|
} | null;
|
|
4151
4471
|
};
|
|
4472
|
+
/**
|
|
4473
|
+
* InstalledBy
|
|
4474
|
+
* @description The integration whose blueprint created a workflow, task, incoming webhook or integration action.
|
|
4475
|
+
*/
|
|
4476
|
+
InstalledBy: {
|
|
4477
|
+
/**
|
|
4478
|
+
* Integrationid
|
|
4479
|
+
* Format: uuid4
|
|
4480
|
+
*/
|
|
4481
|
+
integrationId: string;
|
|
4482
|
+
/** Name */
|
|
4483
|
+
name: string;
|
|
4484
|
+
/** Provider */
|
|
4485
|
+
provider: string;
|
|
4486
|
+
/** Blueprint */
|
|
4487
|
+
blueprint?: string | null;
|
|
4488
|
+
};
|
|
4152
4489
|
/**
|
|
4153
4490
|
* InstalledModels
|
|
4154
4491
|
* @description The models actually present in the workspace's active provider (e.g. Ollama's /api/tags).
|
|
@@ -4359,6 +4696,10 @@ interface components {
|
|
|
4359
4696
|
} | null;
|
|
4360
4697
|
/** Enabled */
|
|
4361
4698
|
enabled: boolean;
|
|
4699
|
+
/** Sourceintegrationid */
|
|
4700
|
+
sourceIntegrationId?: string | null;
|
|
4701
|
+
/** Sourceblueprint */
|
|
4702
|
+
sourceBlueprint?: string | null;
|
|
4362
4703
|
};
|
|
4363
4704
|
/** IntegrationEventSubscriptionUpdate */
|
|
4364
4705
|
IntegrationEventSubscriptionUpdate: {
|
|
@@ -6070,6 +6411,10 @@ interface components {
|
|
|
6070
6411
|
} | null;
|
|
6071
6412
|
/** Lastdurationms */
|
|
6072
6413
|
lastDurationMs?: number | null;
|
|
6414
|
+
/** Sourceintegrationid */
|
|
6415
|
+
sourceIntegrationId?: string | null;
|
|
6416
|
+
/** Sourceblueprint */
|
|
6417
|
+
sourceBlueprint?: string | null;
|
|
6073
6418
|
};
|
|
6074
6419
|
/**
|
|
6075
6420
|
* ScheduledTaskUpdate
|
|
@@ -7490,6 +7835,20 @@ interface components {
|
|
|
7490
7835
|
/** Workspace */
|
|
7491
7836
|
workspace: string;
|
|
7492
7837
|
};
|
|
7838
|
+
/** WorkspaceEventReactions */
|
|
7839
|
+
WorkspaceEventReactions: {
|
|
7840
|
+
/**
|
|
7841
|
+
* Workspaceid
|
|
7842
|
+
* Format: uuid4
|
|
7843
|
+
*/
|
|
7844
|
+
workspaceId: string;
|
|
7845
|
+
/** Workspacename */
|
|
7846
|
+
workspaceName?: string | null;
|
|
7847
|
+
/** Workspaceslug */
|
|
7848
|
+
workspaceSlug?: string | null;
|
|
7849
|
+
/** Reactions */
|
|
7850
|
+
reactions: components["schemas"]["EventReaction"][];
|
|
7851
|
+
};
|
|
7493
7852
|
/**
|
|
7494
7853
|
* WorkspaceInfo
|
|
7495
7854
|
* @description Public workspace information for publishing API.
|
package/dist/index.cjs
CHANGED
|
@@ -510,6 +510,9 @@ var init_HttpClient = __esm({
|
|
|
510
510
|
errorText
|
|
511
511
|
);
|
|
512
512
|
}
|
|
513
|
+
if (options?.responseType === "binary") {
|
|
514
|
+
return await this.readBinary(response, method, endpoint);
|
|
515
|
+
}
|
|
513
516
|
const data = await this.readBody(response, method, endpoint);
|
|
514
517
|
if (this.debug && data !== void 0) {
|
|
515
518
|
const sanitized = this.sanitizeForLogging(data);
|
|
@@ -555,12 +558,34 @@ var init_HttpClient = __esm({
|
|
|
555
558
|
);
|
|
556
559
|
}
|
|
557
560
|
}
|
|
561
|
+
/** A successful response's bytes; a 204/205 is an empty array. A failed read is a network error. */
|
|
562
|
+
async readBinary(response, method, endpoint) {
|
|
563
|
+
const contentType = response.headers.get("content-type");
|
|
564
|
+
if (response.status === 204 || response.status === 205) {
|
|
565
|
+
return { data: new Uint8Array(0), contentType };
|
|
566
|
+
}
|
|
567
|
+
try {
|
|
568
|
+
return { data: new Uint8Array(await response.arrayBuffer()), contentType };
|
|
569
|
+
} catch (error) {
|
|
570
|
+
const cause = error instanceof Error ? error : void 0;
|
|
571
|
+
throw new MarvinNetworkError(
|
|
572
|
+
`Reading the ${response.status} response to ${method} ${endpoint} failed: ${cause?.message ?? String(error)}`,
|
|
573
|
+
cause
|
|
574
|
+
);
|
|
575
|
+
}
|
|
576
|
+
}
|
|
558
577
|
/**
|
|
559
578
|
* GET request
|
|
560
579
|
*/
|
|
561
580
|
async get(endpoint, params) {
|
|
562
581
|
return this.request("GET", endpoint, { params });
|
|
563
582
|
}
|
|
583
|
+
/**
|
|
584
|
+
* GET a binary body (a file download). Follows redirects; retried like any GET.
|
|
585
|
+
*/
|
|
586
|
+
async getBinary(endpoint, params) {
|
|
587
|
+
return this.request("GET", endpoint, { params, responseType: "binary" });
|
|
588
|
+
}
|
|
564
589
|
/**
|
|
565
590
|
* POST request
|
|
566
591
|
*/
|
|
@@ -993,6 +1018,11 @@ var init_entry = __esm({
|
|
|
993
1018
|
});
|
|
994
1019
|
|
|
995
1020
|
// src/entries/entries.ts
|
|
1021
|
+
function csv(value) {
|
|
1022
|
+
if (value === void 0) return void 0;
|
|
1023
|
+
const joined = (Array.isArray(value) ? value : [value]).map((v) => v.trim()).filter(Boolean).join(",");
|
|
1024
|
+
return joined || void 0;
|
|
1025
|
+
}
|
|
996
1026
|
function toListEntry(raw) {
|
|
997
1027
|
const { collections, ...rest } = raw;
|
|
998
1028
|
return {
|
|
@@ -1020,6 +1050,9 @@ var init_entries = __esm({
|
|
|
1020
1050
|
const queryString = this.http.buildQueryString({
|
|
1021
1051
|
entry_type: options.entryType,
|
|
1022
1052
|
collection: options.collection,
|
|
1053
|
+
tag: csv(options.tag),
|
|
1054
|
+
slug: csv(options.slug),
|
|
1055
|
+
updated_since: options.updatedSince instanceof Date ? options.updatedSince.toISOString() : options.updatedSince,
|
|
1023
1056
|
limit: options.limit,
|
|
1024
1057
|
offset: options.offset,
|
|
1025
1058
|
expand: options.expand
|
|
@@ -1253,6 +1286,14 @@ var init_assets = __esm({
|
|
|
1253
1286
|
const endpoint = `/api/publish/${this.workspaceSlug}/assets/${slugOrId}`;
|
|
1254
1287
|
return this.http.fetch(endpoint);
|
|
1255
1288
|
}
|
|
1289
|
+
/**
|
|
1290
|
+
* Download a published asset's file by slug: its bytes and content type. The file route
|
|
1291
|
+
* redirects to storage; the redirect is followed. Needs the `read:assets` permission.
|
|
1292
|
+
*/
|
|
1293
|
+
async download(slug) {
|
|
1294
|
+
const validSlug = this.http.validatePathParam(slug, "asset slug");
|
|
1295
|
+
return this.http.getBinary(`/api/publish/${this.workspaceSlug}/assets/${validSlug}/file`);
|
|
1296
|
+
}
|
|
1256
1297
|
/**
|
|
1257
1298
|
* Convenience: Get all images
|
|
1258
1299
|
*/
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { M as MarvinConfig, a as MarvinClient } from './marvin-
|
|
2
|
-
export { C as Collection, E as Entry, b as MarvinApiError, c as MarvinAuthError, d as MarvinCache, e as MarvinConfigError, f as MarvinError, g as MarvinNetworkError, h as MarvinNotFoundError, i as MarvinServerError, j as MarvinValidationError, P as PaginatedResponse, k as PaginationMeta, l as PaginationParams, R as Resource, W as Workspace, m as createConfigFromEnv, n as createPaginatedResponse, o as extractData, p as isFullEntryData, q as isPaginatedResponse, r as offsetToPage, s as pageToOffset } from './marvin-
|
|
3
|
-
import { H as HttpClient } from './HttpClient-
|
|
4
|
-
export { A as AuthStrategy, B as BearerTokenAuth, a as HttpClientConfig, N as NoAuth, S as SessionAuth } from './HttpClient-
|
|
5
|
-
import { A as AuthToken$1 } from './index-
|
|
6
|
-
export { C as CollectionContext, a as CollectionEntry, b as CollectionEntryMetadata, E as EntryAsset, c as EntryCollectionContext, d as EntryResource, e as ExpandOptions, G as GetAssetsOptions, f as GetEntriesOptions, g as GetResourcesOptions, L as ListEntry, M as MarvinAsset, h as MarvinCollection, i as MarvinCollectionExpanded, j as MarvinEntry, k as MarvinEntryListItem, l as MarvinEntryType, m as MarvinPublishResponse, n as MarvinResource, o as MarvinSite, P as PublishedAssetRead, p as PublishedCollectionSummary, q as PublishedEntryAsset, r as PublishedEntryResource, s as PublishedEntryType, S as SiteConfiguration, W as WorkspaceInfo } from './index-
|
|
1
|
+
import { M as MarvinConfig, a as MarvinClient } from './marvin-5BuvJtTp.cjs';
|
|
2
|
+
export { C as Collection, E as Entry, b as MarvinApiError, c as MarvinAuthError, d as MarvinCache, e as MarvinConfigError, f as MarvinError, g as MarvinNetworkError, h as MarvinNotFoundError, i as MarvinServerError, j as MarvinValidationError, P as PaginatedResponse, k as PaginationMeta, l as PaginationParams, R as Resource, W as Workspace, m as createConfigFromEnv, n as createPaginatedResponse, o as extractData, p as isFullEntryData, q as isPaginatedResponse, r as offsetToPage, s as pageToOffset } from './marvin-5BuvJtTp.cjs';
|
|
3
|
+
import { H as HttpClient } from './HttpClient-DXMNOPqu.cjs';
|
|
4
|
+
export { A as AuthStrategy, B as BearerTokenAuth, a as BinaryResponse, b as HttpClientConfig, N as NoAuth, S as SessionAuth } from './HttpClient-DXMNOPqu.cjs';
|
|
5
|
+
import { A as AuthToken$1 } from './index-7sv2m2Pe.cjs';
|
|
6
|
+
export { C as CollectionContext, a as CollectionEntry, b as CollectionEntryMetadata, E as EntryAsset, c as EntryCollectionContext, d as EntryResource, e as ExpandOptions, G as GetAssetsOptions, f as GetEntriesOptions, g as GetResourcesOptions, L as ListEntry, M as MarvinAsset, h as MarvinCollection, i as MarvinCollectionExpanded, j as MarvinEntry, k as MarvinEntryListItem, l as MarvinEntryType, m as MarvinPublishResponse, n as MarvinResource, o as MarvinSite, P as PublishedAssetRead, p as PublishedCollectionSummary, q as PublishedEntryAsset, r as PublishedEntryResource, s as PublishedEntryType, S as SiteConfiguration, W as WorkspaceInfo } from './index-7sv2m2Pe.cjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Authentication & User Registration
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { M as MarvinConfig, a as MarvinClient } from './marvin-
|
|
2
|
-
export { C as Collection, E as Entry, b as MarvinApiError, c as MarvinAuthError, d as MarvinCache, e as MarvinConfigError, f as MarvinError, g as MarvinNetworkError, h as MarvinNotFoundError, i as MarvinServerError, j as MarvinValidationError, P as PaginatedResponse, k as PaginationMeta, l as PaginationParams, R as Resource, W as Workspace, m as createConfigFromEnv, n as createPaginatedResponse, o as extractData, p as isFullEntryData, q as isPaginatedResponse, r as offsetToPage, s as pageToOffset } from './marvin-
|
|
3
|
-
import { H as HttpClient } from './HttpClient-
|
|
4
|
-
export { A as AuthStrategy, B as BearerTokenAuth, a as HttpClientConfig, N as NoAuth, S as SessionAuth } from './HttpClient-
|
|
5
|
-
import { A as AuthToken$1 } from './index-
|
|
6
|
-
export { C as CollectionContext, a as CollectionEntry, b as CollectionEntryMetadata, E as EntryAsset, c as EntryCollectionContext, d as EntryResource, e as ExpandOptions, G as GetAssetsOptions, f as GetEntriesOptions, g as GetResourcesOptions, L as ListEntry, M as MarvinAsset, h as MarvinCollection, i as MarvinCollectionExpanded, j as MarvinEntry, k as MarvinEntryListItem, l as MarvinEntryType, m as MarvinPublishResponse, n as MarvinResource, o as MarvinSite, P as PublishedAssetRead, p as PublishedCollectionSummary, q as PublishedEntryAsset, r as PublishedEntryResource, s as PublishedEntryType, S as SiteConfiguration, W as WorkspaceInfo } from './index-
|
|
1
|
+
import { M as MarvinConfig, a as MarvinClient } from './marvin-Bm0EveOU.js';
|
|
2
|
+
export { C as Collection, E as Entry, b as MarvinApiError, c as MarvinAuthError, d as MarvinCache, e as MarvinConfigError, f as MarvinError, g as MarvinNetworkError, h as MarvinNotFoundError, i as MarvinServerError, j as MarvinValidationError, P as PaginatedResponse, k as PaginationMeta, l as PaginationParams, R as Resource, W as Workspace, m as createConfigFromEnv, n as createPaginatedResponse, o as extractData, p as isFullEntryData, q as isPaginatedResponse, r as offsetToPage, s as pageToOffset } from './marvin-Bm0EveOU.js';
|
|
3
|
+
import { H as HttpClient } from './HttpClient-DXMNOPqu.js';
|
|
4
|
+
export { A as AuthStrategy, B as BearerTokenAuth, a as BinaryResponse, b as HttpClientConfig, N as NoAuth, S as SessionAuth } from './HttpClient-DXMNOPqu.js';
|
|
5
|
+
import { A as AuthToken$1 } from './index-7sv2m2Pe.js';
|
|
6
|
+
export { C as CollectionContext, a as CollectionEntry, b as CollectionEntryMetadata, E as EntryAsset, c as EntryCollectionContext, d as EntryResource, e as ExpandOptions, G as GetAssetsOptions, f as GetEntriesOptions, g as GetResourcesOptions, L as ListEntry, M as MarvinAsset, h as MarvinCollection, i as MarvinCollectionExpanded, j as MarvinEntry, k as MarvinEntryListItem, l as MarvinEntryType, m as MarvinPublishResponse, n as MarvinResource, o as MarvinSite, P as PublishedAssetRead, p as PublishedCollectionSummary, q as PublishedEntryAsset, r as PublishedEntryResource, s as PublishedEntryType, S as SiteConfiguration, W as WorkspaceInfo } from './index-7sv2m2Pe.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Authentication & User Registration
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
init_workspace,
|
|
15
15
|
isFullEntryData,
|
|
16
16
|
marvin_exports
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KXI2FQSO.js";
|
|
18
18
|
import {
|
|
19
19
|
BearerTokenAuth,
|
|
20
20
|
HttpClient,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
offsetToPage,
|
|
38
38
|
pageToOffset,
|
|
39
39
|
validateEmail
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-LTX3MAUE.js";
|
|
41
41
|
|
|
42
42
|
// src/index.ts
|
|
43
43
|
init_marvin();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as PublishedEntryType, n as MarvinResource, M as MarvinAsset, h as MarvinCollection, a as CollectionEntry, j as MarvinEntry, E as EntryAsset, c as EntryCollectionContext, d as EntryResource, p as PublishedCollectionSummary, e as ExpandOptions, L as ListEntry, o as MarvinSite, g as GetResourcesOptions$1 } from './index-
|
|
2
|
-
import { H as HttpClient } from './HttpClient-
|
|
1
|
+
import { s as PublishedEntryType, n as MarvinResource, M as MarvinAsset, h as MarvinCollection, a as CollectionEntry, j as MarvinEntry, E as EntryAsset, c as EntryCollectionContext, d as EntryResource, p as PublishedCollectionSummary, e as ExpandOptions, L as ListEntry, o as MarvinSite, g as GetResourcesOptions$1 } from './index-7sv2m2Pe.cjs';
|
|
2
|
+
import { H as HttpClient, a as BinaryResponse } from './HttpClient-DXMNOPqu.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Marvin SDK Configuration
|
|
@@ -274,6 +274,11 @@ declare class AssetsModule {
|
|
|
274
274
|
* Get a single published asset by slug or ID
|
|
275
275
|
*/
|
|
276
276
|
get(slugOrId: string): Promise<MarvinAsset>;
|
|
277
|
+
/**
|
|
278
|
+
* Download a published asset's file by slug: its bytes and content type. The file route
|
|
279
|
+
* redirects to storage; the redirect is followed. Needs the `read:assets` permission.
|
|
280
|
+
*/
|
|
281
|
+
download(slug: string): Promise<BinaryResponse>;
|
|
277
282
|
/**
|
|
278
283
|
* Convenience: Get all images
|
|
279
284
|
*/
|
|
@@ -409,6 +414,12 @@ declare class CollectionsModule {
|
|
|
409
414
|
interface GetEntriesOptions {
|
|
410
415
|
entryType?: string;
|
|
411
416
|
collection?: string;
|
|
417
|
+
/** Only entries carrying any of these tag slugs. */
|
|
418
|
+
tag?: string | string[];
|
|
419
|
+
/** Only entries with these slugs. */
|
|
420
|
+
slug?: string | string[];
|
|
421
|
+
/** Only entries updated at or after this time (ISO 8601, or a Date). */
|
|
422
|
+
updatedSince?: string | Date;
|
|
412
423
|
limit?: number;
|
|
413
424
|
offset?: number;
|
|
414
425
|
status?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as PublishedEntryType, n as MarvinResource, M as MarvinAsset, h as MarvinCollection, a as CollectionEntry, j as MarvinEntry, E as EntryAsset, c as EntryCollectionContext, d as EntryResource, p as PublishedCollectionSummary, e as ExpandOptions, L as ListEntry, o as MarvinSite, g as GetResourcesOptions$1 } from './index-
|
|
2
|
-
import { H as HttpClient } from './HttpClient-
|
|
1
|
+
import { s as PublishedEntryType, n as MarvinResource, M as MarvinAsset, h as MarvinCollection, a as CollectionEntry, j as MarvinEntry, E as EntryAsset, c as EntryCollectionContext, d as EntryResource, p as PublishedCollectionSummary, e as ExpandOptions, L as ListEntry, o as MarvinSite, g as GetResourcesOptions$1 } from './index-7sv2m2Pe.js';
|
|
2
|
+
import { H as HttpClient, a as BinaryResponse } from './HttpClient-DXMNOPqu.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Marvin SDK Configuration
|
|
@@ -274,6 +274,11 @@ declare class AssetsModule {
|
|
|
274
274
|
* Get a single published asset by slug or ID
|
|
275
275
|
*/
|
|
276
276
|
get(slugOrId: string): Promise<MarvinAsset>;
|
|
277
|
+
/**
|
|
278
|
+
* Download a published asset's file by slug: its bytes and content type. The file route
|
|
279
|
+
* redirects to storage; the redirect is followed. Needs the `read:assets` permission.
|
|
280
|
+
*/
|
|
281
|
+
download(slug: string): Promise<BinaryResponse>;
|
|
277
282
|
/**
|
|
278
283
|
* Convenience: Get all images
|
|
279
284
|
*/
|
|
@@ -409,6 +414,12 @@ declare class CollectionsModule {
|
|
|
409
414
|
interface GetEntriesOptions {
|
|
410
415
|
entryType?: string;
|
|
411
416
|
collection?: string;
|
|
417
|
+
/** Only entries carrying any of these tag slugs. */
|
|
418
|
+
tag?: string | string[];
|
|
419
|
+
/** Only entries with these slugs. */
|
|
420
|
+
slug?: string | string[];
|
|
421
|
+
/** Only entries updated at or after this time (ISO 8601, or a Date). */
|
|
422
|
+
updatedSince?: string | Date;
|
|
412
423
|
limit?: number;
|
|
413
424
|
offset?: number;
|
|
414
425
|
status?: string;
|