Skip to main content

AuthN | Node SDK | Agreement Management Endpoints

Agreement Management Endpoints

Create an agreement

create(request: CreateRequest): Promise<PangeaResponse<CreateResult>>

Create an agreement.

required parameters

CreateRequest

Response Object

Promise<PangeaResponse<CreateResult>>
const response = await authn.agreements.create({
  type: AuthN.Agreements.AgreementType.EULA,
  name: "EULA_V1",
  text: "You agree to behave yourself while logged in.",
});

Delete an agreement

delete(request: DeleteRequest): Promise<PangeaResponse<DeleteResult>>

Delete an agreement.

required parameters

DeleteRequest

Response Object

Promise<PangeaResponse<DeleteResult>>
await authn.agreements.delete({
  type: AuthN.Agreements.AgreementType.EULA,
  id: "peu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
});

List agreements

list(request: ListRequest): Promise<PangeaResponse<ListResult>>

List agreements.

required parameters

ListRequest

Response Object

Promise<PangeaResponse<ListResult>>
const response = await authn.agreements.list();

Update agreement

update(request: UpdateRequest): Promise<PangeaResponse<UpdateRequest>>

Update agreement.

required parameters

UpdateRequest

Response Object

Promise<PangeaResponse<UpdateRequest>>
const response = await authn.agreements.update({
  type: AuthN.Agreements.AgreementType.EULA,
  id: "peu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
  text: "You agree to behave yourself while logged in. Don't be evil.",
  active: true,
});