@appconda/nextjs 1.0.13 → 1.0.15
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/cjs/sdk.js +74 -16
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +73 -17
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +75 -18
- package/package.json +2 -1
- package/src/actions/actionClient.ts +42 -0
- package/src/actions/index.ts +1 -0
- package/src/actions/nodes.ts +12 -0
- package/src/index.ts +2 -0
- package/src/services/waitlist.ts +16 -0
- package/types/Cache/Adapter.d.ts +0 -10
- package/types/Cache/Adapters/Filesystem.d.ts +0 -16
- package/types/Cache/Adapters/Memory.d.ts +0 -18
- package/types/Cache/Adapters/None.d.ts +0 -12
- package/types/Cache/Adapters/Redis.d.ts +0 -14
- package/types/Cache/Adapters/Sharding.d.ts +0 -17
- package/types/Cache/Cache.d.ts +0 -16
- package/types/Cache/index.d.ts +0 -5
- package/types/Cache/test.d.ts +0 -0
- package/types/Services.d.ts +0 -6
- package/types/client.d.ts +0 -141
- package/types/decorators/Cache.d.ts +0 -1
- package/types/decorators/CacheKey.d.ts +0 -1
- package/types/decorators/Invalidate.d.ts +0 -1
- package/types/enums/api-service.d.ts +0 -13
- package/types/enums/api.d.ts +0 -5
- package/types/enums/auth-method.d.ts +0 -9
- package/types/enums/authentication-factor.d.ts +0 -6
- package/types/enums/authenticator-type.d.ts +0 -3
- package/types/enums/browser.d.ts +0 -16
- package/types/enums/compression.d.ts +0 -5
- package/types/enums/credit-card.d.ts +0 -18
- package/types/enums/database-usage-range.d.ts +0 -5
- package/types/enums/email-template-locale.d.ts +0 -133
- package/types/enums/email-template-type.d.ts +0 -9
- package/types/enums/entities/EntityLimitType.d.ts +0 -4
- package/types/enums/entities/PropertyAttributeName.d.ts +0 -27
- package/types/enums/entities/PropertyCondition.d.ts +0 -7
- package/types/enums/entities/PropertyType.d.ts +0 -12
- package/types/enums/entities/PropertyValueType.d.ts +0 -6
- package/types/enums/entities/RowAccess.d.ts +0 -2
- package/types/enums/entities/ViewFilterCondition.d.ts +0 -12
- package/types/enums/execution-method.d.ts +0 -8
- package/types/enums/flag.d.ts +0 -197
- package/types/enums/function-usage-range.d.ts +0 -5
- package/types/enums/image-format.d.ts +0 -7
- package/types/enums/image-gravity.d.ts +0 -11
- package/types/enums/index-type.d.ts +0 -5
- package/types/enums/messaging-provider-type.d.ts +0 -5
- package/types/enums/name.d.ts +0 -14
- package/types/enums/o-auth-provider copy.d.ts +0 -41
- package/types/enums/o-auth-provider.d.ts +0 -41
- package/types/enums/password-hash.d.ts +0 -13
- package/types/enums/platform-type.d.ts +0 -17
- package/types/enums/project-usage-range.d.ts +0 -4
- package/types/enums/region.d.ts +0 -4
- package/types/enums/relation-mutate.d.ts +0 -5
- package/types/enums/relationship-type.d.ts +0 -6
- package/types/enums/resource-type.d.ts +0 -4
- package/types/enums/runtime.d.ts +0 -48
- package/types/enums/s-m-t-p-secure.d.ts +0 -3
- package/types/enums/shared/ApplicationLayout.d.ts +0 -4
- package/types/enums/shared/Colors.d.ts +0 -24
- package/types/enums/shared/InputType.d.ts +0 -6
- package/types/enums/shared/Periodicity.d.ts +0 -7
- package/types/enums/shared/SvgIcon.d.ts +0 -37
- package/types/enums/shared/Theme.d.ts +0 -4
- package/types/enums/sms-template-locale.d.ts +0 -133
- package/types/enums/sms-template-type.d.ts +0 -6
- package/types/enums/smtp-encryption.d.ts +0 -5
- package/types/enums/storage-usage-range.d.ts +0 -5
- package/types/enums/subscriptions/PricingModel.d.ts +0 -11
- package/types/enums/subscriptions/SubscriptionBillingPeriod.d.ts +0 -10
- package/types/enums/subscriptions/SubscriptionFeatureLimitType.d.ts +0 -10
- package/types/enums/subscriptions/SubscriptionPriceType.d.ts +0 -7
- package/types/enums/tenants/LinkedAccountStatus.d.ts +0 -5
- package/types/enums/tenants/TenantUserJoined.d.ts +0 -6
- package/types/enums/tenants/TenantUserStatus.d.ts +0 -6
- package/types/enums/tenants/TenantUserType.d.ts +0 -5
- package/types/enums/user-usage-range.d.ts +0 -5
- package/types/getAppcondaClient.d.ts +0 -2
- package/types/getSDKForCurrentUser.d.ts +0 -33
- package/types/id.d.ts +0 -20
- package/types/index.d.ts +0 -37
- package/types/inputFile.d.ts +0 -6
- package/types/lib/Registry/Registry.d.ts +0 -38
- package/types/lib/Registry/index.d.ts +0 -1
- package/types/models.d.ts +0 -3272
- package/types/permission.d.ts +0 -43
- package/types/query.d.ts +0 -194
- package/types/role.d.ts +0 -70
- package/types/service-client.d.ts +0 -7
- package/types/service.d.ts +0 -11
- package/types/services/account.d.ts +0 -530
- package/types/services/acl.d.ts +0 -28
- package/types/services/applets.d.ts +0 -9
- package/types/services/assistant.d.ts +0 -14
- package/types/services/avatars.d.ts +0 -115
- package/types/services/community.d.ts +0 -19
- package/types/services/configuration.d.ts +0 -5
- package/types/services/console.d.ts +0 -15
- package/types/services/databases.d.ts +0 -613
- package/types/services/functions.d.ts +0 -319
- package/types/services/graphql.d.ts +0 -25
- package/types/services/health.d.ts +0 -231
- package/types/services/locale.d.ts +0 -80
- package/types/services/messaging.d.ts +0 -685
- package/types/services/migrations.d.ts +0 -185
- package/types/services/node.d.ts +0 -5
- package/types/services/permissions.d.ts +0 -20
- package/types/services/pricing.d.ts +0 -15
- package/types/services/project.d.ts +0 -70
- package/types/services/projects.d.ts +0 -542
- package/types/services/proxy.d.ts +0 -59
- package/types/services/roles.d.ts +0 -19
- package/types/services/schema.d.ts +0 -17
- package/types/services/storage.d.ts +0 -189
- package/types/services/subscription-product.d.ts +0 -77
- package/types/services/subscription.d.ts +0 -15
- package/types/services/teams.d.ts +0 -167
- package/types/services/tenant-subscription.d.ts +0 -12
- package/types/services/tenant.d.ts +0 -32
- package/types/services/users.d.ts +0 -499
- package/types/services/vcs.d.ts +0 -108
package/dist/cjs/sdk.js
CHANGED
@@ -4,6 +4,7 @@ var nodeFetchNativeWithAgent = require('node-fetch-native-with-agent');
|
|
4
4
|
var agent = require('node-fetch-native-with-agent/agent');
|
5
5
|
var headers = require('next/headers');
|
6
6
|
var redis = require('redis');
|
7
|
+
var nextSafeAction = require('next-safe-action');
|
7
8
|
|
8
9
|
/******************************************************************************
|
9
10
|
Copyright (c) Microsoft Corporation.
|
@@ -9963,6 +9964,35 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
9963
9964
|
}
|
9964
9965
|
}
|
9965
9966
|
|
9967
|
+
class ServiceClient {
|
9968
|
+
constructor(client) {
|
9969
|
+
this.client = client;
|
9970
|
+
}
|
9971
|
+
actionCall(actionName, payload) {
|
9972
|
+
return __awaiter(this, void 0, void 0, function* () {
|
9973
|
+
const apiPath = `/service/registry/${this.getServiceName()}/${actionName}`;
|
9974
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
9975
|
+
const apiHeaders = {
|
9976
|
+
'content-type': 'application/json',
|
9977
|
+
};
|
9978
|
+
return yield this.client.call('post', uri, apiHeaders, payload);
|
9979
|
+
});
|
9980
|
+
}
|
9981
|
+
}
|
9982
|
+
|
9983
|
+
class Waitlist extends ServiceClient {
|
9984
|
+
getServiceName() {
|
9985
|
+
return 'com.appconda.service.waitlist';
|
9986
|
+
}
|
9987
|
+
ListWiatlistSignups(waitlistId) {
|
9988
|
+
return __awaiter(this, void 0, void 0, function* () {
|
9989
|
+
const payload = {};
|
9990
|
+
payload['waitlistId'];
|
9991
|
+
return yield this.actionCall('ListWiatlistSignups', payload);
|
9992
|
+
});
|
9993
|
+
}
|
9994
|
+
}
|
9995
|
+
|
9966
9996
|
/**
|
9967
9997
|
* Helper class to generate permission strings for resources.
|
9968
9998
|
*/
|
@@ -10718,22 +10748,6 @@ class Community {
|
|
10718
10748
|
}
|
10719
10749
|
}
|
10720
10750
|
|
10721
|
-
class ServiceClient {
|
10722
|
-
constructor(client) {
|
10723
|
-
this.client = client;
|
10724
|
-
}
|
10725
|
-
actionCall(actionName, payload) {
|
10726
|
-
return __awaiter(this, void 0, void 0, function* () {
|
10727
|
-
const apiPath = `/service/registry/${this.getServiceName()}/${actionName}`;
|
10728
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
10729
|
-
const apiHeaders = {
|
10730
|
-
'content-type': 'application/json',
|
10731
|
-
};
|
10732
|
-
return yield this.client.call('post', uri, apiHeaders, payload);
|
10733
|
-
});
|
10734
|
-
}
|
10735
|
-
}
|
10736
|
-
|
10737
10751
|
class Configuration extends ServiceClient {
|
10738
10752
|
getServiceName() {
|
10739
10753
|
return 'com.appconda.service.configuration';
|
@@ -13220,6 +13234,48 @@ function getSDKForCurrentUser() {
|
|
13220
13234
|
});
|
13221
13235
|
}
|
13222
13236
|
|
13237
|
+
const actionClient = nextSafeAction.createSafeActionClient({
|
13238
|
+
handleServerError(e) {
|
13239
|
+
/* if (
|
13240
|
+
e instanceof ResourceNotFoundError ||
|
13241
|
+
e instanceof AuthorizationError ||
|
13242
|
+
e instanceof InvalidInputError ||
|
13243
|
+
e instanceof UnknownError ||
|
13244
|
+
e instanceof AuthenticationError ||
|
13245
|
+
e instanceof OperationNotAllowedError ||
|
13246
|
+
e instanceof AppcondaException
|
13247
|
+
) {
|
13248
|
+
return e.message;
|
13249
|
+
} */
|
13250
|
+
// eslint-disable-next-line no-console -- This error needs to be logged for debugging server-side errors
|
13251
|
+
console.error("SERVER ERROR: ", e);
|
13252
|
+
return nextSafeAction.DEFAULT_SERVER_ERROR_MESSAGE;
|
13253
|
+
},
|
13254
|
+
});
|
13255
|
+
/* export const authenticatedActionClient = actionClient.use(async ({ next }) => {
|
13256
|
+
const session = await getServerSession(authOptions);
|
13257
|
+
if (!session?.user) {
|
13258
|
+
throw new AuthenticationError("Not authenticated");
|
13259
|
+
}
|
13260
|
+
|
13261
|
+
const userId = session.user.id;
|
13262
|
+
|
13263
|
+
const user = await getUser(userId);
|
13264
|
+
if (!user) {
|
13265
|
+
throw new AuthorizationError("User not found");
|
13266
|
+
}
|
13267
|
+
|
13268
|
+
return next({ ctx: { user } });
|
13269
|
+
});
|
13270
|
+
*/
|
13271
|
+
|
13272
|
+
const getAllNodesAction = actionClient
|
13273
|
+
// .schema(listModelsSchema)
|
13274
|
+
.action((_a) => __awaiter(void 0, [_a], void 0, function* ({ parsedInput }) {
|
13275
|
+
const { node } = yield getSDKForCurrentUser();
|
13276
|
+
return yield node.GetAllNodes();
|
13277
|
+
}));
|
13278
|
+
|
13223
13279
|
exports.Account = Account;
|
13224
13280
|
exports.AppcondaException = AppcondaException;
|
13225
13281
|
exports.Applets = Applets;
|
@@ -13238,5 +13294,7 @@ exports.Role = Role;
|
|
13238
13294
|
exports.Storage = Storage;
|
13239
13295
|
exports.Teams = Teams;
|
13240
13296
|
exports.Users = Users;
|
13297
|
+
exports.Waitlist = Waitlist;
|
13298
|
+
exports.getAllNodesAction = getAllNodesAction;
|
13241
13299
|
exports.getSDKForCurrentUser = getSDKForCurrentUser;
|
13242
13300
|
//# sourceMappingURL=sdk.js.map
|