@shapediver/sdk.platform-api-sdk-v1 2.26.0 → 2.27.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/api/SdPlatformRequestId.d.ts +2 -0
- package/dist/api/SdPlatformRequestId.d.ts.map +1 -1
- package/dist/api/SdPlatformRequestId.js +2 -0
- package/dist/api/SdPlatformRequestId.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/resources/SdPlatformTagApi.d.ts +12 -2
- package/dist/resources/SdPlatformTagApi.d.ts.map +1 -1
- package/dist/resources/SdPlatformTagApi.js +15 -0
- package/dist/resources/SdPlatformTagApi.js.map +1 -1
- package/dist/util/conditions.d.ts +86 -0
- package/dist/util/conditions.d.ts.map +1 -0
- package/dist/util/conditions.js +159 -0
- package/dist/util/conditions.js.map +1 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdPlatformRequestId.d.ts","sourceRoot":"","sources":["../../src/api/SdPlatformRequestId.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,SAAS;IAEjB;;OAEG;IACH,aAAa,mBAAmB;IAChC,YAAY,kBAAkB;IAC9B,iBAAiB,uBAAuB;IACxC,MAAM,WAAW;IACjB,wBAAwB,+BAA+B;IAEvD;;OAEG;IACH,WAAW,kBAAkB;IAC7B,aAAa,oBAAoB;IACjC,cAAc,qBAAqB;IACnC,aAAa,oBAAoB;IACjC,cAAc,qBAAqB;IAEnC,cAAc,qBAAqB;IACnC,eAAe,sBAAsB;IACrC,cAAc,qBAAqB;IACnC,eAAe,sBAAsB;IAErC,kBAAkB,yBAAyB;IAC3C,mBAAmB,0BAA0B;IAC7C,kBAAkB,yBAAyB;IAC3C,mBAAmB,0BAA0B;IAC7C,kBAAkB,yBAAyB;IAE3C,cAAc,oBAAoB;IAClC,cAAc,oBAA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AAuB,gCAAgC;IACvD,6BAA6B,wCAAwC;IACrE,kBAAkB,yBAAyB;IAC3C,yBAAyB,kCAAkC;IAC3D,gBAAgB,uBAAuB;IAEvC,uBAAuB,+BAA+B;IACtD,+BAA+B,wCAAwC;IACvE,sBAAsB,8BAA8B;IACpD,kCAAkC,6CAA6C;IAC/E,4BAA4B,sCAAsC;IAClE,uCAAuC,oDAAoD;IAC3F,uBAAuB,+BAA+B;IACtD,8BAA8B,wCAAwC;IAEtE,qBAAqB,4BAA4B;IACjD,mBAAmB,0BAA0B;IAC7C,mBAAmB,yBAAyB;IAC5C,uBAAuB,8BAA8B;IACrD,kBAAkB,yBAAyB;IAE3C,0BAA0B,kCAAkC;IAC5D,0BAA0B,kCAAkC;IAC5D,wBAAwB,gCAAgC;IACxD,uBAAuB,+BAA+B;IACtD,0BAA0B,kCAAkC;IAC5D,wBAAwB,gCAAgC;IAExD,cAAc,oBAAoB;IAClC,aAAa,mBAAmB;IAChC,cAAc,oBAAoB;IAClC,YAAY,kBAAkB;IAC9B,gBAAgB,sBAAsB;IACtC,YAAY,kBAAkB;IAC9B,cAAc,oBAAoB;IAClC,uBAAuB,8BAA8B;IACrD,mBAAmB,0BAA0B;IAE7C,WAAW,kBAAkB;IAE7B,iBAAiB,wBAAwB;CAC5C"}
|
|
@@ -44,6 +44,8 @@ var RequestId;
|
|
|
44
44
|
RequestId["PolicyDelete"] = "policy_delete";
|
|
45
45
|
RequestId["TagGet"] = "tag_get";
|
|
46
46
|
RequestId["TagQuery"] = "tag_query";
|
|
47
|
+
RequestId["TagDelete"] = "tag_delete";
|
|
48
|
+
RequestId["TagPatch"] = "tag_patch";
|
|
47
49
|
RequestId["TokenCreate"] = "token_create";
|
|
48
50
|
RequestId["UserGet"] = "user_get";
|
|
49
51
|
RequestId["UserQuery"] = "user_query";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdPlatformRequestId.js","sourceRoot":"","sources":["../../src/api/SdPlatformRequestId.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,
|
|
1
|
+
{"version":3,"file":"SdPlatformRequestId.js","sourceRoot":"","sources":["../../src/api/SdPlatformRequestId.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,SA2KX;AA3KD,WAAY,SAAS;IAEjB;;OAEG;IACH,6CAAgC,CAAA;IAChC,2CAA8B,CAAA;IAC9B,qDAAwC,CAAA;IACxC,8BAAiB,CAAA;IACjB,oEAAuD,CAAA;IAEvD;;OAEG;IACH,0CAA6B,CAAA;IAC7B,8CAAiC,CAAA;IACjC,gDAAmC,CAAA;IACnC,8CAAiC,CAAA;IACjC,gDAAmC,CAAA;IAEnC,gDAAmC,CAAA;IACnC,kDAAqC,CAAA;IACrC,gDAAmC,CAAA;IACnC,kDAAqC,CAAA;IAErC,wDAA2C,CAAA;IAC3C,0DAA6C,CAAA;IAC7C,wDAA2C,CAAA;IAC3C,0DAA6C,CAAA;IAC7C,wDAA2C,CAAA;IAE3C,+CAAkC,CAAA;IAClC,+CAAkC,CAAA;IAElC,mCAAsB,CAAA;IACtB,uCAA0B,CAAA;IAC1B,yCAA4B,CAAA;IAC5B,0CAA6B,CAAA;IAE7B,qCAAwB,CAAA;IACxB,yCAA4B,CAAA;IAC5B,2CAA8B,CAAA;IAC9B,yCAA4B,CAAA;IAC5B,2CAA8B,CAAA;IAE9B,+BAAkB,CAAA;IAClB,mCAAsB,CAAA;IACtB,qCAAwB,CAAA;IACxB,mCAAsB,CAAA;IAEtB,yCAA4B,CAAA;IAE5B,iCAAoB,CAAA;IACpB,qCAAwB,CAAA;IACxB,qCAAwB,CAAA;IACxB,uCAA0B,CAAA;IAC1B,2CAA8B,CAAA;IAC9B,yCAA4B,CAAA;IAC5B,oDAAuC,CAAA;IACvC,iEAAoD,CAAA;IACpD,wDAA2C,CAAA;IAE3C,6CAAgC,CAAA;IAChC,4DAA+C,CAAA;IAE/C,mCAAsB,CAAA;IACtB,uCAA0B,CAAA;IAC1B,yCA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CAAA;IACtD,oFAAuE,CAAA;IACvE,iEAAoD,CAAA;IACpD,4FAA+E,CAAA;IAC/E,+EAAkE,CAAA;IAClE,wGAA2F,CAAA;IAC3F,mEAAsD,CAAA;IACtD,mFAAsE,CAAA;IAEtE,8DAAiD,CAAA;IACjD,0DAA6C,CAAA;IAC7C,yDAA4C,CAAA;IAC5C,kEAAqD,CAAA;IACrD,wDAA2C,CAAA;IAE3C,yEAA4D,CAAA;IAC5D,yEAA4D,CAAA;IAC5D,qEAAwD,CAAA;IACxD,mEAAsD,CAAA;IACtD,yEAA4D,CAAA;IAC5D,qEAAwD,CAAA;IAExD,+CAAkC,CAAA;IAClC,6CAAgC,CAAA;IAChC,+CAAkC,CAAA;IAClC,2CAA8B,CAAA;IAC9B,mDAAsC,CAAA;IACtC,2CAA8B,CAAA;IAC9B,+CAAkC,CAAA;IAClC,kEAAqD,CAAA;IACrD,0DAA6C,CAAA;IAE7C,0CAA6B,CAAA;IAE7B,sDAAyC,CAAA;AAC7C,CAAC,EA3KW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QA2KpB"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AAEpD,cAAc,2BAA2B,CAAC;AAE1C,cAAc,iCAAiC,CAAA;AAE/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,uCAAuC,CAAA;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAA;AACtD,cAAc,uCAAuC,CAAA;AACrD,cAAc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,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -43,4 +43,5 @@ __exportStar(require("./SdPlatformErrors"), exports);
|
|
|
43
43
|
__exportStar(require("./SdPlatformErrorTypeGuards"), exports);
|
|
44
44
|
__exportStar(require("./SdPlatformSdk"), exports);
|
|
45
45
|
__exportStar(require("./SdPlatformSdkCreate"), exports);
|
|
46
|
+
__exportStar(require("./util/conditions"), exports);
|
|
46
47
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sEAAoD;AAEpD,4DAA0C;AAE1C,kEAA+C;AAE/C,oEAAkD;AAClD,yEAAuD;AACvD,oEAAkD;AAClD,qEAAmD;AACnD,kEAAgD;AAChD,mEAAgD;AAChD,iEAA+C;AAC/C,iEAA8C;AAC9C,wEAAqD;AACrD,sEAAoD;AACpD,yEAAsD;AACtD,wEAAqD;AACrD,0EAAwD;AACxD,wEAAsD;AACtD,kEAAgD;AAChD,sEAAmD;AACnD,6EAA0D;AAC1D,+DAA6C;AAC7C,yEAAsD;AACtD,gEAA8C;AAC9C,mEAAgD;AAEhD,yDAAuC;AACvC,qDAAmC;AACnC,8DAA4C;AAC5C,kDAAgC;AAChC,wDAAsC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sEAAoD;AAEpD,4DAA0C;AAE1C,kEAA+C;AAE/C,oEAAkD;AAClD,yEAAuD;AACvD,oEAAkD;AAClD,qEAAmD;AACnD,kEAAgD;AAChD,mEAAgD;AAChD,iEAA+C;AAC/C,iEAA8C;AAC9C,wEAAqD;AACrD,sEAAoD;AACpD,yEAAsD;AACtD,wEAAqD;AACrD,0EAAwD;AACxD,wEAAsD;AACtD,kEAAgD;AAChD,sEAAmD;AACnD,6EAA0D;AAC1D,+DAA6C;AAC7C,yEAAsD;AACtD,gEAA8C;AAC9C,mEAAgD;AAEhD,yDAAuC;AACvC,qDAAmC;AACnC,8DAA4C;AAC5C,kDAAgC;AAChC,wDAAsC;AAEtC,oDAAkC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ResourcesApi } from "./commons/ResourcesApi";
|
|
2
|
-
import { SdPlatformResponseTag, SdPlatformResponseTagAdmin } from "@shapediver/api.platform-api-dto-v1";
|
|
3
|
-
import { SdPlatformQueryParameters, SdPlatformGetResponse, SdPlatformQueryResponse } from "@shapediver/api.platform-api-dto-v1";
|
|
2
|
+
import { SdPlatformDeleteResponse, SdPlatformPatchResponse, SdPlatformResponseTag, SdPlatformResponseTagAdmin, SdPlatformQueryParameters, SdPlatformGetResponse, SdPlatformQueryResponse, SdPlatformRequestTagPatch } from "@shapediver/api.platform-api-dto-v1";
|
|
4
3
|
export declare enum SdPlatformTagQueryEmbeddableFields {
|
|
5
4
|
ModelsCount = "models_count"
|
|
6
5
|
}
|
|
@@ -22,5 +21,16 @@ export declare class SdPlatformTagApi extends ResourcesApi {
|
|
|
22
21
|
* @returns collection of {@link SdPlatformResponseTag} based on query parameters.
|
|
23
22
|
*/
|
|
24
23
|
query(query?: SdPlatformTagQueryParameters): Promise<SdPlatformQueryResponse<SdPlatformResponseTag | SdPlatformResponseTagAdmin>>;
|
|
24
|
+
/**
|
|
25
|
+
* Patch a tag.
|
|
26
|
+
* @param id - the id of a tag
|
|
27
|
+
* @param body - {@link SdPlatformRequestTagPatch} as properties to patch.
|
|
28
|
+
*/
|
|
29
|
+
patch(id: string, body: SdPlatformRequestTagPatch): Promise<SdPlatformPatchResponse<SdPlatformResponseTag>>;
|
|
30
|
+
/**
|
|
31
|
+
* Delete a tag
|
|
32
|
+
* @param id - the id of a tag
|
|
33
|
+
*/
|
|
34
|
+
delete(id: string): Promise<SdPlatformDeleteResponse>;
|
|
25
35
|
}
|
|
26
36
|
//# sourceMappingURL=SdPlatformTagApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdPlatformTagApi.d.ts","sourceRoot":"","sources":["../../src/resources/SdPlatformTagApi.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,
|
|
1
|
+
{"version":3,"file":"SdPlatformTagApi.d.ts","sourceRoot":"","sources":["../../src/resources/SdPlatformTagApi.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EACH,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,0BAA0B,EAC1B,yBAAyB,EACzB,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,EAC5B,MAAM,qCAAqC,CAAA;AAE5C,oBAAY,kCAAkC;IAE1C,WAAW,iBAAiB;CAC/B;AAED,MAAM,MAAM,4BAA4B,GAAG,yBAAyB,CAAC,kCAAkC,CAAC,CAAC;AAEzG;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;IAE9C,SAAS,KAAK,cAAc,IAAI,MAAM,CAGrC;IAED;;;;OAIG;IACI,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,qBAAqB,GAAG,0BAA0B,CAAC,CAAC;IAK1G;;;;OAIG;IACI,KAAK,CAAC,KAAK,GAAE,4BAAiC,GAAG,OAAO,CAAC,uBAAuB,CAAC,qBAAqB,GAAG,0BAA0B,CAAC,CAAC;IAK5I;;;;OAIG;IACI,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,uBAAuB,CAAC,qBAAqB,CAAC,CAAC;IAKlH;;;OAGG;IACI,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC;CAI/D"}
|
|
@@ -30,6 +30,21 @@ class SdPlatformTagApi extends ResourcesApi_1.ResourcesApi {
|
|
|
30
30
|
query(query = {}) {
|
|
31
31
|
return super.__query(SdPlatformRequestId_1.RequestId.TagQuery, query);
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Patch a tag.
|
|
35
|
+
* @param id - the id of a tag
|
|
36
|
+
* @param body - {@link SdPlatformRequestTagPatch} as properties to patch.
|
|
37
|
+
*/
|
|
38
|
+
patch(id, body) {
|
|
39
|
+
return super.__patch(SdPlatformRequestId_1.RequestId.TagPatch, id, body);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Delete a tag
|
|
43
|
+
* @param id - the id of a tag
|
|
44
|
+
*/
|
|
45
|
+
delete(id) {
|
|
46
|
+
return super.__delete(SdPlatformRequestId_1.RequestId.TagDelete, id);
|
|
47
|
+
}
|
|
33
48
|
}
|
|
34
49
|
exports.SdPlatformTagApi = SdPlatformTagApi;
|
|
35
50
|
//# sourceMappingURL=SdPlatformTagApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdPlatformTagApi.js","sourceRoot":"","sources":["../../src/resources/SdPlatformTagApi.ts"],"names":[],"mappings":";;;AAAA,oEAAuD;AACvD,yDAAsD;
|
|
1
|
+
{"version":3,"file":"SdPlatformTagApi.js","sourceRoot":"","sources":["../../src/resources/SdPlatformTagApi.ts"],"names":[],"mappings":";;;AAAA,oEAAuD;AACvD,yDAAsD;AAYtD,IAAY,kCAGX;AAHD,WAAY,kCAAkC;IAE1C,kEAA4B,CAAA;AAChC,CAAC,EAHW,kCAAkC,GAAlC,0CAAkC,KAAlC,0CAAkC,QAG7C;AAID;;GAEG;AACH,MAAa,gBAAiB,SAAQ,2BAAY;IAE9C,IAAc,cAAc;QAExB,OAAO,MAAM,CAAC;IAClB,CAAC;IAED;;;;OAIG;IACI,GAAG,CAAC,EAAU;QAEjB,OAAO,KAAK,CAAC,KAAK,CAAC,+BAAS,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,QAAsC,EAAE;QAEjD,OAAO,KAAK,CAAC,OAAO,CAA6D,+BAAS,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAChH,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,EAAU,EAAE,IAA+B;QAEpD,OAAO,KAAK,CAAC,OAAO,CAAC,+BAAS,CAAC,QAAQ,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,EAAU;QAEpB,OAAO,KAAK,CAAC,QAAQ,CAAC,+BAAS,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IACnD,CAAC;CACJ;AA7CD,4CA6CC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { SdPlatformChargebeeSubscription, SdPlatformPolicyPermissionsOrganization, SdPlatformPolicyPermissionsUser, SdPlatformResponseOrganizationMember, SdPlatformResponseOrganizationPublic, SdPlatformResponseUserMinimal, SdPlatformResponseUserSelf } from "@shapediver/api.platform-api-dto-v1";
|
|
2
|
+
/**
|
|
3
|
+
* Status of a Chargebee subscription
|
|
4
|
+
* @see https://apidocs.chargebee.com/docs/api/v1/subscriptions?lang=curl#subscription_status
|
|
5
|
+
*/
|
|
6
|
+
export declare enum ChargebeeSubscriptionStatusEnum {
|
|
7
|
+
/** The subscription is scheduled to start at a future date. */
|
|
8
|
+
Future = "future",
|
|
9
|
+
/** The subscription is in trial. */
|
|
10
|
+
InTrial = "in_trial",
|
|
11
|
+
/** The subscription is active and will be charged for automatically based on the items in it. */
|
|
12
|
+
Active = "active",
|
|
13
|
+
/** The subscription will be canceled at the end of the current term. */
|
|
14
|
+
NonRenewing = "non_renewing",
|
|
15
|
+
/** The subscription has been canceled and is no longer in service. */
|
|
16
|
+
Cancelled = "cancelled",
|
|
17
|
+
/** Unknown subscription status. This is not defined by Chargebee. */
|
|
18
|
+
Unknown = "unknown"
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Given a subscription get its status
|
|
22
|
+
* @param subscription
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
export declare const getChargebeeSubscriptionStatus: (subscription: SdPlatformChargebeeSubscription) => ChargebeeSubscriptionStatusEnum;
|
|
26
|
+
/**
|
|
27
|
+
* Check whether the subscription status counts as a "Free" subscription.
|
|
28
|
+
* @param status
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
export declare const isChargebeeSubscriptionStatusFree: (status: ChargebeeSubscriptionStatusEnum) => boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Check whether the subscriptions counts as a "Free" subscription.
|
|
34
|
+
* @param subscription
|
|
35
|
+
* @returns
|
|
36
|
+
*/
|
|
37
|
+
export declare const isChargebeeSubscriptionFree: (subscription: SdPlatformChargebeeSubscription) => boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Check whether the given user is member of an organization.
|
|
40
|
+
*/
|
|
41
|
+
export declare const isUserOrganizationMember: (user: SdPlatformResponseUserSelf) => boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Check whether the subscription of the user or organization counts as a "Free" subscription.
|
|
44
|
+
* @param user
|
|
45
|
+
* @param organization must be provided in case the user is member of an organization
|
|
46
|
+
* @returns
|
|
47
|
+
*/
|
|
48
|
+
export declare const isUserChargebeeSubscriptionFree: (user: SdPlatformResponseUserSelf, organization?: SdPlatformResponseOrganizationMember) => boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Check whether a permission is granted for the given user.
|
|
51
|
+
* @param user
|
|
52
|
+
* @param permission
|
|
53
|
+
* @returns
|
|
54
|
+
*/
|
|
55
|
+
export declare const hasUserPermission: (user: SdPlatformResponseUserMinimal, permission: SdPlatformPolicyPermissionsUser) => boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Check whether a permission is granted for the given organization.
|
|
58
|
+
* @param organization
|
|
59
|
+
* @param permission
|
|
60
|
+
* @returns
|
|
61
|
+
*/
|
|
62
|
+
export declare const hasOrganizationPermission: (organization: SdPlatformResponseOrganizationPublic, permission: SdPlatformPolicyPermissionsOrganization) => boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Check whether the given user is able to change
|
|
65
|
+
* * her default backend system (in case user is not an organization member), or
|
|
66
|
+
* * her organization's default backend system (in case user is an organization member).
|
|
67
|
+
*
|
|
68
|
+
* The checks include whether
|
|
69
|
+
* * permission is granted to do the change, and
|
|
70
|
+
* * there are at least two backend systems to choose from.
|
|
71
|
+
*
|
|
72
|
+
* In case the user is a member of an organization, the organization parameter
|
|
73
|
+
* must be provided.
|
|
74
|
+
* @param user
|
|
75
|
+
* @param organization
|
|
76
|
+
*/
|
|
77
|
+
export declare const canChangeBackendSystem: (user: SdPlatformResponseUserSelf, organization?: SdPlatformResponseOrganizationPublic) => boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Check whether the given user is limited to the shared Rhino 6 system, and can
|
|
80
|
+
* not switch to another geometry backend system.
|
|
81
|
+
*
|
|
82
|
+
* @param user
|
|
83
|
+
* @returns
|
|
84
|
+
*/
|
|
85
|
+
export declare const isLimitedToSharedRhino6System: (user: SdPlatformResponseUserSelf) => boolean;
|
|
86
|
+
//# sourceMappingURL=conditions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditions.d.ts","sourceRoot":"","sources":["../../src/util/conditions.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,+BAA+B,EAC/B,uCAAuC,EACvC,+BAA+B,EAE/B,oCAAoC,EACpC,oCAAoC,EACpC,6BAA6B,EAC7B,0BAA0B,EAC7B,MAAM,qCAAqC,CAAC;AAE7C;;;GAGG;AACH,oBAAY,+BAA+B;IACvC,+DAA+D;IAC/D,MAAM,WAAW;IACjB,oCAAoC;IACpC,OAAO,aAAa;IACpB,iGAAiG;IACjG,MAAM,WAAW;IACjB,wEAAwE;IACxE,WAAW,iBAAiB;IAC5B,sEAAsE;IACtE,SAAS,cAAc;IACvB,qEAAqE;IACrE,OAAO,YAAY;CACtB;AAED;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,iBAAkB,+BAA+B,KAAG,+BAe9F,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,WAAY,+BAA+B,KAAG,OAM3F,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,iBAAkB,+BAA+B,KAAG,OAE3F,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB,SAAU,0BAA0B,KAAG,OAE3E,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,SAAU,0BAA0B,iBAAiB,oCAAoC,KAAG,OAevI,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,SACpB,6BAA6B,cACvB,+BAA+B,KAC5C,OAEF,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,iBACpB,oCAAoC,cACtC,uCAAuC,KACpD,OAEF,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB,SACzB,0BAA0B,iBACjB,oCAAoC,KACpD,OAsBF,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,SAChC,0BAA0B,KACjC,OAOF,CAAA"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isLimitedToSharedRhino6System = exports.canChangeBackendSystem = exports.hasOrganizationPermission = exports.hasUserPermission = exports.isUserChargebeeSubscriptionFree = exports.isUserOrganizationMember = exports.isChargebeeSubscriptionFree = exports.isChargebeeSubscriptionStatusFree = exports.getChargebeeSubscriptionStatus = exports.ChargebeeSubscriptionStatusEnum = void 0;
|
|
4
|
+
const api_platform_api_dto_v1_1 = require("@shapediver/api.platform-api-dto-v1");
|
|
5
|
+
/**
|
|
6
|
+
* Status of a Chargebee subscription
|
|
7
|
+
* @see https://apidocs.chargebee.com/docs/api/v1/subscriptions?lang=curl#subscription_status
|
|
8
|
+
*/
|
|
9
|
+
var ChargebeeSubscriptionStatusEnum;
|
|
10
|
+
(function (ChargebeeSubscriptionStatusEnum) {
|
|
11
|
+
/** The subscription is scheduled to start at a future date. */
|
|
12
|
+
ChargebeeSubscriptionStatusEnum["Future"] = "future";
|
|
13
|
+
/** The subscription is in trial. */
|
|
14
|
+
ChargebeeSubscriptionStatusEnum["InTrial"] = "in_trial";
|
|
15
|
+
/** The subscription is active and will be charged for automatically based on the items in it. */
|
|
16
|
+
ChargebeeSubscriptionStatusEnum["Active"] = "active";
|
|
17
|
+
/** The subscription will be canceled at the end of the current term. */
|
|
18
|
+
ChargebeeSubscriptionStatusEnum["NonRenewing"] = "non_renewing";
|
|
19
|
+
/** The subscription has been canceled and is no longer in service. */
|
|
20
|
+
ChargebeeSubscriptionStatusEnum["Cancelled"] = "cancelled";
|
|
21
|
+
/** Unknown subscription status. This is not defined by Chargebee. */
|
|
22
|
+
ChargebeeSubscriptionStatusEnum["Unknown"] = "unknown";
|
|
23
|
+
})(ChargebeeSubscriptionStatusEnum = exports.ChargebeeSubscriptionStatusEnum || (exports.ChargebeeSubscriptionStatusEnum = {}));
|
|
24
|
+
/**
|
|
25
|
+
* Given a subscription get its status
|
|
26
|
+
* @param subscription
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
29
|
+
const getChargebeeSubscriptionStatus = (subscription) => {
|
|
30
|
+
switch (subscription.status) {
|
|
31
|
+
case ChargebeeSubscriptionStatusEnum.Future:
|
|
32
|
+
return ChargebeeSubscriptionStatusEnum.Future;
|
|
33
|
+
case ChargebeeSubscriptionStatusEnum.InTrial:
|
|
34
|
+
return ChargebeeSubscriptionStatusEnum.InTrial;
|
|
35
|
+
case ChargebeeSubscriptionStatusEnum.Active:
|
|
36
|
+
return ChargebeeSubscriptionStatusEnum.Active;
|
|
37
|
+
case ChargebeeSubscriptionStatusEnum.NonRenewing:
|
|
38
|
+
return ChargebeeSubscriptionStatusEnum.NonRenewing;
|
|
39
|
+
case ChargebeeSubscriptionStatusEnum.Cancelled:
|
|
40
|
+
return ChargebeeSubscriptionStatusEnum.Cancelled;
|
|
41
|
+
default:
|
|
42
|
+
return ChargebeeSubscriptionStatusEnum.Unknown;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
exports.getChargebeeSubscriptionStatus = getChargebeeSubscriptionStatus;
|
|
46
|
+
/**
|
|
47
|
+
* Check whether the subscription status counts as a "Free" subscription.
|
|
48
|
+
* @param status
|
|
49
|
+
* @returns
|
|
50
|
+
*/
|
|
51
|
+
const isChargebeeSubscriptionStatusFree = (status) => {
|
|
52
|
+
return [
|
|
53
|
+
ChargebeeSubscriptionStatusEnum.Future,
|
|
54
|
+
ChargebeeSubscriptionStatusEnum.Cancelled,
|
|
55
|
+
ChargebeeSubscriptionStatusEnum.Unknown
|
|
56
|
+
].includes(status);
|
|
57
|
+
};
|
|
58
|
+
exports.isChargebeeSubscriptionStatusFree = isChargebeeSubscriptionStatusFree;
|
|
59
|
+
/**
|
|
60
|
+
* Check whether the subscriptions counts as a "Free" subscription.
|
|
61
|
+
* @param subscription
|
|
62
|
+
* @returns
|
|
63
|
+
*/
|
|
64
|
+
const isChargebeeSubscriptionFree = (subscription) => {
|
|
65
|
+
return (0, exports.isChargebeeSubscriptionStatusFree)((0, exports.getChargebeeSubscriptionStatus)(subscription));
|
|
66
|
+
};
|
|
67
|
+
exports.isChargebeeSubscriptionFree = isChargebeeSubscriptionFree;
|
|
68
|
+
/**
|
|
69
|
+
* Check whether the given user is member of an organization.
|
|
70
|
+
*/
|
|
71
|
+
const isUserOrganizationMember = (user) => {
|
|
72
|
+
return !!user.organization_role;
|
|
73
|
+
};
|
|
74
|
+
exports.isUserOrganizationMember = isUserOrganizationMember;
|
|
75
|
+
/**
|
|
76
|
+
* Check whether the subscription of the user or organization counts as a "Free" subscription.
|
|
77
|
+
* @param user
|
|
78
|
+
* @param organization must be provided in case the user is member of an organization
|
|
79
|
+
* @returns
|
|
80
|
+
*/
|
|
81
|
+
const isUserChargebeeSubscriptionFree = (user, organization) => {
|
|
82
|
+
if (!(0, exports.isUserOrganizationMember)(user)) {
|
|
83
|
+
if (!user.chargebee_subscription)
|
|
84
|
+
throw new Error('Embed field \"chargebee_subscription\" required for user but not available.');
|
|
85
|
+
return (0, exports.isChargebeeSubscriptionFree)(user.chargebee_subscription);
|
|
86
|
+
}
|
|
87
|
+
if (!organization)
|
|
88
|
+
throw new Error('Information about organization required for organization members.');
|
|
89
|
+
if (!organization.chargebee_subscription)
|
|
90
|
+
throw new Error('Embed field \"chargebee_subscription\" required for organization but not available.');
|
|
91
|
+
return (0, exports.isChargebeeSubscriptionFree)(organization.chargebee_subscription);
|
|
92
|
+
};
|
|
93
|
+
exports.isUserChargebeeSubscriptionFree = isUserChargebeeSubscriptionFree;
|
|
94
|
+
/**
|
|
95
|
+
* Check whether a permission is granted for the given user.
|
|
96
|
+
* @param user
|
|
97
|
+
* @param permission
|
|
98
|
+
* @returns
|
|
99
|
+
*/
|
|
100
|
+
const hasUserPermission = (user, permission) => {
|
|
101
|
+
return user.permissions.includes(permission);
|
|
102
|
+
};
|
|
103
|
+
exports.hasUserPermission = hasUserPermission;
|
|
104
|
+
/**
|
|
105
|
+
* Check whether a permission is granted for the given organization.
|
|
106
|
+
* @param organization
|
|
107
|
+
* @param permission
|
|
108
|
+
* @returns
|
|
109
|
+
*/
|
|
110
|
+
const hasOrganizationPermission = (organization, permission) => {
|
|
111
|
+
return organization.permissions.includes(permission);
|
|
112
|
+
};
|
|
113
|
+
exports.hasOrganizationPermission = hasOrganizationPermission;
|
|
114
|
+
/**
|
|
115
|
+
* Check whether the given user is able to change
|
|
116
|
+
* * her default backend system (in case user is not an organization member), or
|
|
117
|
+
* * her organization's default backend system (in case user is an organization member).
|
|
118
|
+
*
|
|
119
|
+
* The checks include whether
|
|
120
|
+
* * permission is granted to do the change, and
|
|
121
|
+
* * there are at least two backend systems to choose from.
|
|
122
|
+
*
|
|
123
|
+
* In case the user is a member of an organization, the organization parameter
|
|
124
|
+
* must be provided.
|
|
125
|
+
* @param user
|
|
126
|
+
* @param organization
|
|
127
|
+
*/
|
|
128
|
+
const canChangeBackendSystem = (user, organization) => {
|
|
129
|
+
if ((0, exports.isUserOrganizationMember)(user)) {
|
|
130
|
+
if (!organization)
|
|
131
|
+
throw new Error('Information about organization required for organization members.');
|
|
132
|
+
if (!organization.features)
|
|
133
|
+
throw new Error('Property \"features"\ required but not set for organization.');
|
|
134
|
+
if (organization.features.backend.length <= 1)
|
|
135
|
+
return false;
|
|
136
|
+
return (0, exports.hasOrganizationPermission)(organization, api_platform_api_dto_v1_1.SdPlatformPolicyPermissionsOrganization.updateOrganizationAdmin);
|
|
137
|
+
}
|
|
138
|
+
if (!user.features)
|
|
139
|
+
throw new Error('Property \"features"\ required but not set for user.');
|
|
140
|
+
if (user.features.backend.length <= 1)
|
|
141
|
+
return false;
|
|
142
|
+
return (0, exports.hasUserPermission)(user, api_platform_api_dto_v1_1.SdPlatformPolicyPermissionsUser.updateSelf);
|
|
143
|
+
};
|
|
144
|
+
exports.canChangeBackendSystem = canChangeBackendSystem;
|
|
145
|
+
/**
|
|
146
|
+
* Check whether the given user is limited to the shared Rhino 6 system, and can
|
|
147
|
+
* not switch to another geometry backend system.
|
|
148
|
+
*
|
|
149
|
+
* @param user
|
|
150
|
+
* @returns
|
|
151
|
+
*/
|
|
152
|
+
const isLimitedToSharedRhino6System = (user) => {
|
|
153
|
+
// Note that user.features is mapped from organization.features for organization members.
|
|
154
|
+
if (!user.features)
|
|
155
|
+
throw new Error('Property \"features"\ required but not set for user.');
|
|
156
|
+
return user.features.backend.length === 1 && user.features.backend[0] === 'sdeuc1';
|
|
157
|
+
};
|
|
158
|
+
exports.isLimitedToSharedRhino6System = isLimitedToSharedRhino6System;
|
|
159
|
+
//# sourceMappingURL=conditions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditions.js","sourceRoot":"","sources":["../../src/util/conditions.ts"],"names":[],"mappings":";;;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dk-v1",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.27.0",
|
|
4
4
|
"description": "SDK to communicate with the Platform API version 1",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shapediver",
|
|
7
7
|
"sdk",
|
|
8
8
|
"platform"
|
|
9
9
|
],
|
|
10
|
-
"author": "
|
|
10
|
+
"author": "Alex Schiftner <alex@shapediver.com>",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"main": "dist/index.js",
|
|
13
13
|
"directories": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"post-publish": "bash ../../scripts/post-publish.sh"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@shapediver/api.platform-api-dto-v1": "~2.
|
|
41
|
+
"@shapediver/api.platform-api-dto-v1": "~2.27.0",
|
|
42
42
|
"@shapediver/api.geometry-api-dto-v2": "~1.11.0",
|
|
43
43
|
"axios": "^0.26.1",
|
|
44
44
|
"jwt-decode": "~3.1.2"
|