headintheclouddev / typings-suitescript-2.0

TypeScript typings for SuiteScript version 2.0
MIT License
148 stars 93 forks source link

Use a string enum for record types #277

Closed anthony-unicare closed 5 months ago

anthony-unicare commented 5 months ago

Here's a patch:

diff --git a/node_modules/@hitc/netsuite-types/N/record.d.ts b/node_modules/@hitc/netsuite-types/N/record.d.ts
index 19539f1..a95edb2
--- a/node_modules/@hitc/netsuite-types/N/record.d.ts
+++ b/node_modules/@hitc/netsuite-types/N/record.d.ts
@@ -845,269 +845,269 @@ export var transform: RecordTransformFunction;

 /** N/record.Type enum */
 export enum Type { // As of 15 June 2020
-    ACCOUNT, // 'account'
-    ACCOUNTING_BOOK, // 'accountingbook'
-    ACCOUNTING_CONTEXT, // 'accountingcontext'
-    ACCOUNTING_PERIOD, // 'accountingperiod'
-    ADV_INTER_COMPANY_JOURNAL_ENTRY, // 'advintercompanyjournalentry'
-    ALLOCATION_SCHEDULE, // 'allocationschedule'
-    AMORTIZATION_SCHEDULE, // 'amortizationschedule'
-    AMORTIZATION_TEMPLATE, // 'amortizationtemplate'
-    ASSEMBLY_BUILD, // 'assemblybuild'
-    ASSEMBLY_ITEM, // 'assemblyitem'
-    ASSEMBLY_UNBUILD, // 'assemblyunbuild'
-    BALANCE_TRX_BY_SEGMENTS, // 'balancetrxbysegments'
-    BILLING_ACCOUNT, // 'billingaccount'
-    BILLING_CLASS, // 'billingclass'
-    BILLING_RATE_CARD, // 'billingratecard'
-    BILLING_REVENUE_EVENT, // 'billingrevenueevent'
-    BILLING_SCHEDULE, // 'billingschedule'
-    BIN, // 'bin'
-    BIN_TRANSFER, // 'bintransfer'
-    BIN_WORKSHEET, // 'binworksheet'
-    BLANKET_PURCHASE_ORDER, // 'blanketpurchaseorder'
-    BOM, // 'bom'
-    BOM_REVISION, // 'bomrevision'
-    BONUS, // 'bonus'
-    BONUS_TYPE, // 'bonustype'
-    BUDGET_EXCHANGE_RATE, // 'budgetexchangerate'
-    BULK_OWNERSHIP_TRANSFER, // 'bulkownershiptransfer'
-    BUNDLE_INSTALLATION_SCRIPT, // 'bundleinstallationscript'
-    CALENDAR_EVENT, // 'calendarevent'
-    CAMPAIGN, // 'campaign'
-    CAMPAIGN_RESPONSE, // 'campaignresponse'
-    CAMPAIGN_TEMPLATE, // 'campaigntemplate'
-    CASH_REFUND, // 'cashrefund'
-    CASH_SALE, // 'cashsale'
-    CHARGE, // 'charge'
-    CHARGE_RULE, // 'chargerule'
-    CHECK, // 'check'
-    CLASSIFICATION, // 'classification'
-    CLIENT_SCRIPT, // 'clientscript'
-    CMS_CONTENT, // 'cmscontent'
-    CMS_CONTENT_TYPE, // 'cmscontenttype'
-    CMS_PAGE, // 'cmspage'
-    COMMERCE_CATEGORY, // 'commercecategory'
-    COMPETITOR, // 'competitor'
-    CONSOLIDATED_EXCHANGE_RATE, // 'consolidatedexchangerate'
-    CONTACT, // 'contact'
-    CONTACT_CATEGORY, // 'contactcategory'
-    CONTACT_ROLE, // 'contactrole'
-    COST_CATEGORY, // 'costcategory'
-    COUPON_CODE, // 'couponcode'
-    CREDIT_CARD_CHARGE, // 'creditcardcharge'
-    CREDIT_CARD_REFUND, // 'creditcardrefund'
-    CREDIT_MEMO, // 'creditmemo'
-    CURRENCY, // 'currency'
-    CUSTOMER, // 'customer'
-    CUSTOMER_CATEGORY, // 'customercategory'
-    CUSTOMER_DEPOSIT, // 'customerdeposit'
-    CUSTOMER_MESSAGE, // 'customermessage'
-    CUSTOMER_PAYMENT, // 'customerpayment'
-    CUSTOMER_PAYMENT_AUTHORIZATION, // 'customerpaymentauthorization'
-    CUSTOMER_REFUND, // 'customerrefund'
-    CUSTOMER_STATUS, // 'customerstatus'
-    CUSTOMER_SUBSIDIARY_RELATIONSHIP, // 'customersubsidiaryrelationship'
-    CUSTOM_PURCHASE, // 'custompurchase'
-    CUSTOM_RECORD, // 'customrecord'
-    CUSTOM_SALE, // 'customsale'
-    CUSTOM_TRANSACTION, // 'customtransaction'
-    DEPARTMENT, // 'department'
-    DEPOSIT, // 'deposit'
-    DEPOSIT_APPLICATION, // 'depositapplication'
-    DESCRIPTION_ITEM, // 'descriptionitem'
-    DISCOUNT_ITEM, // 'discountitem'
-    DOWNLOAD_ITEM, // 'downloaditem'
-    EMAIL_TEMPLATE, // 'emailtemplate'
-    EMPLOYEE, // 'employee'
-    EMPLOYEE_CHANGE_REQUEST, // 'employeechangerequest'
-    EMPLOYEE_CHANGE_REQUEST_TYPE, // 'employeechangerequesttype'
-    EMPLOYEE_STATUS, // 'employeestatus'
-    EMPLOYEE_TYPE, // 'employeetype'
-    ENTITY_ACCOUNT_MAPPING, // 'entityaccountmapping'
-    ESTIMATE, // 'estimate'
-    EXPENSE_AMORTIZATION_EVENT, // 'expenseamortizationevent'
-    EXPENSE_CATEGORY, // 'expensecategory'
-    EXPENSE_PLAN, // 'expenseplan'
-    EXPENSE_REPORT, // 'expensereport'
-    FAIR_VALUE_PRICE, // 'fairvalueprice'
-    FINANCIAL_INSTITUTION, // 'financialinstitution'
-    FIXED_AMOUNT_PROJECT_REVENUE_RULE, // 'fixedamountprojectrevenuerule'
-    FOLDER, // 'folder'
-    FORMAT_PROFILE, // 'formatprofile'
-    FULFILLMENT_REQUEST, // 'fulfillmentrequest'
-    GENERAL_TOKEN, // 'generaltoken'
-    GENERIC_RESOURCE, // 'genericresource'
-    GIFT_CERTIFICATE, // 'giftcertificate'
-    GIFT_CERTIFICATE_ITEM, // 'giftcertificateitem'
-    GLOBAL_ACCOUNT_MAPPING, // 'globalaccountmapping'
-    GLOBAL_INVENTORY_RELATIONSHIP, // 'globalinventoryrelationship'
-    GL_NUMBERING_SEQUENCE, // 'glnumberingsequence'
-    GOAL, // 'goal'
-    INBOUND_SHIPMENT, // 'inboundshipment'
-    INTERCOMP_ALLOCATION_SCHEDULE, // 'intercompallocationschedule'
-    INTER_COMPANY_JOURNAL_ENTRY, // 'intercompanyjournalentry'
-    INTER_COMPANY_TRANSFER_ORDER, // 'intercompanytransferorder'
-    INVENTORY_ADJUSTMENT, // 'inventoryadjustment'
-    INVENTORY_COST_REVALUATION, // 'inventorycostrevaluation'
-    INVENTORY_COUNT, // 'inventorycount'
-    INVENTORY_DETAIL, // 'inventorydetail'
-    INVENTORY_ITEM, // 'inventoryitem'
-    INVENTORY_NUMBER, // 'inventorynumber'
-    INVENTORY_STATUS, // 'inventorystatus'
-    INVENTORY_STATUS_CHANGE, // 'inventorystatuschange'
-    INVENTORY_TRANSFER, // 'inventorytransfer'
-    INVOICE, // 'invoice'
-    INVOICE_GROUP, // 'invoicegroup'
-    ISSUE, // 'issue'
-    ISSUE_PRODUCT, // 'issueproduct'
-    ISSUE_PRODUCT_VERSION, // 'issueproductversion'
-    ITEM_ACCOUNT_MAPPING, // 'itemaccountmapping'
-    ITEM_COLLECTION, // 'itemcollection'
-    ITEM_COLLECTION_ITEM_MAP, // 'itemcollectionitemmap'
-    ITEM_DEMAND_PLAN, // 'itemdemandplan'
-    ITEM_FULFILLMENT, // 'itemfulfillment'
-    ITEM_GROUP, // 'itemgroup'
-    ITEM_LOCATION_CONFIGURATION, // 'itemlocationconfiguration'
-    ITEM_PROCESS_FAMILY, // 'itemprocessfamily'
-    ITEM_PROCESS_GROUP, // 'itemprocessgroup'
-    ITEM_RECEIPT, // 'itemreceipt'
-    ITEM_REVISION, // 'itemrevision'
-    ITEM_SUPPLY_PLAN, // 'itemsupplyplan'
-    JOB, // 'job'
-    JOB_STATUS, // 'jobstatus'
-    JOB_TYPE, // 'jobtype'
-    JOURNAL_ENTRY, // 'journalentry'
-    KIT_ITEM, // 'kititem'
-    LABOR_BASED_PROJECT_REVENUE_RULE, // 'laborbasedprojectrevenuerule'
-    LEAD, // 'lead'
-    LOCATION, // 'location'
-    LOT_NUMBERED_ASSEMBLY_ITEM, // 'lotnumberedassemblyitem'
-    LOT_NUMBERED_INVENTORY_ITEM, // 'lotnumberedinventoryitem'
-    MANUFACTURING_COST_TEMPLATE, // 'manufacturingcosttemplate'
-    MANUFACTURING_OPERATION_TASK, // 'manufacturingoperationtask'
-    MANUFACTURING_ROUTING, // 'manufacturingrouting'
-    MAP_REDUCE_SCRIPT, // 'mapreducescript'
-    MARKUP_ITEM, // 'markupitem'
-    MASSUPDATE_SCRIPT, // 'massupdatescript'
-    MEM_DOC, // 'memdoc'
-    MERCHANDISE_HIERARCHY_LEVEL, // 'merchandisehierarchylevel'
-    MERCHANDISE_HIERARCHY_NODE, // 'merchandisehierarchynode'
-    MERCHANDISE_HIERARCHY_VERSION, // 'merchandisehierarchyversion'
-    MESSAGE, // 'message'
-    MFG_PLANNED_TIME, // 'mfgplannedtime'
-    NEXUS, // 'nexus'
-    NON_INVENTORY_ITEM, // 'noninventoryitem'
-    NOTE, // 'note'
-    NOTE_TYPE, // 'notetype'
-    OPPORTUNITY, // 'opportunity'
-    ORDER_SCHEDULE, // 'orderschedule'
-    ORDER_TYPE, // 'ordertype'
-    OTHER_CHARGE_ITEM, // 'otherchargeitem'
-    OTHER_NAME, // 'othername'
-    OTHER_NAME_CATEGORY, // 'othernamecategory'
-    PARTNER, // 'partner'
-    PARTNER_CATEGORY, // 'partnercategory'
-    PAYCHECK, // 'paycheck'
-    PAYCHECK_JOURNAL, // 'paycheckjournal'
-    PAYMENT_CARD, // 'paymentcard'
-    PAYMENT_CARD_TOKEN, // 'paymentcardtoken'
-    PAYMENT_ITEM, // 'paymentitem'
-    PAYMENT_METHOD, // 'paymentmethod'
-    PAYROLL_ITEM, // 'payrollitem'
-    PCT_COMPLETE_PROJECT_REVENUE_RULE, // 'pctcompleteprojectrevenuerule'
-    PERFORMANCE_METRIC, // 'performancemetric'
-    PERFORMANCE_REVIEW, // 'performancereview'
-    PERFORMANCE_REVIEW_SCHEDULE, // 'performancereviewschedule'
-    PERIOD_END_JOURNAL, // 'periodendjournal'
-    PHONE_CALL, // 'phonecall'
-    PICK_STRATEGY, // 'pickstrategy'
-    PICK_TASK, // 'picktask'
-    PORTLET, // 'portlet'
-    PRICE_BOOK, // 'pricebook'
-    PRICE_LEVEL, // 'pricelevel'
-    PRICE_PLAN, // 'priceplan'
-    PRICING_GROUP, // 'pricinggroup'
-    PROJECT_EXPENSE_TYPE, // 'projectexpensetype'
-    PROJECT_TASK, // 'projecttask'
-    PROJECT_TEMPLATE, // 'projecttemplate'
-    PROMOTION_CODE, // 'promotioncode'
-    PROSPECT, // 'prospect'
-    PURCHASE_CONTRACT, // 'purchasecontract'
-    PURCHASE_ORDER, // 'purchaseorder'
-    PURCHASE_REQUISITION, // 'purchaserequisition'
-    REALLOCATE_ITEM, // 'reallocateitem'
-    RECEIVE_INBOUND_SHIPMENT, // 'receiveinboundshipment'
-    RESOURCE_ALLOCATION, // 'resourceallocation'
-    RESTLET, // 'restlet'
-    RETURN_AUTHORIZATION, // 'returnauthorization'
-    REVENUE_ARRANGEMENT, // 'revenuearrangement'
-    REVENUE_COMMITMENT, // 'revenuecommitment'
-    REVENUE_COMMITMENT_REVERSAL, // 'revenuecommitmentreversal'
-    REVENUE_PLAN, // 'revenueplan'
-    REV_REC_SCHEDULE, // 'revrecschedule'
-    REV_REC_TEMPLATE, // 'revrectemplate'
-    SALES_ORDER, // 'salesorder'
-    SALES_ROLE, // 'salesrole'
-    SALES_TAX_ITEM, // 'salestaxitem'
-    SCHEDULED_SCRIPT, // 'scheduledscript'
-    SCHEDULED_SCRIPT_INSTANCE, // 'scheduledscriptinstance'
-    SCRIPT_DEPLOYMENT, // 'scriptdeployment'
-    SERIALIZED_ASSEMBLY_ITEM, // 'serializedassemblyitem'
-    SERIALIZED_INVENTORY_ITEM, // 'serializedinventoryitem'
-    SERVICE_ITEM, // 'serviceitem'
-    SHIP_ITEM, // 'shipitem'
-    SOLUTION, // 'solution'
-    STATISTICAL_JOURNAL_ENTRY, // 'statisticaljournalentry'
-    STORE_PICKUP_FULFILLMENT, // 'storepickupfulfillment'
-    SUBSCRIPTION, // 'subscription'
-    SUBSCRIPTION_CHANGE_ORDER, // 'subscriptionchangeorder'
-    SUBSCRIPTION_LINE, // 'subscriptionline'
-    SUBSCRIPTION_PLAN, // 'subscriptionplan'
-    SUBSIDIARY, // 'subsidiary'
-    SUBSIDIARY_SETTINGS, // 'subsidiarysettings'
-    SUBTOTAL_ITEM, // 'subtotalitem'
-    SUITELET, // 'suitelet'
-    SUPPLY_CHAIN_SNAPSHOT, // 'supplychainsnapshot'
-    SUPPLY_CHAIN_SNAPSHOT_SIMULATION, // 'supplychainsnapshotsimulation'
-    SUPPORT_CASE, // 'supportcase'
-    TASK, // 'task'
-    TAX_ACCT, // 'taxacct'
-    TAX_GROUP, // 'taxgroup'
-    TAX_PERIOD, // 'taxperiod'
-    TAX_TYPE, // 'taxtype'
-    TERM, // 'term'
-    TIME_BILL, // 'timebill'
-    TIME_ENTRY, // 'timeentry'
-    TIME_OFF_CHANGE, // 'timeoffchange'
-    TIME_OFF_PLAN, // 'timeoffplan'
-    TIME_OFF_REQUEST, // 'timeoffrequest'
-    TIME_OFF_RULE, // 'timeoffrule'
-    TIME_OFF_TYPE, // 'timeofftype'
-    TIME_SHEET, // 'timesheet'
-    TOPIC, // 'topic'
-    TRANSFER_ORDER, // 'transferorder'
-    UNITS_TYPE, // 'unitstype'
-    UNLOCKED_TIME_PERIOD, // 'unlockedtimeperiod'
-    USAGE, // 'usage'
-    USEREVENT_SCRIPT, // 'usereventscript'
-    VENDOR, // 'vendor'
-    VENDOR_BILL, // 'vendorbill'
-    VENDOR_CATEGORY, // 'vendorcategory'
-    VENDOR_CREDIT, // 'vendorcredit'
-    VENDOR_PAYMENT, // 'vendorpayment'
-    VENDOR_PREPAYMENT, // 'vendorprepayment'
-    VENDOR_PREPAYMENT_APPLICATION, // 'vendorprepaymentapplication'
-    VENDOR_RETURN_AUTHORIZATION, // 'vendorreturnauthorization'
-    VENDOR_SUBSIDIARY_RELATIONSHIP, // 'vendorsubsidiaryrelationship'
-    WAVE, // 'wave'
-    WBS, // 'wbs'
-    WEBSITE, // 'website'
-    WORKFLOW_ACTION_SCRIPT, // 'workflowactionscript'
-    WORKPLACE, // 'workplace'
-    WORK_ORDER, // 'workorder'
-    WORK_ORDER_CLOSE, // 'workorderclose'
-    WORK_ORDER_COMPLETION, // 'workordercompletion'
-    WORK_ORDER_ISSUE, // 'workorderissue'
-    ZONE // 'zone'
+    ACCOUNT = 'account',
+    ACCOUNTING_BOOK = 'accountingbook',
+    ACCOUNTING_CONTEXT = 'accountingcontext',
+    ACCOUNTING_PERIOD = 'accountingperiod',
+    ADV_INTER_COMPANY_JOURNAL_ENTRY = 'advintercompanyjournalentry',
+    ALLOCATION_SCHEDULE = 'allocationschedule',
+    AMORTIZATION_SCHEDULE = 'amortizationschedule',
+    AMORTIZATION_TEMPLATE = 'amortizationtemplate',
+    ASSEMBLY_BUILD = 'assemblybuild',
+    ASSEMBLY_ITEM = 'assemblyitem',
+    ASSEMBLY_UNBUILD = 'assemblyunbuild',
+    BALANCE_TRX_BY_SEGMENTS = 'balancetrxbysegments',
+    BILLING_ACCOUNT = 'billingaccount',
+    BILLING_CLASS = 'billingclass',
+    BILLING_RATE_CARD = 'billingratecard',
+    BILLING_REVENUE_EVENT = 'billingrevenueevent',
+    BILLING_SCHEDULE = 'billingschedule',
+    BIN = 'bin',
+    BIN_TRANSFER = 'bintransfer',
+    BIN_WORKSHEET = 'binworksheet',
+    BLANKET_PURCHASE_ORDER = 'blanketpurchaseorder',
+    BOM = 'bom',
+    BOM_REVISION = 'bomrevision',
+    BONUS = 'bonus',
+    BONUS_TYPE = 'bonustype',
+    BUDGET_EXCHANGE_RATE = 'budgetexchangerate',
+    BULK_OWNERSHIP_TRANSFER = 'bulkownershiptransfer',
+    BUNDLE_INSTALLATION_SCRIPT = 'bundleinstallationscript',
+    CALENDAR_EVENT = 'calendarevent',
+    CAMPAIGN = 'campaign',
+    CAMPAIGN_RESPONSE = 'campaignresponse',
+    CAMPAIGN_TEMPLATE = 'campaigntemplate',
+    CASH_REFUND = 'cashrefund',
+    CASH_SALE = 'cashsale',
+    CHARGE = 'charge',
+    CHARGE_RULE = 'chargerule',
+    CHECK = 'check',
+    CLASSIFICATION = 'classification',
+    CLIENT_SCRIPT = 'clientscript',
+    CMS_CONTENT = 'cmscontent',
+    CMS_CONTENT_TYPE = 'cmscontenttype',
+    CMS_PAGE = 'cmspage',
+    COMMERCE_CATEGORY = 'commercecategory',
+    COMPETITOR = 'competitor',
+    CONSOLIDATED_EXCHANGE_RATE = 'consolidatedexchangerate',
+    CONTACT = 'contact',
+    CONTACT_CATEGORY = 'contactcategory',
+    CONTACT_ROLE = 'contactrole',
+    COST_CATEGORY = 'costcategory',
+    COUPON_CODE = 'couponcode',
+    CREDIT_CARD_CHARGE = 'creditcardcharge',
+    CREDIT_CARD_REFUND = 'creditcardrefund',
+    CREDIT_MEMO = 'creditmemo',
+    CURRENCY = 'currency',
+    CUSTOMER = 'customer',
+    CUSTOMER_CATEGORY = 'customercategory',
+    CUSTOMER_DEPOSIT = 'customerdeposit',
+    CUSTOMER_MESSAGE = 'customermessage',
+    CUSTOMER_PAYMENT = 'customerpayment',
+    CUSTOMER_PAYMENT_AUTHORIZATION = 'customerpaymentauthorization',
+    CUSTOMER_REFUND = 'customerrefund',
+    CUSTOMER_STATUS = 'customerstatus',
+    CUSTOMER_SUBSIDIARY_RELATIONSHIP = 'customersubsidiaryrelationship',
+    CUSTOM_PURCHASE = 'custompurchase',
+    CUSTOM_RECORD = 'customrecord',
+    CUSTOM_SALE = 'customsale',
+    CUSTOM_TRANSACTION = 'customtransaction',
+    DEPARTMENT = 'department',
+    DEPOSIT = 'deposit',
+    DEPOSIT_APPLICATION = 'depositapplication',
+    DESCRIPTION_ITEM = 'descriptionitem',
+    DISCOUNT_ITEM = 'discountitem',
+    DOWNLOAD_ITEM = 'downloaditem',
+    EMAIL_TEMPLATE = 'emailtemplate',
+    EMPLOYEE = 'employee',
+    EMPLOYEE_CHANGE_REQUEST = 'employeechangerequest',
+    EMPLOYEE_CHANGE_REQUEST_TYPE = 'employeechangerequesttype',
+    EMPLOYEE_STATUS = 'employeestatus',
+    EMPLOYEE_TYPE = 'employeetype',
+    ENTITY_ACCOUNT_MAPPING = 'entityaccountmapping',
+    ESTIMATE = 'estimate',
+    EXPENSE_AMORTIZATION_EVENT = 'expenseamortizationevent',
+    EXPENSE_CATEGORY = 'expensecategory',
+    EXPENSE_PLAN = 'expenseplan',
+    EXPENSE_REPORT = 'expensereport',
+    FAIR_VALUE_PRICE = 'fairvalueprice',
+    FINANCIAL_INSTITUTION = 'financialinstitution',
+    FIXED_AMOUNT_PROJECT_REVENUE_RULE = 'fixedamountprojectrevenuerule',
+    FOLDER = 'folder',
+    FORMAT_PROFILE = 'formatprofile',
+    FULFILLMENT_REQUEST = 'fulfillmentrequest',
+    GENERAL_TOKEN = 'generaltoken',
+    GENERIC_RESOURCE = 'genericresource',
+    GIFT_CERTIFICATE = 'giftcertificate',
+    GIFT_CERTIFICATE_ITEM = 'giftcertificateitem',
+    GLOBAL_ACCOUNT_MAPPING = 'globalaccountmapping',
+    GLOBAL_INVENTORY_RELATIONSHIP = 'globalinventoryrelationship',
+    GL_NUMBERING_SEQUENCE = 'glnumberingsequence',
+    GOAL = 'goal',
+    INBOUND_SHIPMENT = 'inboundshipment',
+    INTERCOMP_ALLOCATION_SCHEDULE = 'intercompallocationschedule',
+    INTER_COMPANY_JOURNAL_ENTRY = 'intercompanyjournalentry',
+    INTER_COMPANY_TRANSFER_ORDER = 'intercompanytransferorder',
+    INVENTORY_ADJUSTMENT = 'inventoryadjustment',
+    INVENTORY_COST_REVALUATION = 'inventorycostrevaluation',
+    INVENTORY_COUNT = 'inventorycount',
+    INVENTORY_DETAIL = 'inventorydetail',
+    INVENTORY_ITEM = 'inventoryitem',
+    INVENTORY_NUMBER = 'inventorynumber',
+    INVENTORY_STATUS = 'inventorystatus',
+    INVENTORY_STATUS_CHANGE = 'inventorystatuschange',
+    INVENTORY_TRANSFER = 'inventorytransfer',
+    INVOICE = 'invoice',
+    INVOICE_GROUP = 'invoicegroup',
+    ISSUE = 'issue',
+    ISSUE_PRODUCT = 'issueproduct',
+    ISSUE_PRODUCT_VERSION = 'issueproductversion',
+    ITEM_ACCOUNT_MAPPING = 'itemaccountmapping',
+    ITEM_COLLECTION = 'itemcollection',
+    ITEM_COLLECTION_ITEM_MAP = 'itemcollectionitemmap',
+    ITEM_DEMAND_PLAN = 'itemdemandplan',
+    ITEM_FULFILLMENT = 'itemfulfillment',
+    ITEM_GROUP = 'itemgroup',
+    ITEM_LOCATION_CONFIGURATION = 'itemlocationconfiguration',
+    ITEM_PROCESS_FAMILY = 'itemprocessfamily',
+    ITEM_PROCESS_GROUP = 'itemprocessgroup',
+    ITEM_RECEIPT = 'itemreceipt',
+    ITEM_REVISION = 'itemrevision',
+    ITEM_SUPPLY_PLAN = 'itemsupplyplan',
+    JOB = 'job',
+    JOB_STATUS = 'jobstatus',
+    JOB_TYPE = 'jobtype',
+    JOURNAL_ENTRY = 'journalentry',
+    KIT_ITEM = 'kititem',
+    LABOR_BASED_PROJECT_REVENUE_RULE = 'laborbasedprojectrevenuerule',
+    LEAD = 'lead',
+    LOCATION = 'location',
+    LOT_NUMBERED_ASSEMBLY_ITEM = 'lotnumberedassemblyitem',
+    LOT_NUMBERED_INVENTORY_ITEM = 'lotnumberedinventoryitem',
+    MANUFACTURING_COST_TEMPLATE = 'manufacturingcosttemplate',
+    MANUFACTURING_OPERATION_TASK = 'manufacturingoperationtask',
+    MANUFACTURING_ROUTING = 'manufacturingrouting',
+    MAP_REDUCE_SCRIPT = 'mapreducescript',
+    MARKUP_ITEM = 'markupitem',
+    MASSUPDATE_SCRIPT = 'massupdatescript',
+    MEM_DOC = 'memdoc',
+    MERCHANDISE_HIERARCHY_LEVEL = 'merchandisehierarchylevel',
+    MERCHANDISE_HIERARCHY_NODE = 'merchandisehierarchynode',
+    MERCHANDISE_HIERARCHY_VERSION = 'merchandisehierarchyversion',
+    MESSAGE = 'message',
+    MFG_PLANNED_TIME = 'mfgplannedtime',
+    NEXUS = 'nexus',
+    NON_INVENTORY_ITEM = 'noninventoryitem',
+    NOTE = 'note',
+    NOTE_TYPE = 'notetype',
+    OPPORTUNITY = 'opportunity',
+    ORDER_SCHEDULE = 'orderschedule',
+    ORDER_TYPE = 'ordertype',
+    OTHER_CHARGE_ITEM = 'otherchargeitem',
+    OTHER_NAME = 'othername',
+    OTHER_NAME_CATEGORY = 'othernamecategory',
+    PARTNER = 'partner',
+    PARTNER_CATEGORY = 'partnercategory',
+    PAYCHECK = 'paycheck',
+    PAYCHECK_JOURNAL = 'paycheckjournal',
+    PAYMENT_CARD = 'paymentcard',
+    PAYMENT_CARD_TOKEN = 'paymentcardtoken',
+    PAYMENT_ITEM = 'paymentitem',
+    PAYMENT_METHOD = 'paymentmethod',
+    PAYROLL_ITEM = 'payrollitem',
+    PCT_COMPLETE_PROJECT_REVENUE_RULE = 'pctcompleteprojectrevenuerule',
+    PERFORMANCE_METRIC = 'performancemetric',
+    PERFORMANCE_REVIEW = 'performancereview',
+    PERFORMANCE_REVIEW_SCHEDULE = 'performancereviewschedule',
+    PERIOD_END_JOURNAL = 'periodendjournal',
+    PHONE_CALL = 'phonecall',
+    PICK_STRATEGY = 'pickstrategy',
+    PICK_TASK = 'picktask',
+    PORTLET = 'portlet',
+    PRICE_BOOK = 'pricebook',
+    PRICE_LEVEL = 'pricelevel',
+    PRICE_PLAN = 'priceplan',
+    PRICING_GROUP = 'pricinggroup',
+    PROJECT_EXPENSE_TYPE = 'projectexpensetype',
+    PROJECT_TASK = 'projecttask',
+    PROJECT_TEMPLATE = 'projecttemplate',
+    PROMOTION_CODE = 'promotioncode',
+    PROSPECT = 'prospect',
+    PURCHASE_CONTRACT = 'purchasecontract',
+    PURCHASE_ORDER = 'purchaseorder',
+    PURCHASE_REQUISITION = 'purchaserequisition',
+    REALLOCATE_ITEM = 'reallocateitem',
+    RECEIVE_INBOUND_SHIPMENT = 'receiveinboundshipment',
+    RESOURCE_ALLOCATION = 'resourceallocation',
+    RESTLET = 'restlet',
+    RETURN_AUTHORIZATION = 'returnauthorization',
+    REVENUE_ARRANGEMENT = 'revenuearrangement',
+    REVENUE_COMMITMENT = 'revenuecommitment',
+    REVENUE_COMMITMENT_REVERSAL = 'revenuecommitmentreversal',
+    REVENUE_PLAN = 'revenueplan',
+    REV_REC_SCHEDULE = 'revrecschedule',
+    REV_REC_TEMPLATE = 'revrectemplate',
+    SALES_ORDER = 'salesorder',
+    SALES_ROLE = 'salesrole',
+    SALES_TAX_ITEM = 'salestaxitem',
+    SCHEDULED_SCRIPT = 'scheduledscript',
+    SCHEDULED_SCRIPT_INSTANCE = 'scheduledscriptinstance',
+    SCRIPT_DEPLOYMENT = 'scriptdeployment',
+    SERIALIZED_ASSEMBLY_ITEM = 'serializedassemblyitem',
+    SERIALIZED_INVENTORY_ITEM = 'serializedinventoryitem',
+    SERVICE_ITEM = 'serviceitem',
+    SHIP_ITEM = 'shipitem',
+    SOLUTION = 'solution',
+    STATISTICAL_JOURNAL_ENTRY = 'statisticaljournalentry',
+    STORE_PICKUP_FULFILLMENT = 'storepickupfulfillment',
+    SUBSCRIPTION = 'subscription',
+    SUBSCRIPTION_CHANGE_ORDER = 'subscriptionchangeorder',
+    SUBSCRIPTION_LINE = 'subscriptionline',
+    SUBSCRIPTION_PLAN = 'subscriptionplan',
+    SUBSIDIARY = 'subsidiary',
+    SUBSIDIARY_SETTINGS = 'subsidiarysettings',
+    SUBTOTAL_ITEM = 'subtotalitem',
+    SUITELET = 'suitelet',
+    SUPPLY_CHAIN_SNAPSHOT = 'supplychainsnapshot',
+    SUPPLY_CHAIN_SNAPSHOT_SIMULATION = 'supplychainsnapshotsimulation',
+    SUPPORT_CASE = 'supportcase',
+    TASK = 'task',
+    TAX_ACCT = 'taxacct',
+    TAX_GROUP = 'taxgroup',
+    TAX_PERIOD = 'taxperiod',
+    TAX_TYPE = 'taxtype',
+    TERM = 'term',
+    TIME_BILL = 'timebill',
+    TIME_ENTRY = 'timeentry',
+    TIME_OFF_CHANGE = 'timeoffchange',
+    TIME_OFF_PLAN = 'timeoffplan',
+    TIME_OFF_REQUEST = 'timeoffrequest',
+    TIME_OFF_RULE = 'timeoffrule',
+    TIME_OFF_TYPE = 'timeofftype',
+    TIME_SHEET = 'timesheet',
+    TOPIC = 'topic',
+    TRANSFER_ORDER = 'transferorder',
+    UNITS_TYPE = 'unitstype',
+    UNLOCKED_TIME_PERIOD = 'unlockedtimeperiod',
+    USAGE = 'usage',
+    USEREVENT_SCRIPT = 'usereventscript',
+    VENDOR = 'vendor',
+    VENDOR_BILL = 'vendorbill',
+    VENDOR_CATEGORY = 'vendorcategory',
+    VENDOR_CREDIT = 'vendorcredit',
+    VENDOR_PAYMENT = 'vendorpayment',
+    VENDOR_PREPAYMENT = 'vendorprepayment',
+    VENDOR_PREPAYMENT_APPLICATION = 'vendorprepaymentapplication',
+    VENDOR_RETURN_AUTHORIZATION = 'vendorreturnauthorization',
+    VENDOR_SUBSIDIARY_RELATIONSHIP = 'vendorsubsidiaryrelationship',
+    WAVE = 'wave',
+    WBS = 'wbs',
+    WEBSITE = 'website',
+    WORKFLOW_ACTION_SCRIPT = 'workflowactionscript',
+    WORKPLACE = 'workplace',
+    WORK_ORDER = 'workorder',
+    WORK_ORDER_CLOSE = 'workorderclose',
+    WORK_ORDER_COMPLETION = 'workordercompletion',
+    WORK_ORDER_ISSUE = 'workorderissue',
+    ZONE = 'zone'
 }
ShawnTalbert commented 5 months ago

I have to disagree with this change because I don't think those strings are documented values for this enum?

On Mon, May 27, 2024, 11:44 PM anthony-unicare @.***> wrote:

Here's a patch:

diff --git @./netsuite-types/N/record.d.ts @./netsuite-types/N/record.d.ts index 19539f1..a95edb2 --- @./netsuite-types/N/record.d.ts +++ @./netsuite-types/N/record.d.ts @@ -845,269 +845,269 @@ export var transform: RecordTransformFunction;

/* N/record.Type enum / export enum Type { // As of 15 June 2020

  • ACCOUNT, // 'account'
  • ACCOUNTING_BOOK, // 'accountingbook'
  • ACCOUNTING_CONTEXT, // 'accountingcontext'
  • ACCOUNTING_PERIOD, // 'accountingperiod'
  • ADV_INTER_COMPANY_JOURNAL_ENTRY, // 'advintercompanyjournalentry'
  • ALLOCATION_SCHEDULE, // 'allocationschedule'
  • AMORTIZATION_SCHEDULE, // 'amortizationschedule'
  • AMORTIZATION_TEMPLATE, // 'amortizationtemplate'
  • ASSEMBLY_BUILD, // 'assemblybuild'
  • ASSEMBLY_ITEM, // 'assemblyitem'
  • ASSEMBLY_UNBUILD, // 'assemblyunbuild'
  • BALANCE_TRX_BY_SEGMENTS, // 'balancetrxbysegments'
  • BILLING_ACCOUNT, // 'billingaccount'
  • BILLING_CLASS, // 'billingclass'
  • BILLING_RATE_CARD, // 'billingratecard'
  • BILLING_REVENUE_EVENT, // 'billingrevenueevent'
  • BILLING_SCHEDULE, // 'billingschedule'
  • BIN, // 'bin'
  • BIN_TRANSFER, // 'bintransfer'
  • BIN_WORKSHEET, // 'binworksheet'
  • BLANKET_PURCHASE_ORDER, // 'blanketpurchaseorder'
  • BOM, // 'bom'
  • BOM_REVISION, // 'bomrevision'
  • BONUS, // 'bonus'
  • BONUS_TYPE, // 'bonustype'
  • BUDGET_EXCHANGE_RATE, // 'budgetexchangerate'
  • BULK_OWNERSHIP_TRANSFER, // 'bulkownershiptransfer'
  • BUNDLE_INSTALLATION_SCRIPT, // 'bundleinstallationscript'
  • CALENDAR_EVENT, // 'calendarevent'
  • CAMPAIGN, // 'campaign'
  • CAMPAIGN_RESPONSE, // 'campaignresponse'
  • CAMPAIGN_TEMPLATE, // 'campaigntemplate'
  • CASH_REFUND, // 'cashrefund'
  • CASH_SALE, // 'cashsale'
  • CHARGE, // 'charge'
  • CHARGE_RULE, // 'chargerule'
  • CHECK, // 'check'
  • CLASSIFICATION, // 'classification'
  • CLIENT_SCRIPT, // 'clientscript'
  • CMS_CONTENT, // 'cmscontent'
  • CMS_CONTENT_TYPE, // 'cmscontenttype'
  • CMS_PAGE, // 'cmspage'
  • COMMERCE_CATEGORY, // 'commercecategory'
  • COMPETITOR, // 'competitor'
  • CONSOLIDATED_EXCHANGE_RATE, // 'consolidatedexchangerate'
  • CONTACT, // 'contact'
  • CONTACT_CATEGORY, // 'contactcategory'
  • CONTACT_ROLE, // 'contactrole'
  • COST_CATEGORY, // 'costcategory'
  • COUPON_CODE, // 'couponcode'
  • CREDIT_CARD_CHARGE, // 'creditcardcharge'
  • CREDIT_CARD_REFUND, // 'creditcardrefund'
  • CREDIT_MEMO, // 'creditmemo'
  • CURRENCY, // 'currency'
  • CUSTOMER, // 'customer'
  • CUSTOMER_CATEGORY, // 'customercategory'
  • CUSTOMER_DEPOSIT, // 'customerdeposit'
  • CUSTOMER_MESSAGE, // 'customermessage'
  • CUSTOMER_PAYMENT, // 'customerpayment'
  • CUSTOMER_PAYMENT_AUTHORIZATION, // 'customerpaymentauthorization'
  • CUSTOMER_REFUND, // 'customerrefund'
  • CUSTOMER_STATUS, // 'customerstatus'
  • CUSTOMER_SUBSIDIARY_RELATIONSHIP, // 'customersubsidiaryrelationship'
  • CUSTOM_PURCHASE, // 'custompurchase'
  • CUSTOM_RECORD, // 'customrecord'
  • CUSTOM_SALE, // 'customsale'
  • CUSTOM_TRANSACTION, // 'customtransaction'
  • DEPARTMENT, // 'department'
  • DEPOSIT, // 'deposit'
  • DEPOSIT_APPLICATION, // 'depositapplication'
  • DESCRIPTION_ITEM, // 'descriptionitem'
  • DISCOUNT_ITEM, // 'discountitem'
  • DOWNLOAD_ITEM, // 'downloaditem'
  • EMAIL_TEMPLATE, // 'emailtemplate'
  • EMPLOYEE, // 'employee'
  • EMPLOYEE_CHANGE_REQUEST, // 'employeechangerequest'
  • EMPLOYEE_CHANGE_REQUEST_TYPE, // 'employeechangerequesttype'
  • EMPLOYEE_STATUS, // 'employeestatus'
  • EMPLOYEE_TYPE, // 'employeetype'
  • ENTITY_ACCOUNT_MAPPING, // 'entityaccountmapping'
  • ESTIMATE, // 'estimate'
  • EXPENSE_AMORTIZATION_EVENT, // 'expenseamortizationevent'
  • EXPENSE_CATEGORY, // 'expensecategory'
  • EXPENSE_PLAN, // 'expenseplan'
  • EXPENSE_REPORT, // 'expensereport'
  • FAIR_VALUE_PRICE, // 'fairvalueprice'
  • FINANCIAL_INSTITUTION, // 'financialinstitution'
  • FIXED_AMOUNT_PROJECT_REVENUE_RULE, // 'fixedamountprojectrevenuerule'
  • FOLDER, // 'folder'
  • FORMAT_PROFILE, // 'formatprofile'
  • FULFILLMENT_REQUEST, // 'fulfillmentrequest'
  • GENERAL_TOKEN, // 'generaltoken'
  • GENERIC_RESOURCE, // 'genericresource'
  • GIFT_CERTIFICATE, // 'giftcertificate'
  • GIFT_CERTIFICATE_ITEM, // 'giftcertificateitem'
  • GLOBAL_ACCOUNT_MAPPING, // 'globalaccountmapping'
  • GLOBAL_INVENTORY_RELATIONSHIP, // 'globalinventoryrelationship'
  • GL_NUMBERING_SEQUENCE, // 'glnumberingsequence'
  • GOAL, // 'goal'
  • INBOUND_SHIPMENT, // 'inboundshipment'
  • INTERCOMP_ALLOCATION_SCHEDULE, // 'intercompallocationschedule'
  • INTER_COMPANY_JOURNAL_ENTRY, // 'intercompanyjournalentry'
  • INTER_COMPANY_TRANSFER_ORDER, // 'intercompanytransferorder'
  • INVENTORY_ADJUSTMENT, // 'inventoryadjustment'
  • INVENTORY_COST_REVALUATION, // 'inventorycostrevaluation'
  • INVENTORY_COUNT, // 'inventorycount'
  • INVENTORY_DETAIL, // 'inventorydetail'
  • INVENTORY_ITEM, // 'inventoryitem'
  • INVENTORY_NUMBER, // 'inventorynumber'
  • INVENTORY_STATUS, // 'inventorystatus'
  • INVENTORY_STATUS_CHANGE, // 'inventorystatuschange'
  • INVENTORY_TRANSFER, // 'inventorytransfer'
  • INVOICE, // 'invoice'
  • INVOICE_GROUP, // 'invoicegroup'
  • ISSUE, // 'issue'
  • ISSUE_PRODUCT, // 'issueproduct'
  • ISSUE_PRODUCT_VERSION, // 'issueproductversion'
  • ITEM_ACCOUNT_MAPPING, // 'itemaccountmapping'
  • ITEM_COLLECTION, // 'itemcollection'
  • ITEM_COLLECTION_ITEM_MAP, // 'itemcollectionitemmap'
  • ITEM_DEMAND_PLAN, // 'itemdemandplan'
  • ITEM_FULFILLMENT, // 'itemfulfillment'
  • ITEM_GROUP, // 'itemgroup'
  • ITEM_LOCATION_CONFIGURATION, // 'itemlocationconfiguration'
  • ITEM_PROCESS_FAMILY, // 'itemprocessfamily'
  • ITEM_PROCESS_GROUP, // 'itemprocessgroup'
  • ITEM_RECEIPT, // 'itemreceipt'
  • ITEM_REVISION, // 'itemrevision'
  • ITEM_SUPPLY_PLAN, // 'itemsupplyplan'
  • JOB, // 'job'
  • JOB_STATUS, // 'jobstatus'
  • JOB_TYPE, // 'jobtype'
  • JOURNAL_ENTRY, // 'journalentry'
  • KIT_ITEM, // 'kititem'
  • LABOR_BASED_PROJECT_REVENUE_RULE, // 'laborbasedprojectrevenuerule'
  • LEAD, // 'lead'
  • LOCATION, // 'location'
  • LOT_NUMBERED_ASSEMBLY_ITEM, // 'lotnumberedassemblyitem'
  • LOT_NUMBERED_INVENTORY_ITEM, // 'lotnumberedinventoryitem'
  • MANUFACTURING_COST_TEMPLATE, // 'manufacturingcosttemplate'
  • MANUFACTURING_OPERATION_TASK, // 'manufacturingoperationtask'
  • MANUFACTURING_ROUTING, // 'manufacturingrouting'
  • MAP_REDUCE_SCRIPT, // 'mapreducescript'
  • MARKUP_ITEM, // 'markupitem'
  • MASSUPDATE_SCRIPT, // 'massupdatescript'
  • MEM_DOC, // 'memdoc'
  • MERCHANDISE_HIERARCHY_LEVEL, // 'merchandisehierarchylevel'
  • MERCHANDISE_HIERARCHY_NODE, // 'merchandisehierarchynode'
  • MERCHANDISE_HIERARCHY_VERSION, // 'merchandisehierarchyversion'
  • MESSAGE, // 'message'
  • MFG_PLANNED_TIME, // 'mfgplannedtime'
  • NEXUS, // 'nexus'
  • NON_INVENTORY_ITEM, // 'noninventoryitem'
  • NOTE, // 'note'
  • NOTE_TYPE, // 'notetype'
  • OPPORTUNITY, // 'opportunity'
  • ORDER_SCHEDULE, // 'orderschedule'
  • ORDER_TYPE, // 'ordertype'
  • OTHER_CHARGE_ITEM, // 'otherchargeitem'
  • OTHER_NAME, // 'othername'
  • OTHER_NAME_CATEGORY, // 'othernamecategory'
  • PARTNER, // 'partner'
  • PARTNER_CATEGORY, // 'partnercategory'
  • PAYCHECK, // 'paycheck'
  • PAYCHECK_JOURNAL, // 'paycheckjournal'
  • PAYMENT_CARD, // 'paymentcard'
  • PAYMENT_CARD_TOKEN, // 'paymentcardtoken'
  • PAYMENT_ITEM, // 'paymentitem'
  • PAYMENT_METHOD, // 'paymentmethod'
  • PAYROLL_ITEM, // 'payrollitem'
  • PCT_COMPLETE_PROJECT_REVENUE_RULE, // 'pctcompleteprojectrevenuerule'
  • PERFORMANCE_METRIC, // 'performancemetric'
  • PERFORMANCE_REVIEW, // 'performancereview'
  • PERFORMANCE_REVIEW_SCHEDULE, // 'performancereviewschedule'
  • PERIOD_END_JOURNAL, // 'periodendjournal'
  • PHONE_CALL, // 'phonecall'
  • PICK_STRATEGY, // 'pickstrategy'
  • PICK_TASK, // 'picktask'
  • PORTLET, // 'portlet'
  • PRICE_BOOK, // 'pricebook'
  • PRICE_LEVEL, // 'pricelevel'
  • PRICE_PLAN, // 'priceplan'
  • PRICING_GROUP, // 'pricinggroup'
  • PROJECT_EXPENSE_TYPE, // 'projectexpensetype'
  • PROJECT_TASK, // 'projecttask'
  • PROJECT_TEMPLATE, // 'projecttemplate'
  • PROMOTION_CODE, // 'promotioncode'
  • PROSPECT, // 'prospect'
  • PURCHASE_CONTRACT, // 'purchasecontract'
  • PURCHASE_ORDER, // 'purchaseorder'
  • PURCHASE_REQUISITION, // 'purchaserequisition'
  • REALLOCATE_ITEM, // 'reallocateitem'
  • RECEIVE_INBOUND_SHIPMENT, // 'receiveinboundshipment'
  • RESOURCE_ALLOCATION, // 'resourceallocation'
  • RESTLET, // 'restlet'
  • RETURN_AUTHORIZATION, // 'returnauthorization'
  • REVENUE_ARRANGEMENT, // 'revenuearrangement'
  • REVENUE_COMMITMENT, // 'revenuecommitment'
  • REVENUE_COMMITMENT_REVERSAL, // 'revenuecommitmentreversal'
  • REVENUE_PLAN, // 'revenueplan'
  • REV_REC_SCHEDULE, // 'revrecschedule'
  • REV_REC_TEMPLATE, // 'revrectemplate'
  • SALES_ORDER, // 'salesorder'
  • SALES_ROLE, // 'salesrole'
  • SALES_TAX_ITEM, // 'salestaxitem'
  • SCHEDULED_SCRIPT, // 'scheduledscript'
  • SCHEDULED_SCRIPT_INSTANCE, // 'scheduledscriptinstance'
  • SCRIPT_DEPLOYMENT, // 'scriptdeployment'
  • SERIALIZED_ASSEMBLY_ITEM, // 'serializedassemblyitem'
  • SERIALIZED_INVENTORY_ITEM, // 'serializedinventoryitem'
  • SERVICE_ITEM, // 'serviceitem'
  • SHIP_ITEM, // 'shipitem'
  • SOLUTION, // 'solution'
  • STATISTICAL_JOURNAL_ENTRY, // 'statisticaljournalentry'
  • STORE_PICKUP_FULFILLMENT, // 'storepickupfulfillment'
  • SUBSCRIPTION, // 'subscription'
  • SUBSCRIPTION_CHANGE_ORDER, // 'subscriptionchangeorder'
  • SUBSCRIPTION_LINE, // 'subscriptionline'
  • SUBSCRIPTION_PLAN, // 'subscriptionplan'
  • SUBSIDIARY, // 'subsidiary'
  • SUBSIDIARY_SETTINGS, // 'subsidiarysettings'
  • SUBTOTAL_ITEM, // 'subtotalitem'
  • SUITELET, // 'suitelet'
  • SUPPLY_CHAIN_SNAPSHOT, // 'supplychainsnapshot'
  • SUPPLY_CHAIN_SNAPSHOT_SIMULATION, // 'supplychainsnapshotsimulation'
  • SUPPORT_CASE, // 'supportcase'
  • TASK, // 'task'
  • TAX_ACCT, // 'taxacct'
  • TAX_GROUP, // 'taxgroup'
  • TAX_PERIOD, // 'taxperiod'
  • TAX_TYPE, // 'taxtype'
  • TERM, // 'term'
  • TIME_BILL, // 'timebill'
  • TIME_ENTRY, // 'timeentry'
  • TIME_OFF_CHANGE, // 'timeoffchange'
  • TIME_OFF_PLAN, // 'timeoffplan'
  • TIME_OFF_REQUEST, // 'timeoffrequest'
  • TIME_OFF_RULE, // 'timeoffrule'
  • TIME_OFF_TYPE, // 'timeofftype'
  • TIME_SHEET, // 'timesheet'
  • TOPIC, // 'topic'
  • TRANSFER_ORDER, // 'transferorder'
  • UNITS_TYPE, // 'unitstype'
  • UNLOCKED_TIME_PERIOD, // 'unlockedtimeperiod'
  • USAGE, // 'usage'
  • USEREVENT_SCRIPT, // 'usereventscript'
  • VENDOR, // 'vendor'
  • VENDOR_BILL, // 'vendorbill'
  • VENDOR_CATEGORY, // 'vendorcategory'
  • VENDOR_CREDIT, // 'vendorcredit'
  • VENDOR_PAYMENT, // 'vendorpayment'
  • VENDOR_PREPAYMENT, // 'vendorprepayment'
  • VENDOR_PREPAYMENT_APPLICATION, // 'vendorprepaymentapplication'
  • VENDOR_RETURN_AUTHORIZATION, // 'vendorreturnauthorization'
  • VENDOR_SUBSIDIARY_RELATIONSHIP, // 'vendorsubsidiaryrelationship'
  • WAVE, // 'wave'
  • WBS, // 'wbs'
  • WEBSITE, // 'website'
  • WORKFLOW_ACTION_SCRIPT, // 'workflowactionscript'
  • WORKPLACE, // 'workplace'
  • WORK_ORDER, // 'workorder'
  • WORK_ORDER_CLOSE, // 'workorderclose'
  • WORK_ORDER_COMPLETION, // 'workordercompletion'
  • WORK_ORDER_ISSUE, // 'workorderissue'
  • ZONE // 'zone'
  • ACCOUNT = 'account',
  • ACCOUNTING_BOOK = 'accountingbook',
  • ACCOUNTING_CONTEXT = 'accountingcontext',
  • ACCOUNTING_PERIOD = 'accountingperiod',
  • ADV_INTER_COMPANY_JOURNAL_ENTRY = 'advintercompanyjournalentry',
  • ALLOCATION_SCHEDULE = 'allocationschedule',
  • AMORTIZATION_SCHEDULE = 'amortizationschedule',
  • AMORTIZATION_TEMPLATE = 'amortizationtemplate',
  • ASSEMBLY_BUILD = 'assemblybuild',
  • ASSEMBLY_ITEM = 'assemblyitem',
  • ASSEMBLY_UNBUILD = 'assemblyunbuild',
  • BALANCE_TRX_BY_SEGMENTS = 'balancetrxbysegments',
  • BILLING_ACCOUNT = 'billingaccount',
  • BILLING_CLASS = 'billingclass',
  • BILLING_RATE_CARD = 'billingratecard',
  • BILLING_REVENUE_EVENT = 'billingrevenueevent',
  • BILLING_SCHEDULE = 'billingschedule',
  • BIN = 'bin',
  • BIN_TRANSFER = 'bintransfer',
  • BIN_WORKSHEET = 'binworksheet',
  • BLANKET_PURCHASE_ORDER = 'blanketpurchaseorder',
  • BOM = 'bom',
  • BOM_REVISION = 'bomrevision',
  • BONUS = 'bonus',
  • BONUS_TYPE = 'bonustype',
  • BUDGET_EXCHANGE_RATE = 'budgetexchangerate',
  • BULK_OWNERSHIP_TRANSFER = 'bulkownershiptransfer',
  • BUNDLE_INSTALLATION_SCRIPT = 'bundleinstallationscript',
  • CALENDAR_EVENT = 'calendarevent',
  • CAMPAIGN = 'campaign',
  • CAMPAIGN_RESPONSE = 'campaignresponse',
  • CAMPAIGN_TEMPLATE = 'campaigntemplate',
  • CASH_REFUND = 'cashrefund',
  • CASH_SALE = 'cashsale',
  • CHARGE = 'charge',
  • CHARGE_RULE = 'chargerule',
  • CHECK = 'check',
  • CLASSIFICATION = 'classification',
  • CLIENT_SCRIPT = 'clientscript',
  • CMS_CONTENT = 'cmscontent',
  • CMS_CONTENT_TYPE = 'cmscontenttype',
  • CMS_PAGE = 'cmspage',
  • COMMERCE_CATEGORY = 'commercecategory',
  • COMPETITOR = 'competitor',
  • CONSOLIDATED_EXCHANGE_RATE = 'consolidatedexchangerate',
  • CONTACT = 'contact',
  • CONTACT_CATEGORY = 'contactcategory',
  • CONTACT_ROLE = 'contactrole',
  • COST_CATEGORY = 'costcategory',
  • COUPON_CODE = 'couponcode',
  • CREDIT_CARD_CHARGE = 'creditcardcharge',
  • CREDIT_CARD_REFUND = 'creditcardrefund',
  • CREDIT_MEMO = 'creditmemo',
  • CURRENCY = 'currency',
  • CUSTOMER = 'customer',
  • CUSTOMER_CATEGORY = 'customercategory',
  • CUSTOMER_DEPOSIT = 'customerdeposit',
  • CUSTOMER_MESSAGE = 'customermessage',
  • CUSTOMER_PAYMENT = 'customerpayment',
  • CUSTOMER_PAYMENT_AUTHORIZATION = 'customerpaymentauthorization',
  • CUSTOMER_REFUND = 'customerrefund',
  • CUSTOMER_STATUS = 'customerstatus',
  • CUSTOMER_SUBSIDIARY_RELATIONSHIP = 'customersubsidiaryrelationship',
  • CUSTOM_PURCHASE = 'custompurchase',
  • CUSTOM_RECORD = 'customrecord',
  • CUSTOM_SALE = 'customsale',
  • CUSTOM_TRANSACTION = 'customtransaction',
  • DEPARTMENT = 'department',
  • DEPOSIT = 'deposit',
  • DEPOSIT_APPLICATION = 'depositapplication',
  • DESCRIPTION_ITEM = 'descriptionitem',
  • DISCOUNT_ITEM = 'discountitem',
  • DOWNLOAD_ITEM = 'downloaditem',
  • EMAIL_TEMPLATE = 'emailtemplate',
  • EMPLOYEE = 'employee',
  • EMPLOYEE_CHANGE_REQUEST = 'employeechangerequest',
  • EMPLOYEE_CHANGE_REQUEST_TYPE = 'employeechangerequesttype',
  • EMPLOYEE_STATUS = 'employeestatus',
  • EMPLOYEE_TYPE = 'employeetype',
  • ENTITY_ACCOUNT_MAPPING = 'entityaccountmapping',
  • ESTIMATE = 'estimate',
  • EXPENSE_AMORTIZATION_EVENT = 'expenseamortizationevent',
  • EXPENSE_CATEGORY = 'expensecategory',
  • EXPENSE_PLAN = 'expenseplan',
  • EXPENSE_REPORT = 'expensereport',
  • FAIR_VALUE_PRICE = 'fairvalueprice',
  • FINANCIAL_INSTITUTION = 'financialinstitution',
  • FIXED_AMOUNT_PROJECT_REVENUE_RULE = 'fixedamountprojectrevenuerule',
  • FOLDER = 'folder',
  • FORMAT_PROFILE = 'formatprofile',
  • FULFILLMENT_REQUEST = 'fulfillmentrequest',
  • GENERAL_TOKEN = 'generaltoken',
  • GENERIC_RESOURCE = 'genericresource',
  • GIFT_CERTIFICATE = 'giftcertificate',
  • GIFT_CERTIFICATE_ITEM = 'giftcertificateitem',
  • GLOBAL_ACCOUNT_MAPPING = 'globalaccountmapping',
  • GLOBAL_INVENTORY_RELATIONSHIP = 'globalinventoryrelationship',
  • GL_NUMBERING_SEQUENCE = 'glnumberingsequence',
  • GOAL = 'goal',
  • INBOUND_SHIPMENT = 'inboundshipment',
  • INTERCOMP_ALLOCATION_SCHEDULE = 'intercompallocationschedule',
  • INTER_COMPANY_JOURNAL_ENTRY = 'intercompanyjournalentry',
  • INTER_COMPANY_TRANSFER_ORDER = 'intercompanytransferorder',
  • INVENTORY_ADJUSTMENT = 'inventoryadjustment',
  • INVENTORY_COST_REVALUATION = 'inventorycostrevaluation',
  • INVENTORY_COUNT = 'inventorycount',
  • INVENTORY_DETAIL = 'inventorydetail',
  • INVENTORY_ITEM = 'inventoryitem',
  • INVENTORY_NUMBER = 'inventorynumber',
  • INVENTORY_STATUS = 'inventorystatus',
  • INVENTORY_STATUS_CHANGE = 'inventorystatuschange',
  • INVENTORY_TRANSFER = 'inventorytransfer',
  • INVOICE = 'invoice',
  • INVOICE_GROUP = 'invoicegroup',
  • ISSUE = 'issue',
  • ISSUE_PRODUCT = 'issueproduct',
  • ISSUE_PRODUCT_VERSION = 'issueproductversion',
  • ITEM_ACCOUNT_MAPPING = 'itemaccountmapping',
  • ITEM_COLLECTION = 'itemcollection',
  • ITEM_COLLECTION_ITEM_MAP = 'itemcollectionitemmap',
  • ITEM_DEMAND_PLAN = 'itemdemandplan',
  • ITEM_FULFILLMENT = 'itemfulfillment',
  • ITEM_GROUP = 'itemgroup',
  • ITEM_LOCATION_CONFIGURATION = 'itemlocationconfiguration',
  • ITEM_PROCESS_FAMILY = 'itemprocessfamily',
  • ITEM_PROCESS_GROUP = 'itemprocessgroup',
  • ITEM_RECEIPT = 'itemreceipt',
  • ITEM_REVISION = 'itemrevision',
  • ITEM_SUPPLY_PLAN = 'itemsupplyplan',
  • JOB = 'job',
  • JOB_STATUS = 'jobstatus',
  • JOB_TYPE = 'jobtype',
  • JOURNAL_ENTRY = 'journalentry',
  • KIT_ITEM = 'kititem',
  • LABOR_BASED_PROJECT_REVENUE_RULE = 'laborbasedprojectrevenuerule',
  • LEAD = 'lead',
  • LOCATION = 'location',
  • LOT_NUMBERED_ASSEMBLY_ITEM = 'lotnumberedassemblyitem',
  • LOT_NUMBERED_INVENTORY_ITEM = 'lotnumberedinventoryitem',
  • MANUFACTURING_COST_TEMPLATE = 'manufacturingcosttemplate',
  • MANUFACTURING_OPERATION_TASK = 'manufacturingoperationtask',
  • MANUFACTURING_ROUTING = 'manufacturingrouting',
  • MAP_REDUCE_SCRIPT = 'mapreducescript',
  • MARKUP_ITEM = 'markupitem',
  • MASSUPDATE_SCRIPT = 'massupdatescript',
  • MEM_DOC = 'memdoc',
  • MERCHANDISE_HIERARCHY_LEVEL = 'merchandisehierarchylevel',
  • MERCHANDISE_HIERARCHY_NODE = 'merchandisehierarchynode',
  • MERCHANDISE_HIERARCHY_VERSION = 'merchandisehierarchyversion',
  • MESSAGE = 'message',
  • MFG_PLANNED_TIME = 'mfgplannedtime',
  • NEXUS = 'nexus',
  • NON_INVENTORY_ITEM = 'noninventoryitem',
  • NOTE = 'note',
  • NOTE_TYPE = 'notetype',
  • OPPORTUNITY = 'opportunity',
  • ORDER_SCHEDULE = 'orderschedule',
  • ORDER_TYPE = 'ordertype',
  • OTHER_CHARGE_ITEM = 'otherchargeitem',
  • OTHER_NAME = 'othername',
  • OTHER_NAME_CATEGORY = 'othernamecategory',
  • PARTNER = 'partner',
  • PARTNER_CATEGORY = 'partnercategory',
  • PAYCHECK = 'paycheck',
  • PAYCHECK_JOURNAL = 'paycheckjournal',
  • PAYMENT_CARD = 'paymentcard',
  • PAYMENT_CARD_TOKEN = 'paymentcardtoken',
  • PAYMENT_ITEM = 'paymentitem',
  • PAYMENT_METHOD = 'paymentmethod',
  • PAYROLL_ITEM = 'payrollitem',
  • PCT_COMPLETE_PROJECT_REVENUE_RULE = 'pctcompleteprojectrevenuerule',
  • PERFORMANCE_METRIC = 'performancemetric',
  • PERFORMANCE_REVIEW = 'performancereview',
  • PERFORMANCE_REVIEW_SCHEDULE = 'performancereviewschedule',
  • PERIOD_END_JOURNAL = 'periodendjournal',
  • PHONE_CALL = 'phonecall',
  • PICK_STRATEGY = 'pickstrategy',
  • PICK_TASK = 'picktask',
  • PORTLET = 'portlet',
  • PRICE_BOOK = 'pricebook',
  • PRICE_LEVEL = 'pricelevel',
  • PRICE_PLAN = 'priceplan',
  • PRICING_GROUP = 'pricinggroup',
  • PROJECT_EXPENSE_TYPE = 'projectexpensetype',
  • PROJECT_TASK = 'projecttask',
  • PROJECT_TEMPLATE = 'projecttemplate',
  • PROMOTION_CODE = 'promotioncode',
  • PROSPECT = 'prospect',
  • PURCHASE_CONTRACT = 'purchasecontract',
  • PURCHASE_ORDER = 'purchaseorder',
  • PURCHASE_REQUISITION = 'purchaserequisition',
  • REALLOCATE_ITEM = 'reallocateitem',
  • RECEIVE_INBOUND_SHIPMENT = 'receiveinboundshipment',
  • RESOURCE_ALLOCATION = 'resourceallocation',
  • RESTLET = 'restlet',
  • RETURN_AUTHORIZATION = 'returnauthorization',
  • REVENUE_ARRANGEMENT = 'revenuearrangement',
  • REVENUE_COMMITMENT = 'revenuecommitment',
  • REVENUE_COMMITMENT_REVERSAL = 'revenuecommitmentreversal',
  • REVENUE_PLAN = 'revenueplan',
  • REV_REC_SCHEDULE = 'revrecschedule',
  • REV_REC_TEMPLATE = 'revrectemplate',
  • SALES_ORDER = 'salesorder',
  • SALES_ROLE = 'salesrole',
  • SALES_TAX_ITEM = 'salestaxitem',
  • SCHEDULED_SCRIPT = 'scheduledscript',
  • SCHEDULED_SCRIPT_INSTANCE = 'scheduledscriptinstance',
  • SCRIPT_DEPLOYMENT = 'scriptdeployment',
  • SERIALIZED_ASSEMBLY_ITEM = 'serializedassemblyitem',
  • SERIALIZED_INVENTORY_ITEM = 'serializedinventoryitem',
  • SERVICE_ITEM = 'serviceitem',
  • SHIP_ITEM = 'shipitem',
  • SOLUTION = 'solution',
  • STATISTICAL_JOURNAL_ENTRY = 'statisticaljournalentry',
  • STORE_PICKUP_FULFILLMENT = 'storepickupfulfillment',
  • SUBSCRIPTION = 'subscription',
  • SUBSCRIPTION_CHANGE_ORDER = 'subscriptionchangeorder',
  • SUBSCRIPTION_LINE = 'subscriptionline',
  • SUBSCRIPTION_PLAN = 'subscriptionplan',
  • SUBSIDIARY = 'subsidiary',
  • SUBSIDIARY_SETTINGS = 'subsidiarysettings',
  • SUBTOTAL_ITEM = 'subtotalitem',
  • SUITELET = 'suitelet',
  • SUPPLY_CHAIN_SNAPSHOT = 'supplychainsnapshot',
  • SUPPLY_CHAIN_SNAPSHOT_SIMULATION = 'supplychainsnapshotsimulation',
  • SUPPORT_CASE = 'supportcase',
  • TASK = 'task',
  • TAX_ACCT = 'taxacct',
  • TAX_GROUP = 'taxgroup',
  • TAX_PERIOD = 'taxperiod',
  • TAX_TYPE = 'taxtype',
  • TERM = 'term',
  • TIME_BILL = 'timebill',
  • TIME_ENTRY = 'timeentry',
  • TIME_OFF_CHANGE = 'timeoffchange',
  • TIME_OFF_PLAN = 'timeoffplan',
  • TIME_OFF_REQUEST = 'timeoffrequest',
  • TIME_OFF_RULE = 'timeoffrule',
  • TIME_OFF_TYPE = 'timeofftype',
  • TIME_SHEET = 'timesheet',
  • TOPIC = 'topic',
  • TRANSFER_ORDER = 'transferorder',
  • UNITS_TYPE = 'unitstype',
  • UNLOCKED_TIME_PERIOD = 'unlockedtimeperiod',
  • USAGE = 'usage',
  • USEREVENT_SCRIPT = 'usereventscript',
  • VENDOR = 'vendor',
  • VENDOR_BILL = 'vendorbill',
  • VENDOR_CATEGORY = 'vendorcategory',
  • VENDOR_CREDIT = 'vendorcredit',
  • VENDOR_PAYMENT = 'vendorpayment',
  • VENDOR_PREPAYMENT = 'vendorprepayment',
  • VENDOR_PREPAYMENT_APPLICATION = 'vendorprepaymentapplication',
  • VENDOR_RETURN_AUTHORIZATION = 'vendorreturnauthorization',
  • VENDOR_SUBSIDIARY_RELATIONSHIP = 'vendorsubsidiaryrelationship',
  • WAVE = 'wave',
  • WBS = 'wbs',
  • WEBSITE = 'website',
  • WORKFLOW_ACTION_SCRIPT = 'workflowactionscript',
  • WORKPLACE = 'workplace',
  • WORK_ORDER = 'workorder',
  • WORK_ORDER_CLOSE = 'workorderclose',
  • WORK_ORDER_COMPLETION = 'workordercompletion',
  • WORK_ORDER_ISSUE = 'workorderissue',
  • ZONE = 'zone' }

— Reply to this email directly, view it on GitHub https://github.com/headintheclouddev/typings-suitescript-2.0/issues/277, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKFNA4KB7SHEA47WBAASBLZEQRVBAVCNFSM6AAAAABIMIQ4EGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGMZDAMRVHA4TONI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

anthony-unicare commented 5 months ago

I have to disagree with this change because I don't think those strings are documented values for this enum?

Hi @ShawnTalbert,

You’re correct: I just checked and these are not officially documented values. If the project’s policy is to include only officially documented values, then you should reject/close this issue.

Having these string values associated with the enum is useful. For example, the strings can be returned from a SuiteQL query to indicate a record type. Without the string values, it would be necessary to have a separate mapping that contains essentially the same information in addition to the enum definition.

But I can understand if you consider this out-of-scope for the project.

ShawnTalbert commented 5 months ago

Once upon a time, NetSuite didn't have this record type enum and we had to use the underlying string constants.

When they chose to introduce this 'enum' as an abstraction to the record type string constants, we can no longer assume the values (even if they happen to be correct today). Because of the abstraction, NetSuite is free to change the underlying values of record.Type without concerns for breaking code which properly used the enum object.

Bringing up SuiteQL is a good example to discuss. For a transaction search, recordtype is documented as a string. It doesn't show any relation to record.Type. It might be that the string values for record.Type seem to match up with the SuiteQL recordtype values but that's no guarantee.

SuiteQL is especially interesting because there are various spots where the SQL schema for a record doesn't exactly match the N/record schema we see from script (i.e. fields available in SuiteQL and not to script, or visa versa, or differing somehow). My argument here is if we want this types library to be reliable, it shouldn't make assumptions and instead stick to the facts.

That said, if you've confirmed that the entire record.Type object has exactly the string values submitted, it would still be 'factual' to add them even if not documented.

My main fear is people using those constants in unintended ways (such as making the leap to SuiteQL transaction.recordtype values. Also, it means keeping those values updated as NetSuite evolves.

I think there are several spots where this type library expresses the facts - even sometimes when they conflict with NetSuite's imperfect documentation. I consider that a strength - in most cases I can rely on this library to be more accurate than NetSuite's own documentation.

MrRob commented 5 months ago

@ShawnTalbert Thank you, this is very insightful and valuable input

anthony-unicare commented 5 months ago

That said, if you've confirmed that the entire record.Type object has exactly the string values submitted, it would still be 'factual' to add them even if not documented.

Hi @ShawnTalbert,

Thank you for taking the time to reply to my report and explain your reasoning.

I checked the entire record.Type object and found that my original patch was missing some values. Here’s a new patch that has exactly the values in record.Type:

diff --git a/node_modules/@hitc/netsuite-types/N/record.d.ts b/node_modules/@hitc/netsuite-types/N/record.d.ts
index 6710384..cbfbc28
--- a/node_modules/@hitc/netsuite-types/N/record.d.ts
+++ b/node_modules/@hitc/netsuite-types/N/record.d.ts
@@ -845,269 +845,287 @@ export var transform: RecordTransformFunction;

 /** N/record.Type enum */
 export enum Type { // As of 4 June 2024
-    ACCOUNT, // 'account'
-    ACCOUNTING_BOOK, // 'accountingbook'
-    ACCOUNTING_CONTEXT, // 'accountingcontext'
-    ACCOUNTING_PERIOD, // 'accountingperiod'
-    ADV_INTER_COMPANY_JOURNAL_ENTRY, // 'advintercompanyjournalentry'
-    ALLOCATION_SCHEDULE, // 'allocationschedule'
-    AMORTIZATION_SCHEDULE, // 'amortizationschedule'
-    AMORTIZATION_TEMPLATE, // 'amortizationtemplate'
-    ASSEMBLY_BUILD, // 'assemblybuild'
-    ASSEMBLY_ITEM, // 'assemblyitem'
-    ASSEMBLY_UNBUILD, // 'assemblyunbuild'
-    BALANCE_TRX_BY_SEGMENTS, // 'balancetrxbysegments'
-    BILLING_ACCOUNT, // 'billingaccount'
-    BILLING_CLASS, // 'billingclass'
-    BILLING_RATE_CARD, // 'billingratecard'
-    BILLING_REVENUE_EVENT, // 'billingrevenueevent'
-    BILLING_SCHEDULE, // 'billingschedule'
-    BIN, // 'bin'
-    BIN_TRANSFER, // 'bintransfer'
-    BIN_WORKSHEET, // 'binworksheet'
-    BLANKET_PURCHASE_ORDER, // 'blanketpurchaseorder'
-    BOM, // 'bom'
-    BOM_REVISION, // 'bomrevision'
-    BONUS, // 'bonus'
-    BONUS_TYPE, // 'bonustype'
-    BUDGET_EXCHANGE_RATE, // 'budgetexchangerate'
-    BULK_OWNERSHIP_TRANSFER, // 'bulkownershiptransfer'
-    BUNDLE_INSTALLATION_SCRIPT, // 'bundleinstallationscript'
-    CALENDAR_EVENT, // 'calendarevent'
-    CAMPAIGN, // 'campaign'
-    CAMPAIGN_RESPONSE, // 'campaignresponse'
-    CAMPAIGN_TEMPLATE, // 'campaigntemplate'
-    CASH_REFUND, // 'cashrefund'
-    CASH_SALE, // 'cashsale'
-    CHARGE, // 'charge'
-    CHARGE_RULE, // 'chargerule'
-    CHECK, // 'check'
-    CLASSIFICATION, // 'classification'
-    CLIENT_SCRIPT, // 'clientscript'
-    CMS_CONTENT, // 'cmscontent'
-    CMS_CONTENT_TYPE, // 'cmscontenttype'
-    CMS_PAGE, // 'cmspage'
-    COMMERCE_CATEGORY, // 'commercecategory'
-    COMPETITOR, // 'competitor'
-    CONSOLIDATED_EXCHANGE_RATE, // 'consolidatedexchangerate'
-    CONTACT, // 'contact'
-    CONTACT_CATEGORY, // 'contactcategory'
-    CONTACT_ROLE, // 'contactrole'
-    COST_CATEGORY, // 'costcategory'
-    COUPON_CODE, // 'couponcode'
-    CREDIT_CARD_CHARGE, // 'creditcardcharge'
-    CREDIT_CARD_REFUND, // 'creditcardrefund'
-    CREDIT_MEMO, // 'creditmemo'
-    CURRENCY, // 'currency'
-    CUSTOMER, // 'customer'
-    CUSTOMER_CATEGORY, // 'customercategory'
-    CUSTOMER_DEPOSIT, // 'customerdeposit'
-    CUSTOMER_MESSAGE, // 'customermessage'
-    CUSTOMER_PAYMENT, // 'customerpayment'
-    CUSTOMER_PAYMENT_AUTHORIZATION, // 'customerpaymentauthorization'
-    CUSTOMER_REFUND, // 'customerrefund'
-    CUSTOMER_STATUS, // 'customerstatus'
-    CUSTOMER_SUBSIDIARY_RELATIONSHIP, // 'customersubsidiaryrelationship'
-    CUSTOM_PURCHASE, // 'custompurchase'
-    CUSTOM_RECORD, // 'customrecord'
-    CUSTOM_SALE, // 'customsale'
-    CUSTOM_TRANSACTION, // 'customtransaction'
-    DEPARTMENT, // 'department'
-    DEPOSIT, // 'deposit'
-    DEPOSIT_APPLICATION, // 'depositapplication'
-    DESCRIPTION_ITEM, // 'descriptionitem'
-    DISCOUNT_ITEM, // 'discountitem'
-    DOWNLOAD_ITEM, // 'downloaditem'
-    EMAIL_TEMPLATE, // 'emailtemplate'
-    EMPLOYEE, // 'employee'
-    EMPLOYEE_CHANGE_REQUEST, // 'employeechangerequest'
-    EMPLOYEE_CHANGE_REQUEST_TYPE, // 'employeechangerequesttype'
-    EMPLOYEE_STATUS, // 'employeestatus'
-    EMPLOYEE_TYPE, // 'employeetype'
-    ENTITY_ACCOUNT_MAPPING, // 'entityaccountmapping'
-    ESTIMATE, // 'estimate'
-    EXPENSE_AMORTIZATION_EVENT, // 'expenseamortizationevent'
-    EXPENSE_CATEGORY, // 'expensecategory'
-    EXPENSE_PLAN, // 'expenseplan'
-    EXPENSE_REPORT, // 'expensereport'
-    FAIR_VALUE_PRICE, // 'fairvalueprice'
-    FINANCIAL_INSTITUTION, // 'financialinstitution'
-    FIXED_AMOUNT_PROJECT_REVENUE_RULE, // 'fixedamountprojectrevenuerule'
-    FOLDER, // 'folder'
-    FORMAT_PROFILE, // 'formatprofile'
-    FULFILLMENT_REQUEST, // 'fulfillmentrequest'
-    GENERAL_TOKEN, // 'generaltoken'
-    GENERIC_RESOURCE, // 'genericresource'
-    GIFT_CERTIFICATE, // 'giftcertificate'
-    GIFT_CERTIFICATE_ITEM, // 'giftcertificateitem'
-    GLOBAL_ACCOUNT_MAPPING, // 'globalaccountmapping'
-    GLOBAL_INVENTORY_RELATIONSHIP, // 'globalinventoryrelationship'
-    GL_NUMBERING_SEQUENCE, // 'glnumberingsequence'
-    GOAL, // 'goal'
-    INBOUND_SHIPMENT, // 'inboundshipment'
-    INTERCOMP_ALLOCATION_SCHEDULE, // 'intercompallocationschedule'
-    INTER_COMPANY_JOURNAL_ENTRY, // 'intercompanyjournalentry'
-    INTER_COMPANY_TRANSFER_ORDER, // 'intercompanytransferorder'
-    INVENTORY_ADJUSTMENT, // 'inventoryadjustment'
-    INVENTORY_COST_REVALUATION, // 'inventorycostrevaluation'
-    INVENTORY_COUNT, // 'inventorycount'
-    INVENTORY_DETAIL, // 'inventorydetail'
-    INVENTORY_ITEM, // 'inventoryitem'
-    INVENTORY_NUMBER, // 'inventorynumber'
-    INVENTORY_STATUS, // 'inventorystatus'
-    INVENTORY_STATUS_CHANGE, // 'inventorystatuschange'
-    INVENTORY_TRANSFER, // 'inventorytransfer'
-    INVOICE, // 'invoice'
-    INVOICE_GROUP, // 'invoicegroup'
-    ISSUE, // 'issue'
-    ISSUE_PRODUCT, // 'issueproduct'
-    ISSUE_PRODUCT_VERSION, // 'issueproductversion'
-    ITEM_ACCOUNT_MAPPING, // 'itemaccountmapping'
-    ITEM_COLLECTION, // 'itemcollection'
-    ITEM_COLLECTION_ITEM_MAP, // 'itemcollectionitemmap'
-    ITEM_DEMAND_PLAN, // 'itemdemandplan'
-    ITEM_FULFILLMENT, // 'itemfulfillment'
-    ITEM_GROUP, // 'itemgroup'
-    ITEM_LOCATION_CONFIGURATION, // 'itemlocationconfiguration'
-    ITEM_PROCESS_FAMILY, // 'itemprocessfamily'
-    ITEM_PROCESS_GROUP, // 'itemprocessgroup'
-    ITEM_RECEIPT, // 'itemreceipt'
-    ITEM_REVISION, // 'itemrevision'
-    ITEM_SUPPLY_PLAN, // 'itemsupplyplan'
-    JOB, // 'job'
-    JOB_STATUS, // 'jobstatus'
-    JOB_TYPE, // 'jobtype'
-    JOURNAL_ENTRY, // 'journalentry'
-    KIT_ITEM, // 'kititem'
-    LABOR_BASED_PROJECT_REVENUE_RULE, // 'laborbasedprojectrevenuerule'
-    LEAD, // 'lead'
-    LOCATION, // 'location'
-    LOT_NUMBERED_ASSEMBLY_ITEM, // 'lotnumberedassemblyitem'
-    LOT_NUMBERED_INVENTORY_ITEM, // 'lotnumberedinventoryitem'
-    MANUFACTURING_COST_TEMPLATE, // 'manufacturingcosttemplate'
-    MANUFACTURING_OPERATION_TASK, // 'manufacturingoperationtask'
-    MANUFACTURING_ROUTING, // 'manufacturingrouting'
-    MAP_REDUCE_SCRIPT, // 'mapreducescript'
-    MARKUP_ITEM, // 'markupitem'
-    MASSUPDATE_SCRIPT, // 'massupdatescript'
-    MEM_DOC, // 'memdoc'
-    MERCHANDISE_HIERARCHY_LEVEL, // 'merchandisehierarchylevel'
-    MERCHANDISE_HIERARCHY_NODE, // 'merchandisehierarchynode'
-    MERCHANDISE_HIERARCHY_VERSION, // 'merchandisehierarchyversion'
-    MESSAGE, // 'message'
-    MFG_PLANNED_TIME, // 'mfgplannedtime'
-    NEXUS, // 'nexus'
-    NON_INVENTORY_ITEM, // 'noninventoryitem'
-    NOTE, // 'note'
-    NOTE_TYPE, // 'notetype'
-    OPPORTUNITY, // 'opportunity'
-    ORDER_SCHEDULE, // 'orderschedule'
-    ORDER_TYPE, // 'ordertype'
-    OTHER_CHARGE_ITEM, // 'otherchargeitem'
-    OTHER_NAME, // 'othername'
-    OTHER_NAME_CATEGORY, // 'othernamecategory'
-    PARTNER, // 'partner'
-    PARTNER_CATEGORY, // 'partnercategory'
-    PAYCHECK, // 'paycheck'
-    PAYCHECK_JOURNAL, // 'paycheckjournal'
-    PAYMENT_CARD, // 'paymentcard'
-    PAYMENT_CARD_TOKEN, // 'paymentcardtoken'
-    PAYMENT_ITEM, // 'paymentitem'
-    PAYMENT_METHOD, // 'paymentmethod'
-    PAYROLL_ITEM, // 'payrollitem'
-    PCT_COMPLETE_PROJECT_REVENUE_RULE, // 'pctcompleteprojectrevenuerule'
-    PERFORMANCE_METRIC, // 'performancemetric'
-    PERFORMANCE_REVIEW, // 'performancereview'
-    PERFORMANCE_REVIEW_SCHEDULE, // 'performancereviewschedule'
-    PERIOD_END_JOURNAL, // 'periodendjournal'
-    PHONE_CALL, // 'phonecall'
-    PICK_STRATEGY, // 'pickstrategy'
-    PICK_TASK, // 'picktask'
-    PORTLET, // 'portlet'
-    PRICE_BOOK, // 'pricebook'
-    PRICE_LEVEL, // 'pricelevel'
-    PRICE_PLAN, // 'priceplan'
-    PRICING_GROUP, // 'pricinggroup'
-    PROJECT_EXPENSE_TYPE, // 'projectexpensetype'
-    PROJECT_TASK, // 'projecttask'
-    PROJECT_TEMPLATE, // 'projecttemplate'
-    PROMOTION_CODE, // 'promotioncode'
-    PROSPECT, // 'prospect'
-    PURCHASE_CONTRACT, // 'purchasecontract'
-    PURCHASE_ORDER, // 'purchaseorder'
-    PURCHASE_REQUISITION, // 'purchaserequisition'
-    REALLOCATE_ITEM, // 'reallocateitem'
-    RECEIVE_INBOUND_SHIPMENT, // 'receiveinboundshipment'
-    RESOURCE_ALLOCATION, // 'resourceallocation'
-    RESTLET, // 'restlet'
-    RETURN_AUTHORIZATION, // 'returnauthorization'
-    REVENUE_ARRANGEMENT, // 'revenuearrangement'
-    REVENUE_COMMITMENT, // 'revenuecommitment'
-    REVENUE_COMMITMENT_REVERSAL, // 'revenuecommitmentreversal'
-    REVENUE_PLAN, // 'revenueplan'
-    REV_REC_SCHEDULE, // 'revrecschedule'
-    REV_REC_TEMPLATE, // 'revrectemplate'
-    SALES_ORDER, // 'salesorder'
-    SALES_ROLE, // 'salesrole'
-    SALES_TAX_ITEM, // 'salestaxitem'
-    SCHEDULED_SCRIPT, // 'scheduledscript'
-    SCHEDULED_SCRIPT_INSTANCE, // 'scheduledscriptinstance'
-    SCRIPT_DEPLOYMENT, // 'scriptdeployment'
-    SERIALIZED_ASSEMBLY_ITEM, // 'serializedassemblyitem'
-    SERIALIZED_INVENTORY_ITEM, // 'serializedinventoryitem'
-    SERVICE_ITEM, // 'serviceitem'
-    SHIP_ITEM, // 'shipitem'
-    SOLUTION, // 'solution'
-    STATISTICAL_JOURNAL_ENTRY, // 'statisticaljournalentry'
-    STORE_PICKUP_FULFILLMENT, // 'storepickupfulfillment'
-    SUBSCRIPTION, // 'subscription'
-    SUBSCRIPTION_CHANGE_ORDER, // 'subscriptionchangeorder'
-    SUBSCRIPTION_LINE, // 'subscriptionline'
-    SUBSCRIPTION_PLAN, // 'subscriptionplan'
-    SUBSIDIARY, // 'subsidiary'
-    SUBSIDIARY_SETTINGS, // 'subsidiarysettings'
-    SUBTOTAL_ITEM, // 'subtotalitem'
-    SUITELET, // 'suitelet'
-    SUPPLY_CHAIN_SNAPSHOT, // 'supplychainsnapshot'
-    SUPPLY_CHAIN_SNAPSHOT_SIMULATION, // 'supplychainsnapshotsimulation'
-    SUPPORT_CASE, // 'supportcase'
-    TASK, // 'task'
-    TAX_ACCT, // 'taxacct'
-    TAX_GROUP, // 'taxgroup'
-    TAX_PERIOD, // 'taxperiod'
-    TAX_TYPE, // 'taxtype'
-    TERM, // 'term'
-    TIME_BILL, // 'timebill'
-    TIME_ENTRY, // 'timeentry'
-    TIME_OFF_CHANGE, // 'timeoffchange'
-    TIME_OFF_PLAN, // 'timeoffplan'
-    TIME_OFF_REQUEST, // 'timeoffrequest'
-    TIME_OFF_RULE, // 'timeoffrule'
-    TIME_OFF_TYPE, // 'timeofftype'
-    TIME_SHEET, // 'timesheet'
-    TOPIC, // 'topic'
-    TRANSFER_ORDER, // 'transferorder'
-    UNITS_TYPE, // 'unitstype'
-    UNLOCKED_TIME_PERIOD, // 'unlockedtimeperiod'
-    USAGE, // 'usage'
-    USEREVENT_SCRIPT, // 'usereventscript'
-    VENDOR, // 'vendor'
-    VENDOR_BILL, // 'vendorbill'
-    VENDOR_CATEGORY, // 'vendorcategory'
-    VENDOR_CREDIT, // 'vendorcredit'
-    VENDOR_PAYMENT, // 'vendorpayment'
-    VENDOR_PREPAYMENT, // 'vendorprepayment'
-    VENDOR_PREPAYMENT_APPLICATION, // 'vendorprepaymentapplication'
-    VENDOR_RETURN_AUTHORIZATION, // 'vendorreturnauthorization'
-    VENDOR_SUBSIDIARY_RELATIONSHIP, // 'vendorsubsidiaryrelationship'
-    WAVE, // 'wave'
-    WBS, // 'wbs'
-    WEBSITE, // 'website'
-    WORKFLOW_ACTION_SCRIPT, // 'workflowactionscript'
-    WORKPLACE, // 'workplace'
-    WORK_ORDER, // 'workorder'
-    WORK_ORDER_CLOSE, // 'workorderclose'
-    WORK_ORDER_COMPLETION, // 'workordercompletion'
-    WORK_ORDER_ISSUE, // 'workorderissue'
-    ZONE // 'zone'
+    ACCOUNT = 'account',
+    ACCOUNTING_BOOK = 'accountingbook',
+    ACCOUNTING_CONTEXT = 'accountingcontext',
+    ACCOUNTING_PERIOD = 'accountingperiod',
+    ADV_INTER_COMPANY_JOURNAL_ENTRY = 'advintercompanyjournalentry',
+    ALLOCATION_SCHEDULE = 'allocationschedule',
+    AMORTIZATION_SCHEDULE = 'amortizationschedule',
+    AMORTIZATION_TEMPLATE = 'amortizationtemplate',
+    ASSEMBLY_BUILD = 'assemblybuild',
+    ASSEMBLY_ITEM = 'assemblyitem',
+    ASSEMBLY_UNBUILD = 'assemblyunbuild',
+    AUTOMATED_CLEARING_HOUSE = 'automatedclearinghouse',
+    BALANCE_TRX_BY_SEGMENTS = 'balancetrxbysegments',
+    BILLING_ACCOUNT = 'billingaccount',
+    BILLING_CLASS = 'billingclass',
+    BILLING_RATE_CARD = 'billingratecard',
+    BILLING_REVENUE_EVENT = 'billingrevenueevent',
+    BILLING_SCHEDULE = 'billingschedule',
+    BIN = 'bin',
+    BIN_TRANSFER = 'bintransfer',
+    BIN_WORKSHEET = 'binworksheet',
+    BLANKET_PURCHASE_ORDER = 'blanketpurchaseorder',
+    BOM = 'bom',
+    BOM_REVISION = 'bomrevision',
+    BONUS = 'bonus',
+    BONUS_TYPE = 'bonustype',
+    BUDGET_EXCHANGE_RATE = 'budgetexchangerate',
+    BULK_OWNERSHIP_TRANSFER = 'bulkownershiptransfer',
+    BUNDLE_INSTALLATION_SCRIPT = 'bundleinstallationscript',
+    CALENDAR_EVENT = 'calendarevent',
+    CAMPAIGN = 'campaign',
+    CAMPAIGN_RESPONSE = 'campaignresponse',
+    CAMPAIGN_TEMPLATE = 'campaigntemplate',
+    CARDHOLDER_AUTHENTICATION = 'cardholderauthentication',
+    CASH_REFUND = 'cashrefund',
+    CASH_SALE = 'cashsale',
+    CHARGE = 'charge',
+    CHARGE_RULE = 'chargerule',
+    CHECK = 'check',
+    CLASSIFICATION = 'classification',
+    CLIENT_SCRIPT = 'clientscript',
+    CMS_CONTENT = 'cmscontent',
+    CMS_CONTENT_TYPE = 'cmscontenttype',
+    CMS_PAGE = 'cmspage',
+    COMMERCE_CATEGORY = 'commercecategory',
+    COMPETITOR = 'competitor',
+    CONSOLIDATED_EXCHANGE_RATE = 'consolidatedexchangerate',
+    CONTACT = 'contact',
+    CONTACT_CATEGORY = 'contactcategory',
+    CONTACT_ROLE = 'contactrole',
+    COST_CATEGORY = 'costcategory',
+    COUPON_CODE = 'couponcode',
+    CREDIT_CARD_CHARGE = 'creditcardcharge',
+    CREDIT_CARD_REFUND = 'creditcardrefund',
+    CREDIT_MEMO = 'creditmemo',
+    CURRENCY = 'currency',
+    CUSTOMER = 'customer',
+    CUSTOMER_CATEGORY = 'customercategory',
+    CUSTOMER_DEPOSIT = 'customerdeposit',
+    CUSTOMER_MESSAGE = 'customermessage',
+    CUSTOMER_PAYMENT = 'customerpayment',
+    CUSTOMER_PAYMENT_AUTHORIZATION = 'customerpaymentauthorization',
+    CUSTOMER_REFUND = 'customerrefund',
+    CUSTOMER_STATUS = 'customerstatus',
+    CUSTOMER_SUBSIDIARY_RELATIONSHIP = 'customersubsidiaryrelationship',
+    CUSTOM_PURCHASE = 'custompurchase',
+    CUSTOM_RECORD = 'customrecord',
+    CUSTOM_SALE = 'customsale',
+    CUSTOM_TRANSACTION = 'customtransaction',
+    DEPARTMENT = 'department',
+    DEPOSIT = 'deposit',
+    DEPOSIT_APPLICATION = 'depositapplication',
+    DESCRIPTION_ITEM = 'descriptionitem',
+    DISCOUNT_ITEM = 'discountitem',
+    DOWNLOAD_ITEM = 'downloaditem',
+    EMAIL_TEMPLATE = 'emailtemplate',
+    EMPLOYEE = 'employee',
+    EMPLOYEE_CHANGE_REQUEST = 'employeechangerequest',
+    EMPLOYEE_CHANGE_REQUEST_TYPE = 'employeechangerequesttype',
+    EMPLOYEE_EXPENSE_SOURCE_TYPE = 'employeeexpensesourcetype',
+    EMPLOYEE_STATUS = 'employeestatus',
+    EMPLOYEE_TYPE = 'employeetype',
+    ENTITY_ACCOUNT_MAPPING = 'entityaccountmapping',
+    ESTIMATE = 'estimate',
+    EXPENSE_AMORTIZATION_EVENT = 'expenseamortizationevent',
+    EXPENSE_CATEGORY = 'expensecategory',
+    EXPENSE_PLAN = 'expenseplan',
+    EXPENSE_REPORT = 'expensereport',
+    EXPENSE_REPORT_POLICY = 'expensereportpolicy',
+    FAIR_VALUE_PRICE = 'fairvalueprice',
+    FINANCIAL_INSTITUTION = 'financialinstitution',
+    FIXED_AMOUNT_PROJECT_REVENUE_RULE = 'fixedamountprojectrevenuerule',
+    FOLDER = 'folder',
+    FORMAT_PROFILE = 'formatprofile',
+    FULFILLMENT_REQUEST = 'fulfillmentrequest',
+    GENERAL_TOKEN = 'generaltoken',
+    GENERIC_RESOURCE = 'genericresource',
+    GIFT_CERTIFICATE = 'giftcertificate',
+    GIFT_CERTIFICATE_ITEM = 'giftcertificateitem',
+    GL_NUMBERING_SEQUENCE = 'glnumberingsequence',
+    GLOBAL_ACCOUNT_MAPPING = 'globalaccountmapping',
+    GLOBAL_INVENTORY_RELATIONSHIP = 'globalinventoryrelationship',
+    GOAL = 'goal',
+    IMPORTED_EMPLOYEE_EXPENSE = 'importedemployeeexpense',
+    INBOUND_SHIPMENT = 'inboundshipment',
+    INTERCOMP_ALLOCATION_SCHEDULE = 'intercompallocationschedule',
+    INTER_COMPANY_JOURNAL_ENTRY = 'intercompanyjournalentry',
+    INTER_COMPANY_TRANSFER_ORDER = 'intercompanytransferorder',
+    INVENTORY_ADJUSTMENT = 'inventoryadjustment',
+    INVENTORY_COST_REVALUATION = 'inventorycostrevaluation',
+    INVENTORY_COUNT = 'inventorycount',
+    INVENTORY_DETAIL = 'inventorydetail',
+    INVENTORY_ITEM = 'inventoryitem',
+    INVENTORY_NUMBER = 'inventorynumber',
+    INVENTORY_STATUS = 'inventorystatus',
+    INVENTORY_STATUS_CHANGE = 'inventorystatuschange',
+    INVENTORY_TRANSFER = 'inventorytransfer',
+    INVENTORY_WORKSHEET = 'inventoryworksheet',
+    INVOICE = 'invoice',
+    INVOICE_GROUP = 'invoicegroup',
+    ISSUE = 'issue',
+    ISSUE_PRODUCT = 'issueproduct',
+    ISSUE_PRODUCT_VERSION = 'issueproductversion',
+    ITEM_ACCOUNT_MAPPING = 'itemaccountmapping',
+    ITEM_COLLECTION = 'itemcollection',
+    ITEM_COLLECTION_ITEM_MAP = 'itemcollectionitemmap',
+    ITEM_DEMAND_PLAN = 'itemdemandplan',
+    ITEM_FULFILLMENT = 'itemfulfillment',
+    ITEM_GROUP = 'itemgroup',
+    ITEM_LOCATION_CONFIGURATION = 'itemlocationconfiguration',
+    ITEM_PROCESS_FAMILY = 'itemprocessfamily',
+    ITEM_PROCESS_GROUP = 'itemprocessgroup',
+    ITEM_RECEIPT = 'itemreceipt',
+    ITEM_REVISION = 'itemrevision',
+    ITEM_SUPPLY_PLAN = 'itemsupplyplan',
+    JOB = 'job',
+    JOB_STATUS = 'jobstatus',
+    JOB_TYPE = 'jobtype',
+    JOURNAL_ENTRY = 'journalentry',
+    KIT_ITEM = 'kititem',
+    LABOR_BASED_PROJECT_REVENUE_RULE = 'laborbasedprojectrevenuerule',
+    LEAD = 'lead',
+    LOCATION = 'location',
+    LOT_NUMBERED_ASSEMBLY_ITEM = 'lotnumberedassemblyitem',
+    LOT_NUMBERED_INVENTORY_ITEM = 'lotnumberedinventoryitem',
+    MANUFACTURING_COST_TEMPLATE = 'manufacturingcosttemplate',
+    MANUFACTURING_OPERATION_TASK = 'manufacturingoperationtask',
+    MANUFACTURING_ROUTING = 'manufacturingrouting',
+    MAP_REDUCE_SCRIPT = 'mapreducescript',
+    MARKUP_ITEM = 'markupitem',
+    MASSUPDATE_SCRIPT = 'massupdatescript',
+    MEM_DOC = 'memdoc',
+    MERCHANDISE_HIERARCHY_LEVEL = 'merchandisehierarchylevel',
+    MERCHANDISE_HIERARCHY_NODE = 'merchandisehierarchynode',
+    MERCHANDISE_HIERARCHY_VERSION = 'merchandisehierarchyversion',
+    MESSAGE = 'message',
+    MFG_PLANNED_TIME = 'mfgplannedtime',
+    NEXUS = 'nexus',
+    NON_INVENTORY_ITEM = 'noninventoryitem',
+    NOTE = 'note',
+    NOTE_TYPE = 'notetype',
+    OPPORTUNITY = 'opportunity',
+    ORDER_RESERVATION = 'orderreservation',
+    ORDER_SCHEDULE = 'orderschedule',
+    ORDER_TYPE = 'ordertype',
+    OTHER_CHARGE_ITEM = 'otherchargeitem',
+    OTHER_NAME = 'othername',
+    OTHER_NAME_CATEGORY = 'othernamecategory',
+    PARTNER = 'partner',
+    PARTNER_CATEGORY = 'partnercategory',
+    PAYCHECK = 'paycheck',
+    PAYCHECK_JOURNAL = 'paycheckjournal',
+    PAYMENT_CARD = 'paymentcard',
+    PAYMENT_CARD_TOKEN = 'paymentcardtoken',
+    PAYMENT_ITEM = 'paymentitem',
+    PAYMENT_METHOD = 'paymentmethod',
+    PAYROLL_ITEM = 'payrollitem',
+    PCT_COMPLETE_PROJECT_REVENUE_RULE = 'pctcompleteprojectrevenuerule',
+    PERFORMANCE_METRIC = 'performancemetric',
+    PERFORMANCE_REVIEW = 'performancereview',
+    PERFORMANCE_REVIEW_SCHEDULE = 'performancereviewschedule',
+    PERIOD_END_JOURNAL = 'periodendjournal',
+    PHONE_CALL = 'phonecall',
+    PICK_STRATEGY = 'pickstrategy',
+    PICK_TASK = 'picktask',
+    PLANNED_ORDER = 'plannedorder',
+    PLANNING_ITEM_CATEGORY = 'planningitemcategory',
+    PLANNING_ITEM_GROUP = 'planningitemgroup',
+    PLANNING_RULE_GROUP = 'planningrulegroup',
+    PLANNING_VIEW = 'planningview',
+    PORTLET = 'portlet',
+    PRICE_BOOK = 'pricebook',
+    PRICE_LEVEL = 'pricelevel',
+    PRICE_PLAN = 'priceplan',
+    PRICING_GROUP = 'pricinggroup',
+    PROJECT_EXPENSE_TYPE = 'projectexpensetype',
+    PROJECT_IC_CHARGE_REQUEST = 'projecticchargerequest',
+    PROJECT_TASK = 'projecttask',
+    PROJECT_TEMPLATE = 'projecttemplate',
+    PROMOTION_CODE = 'promotioncode',
+    PROSPECT = 'prospect',
+    PURCHASE_CONTRACT = 'purchasecontract',
+    PURCHASE_ORDER = 'purchaseorder',
+    PURCHASE_REQUISITION = 'purchaserequisition',
+    REALLOCATE_ITEM = 'reallocateitem',
+    RECEIVE_INBOUND_SHIPMENT = 'receiveinboundshipment',
+    RESOURCE_ALLOCATION = 'resourceallocation',
+    RESTLET = 'restlet',
+    RETURN_AUTHORIZATION = 'returnauthorization',
+    REVENUE_ARRANGEMENT = 'revenuearrangement',
+    REVENUE_COMMITMENT = 'revenuecommitment',
+    REVENUE_COMMITMENT_REVERSAL = 'revenuecommitmentreversal',
+    REVENUE_PLAN = 'revenueplan',
+    REV_REC_FIELD_MAPPING = 'revrecfieldmapping',
+    REV_REC_SCHEDULE = 'revrecschedule',
+    REV_REC_TEMPLATE = 'revrectemplate',
+    SALES_CHANNEL = 'saleschannel',
+    SALES_ORDER = 'salesorder',
+    SALES_ROLE = 'salesrole',
+    SALES_TAX_ITEM = 'salestaxitem',
+    SCHEDULED_SCRIPT = 'scheduledscript',
+    SCHEDULED_SCRIPT_INSTANCE = 'scheduledscriptinstance',
+    SCRIPT_DEPLOYMENT = 'scriptdeployment',
+    SERIALIZED_ASSEMBLY_ITEM = 'serializedassemblyitem',
+    SERIALIZED_INVENTORY_ITEM = 'serializedinventoryitem',
+    SERVICE_ITEM = 'serviceitem',
+    SHIP_ITEM = 'shipitem',
+    SOLUTION = 'solution',
+    STATISTICAL_JOURNAL_ENTRY = 'statisticaljournalentry',
+    STORE_PICKUP_FULFILLMENT = 'storepickupfulfillment',
+    SUBSCRIPTION = 'subscription',
+    SUBSCRIPTION_CHANGE_ORDER = 'subscriptionchangeorder',
+    SUBSCRIPTION_LINE = 'subscriptionline',
+    SUBSCRIPTION_PLAN = 'subscriptionplan',
+    SUBSCRIPTION_TERM = 'subscriptionterm',
+    SUBSIDIARY = 'subsidiary',
+    SUBSIDIARY_SETTINGS = 'subsidiarysettings',
+    SUBTOTAL_ITEM = 'subtotalitem',
+    SUITELET = 'suitelet',
+    SUPPLY_CHAIN_SNAPSHOT = 'supplychainsnapshot',
+    SUPPLY_CHAIN_SNAPSHOT_SIMULATION = 'supplychainsnapshotsimulation',
+    SUPPLY_CHANGE_ORDER = 'supplychangeorder',
+    SUPPLY_PLAN_DEFINITION = 'supplyplandefinition',
+    SUPPORT_CASE = 'supportcase',
+    TASK = 'task',
+    TAX_ACCT = 'taxacct',
+    TAX_GROUP = 'taxgroup',
+    TAX_PERIOD = 'taxperiod',
+    TAX_TYPE = 'taxtype',
+    TERM = 'term',
+    TIME_BILL = 'timebill',
+    TIME_ENTRY = 'timeentry',
+    TIME_OFF_CHANGE = 'timeoffchange',
+    TIME_OFF_PLAN = 'timeoffplan',
+    TIME_OFF_REQUEST = 'timeoffrequest',
+    TIME_OFF_RULE = 'timeoffrule',
+    TIME_OFF_TYPE = 'timeofftype',
+    TIME_SHEET = 'timesheet',
+    TOPIC = 'topic',
+    TRANSFER_ORDER = 'transferorder',
+    UNITS_TYPE = 'unitstype',
+    UNLOCKED_TIME_PERIOD = 'unlockedtimeperiod',
+    USAGE = 'usage',
+    USEREVENT_SCRIPT = 'usereventscript',
+    VENDOR = 'vendor',
+    VENDOR_BILL = 'vendorbill',
+    VENDOR_CATEGORY = 'vendorcategory',
+    VENDOR_CREDIT = 'vendorcredit',
+    VENDOR_PAYMENT = 'vendorpayment',
+    VENDOR_PREPAYMENT = 'vendorprepayment',
+    VENDOR_PREPAYMENT_APPLICATION = 'vendorprepaymentapplication',
+    VENDOR_RETURN_AUTHORIZATION = 'vendorreturnauthorization',
+    VENDOR_SUBSIDIARY_RELATIONSHIP = 'vendorsubsidiaryrelationship',
+    WAVE = 'wave',
+    WBS = 'wbs',
+    WEBSITE = 'website',
+    WORKFLOW_ACTION_SCRIPT = 'workflowactionscript',
+    WORK_ORDER = 'workorder',
+    WORK_ORDER_CLOSE = 'workorderclose',
+    WORK_ORDER_COMPLETION = 'workordercompletion',
+    WORK_ORDER_ISSUE = 'workorderissue',
+    WORKPLACE = 'workplace',
+    ZONE = 'zone'
 }
ShawnTalbert commented 5 months ago

This sounds like a fine contribution to include, provided we believe users unlikely to abuse it!

anthony-unicare commented 5 months ago

This sounds like a fine contribution to include, provided we believe users unlikely to abuse it!

@ShawnTalbert, it sounds like we’re on the same page.

I would also note that this patch adds several record types that are currently missing, so it’s substantially more accurate than the current version.

Could we please get this merged?

MrRob commented 5 months ago

@anthony-unicare Sure, can you do a pull request for it? Thank you!

ahowley commented 5 months ago

Thank you for this - very helpful @anthony-unicare! Was running into some type gymnastics around these properties not being treated as strings, hopefully this means no more Type.VENDOR_BILL as any as string 🤣

ShawnTalbert commented 5 months ago

Interesting - I've never seen any similar issues using this enum.

On Wed, Jun 5, 2024, 10:28 AM Alex Howley @.***> wrote:

Thank you for this - very helpful @anthony-unicare https://github.com/anthony-unicare! Was running into some type gymnastics around these properties not being treated as strings, hopefully this means no more Type.VENDOR_BILL as Type.VENDOR_BILL 🤣

— Reply to this email directly, view it on GitHub https://github.com/headintheclouddev/typings-suitescript-2.0/issues/277#issuecomment-2150588237, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKFNA5TDHE4YN6RPHHJ7BTZF5DCFAVCNFSM6AAAAABIMIQ4EGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJQGU4DQMRTG4 . You are receiving this because you were mentioned.Message ID: @.*** com>

ahowley commented 5 months ago

It's not a huge problem, but tedious when working with the actual string values the enum members point to, because each entry has the type (enum member) instead of string, despite the actual value being a string under the hood.

Specifically, I ran into it in this building this little utility function:

/**
 * This utility provides a Map from the string values of the Record.Type SuiteScript enum to their display text values as
 * they appear in NetSuite saved searches, SuiteQL queries, etc. This is a function and not an exported constant because
 * SuiteScript can only use imported module members in a deployment, which means module-level code can't access SuiteScript APIs.
 *
 * @param reverse: Optionally set this parameter to true to get a map from display values to transaction types, rather than
 * the other way around.
 */
export function getTransactionTypeDisplayValueMap(reverse?: true) {
  const valueArray: [string, string][] = [
    [RecordType.EXPENSE_REPORT as any as string, "ExpRept"],
    [RecordType.CREDIT_CARD_CHARGE as any as string, "CardChrg"],
    [RecordType.PURCHASE_ORDER as any as string, "PurchOrd"],
    [RecordType.ITEM_RECEIPT as any as string, "ItemRcpt"],
    [RecordType.SALES_ORDER as any as string, "SalesOrd"],
    [RecordType.CHECK as any as string, "Check"],
    [RecordType.CREDIT_MEMO as any as string, "CustCred"],
    [RecordType.CUSTOMER_REFUND as any as string, "CustRfnd"],
    [RecordType.VENDOR_PREPAYMENT as any as string, "VPrep"],
    [RecordType.VENDOR_CREDIT as any as string, "VendCred"],
    [RecordType.ITEM_FULFILLMENT as any as string, "ItemShip"],
    [RecordType.VENDOR_PAYMENT as any as string, "VendPymt"],
    [RecordType.CUSTOMER_PAYMENT as any as string, "CustPymt"],
    [RecordType.CASH_REFUND as any as string, "CashRfnd"],
    [RecordType.INVOICE as any as string, "CustInvc"],
    [RecordType.DEPOSIT as any as string, "Deposit"],
    [RecordType.INVENTORY_ADJUSTMENT as any as string, "InvAdjst"],
    [RecordType.VENDOR_BILL as any as string, "VendBill"],
    [RecordType.JOURNAL_ENTRY as any as string, "Journal"],
  ];
  if (reverse) valueArray.forEach(tuple => tuple.reverse());

  return new Map<string, string>(valueArray);
}

(there are arguably cleaner ways to handle this than casting a million times, but hopefully this serves as a decent example)

ShawnTalbert commented 5 months ago

I think it's dangerous to write code that expects those values to be strings. See my previous comments on this thread.

It doesn't matter hugely if the strings are there or not for our team because we can avoid misuse.

On Wed, Jun 5, 2024, 2:18 PM Alex Howley @.***> wrote:

It's not a huge problem, but tedious when working with the actual string values the enum members point to, because each entry has the type (enum member) instead of string, despite the actual value being a string under the hood.

Specifically, I ran into it in this building this little utility function:

/* This utility provides a Map from the string values of the Record.Type SuiteScript enum to their display text values as they appear in NetSuite saved searches, SuiteQL queries, etc. This is a function and not an exported constant because SuiteScript can only use imported module members in a deployment, which means module-level code can't access SuiteScript APIs. @param reverse: Optionally set this parameter to true to get a map from display values to transaction types, rather than the other way around. /export function getTransactionTypeDisplayValueMap(reverse?: true) { const valueArray: [string, string][] = [ [RecordType.EXPENSE_REPORT as any as string, "ExpRept"], [RecordType.CREDIT_CARD_CHARGE as any as string, "CardChrg"], [RecordType.PURCHASE_ORDER as any as string, "PurchOrd"], [RecordType.ITEM_RECEIPT as any as string, "ItemRcpt"], [RecordType.SALES_ORDER as any as string, "SalesOrd"], [RecordType.CHECK as any as string, "Check"], [RecordType.CREDIT_MEMO as any as string, "CustCred"], [RecordType.CUSTOMER_REFUND as any as string, "CustRfnd"], [RecordType.VENDOR_PREPAYMENT as any as string, "VPrep"], [RecordType.VENDOR_CREDIT as any as string, "VendCred"], [RecordType.ITEM_FULFILLMENT as any as string, "ItemShip"], [RecordType.VENDOR_PAYMENT as any as string, "VendPymt"], [RecordType.CUSTOMER_PAYMENT as any as string, "CustPymt"], [RecordType.CASH_REFUND as any as string, "CashRfnd"], [RecordType.INVOICE as any as string, "CustInvc"], [RecordType.DEPOSIT as any as string, "Deposit"], [RecordType.INVENTORY_ADJUSTMENT as any as string, "InvAdjst"], [RecordType.VENDOR_BILL as any as string, "VendBill"], [RecordType.JOURNAL_ENTRY as any as string, "Journal"], ]; if (reverse) valueArray.forEach(tuple => tuple.reverse());

return new Map<string, string>(valueArray);}

(there are arguably cleaner ways to handle this than casting a million times, but hopefully this serves as a decent example)

— Reply to this email directly, view it on GitHub https://github.com/headintheclouddev/typings-suitescript-2.0/issues/277#issuecomment-2150978235, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKFNA6DQYCZLPTIITFGNJLZF56BFAVCNFSM6AAAAABIMIQ4EGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJQHE3TQMRTGU . You are receiving this because you were mentioned.Message ID: @.*** com>

ahowley commented 5 months ago

Ah, I understand - the concern isn't that the strings could change to other strings, but that they could change types entirely. I think that's fair 👍

ShawnTalbert commented 5 months ago

Well, the string values certainly could change, but practically speaking I haven't seen many examples of that in over a decade working with this thing we call NetSuite.

On Wed, Jun 5, 2024 at 2:37 PM Alex Howley @.***> wrote:

Ah, I understand - the concern isn't that the strings could change to other strings, but that they could change types entirely. I think that's fair 👍

— Reply to this email directly, view it on GitHub https://github.com/headintheclouddev/typings-suitescript-2.0/issues/277#issuecomment-2151003853, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKFNAZEPEPDXH2ZF6DAT23ZF6AK7AVCNFSM6AAAAABIMIQ4EGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJRGAYDGOBVGM . You are receiving this because you were mentioned.Message ID: @.*** com>

anthony-unicare commented 5 months ago

@anthony-unicare Sure, can you do a pull request for it? Thank you!

Done: #285.

MrRob commented 5 months ago

Awesome, thank you