@membranehq/sdk 0.21.0 → 0.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.d.ts +14 -0
- package/dist/bundle.js +6 -6
- package/dist/bundle.js.map +1 -1
- package/dist/dts/accessors/connections-accessors.d.ts +1 -1
- package/dist/dts/accessors/connections-accessors.test.d.ts +1 -0
- package/dist/dts/accessors/integrations-accessors.d.ts +1 -0
- package/dist/dts/orgs/types.d.ts +10 -0
- package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +2 -0
- package/dist/dts/workspace-elements/api/actions-api.d.ts +2 -0
- package/dist/dts/workspace-elements/api/app-data-schema-instances-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/app-event-log-records-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/app-event-subscriptions-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 +4 -0
- package/dist/dts/workspace-elements/api/data-link-table-instances-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/data-sources-api.d.ts +2 -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/field-mappings-api.d.ts +2 -0
- package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +2 -0
- package/dist/dts/workspace-elements/api/flows-api.d.ts +2 -0
- package/dist/dts/workspace-elements/api/incoming-webhooks-api.d.ts +1 -0
- package/dist/dts/workspace-elements/base/customers/index.d.ts +1 -0
- package/dist/dts/workspace-elements/base/integrations/index.d.ts +0 -1
- package/dist/index.browser.d.mts +41 -2
- package/dist/index.browser.d.ts +41 -2
- package/dist/index.browser.js +13 -8
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +13 -8
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +41 -2
- package/dist/index.node.d.ts +41 -2
- package/dist/index.node.js +13 -8
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +13 -8
- package/dist/index.node.mjs.map +1 -1
- package/package.json +1 -1
package/dist/bundle.d.ts
CHANGED
|
@@ -457,6 +457,7 @@ declare const ConnectionApiResponse: z.ZodObject<{
|
|
|
457
457
|
isTest: z.ZodOptional<z.ZodBoolean>;
|
|
458
458
|
isBillable: z.ZodOptional<z.ZodBoolean>;
|
|
459
459
|
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
460
|
+
aiCreditsRolling30DayLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
460
461
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
461
462
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
462
463
|
}, z.core.$strip>>;
|
|
@@ -649,6 +650,7 @@ declare const ActionApiResponse: z.ZodObject<{
|
|
|
649
650
|
isTest: z.ZodOptional<z.ZodBoolean>;
|
|
650
651
|
isBillable: z.ZodOptional<z.ZodBoolean>;
|
|
651
652
|
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
653
|
+
aiCreditsRolling30DayLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
652
654
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
653
655
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
654
656
|
}, z.core.$strip>>;
|
|
@@ -3564,6 +3566,7 @@ declare const FlowRunApiResponse: z.ZodObject<{
|
|
|
3564
3566
|
isTest: z.ZodOptional<z.ZodBoolean>;
|
|
3565
3567
|
isBillable: z.ZodOptional<z.ZodBoolean>;
|
|
3566
3568
|
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
3569
|
+
aiCreditsRolling30DayLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3567
3570
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
3568
3571
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
3569
3572
|
}, z.core.$strip>>;
|
|
@@ -3764,6 +3767,7 @@ declare const FindFlowRunsResponse: z.ZodObject<{
|
|
|
3764
3767
|
isTest: z.ZodOptional<z.ZodBoolean>;
|
|
3765
3768
|
isBillable: z.ZodOptional<z.ZodBoolean>;
|
|
3766
3769
|
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
3770
|
+
aiCreditsRolling30DayLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3767
3771
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
3768
3772
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
3769
3773
|
}, z.core.$strip>>;
|
|
@@ -4016,6 +4020,7 @@ declare const FlowApiResponse: z.ZodObject<{
|
|
|
4016
4020
|
isTest: z.ZodOptional<z.ZodBoolean>;
|
|
4017
4021
|
isBillable: z.ZodOptional<z.ZodBoolean>;
|
|
4018
4022
|
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
4023
|
+
aiCreditsRolling30DayLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4019
4024
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
4020
4025
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
4021
4026
|
}, z.core.$strip>>;
|
|
@@ -4696,6 +4701,7 @@ declare const DataSourceApiResponse: z.ZodObject<{
|
|
|
4696
4701
|
isTest: z.ZodOptional<z.ZodBoolean>;
|
|
4697
4702
|
isBillable: z.ZodOptional<z.ZodBoolean>;
|
|
4698
4703
|
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
4704
|
+
aiCreditsRolling30DayLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4699
4705
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
4700
4706
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
4701
4707
|
}, z.core.$strip>>;
|
|
@@ -5374,6 +5380,7 @@ declare const CreateCustomerRequest: z.ZodObject<{
|
|
|
5374
5380
|
internalId: z.ZodOptional<z.ZodString>;
|
|
5375
5381
|
fields: z.ZodOptional<z.ZodAny>;
|
|
5376
5382
|
credentials: z.ZodOptional<z.ZodAny>;
|
|
5383
|
+
aiCreditsRolling30DayLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
5377
5384
|
}, z.core.$strip>;
|
|
5378
5385
|
type CreateCustomerRequest = z.infer<typeof CreateCustomerRequest>;
|
|
5379
5386
|
declare const UpdateCustomerRequest: z.ZodObject<{
|
|
@@ -5381,6 +5388,7 @@ declare const UpdateCustomerRequest: z.ZodObject<{
|
|
|
5381
5388
|
internalId: z.ZodOptional<z.ZodString>;
|
|
5382
5389
|
fields: z.ZodOptional<z.ZodAny>;
|
|
5383
5390
|
credentials: z.ZodOptional<z.ZodAny>;
|
|
5391
|
+
aiCreditsRolling30DayLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
5384
5392
|
}, z.core.$strip>;
|
|
5385
5393
|
type UpdateCustomerRequest = z.infer<typeof UpdateCustomerRequest>;
|
|
5386
5394
|
declare const FindCustomersQuery: z.ZodObject<{
|
|
@@ -5407,6 +5415,7 @@ declare const CustomerApiResponse: z.ZodObject<{
|
|
|
5407
5415
|
isTest: z.ZodOptional<z.ZodBoolean>;
|
|
5408
5416
|
isBillable: z.ZodOptional<z.ZodBoolean>;
|
|
5409
5417
|
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
5418
|
+
aiCreditsRolling30DayLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
5410
5419
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
5411
5420
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
5412
5421
|
}, z.core.$strip>;
|
|
@@ -5618,6 +5627,7 @@ declare const FieldMappingApiResponse: z.ZodObject<{
|
|
|
5618
5627
|
isTest: z.ZodOptional<z.ZodBoolean>;
|
|
5619
5628
|
isBillable: z.ZodOptional<z.ZodBoolean>;
|
|
5620
5629
|
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
5630
|
+
aiCreditsRolling30DayLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
5621
5631
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
5622
5632
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
5623
5633
|
}, z.core.$strip>>;
|
|
@@ -6043,6 +6053,7 @@ declare const AppEventSubscriptionApiResponse: z.ZodObject<{
|
|
|
6043
6053
|
isTest: z.ZodOptional<z.ZodBoolean>;
|
|
6044
6054
|
isBillable: z.ZodOptional<z.ZodBoolean>;
|
|
6045
6055
|
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
6056
|
+
aiCreditsRolling30DayLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
6046
6057
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
6047
6058
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
6048
6059
|
}, z.core.$strip>>;
|
|
@@ -6174,6 +6185,7 @@ declare const ExternalEventSubscriptionApiResponse: z.ZodObject<{
|
|
|
6174
6185
|
isTest: z.ZodOptional<z.ZodBoolean>;
|
|
6175
6186
|
isBillable: z.ZodOptional<z.ZodBoolean>;
|
|
6176
6187
|
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
6188
|
+
aiCreditsRolling30DayLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
6177
6189
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
6178
6190
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
6179
6191
|
}, z.core.$strip>>;
|
|
@@ -6466,6 +6478,7 @@ declare class ConnectionAccessor {
|
|
|
6466
6478
|
isTest?: boolean | undefined;
|
|
6467
6479
|
isBillable?: boolean | undefined;
|
|
6468
6480
|
isActive?: boolean | undefined;
|
|
6481
|
+
aiCreditsRolling30DayLimit?: number | null | undefined;
|
|
6469
6482
|
createdAt?: string | undefined;
|
|
6470
6483
|
archivedAt?: string | undefined;
|
|
6471
6484
|
} | undefined;
|
|
@@ -6699,6 +6712,7 @@ declare class IntegrationAccessor extends ElementAccessor<IntegrationApiResponse
|
|
|
6699
6712
|
isTest?: boolean | undefined;
|
|
6700
6713
|
isBillable?: boolean | undefined;
|
|
6701
6714
|
isActive?: boolean | undefined;
|
|
6715
|
+
aiCreditsRolling30DayLimit?: number | null | undefined;
|
|
6702
6716
|
createdAt?: string | undefined;
|
|
6703
6717
|
archivedAt?: string | undefined;
|
|
6704
6718
|
} | undefined;
|
package/dist/bundle.js
CHANGED
|
@@ -22816,7 +22816,6 @@
|
|
|
22816
22816
|
authOptionKey,
|
|
22817
22817
|
connectorParameters,
|
|
22818
22818
|
apiUri: this.client.apiUri,
|
|
22819
|
-
token: await this.client.getToken(),
|
|
22820
22819
|
onPopupClosed,
|
|
22821
22820
|
});
|
|
22822
22821
|
}
|
|
@@ -22906,16 +22905,17 @@
|
|
|
22906
22905
|
}
|
|
22907
22906
|
}
|
|
22908
22907
|
async function createOrUpdateConnection(options) {
|
|
22909
|
-
const { connectionId, integrationKey, integrationId, connectorId, connectorVersion, name, input, connectorParameters, allowMultipleConnections, authOptionKey, connectionRequestId, apiUri,
|
|
22908
|
+
const { client, connectionId, integrationKey, integrationId, connectorId, connectorVersion, name, input, connectorParameters, allowMultipleConnections, authOptionKey, connectionRequestId, apiUri, redirectUri, onPopupClosed, } = options !== null && options !== void 0 ? options : {};
|
|
22910
22909
|
let connectionType = await detectConnectionType(options);
|
|
22911
22910
|
if (redirectUri) {
|
|
22912
22911
|
connectionType = ConnectionType.REDIRECT;
|
|
22913
22912
|
}
|
|
22913
|
+
const freshToken = await client.getToken();
|
|
22914
22914
|
const connectPath = 'connect';
|
|
22915
22915
|
return new Promise((resolve, reject) => {
|
|
22916
22916
|
const requestId = simpleUniqueId() + simpleUniqueId();
|
|
22917
22917
|
const payload = {
|
|
22918
|
-
token,
|
|
22918
|
+
token: freshToken,
|
|
22919
22919
|
input,
|
|
22920
22920
|
connectorParameters,
|
|
22921
22921
|
integrationKey,
|
|
@@ -22944,7 +22944,7 @@
|
|
|
22944
22944
|
const { stopSSE } = createSSEListener({
|
|
22945
22945
|
apiUri: apiUri,
|
|
22946
22946
|
requestId,
|
|
22947
|
-
token,
|
|
22947
|
+
token: freshToken,
|
|
22948
22948
|
handler: eventHandler,
|
|
22949
22949
|
});
|
|
22950
22950
|
function cleanup() {
|
|
@@ -23248,7 +23248,6 @@
|
|
|
23248
23248
|
authOptionKey,
|
|
23249
23249
|
allowMultipleConnections,
|
|
23250
23250
|
apiUri: this.client.apiUri,
|
|
23251
|
-
token: await this.client.getToken(),
|
|
23252
23251
|
redirectUri: sameWindow ? redirectUri : undefined,
|
|
23253
23252
|
onPopupClosed,
|
|
23254
23253
|
});
|
|
@@ -28427,6 +28426,7 @@
|
|
|
28427
28426
|
isTest: boolean$1().optional(),
|
|
28428
28427
|
isBillable: boolean$1().optional(),
|
|
28429
28428
|
isActive: boolean$1().optional(),
|
|
28429
|
+
aiCreditsRolling30DayLimit: number$1().min(0).nullable().optional(),
|
|
28430
28430
|
createdAt: string$1().optional(),
|
|
28431
28431
|
archivedAt: string$1().optional(),
|
|
28432
28432
|
});
|
|
@@ -29414,6 +29414,7 @@
|
|
|
29414
29414
|
IntegrationEditableProperties.omit({
|
|
29415
29415
|
connectorId: true,
|
|
29416
29416
|
externalAppId: true,
|
|
29417
|
+
parameters: true,
|
|
29417
29418
|
});
|
|
29418
29419
|
|
|
29419
29420
|
PaginationQuery.merge(SearchQuery)
|
|
@@ -29715,7 +29716,6 @@
|
|
|
29715
29716
|
...options,
|
|
29716
29717
|
client: this,
|
|
29717
29718
|
apiUri: this.apiUri,
|
|
29718
|
-
token: await this.getToken(),
|
|
29719
29719
|
redirectUri: options.sameWindow ? options.redirectUri : undefined,
|
|
29720
29720
|
});
|
|
29721
29721
|
}
|