Skip to content

Commit

Permalink
Merge pull request #510 from panoratech/speakeasy-sdk
Browse files Browse the repository at this point in the history
Speakeasy sdk
  • Loading branch information
rflihxyz authored Jun 18, 2024
2 parents 92f42f7 + 3c3fb5d commit dd6e566
Show file tree
Hide file tree
Showing 24 changed files with 128 additions and 118 deletions.
2 changes: 1 addition & 1 deletion packages/api/src/@core/auth/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class AuthController {
}

// todo: admin only
@ApiOperation({ operationId: 'getUsers', summary: 'Get users' })
@ApiOperation({ operationId: 'getPanoraCoreUsers', summary: 'Get users' })
@ApiResponse({ status: 200 })
@Get('users')
async users() {
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/@core/events/events.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class EventsController {
this.logger.setContext(EventsController.name);
}

@ApiOperation({ operationId: 'getEvents', summary: 'Retrieve Events' })
@ApiOperation({ operationId: 'getPanoraCoreEvents', summary: 'Retrieve Events' })
@ApiResponse({ status: 200 })
@UsePipes(
new ValidationPipe({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ export class MWHandlerController {
async handleThirdPartyWebhook(
@Body() data: any,
@Headers() headers: any,
@Param('uuid') uuid: string,
@Param('endpoint_uuid') uuid: string, // Changed 'uuid' to 'endpoint_uuid'
) {
this.loggerService.log(
'Realtime Webhook Received with Payload ---- ' + JSON.stringify(data),
);
await this.queue.add({ uuid, data, headers });
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ export class ManagedWebhooksController {
summary: 'Update managed webhook status',
})
@UseGuards(JwtAuthGuard)
@Put(':id')
@Put(':id_connection')
async updateManagedWebhooksStatus(
@Param('id') id: string,
@Param('id_connection') id_connection: string,
@Body('active') active: boolean,
) {
return this.managedWebhookService.updateStatusManagedWebhookEndpoint(
id,
id_connection,
active,
);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/accounting/account/account.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class AccountController {
}

@ApiOperation({
operationId: 'getAccounts',
operationId: 'getAccountingAccounts',
summary: 'List a batch of Accounts',
})
@ApiHeader({
Expand Down Expand Up @@ -76,7 +76,7 @@ export class AccountController {
}

@ApiOperation({
operationId: 'getAccount',
operationId: 'getAccountingAccount',
summary: 'Retrieve a Account',
description: 'Retrieve a account from any connected Accounting software',
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class AttachmentController {
}

@ApiOperation({
operationId: 'getAttachments',
operationId: 'getAccountingAttachments',
summary: 'List a batch of Attachments',
})
@ApiHeader({
Expand Down Expand Up @@ -76,7 +76,7 @@ export class AttachmentController {
}

@ApiOperation({
operationId: 'getAttachment',
operationId: 'getAccountingAttachment',
summary: 'Retrieve a Attachment',
description: 'Retrieve a attachment from any connected Accounting software',
})
Expand Down Expand Up @@ -104,7 +104,7 @@ export class AttachmentController {
}

@ApiOperation({
operationId: 'addAttachment',
operationId: 'addAccountingAttachment',
summary: 'Create a Attachment',
description: 'Create a attachment in any supported Accounting software',
})
Expand Down Expand Up @@ -147,7 +147,7 @@ export class AttachmentController {
}

@ApiOperation({
operationId: 'addAttachments',
operationId: 'addAccountingAttachments',
summary: 'Add a batch of Attachments',
})
@ApiHeader({
Expand Down
8 changes: 4 additions & 4 deletions packages/api/src/accounting/contact/contact.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class ContactController {
}

@ApiOperation({
operationId: 'getContacts',
operationId: 'getAccountingContacts',
summary: 'List a batch of Contacts',
})
@ApiHeader({
Expand Down Expand Up @@ -76,7 +76,7 @@ export class ContactController {
}

@ApiOperation({
operationId: 'getContact',
operationId: 'getAccountingContact',
summary: 'Retrieve a Contact',
description: 'Retrieve a contact from any connected Accounting software',
})
Expand Down Expand Up @@ -104,7 +104,7 @@ export class ContactController {
}

@ApiOperation({
operationId: 'addContact',
operationId: 'addAccountingContact',
summary: 'Create a Contact',
description: 'Create a contact in any supported Accounting software',
})
Expand Down Expand Up @@ -147,7 +147,7 @@ export class ContactController {
}

@ApiOperation({
operationId: 'addContacts',
operationId: 'addAccountingContacts',
summary: 'Add a batch of Contacts',
})
@ApiHeader({
Expand Down
8 changes: 4 additions & 4 deletions packages/api/src/ats/attachment/attachment.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class AttachmentController {
}

@ApiOperation({
operationId: 'getAttachments',
operationId: 'getAtsAttachments',
summary: 'List a batch of Attachments',
})
@ApiHeader({
Expand Down Expand Up @@ -75,7 +75,7 @@ export class AttachmentController {
}

@ApiOperation({
operationId: 'getAttachment',
operationId: 'getAtsAttachment',
summary: 'Retrieve a Attachment',
description: 'Retrieve a attachment from any connected Ats software',
})
Expand All @@ -102,7 +102,7 @@ export class AttachmentController {
}

@ApiOperation({
operationId: 'addAttachment',
operationId: 'addAtsAttachment',
summary: 'Create a Attachment',
description: 'Create a attachment in any supported Ats software',
})
Expand Down Expand Up @@ -144,7 +144,7 @@ export class AttachmentController {
}

@ApiOperation({
operationId: 'addAttachments',
operationId: 'addAtsAttachments',
summary: 'Add a batch of Attachments',
})
@ApiHeader({
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/ats/tag/tag.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class TagController {
}

@ApiOperation({
operationId: 'getTags',
operationId: 'getAtsTags',
summary: 'List a batch of Tags',
})
@ApiHeader({
Expand Down Expand Up @@ -68,7 +68,7 @@ export class TagController {
}

@ApiOperation({
operationId: 'getTag',
operationId: 'getAtsTag',
summary: 'Retrieve a Tag',
description: 'Retrieve a tag from any connected Ats software',
})
Expand Down
8 changes: 4 additions & 4 deletions packages/api/src/ats/user/user.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class UserController {
}

@ApiOperation({
operationId: 'getUsers',
operationId: 'getAtsUsers',
summary: 'List a batch of Users',
})
@ApiHeader({
Expand Down Expand Up @@ -68,7 +68,7 @@ export class UserController {
}

@ApiOperation({
operationId: 'getUser',
operationId: 'getAtsUser',
summary: 'Retrieve a User',
description: 'Retrieve a user from any connected Ats software',
})
Expand All @@ -95,7 +95,7 @@ export class UserController {
}

@ApiOperation({
operationId: 'addUser',
operationId: 'addAtsUser',
summary: 'Create a User',
description: 'Create a user in any supported Ats software',
})
Expand Down Expand Up @@ -137,7 +137,7 @@ export class UserController {
}

@ApiOperation({
operationId: 'addUsers',
operationId: 'addAtsUsers',
summary: 'Add a batch of Users',
})
@ApiHeader({
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/crm/company/company.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class CompanyController {
}

@ApiOperation({
operationId: 'getCompany',
operationId: 'getCrmCompany',
summary: 'Retrieve a Company',
description: 'Retrieve a company from any connected Crm software',
})
Expand All @@ -107,7 +107,7 @@ export class CompanyController {
}

@ApiOperation({
operationId: 'addCompany',
operationId: 'addCrmCompany',
summary: 'Create a Company',
description: 'Create a company in any supported Crm software',
})
Expand Down
8 changes: 4 additions & 4 deletions packages/api/src/crm/contact/contact.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class ContactController {
}

@ApiOperation({
operationId: 'getContacts',
operationId: 'getCrmContacts',
summary: 'List a batch of CRM Contacts',
})
@ApiHeader({
Expand Down Expand Up @@ -80,7 +80,7 @@ export class ContactController {
}

@ApiOperation({
operationId: 'getContact',
operationId: 'getCrmContact',
summary: 'Retrieve a CRM Contact',
description: 'Retrieve a contact from any connected CRM',
})
Expand All @@ -107,7 +107,7 @@ export class ContactController {
}

@ApiOperation({
operationId: 'addContact',
operationId: 'addCrmContact',
summary: 'Create CRM Contact',
description: 'Create a contact in any supported CRM',
})
Expand Down Expand Up @@ -150,7 +150,7 @@ export class ContactController {
}

@ApiOperation({
operationId: 'addContacts',
operationId: 'addCrmContacts',
summary: 'Add a batch of CRM Contacts',
})
@ApiHeader({
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/crm/user/user.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class UserController {
}

@ApiOperation({
operationId: 'getUsers',
operationId: 'getCrmUsers',
summary: 'List a batch of Users',
})
@ApiHeader({
Expand Down Expand Up @@ -73,7 +73,7 @@ export class UserController {
}

@ApiOperation({
operationId: 'getUser',
operationId: 'getCrmUser',
summary: 'Retrieve a User',
description: 'Retrieve a user from any connected Crm software',
})
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/hris/company/company.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class CompanyController {
}

@ApiOperation({
operationId: 'getCompany',
operationId: 'getHrisCompany',
summary: 'Retrieve a Company',
description: 'Retrieve a company from any connected Hris software',
})
Expand All @@ -102,7 +102,7 @@ export class CompanyController {
}

@ApiOperation({
operationId: 'addCompany',
operationId: 'addHrisCompany',
summary: 'Create a Company',
description: 'Create a company in any supported Hris software',
})
Expand Down
2 changes: 2 additions & 0 deletions packages/api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ async function bootstrap() {
.setTitle('Unified Panora API')
.setDescription('The Panora API description')
.setVersion('1.0')
.addServer('https://api.panora.dev', 'Production server')
.addServer('https://api-sandbox.panora.dev', 'Sandbox server')
.addBearerAuth(
{ type: 'http', scheme: 'bearer', bearerFormat: 'JWT' },
'JWT',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class ContactController {
}

@ApiOperation({
operationId: 'getContacts',
operationId: 'getMarketingAutomationContacts',
summary: 'List a batch of Contacts',
})
@ApiHeader({
Expand Down Expand Up @@ -76,7 +76,7 @@ export class ContactController {
}

@ApiOperation({
operationId: 'getContact',
operationId: 'getMarketingAutomationContact',
summary: 'Retrieve a Contact',
description:
'Retrieve a contact from any connected Marketingautomation software',
Expand Down Expand Up @@ -105,7 +105,7 @@ export class ContactController {
}

@ApiOperation({
operationId: 'addContact',
operationId: 'addMarketingAutomationContact',
summary: 'Create a Contact',
description:
'Create a contact in any supported Marketingautomation software',
Expand Down Expand Up @@ -149,7 +149,7 @@ export class ContactController {
}

@ApiOperation({
operationId: 'addContacts',
operationId: 'addMarketingAutomationContacts',
summary: 'Add a batch of Contacts',
})
@ApiHeader({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class EventController {
}

@ApiOperation({
operationId: 'getEvents',
operationId: 'getMarketingAutomationEvents',
summary: 'List a batch of Events',
})
@ApiHeader({
Expand Down
Loading

0 comments on commit dd6e566

Please sign in to comment.