@croct/sdk 0.5.0 → 0.7.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/activeRecord.d.ts +1 -1
- package/activeRecord.js +15 -12
- package/base64Url.js +7 -2
- package/cache/cache.d.ts +12 -0
- package/cache/cache.js +2 -0
- package/cache/fallbackCache.d.ts +2 -2
- package/cache/fallbackCache.js +6 -3
- package/cache/inMemoryCache.d.ts +2 -2
- package/cache/inMemoryCache.js +5 -2
- package/cache/index.d.ts +4 -12
- package/cache/index.js +11 -0
- package/cache/localStorageCache.d.ts +2 -2
- package/cache/localStorageCache.js +4 -1
- package/channel/beaconSocketChannel.d.ts +3 -3
- package/channel/beaconSocketChannel.js +12 -9
- package/channel/channel.d.ts +15 -0
- package/channel/channel.js +2 -0
- package/channel/encodedChannel.d.ts +2 -2
- package/channel/encodedChannel.js +4 -1
- package/channel/guaranteedChannel.d.ts +1 -1
- package/channel/guaranteedChannel.js +10 -7
- package/channel/index.d.ts +8 -15
- package/channel/index.js +19 -0
- package/channel/queuedChannel.d.ts +2 -2
- package/channel/queuedChannel.js +10 -7
- package/channel/retryChannel.d.ts +3 -3
- package/channel/retryChannel.js +18 -15
- package/channel/sandboxChannel.d.ts +2 -2
- package/channel/sandboxChannel.js +4 -1
- package/channel/socketChannel.d.ts +1 -1
- package/channel/socketChannel.js +12 -9
- package/cid/assigner.d.ts +3 -0
- package/cid/assigner.js +2 -0
- package/cid/cachedAssigner.d.ts +5 -5
- package/cid/cachedAssigner.js +9 -6
- package/cid/fixedAssigner.d.ts +6 -0
- package/cid/fixedAssigner.js +13 -0
- package/cid/index.d.ts +4 -3
- package/cid/index.js +11 -0
- package/cid/remoteAssigner.d.ts +3 -3
- package/cid/remoteAssigner.js +11 -8
- package/constants.js +8 -5
- package/container.d.ts +5 -5
- package/container.js +49 -55
- package/context.d.ts +4 -4
- package/context.js +14 -13
- package/error.d.ts +1 -1
- package/error.js +7 -2
- package/evaluator.d.ts +2 -2
- package/evaluator.js +26 -23
- package/eventManager.d.ts +1 -1
- package/eventManager.js +5 -2
- package/facade/evaluatorFacade.d.ts +3 -3
- package/facade/evaluatorFacade.js +13 -10
- package/facade/index.d.ts +7 -0
- package/facade/index.js +19 -0
- package/facade/sdkFacade.d.ts +9 -9
- package/facade/sdkFacade.js +35 -32
- package/facade/sessionFacade.d.ts +3 -3
- package/facade/sessionFacade.js +6 -3
- package/facade/sessionPatch.d.ts +3 -3
- package/facade/sessionPatch.js +8 -5
- package/facade/trackerFacade.d.ts +2 -2
- package/facade/trackerFacade.js +21 -17
- package/facade/userFacade.d.ts +4 -4
- package/facade/userFacade.js +6 -3
- package/facade/userPatch.d.ts +3 -3
- package/facade/userPatch.js +8 -5
- package/index.d.ts +2 -2
- package/index.js +7 -3
- package/json.js +2 -0
- package/logging/consoleLogger.d.ts +2 -2
- package/logging/consoleLogger.js +8 -5
- package/logging/index.d.ts +4 -9
- package/logging/index.js +11 -0
- package/logging/logger.d.ts +9 -0
- package/logging/logger.js +2 -0
- package/logging/namespacedLogger.d.ts +2 -2
- package/logging/namespacedLogger.js +4 -1
- package/logging/nullLogger.d.ts +2 -2
- package/logging/nullLogger.js +4 -1
- package/namespacedStorage.d.ts +1 -1
- package/namespacedStorage.js +7 -4
- package/package.json +21 -18
- package/patch.js +2 -0
- package/queue/capacityRestrictedQueue.d.ts +2 -2
- package/queue/capacityRestrictedQueue.js +4 -1
- package/queue/inMemoryQueue.d.ts +2 -2
- package/queue/inMemoryQueue.js +6 -3
- package/queue/index.d.ts +5 -9
- package/queue/index.js +13 -0
- package/queue/monitoredQueue.d.ts +6 -6
- package/queue/monitoredQueue.js +6 -3
- package/queue/persistentQueue.d.ts +2 -2
- package/queue/persistentQueue.js +5 -2
- package/queue/queue.d.ts +9 -0
- package/queue/queue.js +2 -0
- package/retry/arbitraryPolicy.d.ts +2 -2
- package/retry/arbitraryPolicy.js +6 -3
- package/retry/backoffPolicy.d.ts +2 -2
- package/retry/backoffPolicy.js +4 -1
- package/retry/index.d.ts +5 -4
- package/retry/index.js +13 -0
- package/retry/maxAttemptsPolicy.d.ts +2 -2
- package/retry/maxAttemptsPolicy.js +4 -1
- package/retry/neverPolicy.d.ts +2 -2
- package/retry/neverPolicy.js +4 -1
- package/retry/policy.d.ts +4 -0
- package/retry/policy.js +2 -0
- package/schema/attributeSchema.d.ts +2 -0
- package/schema/attributeSchema.js +8 -0
- package/schema/contentSchemas.d.ts +2 -0
- package/schema/contentSchemas.js +46 -0
- package/schema/contextSchemas.d.ts +1 -1
- package/schema/contextSchemas.js +5 -2
- package/schema/ecommerceSchemas.d.ts +1 -1
- package/schema/ecommerceSchemas.js +60 -60
- package/schema/evaluationSchemas.d.ts +1 -1
- package/schema/evaluationSchemas.js +7 -6
- package/schema/eventSchemas.d.ts +3 -2
- package/schema/eventSchemas.js +53 -48
- package/schema/index.d.ts +10 -0
- package/schema/index.js +13 -0
- package/schema/loggerSchema.d.ts +1 -1
- package/schema/loggerSchema.js +9 -7
- package/schema/operationSchemas.d.ts +1 -1
- package/schema/operationSchemas.js +26 -24
- package/schema/sdkFacadeSchemas.d.ts +2 -2
- package/schema/sdkFacadeSchemas.js +22 -24
- package/schema/sdkSchemas.d.ts +2 -2
- package/schema/sdkSchemas.js +21 -22
- package/schema/tokenSchema.d.ts +2 -3
- package/schema/tokenSchema.js +18 -17
- package/schema/userSchema.d.ts +1 -1
- package/schema/userSchema.js +47 -61
- package/sdk.d.ts +5 -5
- package/sdk.js +27 -24
- package/sdkEvents.d.ts +2 -2
- package/sdkEvents.js +2 -0
- package/sourceLocation.js +12 -6
- package/tab.d.ts +2 -2
- package/tab.js +12 -9
- package/token/cachedTokenStore.d.ts +3 -3
- package/token/cachedTokenStore.js +6 -3
- package/token/inMemoryTokenStore.d.ts +2 -2
- package/token/inMemoryTokenStore.js +4 -1
- package/token/index.d.ts +4 -41
- package/token/index.js +11 -96
- package/token/replicatedTokenStore.d.ts +2 -2
- package/token/replicatedTokenStore.js +4 -1
- package/token/token.d.ts +41 -0
- package/token/token.js +99 -0
- package/tracker.d.ts +3 -3
- package/tracker.js +29 -26
- package/trackingEvents.d.ts +29 -14
- package/trackingEvents.js +20 -14
- package/transformer.js +5 -1
- package/utilityTypes.js +2 -0
- package/uuid.js +5 -1
- package/validation/arrayType.d.ts +2 -2
- package/validation/arrayType.js +13 -9
- package/validation/booleanType.d.ts +2 -2
- package/validation/booleanType.js +7 -3
- package/validation/functionType.d.ts +2 -2
- package/validation/functionType.js +7 -3
- package/validation/index.d.ts +12 -18
- package/validation/index.js +29 -30
- package/validation/jsonType.d.ts +2 -1
- package/validation/jsonType.js +25 -14
- package/validation/mixedSchema.d.ts +2 -2
- package/validation/mixedSchema.js +4 -1
- package/validation/nullType.d.ts +2 -2
- package/validation/nullType.js +7 -3
- package/validation/numberType.d.ts +2 -2
- package/validation/numberType.js +13 -9
- package/validation/objectType.d.ts +2 -2
- package/validation/objectType.js +23 -18
- package/validation/schema.d.ts +16 -0
- package/validation/schema.js +15 -0
- package/validation/stringType.d.ts +2 -2
- package/validation/stringType.js +16 -12
- package/validation/unionType.d.ts +2 -2
- package/validation/unionType.js +14 -10
- package/validation/violation.d.ts +2 -0
- package/validation/violation.js +24 -0
- package/cid/fixedCidAssigner.d.ts +0 -6
- package/cid/fixedCidAssigner.js +0 -10
|
@@ -1,71 +1,73 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var pointer = new StringType({
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.unsetOperation = exports.clearOperation = exports.incrementOperation = exports.decrementOperation = exports.mergeOperation = exports.combineOperation = exports.setOperation = exports.addOperation = void 0;
|
|
4
|
+
var validation_1 = require("../validation");
|
|
5
|
+
var attributeSchema_1 = require("./attributeSchema");
|
|
6
|
+
var pointer = new validation_1.StringType({
|
|
7
7
|
format: 'pointer',
|
|
8
8
|
});
|
|
9
|
-
var simpleArray = new JsonArrayType({
|
|
10
|
-
items: new JsonPrimitiveType(),
|
|
9
|
+
var simpleArray = new validation_1.JsonArrayType({
|
|
10
|
+
items: new validation_1.JsonPrimitiveType(),
|
|
11
11
|
});
|
|
12
|
-
var simpleMap = new JsonObjectType({
|
|
13
|
-
properties: new JsonPrimitiveType(),
|
|
12
|
+
var simpleMap = new validation_1.JsonObjectType({
|
|
13
|
+
properties: new validation_1.JsonPrimitiveType(),
|
|
14
|
+
propertyNames: attributeSchema_1.attributeNameSchema,
|
|
14
15
|
});
|
|
15
|
-
var complexMap = new JsonObjectType({
|
|
16
|
-
properties: new UnionType(new JsonPrimitiveType(), simpleArray, simpleMap),
|
|
16
|
+
var complexMap = new validation_1.JsonObjectType({
|
|
17
|
+
properties: new validation_1.UnionType(new validation_1.JsonPrimitiveType(), simpleArray, simpleMap),
|
|
18
|
+
propertyNames: attributeSchema_1.attributeNameSchema,
|
|
17
19
|
});
|
|
18
|
-
var collectionValue = new UnionType(simpleArray, complexMap);
|
|
19
|
-
var mixedValue = new UnionType(new JsonPrimitiveType(), simpleArray, complexMap);
|
|
20
|
-
|
|
20
|
+
var collectionValue = new validation_1.UnionType(simpleArray, complexMap);
|
|
21
|
+
var mixedValue = new validation_1.UnionType(new validation_1.JsonPrimitiveType(), simpleArray, complexMap);
|
|
22
|
+
exports.addOperation = new validation_1.ObjectType({
|
|
21
23
|
required: ['path', 'value'],
|
|
22
24
|
properties: {
|
|
23
25
|
path: pointer,
|
|
24
26
|
value: mixedValue,
|
|
25
27
|
},
|
|
26
28
|
});
|
|
27
|
-
|
|
29
|
+
exports.setOperation = new validation_1.ObjectType({
|
|
28
30
|
required: ['path', 'value'],
|
|
29
31
|
properties: {
|
|
30
32
|
path: pointer,
|
|
31
33
|
value: mixedValue,
|
|
32
34
|
},
|
|
33
35
|
});
|
|
34
|
-
|
|
36
|
+
exports.combineOperation = new validation_1.ObjectType({
|
|
35
37
|
required: ['path', 'value'],
|
|
36
38
|
properties: {
|
|
37
39
|
path: pointer,
|
|
38
40
|
value: mixedValue,
|
|
39
41
|
},
|
|
40
42
|
});
|
|
41
|
-
|
|
43
|
+
exports.mergeOperation = new validation_1.ObjectType({
|
|
42
44
|
required: ['path', 'value'],
|
|
43
45
|
properties: {
|
|
44
46
|
path: pointer,
|
|
45
47
|
value: collectionValue,
|
|
46
48
|
},
|
|
47
49
|
});
|
|
48
|
-
|
|
50
|
+
exports.decrementOperation = new validation_1.ObjectType({
|
|
49
51
|
required: ['path', 'value'],
|
|
50
52
|
properties: {
|
|
51
53
|
path: pointer,
|
|
52
|
-
value: new NumberType(),
|
|
54
|
+
value: new validation_1.NumberType(),
|
|
53
55
|
},
|
|
54
56
|
});
|
|
55
|
-
|
|
57
|
+
exports.incrementOperation = new validation_1.ObjectType({
|
|
56
58
|
required: ['path', 'value'],
|
|
57
59
|
properties: {
|
|
58
60
|
path: pointer,
|
|
59
|
-
value: new NumberType(),
|
|
61
|
+
value: new validation_1.NumberType(),
|
|
60
62
|
},
|
|
61
63
|
});
|
|
62
|
-
|
|
64
|
+
exports.clearOperation = new validation_1.ObjectType({
|
|
63
65
|
required: ['path'],
|
|
64
66
|
properties: {
|
|
65
67
|
path: pointer,
|
|
66
68
|
},
|
|
67
69
|
});
|
|
68
|
-
|
|
70
|
+
exports.unsetOperation = new validation_1.ObjectType({
|
|
69
71
|
required: ['path'],
|
|
70
72
|
properties: {
|
|
71
73
|
path: pointer,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import ObjectType from '../validation
|
|
2
|
-
export declare const
|
|
1
|
+
import { ObjectType } from '../validation';
|
|
2
|
+
export declare const sdkFacadeConfigurationSchema: ObjectType;
|
|
@@ -1,40 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import FunctionType from '../validation/functionType';
|
|
10
|
-
export var configurationSchema = new ObjectType({
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sdkFacadeConfigurationSchema = void 0;
|
|
4
|
+
var validation_1 = require("../validation");
|
|
5
|
+
var contextSchemas_1 = require("./contextSchemas");
|
|
6
|
+
var sdkSchemas_1 = require("./sdkSchemas");
|
|
7
|
+
var loggerSchema_1 = require("./loggerSchema");
|
|
8
|
+
exports.sdkFacadeConfigurationSchema = new validation_1.ObjectType({
|
|
11
9
|
required: ['appId'],
|
|
12
10
|
properties: {
|
|
13
|
-
appId: new StringType({
|
|
11
|
+
appId: new validation_1.StringType({
|
|
14
12
|
format: 'uuid',
|
|
15
13
|
}),
|
|
16
|
-
cid: new StringType({
|
|
14
|
+
cid: new validation_1.StringType({
|
|
17
15
|
pattern: /^[0-9a-f]{32}$/i,
|
|
18
16
|
}),
|
|
19
|
-
tokenScope: tokenScopeSchema,
|
|
20
|
-
debug: new BooleanType(),
|
|
21
|
-
track: new BooleanType(),
|
|
22
|
-
logger: loggerSchema,
|
|
23
|
-
urlSanitizer: new FunctionType(),
|
|
24
|
-
eventMetadata: eventMetadataSchema,
|
|
25
|
-
userId: new StringType({
|
|
17
|
+
tokenScope: contextSchemas_1.tokenScopeSchema,
|
|
18
|
+
debug: new validation_1.BooleanType(),
|
|
19
|
+
track: new validation_1.BooleanType(),
|
|
20
|
+
logger: loggerSchema_1.loggerSchema,
|
|
21
|
+
urlSanitizer: new validation_1.FunctionType(),
|
|
22
|
+
eventMetadata: sdkSchemas_1.eventMetadataSchema,
|
|
23
|
+
userId: new validation_1.StringType({
|
|
26
24
|
minLength: 1,
|
|
27
25
|
}),
|
|
28
|
-
token: new UnionType(new StringType({
|
|
26
|
+
token: new validation_1.UnionType(new validation_1.StringType({
|
|
29
27
|
pattern: /^[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.?[A-Za-z0-9-_.+/=]*$/,
|
|
30
|
-
}), new NullType()),
|
|
31
|
-
trackerEndpointUrl: new StringType({
|
|
28
|
+
}), new validation_1.NullType()),
|
|
29
|
+
trackerEndpointUrl: new validation_1.StringType({
|
|
32
30
|
format: 'url',
|
|
33
31
|
}),
|
|
34
|
-
evaluationEndpointUrl: new StringType({
|
|
32
|
+
evaluationEndpointUrl: new validation_1.StringType({
|
|
35
33
|
format: 'url',
|
|
36
34
|
}),
|
|
37
|
-
bootstrapEndpointUrl: new StringType({
|
|
35
|
+
bootstrapEndpointUrl: new validation_1.StringType({
|
|
38
36
|
format: 'url',
|
|
39
37
|
}),
|
|
40
38
|
},
|
package/schema/sdkSchemas.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import ObjectType from '../validation
|
|
1
|
+
import { ObjectType } from '../validation';
|
|
2
2
|
export declare const eventMetadataSchema: ObjectType;
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const sdkConfigurationSchema: ObjectType;
|
package/schema/sdkSchemas.js
CHANGED
|
@@ -1,47 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export var eventMetadataSchema = new ObjectType({
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sdkConfigurationSchema = exports.eventMetadataSchema = void 0;
|
|
4
|
+
var validation_1 = require("../validation");
|
|
5
|
+
var contextSchemas_1 = require("./contextSchemas");
|
|
6
|
+
var loggerSchema_1 = require("./loggerSchema");
|
|
7
|
+
exports.eventMetadataSchema = new validation_1.ObjectType({
|
|
9
8
|
maxProperties: 5,
|
|
10
|
-
propertyNames: new StringType({
|
|
9
|
+
propertyNames: new validation_1.StringType({
|
|
11
10
|
minLength: 1,
|
|
12
11
|
maxLength: 20,
|
|
13
12
|
format: 'identifier',
|
|
14
13
|
}),
|
|
15
|
-
additionalProperties: new StringType({
|
|
14
|
+
additionalProperties: new validation_1.StringType({
|
|
16
15
|
maxLength: 300,
|
|
17
16
|
}),
|
|
18
17
|
});
|
|
19
|
-
|
|
18
|
+
exports.sdkConfigurationSchema = new validation_1.ObjectType({
|
|
20
19
|
required: ['appId'],
|
|
21
20
|
properties: {
|
|
22
|
-
appId: new StringType({
|
|
21
|
+
appId: new validation_1.StringType({
|
|
23
22
|
format: 'uuid',
|
|
24
23
|
}),
|
|
25
|
-
cid: new StringType({
|
|
24
|
+
cid: new validation_1.StringType({
|
|
26
25
|
pattern: /^[0-9a-f]{32}$/i,
|
|
27
26
|
}),
|
|
28
|
-
tokenScope: tokenScopeSchema,
|
|
29
|
-
trackerEndpointUrl: new StringType({
|
|
27
|
+
tokenScope: contextSchemas_1.tokenScopeSchema,
|
|
28
|
+
trackerEndpointUrl: new validation_1.StringType({
|
|
30
29
|
format: 'url',
|
|
31
30
|
}),
|
|
32
|
-
evaluationEndpointUrl: new StringType({
|
|
31
|
+
evaluationEndpointUrl: new validation_1.StringType({
|
|
33
32
|
format: 'url',
|
|
34
33
|
}),
|
|
35
|
-
bootstrapEndpointUrl: new StringType({
|
|
34
|
+
bootstrapEndpointUrl: new validation_1.StringType({
|
|
36
35
|
format: 'url',
|
|
37
36
|
}),
|
|
38
|
-
beaconQueueSize: new NumberType({
|
|
37
|
+
beaconQueueSize: new validation_1.NumberType({
|
|
39
38
|
minimum: 0,
|
|
40
39
|
integer: true,
|
|
41
40
|
}),
|
|
42
|
-
debug: new BooleanType(),
|
|
43
|
-
logger: loggerSchema,
|
|
44
|
-
urlSanitizer: new FunctionType(),
|
|
45
|
-
eventMetadata: eventMetadataSchema,
|
|
41
|
+
debug: new validation_1.BooleanType(),
|
|
42
|
+
logger: loggerSchema_1.loggerSchema,
|
|
43
|
+
urlSanitizer: new validation_1.FunctionType(),
|
|
44
|
+
eventMetadata: exports.eventMetadataSchema,
|
|
46
45
|
},
|
|
47
46
|
});
|
package/schema/tokenSchema.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import ObjectType from '../validation
|
|
2
|
-
declare const
|
|
3
|
-
export default _default;
|
|
1
|
+
import { ObjectType } from '../validation';
|
|
2
|
+
export declare const tokenSchema: ObjectType;
|
package/schema/tokenSchema.js
CHANGED
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.tokenSchema = void 0;
|
|
4
|
+
var validation_1 = require("../validation");
|
|
5
|
+
exports.tokenSchema = new validation_1.ObjectType({
|
|
5
6
|
required: ['headers', 'claims'],
|
|
6
7
|
properties: {
|
|
7
|
-
headers: new ObjectType({
|
|
8
|
+
headers: new validation_1.ObjectType({
|
|
8
9
|
required: ['typ', 'alg', 'appId'],
|
|
9
10
|
properties: {
|
|
10
|
-
typ: new StringType(),
|
|
11
|
-
alg: new StringType(),
|
|
12
|
-
kid: new StringType(),
|
|
13
|
-
appId: new StringType({
|
|
11
|
+
typ: new validation_1.StringType(),
|
|
12
|
+
alg: new validation_1.StringType(),
|
|
13
|
+
kid: new validation_1.StringType(),
|
|
14
|
+
appId: new validation_1.StringType({
|
|
14
15
|
format: 'uuid',
|
|
15
16
|
}),
|
|
16
17
|
},
|
|
17
18
|
}),
|
|
18
|
-
claims: new ObjectType({
|
|
19
|
+
claims: new validation_1.ObjectType({
|
|
19
20
|
required: ['iss', 'aud', 'iat'],
|
|
20
21
|
properties: {
|
|
21
|
-
iss: new StringType(),
|
|
22
|
-
aud: new StringType(),
|
|
23
|
-
iat: new NumberType({
|
|
22
|
+
iss: new validation_1.StringType(),
|
|
23
|
+
aud: new validation_1.StringType(),
|
|
24
|
+
iat: new validation_1.NumberType({
|
|
24
25
|
minimum: 0,
|
|
25
26
|
}),
|
|
26
|
-
sub: new StringType({
|
|
27
|
+
sub: new validation_1.StringType({
|
|
27
28
|
minLength: 1,
|
|
28
29
|
}),
|
|
29
|
-
exp: new NumberType({
|
|
30
|
+
exp: new validation_1.NumberType({
|
|
30
31
|
minimum: 0,
|
|
31
32
|
}),
|
|
32
|
-
jti: new StringType({
|
|
33
|
+
jti: new validation_1.StringType({
|
|
33
34
|
format: 'uuid',
|
|
34
35
|
}),
|
|
35
36
|
},
|
|
36
37
|
}),
|
|
37
|
-
signature: new StringType(),
|
|
38
|
+
signature: new validation_1.StringType(),
|
|
38
39
|
},
|
|
39
40
|
});
|
package/schema/userSchema.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import ObjectType from '../validation
|
|
1
|
+
import { ObjectType } from '../validation';
|
|
2
2
|
export declare const userProfileSchema: ObjectType;
|
package/schema/userSchema.js
CHANGED
|
@@ -1,147 +1,133 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import ArrayType from '../validation/arrayType';
|
|
8
|
-
export var userProfileSchema = new ObjectType({
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.userProfileSchema = void 0;
|
|
4
|
+
var validation_1 = require("../validation");
|
|
5
|
+
var attributeSchema_1 = require("./attributeSchema");
|
|
6
|
+
exports.userProfileSchema = new validation_1.ObjectType({
|
|
9
7
|
properties: {
|
|
10
|
-
firstName: new StringType({
|
|
8
|
+
firstName: new validation_1.StringType({
|
|
11
9
|
minLength: 1,
|
|
12
10
|
maxLength: 50,
|
|
13
11
|
}),
|
|
14
|
-
lastName: new StringType({
|
|
12
|
+
lastName: new validation_1.StringType({
|
|
15
13
|
minLength: 1,
|
|
16
14
|
maxLength: 50,
|
|
17
15
|
}),
|
|
18
|
-
birthDate: new StringType({
|
|
16
|
+
birthDate: new validation_1.StringType({
|
|
19
17
|
format: 'date',
|
|
20
18
|
}),
|
|
21
|
-
gender: new StringType({
|
|
19
|
+
gender: new validation_1.StringType({
|
|
22
20
|
enumeration: ['male', 'female', 'neutral', 'unknown'],
|
|
23
21
|
}),
|
|
24
|
-
email: new StringType({
|
|
22
|
+
email: new validation_1.StringType({
|
|
25
23
|
minLength: 1,
|
|
26
24
|
maxLength: 254,
|
|
27
25
|
}),
|
|
28
|
-
alternateEmail: new StringType({
|
|
26
|
+
alternateEmail: new validation_1.StringType({
|
|
29
27
|
minLength: 1,
|
|
30
28
|
maxLength: 254,
|
|
31
29
|
}),
|
|
32
|
-
phone: new StringType({
|
|
30
|
+
phone: new validation_1.StringType({
|
|
33
31
|
minLength: 1,
|
|
34
32
|
maxLength: 30,
|
|
35
33
|
}),
|
|
36
|
-
alternatePhone: new StringType({
|
|
34
|
+
alternatePhone: new validation_1.StringType({
|
|
37
35
|
minLength: 1,
|
|
38
36
|
maxLength: 30,
|
|
39
37
|
}),
|
|
40
|
-
address: new ObjectType({
|
|
38
|
+
address: new validation_1.ObjectType({
|
|
41
39
|
properties: {
|
|
42
|
-
street: new StringType({
|
|
40
|
+
street: new validation_1.StringType({
|
|
43
41
|
minLength: 1,
|
|
44
42
|
maxLength: 100,
|
|
45
43
|
}),
|
|
46
|
-
district: new StringType({
|
|
44
|
+
district: new validation_1.StringType({
|
|
47
45
|
minLength: 1,
|
|
48
46
|
maxLength: 100,
|
|
49
47
|
}),
|
|
50
|
-
city: new StringType({
|
|
48
|
+
city: new validation_1.StringType({
|
|
51
49
|
minLength: 1,
|
|
52
50
|
maxLength: 100,
|
|
53
51
|
}),
|
|
54
|
-
region: new StringType({
|
|
52
|
+
region: new validation_1.StringType({
|
|
55
53
|
minLength: 1,
|
|
56
54
|
maxLength: 100,
|
|
57
55
|
}),
|
|
58
|
-
country: new StringType({
|
|
56
|
+
country: new validation_1.StringType({
|
|
59
57
|
minLength: 1,
|
|
60
58
|
maxLength: 100,
|
|
61
59
|
}),
|
|
62
|
-
postalCode: new StringType({
|
|
60
|
+
postalCode: new validation_1.StringType({
|
|
63
61
|
minLength: 1,
|
|
64
62
|
maxLength: 20,
|
|
65
63
|
}),
|
|
66
64
|
},
|
|
67
65
|
}),
|
|
68
|
-
avatar: new StringType({
|
|
66
|
+
avatar: new validation_1.StringType({
|
|
69
67
|
maxLength: 500,
|
|
70
68
|
format: 'url',
|
|
71
69
|
}),
|
|
72
|
-
company: new StringType({
|
|
70
|
+
company: new validation_1.StringType({
|
|
73
71
|
minLength: 1,
|
|
74
72
|
maxLength: 200,
|
|
75
73
|
}),
|
|
76
|
-
companyUrl: new StringType({
|
|
74
|
+
companyUrl: new validation_1.StringType({
|
|
77
75
|
maxLength: 200,
|
|
78
76
|
format: 'url',
|
|
79
77
|
}),
|
|
80
|
-
jobTitle: new StringType({
|
|
78
|
+
jobTitle: new validation_1.StringType({
|
|
81
79
|
minLength: 1,
|
|
82
80
|
maxLength: 50,
|
|
83
81
|
}),
|
|
84
|
-
interests: new ArrayType({
|
|
82
|
+
interests: new validation_1.ArrayType({
|
|
85
83
|
maxItems: 30,
|
|
86
|
-
items: new StringType({
|
|
84
|
+
items: new validation_1.StringType({
|
|
87
85
|
minLength: 1,
|
|
88
86
|
maxLength: 30,
|
|
89
87
|
}),
|
|
90
88
|
}),
|
|
91
|
-
activities: new ArrayType({
|
|
89
|
+
activities: new validation_1.ArrayType({
|
|
92
90
|
maxItems: 30,
|
|
93
|
-
items: new StringType({
|
|
91
|
+
items: new validation_1.StringType({
|
|
94
92
|
minLength: 1,
|
|
95
93
|
maxLength: 30,
|
|
96
94
|
}),
|
|
97
95
|
}),
|
|
98
|
-
custom: new ObjectType({
|
|
99
|
-
propertyNames:
|
|
100
|
-
maxLength: 50,
|
|
101
|
-
format: 'identifier',
|
|
102
|
-
}),
|
|
96
|
+
custom: new validation_1.ObjectType({
|
|
97
|
+
propertyNames: attributeSchema_1.attributeNameSchema,
|
|
103
98
|
maxProperties: 10,
|
|
104
|
-
additionalProperties: new UnionType(new BooleanType(), new NullType(), new NumberType(), new StringType({
|
|
99
|
+
additionalProperties: new validation_1.UnionType(new validation_1.BooleanType(), new validation_1.NullType(), new validation_1.NumberType(), new validation_1.StringType({
|
|
105
100
|
maxLength: 100,
|
|
106
|
-
}), new ArrayType({
|
|
101
|
+
}), new validation_1.ArrayType({
|
|
107
102
|
maxItems: 10,
|
|
108
|
-
items: new UnionType(new BooleanType(), new NullType(), new NumberType(), new StringType({
|
|
103
|
+
items: new validation_1.UnionType(new validation_1.BooleanType(), new validation_1.NullType(), new validation_1.NumberType(), new validation_1.StringType({
|
|
109
104
|
maxLength: 100,
|
|
110
|
-
}), new ArrayType({
|
|
105
|
+
}), new validation_1.ArrayType({
|
|
111
106
|
maxItems: 10,
|
|
112
|
-
items: new UnionType(new BooleanType(), new NullType(), new NumberType(), new StringType({
|
|
107
|
+
items: new validation_1.UnionType(new validation_1.BooleanType(), new validation_1.NullType(), new validation_1.NumberType(), new validation_1.StringType({
|
|
113
108
|
maxLength: 100,
|
|
114
109
|
})),
|
|
115
|
-
}), new ObjectType({
|
|
116
|
-
propertyNames:
|
|
117
|
-
maxLength: 50,
|
|
118
|
-
format: 'identifier',
|
|
119
|
-
}),
|
|
110
|
+
}), new validation_1.ObjectType({
|
|
111
|
+
propertyNames: attributeSchema_1.attributeNameSchema,
|
|
120
112
|
maxProperties: 10,
|
|
121
|
-
additionalProperties: new UnionType(new BooleanType(), new NullType(), new NumberType(), new StringType({
|
|
113
|
+
additionalProperties: new validation_1.UnionType(new validation_1.BooleanType(), new validation_1.NullType(), new validation_1.NumberType(), new validation_1.StringType({
|
|
122
114
|
maxLength: 100,
|
|
123
115
|
})),
|
|
124
116
|
})),
|
|
125
|
-
}), new ObjectType({
|
|
126
|
-
propertyNames:
|
|
127
|
-
maxLength: 50,
|
|
128
|
-
format: 'identifier',
|
|
129
|
-
}),
|
|
117
|
+
}), new validation_1.ObjectType({
|
|
118
|
+
propertyNames: attributeSchema_1.attributeNameSchema,
|
|
130
119
|
maxProperties: 10,
|
|
131
|
-
additionalProperties: new UnionType(new BooleanType(), new NullType(), new NumberType(), new StringType({
|
|
120
|
+
additionalProperties: new validation_1.UnionType(new validation_1.BooleanType(), new validation_1.NullType(), new validation_1.NumberType(), new validation_1.StringType({
|
|
132
121
|
maxLength: 100,
|
|
133
|
-
}), new ArrayType({
|
|
122
|
+
}), new validation_1.ArrayType({
|
|
134
123
|
maxItems: 10,
|
|
135
|
-
items: new UnionType(new BooleanType(), new NullType(), new NumberType(), new StringType({
|
|
124
|
+
items: new validation_1.UnionType(new validation_1.BooleanType(), new validation_1.NullType(), new validation_1.NumberType(), new validation_1.StringType({
|
|
136
125
|
maxLength: 100,
|
|
137
126
|
})),
|
|
138
|
-
}), new ObjectType({
|
|
139
|
-
propertyNames:
|
|
140
|
-
maxLength: 50,
|
|
141
|
-
format: 'identifier',
|
|
142
|
-
}),
|
|
127
|
+
}), new validation_1.ObjectType({
|
|
128
|
+
propertyNames: attributeSchema_1.attributeNameSchema,
|
|
143
129
|
maxProperties: 10,
|
|
144
|
-
additionalProperties: new UnionType(new BooleanType(), new NullType(), new NumberType(), new StringType({
|
|
130
|
+
additionalProperties: new validation_1.UnionType(new validation_1.BooleanType(), new validation_1.NullType(), new validation_1.NumberType(), new validation_1.StringType({
|
|
145
131
|
maxLength: 100,
|
|
146
132
|
})),
|
|
147
133
|
})),
|
package/sdk.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import Context,
|
|
1
|
+
import { Context, TokenScope } from './context';
|
|
2
2
|
import { Logger } from './logging';
|
|
3
|
-
import Tracker from './tracker';
|
|
4
|
-
import Evaluator from './evaluator';
|
|
3
|
+
import { Tracker } from './tracker';
|
|
4
|
+
import { Evaluator } from './evaluator';
|
|
5
5
|
import { SdkEventMap } from './sdkEvents';
|
|
6
6
|
import { EventManager } from './eventManager';
|
|
7
|
-
import CidAssigner from './cid
|
|
7
|
+
import { CidAssigner } from './cid';
|
|
8
8
|
import { UrlSanitizer } from './tab';
|
|
9
9
|
export declare type Configuration = {
|
|
10
10
|
appId: string;
|
|
@@ -21,7 +21,7 @@ export declare type Configuration = {
|
|
|
21
21
|
[key: string]: string;
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
-
export
|
|
24
|
+
export declare class Sdk {
|
|
25
25
|
private container;
|
|
26
26
|
private closed;
|
|
27
27
|
private constructor();
|