Skip to content

Commit

Permalink
chore: generated code for commit 7c5ba328. [skip ci]
Browse files Browse the repository at this point in the history
algolia/api-clients-automation@7c5ba32

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Kai Welke <kai.welke@algolia.com>
Co-authored-by: shortcuts <vannicattec@gmail.com>
Co-authored-by: Pierre Millot <pierre.millot@algolia.com>
Co-authored-by: Morgan Leroi <morgan.leroi@gmail.com>
  • Loading branch information
5 people committed Jan 15, 2024
1 parent 29d8b01 commit 85d98b7
Show file tree
Hide file tree
Showing 28 changed files with 318 additions and 248 deletions.
25 changes: 25 additions & 0 deletions packages/client_insights/lib/src/api/insights_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,31 @@ final class InsightsClient implements ApiClient {
);
}

/// Delete user token.
/// Delete all events related to a certain user token from events metrics and analytics. To delete a personalization user profile, see [Delete a user profile](https://www.algolia.com/doc/rest-api/personalization/#delete-a-user-profile).
///
/// Parameters:
/// * [userToken] The user token for which to delete all associated events.
/// * [requestOptions] additional request configuration.
Future<void> deleteUserToken({
required String userToken,
RequestOptions? requestOptions,
}) async {
assert(
userToken.isNotEmpty,
'Parameter `userToken` is required when calling `deleteUserToken`.',
);
final request = ApiRequest(
method: RequestMethod.delete,
path: r'/1/usertokens/{userToken}'.replaceAll(
'{' r'userToken' '}', Uri.encodeComponent(userToken.toString())),
);
await _retryStrategy.execute(
request: request,
options: requestOptions,
);
}

/// Send events.
/// Send a list of events to the Insights API. You can include up to 1,000 events in a single request, but the request body must be smaller than 2&nbsp;MB.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ final class AddedToCartObjectIDs {
required this.eventSubtype,
required this.index,
required this.objectIDs,
this.objectData,
this.currency,
required this.userToken,
this.timestamp,
this.authenticatedUserToken,
this.currency,
this.objectData,
this.timestamp,
this.value,
});

/// Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment's [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
/// The name of the event, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment's [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
@JsonKey(name: r'eventName')
final String eventName;

Expand All @@ -34,33 +35,39 @@ final class AddedToCartObjectIDs {
@JsonKey(name: r'eventSubtype')
final AddToCartEvent eventSubtype;

/// Name of the Algolia index.
/// The name of an Algolia index.
@JsonKey(name: r'index')
final String index;

/// List of object identifiers for items of an Algolia index.
/// The object IDs of the records that are part of the event.
@JsonKey(name: r'objectIDs')
final List<String> objectIDs;

/// Extra information about the records involved in the event—for example, to add price and quantities of purchased products. If provided, must be the same length as `objectIDs`.
@JsonKey(name: r'objectData')
final List<ObjectData>? objectData;
/// An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
@JsonKey(name: r'userToken')
final String userToken;

/// If you include pricing information in the `objectData` parameter, you must also specify the currency as ISO-4217 currency code, such as USD or EUR.
/// An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
@JsonKey(name: r'authenticatedUserToken')
final String? authenticatedUserToken;

/// Three-letter [currency code](https://www.iso.org/iso-4217-currency-codes.html).
@JsonKey(name: r'currency')
final String? currency;

/// Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
@JsonKey(name: r'userToken')
final String userToken;
/// Extra information about the records involved in a purchase or add-to-cart event. If specified, it must have the same length as `objectIDs`.
@JsonKey(name: r'objectData')
final List<ObjectData>? objectData;

/// Time of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
/// The timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
@JsonKey(name: r'timestamp')
final int? timestamp;

/// User token for authenticated users.
@JsonKey(name: r'authenticatedUserToken')
final String? authenticatedUserToken;
/// One of types:
/// - [double]
/// - [String]
@JsonKey(name: r'value')
final dynamic value;

@override
bool operator ==(Object other) =>
Expand All @@ -71,11 +78,12 @@ final class AddedToCartObjectIDs {
other.eventSubtype == eventSubtype &&
other.index == index &&
other.objectIDs == objectIDs &&
other.objectData == objectData &&
other.currency == currency &&
other.userToken == userToken &&
other.authenticatedUserToken == authenticatedUserToken &&
other.currency == currency &&
other.objectData == objectData &&
other.timestamp == timestamp &&
other.authenticatedUserToken == authenticatedUserToken;
other.value == value;

@override
int get hashCode =>
Expand All @@ -84,11 +92,12 @@ final class AddedToCartObjectIDs {
eventSubtype.hashCode +
index.hashCode +
objectIDs.hashCode +
objectData.hashCode +
currency.hashCode +
userToken.hashCode +
authenticatedUserToken.hashCode +
currency.hashCode +
objectData.hashCode +
timestamp.hashCode +
authenticatedUserToken.hashCode;
value.hashCode;

factory AddedToCartObjectIDs.fromJson(Map<String, dynamic> json) =>
_$AddedToCartObjectIDsFromJson(json);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ final class AddedToCartObjectIDsAfterSearch {
required this.index,
required this.queryID,
required this.objectIDs,
this.objectData,
this.currency,
required this.userToken,
this.timestamp,
this.authenticatedUserToken,
this.currency,
this.objectData,
this.timestamp,
this.value,
});

/// Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment's [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
/// The name of the event, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment's [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
@JsonKey(name: r'eventName')
final String eventName;

Expand All @@ -35,37 +36,43 @@ final class AddedToCartObjectIDsAfterSearch {
@JsonKey(name: r'eventSubtype')
final AddToCartEvent eventSubtype;

/// Name of the Algolia index.
/// The name of an Algolia index.
@JsonKey(name: r'index')
final String index;

/// Unique identifier for a search query. The query ID is required for events related to search or browse requests. If you add `clickAnalytics: true` as a search request parameter, the query ID is included in the API response.
@JsonKey(name: r'queryID')
final String queryID;

/// List of object identifiers for items of an Algolia index.
/// The object IDs of the records that are part of the event.
@JsonKey(name: r'objectIDs')
final List<String> objectIDs;

/// Extra information about the records involved in the event—for example, to add price and quantities of purchased products. If provided, must be the same length as `objectIDs`.
@JsonKey(name: r'objectData')
final List<ObjectDataAfterSearch>? objectData;
/// An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
@JsonKey(name: r'userToken')
final String userToken;

/// If you include pricing information in the `objectData` parameter, you must also specify the currency as ISO-4217 currency code, such as USD or EUR.
/// An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
@JsonKey(name: r'authenticatedUserToken')
final String? authenticatedUserToken;

/// Three-letter [currency code](https://www.iso.org/iso-4217-currency-codes.html).
@JsonKey(name: r'currency')
final String? currency;

/// Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
@JsonKey(name: r'userToken')
final String userToken;
/// Extra information about the records involved in a purchase or add-to-cart events. If provided, it must be the same length as `objectIDs`.
@JsonKey(name: r'objectData')
final List<ObjectDataAfterSearch>? objectData;

/// Time of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
/// The timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
@JsonKey(name: r'timestamp')
final int? timestamp;

/// User token for authenticated users.
@JsonKey(name: r'authenticatedUserToken')
final String? authenticatedUserToken;
/// One of types:
/// - [double]
/// - [String]
@JsonKey(name: r'value')
final dynamic value;

@override
bool operator ==(Object other) =>
Expand All @@ -77,11 +84,12 @@ final class AddedToCartObjectIDsAfterSearch {
other.index == index &&
other.queryID == queryID &&
other.objectIDs == objectIDs &&
other.objectData == objectData &&
other.currency == currency &&
other.userToken == userToken &&
other.authenticatedUserToken == authenticatedUserToken &&
other.currency == currency &&
other.objectData == objectData &&
other.timestamp == timestamp &&
other.authenticatedUserToken == authenticatedUserToken;
other.value == value;

@override
int get hashCode =>
Expand All @@ -91,11 +99,12 @@ final class AddedToCartObjectIDsAfterSearch {
index.hashCode +
queryID.hashCode +
objectIDs.hashCode +
objectData.hashCode +
currency.hashCode +
userToken.hashCode +
authenticatedUserToken.hashCode +
currency.hashCode +
objectData.hashCode +
timestamp.hashCode +
authenticatedUserToken.hashCode;
value.hashCode;

factory AddedToCartObjectIDsAfterSearch.fromJson(Map<String, dynamic> json) =>
_$AddedToCartObjectIDsAfterSearchFromJson(json);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 85d98b7

Please sign in to comment.