@apideck/unify 0.29.6 → 0.29.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/docs/sdks/connectionconsent/README.md +100 -0
- package/docs/sdks/connectionconsents/README.md +92 -0
- package/docs/sdks/expenses/README.md +8 -0
- package/examples/package-lock.json +1 -1
- package/funcs/accountingAttachmentsList.js +3 -0
- package/funcs/accountingAttachmentsList.js.map +1 -1
- package/funcs/accountingBankFeedAccountsList.js +3 -0
- package/funcs/accountingBankFeedAccountsList.js.map +1 -1
- package/funcs/accountingBankFeedStatementsList.js +3 -0
- package/funcs/accountingBankFeedStatementsList.js.map +1 -1
- package/funcs/accountingBillPaymentsList.js +3 -0
- package/funcs/accountingBillPaymentsList.js.map +1 -1
- package/funcs/accountingBillsList.js +3 -0
- package/funcs/accountingBillsList.js.map +1 -1
- package/funcs/accountingCategoriesList.js +3 -0
- package/funcs/accountingCategoriesList.js.map +1 -1
- package/funcs/accountingCreditNotesList.js +3 -0
- package/funcs/accountingCreditNotesList.js.map +1 -1
- package/funcs/accountingCustomersList.js +3 -0
- package/funcs/accountingCustomersList.js.map +1 -1
- package/funcs/accountingDepartmentsList.js +3 -0
- package/funcs/accountingDepartmentsList.js.map +1 -1
- package/funcs/accountingExpensesList.d.ts.map +1 -1
- package/funcs/accountingExpensesList.js +7 -2
- package/funcs/accountingExpensesList.js.map +1 -1
- package/funcs/accountingInvoiceItemsList.js +3 -0
- package/funcs/accountingInvoiceItemsList.js.map +1 -1
- package/funcs/accountingInvoicesList.js +3 -0
- package/funcs/accountingInvoicesList.js.map +1 -1
- package/funcs/accountingJournalEntriesList.js +3 -0
- package/funcs/accountingJournalEntriesList.js.map +1 -1
- package/funcs/accountingLedgerAccountsList.js +3 -0
- package/funcs/accountingLedgerAccountsList.js.map +1 -1
- package/funcs/accountingLocationsList.js +3 -0
- package/funcs/accountingLocationsList.js.map +1 -1
- package/funcs/accountingPaymentsList.js +3 -0
- package/funcs/accountingPaymentsList.js.map +1 -1
- package/funcs/accountingPurchaseOrdersList.js +3 -0
- package/funcs/accountingPurchaseOrdersList.js.map +1 -1
- package/funcs/accountingQuotesList.js +3 -0
- package/funcs/accountingQuotesList.js.map +1 -1
- package/funcs/accountingSubsidiariesList.js +3 -0
- package/funcs/accountingSubsidiariesList.js.map +1 -1
- package/funcs/accountingSuppliersList.js +3 -0
- package/funcs/accountingSuppliersList.js.map +1 -1
- package/funcs/accountingTaxRatesList.js +3 -0
- package/funcs/accountingTaxRatesList.js.map +1 -1
- package/funcs/accountingTrackingCategoriesList.js +3 -0
- package/funcs/accountingTrackingCategoriesList.js.map +1 -1
- package/funcs/atsApplicantsList.js +3 -0
- package/funcs/atsApplicantsList.js.map +1 -1
- package/funcs/atsApplicationsList.js +3 -0
- package/funcs/atsApplicationsList.js.map +1 -1
- package/funcs/atsJobsList.js +3 -0
- package/funcs/atsJobsList.js.map +1 -1
- package/funcs/connectorApisList.js +3 -0
- package/funcs/connectorApisList.js.map +1 -1
- package/funcs/connectorConnectorsList.js +3 -0
- package/funcs/connectorConnectorsList.js.map +1 -1
- package/funcs/crmActivitiesList.js +3 -0
- package/funcs/crmActivitiesList.js.map +1 -1
- package/funcs/crmCompaniesList.js +3 -0
- package/funcs/crmCompaniesList.js.map +1 -1
- package/funcs/crmContactsList.js +3 -0
- package/funcs/crmContactsList.js.map +1 -1
- package/funcs/crmCustomObjectSchemasList.js +3 -0
- package/funcs/crmCustomObjectSchemasList.js.map +1 -1
- package/funcs/crmCustomObjectsList.js +3 -0
- package/funcs/crmCustomObjectsList.js.map +1 -1
- package/funcs/crmLeadsList.js +3 -0
- package/funcs/crmLeadsList.js.map +1 -1
- package/funcs/crmNotesList.js +3 -0
- package/funcs/crmNotesList.js.map +1 -1
- package/funcs/crmOpportunitiesList.js +3 -0
- package/funcs/crmOpportunitiesList.js.map +1 -1
- package/funcs/crmPipelinesList.js +3 -0
- package/funcs/crmPipelinesList.js.map +1 -1
- package/funcs/crmUsersList.js +3 -0
- package/funcs/crmUsersList.js.map +1 -1
- package/funcs/ecommerceCustomersList.js +3 -0
- package/funcs/ecommerceCustomersList.js.map +1 -1
- package/funcs/ecommerceOrdersList.js +3 -0
- package/funcs/ecommerceOrdersList.js.map +1 -1
- package/funcs/ecommerceProductsList.js +3 -0
- package/funcs/ecommerceProductsList.js.map +1 -1
- package/funcs/fileStorageDriveGroupsList.js +3 -0
- package/funcs/fileStorageDriveGroupsList.js.map +1 -1
- package/funcs/fileStorageDrivesList.js +3 -0
- package/funcs/fileStorageDrivesList.js.map +1 -1
- package/funcs/fileStorageFilesList.js +3 -0
- package/funcs/fileStorageFilesList.js.map +1 -1
- package/funcs/fileStorageSharedLinksList.js +3 -0
- package/funcs/fileStorageSharedLinksList.js.map +1 -1
- package/funcs/hrisCompaniesList.js +3 -0
- package/funcs/hrisCompaniesList.js.map +1 -1
- package/funcs/hrisDepartmentsList.js +3 -0
- package/funcs/hrisDepartmentsList.js.map +1 -1
- package/funcs/hrisEmployeesList.js +3 -0
- package/funcs/hrisEmployeesList.js.map +1 -1
- package/funcs/hrisTimeOffRequestsList.js +3 -0
- package/funcs/hrisTimeOffRequestsList.js.map +1 -1
- package/funcs/issueTrackingCollectionTagsList.js +3 -0
- package/funcs/issueTrackingCollectionTagsList.js.map +1 -1
- package/funcs/issueTrackingCollectionTicketCommentsGet.js +3 -0
- package/funcs/issueTrackingCollectionTicketCommentsGet.js.map +1 -1
- package/funcs/issueTrackingCollectionTicketCommentsList.js +3 -0
- package/funcs/issueTrackingCollectionTicketCommentsList.js.map +1 -1
- package/funcs/issueTrackingCollectionTicketsList.js +3 -0
- package/funcs/issueTrackingCollectionTicketsList.js.map +1 -1
- package/funcs/issueTrackingCollectionUsersList.js +3 -0
- package/funcs/issueTrackingCollectionUsersList.js.map +1 -1
- package/funcs/issueTrackingCollectionsList.js +3 -0
- package/funcs/issueTrackingCollectionsList.js.map +1 -1
- package/funcs/smsMessagesList.js +3 -0
- package/funcs/smsMessagesList.js.map +1 -1
- package/funcs/vaultConnectionConsentUpdate.d.ts +18 -0
- package/funcs/vaultConnectionConsentUpdate.d.ts.map +1 -0
- package/funcs/vaultConnectionConsentUpdate.js +144 -0
- package/funcs/vaultConnectionConsentUpdate.js.map +1 -0
- package/funcs/vaultConnectionConsentsList.d.ts +18 -0
- package/funcs/vaultConnectionConsentsList.d.ts.map +1 -0
- package/funcs/vaultConnectionConsentsList.js +141 -0
- package/funcs/vaultConnectionConsentsList.js.map +1 -0
- package/funcs/vaultConsumersList.js +3 -0
- package/funcs/vaultConsumersList.js.map +1 -1
- package/funcs/vaultLogsList.js +3 -0
- package/funcs/vaultLogsList.js.map +1 -1
- package/funcs/webhookEventLogsList.js +3 -0
- package/funcs/webhookEventLogsList.js.map +1 -1
- package/funcs/webhookWebhooksList.js +3 -0
- package/funcs/webhookWebhooksList.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/models/components/companyinfo.d.ts +42 -0
- package/models/components/companyinfo.d.ts.map +1 -1
- package/models/components/companyinfo.js +29 -1
- package/models/components/companyinfo.js.map +1 -1
- package/models/components/connection.d.ts +28 -0
- package/models/components/connection.d.ts.map +1 -1
- package/models/components/connection.js +31 -0
- package/models/components/connection.js.map +1 -1
- package/models/components/consentrecord.d.ts +48 -0
- package/models/components/consentrecord.d.ts.map +1 -0
- package/models/components/consentrecord.js +85 -0
- package/models/components/consentrecord.js.map +1 -0
- package/models/components/consentrecordinput.d.ts +38 -0
- package/models/components/consentrecordinput.d.ts.map +1 -0
- package/models/components/consentrecordinput.js +72 -0
- package/models/components/consentrecordinput.js.map +1 -0
- package/models/components/consentstate.d.ts +46 -0
- package/models/components/consentstate.d.ts.map +1 -0
- package/models/components/consentstate.js +67 -0
- package/models/components/consentstate.js.map +1 -0
- package/models/components/datascopes.d.ts +43 -0
- package/models/components/datascopes.d.ts.map +1 -0
- package/models/components/datascopes.js +83 -0
- package/models/components/datascopes.js.map +1 -0
- package/models/components/datascopesinput.d.ts +38 -0
- package/models/components/datascopesinput.d.ts.map +1 -0
- package/models/components/datascopesinput.js +72 -0
- package/models/components/datascopesinput.js.map +1 -0
- package/models/components/datascopesresources.d.ts +98 -0
- package/models/components/datascopesresources.d.ts.map +1 -0
- package/models/components/datascopesresources.js +121 -0
- package/models/components/datascopesresources.js.map +1 -0
- package/models/components/expense.d.ts +41 -0
- package/models/components/expense.d.ts.map +1 -1
- package/models/components/expense.js +27 -1
- package/models/components/expense.js.map +1 -1
- package/models/components/expensesfilter.d.ts +75 -0
- package/models/components/expensesfilter.d.ts.map +1 -0
- package/models/components/expensesfilter.js +105 -0
- package/models/components/expensesfilter.js.map +1 -0
- package/models/components/formfield.d.ts +3 -0
- package/models/components/formfield.d.ts.map +1 -1
- package/models/components/formfield.js +1 -0
- package/models/components/formfield.js.map +1 -1
- package/models/components/getconsentrecordsresponse.d.ts +52 -0
- package/models/components/getconsentrecordsresponse.d.ts.map +1 -0
- package/models/components/getconsentrecordsresponse.js +87 -0
- package/models/components/getconsentrecordsresponse.js.map +1 -0
- package/models/components/index.d.ts +10 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +10 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invoiceitem.d.ts +11 -0
- package/models/components/invoiceitem.d.ts.map +1 -1
- package/models/components/invoiceitem.js +5 -0
- package/models/components/invoiceitem.js.map +1 -1
- package/models/components/journalentriesfilter.d.ts +46 -0
- package/models/components/journalentriesfilter.d.ts.map +1 -1
- package/models/components/journalentriesfilter.js +28 -1
- package/models/components/journalentriesfilter.js.map +1 -1
- package/models/components/timeoffrequestsfilter.d.ts +2 -2
- package/models/components/trackingcategory.d.ts +10 -0
- package/models/components/trackingcategory.d.ts.map +1 -1
- package/models/components/trackingcategory.js +8 -0
- package/models/components/trackingcategory.js.map +1 -1
- package/models/components/updateconsentrequest.d.ts +133 -0
- package/models/components/updateconsentrequest.d.ts.map +1 -0
- package/models/components/updateconsentrequest.js +158 -0
- package/models/components/updateconsentrequest.js.map +1 -0
- package/models/components/updateconsentresponse.d.ts +52 -0
- package/models/components/updateconsentresponse.d.ts.map +1 -0
- package/models/components/updateconsentresponse.js +87 -0
- package/models/components/updateconsentresponse.js.map +1 -0
- package/models/components/webhookeventtype.d.ts +6 -6
- package/models/components/webhookeventtype.js +2 -2
- package/models/components/webhookeventtype.js.map +1 -1
- package/models/operations/accountingexpensesall.d.ts +5 -0
- package/models/operations/accountingexpensesall.d.ts.map +1 -1
- package/models/operations/accountingexpensesall.js +2 -0
- package/models/operations/accountingexpensesall.js.map +1 -1
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/vaultconnectionconsentsall.d.ts +116 -0
- package/models/operations/vaultconnectionconsentsall.d.ts.map +1 -0
- package/models/operations/vaultconnectionconsentsall.js +163 -0
- package/models/operations/vaultconnectionconsentsall.js.map +1 -0
- package/models/operations/vaultconnectionconsentupdate.d.ts +121 -0
- package/models/operations/vaultconnectionconsentupdate.d.ts.map +1 -0
- package/models/operations/vaultconnectionconsentupdate.js +167 -0
- package/models/operations/vaultconnectionconsentupdate.js.map +1 -0
- package/package.json +1 -1
- package/sdk/connectionconsent.d.ts +12 -0
- package/sdk/connectionconsent.d.ts.map +1 -0
- package/sdk/connectionconsent.js +22 -0
- package/sdk/connectionconsent.js.map +1 -0
- package/sdk/connectionconsents.d.ts +12 -0
- package/sdk/connectionconsents.d.ts.map +1 -0
- package/sdk/connectionconsents.js +22 -0
- package/sdk/connectionconsents.js.map +1 -0
- package/sdk/vault.d.ts +6 -0
- package/sdk/vault.d.ts.map +1 -1
- package/sdk/vault.js +8 -0
- package/sdk/vault.js.map +1 -1
- package/src/__tests__/connectionconsent.test.ts +89 -0
- package/src/__tests__/connectionconsents.test.ts +31 -0
- package/src/funcs/accountingAttachmentsList.ts +3 -0
- package/src/funcs/accountingBankFeedAccountsList.ts +3 -0
- package/src/funcs/accountingBankFeedStatementsList.ts +3 -0
- package/src/funcs/accountingBillPaymentsList.ts +3 -0
- package/src/funcs/accountingBillsList.ts +3 -0
- package/src/funcs/accountingCategoriesList.ts +3 -0
- package/src/funcs/accountingCreditNotesList.ts +3 -0
- package/src/funcs/accountingCustomersList.ts +3 -0
- package/src/funcs/accountingDepartmentsList.ts +3 -0
- package/src/funcs/accountingExpensesList.ts +19 -6
- package/src/funcs/accountingInvoiceItemsList.ts +3 -0
- package/src/funcs/accountingInvoicesList.ts +3 -0
- package/src/funcs/accountingJournalEntriesList.ts +3 -0
- package/src/funcs/accountingLedgerAccountsList.ts +3 -0
- package/src/funcs/accountingLocationsList.ts +3 -0
- package/src/funcs/accountingPaymentsList.ts +3 -0
- package/src/funcs/accountingPurchaseOrdersList.ts +3 -0
- package/src/funcs/accountingQuotesList.ts +3 -0
- package/src/funcs/accountingSubsidiariesList.ts +3 -0
- package/src/funcs/accountingSuppliersList.ts +3 -0
- package/src/funcs/accountingTaxRatesList.ts +3 -0
- package/src/funcs/accountingTrackingCategoriesList.ts +3 -0
- package/src/funcs/atsApplicantsList.ts +3 -0
- package/src/funcs/atsApplicationsList.ts +3 -0
- package/src/funcs/atsJobsList.ts +3 -0
- package/src/funcs/connectorApisList.ts +3 -0
- package/src/funcs/connectorConnectorsList.ts +3 -0
- package/src/funcs/crmActivitiesList.ts +3 -0
- package/src/funcs/crmCompaniesList.ts +3 -0
- package/src/funcs/crmContactsList.ts +3 -0
- package/src/funcs/crmCustomObjectSchemasList.ts +3 -0
- package/src/funcs/crmCustomObjectsList.ts +3 -0
- package/src/funcs/crmLeadsList.ts +3 -0
- package/src/funcs/crmNotesList.ts +3 -0
- package/src/funcs/crmOpportunitiesList.ts +3 -0
- package/src/funcs/crmPipelinesList.ts +3 -0
- package/src/funcs/crmUsersList.ts +3 -0
- package/src/funcs/ecommerceCustomersList.ts +3 -0
- package/src/funcs/ecommerceOrdersList.ts +3 -0
- package/src/funcs/ecommerceProductsList.ts +3 -0
- package/src/funcs/fileStorageDriveGroupsList.ts +3 -0
- package/src/funcs/fileStorageDrivesList.ts +3 -0
- package/src/funcs/fileStorageFilesList.ts +3 -0
- package/src/funcs/fileStorageSharedLinksList.ts +3 -0
- package/src/funcs/hrisCompaniesList.ts +3 -0
- package/src/funcs/hrisDepartmentsList.ts +3 -0
- package/src/funcs/hrisEmployeesList.ts +3 -0
- package/src/funcs/hrisTimeOffRequestsList.ts +3 -0
- package/src/funcs/issueTrackingCollectionTagsList.ts +3 -0
- package/src/funcs/issueTrackingCollectionTicketCommentsGet.ts +3 -0
- package/src/funcs/issueTrackingCollectionTicketCommentsList.ts +3 -0
- package/src/funcs/issueTrackingCollectionTicketsList.ts +3 -0
- package/src/funcs/issueTrackingCollectionUsersList.ts +3 -0
- package/src/funcs/issueTrackingCollectionsList.ts +3 -0
- package/src/funcs/smsMessagesList.ts +3 -0
- package/src/funcs/vaultConnectionConsentUpdate.ts +230 -0
- package/src/funcs/vaultConnectionConsentsList.ts +225 -0
- package/src/funcs/vaultConsumersList.ts +3 -0
- package/src/funcs/vaultLogsList.ts +3 -0
- package/src/funcs/webhookEventLogsList.ts +3 -0
- package/src/funcs/webhookWebhooksList.ts +3 -0
- package/src/lib/config.ts +4 -4
- package/src/models/components/companyinfo.ts +44 -0
- package/src/models/components/connection.ts +78 -0
- package/src/models/components/consentrecord.ts +101 -0
- package/src/models/components/consentrecordinput.ts +82 -0
- package/src/models/components/consentstate.ts +41 -0
- package/src/models/components/datascopes.ts +94 -0
- package/src/models/components/datascopesinput.ts +80 -0
- package/src/models/components/datascopesresources.ts +172 -0
- package/src/models/components/expense.ts +47 -0
- package/src/models/components/expensesfilter.ts +111 -0
- package/src/models/components/formfield.ts +1 -0
- package/src/models/components/getconsentrecordsresponse.ts +107 -0
- package/src/models/components/index.ts +10 -0
- package/src/models/components/invoiceitem.ts +19 -0
- package/src/models/components/journalentriesfilter.ts +40 -0
- package/src/models/components/timeoffrequestsfilter.ts +2 -2
- package/src/models/components/trackingcategory.ts +18 -0
- package/src/models/components/updateconsentrequest.ts +229 -0
- package/src/models/components/updateconsentresponse.ts +107 -0
- package/src/models/components/webhookeventtype.ts +2 -2
- package/src/models/operations/accountingexpensesall.ts +7 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/vaultconnectionconsentsall.ts +272 -0
- package/src/models/operations/vaultconnectionconsentupdate.ts +284 -0
- package/src/sdk/connectionconsent.ts +27 -0
- package/src/sdk/connectionconsents.ts +27 -0
- package/src/sdk/vault.ts +12 -0
|
@@ -75,6 +75,20 @@ export type TheStartMonthOfFiscalYear = ClosedEnum<
|
|
|
75
75
|
typeof TheStartMonthOfFiscalYear
|
|
76
76
|
>;
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* The mode of tracking categories for the company on transactions
|
|
80
|
+
*/
|
|
81
|
+
export const TrackingCategoriesMode = {
|
|
82
|
+
Transaction: "transaction",
|
|
83
|
+
Line: "line",
|
|
84
|
+
Both: "both",
|
|
85
|
+
Disabled: "disabled",
|
|
86
|
+
} as const;
|
|
87
|
+
/**
|
|
88
|
+
* The mode of tracking categories for the company on transactions
|
|
89
|
+
*/
|
|
90
|
+
export type TrackingCategoriesMode = ClosedEnum<typeof TrackingCategoriesMode>;
|
|
91
|
+
|
|
78
92
|
export type CompanyInfo = {
|
|
79
93
|
/**
|
|
80
94
|
* A unique identifier for an object.
|
|
@@ -133,6 +147,10 @@ export type CompanyInfo = {
|
|
|
133
147
|
* Whether tracking categories are enabled for the company on transactions
|
|
134
148
|
*/
|
|
135
149
|
trackingCategoriesEnabled?: boolean | undefined;
|
|
150
|
+
/**
|
|
151
|
+
* The mode of tracking categories for the company on transactions
|
|
152
|
+
*/
|
|
153
|
+
trackingCategoriesMode?: TrackingCategoriesMode | undefined;
|
|
136
154
|
/**
|
|
137
155
|
* A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.
|
|
138
156
|
*/
|
|
@@ -197,6 +215,27 @@ export namespace TheStartMonthOfFiscalYear$ {
|
|
|
197
215
|
export const outboundSchema = TheStartMonthOfFiscalYear$outboundSchema;
|
|
198
216
|
}
|
|
199
217
|
|
|
218
|
+
/** @internal */
|
|
219
|
+
export const TrackingCategoriesMode$inboundSchema: z.ZodNativeEnum<
|
|
220
|
+
typeof TrackingCategoriesMode
|
|
221
|
+
> = z.nativeEnum(TrackingCategoriesMode);
|
|
222
|
+
|
|
223
|
+
/** @internal */
|
|
224
|
+
export const TrackingCategoriesMode$outboundSchema: z.ZodNativeEnum<
|
|
225
|
+
typeof TrackingCategoriesMode
|
|
226
|
+
> = TrackingCategoriesMode$inboundSchema;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* @internal
|
|
230
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
231
|
+
*/
|
|
232
|
+
export namespace TrackingCategoriesMode$ {
|
|
233
|
+
/** @deprecated use `TrackingCategoriesMode$inboundSchema` instead. */
|
|
234
|
+
export const inboundSchema = TrackingCategoriesMode$inboundSchema;
|
|
235
|
+
/** @deprecated use `TrackingCategoriesMode$outboundSchema` instead. */
|
|
236
|
+
export const outboundSchema = TrackingCategoriesMode$outboundSchema;
|
|
237
|
+
}
|
|
238
|
+
|
|
200
239
|
/** @internal */
|
|
201
240
|
export const CompanyInfo$inboundSchema: z.ZodType<
|
|
202
241
|
CompanyInfo,
|
|
@@ -221,6 +260,7 @@ export const CompanyInfo$inboundSchema: z.ZodType<
|
|
|
221
260
|
emails: z.array(Email$inboundSchema).optional(),
|
|
222
261
|
custom_mappings: z.nullable(z.record(z.any())).optional(),
|
|
223
262
|
tracking_categories_enabled: z.boolean().optional(),
|
|
263
|
+
tracking_categories_mode: TrackingCategoriesMode$inboundSchema.optional(),
|
|
224
264
|
row_version: z.nullable(z.string()).optional(),
|
|
225
265
|
updated_by: z.nullable(z.string()).optional(),
|
|
226
266
|
created_by: z.nullable(z.string()).optional(),
|
|
@@ -243,6 +283,7 @@ export const CompanyInfo$inboundSchema: z.ZodType<
|
|
|
243
283
|
"phone_numbers": "phoneNumbers",
|
|
244
284
|
"custom_mappings": "customMappings",
|
|
245
285
|
"tracking_categories_enabled": "trackingCategoriesEnabled",
|
|
286
|
+
"tracking_categories_mode": "trackingCategoriesMode",
|
|
246
287
|
"row_version": "rowVersion",
|
|
247
288
|
"updated_by": "updatedBy",
|
|
248
289
|
"created_by": "createdBy",
|
|
@@ -271,6 +312,7 @@ export type CompanyInfo$Outbound = {
|
|
|
271
312
|
emails?: Array<Email$Outbound> | undefined;
|
|
272
313
|
custom_mappings?: { [k: string]: any } | null | undefined;
|
|
273
314
|
tracking_categories_enabled?: boolean | undefined;
|
|
315
|
+
tracking_categories_mode?: string | undefined;
|
|
274
316
|
row_version?: string | null | undefined;
|
|
275
317
|
updated_by?: string | null | undefined;
|
|
276
318
|
created_by?: string | null | undefined;
|
|
@@ -303,6 +345,7 @@ export const CompanyInfo$outboundSchema: z.ZodType<
|
|
|
303
345
|
emails: z.array(Email$outboundSchema).optional(),
|
|
304
346
|
customMappings: z.nullable(z.record(z.any())).optional(),
|
|
305
347
|
trackingCategoriesEnabled: z.boolean().optional(),
|
|
348
|
+
trackingCategoriesMode: TrackingCategoriesMode$outboundSchema.optional(),
|
|
306
349
|
rowVersion: z.nullable(z.string()).optional(),
|
|
307
350
|
updatedBy: z.nullable(z.string()).optional(),
|
|
308
351
|
createdBy: z.nullable(z.string()).optional(),
|
|
@@ -321,6 +364,7 @@ export const CompanyInfo$outboundSchema: z.ZodType<
|
|
|
321
364
|
phoneNumbers: "phone_numbers",
|
|
322
365
|
customMappings: "custom_mappings",
|
|
323
366
|
trackingCategoriesEnabled: "tracking_categories_enabled",
|
|
367
|
+
trackingCategoriesMode: "tracking_categories_mode",
|
|
324
368
|
rowVersion: "row_version",
|
|
325
369
|
updatedBy: "updated_by",
|
|
326
370
|
createdBy: "created_by",
|
|
@@ -18,6 +18,23 @@ import {
|
|
|
18
18
|
ConnectionState$inboundSchema,
|
|
19
19
|
ConnectionState$outboundSchema,
|
|
20
20
|
} from "./connectionstate.js";
|
|
21
|
+
import {
|
|
22
|
+
ConsentRecord,
|
|
23
|
+
ConsentRecord$inboundSchema,
|
|
24
|
+
ConsentRecord$Outbound,
|
|
25
|
+
ConsentRecord$outboundSchema,
|
|
26
|
+
} from "./consentrecord.js";
|
|
27
|
+
import {
|
|
28
|
+
ConsentRecordInput,
|
|
29
|
+
ConsentRecordInput$inboundSchema,
|
|
30
|
+
ConsentRecordInput$Outbound,
|
|
31
|
+
ConsentRecordInput$outboundSchema,
|
|
32
|
+
} from "./consentrecordinput.js";
|
|
33
|
+
import {
|
|
34
|
+
ConsentState,
|
|
35
|
+
ConsentState$inboundSchema,
|
|
36
|
+
ConsentState$outboundSchema,
|
|
37
|
+
} from "./consentstate.js";
|
|
21
38
|
import {
|
|
22
39
|
CustomMapping,
|
|
23
40
|
CustomMapping$inboundSchema,
|
|
@@ -30,6 +47,18 @@ import {
|
|
|
30
47
|
CustomMappingInput$Outbound,
|
|
31
48
|
CustomMappingInput$outboundSchema,
|
|
32
49
|
} from "./custommappinginput.js";
|
|
50
|
+
import {
|
|
51
|
+
DataScopes,
|
|
52
|
+
DataScopes$inboundSchema,
|
|
53
|
+
DataScopes$Outbound,
|
|
54
|
+
DataScopes$outboundSchema,
|
|
55
|
+
} from "./datascopes.js";
|
|
56
|
+
import {
|
|
57
|
+
DataScopesInput,
|
|
58
|
+
DataScopesInput$inboundSchema,
|
|
59
|
+
DataScopesInput$Outbound,
|
|
60
|
+
DataScopesInput$outboundSchema,
|
|
61
|
+
} from "./datascopesinput.js";
|
|
33
62
|
import {
|
|
34
63
|
FormField,
|
|
35
64
|
FormField$inboundSchema,
|
|
@@ -199,6 +228,16 @@ export type Connection = {
|
|
|
199
228
|
* List of custom mappings configured for this connection
|
|
200
229
|
*/
|
|
201
230
|
customMappings?: Array<CustomMapping> | undefined;
|
|
231
|
+
/**
|
|
232
|
+
* The current consent state of the connection
|
|
233
|
+
*/
|
|
234
|
+
consentState?: ConsentState | undefined;
|
|
235
|
+
/**
|
|
236
|
+
* Immutable array of consent records for compliance and audit purposes
|
|
237
|
+
*/
|
|
238
|
+
consents?: Array<ConsentRecord> | undefined;
|
|
239
|
+
latestConsent?: ConsentRecord | undefined;
|
|
240
|
+
applicationDataScopes?: DataScopes | undefined;
|
|
202
241
|
updatedAt?: number | null | undefined;
|
|
203
242
|
};
|
|
204
243
|
|
|
@@ -237,6 +276,12 @@ export type ConnectionInput = {
|
|
|
237
276
|
* List of custom mappings configured for this connection
|
|
238
277
|
*/
|
|
239
278
|
customMappings?: Array<CustomMappingInput> | undefined;
|
|
279
|
+
/**
|
|
280
|
+
* The current consent state of the connection
|
|
281
|
+
*/
|
|
282
|
+
consentState?: ConsentState | undefined;
|
|
283
|
+
latestConsent?: ConsentRecordInput | undefined;
|
|
284
|
+
applicationDataScopes?: DataScopesInput | undefined;
|
|
240
285
|
};
|
|
241
286
|
|
|
242
287
|
/** @internal */
|
|
@@ -556,6 +601,10 @@ export const Connection$inboundSchema: z.ZodType<
|
|
|
556
601
|
has_guide: z.boolean().optional(),
|
|
557
602
|
created_at: z.number().optional(),
|
|
558
603
|
custom_mappings: z.array(CustomMapping$inboundSchema).optional(),
|
|
604
|
+
consent_state: ConsentState$inboundSchema.optional(),
|
|
605
|
+
consents: z.array(ConsentRecord$inboundSchema).optional(),
|
|
606
|
+
latest_consent: ConsentRecord$inboundSchema.optional(),
|
|
607
|
+
application_data_scopes: DataScopes$inboundSchema.optional(),
|
|
559
608
|
updated_at: z.nullable(z.number()).optional(),
|
|
560
609
|
}).transform((v) => {
|
|
561
610
|
return remap$(v, {
|
|
@@ -577,6 +626,9 @@ export const Connection$inboundSchema: z.ZodType<
|
|
|
577
626
|
"has_guide": "hasGuide",
|
|
578
627
|
"created_at": "createdAt",
|
|
579
628
|
"custom_mappings": "customMappings",
|
|
629
|
+
"consent_state": "consentState",
|
|
630
|
+
"latest_consent": "latestConsent",
|
|
631
|
+
"application_data_scopes": "applicationDataScopes",
|
|
580
632
|
"updated_at": "updatedAt",
|
|
581
633
|
});
|
|
582
634
|
});
|
|
@@ -613,6 +665,10 @@ export type Connection$Outbound = {
|
|
|
613
665
|
has_guide?: boolean | undefined;
|
|
614
666
|
created_at?: number | undefined;
|
|
615
667
|
custom_mappings?: Array<CustomMapping$Outbound> | undefined;
|
|
668
|
+
consent_state?: string | undefined;
|
|
669
|
+
consents?: Array<ConsentRecord$Outbound> | undefined;
|
|
670
|
+
latest_consent?: ConsentRecord$Outbound | undefined;
|
|
671
|
+
application_data_scopes?: DataScopes$Outbound | undefined;
|
|
616
672
|
updated_at?: number | null | undefined;
|
|
617
673
|
};
|
|
618
674
|
|
|
@@ -652,6 +708,10 @@ export const Connection$outboundSchema: z.ZodType<
|
|
|
652
708
|
hasGuide: z.boolean().optional(),
|
|
653
709
|
createdAt: z.number().optional(),
|
|
654
710
|
customMappings: z.array(CustomMapping$outboundSchema).optional(),
|
|
711
|
+
consentState: ConsentState$outboundSchema.optional(),
|
|
712
|
+
consents: z.array(ConsentRecord$outboundSchema).optional(),
|
|
713
|
+
latestConsent: ConsentRecord$outboundSchema.optional(),
|
|
714
|
+
applicationDataScopes: DataScopes$outboundSchema.optional(),
|
|
655
715
|
updatedAt: z.nullable(z.number()).optional(),
|
|
656
716
|
}).transform((v) => {
|
|
657
717
|
return remap$(v, {
|
|
@@ -673,6 +733,9 @@ export const Connection$outboundSchema: z.ZodType<
|
|
|
673
733
|
hasGuide: "has_guide",
|
|
674
734
|
createdAt: "created_at",
|
|
675
735
|
customMappings: "custom_mappings",
|
|
736
|
+
consentState: "consent_state",
|
|
737
|
+
latestConsent: "latest_consent",
|
|
738
|
+
applicationDataScopes: "application_data_scopes",
|
|
676
739
|
updatedAt: "updated_at",
|
|
677
740
|
});
|
|
678
741
|
});
|
|
@@ -851,9 +914,15 @@ export const ConnectionInput$inboundSchema: z.ZodType<
|
|
|
851
914
|
configuration: z.array(z.lazy(() => ConnectionConfiguration$inboundSchema))
|
|
852
915
|
.optional(),
|
|
853
916
|
custom_mappings: z.array(CustomMappingInput$inboundSchema).optional(),
|
|
917
|
+
consent_state: ConsentState$inboundSchema.optional(),
|
|
918
|
+
latest_consent: ConsentRecordInput$inboundSchema.optional(),
|
|
919
|
+
application_data_scopes: DataScopesInput$inboundSchema.optional(),
|
|
854
920
|
}).transform((v) => {
|
|
855
921
|
return remap$(v, {
|
|
856
922
|
"custom_mappings": "customMappings",
|
|
923
|
+
"consent_state": "consentState",
|
|
924
|
+
"latest_consent": "latestConsent",
|
|
925
|
+
"application_data_scopes": "applicationDataScopes",
|
|
857
926
|
});
|
|
858
927
|
});
|
|
859
928
|
|
|
@@ -864,6 +933,9 @@ export type ConnectionInput$Outbound = {
|
|
|
864
933
|
metadata?: { [k: string]: any } | null | undefined;
|
|
865
934
|
configuration?: Array<ConnectionConfiguration$Outbound> | undefined;
|
|
866
935
|
custom_mappings?: Array<CustomMappingInput$Outbound> | undefined;
|
|
936
|
+
consent_state?: string | undefined;
|
|
937
|
+
latest_consent?: ConsentRecordInput$Outbound | undefined;
|
|
938
|
+
application_data_scopes?: DataScopesInput$Outbound | undefined;
|
|
867
939
|
};
|
|
868
940
|
|
|
869
941
|
/** @internal */
|
|
@@ -878,9 +950,15 @@ export const ConnectionInput$outboundSchema: z.ZodType<
|
|
|
878
950
|
configuration: z.array(z.lazy(() => ConnectionConfiguration$outboundSchema))
|
|
879
951
|
.optional(),
|
|
880
952
|
customMappings: z.array(CustomMappingInput$outboundSchema).optional(),
|
|
953
|
+
consentState: ConsentState$outboundSchema.optional(),
|
|
954
|
+
latestConsent: ConsentRecordInput$outboundSchema.optional(),
|
|
955
|
+
applicationDataScopes: DataScopesInput$outboundSchema.optional(),
|
|
881
956
|
}).transform((v) => {
|
|
882
957
|
return remap$(v, {
|
|
883
958
|
customMappings: "custom_mappings",
|
|
959
|
+
consentState: "consent_state",
|
|
960
|
+
latestConsent: "latest_consent",
|
|
961
|
+
applicationDataScopes: "application_data_scopes",
|
|
884
962
|
});
|
|
885
963
|
});
|
|
886
964
|
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
DataScopesResources,
|
|
12
|
+
DataScopesResources$inboundSchema,
|
|
13
|
+
DataScopesResources$Outbound,
|
|
14
|
+
DataScopesResources$outboundSchema,
|
|
15
|
+
} from "./datascopesresources.js";
|
|
16
|
+
|
|
17
|
+
export type ConsentRecord = {
|
|
18
|
+
/**
|
|
19
|
+
* Unique identifier for this consent record
|
|
20
|
+
*/
|
|
21
|
+
id: string;
|
|
22
|
+
/**
|
|
23
|
+
* ISO timestamp when consent was recorded
|
|
24
|
+
*/
|
|
25
|
+
createdAt: string;
|
|
26
|
+
/**
|
|
27
|
+
* Whether consent was granted (true) or denied/revoked (false)
|
|
28
|
+
*/
|
|
29
|
+
granted: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Data scopes resource configuration that can be either detailed field permissions or a wildcard
|
|
32
|
+
*/
|
|
33
|
+
resources: DataScopesResources;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const ConsentRecord$inboundSchema: z.ZodType<
|
|
38
|
+
ConsentRecord,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
unknown
|
|
41
|
+
> = z.object({
|
|
42
|
+
id: z.string(),
|
|
43
|
+
created_at: z.string(),
|
|
44
|
+
granted: z.boolean(),
|
|
45
|
+
resources: DataScopesResources$inboundSchema,
|
|
46
|
+
}).transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
"created_at": "createdAt",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export type ConsentRecord$Outbound = {
|
|
54
|
+
id: string;
|
|
55
|
+
created_at: string;
|
|
56
|
+
granted: boolean;
|
|
57
|
+
resources: DataScopesResources$Outbound;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export const ConsentRecord$outboundSchema: z.ZodType<
|
|
62
|
+
ConsentRecord$Outbound,
|
|
63
|
+
z.ZodTypeDef,
|
|
64
|
+
ConsentRecord
|
|
65
|
+
> = z.object({
|
|
66
|
+
id: z.string(),
|
|
67
|
+
createdAt: z.string(),
|
|
68
|
+
granted: z.boolean(),
|
|
69
|
+
resources: DataScopesResources$outboundSchema,
|
|
70
|
+
}).transform((v) => {
|
|
71
|
+
return remap$(v, {
|
|
72
|
+
createdAt: "created_at",
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @internal
|
|
78
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
79
|
+
*/
|
|
80
|
+
export namespace ConsentRecord$ {
|
|
81
|
+
/** @deprecated use `ConsentRecord$inboundSchema` instead. */
|
|
82
|
+
export const inboundSchema = ConsentRecord$inboundSchema;
|
|
83
|
+
/** @deprecated use `ConsentRecord$outboundSchema` instead. */
|
|
84
|
+
export const outboundSchema = ConsentRecord$outboundSchema;
|
|
85
|
+
/** @deprecated use `ConsentRecord$Outbound` instead. */
|
|
86
|
+
export type Outbound = ConsentRecord$Outbound;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function consentRecordToJSON(consentRecord: ConsentRecord): string {
|
|
90
|
+
return JSON.stringify(ConsentRecord$outboundSchema.parse(consentRecord));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function consentRecordFromJSON(
|
|
94
|
+
jsonString: string,
|
|
95
|
+
): SafeParseResult<ConsentRecord, SDKValidationError> {
|
|
96
|
+
return safeParse(
|
|
97
|
+
jsonString,
|
|
98
|
+
(x) => ConsentRecord$inboundSchema.parse(JSON.parse(x)),
|
|
99
|
+
`Failed to parse 'ConsentRecord' from JSON`,
|
|
100
|
+
);
|
|
101
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
DataScopesResources,
|
|
11
|
+
DataScopesResources$inboundSchema,
|
|
12
|
+
DataScopesResources$Outbound,
|
|
13
|
+
DataScopesResources$outboundSchema,
|
|
14
|
+
} from "./datascopesresources.js";
|
|
15
|
+
|
|
16
|
+
export type ConsentRecordInput = {
|
|
17
|
+
/**
|
|
18
|
+
* Whether consent was granted (true) or denied/revoked (false)
|
|
19
|
+
*/
|
|
20
|
+
granted: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Data scopes resource configuration that can be either detailed field permissions or a wildcard
|
|
23
|
+
*/
|
|
24
|
+
resources: DataScopesResources;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const ConsentRecordInput$inboundSchema: z.ZodType<
|
|
29
|
+
ConsentRecordInput,
|
|
30
|
+
z.ZodTypeDef,
|
|
31
|
+
unknown
|
|
32
|
+
> = z.object({
|
|
33
|
+
granted: z.boolean(),
|
|
34
|
+
resources: DataScopesResources$inboundSchema,
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type ConsentRecordInput$Outbound = {
|
|
39
|
+
granted: boolean;
|
|
40
|
+
resources: DataScopesResources$Outbound;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const ConsentRecordInput$outboundSchema: z.ZodType<
|
|
45
|
+
ConsentRecordInput$Outbound,
|
|
46
|
+
z.ZodTypeDef,
|
|
47
|
+
ConsentRecordInput
|
|
48
|
+
> = z.object({
|
|
49
|
+
granted: z.boolean(),
|
|
50
|
+
resources: DataScopesResources$outboundSchema,
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
56
|
+
*/
|
|
57
|
+
export namespace ConsentRecordInput$ {
|
|
58
|
+
/** @deprecated use `ConsentRecordInput$inboundSchema` instead. */
|
|
59
|
+
export const inboundSchema = ConsentRecordInput$inboundSchema;
|
|
60
|
+
/** @deprecated use `ConsentRecordInput$outboundSchema` instead. */
|
|
61
|
+
export const outboundSchema = ConsentRecordInput$outboundSchema;
|
|
62
|
+
/** @deprecated use `ConsentRecordInput$Outbound` instead. */
|
|
63
|
+
export type Outbound = ConsentRecordInput$Outbound;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function consentRecordInputToJSON(
|
|
67
|
+
consentRecordInput: ConsentRecordInput,
|
|
68
|
+
): string {
|
|
69
|
+
return JSON.stringify(
|
|
70
|
+
ConsentRecordInput$outboundSchema.parse(consentRecordInput),
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function consentRecordInputFromJSON(
|
|
75
|
+
jsonString: string,
|
|
76
|
+
): SafeParseResult<ConsentRecordInput, SDKValidationError> {
|
|
77
|
+
return safeParse(
|
|
78
|
+
jsonString,
|
|
79
|
+
(x) => ConsentRecordInput$inboundSchema.parse(JSON.parse(x)),
|
|
80
|
+
`Failed to parse 'ConsentRecordInput' from JSON`,
|
|
81
|
+
);
|
|
82
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The current consent state of the connection
|
|
10
|
+
*/
|
|
11
|
+
export const ConsentState = {
|
|
12
|
+
Implicit: "implicit",
|
|
13
|
+
Pending: "pending",
|
|
14
|
+
Granted: "granted",
|
|
15
|
+
Denied: "denied",
|
|
16
|
+
Revoked: "revoked",
|
|
17
|
+
RequiresReconsent: "requires_reconsent",
|
|
18
|
+
} as const;
|
|
19
|
+
/**
|
|
20
|
+
* The current consent state of the connection
|
|
21
|
+
*/
|
|
22
|
+
export type ConsentState = ClosedEnum<typeof ConsentState>;
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const ConsentState$inboundSchema: z.ZodNativeEnum<typeof ConsentState> =
|
|
26
|
+
z.nativeEnum(ConsentState);
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const ConsentState$outboundSchema: z.ZodNativeEnum<typeof ConsentState> =
|
|
30
|
+
ConsentState$inboundSchema;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
35
|
+
*/
|
|
36
|
+
export namespace ConsentState$ {
|
|
37
|
+
/** @deprecated use `ConsentState$inboundSchema` instead. */
|
|
38
|
+
export const inboundSchema = ConsentState$inboundSchema;
|
|
39
|
+
/** @deprecated use `ConsentState$outboundSchema` instead. */
|
|
40
|
+
export const outboundSchema = ConsentState$outboundSchema;
|
|
41
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
DataScopesResources,
|
|
12
|
+
DataScopesResources$inboundSchema,
|
|
13
|
+
DataScopesResources$Outbound,
|
|
14
|
+
DataScopesResources$outboundSchema,
|
|
15
|
+
} from "./datascopesresources.js";
|
|
16
|
+
|
|
17
|
+
export type DataScopes = {
|
|
18
|
+
/**
|
|
19
|
+
* Whether Data Scopes is enabled for this application
|
|
20
|
+
*/
|
|
21
|
+
enabled?: boolean | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* ISO timestamp of when the Data Scopes configuration was last modified
|
|
24
|
+
*/
|
|
25
|
+
updatedAt?: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Data scopes resource configuration that can be either detailed field permissions or a wildcard
|
|
28
|
+
*/
|
|
29
|
+
resources?: DataScopesResources | undefined;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const DataScopes$inboundSchema: z.ZodType<
|
|
34
|
+
DataScopes,
|
|
35
|
+
z.ZodTypeDef,
|
|
36
|
+
unknown
|
|
37
|
+
> = z.object({
|
|
38
|
+
enabled: z.boolean().optional(),
|
|
39
|
+
updated_at: z.string().optional(),
|
|
40
|
+
resources: DataScopesResources$inboundSchema.optional(),
|
|
41
|
+
}).transform((v) => {
|
|
42
|
+
return remap$(v, {
|
|
43
|
+
"updated_at": "updatedAt",
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export type DataScopes$Outbound = {
|
|
49
|
+
enabled?: boolean | undefined;
|
|
50
|
+
updated_at?: string | undefined;
|
|
51
|
+
resources?: DataScopesResources$Outbound | undefined;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const DataScopes$outboundSchema: z.ZodType<
|
|
56
|
+
DataScopes$Outbound,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
DataScopes
|
|
59
|
+
> = z.object({
|
|
60
|
+
enabled: z.boolean().optional(),
|
|
61
|
+
updatedAt: z.string().optional(),
|
|
62
|
+
resources: DataScopesResources$outboundSchema.optional(),
|
|
63
|
+
}).transform((v) => {
|
|
64
|
+
return remap$(v, {
|
|
65
|
+
updatedAt: "updated_at",
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @internal
|
|
71
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
72
|
+
*/
|
|
73
|
+
export namespace DataScopes$ {
|
|
74
|
+
/** @deprecated use `DataScopes$inboundSchema` instead. */
|
|
75
|
+
export const inboundSchema = DataScopes$inboundSchema;
|
|
76
|
+
/** @deprecated use `DataScopes$outboundSchema` instead. */
|
|
77
|
+
export const outboundSchema = DataScopes$outboundSchema;
|
|
78
|
+
/** @deprecated use `DataScopes$Outbound` instead. */
|
|
79
|
+
export type Outbound = DataScopes$Outbound;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function dataScopesToJSON(dataScopes: DataScopes): string {
|
|
83
|
+
return JSON.stringify(DataScopes$outboundSchema.parse(dataScopes));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function dataScopesFromJSON(
|
|
87
|
+
jsonString: string,
|
|
88
|
+
): SafeParseResult<DataScopes, SDKValidationError> {
|
|
89
|
+
return safeParse(
|
|
90
|
+
jsonString,
|
|
91
|
+
(x) => DataScopes$inboundSchema.parse(JSON.parse(x)),
|
|
92
|
+
`Failed to parse 'DataScopes' from JSON`,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
DataScopesResources,
|
|
11
|
+
DataScopesResources$inboundSchema,
|
|
12
|
+
DataScopesResources$Outbound,
|
|
13
|
+
DataScopesResources$outboundSchema,
|
|
14
|
+
} from "./datascopesresources.js";
|
|
15
|
+
|
|
16
|
+
export type DataScopesInput = {
|
|
17
|
+
/**
|
|
18
|
+
* Whether Data Scopes is enabled for this application
|
|
19
|
+
*/
|
|
20
|
+
enabled?: boolean | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Data scopes resource configuration that can be either detailed field permissions or a wildcard
|
|
23
|
+
*/
|
|
24
|
+
resources?: DataScopesResources | undefined;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const DataScopesInput$inboundSchema: z.ZodType<
|
|
29
|
+
DataScopesInput,
|
|
30
|
+
z.ZodTypeDef,
|
|
31
|
+
unknown
|
|
32
|
+
> = z.object({
|
|
33
|
+
enabled: z.boolean().optional(),
|
|
34
|
+
resources: DataScopesResources$inboundSchema.optional(),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type DataScopesInput$Outbound = {
|
|
39
|
+
enabled?: boolean | undefined;
|
|
40
|
+
resources?: DataScopesResources$Outbound | undefined;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const DataScopesInput$outboundSchema: z.ZodType<
|
|
45
|
+
DataScopesInput$Outbound,
|
|
46
|
+
z.ZodTypeDef,
|
|
47
|
+
DataScopesInput
|
|
48
|
+
> = z.object({
|
|
49
|
+
enabled: z.boolean().optional(),
|
|
50
|
+
resources: DataScopesResources$outboundSchema.optional(),
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
56
|
+
*/
|
|
57
|
+
export namespace DataScopesInput$ {
|
|
58
|
+
/** @deprecated use `DataScopesInput$inboundSchema` instead. */
|
|
59
|
+
export const inboundSchema = DataScopesInput$inboundSchema;
|
|
60
|
+
/** @deprecated use `DataScopesInput$outboundSchema` instead. */
|
|
61
|
+
export const outboundSchema = DataScopesInput$outboundSchema;
|
|
62
|
+
/** @deprecated use `DataScopesInput$Outbound` instead. */
|
|
63
|
+
export type Outbound = DataScopesInput$Outbound;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function dataScopesInputToJSON(
|
|
67
|
+
dataScopesInput: DataScopesInput,
|
|
68
|
+
): string {
|
|
69
|
+
return JSON.stringify(DataScopesInput$outboundSchema.parse(dataScopesInput));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function dataScopesInputFromJSON(
|
|
73
|
+
jsonString: string,
|
|
74
|
+
): SafeParseResult<DataScopesInput, SDKValidationError> {
|
|
75
|
+
return safeParse(
|
|
76
|
+
jsonString,
|
|
77
|
+
(x) => DataScopesInput$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
+
`Failed to parse 'DataScopesInput' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|