@shopware-ag/meteor-admin-sdk
Version:
The Meteor SDK for the Shopware Administration.
42 lines (41 loc) • 1.35 kB
TypeScript
declare class Consent {
readonly name: string;
readonly status: ConsentStatusResponseType['status'];
readonly updatedAt: string | null;
readonly acceptedRevision: string | null;
readonly lastRevision: string | null;
static fromStatusResponse(response: Exclude<consentStatus['responseType'], null>): Consent;
private constructor();
get isAccepted(): boolean;
get isStale(): boolean;
}
export type { Consent };
export declare const status: (messageData: Omit<consentStatus, 'responseType'>) => Promise<Consent>;
export declare const request: (messageOptions: Omit<consentRequest, 'responseType' | 'requestId'>) => {
requestPromise: Promise<Consent>;
abort: (reason?: unknown) => void;
};
type ConsentStatusResponseType = {
name: string;
status: 'unset' | 'declined' | 'revoked' | 'accepted';
updatedAt: string | null;
acceptedRevision: string | null;
latestRevision: string | null;
};
export type consentStatus = {
responseType: ConsentStatusResponseType;
consent: string;
};
export type consentRequest = {
responseType: void;
requestId: string;
consent: string;
requestMessage?: string;
privacyLink?: string;
};
export type consentRequestResponse = {
responseType: void;
name: string;
requestId: string;
consent: ConsentStatusResponseType;
};