Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/connections/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ app.post("/authkit-token", async (request, response) => {

You'll want to switch out the API Key for your own, which will later tell your frontend which integrations you'd like to make available to your users.

If you pass an `identity` or `identityType` (`user`, `team`, or `organization`), you'll be able to query for all connections scoped to that identity. The identity is used to generate the unique [Connection Key](https://docs.picaos.com/docs/setup) for the user once they successfully connect an account.
If you pass an `identity` or `identityType` (`user`, `team`, `organization`, or `project`), you'll be able to query for all connections scoped to that identity. The identity is used to generate the unique [Connection Key](https://docs.picaos.com/docs/setup) for the user once they successfully connect an account.

## Full Documentation

Expand Down
6 changes: 3 additions & 3 deletions packages/connections/src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ export class AuthKitToken {
* @remarks It is recommended to avoid using spaces and colons in this field as it may lead to unexpected behavior in some systems.
*/
identity?: string;
identityType?: "user" | "team" | "organization";
/** @deprecated Use 'identity' instead */
identityType?: "user" | "team" | "organization" | "project";
/** @deprecated Use 'identity' instead */
group?: string;
/** @deprecated */
/** @deprecated */
label?: string;
}) {
const secret = this._clientInfo.secret;
Expand Down
76 changes: 38 additions & 38 deletions packages/connections/src/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface EventLink {
version: string;
ownership: Ownership;
identity?: string;
identityType?: 'user' | 'team' | 'organization';
identityType?: 'user' | 'team' | 'organization' | 'project';
group?: string;
label?: string;
token: string;
Expand All @@ -37,7 +37,7 @@ export type CreateEventLinkPayload = {
environment?: string;
usageSource?: string;
identity?: string;
identityType?: 'user' | 'team' | 'organization';
identityType?: 'user' | 'team' | 'organization' | 'project';
group?: string;
label?: string;
};
Expand Down Expand Up @@ -123,34 +123,34 @@ export interface Feature {
}

export interface ConnectionRecord {
_id: string;
platformVersion: string;
connectionDefinitionId: string;
name: string;
key: string;
environment: string;
platform: string;
secretsServiceId: string;
settings: {
parseWebhookBody: boolean;
showSecret: boolean;
allowCustomEvents: boolean;
oauth: boolean;
};
throughput: {
key: string;
limit: number;
};
createdAt: number;
updatedAt: number;
updated: boolean;
version: string;
lastModifiedBy: string;
deleted: boolean;
changeLog: Record<string, any>; // You can replace 'any' with a more specific type if needed
tags: string[];
active: boolean;
deprecated: boolean;
_id: string;
platformVersion: string;
connectionDefinitionId: string;
name: string;
key: string;
environment: string;
platform: string;
secretsServiceId: string;
settings: {
parseWebhookBody: boolean;
showSecret: boolean;
allowCustomEvents: boolean;
oauth: boolean;
};
throughput: {
key: string;
limit: number;
};
createdAt: number;
updatedAt: number;
updated: boolean;
version: string;
lastModifiedBy: string;
deleted: boolean;
changeLog: Record<string, any>; // You can replace 'any' with a more specific type if needed
tags: string[];
active: boolean;
deprecated: boolean;
}


Expand All @@ -162,21 +162,21 @@ export interface EmbedTokenRecord {
group?: string;
label?: string;
identity?: string;
identityType?: 'user' | 'team' | 'organization';
identityType?: 'user' | 'team' | 'organization' | 'project';
createdAt: number;
createdDate: Date;
updatedAt?: number;
expiresAt?: number;
environment: string;
features?: Feature[];
sessionId: string;
_id?: string;
formData?: object;
response?: {
isConnected: boolean;
message?: string;
connection?: ConnectionRecord;
}
_id?: string;
formData?: object;
response?: {
isConnected: boolean;
message?: string;
connection?: ConnectionRecord;
}
}

export interface LinkSettings {
Expand Down
4 changes: 2 additions & 2 deletions packages/types/embed-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface EmbedTokensPayload {
label?: string;
group?: string;
identity?: string;
identityType?: 'user' | 'team' | 'organization';
identityType?: 'user' | 'team' | 'organization' | 'project';
environment: string;
ttl: number;
sessionId: string;
Expand All @@ -41,7 +41,7 @@ export interface EmbedTokenRecord {
};
features?: Feature[];
identity?: string;
identityType?: 'user' | 'team' | 'organization';
identityType?: 'user' | 'team' | 'organization' | 'project';
label?: string;
group?: string;
createdAt: number;
Expand Down
4 changes: 2 additions & 2 deletions packages/types/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type CreateEventLinkPayload = {
environment?: string;
usageSource?: string;
identity?: string;
identityType?: 'user' | 'team' | 'organization';
identityType?: 'user' | 'team' | 'organization' | 'project';
group?: string;
label?: string;
};
Expand All @@ -20,7 +20,7 @@ export interface EventLink {
version: string;
ownership: Ownership;
identity?: string;
identityType?: 'user' | 'team' | 'organization';
identityType?: 'user' | 'team' | 'organization' | 'project';
group?: string;
label?: string;
token: string;
Expand Down