@membranehq/sdk 0.15.4 → 0.15.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.
- package/dist/bundle.d.ts +69 -4
- package/dist/bundle.js +163 -6
- package/dist/bundle.js.map +1 -1
- package/dist/dts/accessors/connections-accessors.d.ts +1 -0
- package/dist/dts/accessors/integrations-accessors.d.ts +1 -0
- package/dist/dts/api-client.d.ts +6 -2
- package/dist/dts/auth/auth-context-permissions.d.ts +59 -0
- package/dist/dts/auth/index.d.ts +1 -0
- package/dist/dts/orgs/types.d.ts +37 -0
- package/dist/dts/scenario-templates/index.d.ts +2 -0
- package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +14 -0
- package/dist/dts/workspace-elements/api/actions-api.d.ts +25 -0
- package/dist/dts/workspace-elements/api/app-data-schema-instances-api.d.ts +2 -0
- package/dist/dts/workspace-elements/api/app-data-schemas-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/app-event-log-records-api.d.ts +2 -0
- package/dist/dts/workspace-elements/api/app-event-subscriptions-api.d.ts +2 -0
- package/dist/dts/workspace-elements/api/app-event-types-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/connections-api.d.ts +3 -0
- package/dist/dts/workspace-elements/api/customers-api.d.ts +1 -1
- package/dist/dts/workspace-elements/api/data-link-table-instances-api.d.ts +3 -0
- package/dist/dts/workspace-elements/api/data-link-tables-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/data-sources-api.d.ts +12 -0
- package/dist/dts/workspace-elements/api/external-api-logs-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/external-events-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/field-mappings-api.d.ts +32 -10
- package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +4 -0
- package/dist/dts/workspace-elements/api/flows-api.d.ts +11 -0
- package/dist/dts/workspace-elements/api/integrations-api.d.ts +2 -0
- package/dist/dts/workspace-elements/api/packages-api.d.ts +3 -0
- package/dist/dts/workspace-elements/base/action-instances/index.d.ts +3 -0
- package/dist/dts/workspace-elements/base/actions/index.d.ts +6 -0
- package/dist/dts/workspace-elements/base/app-data-schemas/index.d.ts +2 -0
- package/dist/dts/workspace-elements/base/app-event-subscriptions/index.d.ts +1 -0
- package/dist/dts/workspace-elements/base/app-event-types/index.d.ts +1 -0
- package/dist/dts/workspace-elements/base/connectors/index.d.ts +2 -4
- package/dist/dts/workspace-elements/base/data-collections/schemas.d.ts +1 -1
- package/dist/dts/workspace-elements/base/data-link-tables/index.d.ts +2 -0
- package/dist/dts/workspace-elements/base/data-sources/index.d.ts +2 -0
- package/dist/dts/workspace-elements/base/field-mappings/index.d.ts +2 -0
- package/dist/dts/workspace-elements/base/flows/index.d.ts +2 -0
- package/dist/dts/workspace-elements/base/integrations/index.d.ts +2 -0
- package/dist/dts/workspace-elements/base/packages/index.d.ts +1 -0
- package/dist/dts/workspace-elements/types.d.ts +5 -0
- package/dist/dts/workspaces/types.d.ts +33 -1
- package/dist/index.browser.d.mts +309 -39
- package/dist/index.browser.d.ts +309 -39
- package/dist/index.browser.js +126 -9
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +124 -10
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +309 -39
- package/dist/index.node.d.ts +309 -39
- package/dist/index.node.js +126 -9
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +124 -10
- package/dist/index.node.mjs.map +1 -1
- package/package.json +1 -1
package/dist/bundle.d.ts
CHANGED
|
@@ -11,6 +11,20 @@ declare class PaginationResponse<T> {
|
|
|
11
11
|
cursor?: string;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
declare enum LogRecordType {
|
|
15
|
+
MSG = "message",
|
|
16
|
+
TEXT = "text",
|
|
17
|
+
ERR = "error",
|
|
18
|
+
DATA = "data",
|
|
19
|
+
COMP = "compare",
|
|
20
|
+
API = "api-request"
|
|
21
|
+
}
|
|
22
|
+
interface LogRecord {
|
|
23
|
+
type?: LogRecordType;
|
|
24
|
+
msg?: string;
|
|
25
|
+
data?: any;
|
|
26
|
+
}
|
|
27
|
+
|
|
14
28
|
interface MembraneClientOptions {
|
|
15
29
|
token?: string;
|
|
16
30
|
fetchToken?: () => Promise<string>;
|
|
@@ -25,6 +39,7 @@ declare class MembraneApiClient {
|
|
|
25
39
|
uiUri: string;
|
|
26
40
|
token?: string;
|
|
27
41
|
protected fetchToken?: () => Promise<string>;
|
|
42
|
+
private logs;
|
|
28
43
|
constructor(options?: MembraneClientOptions);
|
|
29
44
|
setCredentials(credentials: any): Promise<any>;
|
|
30
45
|
getToken(): Promise<string>;
|
|
@@ -33,6 +48,7 @@ declare class MembraneApiClient {
|
|
|
33
48
|
put<T = any>(uri: string, data?: any, options?: AxiosRequestConfig): Promise<T>;
|
|
34
49
|
patch<T = any>(uri: string, data?: any, options?: AxiosRequestConfig): Promise<T>;
|
|
35
50
|
delete<T = any>(uri: string, data?: any, options?: AxiosRequestConfig): Promise<T>;
|
|
51
|
+
retrieveLogs(): LogRecord[];
|
|
36
52
|
createEventSource(uri: string, queryParams?: Record<string, any>): Promise<EventSource>;
|
|
37
53
|
getEmbedUri(page: string, pageParams?: Record<string, any>, options?: {
|
|
38
54
|
embedMode: 'isolated-embed' | 'popup-embed';
|
|
@@ -45,6 +61,7 @@ declare class MembraneApiClient {
|
|
|
45
61
|
};
|
|
46
62
|
}>;
|
|
47
63
|
private makeApiRequest;
|
|
64
|
+
private log;
|
|
48
65
|
private handleRequestError;
|
|
49
66
|
}
|
|
50
67
|
|
|
@@ -422,6 +439,7 @@ declare const ConnectionApiResponse: z.ZodObject<{
|
|
|
422
439
|
revision: z.ZodOptional<z.ZodString>;
|
|
423
440
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
424
441
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
442
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
425
443
|
logoUri: z.ZodString;
|
|
426
444
|
connectorId: z.ZodOptional<z.ZodString>;
|
|
427
445
|
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -519,8 +537,11 @@ declare const ActionApiResponse: z.ZodObject<{
|
|
|
519
537
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
520
538
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
521
539
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
540
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
522
541
|
isCustomized: z.ZodOptional<z.ZodBoolean>;
|
|
523
542
|
universalParentId: z.ZodOptional<z.ZodString>;
|
|
543
|
+
isPublic: z.ZodOptional<z.ZodBoolean>;
|
|
544
|
+
externalAppUuid: z.ZodOptional<z.ZodString>;
|
|
524
545
|
userId: z.ZodOptional<z.ZodString>;
|
|
525
546
|
tenantId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
526
547
|
integration: z.ZodOptional<z.ZodObject<{
|
|
@@ -535,6 +556,7 @@ declare const ActionApiResponse: z.ZodObject<{
|
|
|
535
556
|
revision: z.ZodOptional<z.ZodString>;
|
|
536
557
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
537
558
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
559
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
538
560
|
logoUri: z.ZodString;
|
|
539
561
|
connectorId: z.ZodOptional<z.ZodString>;
|
|
540
562
|
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -607,9 +629,12 @@ declare const ActionApiResponse: z.ZodObject<{
|
|
|
607
629
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
608
630
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
609
631
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
632
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
610
633
|
isCustomized: z.ZodOptional<z.ZodBoolean>;
|
|
611
634
|
universalParentId: z.ZodOptional<z.ZodString>;
|
|
612
635
|
outputSchema: z.ZodOptional<z.ZodAny>;
|
|
636
|
+
isPublic: z.ZodOptional<z.ZodBoolean>;
|
|
637
|
+
externalAppUuid: z.ZodOptional<z.ZodString>;
|
|
613
638
|
userId: z.ZodOptional<z.ZodString>;
|
|
614
639
|
tenantId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
615
640
|
}, z.core.$strip>>;
|
|
@@ -640,9 +665,12 @@ declare const ActionApiResponse: z.ZodObject<{
|
|
|
640
665
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
641
666
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
642
667
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
668
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
643
669
|
isCustomized: z.ZodOptional<z.ZodBoolean>;
|
|
644
670
|
universalParentId: z.ZodOptional<z.ZodString>;
|
|
645
671
|
outputSchema: z.ZodOptional<z.ZodAny>;
|
|
672
|
+
isPublic: z.ZodOptional<z.ZodBoolean>;
|
|
673
|
+
externalAppUuid: z.ZodOptional<z.ZodString>;
|
|
646
674
|
userId: z.ZodOptional<z.ZodString>;
|
|
647
675
|
tenantId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
648
676
|
}, z.core.$strip>;
|
|
@@ -658,6 +686,7 @@ declare const ActionApiResponse: z.ZodObject<{
|
|
|
658
686
|
revision: z.ZodOptional<z.ZodString>;
|
|
659
687
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
660
688
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
689
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
661
690
|
logoUri: z.ZodString;
|
|
662
691
|
connectorId: z.ZodOptional<z.ZodString>;
|
|
663
692
|
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -717,6 +746,7 @@ declare const FindActionsQuery: z.ZodObject<{
|
|
|
717
746
|
}>>;
|
|
718
747
|
parentId: z.ZodOptional<z.ZodString>;
|
|
719
748
|
universalParentId: z.ZodOptional<z.ZodString>;
|
|
749
|
+
intent: z.ZodOptional<z.ZodString>;
|
|
720
750
|
}, z.core.$strip>;
|
|
721
751
|
type FindActionsQuery = z.infer<typeof FindActionsQuery>;
|
|
722
752
|
declare const CreateActionRequest: z.ZodObject<{
|
|
@@ -880,9 +910,7 @@ interface OperationRunResponse {
|
|
|
880
910
|
declare const ConnectorSpec: z.ZodObject<{
|
|
881
911
|
key: z.ZodOptional<z.ZodString>;
|
|
882
912
|
name: z.ZodOptional<z.ZodString>;
|
|
883
|
-
appUri: z.ZodOptional<z.ZodString>;
|
|
884
913
|
logoUri: z.ZodOptional<z.ZodString>;
|
|
885
|
-
apiDocsUri: z.ZodOptional<z.ZodString>;
|
|
886
914
|
api: z.ZodOptional<z.ZodObject<{
|
|
887
915
|
type: z.ZodEnum<{
|
|
888
916
|
openapi: "openapi";
|
|
@@ -3004,7 +3032,7 @@ declare const DataCollectionDeleteRequest: z.ZodObject<{
|
|
|
3004
3032
|
id: z.ZodString;
|
|
3005
3033
|
}, z.core.$strip>;
|
|
3006
3034
|
type DataCollectionDeleteRequest = z.infer<typeof DataCollectionDeleteRequest>;
|
|
3007
|
-
declare const DataCollectionDeleteResponse: z.
|
|
3035
|
+
declare const DataCollectionDeleteResponse: z.ZodUndefined;
|
|
3008
3036
|
type DataCollectionDeleteResponse = z.infer<typeof DataCollectionDeleteResponse>;
|
|
3009
3037
|
|
|
3010
3038
|
declare enum FlowRunNodeState {
|
|
@@ -3149,6 +3177,7 @@ declare const BaseDataLinkTable: z.ZodObject<{
|
|
|
3149
3177
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
3150
3178
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
3151
3179
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
3180
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
3152
3181
|
integrationId: z.ZodOptional<z.ZodString>;
|
|
3153
3182
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
3154
3183
|
isCustomized: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3169,6 +3198,7 @@ declare const BaseAppEventType: z.ZodObject<{
|
|
|
3169
3198
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
3170
3199
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
3171
3200
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
3201
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
3172
3202
|
revision: z.ZodString;
|
|
3173
3203
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
3174
3204
|
webhookKey: z.ZodString;
|
|
@@ -3204,6 +3234,7 @@ declare const BaseAppDataSchema: z.ZodObject<{
|
|
|
3204
3234
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
3205
3235
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
3206
3236
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
3237
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
3207
3238
|
appDataSchemaRevision: z.ZodOptional<z.ZodString>;
|
|
3208
3239
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
3209
3240
|
isCustomized: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3323,6 +3354,7 @@ declare const FlowRunApiResponse: z.ZodObject<{
|
|
|
3323
3354
|
revision: z.ZodOptional<z.ZodString>;
|
|
3324
3355
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
3325
3356
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
3357
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
3326
3358
|
isCustomized: z.ZodOptional<z.ZodBoolean>;
|
|
3327
3359
|
flowRevision: z.ZodOptional<z.ZodString>;
|
|
3328
3360
|
universalFlowRevision: z.ZodOptional<z.ZodString>;
|
|
@@ -3375,6 +3407,7 @@ declare const FlowRunApiResponse: z.ZodObject<{
|
|
|
3375
3407
|
revision: z.ZodOptional<z.ZodString>;
|
|
3376
3408
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
3377
3409
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
3410
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
3378
3411
|
logoUri: z.ZodString;
|
|
3379
3412
|
connectorId: z.ZodOptional<z.ZodString>;
|
|
3380
3413
|
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -3500,6 +3533,7 @@ declare const FindFlowRunsResponse: z.ZodObject<{
|
|
|
3500
3533
|
revision: z.ZodOptional<z.ZodString>;
|
|
3501
3534
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
3502
3535
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
3536
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
3503
3537
|
isCustomized: z.ZodOptional<z.ZodBoolean>;
|
|
3504
3538
|
flowRevision: z.ZodOptional<z.ZodString>;
|
|
3505
3539
|
universalFlowRevision: z.ZodOptional<z.ZodString>;
|
|
@@ -3552,6 +3586,7 @@ declare const FindFlowRunsResponse: z.ZodObject<{
|
|
|
3552
3586
|
revision: z.ZodOptional<z.ZodString>;
|
|
3553
3587
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
3554
3588
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
3589
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
3555
3590
|
logoUri: z.ZodString;
|
|
3556
3591
|
connectorId: z.ZodOptional<z.ZodString>;
|
|
3557
3592
|
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -3653,6 +3688,7 @@ declare const FlowApiResponse: z.ZodObject<{
|
|
|
3653
3688
|
revision: z.ZodOptional<z.ZodString>;
|
|
3654
3689
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
3655
3690
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
3691
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
3656
3692
|
isCustomized: z.ZodOptional<z.ZodBoolean>;
|
|
3657
3693
|
flowRevision: z.ZodOptional<z.ZodString>;
|
|
3658
3694
|
universalFlowRevision: z.ZodOptional<z.ZodString>;
|
|
@@ -3678,6 +3714,7 @@ declare const FlowApiResponse: z.ZodObject<{
|
|
|
3678
3714
|
revision: z.ZodOptional<z.ZodString>;
|
|
3679
3715
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
3680
3716
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
3717
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
3681
3718
|
logoUri: z.ZodString;
|
|
3682
3719
|
connectorId: z.ZodOptional<z.ZodString>;
|
|
3683
3720
|
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -3761,6 +3798,7 @@ declare const FlowApiResponse: z.ZodObject<{
|
|
|
3761
3798
|
revision: z.ZodOptional<z.ZodString>;
|
|
3762
3799
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
3763
3800
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
3801
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
3764
3802
|
isCustomized: z.ZodOptional<z.ZodBoolean>;
|
|
3765
3803
|
flowRevision: z.ZodOptional<z.ZodString>;
|
|
3766
3804
|
universalFlowRevision: z.ZodOptional<z.ZodString>;
|
|
@@ -3787,6 +3825,7 @@ declare const FlowApiResponse: z.ZodObject<{
|
|
|
3787
3825
|
revision: z.ZodOptional<z.ZodString>;
|
|
3788
3826
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
3789
3827
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
3828
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
3790
3829
|
logoUri: z.ZodString;
|
|
3791
3830
|
connectorId: z.ZodOptional<z.ZodString>;
|
|
3792
3831
|
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -3910,6 +3949,7 @@ declare const FlowApiResponse: z.ZodObject<{
|
|
|
3910
3949
|
revision: z.ZodOptional<z.ZodString>;
|
|
3911
3950
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
3912
3951
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
3952
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
3913
3953
|
isCustomized: z.ZodOptional<z.ZodBoolean>;
|
|
3914
3954
|
flowRevision: z.ZodOptional<z.ZodString>;
|
|
3915
3955
|
universalFlowRevision: z.ZodOptional<z.ZodString>;
|
|
@@ -3944,6 +3984,7 @@ declare const FindFlowsQuery: z.ZodObject<{
|
|
|
3944
3984
|
}>>;
|
|
3945
3985
|
universalParentId: z.ZodOptional<z.ZodString>;
|
|
3946
3986
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
3987
|
+
externalAppId: z.ZodOptional<z.ZodString>;
|
|
3947
3988
|
flowId: z.ZodOptional<z.ZodString>;
|
|
3948
3989
|
universalFlowId: z.ZodOptional<z.ZodString>;
|
|
3949
3990
|
}, z.core.$strip>;
|
|
@@ -4103,6 +4144,7 @@ declare const DataSourceApiResponse: z.ZodObject<{
|
|
|
4103
4144
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
4104
4145
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
4105
4146
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
4147
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
4106
4148
|
dataSourceRevision: z.ZodOptional<z.ZodString>;
|
|
4107
4149
|
universalDataSourceRevision: z.ZodOptional<z.ZodString>;
|
|
4108
4150
|
defaultCollectionKey: z.ZodOptional<z.ZodString>;
|
|
@@ -4233,6 +4275,7 @@ declare const DataSourceApiResponse: z.ZodObject<{
|
|
|
4233
4275
|
revision: z.ZodOptional<z.ZodString>;
|
|
4234
4276
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
4235
4277
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
4278
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
4236
4279
|
logoUri: z.ZodString;
|
|
4237
4280
|
connectorId: z.ZodOptional<z.ZodString>;
|
|
4238
4281
|
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -4292,6 +4335,7 @@ declare const DataSourceApiResponse: z.ZodObject<{
|
|
|
4292
4335
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
4293
4336
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
4294
4337
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
4338
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
4295
4339
|
dataSourceRevision: z.ZodOptional<z.ZodString>;
|
|
4296
4340
|
universalDataSourceRevision: z.ZodOptional<z.ZodString>;
|
|
4297
4341
|
defaultCollectionKey: z.ZodOptional<z.ZodString>;
|
|
@@ -4423,6 +4467,7 @@ declare const DataSourceApiResponse: z.ZodObject<{
|
|
|
4423
4467
|
revision: z.ZodOptional<z.ZodString>;
|
|
4424
4468
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
4425
4469
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
4470
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
4426
4471
|
logoUri: z.ZodString;
|
|
4427
4472
|
connectorId: z.ZodOptional<z.ZodString>;
|
|
4428
4473
|
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -4522,6 +4567,7 @@ declare const DataSourceApiResponse: z.ZodObject<{
|
|
|
4522
4567
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
4523
4568
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
4524
4569
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
4570
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
4525
4571
|
dataSourceRevision: z.ZodOptional<z.ZodString>;
|
|
4526
4572
|
universalDataSourceRevision: z.ZodOptional<z.ZodString>;
|
|
4527
4573
|
defaultCollectionKey: z.ZodOptional<z.ZodString>;
|
|
@@ -4663,6 +4709,7 @@ declare const FindDataSourcesQuery: z.ZodObject<{
|
|
|
4663
4709
|
}>>;
|
|
4664
4710
|
universalParentId: z.ZodOptional<z.ZodString>;
|
|
4665
4711
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
4712
|
+
externalAppId: z.ZodOptional<z.ZodString>;
|
|
4666
4713
|
dataSourceId: z.ZodOptional<z.ZodString>;
|
|
4667
4714
|
universalDataSourceId: z.ZodOptional<z.ZodString>;
|
|
4668
4715
|
}, z.core.$strip>;
|
|
@@ -4797,6 +4844,7 @@ declare const UpdateIntegrationRequest: z.ZodObject<{
|
|
|
4797
4844
|
}, z.core.$strip>;
|
|
4798
4845
|
type UpdateIntegrationRequest = z.infer<typeof UpdateIntegrationRequest>;
|
|
4799
4846
|
declare const FindIntegrationsQuery: z.ZodObject<{
|
|
4847
|
+
appUuid: z.ZodOptional<z.ZodString>;
|
|
4800
4848
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
4801
4849
|
cursor: z.ZodOptional<z.ZodString>;
|
|
4802
4850
|
search: z.ZodOptional<z.ZodString>;
|
|
@@ -4819,6 +4867,7 @@ declare const IntegrationApiResponse: z.ZodObject<{
|
|
|
4819
4867
|
revision: z.ZodOptional<z.ZodString>;
|
|
4820
4868
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
4821
4869
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
4870
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
4822
4871
|
logoUri: z.ZodString;
|
|
4823
4872
|
connectorId: z.ZodOptional<z.ZodString>;
|
|
4824
4873
|
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -4929,6 +4978,7 @@ declare const PackageApiResponse: z.ZodObject<{
|
|
|
4929
4978
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
4930
4979
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
4931
4980
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
4981
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
4932
4982
|
uuid: z.ZodOptional<z.ZodString>;
|
|
4933
4983
|
description: z.ZodOptional<z.ZodString>;
|
|
4934
4984
|
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
@@ -4963,6 +5013,7 @@ declare const PackageApiResponse: z.ZodObject<{
|
|
|
4963
5013
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
4964
5014
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
4965
5015
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
5016
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
4966
5017
|
uuid: z.ZodOptional<z.ZodString>;
|
|
4967
5018
|
description: z.ZodOptional<z.ZodString>;
|
|
4968
5019
|
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
@@ -4997,6 +5048,7 @@ declare const PackageApiResponse: z.ZodObject<{
|
|
|
4997
5048
|
revision: z.ZodOptional<z.ZodString>;
|
|
4998
5049
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
4999
5050
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
5051
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
5000
5052
|
logoUri: z.ZodString;
|
|
5001
5053
|
connectorId: z.ZodOptional<z.ZodString>;
|
|
5002
5054
|
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -5080,7 +5132,7 @@ type ScreenApiResponse = z.infer<typeof ScreenApiResponse>;
|
|
|
5080
5132
|
|
|
5081
5133
|
declare const CreateCustomerRequest: z.ZodObject<{
|
|
5082
5134
|
name: z.ZodString;
|
|
5083
|
-
internalId: z.ZodString
|
|
5135
|
+
internalId: z.ZodOptional<z.ZodString>;
|
|
5084
5136
|
fields: z.ZodOptional<z.ZodAny>;
|
|
5085
5137
|
credentials: z.ZodOptional<z.ZodAny>;
|
|
5086
5138
|
}, z.core.$strip>;
|
|
@@ -5153,6 +5205,7 @@ declare const FieldMappingApiResponse: z.ZodObject<{
|
|
|
5153
5205
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
5154
5206
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
5155
5207
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
5208
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
5156
5209
|
fieldMappingRevision: z.ZodOptional<z.ZodString>;
|
|
5157
5210
|
universalFieldMappingRevision: z.ZodOptional<z.ZodString>;
|
|
5158
5211
|
dataSourceInstanceId: z.ZodOptional<z.ZodString>;
|
|
@@ -5174,6 +5227,7 @@ declare const FieldMappingApiResponse: z.ZodObject<{
|
|
|
5174
5227
|
revision: z.ZodOptional<z.ZodString>;
|
|
5175
5228
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
5176
5229
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
5230
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
5177
5231
|
logoUri: z.ZodString;
|
|
5178
5232
|
connectorId: z.ZodOptional<z.ZodString>;
|
|
5179
5233
|
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -5240,6 +5294,7 @@ declare const FieldMappingApiResponse: z.ZodObject<{
|
|
|
5240
5294
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
5241
5295
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
5242
5296
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
5297
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
5243
5298
|
fieldMappingRevision: z.ZodOptional<z.ZodString>;
|
|
5244
5299
|
universalFieldMappingRevision: z.ZodOptional<z.ZodString>;
|
|
5245
5300
|
dataSourceInstanceId: z.ZodOptional<z.ZodString>;
|
|
@@ -5262,6 +5317,7 @@ declare const FieldMappingApiResponse: z.ZodObject<{
|
|
|
5262
5317
|
revision: z.ZodOptional<z.ZodString>;
|
|
5263
5318
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
5264
5319
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
5320
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
5265
5321
|
logoUri: z.ZodString;
|
|
5266
5322
|
connectorId: z.ZodOptional<z.ZodString>;
|
|
5267
5323
|
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -5368,6 +5424,7 @@ declare const FieldMappingApiResponse: z.ZodObject<{
|
|
|
5368
5424
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
5369
5425
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
5370
5426
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
5427
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
5371
5428
|
fieldMappingRevision: z.ZodOptional<z.ZodString>;
|
|
5372
5429
|
universalFieldMappingRevision: z.ZodOptional<z.ZodString>;
|
|
5373
5430
|
dataSourceInstanceId: z.ZodOptional<z.ZodString>;
|
|
@@ -5398,6 +5455,7 @@ declare const FindFieldMappingsQuery: z.ZodObject<{
|
|
|
5398
5455
|
}>>;
|
|
5399
5456
|
universalParentId: z.ZodOptional<z.ZodString>;
|
|
5400
5457
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
5458
|
+
externalAppId: z.ZodOptional<z.ZodString>;
|
|
5401
5459
|
fieldMappingId: z.ZodOptional<z.ZodString>;
|
|
5402
5460
|
universalFieldMappingId: z.ZodOptional<z.ZodString>;
|
|
5403
5461
|
}, z.core.$strip>;
|
|
@@ -5525,6 +5583,7 @@ declare const DataLinkTableApiResponse: z.ZodObject<{
|
|
|
5525
5583
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
5526
5584
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
5527
5585
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
5586
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
5528
5587
|
integrationId: z.ZodOptional<z.ZodString>;
|
|
5529
5588
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
5530
5589
|
isCustomized: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -5637,6 +5696,7 @@ declare const AppEventSubscriptionApiResponse: z.ZodObject<{
|
|
|
5637
5696
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
5638
5697
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
5639
5698
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
5699
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
5640
5700
|
revision: z.ZodString;
|
|
5641
5701
|
appEventTypeId: z.ZodString;
|
|
5642
5702
|
instanceKey: z.ZodOptional<z.ZodString>;
|
|
@@ -5666,6 +5726,7 @@ declare const AppEventSubscriptionApiResponse: z.ZodObject<{
|
|
|
5666
5726
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
5667
5727
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
5668
5728
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
5729
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
5669
5730
|
revision: z.ZodString;
|
|
5670
5731
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
5671
5732
|
webhookKey: z.ZodString;
|
|
@@ -5741,6 +5802,7 @@ declare const AppDataSchemaApiResponse: z.ZodObject<{
|
|
|
5741
5802
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
5742
5803
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
5743
5804
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
5805
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
5744
5806
|
appDataSchemaRevision: z.ZodOptional<z.ZodString>;
|
|
5745
5807
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
5746
5808
|
isCustomized: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -5863,6 +5925,7 @@ declare const ExternalEventSubscriptionApiResponse: z.ZodObject<{
|
|
|
5863
5925
|
revision: z.ZodOptional<z.ZodString>;
|
|
5864
5926
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
5865
5927
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
5928
|
+
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
5866
5929
|
logoUri: z.ZodString;
|
|
5867
5930
|
connectorId: z.ZodOptional<z.ZodString>;
|
|
5868
5931
|
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -6109,6 +6172,7 @@ declare class ConnectionAccessor {
|
|
|
6109
6172
|
revision?: string | undefined;
|
|
6110
6173
|
createdAt?: string | undefined;
|
|
6111
6174
|
updatedAt?: string | undefined;
|
|
6175
|
+
isReadOnly?: boolean | undefined;
|
|
6112
6176
|
connectorId?: string | undefined;
|
|
6113
6177
|
connectorVersion?: string | undefined;
|
|
6114
6178
|
oAuthCallbackUri?: string | undefined;
|
|
@@ -6332,6 +6396,7 @@ declare class IntegrationAccessor extends ElementAccessor<IntegrationApiResponse
|
|
|
6332
6396
|
revision?: string | undefined;
|
|
6333
6397
|
createdAt?: string | undefined;
|
|
6334
6398
|
updatedAt?: string | undefined;
|
|
6399
|
+
isReadOnly?: boolean | undefined;
|
|
6335
6400
|
connectorId?: string | undefined;
|
|
6336
6401
|
connectorVersion?: string | undefined;
|
|
6337
6402
|
oAuthCallbackUri?: string | undefined;
|
package/dist/bundle.js
CHANGED
|
@@ -22208,6 +22208,7 @@
|
|
|
22208
22208
|
updatedAt: string$1().optional(),
|
|
22209
22209
|
archivedAt: string$1().optional(),
|
|
22210
22210
|
isDeactivated: boolean$1().optional(),
|
|
22211
|
+
isReadOnly: boolean$1().optional(),
|
|
22211
22212
|
});
|
|
22212
22213
|
const BaseMembraneInterface = BaseWorkspaceElement.merge(BaseMembraneInterfaceEditableProperties).merge(BaseMembraneInterfaceReadOnlyProperties);
|
|
22213
22214
|
const BaseIntegrationLevelMembraneInterfaceEditableProperties = BaseMembraneInterfaceEditableProperties.extend({
|
|
@@ -22285,6 +22286,12 @@
|
|
|
22285
22286
|
isFlag: true,
|
|
22286
22287
|
}),
|
|
22287
22288
|
layer: MembraneElementLayer.optional(),
|
|
22289
|
+
externalAppId: string$1()
|
|
22290
|
+
.optional()
|
|
22291
|
+
.meta({
|
|
22292
|
+
filterTitle: 'External App',
|
|
22293
|
+
referenceElementType: WorkspaceElementType.App,
|
|
22294
|
+
}),
|
|
22288
22295
|
});
|
|
22289
22296
|
BaseMembraneInterface.merge(BaseIntegrationLevelMembraneInterfaceEditableProperties).merge(BaseIntegrationLevelMembraneInterfaceReadOnlyProperties);
|
|
22290
22297
|
const TenantLayerElement = object({
|
|
@@ -24815,7 +24822,7 @@
|
|
|
24815
24822
|
*
|
|
24816
24823
|
* @returns {boolean} True if value is a Blob, otherwise false
|
|
24817
24824
|
*/
|
|
24818
|
-
const isBlob = kindOfTest('Blob');
|
|
24825
|
+
const isBlob$1 = kindOfTest('Blob');
|
|
24819
24826
|
|
|
24820
24827
|
/**
|
|
24821
24828
|
* Determine if a value is a FileList
|
|
@@ -24833,7 +24840,7 @@
|
|
|
24833
24840
|
*
|
|
24834
24841
|
* @returns {boolean} True if value is a Stream, otherwise false
|
|
24835
24842
|
*/
|
|
24836
|
-
const isStream = (val) => isObject(val) && isFunction$1(val.pipe);
|
|
24843
|
+
const isStream$1 = (val) => isObject(val) && isFunction$1(val.pipe);
|
|
24837
24844
|
|
|
24838
24845
|
/**
|
|
24839
24846
|
* Determine if a value is a FormData
|
|
@@ -25373,10 +25380,10 @@
|
|
|
25373
25380
|
isUndefined,
|
|
25374
25381
|
isDate,
|
|
25375
25382
|
isFile,
|
|
25376
|
-
isBlob,
|
|
25383
|
+
isBlob: isBlob$1,
|
|
25377
25384
|
isRegExp,
|
|
25378
25385
|
isFunction: isFunction$1,
|
|
25379
|
-
isStream,
|
|
25386
|
+
isStream: isStream$1,
|
|
25380
25387
|
isURLSearchParams,
|
|
25381
25388
|
isTypedArray,
|
|
25382
25389
|
isFileList,
|
|
@@ -28761,6 +28768,80 @@
|
|
|
28761
28768
|
LogRecordType["API"] = "api-request";
|
|
28762
28769
|
})(LogRecordType || (LogRecordType = {}));
|
|
28763
28770
|
|
|
28771
|
+
function isStream(obj) {
|
|
28772
|
+
return (obj !== null &&
|
|
28773
|
+
typeof obj === 'object' &&
|
|
28774
|
+
typeof obj.pipe === 'function' &&
|
|
28775
|
+
(typeof obj.readable === 'boolean' || typeof obj.writable === 'boolean'));
|
|
28776
|
+
}
|
|
28777
|
+
function isBlob(value) {
|
|
28778
|
+
var _a;
|
|
28779
|
+
if (value === null || typeof value !== 'object') {
|
|
28780
|
+
return false;
|
|
28781
|
+
}
|
|
28782
|
+
if (typeof Blob !== 'undefined' && value instanceof Blob) {
|
|
28783
|
+
return true;
|
|
28784
|
+
}
|
|
28785
|
+
const obj = value;
|
|
28786
|
+
const hasRequiredProps = typeof obj.size === 'number' && typeof obj.type === 'string' && typeof obj.slice === 'function';
|
|
28787
|
+
if (!hasRequiredProps) {
|
|
28788
|
+
return false;
|
|
28789
|
+
}
|
|
28790
|
+
const hasBlobMethod = typeof obj.stream === 'function' || typeof obj.text === 'function' || typeof obj.arrayBuffer === 'function';
|
|
28791
|
+
if (hasBlobMethod) {
|
|
28792
|
+
return true;
|
|
28793
|
+
}
|
|
28794
|
+
const constructorName = (_a = obj.constructor) === null || _a === void 0 ? void 0 : _a.name;
|
|
28795
|
+
return constructorName === 'Blob' || constructorName === 'File';
|
|
28796
|
+
}
|
|
28797
|
+
function truncateData(data, depth = 0) {
|
|
28798
|
+
const maxArrayItems = 500;
|
|
28799
|
+
const maxObjectKeys = 500;
|
|
28800
|
+
const maxStringLength = 500;
|
|
28801
|
+
const maxDepth = 15;
|
|
28802
|
+
if (depth > maxDepth) {
|
|
28803
|
+
return '<max depth reached>';
|
|
28804
|
+
}
|
|
28805
|
+
if (!data) {
|
|
28806
|
+
return data;
|
|
28807
|
+
}
|
|
28808
|
+
else if (isStream(data)) {
|
|
28809
|
+
return '<stream>';
|
|
28810
|
+
}
|
|
28811
|
+
else if (Array.isArray(data)) {
|
|
28812
|
+
const result = data.slice(0, maxArrayItems).map((item) => truncateData(item, depth + 1));
|
|
28813
|
+
if (data.length > maxArrayItems) {
|
|
28814
|
+
result.push({
|
|
28815
|
+
'...moreItems': data.length - maxArrayItems,
|
|
28816
|
+
});
|
|
28817
|
+
}
|
|
28818
|
+
return result;
|
|
28819
|
+
}
|
|
28820
|
+
else if (typeof Buffer !== 'undefined' && Buffer.isBuffer(data)) {
|
|
28821
|
+
return data.toString('utf-8').slice(0, maxStringLength);
|
|
28822
|
+
}
|
|
28823
|
+
else if (isBlob(data)) {
|
|
28824
|
+
return `<Blob: size=${data.size}, type=${data.type}>`;
|
|
28825
|
+
}
|
|
28826
|
+
else if (typeof data === 'object') {
|
|
28827
|
+
const keys = Object.keys(data);
|
|
28828
|
+
const result = {};
|
|
28829
|
+
for (const key of keys.slice(0, maxObjectKeys)) {
|
|
28830
|
+
result[key] = truncateData(data[key], depth + 1);
|
|
28831
|
+
}
|
|
28832
|
+
if (keys.length > maxObjectKeys) {
|
|
28833
|
+
result['...moreKeys'] = keys.slice(maxObjectKeys).join(', ').slice(0, maxStringLength);
|
|
28834
|
+
}
|
|
28835
|
+
return result;
|
|
28836
|
+
}
|
|
28837
|
+
else if (typeof data === 'string' && data.length > maxStringLength) {
|
|
28838
|
+
return `${data.slice(0, maxStringLength)}...`;
|
|
28839
|
+
}
|
|
28840
|
+
else {
|
|
28841
|
+
return data;
|
|
28842
|
+
}
|
|
28843
|
+
}
|
|
28844
|
+
|
|
28764
28845
|
class DependencyError extends MembraneError {
|
|
28765
28846
|
constructor(arg, workspaceElementReference) {
|
|
28766
28847
|
super(arg);
|
|
@@ -28823,8 +28904,8 @@
|
|
|
28823
28904
|
|
|
28824
28905
|
const axiosGlobal = ((axios$1$1 === null || axios$1$1 === void 0 ? void 0 : axios$1$1.default) || axios$1$1);
|
|
28825
28906
|
const axios = axiosGlobal.create();
|
|
28826
|
-
const DEFAULT_API_URI = 'https://api.
|
|
28827
|
-
const DEFAULT_UI_URI = 'https://
|
|
28907
|
+
const DEFAULT_API_URI = 'https://api.getmembrane.com';
|
|
28908
|
+
const DEFAULT_UI_URI = 'https://console.getmembrane.com';
|
|
28828
28909
|
const membraneClientOptionsSchema = object({
|
|
28829
28910
|
token: string$1().nullish(),
|
|
28830
28911
|
fetchToken: _function().nullish(),
|
|
@@ -28859,6 +28940,7 @@
|
|
|
28859
28940
|
}
|
|
28860
28941
|
class MembraneApiClient {
|
|
28861
28942
|
constructor(options = {}) {
|
|
28943
|
+
this.logs = [];
|
|
28862
28944
|
validateClientOptions(options);
|
|
28863
28945
|
const { uiUri, apiUri, accessToken, token, fetchToken, fetchCredentials, credentials } = options;
|
|
28864
28946
|
this.apiUri = apiUri !== null && apiUri !== void 0 ? apiUri : DEFAULT_API_URI;
|
|
@@ -28914,6 +28996,11 @@
|
|
|
28914
28996
|
async delete(uri, data, options) {
|
|
28915
28997
|
return this.makeApiRequest('DELETE', { ...(options !== null && options !== void 0 ? options : {}), url: uri, data });
|
|
28916
28998
|
}
|
|
28999
|
+
retrieveLogs() {
|
|
29000
|
+
const logs = [...this.logs];
|
|
29001
|
+
this.logs = [];
|
|
29002
|
+
return logs;
|
|
29003
|
+
}
|
|
28917
29004
|
async createEventSource(uri, queryParams) {
|
|
28918
29005
|
const token = await this.getToken();
|
|
28919
29006
|
const allParams = { ...queryParams, token };
|
|
@@ -28957,7 +29044,21 @@
|
|
|
28957
29044
|
};
|
|
28958
29045
|
}
|
|
28959
29046
|
async makeApiRequest(method, params = {}) {
|
|
29047
|
+
var _a, _b, _c, _d;
|
|
28960
29048
|
const token = await this.getToken();
|
|
29049
|
+
const url = (_a = params.url) !== null && _a !== void 0 ? _a : '';
|
|
29050
|
+
const requestWithoutCredentials = {
|
|
29051
|
+
method,
|
|
29052
|
+
url: `${this.apiUri}${url.startsWith('/') ? '' : '/'}${url}`,
|
|
29053
|
+
data: isStream(params.data) ? '<stream>' : truncateData(params.data),
|
|
29054
|
+
};
|
|
29055
|
+
const log = {
|
|
29056
|
+
type: LogRecordType.API,
|
|
29057
|
+
data: {
|
|
29058
|
+
request: requestWithoutCredentials,
|
|
29059
|
+
},
|
|
29060
|
+
};
|
|
29061
|
+
const startTime = new Date();
|
|
28961
29062
|
params.method = method;
|
|
28962
29063
|
params.baseURL = this.apiUri;
|
|
28963
29064
|
params.headers = {
|
|
@@ -28971,10 +29072,37 @@
|
|
|
28971
29072
|
response = await axios.request(params);
|
|
28972
29073
|
}
|
|
28973
29074
|
catch (err) {
|
|
29075
|
+
log.data.timeMs = new Date().getTime() - startTime.getTime();
|
|
29076
|
+
if (err.response) {
|
|
29077
|
+
log.data.response = {
|
|
29078
|
+
status: (_b = err.response) === null || _b === void 0 ? void 0 : _b.status,
|
|
29079
|
+
data: isStream((_c = err.response) === null || _c === void 0 ? void 0 : _c.data) ? '<stream>' : truncateData((_d = err.response) === null || _d === void 0 ? void 0 : _d.data),
|
|
29080
|
+
};
|
|
29081
|
+
}
|
|
29082
|
+
else {
|
|
29083
|
+
log.data.error = {
|
|
29084
|
+
type: typeof err,
|
|
29085
|
+
error: JSON.stringify(err, Object.getOwnPropertyNames(err)),
|
|
29086
|
+
};
|
|
29087
|
+
}
|
|
29088
|
+
this.log(log);
|
|
28974
29089
|
this.handleRequestError(err);
|
|
28975
29090
|
}
|
|
29091
|
+
log.data.response = {
|
|
29092
|
+
status: response.status,
|
|
29093
|
+
data: isStream(response.data) ? '<stream>' : truncateData(response.data),
|
|
29094
|
+
};
|
|
29095
|
+
log.data.timeMs = new Date().getTime() - startTime.getTime();
|
|
29096
|
+
this.log(log);
|
|
28976
29097
|
return response.data;
|
|
28977
29098
|
}
|
|
29099
|
+
log(logRecord) {
|
|
29100
|
+
var _a;
|
|
29101
|
+
this.logs.push(logRecord);
|
|
29102
|
+
if (typeof process !== 'undefined' && ((_a = process.env) === null || _a === void 0 ? void 0 : _a.IS_CUSTOM_CODE_RUNNER)) {
|
|
29103
|
+
console.debug(JSON.stringify(logRecord));
|
|
29104
|
+
}
|
|
29105
|
+
}
|
|
28978
29106
|
handleRequestError(err) {
|
|
28979
29107
|
var _a, _b;
|
|
28980
29108
|
if (axiosGlobal.isAxiosError(err) && ((_b = (_a = err.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.type)) {
|
|
@@ -28998,6 +29126,35 @@
|
|
|
28998
29126
|
}
|
|
28999
29127
|
}
|
|
29000
29128
|
|
|
29129
|
+
const PlatformUserPermissionsSchema = object({
|
|
29130
|
+
isEngineAdmin: boolean$1(),
|
|
29131
|
+
isPlatformAdmin: boolean$1(),
|
|
29132
|
+
platformUserId: string$1().optional(),
|
|
29133
|
+
});
|
|
29134
|
+
const OrgPermissionsSchema = object({
|
|
29135
|
+
orgId: string$1(),
|
|
29136
|
+
role: _enum(['admin', 'member']).optional(),
|
|
29137
|
+
canRead: boolean$1(),
|
|
29138
|
+
canWrite: boolean$1(),
|
|
29139
|
+
});
|
|
29140
|
+
const WorkspacePermissionsSchema = object({
|
|
29141
|
+
workspaceId: string$1().optional(),
|
|
29142
|
+
isWorkspaceManager: boolean$1(),
|
|
29143
|
+
scopes: array(string$1()),
|
|
29144
|
+
});
|
|
29145
|
+
const TenantPermissionsSchema = object({
|
|
29146
|
+
tenantId: string$1().optional(),
|
|
29147
|
+
workspaceId: string$1().optional(),
|
|
29148
|
+
canRead: boolean$1(),
|
|
29149
|
+
canWrite: boolean$1(),
|
|
29150
|
+
});
|
|
29151
|
+
object({
|
|
29152
|
+
platformUser: PlatformUserPermissionsSchema,
|
|
29153
|
+
org: OrgPermissionsSchema.optional(),
|
|
29154
|
+
workspace: WorkspacePermissionsSchema.optional(),
|
|
29155
|
+
tenant: TenantPermissionsSchema.optional(),
|
|
29156
|
+
});
|
|
29157
|
+
|
|
29001
29158
|
class MembraneClient extends MembraneApiClient {
|
|
29002
29159
|
constructor(options) {
|
|
29003
29160
|
super(options);
|