@algolia/client-personalization 5.0.0-alpha.9 → 5.0.0-alpha.91

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.
Files changed (38) hide show
  1. package/dist/builds/browser.d.ts +5 -5
  2. package/dist/builds/browser.d.ts.map +1 -1
  3. package/dist/builds/node.d.ts +5 -5
  4. package/dist/builds/node.d.ts.map +1 -1
  5. package/dist/{client-personalization.cjs.js → client-personalization.cjs} +283 -285
  6. package/dist/client-personalization.esm.browser.js +465 -515
  7. package/dist/client-personalization.esm.node.js +283 -283
  8. package/dist/client-personalization.umd.js +2 -2
  9. package/dist/model/clientMethodProps.d.ts +78 -78
  10. package/dist/model/clientMethodProps.d.ts.map +1 -1
  11. package/dist/model/deleteUserProfileResponse.d.ts +10 -10
  12. package/dist/model/deleteUserProfileResponse.d.ts.map +1 -1
  13. package/dist/model/errorBase.d.ts +6 -6
  14. package/dist/model/errorBase.d.ts.map +1 -1
  15. package/dist/model/eventScoring.d.ts +14 -14
  16. package/dist/model/eventScoring.d.ts.map +1 -1
  17. package/dist/model/facetScoring.d.ts +10 -10
  18. package/dist/model/facetScoring.d.ts.map +1 -1
  19. package/dist/model/getUserTokenResponse.d.ts +14 -14
  20. package/dist/model/getUserTokenResponse.d.ts.map +1 -1
  21. package/dist/model/index.d.ts +8 -8
  22. package/dist/model/personalizationStrategyParams.d.ts +16 -16
  23. package/dist/model/personalizationStrategyParams.d.ts.map +1 -1
  24. package/dist/model/setPersonalizationStrategyResponse.d.ts +6 -6
  25. package/dist/model/setPersonalizationStrategyResponse.d.ts.map +1 -1
  26. package/dist/src/personalizationClient.d.ts +112 -112
  27. package/dist/src/personalizationClient.d.ts.map +1 -1
  28. package/index.js +1 -1
  29. package/model/clientMethodProps.ts +11 -11
  30. package/model/deleteUserProfileResponse.ts +1 -1
  31. package/model/errorBase.ts +1 -1
  32. package/model/eventScoring.ts +1 -1
  33. package/model/facetScoring.ts +1 -1
  34. package/model/getUserTokenResponse.ts +1 -1
  35. package/model/index.ts +1 -1
  36. package/model/personalizationStrategyParams.ts +1 -1
  37. package/model/setPersonalizationStrategyResponse.ts +1 -1
  38. package/package.json +30 -13
@@ -1,79 +1,79 @@
1
- /**
2
- * Properties for the `del` method.
3
- */
4
- export declare type DelProps = {
5
- /**
6
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
7
- */
8
- path: string;
9
- /**
10
- * Query parameters to be applied to the current query.
11
- */
12
- parameters?: Record<string, any>;
13
- };
14
- /**
15
- * Properties for the `deleteUserProfile` method.
16
- */
17
- export declare type DeleteUserProfileProps = {
18
- /**
19
- * UserToken representing the user for which to fetch the Personalization profile.
20
- */
21
- userToken: string;
22
- };
23
- /**
24
- * Properties for the `get` method.
25
- */
26
- export declare type GetProps = {
27
- /**
28
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
29
- */
30
- path: string;
31
- /**
32
- * Query parameters to be applied to the current query.
33
- */
34
- parameters?: Record<string, any>;
35
- };
36
- /**
37
- * Properties for the `getUserTokenProfile` method.
38
- */
39
- export declare type GetUserTokenProfileProps = {
40
- /**
41
- * UserToken representing the user for which to fetch the Personalization profile.
42
- */
43
- userToken: string;
44
- };
45
- /**
46
- * Properties for the `post` method.
47
- */
48
- export declare type PostProps = {
49
- /**
50
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
51
- */
52
- path: string;
53
- /**
54
- * Query parameters to be applied to the current query.
55
- */
56
- parameters?: Record<string, any>;
57
- /**
58
- * The parameters to send with the custom request.
59
- */
60
- body?: Record<string, any>;
61
- };
62
- /**
63
- * Properties for the `put` method.
64
- */
65
- export declare type PutProps = {
66
- /**
67
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
68
- */
69
- path: string;
70
- /**
71
- * Query parameters to be applied to the current query.
72
- */
73
- parameters?: Record<string, any>;
74
- /**
75
- * The parameters to send with the custom request.
76
- */
77
- body?: Record<string, any>;
78
- };
1
+ /**
2
+ * Properties for the `del` method.
3
+ */
4
+ export type DelProps = {
5
+ /**
6
+ * Path of the endpoint, anything after \"/1\" must be specified.
7
+ */
8
+ path: string;
9
+ /**
10
+ * Query parameters to apply to the current query.
11
+ */
12
+ parameters?: Record<string, any>;
13
+ };
14
+ /**
15
+ * Properties for the `deleteUserProfile` method.
16
+ */
17
+ export type DeleteUserProfileProps = {
18
+ /**
19
+ * UserToken representing the user for which to fetch the Personalization profile.
20
+ */
21
+ userToken: string;
22
+ };
23
+ /**
24
+ * Properties for the `get` method.
25
+ */
26
+ export type GetProps = {
27
+ /**
28
+ * Path of the endpoint, anything after \"/1\" must be specified.
29
+ */
30
+ path: string;
31
+ /**
32
+ * Query parameters to apply to the current query.
33
+ */
34
+ parameters?: Record<string, any>;
35
+ };
36
+ /**
37
+ * Properties for the `getUserTokenProfile` method.
38
+ */
39
+ export type GetUserTokenProfileProps = {
40
+ /**
41
+ * UserToken representing the user for which to fetch the Personalization profile.
42
+ */
43
+ userToken: string;
44
+ };
45
+ /**
46
+ * Properties for the `post` method.
47
+ */
48
+ export type PostProps = {
49
+ /**
50
+ * Path of the endpoint, anything after \"/1\" must be specified.
51
+ */
52
+ path: string;
53
+ /**
54
+ * Query parameters to apply to the current query.
55
+ */
56
+ parameters?: Record<string, any>;
57
+ /**
58
+ * Parameters to send with the custom request.
59
+ */
60
+ body?: Record<string, any>;
61
+ };
62
+ /**
63
+ * Properties for the `put` method.
64
+ */
65
+ export type PutProps = {
66
+ /**
67
+ * Path of the endpoint, anything after \"/1\" must be specified.
68
+ */
69
+ path: string;
70
+ /**
71
+ * Query parameters to apply to the current query.
72
+ */
73
+ parameters?: Record<string, any>;
74
+ /**
75
+ * Parameters to send with the custom request.
76
+ */
77
+ body?: Record<string, any>;
78
+ };
79
79
  //# sourceMappingURL=clientMethodProps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,oBAAY,sBAAsB,GAAG;IACnC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,oBAAY,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,oBAAY,wBAAwB,GAAG;IACrC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS,GAAG;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,oBAAY,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC"}
1
+ {"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC"}
@@ -1,11 +1,11 @@
1
- export declare type DeleteUserProfileResponse = {
2
- /**
3
- * UserToken representing the user for which to fetch the Personalization profile.
4
- */
5
- userToken: string;
6
- /**
7
- * A date until which the data can safely be considered as deleted for the given user. Any data received after the `deletedUntil` date will start building a new user profile.
8
- */
9
- deletedUntil: string;
10
- };
1
+ export type DeleteUserProfileResponse = {
2
+ /**
3
+ * UserToken representing the user for which to fetch the Personalization profile.
4
+ */
5
+ userToken: string;
6
+ /**
7
+ * A date until which the data can safely be considered as deleted for the given user. Any data received after the `deletedUntil` date will start building a new user profile.
8
+ */
9
+ deletedUntil: string;
10
+ };
11
11
  //# sourceMappingURL=deleteUserProfileResponse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deleteUserProfileResponse.d.ts","sourceRoot":"","sources":["../../model/deleteUserProfileResponse.ts"],"names":[],"mappings":"AAEA,oBAAY,yBAAyB,GAAG;IACtC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC"}
1
+ {"version":3,"file":"deleteUserProfileResponse.d.ts","sourceRoot":"","sources":["../../model/deleteUserProfileResponse.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -1,7 +1,7 @@
1
- /**
2
- * Error.
3
- */
4
- export declare type ErrorBase = Record<string, any> & {
5
- message?: string;
6
- };
1
+ /**
2
+ * Error.
3
+ */
4
+ export type ErrorBase = Record<string, any> & {
5
+ message?: string;
6
+ };
7
7
  //# sourceMappingURL=errorBase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errorBase.d.ts","sourceRoot":"","sources":["../../model/errorBase.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
1
+ {"version":3,"file":"errorBase.d.ts","sourceRoot":"","sources":["../../model/errorBase.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -1,15 +1,15 @@
1
- export declare type EventScoring = {
2
- /**
3
- * The score for the event.
4
- */
5
- score: number;
6
- /**
7
- * The name of the event.
8
- */
9
- eventName: string;
10
- /**
11
- * The type of the event.
12
- */
13
- eventType: string;
14
- };
1
+ export type EventScoring = {
2
+ /**
3
+ * The score for the event.
4
+ */
5
+ score: number;
6
+ /**
7
+ * The name of the event.
8
+ */
9
+ eventName: string;
10
+ /**
11
+ * The type of the event.
12
+ */
13
+ eventType: string;
14
+ };
15
15
  //# sourceMappingURL=eventScoring.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eventScoring.d.ts","sourceRoot":"","sources":["../../model/eventScoring.ts"],"names":[],"mappings":"AAEA,oBAAY,YAAY,GAAG;IACzB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
1
+ {"version":3,"file":"eventScoring.d.ts","sourceRoot":"","sources":["../../model/eventScoring.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
@@ -1,11 +1,11 @@
1
- export declare type FacetScoring = {
2
- /**
3
- * The score for the event.
4
- */
5
- score: number;
6
- /**
7
- * The name of the facet.
8
- */
9
- facetName: string;
10
- };
1
+ export type FacetScoring = {
2
+ /**
3
+ * The score for the event.
4
+ */
5
+ score: number;
6
+ /**
7
+ * The name of the facet.
8
+ */
9
+ facetName: string;
10
+ };
11
11
  //# sourceMappingURL=facetScoring.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"facetScoring.d.ts","sourceRoot":"","sources":["../../model/facetScoring.ts"],"names":[],"mappings":"AAEA,oBAAY,YAAY,GAAG;IACzB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
1
+ {"version":3,"file":"facetScoring.d.ts","sourceRoot":"","sources":["../../model/facetScoring.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
@@ -1,15 +1,15 @@
1
- export declare type GetUserTokenResponse = {
2
- /**
3
- * UserToken representing the user for which to fetch the Personalization profile.
4
- */
5
- userToken: string;
6
- /**
7
- * Date of last event update. (ISO-8601 format).
8
- */
9
- lastEventAt: string;
10
- /**
11
- * The userToken scores.
12
- */
13
- scores: Record<string, any>;
14
- };
1
+ export type GetUserTokenResponse = {
2
+ /**
3
+ * UserToken representing the user for which to fetch the Personalization profile.
4
+ */
5
+ userToken: string;
6
+ /**
7
+ * Date of last event update. (ISO-8601 format).
8
+ */
9
+ lastEventAt: string;
10
+ /**
11
+ * The userToken scores.
12
+ */
13
+ scores: Record<string, any>;
14
+ };
15
15
  //# sourceMappingURL=getUserTokenResponse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getUserTokenResponse.d.ts","sourceRoot":"","sources":["../../model/getUserTokenResponse.ts"],"names":[],"mappings":"AAEA,oBAAY,oBAAoB,GAAG;IACjC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B,CAAC"}
1
+ {"version":3,"file":"getUserTokenResponse.d.ts","sourceRoot":"","sources":["../../model/getUserTokenResponse.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B,CAAC"}
@@ -1,9 +1,9 @@
1
- export * from './deleteUserProfileResponse';
2
- export * from './errorBase';
3
- export * from './eventScoring';
4
- export * from './facetScoring';
5
- export * from './getUserTokenResponse';
6
- export * from './personalizationStrategyParams';
7
- export * from './setPersonalizationStrategyResponse';
8
- export * from './clientMethodProps';
1
+ export * from './deleteUserProfileResponse';
2
+ export * from './errorBase';
3
+ export * from './eventScoring';
4
+ export * from './facetScoring';
5
+ export * from './getUserTokenResponse';
6
+ export * from './personalizationStrategyParams';
7
+ export * from './setPersonalizationStrategyResponse';
8
+ export * from './clientMethodProps';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1,17 +1,17 @@
1
- import type { EventScoring } from './eventScoring';
2
- import type { FacetScoring } from './facetScoring';
3
- export declare type PersonalizationStrategyParams = {
4
- /**
5
- * Scores associated with the events.
6
- */
7
- eventScoring: EventScoring[];
8
- /**
9
- * Scores associated with the facets.
10
- */
11
- facetScoring: FacetScoring[];
12
- /**
13
- * The impact that personalization has on search results: a number between 0 (personalization disabled) and 100 (personalization fully enabled).
14
- */
15
- personalizationImpact: number;
16
- };
1
+ import type { EventScoring } from './eventScoring';
2
+ import type { FacetScoring } from './facetScoring';
3
+ export type PersonalizationStrategyParams = {
4
+ /**
5
+ * Scores associated with the events.
6
+ */
7
+ eventScoring: EventScoring[];
8
+ /**
9
+ * Scores associated with the facets.
10
+ */
11
+ facetScoring: FacetScoring[];
12
+ /**
13
+ * The impact that personalization has on search results: a number between 0 (personalization disabled) and 100 (personalization fully enabled).
14
+ */
15
+ personalizationImpact: number;
16
+ };
17
17
  //# sourceMappingURL=personalizationStrategyParams.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"personalizationStrategyParams.d.ts","sourceRoot":"","sources":["../../model/personalizationStrategyParams.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,oBAAY,6BAA6B,GAAG;IAC1C;;OAEG;IACH,YAAY,EAAE,YAAY,EAAE,CAAC;IAE7B;;OAEG;IACH,YAAY,EAAE,YAAY,EAAE,CAAC;IAE7B;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;CAC/B,CAAC"}
1
+ {"version":3,"file":"personalizationStrategyParams.d.ts","sourceRoot":"","sources":["../../model/personalizationStrategyParams.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;OAEG;IACH,YAAY,EAAE,YAAY,EAAE,CAAC;IAE7B;;OAEG;IACH,YAAY,EAAE,YAAY,EAAE,CAAC;IAE7B;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;CAC/B,CAAC"}
@@ -1,7 +1,7 @@
1
- export declare type SetPersonalizationStrategyResponse = {
2
- /**
3
- * A message confirming the strategy update.
4
- */
5
- message: string;
6
- };
1
+ export type SetPersonalizationStrategyResponse = {
2
+ /**
3
+ * A message confirming the strategy update.
4
+ */
5
+ message: string;
6
+ };
7
7
  //# sourceMappingURL=setPersonalizationStrategyResponse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"setPersonalizationStrategyResponse.d.ts","sourceRoot":"","sources":["../../model/setPersonalizationStrategyResponse.ts"],"names":[],"mappings":"AAEA,oBAAY,kCAAkC,GAAG;IAC/C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
1
+ {"version":3,"file":"setPersonalizationStrategyResponse.d.ts","sourceRoot":"","sources":["../../model/setPersonalizationStrategyResponse.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,kCAAkC,GAAG;IAC/C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -1,113 +1,113 @@
1
- import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';
2
- import type { DelProps, DeleteUserProfileProps, GetProps, GetUserTokenProfileProps, PostProps, PutProps } from '../model/clientMethodProps';
3
- import type { DeleteUserProfileResponse } from '../model/deleteUserProfileResponse';
4
- import type { GetUserTokenResponse } from '../model/getUserTokenResponse';
5
- import type { PersonalizationStrategyParams } from '../model/personalizationStrategyParams';
6
- import type { SetPersonalizationStrategyResponse } from '../model/setPersonalizationStrategyResponse';
7
- export declare const apiClientVersion = "5.0.0-alpha.9";
8
- export declare const REGIONS: readonly ["eu", "us"];
9
- export declare type Region = typeof REGIONS[number];
10
- export declare function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
11
- region: Region;
12
- }): {
13
- transporter: import("@algolia/client-common").Transporter;
14
- /**
15
- * The `appId` currently in use.
16
- */
17
- appId: string;
18
- /**
19
- * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
20
- */
21
- clearCache(): Promise<void>;
22
- /**
23
- * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
24
- */
25
- readonly _ua: string;
26
- /**
27
- * Adds a `segment` to the `x-algolia-agent` sent with every requests.
28
- *
29
- * @param segment - The algolia agent (user-agent) segment to add.
30
- * @param version - The version of the agent.
31
- */
32
- addAlgoliaAgent(segment: string, version?: string): void;
33
- /**
34
- * This method allow you to send requests to the Algolia REST API.
35
- *
36
- * @summary Send requests to the Algolia REST API.
37
- * @param del - The del object.
38
- * @param del.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
39
- * @param del.parameters - Query parameters to be applied to the current query.
40
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
41
- */
42
- del({ path, parameters }: DelProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
43
- /**
44
- * Delete the user profile and all its associated data. Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours for the deletion request to be fully processed.
45
- *
46
- * @summary Delete a user profile.
47
- * @param deleteUserProfile - The deleteUserProfile object.
48
- * @param deleteUserProfile.userToken - UserToken representing the user for which to fetch the Personalization profile.
49
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
50
- */
51
- deleteUserProfile({ userToken }: DeleteUserProfileProps, requestOptions?: RequestOptions): Promise<DeleteUserProfileResponse>;
52
- /**
53
- * This method allow you to send requests to the Algolia REST API.
54
- *
55
- * @summary Send requests to the Algolia REST API.
56
- * @param get - The get object.
57
- * @param get.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
58
- * @param get.parameters - Query parameters to be applied to the current query.
59
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
60
- */
61
- get({ path, parameters }: GetProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
62
- /**
63
- * The strategy contains information on the events and facets that impact user profiles and personalized search results.
64
- *
65
- * @summary Get the current strategy.
66
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
67
- */
68
- getPersonalizationStrategy(requestOptions?: RequestOptions): Promise<PersonalizationStrategyParams>;
69
- /**
70
- * Get the user profile built from Personalization strategy. The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes.
71
- *
72
- * @summary Get a user profile.
73
- * @param getUserTokenProfile - The getUserTokenProfile object.
74
- * @param getUserTokenProfile.userToken - UserToken representing the user for which to fetch the Personalization profile.
75
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
76
- */
77
- getUserTokenProfile({ userToken }: GetUserTokenProfileProps, requestOptions?: RequestOptions): Promise<GetUserTokenResponse>;
78
- /**
79
- * This method allow you to send requests to the Algolia REST API.
80
- *
81
- * @summary Send requests to the Algolia REST API.
82
- * @param post - The post object.
83
- * @param post.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
84
- * @param post.parameters - Query parameters to be applied to the current query.
85
- * @param post.body - The parameters to send with the custom request.
86
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
87
- */
88
- post({ path, parameters, body }: PostProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
89
- /**
90
- * This method allow you to send requests to the Algolia REST API.
91
- *
92
- * @summary Send requests to the Algolia REST API.
93
- * @param put - The put object.
94
- * @param put.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
95
- * @param put.parameters - Query parameters to be applied to the current query.
96
- * @param put.body - The parameters to send with the custom request.
97
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
98
- */
99
- put({ path, parameters, body }: PutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
100
- /**
101
- * A strategy defines the events and facets that impact user profiles and personalized search results.
102
- *
103
- * @summary Set a new strategy.
104
- * @param personalizationStrategyParams - The personalizationStrategyParams object.
105
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
106
- */
107
- setPersonalizationStrategy(personalizationStrategyParams: PersonalizationStrategyParams, requestOptions?: RequestOptions): Promise<SetPersonalizationStrategyResponse>;
108
- };
109
- /**
110
- * The client type.
111
- */
112
- export declare type PersonalizationClient = ReturnType<typeof createPersonalizationClient>;
1
+ import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';
2
+ import type { DelProps, DeleteUserProfileProps, GetProps, GetUserTokenProfileProps, PostProps, PutProps } from '../model/clientMethodProps';
3
+ import type { DeleteUserProfileResponse } from '../model/deleteUserProfileResponse';
4
+ import type { GetUserTokenResponse } from '../model/getUserTokenResponse';
5
+ import type { PersonalizationStrategyParams } from '../model/personalizationStrategyParams';
6
+ import type { SetPersonalizationStrategyResponse } from '../model/setPersonalizationStrategyResponse';
7
+ export declare const apiClientVersion = "5.0.0-alpha.91";
8
+ export declare const REGIONS: readonly ["eu", "us"];
9
+ export type Region = (typeof REGIONS)[number];
10
+ export declare function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
11
+ region: Region;
12
+ }): {
13
+ transporter: import("@algolia/client-common").Transporter;
14
+ /**
15
+ * The `appId` currently in use.
16
+ */
17
+ appId: string;
18
+ /**
19
+ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
20
+ */
21
+ clearCache(): Promise<void>;
22
+ /**
23
+ * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
24
+ */
25
+ readonly _ua: string;
26
+ /**
27
+ * Adds a `segment` to the `x-algolia-agent` sent with every requests.
28
+ *
29
+ * @param segment - The algolia agent (user-agent) segment to add.
30
+ * @param version - The version of the agent.
31
+ */
32
+ addAlgoliaAgent(segment: string, version?: string): void;
33
+ /**
34
+ * This method allow you to send requests to the Algolia REST API.
35
+ *
36
+ * @summary Send requests to the Algolia REST API.
37
+ * @param del - The del object.
38
+ * @param del.path - Path of the endpoint, anything after \"/1\" must be specified.
39
+ * @param del.parameters - Query parameters to apply to the current query.
40
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
41
+ */
42
+ del({ path, parameters }: DelProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
43
+ /**
44
+ * Delete the user profile and all its associated data. Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours for the deletion request to be fully processed.
45
+ *
46
+ * @summary Delete a user profile.
47
+ * @param deleteUserProfile - The deleteUserProfile object.
48
+ * @param deleteUserProfile.userToken - UserToken representing the user for which to fetch the Personalization profile.
49
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
50
+ */
51
+ deleteUserProfile({ userToken }: DeleteUserProfileProps, requestOptions?: RequestOptions): Promise<DeleteUserProfileResponse>;
52
+ /**
53
+ * This method allow you to send requests to the Algolia REST API.
54
+ *
55
+ * @summary Send requests to the Algolia REST API.
56
+ * @param get - The get object.
57
+ * @param get.path - Path of the endpoint, anything after \"/1\" must be specified.
58
+ * @param get.parameters - Query parameters to apply to the current query.
59
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
60
+ */
61
+ get({ path, parameters }: GetProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
62
+ /**
63
+ * The strategy contains information on the events and facets that impact user profiles and personalized search results.
64
+ *
65
+ * @summary Get the current strategy.
66
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
67
+ */
68
+ getPersonalizationStrategy(requestOptions?: RequestOptions): Promise<PersonalizationStrategyParams>;
69
+ /**
70
+ * Get the user profile built from Personalization strategy. The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes.
71
+ *
72
+ * @summary Get a user profile.
73
+ * @param getUserTokenProfile - The getUserTokenProfile object.
74
+ * @param getUserTokenProfile.userToken - UserToken representing the user for which to fetch the Personalization profile.
75
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
76
+ */
77
+ getUserTokenProfile({ userToken }: GetUserTokenProfileProps, requestOptions?: RequestOptions): Promise<GetUserTokenResponse>;
78
+ /**
79
+ * This method allow you to send requests to the Algolia REST API.
80
+ *
81
+ * @summary Send requests to the Algolia REST API.
82
+ * @param post - The post object.
83
+ * @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
84
+ * @param post.parameters - Query parameters to apply to the current query.
85
+ * @param post.body - Parameters to send with the custom request.
86
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
87
+ */
88
+ post({ path, parameters, body }: PostProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
89
+ /**
90
+ * This method allow you to send requests to the Algolia REST API.
91
+ *
92
+ * @summary Send requests to the Algolia REST API.
93
+ * @param put - The put object.
94
+ * @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
95
+ * @param put.parameters - Query parameters to apply to the current query.
96
+ * @param put.body - Parameters to send with the custom request.
97
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
98
+ */
99
+ put({ path, parameters, body }: PutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
100
+ /**
101
+ * A strategy defines the events and facets that impact user profiles and personalized search results.
102
+ *
103
+ * @summary Set a new strategy.
104
+ * @param personalizationStrategyParams - The personalizationStrategyParams object.
105
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
106
+ */
107
+ setPersonalizationStrategy(personalizationStrategyParams: PersonalizationStrategyParams, requestOptions?: RequestOptions): Promise<SetPersonalizationStrategyResponse>;
108
+ };
109
+ /**
110
+ * The client type.
111
+ */
112
+ export type PersonalizationClient = ReturnType<typeof createPersonalizationClient>;
113
113
  //# sourceMappingURL=personalizationClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"personalizationClient.d.ts","sourceRoot":"","sources":["../../src/personalizationClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,QAAQ,EACR,sBAAsB,EACtB,QAAQ,EACR,wBAAwB,EACxB,SAAS,EACT,QAAQ,EACT,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AAC5F,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,6CAA6C,CAAC;AAEtG,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAEhD,eAAO,MAAM,OAAO,uBAAwB,CA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